🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Distance between two nodes

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hello,

I need to access the distance between two nodes using a tcl file.

How can I do it ?

Thanks

Find more posts tagged with

Sort by:
1 - 5 of 51
    User: "Beta"
    New Altair Community Member
    Updated by Beta

    Hi Benoit,

     

    you can use the command hm_getdistance to do that

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Hello Toan,

    Thanks for your help.

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi

    It is hm command

    Replace ( and ) and , by space to get tcl commands

     

    If you are searching for closest node on surf, use hm_measureshortestdistance, do not use loops which will slow down program

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

     

    Hi Benoit,

     

    you can use the command hm_getdistance to do that

    Hello

    When I use the command hm_getdistance HyperMesh returns 4 values and I need to put the fist one in a variable distance.

    (Documents) 4 % hm_getdistance nodes 3723 5317 0 0
    68.91864249631689 41.6426000000006 54.90046920132 -1.2694999999999936

    How can I isolate the first value in a variable?

    thanks

    User: "Beta"
    New Altair Community Member
    Updated by Beta

    Hi Benoit,

    For what you want, you need to use TCL command: lindex.

    this command is used to return the element from a list.

    Try the following code.

    Cheers

     set distance_list [hm_getdistance nodes 3723 5317 0]. set distance [lindex $distance_list 0]