How to get number dofs on node with TCL script
Find more posts tagged with
Sort by:
1 - 4 of
41
Here's my (testing) code:
hm_markclear loads 1 hm_createmark loads 1 'by config' 'constraint' set ids [hm_getmark loads 1] proc get_dof {id} { set comp1 [hm_getentityvalue loads $id comp1 0] set comp2 [hm_getentityvalue loads $id comp2 0] set comp3 [hm_getentityvalue loads $id comp3 0] set comp4 [hm_getentityvalue loads $id comp4 0] set comp5 [hm_getentityvalue loads $id comp5 0] set comp6 [hm_getentityvalue loads $id comp6 0] set dof '' if {$comp1==0} { append dof '1'; } if {$comp2==0} { append dof '2'; } if {$comp3==0} { append dof '3'; } if {$comp4==0} { append dof '4'; } if {$comp5==0} { append dof '5'; } if {$comp6==0} { append dof '6'; } return $dof; } foreach id $ids { set type [hm_getentityvalue loads $id entitytype 0] set myid [hm_getentityvalue loads $id entityid 0] set dof [get_dof $id] puts 'ID= $id ; type= $type ; NodeID= $myid ; DOF= $dof' }
Have a look also at my screenshot.
What do you mean 'number of dof of node' ?
Do you mean the numbers displayed when you apply constraints ?