Ask: Move temp node along line

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Is there a way to move a temp node along the line it was created from?

 

What I am looking to do is create a node at each end of a curved line, then bring those nodes in 10mm along that curved line. 

 

Thank you,

-Clay

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2016

    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

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited August 2016

    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,