🎉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

nearest nodes to selected node.

User: "raj_20928"
Altair Community Member
Updated by raj_20928

Hi ,gd evening,

How to get nearest nodes to user selected node.any command available.

Thank you in advace

Find more posts tagged with

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

    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.  

    User: "raj_20928"
    Altair Community Member
    OP
    Updated by raj_20928

    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

    User: "Pandurang"
    Altair Community Member
    Updated by Pandurang

    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

    User: "raj_20928"
    Altair Community Member
    OP
    Updated by raj_20928

    Hi thank you pandurang