Changeset 1137 for branches/sandbox


Ignore:
Timestamp:
Apr 21, 2011 11:05:09 AM (10 years ago)
Author:
toby
Message:

change rb.tcl as per CHL request

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/sandbox/rb.tcl

    r1136 r1137  
    66# rigid body EXP editing routines (to move into readexp.tcl)
    77# RigidBodyList -- returns a list of the defined rigid body types
     8# SetRigidBodyVar -- set variables and damping for rigid body type multipliers
    89# ReadRigidBody  -- # of times a body is mapped, scaling factors, var #s & coordinates
    910# RigidBodyMappingList - return a list instances where a RB is mapped in phase
     
    103104#   varnumlist is a list of variable numbers
    104105#      note that if this list is shorter than the number of actual multipliers
    105 #      for the body, the unspecified variable will be set to 0 (not refined)
     106#      for the body, the unspecified variable will not be changed
    106107#   damplist   is a list of damping values (0-9)
    107108#      note that if the damplist is shorter than the number of actual multipliers
    108109#      the unspecified values are not changed
    109 
    110110#  SetRigidBodVar 2 {1 2 3} {}
    111111#       will vary the (first 3) translations in body #3 and will not change the
    112112#       damping values
    113113#  SetRigidBodVar 3 {} {0 0 0}
    114 #       will turn off all variables and will change the (first 3) damping values
     114#       will not change variable settings but will change the (first 3) damping values
     115#  SetRigidBodVar 4 {11 11} {8 8}
     116#      changes both variable numbers and damping at the same time
    115117# Nothing is returned
    116118proc SetRigidBodyVar {rbnum varnumlist damplist} {
     
    126128        incr j -1
    127129        set var [lindex $varnumlist $j]
    128         if {$var == ""} {set var 0}
    129         validint var 5
    130         setexp "${key}${i}PARM" $var 11 15
     130        if {$var != ""} {
     131            validint var 5
     132            setexp "${key}${i}PARM" $var 11 15
     133        }
    131134        set damp [lindex $damplist $j]
    132135        if {$damp != ""} {
Note: See TracChangeset for help on using the changeset viewer.