Changeset 1210 for branches/sandbox


Ignore:
Timestamp:
Aug 15, 2012 3:50:43 PM (8 years ago)
Author:
lake
Message:

new toys in the rigid body code (rigid.tcl).
(1) - displays and allows editing of the origin, euler angle and tls parameters.
(2) - activates the damping tk_option lists for the origin and euler angle parameters.
(3) - adds damping controls for the tls paramters.

as of yet, there is no warning given if constrained variables have different values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/rigid.tcl

    r1207 r1210  
    7575#          ::rb_firstatom                             contains first atom on active rigid body.  Must be gobal for variable has trace.
    7676#$         ::rb_phase                                 phase for active map
     77#          ::rb(phase,bodnum,mapnum,x)                origin x coord
     78#          ::rb(phase,bodnum,mapnum,y)                origin y coord
     79#          ::rb(phase,bodnum,mapnum,z)                origin z coord
     80#          ::rb(phase,bodnum,mapnum,e1)               euler angle 1
     81#          ::rb(phase,bodnum,mapnum,e2)               euler angle 2
     82#          ::rb(phase,bodnum,mapnum,e3)               euler angle 3
     83
    7784
    7885# debug code to load test files when run as an independent script
     
    109116    if {$::rbtypelist == ""} {
    110117        MyMessageBox -parent . -title "Installation error" -icon warning \
    111             -message "No rigid body import routines were found.\nSomething is wrong with the EXPGUI installation" 
     118            -message "No rigid body import routines were found.\nSomething is wrong with the EXPGUI installation"
    112119        set ::rbtypelist " "
    113120    }
     
    188195     set ::rb_map_positionvars($phase,$bodnum,$mapnum) [lindex $rb_map 3]
    189196     set ::rb_map_damping($phase,$bodnum,$mapnum) [lindex $rb_map 4]
     197
     198     set ::rb_damp_origin [lindex $::rb_map_damping($phase,$bodnum,$mapnum) 0]
     199     set ::rb_damp_euler [lindex $::rb_map_damping($phase,$bodnum,$mapnum) 3]
     200
    190201     set ::rb_map_tls($phase,$bodnum,$mapnum) [lindex $rb_map 5]
    191202     set ::rb_map_tls_var($phase,$bodnum,$mapnum) [lindex $rb_map 6]
    192203     set ::rb_map_tls_damp($phase,$bodnum,$mapnum) [lindex $rb_map 7]
     204     
     205     set ::rb_damp_t [lindex $::rb_map_tls_damp($phase,$bodnum,$mapnum) 0]
     206     set ::rb_damp_l [lindex $::rb_map_tls_damp($phase,$bodnum,$mapnum) 1]
     207     set ::rb_damp_s [lindex $::rb_map_tls_damp($phase,$bodnum,$mapnum) 2]
    193208}
    194209
     
    454469     button $con.rb_vmatrix -text "Edit Matrix" -command "RB_Edit_Matrix $bodnum" -width 18
    455470     grid   $con.rb_vmatrix -row 4 -column 1 -padx 5 -pady 5
    456      grid [button $con.refine -text "Refinement \n Flags" -command "RB_Refine_Con" -width 18 ] -row 5 -column 1
     471     grid [button $con.refine -text "Refinement \n Controls" -command "RB_Refine_Con" -width 18 ] -row 5 -column 1
    457472
    458473     # create header for mapping data
     
    17441759
    17451760#                         puts $main
    1746                          grid [button $main.cfefx($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.cfefx($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,x) -width 5] -row $row -column 4
    1747                          grid [button $main.cfefy($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.cfefy($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,y) -width 5]  -row $row -column 5
    1748                          grid [button $main.cfefz($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.cfefz($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,z) -width 5] -row $row -column 6
     1761                         grid [button $main.cfefx($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.cfefx($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,x) -width 8] -row $row -column 4
     1762                         grid [entry $main.cfefxentry($phasenum,$bodnum,$mapnum) -textvariable ::rb($phasenum,$bodnum,$mapnum,x) -width 8] -row [expr $row + 1] -column 4
     1763                         grid [button $main.cfefy($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.cfefy($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,y) -width 8]  -row $row -column 5
     1764                         grid [entry $main.cfefyentry($phasenum,$bodnum,$mapnum) -textvariable ::rb($phasenum,$bodnum,$mapnum,y) -width 8] -row [expr $row + 1] -column 5
     1765                         grid [button $main.cfefz($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.cfefz($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,z) -width 8] -row $row -column 6
     1766                         grid [entry $main.cfefzentry($phasenum,$bodnum,$mapnum) -textvariable ::rb($phasenum,$bodnum,$mapnum,z) -width 8] -row [expr $row + 1] -column 6
    17491767                         grid [label $main.b1($phasenum,$bodnum,$mapnum) -text "   "] -row $row -column 7
    17501768
    1751                          grid [button $main.eref1($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.eref1($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,e1) -width 5] -row $row -column 8
    1752                          grid [button $main.eref2($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.eref2($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,e2) -width 5] -row $row -column 9
    1753                          grid [button $main.eref3($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.eref3($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,e3) -width 5] -row $row -column 10
     1769                         grid [button $main.eref1($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.eref1($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,e1) -width 8] -row $row -column 8
     1770                         grid [entry $main.eref1entry($phasenum,$bodnum,$mapnum) -textvariable ::rb($phasenum,$bodnum,$mapnum,e1) -width 8] -row [expr $row + 1] -column 8
     1771                         grid [button $main.eref2($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.eref2($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,e2) -width 8] -row $row -column 9
     1772                         grid [entry $main.eref2entry($phasenum,$bodnum,$mapnum) -textvariable ::rb($phasenum,$bodnum,$mapnum,e2) -width 8] -row [expr $row + 1] -column 9
     1773                         grid [button $main.eref3($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.eref3($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,e3) -width 8] -row $row -column 10
     1774                         grid [entry $main.eref3entry($phasenum,$bodnum,$mapnum) -textvariable ::rb($phasenum,$bodnum,$mapnum,e3) -width 8] -row [expr $row + 1] -column 10
    17541775#                         grid [label $main.b2($phasenum,$bodnum,$mapnum) -text "   "] -row $row -column 11
    17551776
     
    17571778
    17581779
    1759                          grid [button $main.t11ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t11ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t11) -width 5] -row $row -column 12
    1760                          grid [button $main.t22ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t22ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t22) -width 5] -row $row -column 13
    1761                          grid [button $main.t33ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t33ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t33) -width 5] -row $row -column 14
    1762                          grid [button $main.t12ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t12ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t12) -width 5] -row $row -column 15
    1763                          grid [button $main.t13ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t13ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t13) -width 5] -row $row -column 16
    1764                          grid [button $main.t23ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t23ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t23) -width 5] -row $row -column 17
    1765                          grid [label $main.b3($phasenum,$bodnum,$mapnum) -text "   "] -row $row -column 18
    1766 
    1767                          grid [button $main.l11ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l11ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l11) -width 5] -row $row -column 19
    1768                          grid [button $main.l22ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l22ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l22) -width 5] -row $row -column 20
    1769                          grid [button $main.l33ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l33ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l33) -width 5] -row $row -column 21
    1770                          grid [button $main.l12ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l12ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l12) -width 5] -row $row -column 22
    1771                          grid [button $main.l13ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l13ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l13) -width 5] -row $row -column 23
    1772                          grid [button $main.l23ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l23ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l23) -width 5] -row $row -column 24
     1780                         grid [button $main.t11ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t11ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t11) -width 8] -row $row -column 12
     1781                         grid [entry $main.t11entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,t11) -width 8] -row [expr $row + 1] -column 12
     1782                         grid [button $main.t22ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t22ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t22) -width 8] -row $row -column 13
     1783                         grid [entry $main.t22entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,t22) -width 8] -row [expr $row + 1] -column 13
     1784                         grid [button $main.t33ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t33ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t33) -width 8] -row $row -column 14
     1785                         grid [entry $main.t33entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,t33) -width 8] -row [expr $row + 1] -column 14
     1786                         grid [button $main.t12ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t12ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t12) -width 8] -row $row -column 15
     1787                         grid [entry $main.t12entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,t12) -width 8] -row [expr $row + 1] -column 15
     1788                         grid [button $main.t13ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t13ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t13) -width 8] -row $row -column 16
     1789                         grid [entry $main.t13entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,t13) -width 8] -row [expr $row + 1] -column 16
     1790                         grid [button $main.t23ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.t23ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,t23) -width 8] -row $row -column 17
     1791                         grid [entry $main.t23entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,t23) -width 8] -row [expr $row + 1] -column 17
     1792
     1793                         grid [button $main.l11ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l11ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l11) -width 8] -row $row -column 19
     1794                         grid [entry $main.l11entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,l11) -width 8] -row [expr $row + 1] -column 19
     1795                         grid [button $main.l22ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l22ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l22) -width 8] -row $row -column 20
     1796                         grid [entry $main.l22entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,l22) -width 8] -row [expr $row + 1] -column 20
     1797                         grid [button $main.l33ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l33ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l33) -width 8] -row $row -column 21
     1798                         grid [entry $main.l33entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,l33) -width 8] -row [expr $row + 1] -column 21
     1799                         grid [button $main.l12ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l12ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l12) -width 8] -row $row -column 22
     1800                         grid [entry $main.l12entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,l12) -width 8] -row [expr $row + 1] -column 22
     1801                         grid [button $main.l13ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l13ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l13) -width 8] -row $row -column 23
     1802                         grid [entry $main.l13entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,l13) -width 8] -row [expr $row + 1] -column 23
     1803                         grid [button $main.l23ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.l23ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,l23) -width 8] -row $row -column 24
     1804                         grid [entry $main.l23entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,l23) -width 8] -row [expr $row + 1] -column 24
     1805
    17731806                         grid [label $main.b4($phasenum,$bodnum,$mapnum) -text "   "] -row $row -column 25
    17741807
    1775                          grid [button $main.s12ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s12ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s12) -width 5] -row $row -column 26
    1776                          grid [button $main.s13ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s13ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s13) -width 5] -row $row -column 27
    1777                          grid [button $main.s21ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s21ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s21) -width 5] -row $row -column 28
    1778                          grid [button $main.s23ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s23ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s23) -width 5] -row $row -column 29
    1779                          grid [button $main.s31ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s31ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s31) -width 5] -row $row -column 30
    1780                          grid [button $main.s32ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s32ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s32) -width 5] -row $row -column 31
    1781                          grid [button $main.saaref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.saaref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,saa) -width 5] -row $row -column 32
    1782                          grid [button $main.sbbref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.sbbref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,sbb) -width 5] -row $row -column 33
     1808                         grid [button $main.s12ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s12ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s12) -width 8] -row $row -column 26
     1809                         grid [entry $main.s12entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,s12) -width 8] -row [expr $row + 1] -column 26
     1810                         grid [button $main.s13ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s13ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s13) -width 8] -row $row -column 27
     1811                         grid [entry $main.s13entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,s13) -width 8] -row [expr $row + 1] -column 27
     1812                         grid [button $main.s21ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s21ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s21) -width 8] -row $row -column 28
     1813                         grid [entry $main.s21entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,s21) -width 8] -row [expr $row + 1] -column 28
     1814                         grid [button $main.s23ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s23ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s23) -width 8] -row $row -column 29
     1815                         grid [entry $main.s23entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,s23) -width 8] -row [expr $row + 1] -column 29
     1816                         grid [button $main.s31ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s31ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s31) -width 8] -row $row -column 30
     1817                         grid [entry $main.s31entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,s31) -width 8] -row [expr $row + 1] -column 30
     1818                         grid [button $main.s32ref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.s32ref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,s32) -width 8] -row $row -column 31
     1819                         grid [entry $main.s32entry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,s32) -width 8] -row [expr $row + 1] -column 31
     1820                         grid [button $main.saaref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.saaref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,saa) -width 8] -row $row -column 32
     1821                         grid [entry $main.saaentry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,saa) -width 8] -row [expr $row + 1] -column 32
     1822                         grid [button $main.sbbref($phasenum,$bodnum,$mapnum) -command "RB_Con_Button $main.sbbref($phasenum,$bodnum,$mapnum)" -textvariable ::rb_var($phasenum,$bodnum,$mapnum,sbb) -width 8] -row $row -column 33
     1823                         grid [entry $main.sbbentry($phasenum,$bodnum,$mapnum) -textvariable ::rb_tls($phasenum,$bodnum,$mapnum,sbb) -width 8] -row [expr $row + 1] -column 33
    17831824
    17841825                         RB_TLS_Onoff $phasenum $main $bodnum $mapnum
     
    18011842                        grid [label $main.rb_site$phasenum$bodnum$mapnum \
    18021843                                  -text "atoms in rigid body:    $atomlist"] \
    1803                              -row [expr $row + 1] -column 4 -padx 5 -columnspan 999 -sticky w
    1804                         incr row 2
     1844                             -row [expr $row + 2] -column 4 -padx 5 -columnspan 999 -sticky w
     1845                        incr row 3
    18051846                     }
    18061847                 }
     
    18211862
    18221863             grid [label $con.terminate.originlabel -text "Origin Damping Factor "] -row 5 -column 1
     1864
     1865
    18231866             eval tk_optionMenu $con.terminate.origindamp ::rb_damp_origin 0 1 2 3 4 5 6 7 8 9
    1824              grid $con.terminate.origindamp -row 5 -column 2
    1825              $con.terminate.origindamp config -width 4 -state disable
     1867             grid $con.terminate.origindamp -row 5 -column 3
     1868#             $con.terminate.origindamp config -width 4 -state disable
    18261869
    18271870             grid [label $con.terminate.anglelabel -text "Angle Damping Factor "] -row 6 -column 1
    1828              eval tk_optionMenu $con.terminate.angledamp ::rb_damp_angle 0 1 2 3 4 5 6 7 8 9
    1829              grid $con.terminate.angledamp -row 6 -column 2
    1830              $con.terminate.angledamp config -width 4 -state disable
    1831 
    1832              grid [button $con.terminate.save -width 22 -text "Assign Variables and Save" -command RB_Var_Assign] -row 7 -column 1 -columnspan 2
    1833              grid [button $con.terminate.abort -width 22 -text "Abort" -command  {destroy .refcon}] -row 8 -column 1 -columnspan 2
     1871             eval tk_optionMenu $con.terminate.angledamp ::rb_damp_euler 0 1 2 3 4 5 6 7 8 9
     1872             grid $con.terminate.angledamp -row 6 -column 3
     1873 #            $con.terminate.angledamp config -width 4 -state disable
     1874
     1875             grid [label $con.terminate.tls -text "TLS Damping Factors "] -row 7 -column 1
     1876             eval tk_optionMenu $con.terminate.t ::rb_damp_t "" 0 1 2 3 4 5 6 7 8 9
     1877             eval tk_optionMenu $con.terminate.l ::rb_damp_l "" 0 1 2 3 4 5 6 7 8 9
     1878             eval tk_optionMenu $con.terminate.s ::rb_damp_s "" 0 1 2 3 4 5 6 7 8 9
     1879             grid [label $con.terminate.t1 -text "T"] -row 7 -column 2
     1880             grid $con.terminate.t -row 7 -column 3
     1881#             $con.terminate.t config -state disable
     1882             grid [label $con.terminate.l1 -text "L"] -row 7 -column 4
     1883             grid $con.terminate.l -row 7 -column 5
     1884#             $con.terminate.l config -state disable
     1885             grid [label $con.terminate.s1 -text "S"] -row 7 -column 6
     1886             grid $con.terminate.s -row 7 -column 7
     1887#             $con.terminate.s config -state disable
     1888
     1889             grid [button $con.terminate.save -width 22 -text "Assign Variables and Save" -command RB_Var_Assign] -row 8 -column 1 -columnspan 2
     1890             grid [button $con.terminate.abort -width 22 -text "Abort" -command  {destroy .refcon}] -row 9 -column 1 -columnspan 2
    18341891
    18351892}
     
    19572014                           $::rb_var($phasenum,$bodnum,$mapnum,e1) $::rb_var($phasenum,$bodnum,$mapnum,e2) \
    19582015                           $::rb_var($phasenum,$bodnum,$mapnum,e3) 0 0 0"
    1959                        puts "param saved for map $phasenum $bodnum $mapnum is vvvvvvv $rb_list"
     2016#                       puts "param saved for map $phasenum $bodnum $mapnum is vvvvvvv $rb_list"
    19602017                       RigidBodyVary $phasenum $bodnum $mapnum $rb_list
    19612018                       RecordMacroEntry "incr expgui(changed); RigidBodyVary $phasenum $bodnum $mapnum [list $rb_list]" 0
     
    19782035                               $::rb_var($phasenum,$bodnum,$mapnum,s31) $::rb_var($phasenum,$bodnum,$mapnum,s32) \
    19792036                               $::rb_var($phasenum,$bodnum,$mapnum,saa) $::rb_var($phasenum,$bodnum,$mapnum,sbb)"
    1980                            puts "TLS param save for $mapnum $bodnum $mapnum is vvvvvvvv $rb_tls"
     2037                           set rb_tls_vals "$::rb_tls($phasenum,$bodnum,$mapnum,t11) $::rb_tls($phasenum,$bodnum,$mapnum,t22) \
     2038                               $::rb_tls($phasenum,$bodnum,$mapnum,t33) $::rb_tls($phasenum,$bodnum,$mapnum,t12) \
     2039                               $::rb_tls($phasenum,$bodnum,$mapnum,t13) $::rb_tls($phasenum,$bodnum,$mapnum,t23) \
     2040                               $::rb_tls($phasenum,$bodnum,$mapnum,l11) $::rb_tls($phasenum,$bodnum,$mapnum,l22) \
     2041                               $::rb_tls($phasenum,$bodnum,$mapnum,l33) $::rb_tls($phasenum,$bodnum,$mapnum,l12) \
     2042                               $::rb_tls($phasenum,$bodnum,$mapnum,l13) $::rb_tls($phasenum,$bodnum,$mapnum,l23) \
     2043                               $::rb_tls($phasenum,$bodnum,$mapnum,s12) $::rb_tls($phasenum,$bodnum,$mapnum,s13) \
     2044                               $::rb_tls($phasenum,$bodnum,$mapnum,s21) $::rb_tls($phasenum,$bodnum,$mapnum,s23) \
     2045                               $::rb_tls($phasenum,$bodnum,$mapnum,s31) $::rb_tls($phasenum,$bodnum,$mapnum,s32) \
     2046                               $::rb_tls($phasenum,$bodnum,$mapnum,saa) $::rb_tls($phasenum,$bodnum,$mapnum,sbb)"
     2047
     2048                            set rb_damping "$::rb_damp_origin $::rb_damp_origin $::rb_damp_origin \
     2049                                $::rb_damp_euler $::rb_damp_euler $::rb_damp_euler \
     2050                                $::rb_damp_euler $::rb_damp_euler $::rb_damp_euler"
     2051                            set rb_damping_tls "$::rb_damp_t $::rb_damp_l $::rb_damp_s"
     2052                            puts "tls damping = $rb_damping_tls"
     2053#                            puts "rb damping = $rb_damping"
     2054
     2055
     2056#                            RigidBodySetDamp $phasenum $bodnum $mapnum $rb_damping $rb_damping_tls
     2057                           
     2058                            if {$::rb_var($phasenum,$bodnum,$mapnum,tls) == 0} {
     2059                                  RigidBodySetDamp $phasenum $bodnum $mapnum $rb_damping
     2060                            } else {
     2061                                  RigidBodySetDamp $phasenum $bodnum $mapnum $rb_damping $rb_damping_tls
     2062                            }
     2063
     2064#                           puts "TLS Values to be saved = $rb_tls_vals"
     2065                            set rb_tls_positions "$::rb($phasenum,$bodnum,$mapnum,x) $::rb($phasenum,$bodnum,$mapnum,y) \
     2066                               $::rb($phasenum,$bodnum,$mapnum,z)"
     2067                            set rb_tls_euler "$::rb($phasenum,$bodnum,$mapnum,e1) $::rb($phasenum,$bodnum,$mapnum,e2) \
     2068                               $::rb($phasenum,$bodnum,$mapnum,e3)"
     2069#                           puts "origin positions = $rb_tls_positions"
     2070#                           puts "euler angles = $rb_tls_euler"
     2071
     2072#                           puts "TLS param save for $mapnum $bodnum $mapnum is vvvvvvvv $rb_tls"
     2073                           RigidBodySetTLS $phasenum $bodnum $mapnum $rb_tls_vals
     2074                           EditRigidBodyMapping $phasenum $bodnum $mapnum $rb_tls_positions $rb_tls_euler
     2075#                           RecordMacroEntry "RigidBodySetTLS $phasenum $bodnum $mapnum $rb_tls_vals"
     2076
    19812077                           RigidBodyTLSVary $phasenum $bodnum $mapnum $rb_tls
    19822078                           RecordMacroEntry "RigidBodyTLSVary $phasenum $bodnum $mapnum [list $rb_tls]" 0
     
    20112107              $main.s23ref($phasenum,$bodnum,$mapnum) $main.s31ref($phasenum,$bodnum,$mapnum) $main.s32ref($phasenum,$bodnum,$mapnum) \
    20122108              $main.saaref($phasenum,$bodnum,$mapnum) $main.sbbref($phasenum,$bodnum,$mapnum)
     2109
     2110      lappend tlsentry $main.t11entry($phasenum,$bodnum,$mapnum) $main.t22entry($phasenum,$bodnum,$mapnum) $main.t33entry($phasenum,$bodnum,$mapnum) \
     2111              $main.t12entry($phasenum,$bodnum,$mapnum) $main.t13entry($phasenum,$bodnum,$mapnum) $main.t23entry($phasenum,$bodnum,$mapnum) \
     2112              $main.l11entry($phasenum,$bodnum,$mapnum) $main.l22entry($phasenum,$bodnum,$mapnum) $main.l33entry($phasenum,$bodnum,$mapnum) \
     2113              $main.l12entry($phasenum,$bodnum,$mapnum) $main.l13entry($phasenum,$bodnum,$mapnum) $main.l23entry($phasenum,$bodnum,$mapnum) \
     2114              $main.s12entry($phasenum,$bodnum,$mapnum) $main.s13entry($phasenum,$bodnum,$mapnum) $main.s21entry($phasenum,$bodnum,$mapnum) \
     2115              $main.s23entry($phasenum,$bodnum,$mapnum) $main.s31entry($phasenum,$bodnum,$mapnum) $main.s32entry($phasenum,$bodnum,$mapnum) \
     2116              $main.saaentry($phasenum,$bodnum,$mapnum) $main.sbbentry($phasenum,$bodnum,$mapnum)
     2117
    20132118#      puts $tlsparam
    20142119              if {$::rb_var($phasenum,$bodnum,$mapnum,tls) == 0} {
     
    20172122                                $x config -state disable -relief sunken
    20182123                        }
     2124                        foreach x $tlsentry {
     2125                                $x config -state disable
     2126                        }
    20192127              } else {
    20202128                        RigidBodyEnableTLS $phasenum $bodnum $mapnum 1
    20212129                        foreach x $tlsparam {
    20222130                                $x config -state normal -relief raised
     2131                        }
     2132                        foreach x $tlsentry {
     2133                                $x config -state normal
    20232134                        }
    20242135              }
     
    20752186          }
    20762187     }
    2077      puts "varlist    $varlist"
    2078      puts "mvarlist   $mvarlist"
     2188#     puts "varlist    $varlist"
     2189#     puts "mvarlist   $mvarlist"
    20792190
    20802191     set ::rb_var($phasenum,$bodnum,$mapnum,x) [RB_VarSet [lindex $::rb_map_positionvars($phasenum,$bodnum,$mapnum) 0] $mvarlist $varlist]
     
    20892200
    20902201     lappend ::rb_var_list ::rb_var($phasenum,$bodnum,$mapnum,e1) ::rb_var($phasenum,$bodnum,$mapnum,e2) ::rb_var($phasenum,$bodnum,$mapnum,e3)
     2202
     2203     ### create variables containing origin, euler angles and tls terms 14 Aug 2012
     2204
     2205     set ::rb($phasenum,$bodnum,$mapnum,x) [lindex $::rb_map_origin($phasenum,$bodnum,$mapnum) 0]
     2206     set ::rb($phasenum,$bodnum,$mapnum,y) [lindex $::rb_map_origin($phasenum,$bodnum,$mapnum) 1]
     2207     set ::rb($phasenum,$bodnum,$mapnum,z) [lindex $::rb_map_origin($phasenum,$bodnum,$mapnum) 2]
     2208
     2209     set ::rb($phasenum,$bodnum,$mapnum,e1) [lindex [lindex $::rb_map_euler($phasenum,$bodnum,$mapnum) 0] 0]
     2210     set ::rb($phasenum,$bodnum,$mapnum,e2) [lindex [lindex $::rb_map_euler($phasenum,$bodnum,$mapnum) 1] 0]
     2211     set ::rb($phasenum,$bodnum,$mapnum,e3) [lindex [lindex $::rb_map_euler($phasenum,$bodnum,$mapnum) 2] 0]
     2212
     2213     set ::rb_tls($phasenum,$bodnum,$mapnum,t11) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 0]
     2214     set ::rb_tls($phasenum,$bodnum,$mapnum,t22) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 1]
     2215     set ::rb_tls($phasenum,$bodnum,$mapnum,t33) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 2]
     2216     set ::rb_tls($phasenum,$bodnum,$mapnum,t12) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 3]
     2217     set ::rb_tls($phasenum,$bodnum,$mapnum,t13) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 4]
     2218     set ::rb_tls($phasenum,$bodnum,$mapnum,t23) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 5]
     2219     set ::rb_tls($phasenum,$bodnum,$mapnum,l11) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 6]
     2220     set ::rb_tls($phasenum,$bodnum,$mapnum,l22) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 7]
     2221     set ::rb_tls($phasenum,$bodnum,$mapnum,l33) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 8]
     2222     set ::rb_tls($phasenum,$bodnum,$mapnum,l12) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 9]
     2223     set ::rb_tls($phasenum,$bodnum,$mapnum,l13) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 10]
     2224     set ::rb_tls($phasenum,$bodnum,$mapnum,l23) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 11]
     2225     set ::rb_tls($phasenum,$bodnum,$mapnum,s12) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 12]
     2226     set ::rb_tls($phasenum,$bodnum,$mapnum,s13) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 13]
     2227     set ::rb_tls($phasenum,$bodnum,$mapnum,s21) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 14]
     2228     set ::rb_tls($phasenum,$bodnum,$mapnum,s23) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 15]
     2229     set ::rb_tls($phasenum,$bodnum,$mapnum,s31) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 16]
     2230     set ::rb_tls($phasenum,$bodnum,$mapnum,s32) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 17]
     2231     set ::rb_tls($phasenum,$bodnum,$mapnum,saa) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 18]
     2232     set ::rb_tls($phasenum,$bodnum,$mapnum,sbb) [lindex $::rb_map_tls($phasenum,$bodnum,$mapnum) 19]
     2233
    20912234
    20922235     if {$::rb_map_tls_var($phasenum,$bodnum,$mapnum) != ""} {
Note: See TracChangeset for help on using the changeset viewer.