Ask: Move temp node along line
Altair Forum User
Altair Employee
Answers
-
Figured out a method that is a little more complicated on the user end, but works fine.
Use the 'Length' command to get length of line
Calculate percentage of that line = to 10mm of length
Create nodes using 'Extract Parametric'
Change upper and lower bound to represent the calculated percentages for the 10mm displacement
0 -
Try my following code:
*createmarkpanel lines 1 'Select Lines' set lines [hm_getmark lines 1] *clearmark lines 1; set dist 10.0; foreach id $lines { set length [hm_linelength $id] if {$dist < [expr $length/2]} { set ratio1 [expr $dist/$length] set ratio2 [expr { 1.0 - $dist/$length } ] eval *createdoublearray 2 $ratio1 $ratio2 eval *nodecreateatlineparams $id 1 2 0 0 0 puts [format 'Line %d : Nodes at %0.6f %0.6f' $id $ratio1 $ratio2] } } *clearmark lines 1;
HTH,
0