🎉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

Find closest node and paste it to a fixed node in tcl

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

Hi everybody,

 

I have a question regarding how to find the closest node to a specific temp node and than paste to this specific node by usage of a tcl script?

Which command do I need to use?

 

thanks in advance

<?xml version="1.0" encoding="UTF-8"?>HM-Q1.PNG

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Hi,

    you can use hm_getclosestnode

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

    Hi tinh,

     

    thanks for your Support.

    I tried to use the command hm_getclosestnode:

     

    Temp Node Id = 97 (x=0; y=10; z=12.913)

     

    I tried to find the closest node like this:

    hm_getclosestnode 0 10 12.913 0 0

     

    Is this correct? If yes, what am I doing wrong, because HM said the closest node is the node with ID 97...

    But this is my temp node...

    In my opinion HM should have Show node ID 34 as closest node (see Picture attached)...

     

     

    <?xml version="1.0" encoding="UTF-8"?>HM-Q2.PNG

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Of course, hm is correct because your temp node (97) is closer to (0,10,12.9) than 34

    to find out the node #34 you have to ignore #97:

    *createmark nodes 1 97

    set node34 [hm_getclosestnode 0 10 12.9 0 1]

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

    Hi tinh,

     

    yes that's true!

    Actually I tried without the temp node, because I dont need the temp node at all. All I need are the coordinates and those I have.

     

    Thank you very much for your support - greetings from Germany!