Jump to content
raj

nearest nodes to selected node.

Recommended Posts

Hi Raj,

 

You can use the below APIs:

hm_getclosestnode x y z ?elem_mark? ?node_mark?

::hwat::core::GetClosestNodeByDistance x y z n_nodeList n_exemptNodes

::hwat::utils::GetClosestNode x y z [d_tolerance] [assemname] [n_exemptNodes]

 

To get x y z of the user selected nodeID use: 

hm_nodevalue $nodeID 

 

For more info refer help or search the commands in Altair Connect.  

Share this post


Link to post
Share on other sites

Hi livil,

Thank you for quick response.

My requirement is I want to get 10 first order nodes only for example (number will varies)near to the selected node.

I am getting one node by busing this .

Can I get some idea on it.

Thank you

Share this post


Link to post
Share on other sites

set node_list

  • ;

# we are getting closest node at (0 0 0)
for {set i 0} {$i < 10} {incr i} \
{

    *createmark elements 1 all;
    eval *createmark nodes 1 $node_list;
    set id [hm_getclosestnode 0 0 0 1 1]
    *clearmark node 1
    *clearmark elems 1
    lappend node_list $id

}

puts $node_list

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...