Nearest nodes

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

how to find nearest node in hypermesh. A command or any macro that should search a tolerance of distance like within radius of 30  and then find nodes within that perimeter . lets say, should find nodes adjacent to it.

Tagged:

Answers

  • tinh
    tinh Altair Community Member
    edited May 2017

    Hi

    You can select nodes within a sphere

    *createmark nodes 1 'by sphere' 

    -> i dont remember args so please look up reference help. ;)/emoticons/default_wink.png' srcset='/emoticons/wink@2x.png 2x' title=';)' width='20' />

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2017

    Hi Sonu,

    The API is  *createmark nodes 1 'by sphere' x y z r inside 1 1 .1

     

    <?xml version="1.0" encoding="UTF-8"?>by node.PNG

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2017

    hi johnson and tinh

    thank you for the answer. was really grateful.

    However, I need a little more favour pls.

    As you suggested i was able to create a sphere with a central node. however, i want to add those nodes in the form of temporary nodes because as soon as i turn of elements, the nodes dissapear too.

    once i have added the nodes, i want to automate it for n number of nodes. how can i run the process in a loop through a tcl.

     

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2017

    Hi Sonu,

    Once the nodes are displayed using *createmark nodes 1 'by sphere' x y z r inside 1 1 .1 option, you can go to Shift + F2 option and directly add those nodes, so that those nodes will be displayed.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited May 2017

    hi johnson, but the problem is, as soon as i turn off the elements, the nodes dissaper too with elements.

  • tinh
    tinh Altair Community Member
    edited May 2017

    Hi

    I am not sure what you want to do with the nodes

    to mark them as temporary

    *createmark nodes 1 'by sphere' x y z r inside 1 1 .1

    set NodeList [hm_getmark nodes 1]

    *nodemarkaddtempmark 1

    foreach NodeId $NodeList {

         # do you job with each node here

    }

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    Is there any code to select the nodes where two components are intersecting? I tried using hm_getnodessharedbyothercomps but the nodes are not selecting.

     

    Thank you in advance for any reply

  • tinh
    tinh Altair Community Member
    edited July 2018

    Maybe you have to use command *penetrationcheck