Changeset 1133 for branches/sandbox
- Timestamp:
- Apr 15, 2011 2:48:50 PM (14 years ago)
- Location:
- branches/sandbox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/sandbox/rbimport_cartesian.tcl ¶
r1131 r1133 73 73 74 74 set ::rb_colnum 0 75 for {set linenum 1} {$linenum <= [expr $::rb_linenum - 1]} {incr linenum} {75 for {set linenum 1} {$linenum <= $::rb_linenum} {incr linenum} { 76 76 for {set colnum 0} {$colnum <= [expr [llength $::tline($linenum)] -1]} {incr colnum} { 77 77 grid [label $main.cart$::rb_colnum -text [lindex $::tline($linenum) $colnum] -width 8] -padx 5 -row $linenum -column [expr $colnum + 1] … … 116 116 set ::rb_num 1 117 117 set ::rb_matrix_num($bodytyp) 1 118 set sitenum [expr $::rb_linenum - 1]119 set temp [expr $::rb_linenum - 1]118 set sitenum $::rb_linenum 119 set temp $::rb_linenum 120 120 set colnum [llength $::tline(1)] 121 121 … … 146 146 147 147 set ::rb_coord_num($bodytyp,1) $temp 148 148 149 149 150 150 #$::rb_notebook raise [$::rb_notebook page 0] -
TabularUnified branches/sandbox/rbimport_zmatrix.tcl ¶
r1121 r1133 157 157 NewBodyTypeWindow 158 158 159 159 160 # $::rb_notebook raise [$::rb_notebook page 0] 160 161 # set pane [$::rb_notebook getframe rb_body0] -
TabularUnified branches/sandbox/rigid.tcl ¶
r1132 r1133 169 169 set ::rb_matrix_num($bodytyp) 1 170 170 set ::rb_mult($bodytyp,1) 1.000 171 171 172 172 if {[info vars ::rb_coord_num($bodytyp,1)] == ""} {set ::rb_coord_num($bodytyp,1) 1} 173 173 … … 293 293 set really $location.delete 294 294 toplevel $really 295 putontop $really295 # putontop $really 296 296 wm title $really "Delete Rigid Body" 297 297 #wm geometry $really 250x250+10+10 … … 328 328 329 329 proc RB_Populate {rb_notebook bodytyp args} { 330 RB_Load_RBdata 330 331 set ::rb_panel $bodytyp 331 332 set phaselist $::expmap(phaselist) … … 357 358 } 358 359 359 button $con.rb_vmatrix -text "Edit Matrix" -command "RB_Edit_Matrix $ matrixnum" -width 18360 button $con.rb_vmatrix -text "Edit Matrix" -command "RB_Edit_Matrix $bodytyp" -width 18 360 361 grid $con.rb_vmatrix -row 4 -column 1 -padx 5 -pady 5 361 362 grid [button $con.refine -text "Refinement \n Flags" -command "RB_Refine_Con" -width 18 ] -row 5 -column 1 … … 597 598 } 598 599 # show deviations 600 599 601 foreach atom $atoms rms $rmsbyatom { 600 #puts "[atominfo $phase $atom label]\t$rms"602 puts "[atominfo $phase $atom label]\t$rms" 601 603 } 602 604 #puts "CalcBody $Euler $cell $coords $origin" … … 804 806 805 807 proc RB_Edit_Matrix {bodnum args} { 808 puts "Bodnum = $bodnum" 806 809 catch {destroy .viewmatrix} 807 810 set em .viewmatrix 808 811 toplevel $em 809 #putontop $em812 putontop $em 810 813 wm title $em "Edit Matrices for Rigid Body $bodnum" 811 814 … … 817 820 grid [frame $sm -bd 2 -relief groove] -row 1 -column 0 818 821 819 grid [label $sm.sort -text "Sort Atoms"] -row 1 -column 0 -columnspan 2822 grid [label $sm.sort -text "Sort Matrix"] -row 1 -column 0 -columnspan 2 820 823 grid [button $sm.inc -text "\u2191" -command "RB_Sort_Inc $bodnum inc"] -row 2 -column 0 821 824 grid [button $sm.dec -text "\u2193" -command "RB_Sort_Inc $bodnum dec"] -row 2 -column 1 … … 887 890 } 888 891 } 889 892 if {$dir == "dec"} {set sortlist [RB_String_Reverse $sortlist]} 890 893 891 894 for {set i 1} {$i <= $::rb_matrix_num($bodnum)} {incr i} { … … 893 896 if {$dir == "inc"} {set line1 [expr $sort - 1]} 894 897 if {$dir == "dec"} {set line1 [expr $sort + 1]} 895 896 897 # if {$line1 >= 0 && $line1 < $::rb_coord_num($bodnum,1)} { 898 set x1dum $::x($i,$line1) 899 set y1dum $::y($i,$line1) 900 set z1dum $::z($i,$line1) 901 set ::x($i,$line1) $::x($i,$sort) 902 set ::y($i,$line1) $::y($i,$sort) 903 set ::z($i,$line1) $::z($i,$sort) 904 set ::x($i,$sort) $x1dum 905 set ::y($i,$sort) $y1dum 906 set ::z($i,$sort) $z1dum 907 # } else {bell} 898 set x1dum $::x($i,$line1) 899 set y1dum $::y($i,$line1) 900 set z1dum $::z($i,$line1) 901 set ::x($i,$line1) $::x($i,$sort) 902 set ::y($i,$line1) $::y($i,$sort) 903 set ::z($i,$line1) $::z($i,$sort) 904 set ::x($i,$sort) $x1dum 905 set ::y($i,$sort) $y1dum 906 set ::z($i,$sort) $z1dum 907 908 908 set ::rb_sort($sort) 0 909 909 if {$dir == "inc"} {set ::rb_sort([expr $sort - 1]) 1} … … 913 913 } 914 914 } 915 916 917 } 918 } 915 } 916 } 917 918 } 919 920 proc RB_String_Reverse {string args} { 921 puts "$string" 922 set rstring "" 923 set len [expr [llength $string] - 1] 924 while {$len > -1} { 925 lappend rstring [lindex $string $len] 926 incr len -1 927 } 928 puts "contents of rstring = $rstring" 929 return $rstring 919 930 } 920 931 … … 1055 1066 destroy .nbt 1056 1067 toplevel .nbt 1068 putontop .nbt 1057 1069 set con1 .nbt.1 1058 1070 set con2 .nbt.2 … … 1064 1076 grid [label $con1.lbl -text "New Rigid Body Type $bodytyp"] -row 0 -column 0 1065 1077 grid [label $con1.mat -text "Number of Matricies Describing Rigid Body"] -row 1 -column 0 1066 1078 1067 1079 1068 1080 … … 1398 1410 foreach mapnum $rb_map_num($phasenum,$bodnum) { 1399 1411 # puts "mapnum = $mapnum" 1400 grid [checkbutton $main.check($phasenum,$bodnum,$mapnum)] -row $row -column 01412 # grid [checkbutton $main.check($phasenum,$bodnum,$mapnum)] -row $row -column 0 1401 1413 grid [label $main.body($phasenum,$bodnum,$mapnum) -text $bodnum] -row $row -column 1 1402 1414 grid [label $main.phase($phasenum,$bodnum,$mapnum) -text $phasenum] -row $row -column 2
Note: See TracChangeset
for help on using the changeset viewer.