measure distance

Beta
Beta New Altair Community Member
edited October 2020 in Community Q&A

Hi,

 

Is there any command or method to measure distance between nodes and comps.

I tried command: hm_measureshortestdistance but it said that, enity type comp is not supported.

 

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi Toan,

    Did you try with hm_getdistance 

    The format is hm_getdistance entity_type id1 id2 syst_id

  • tinh
    tinh Altair Community Member
    edited September 2017

    You cannot measure distance to a comp, because comp is a combination of nodes, elems, surfs, lines, points... you have to indicate which primary entity is, example

    hm_measureshortestdistance nodes .... surfs ....

    in that, surfs are pre-selected by *createmark surfs 1 'by comp' $the_comp_you_want_to_measure

  • Beta
    Beta New Altair Community Member
    edited September 2017

    hi,

     

    @George P Johnson that command is used only for node-node or point-point. But thanks anyway\

    @tinh well, my model contains only temp node and comp with element, there is no such thing like surface or line. That why I have to come here, looking for a solution.

     

  • tinh
    tinh Altair Community Member
    edited September 2017

    ok simply replace surfs by 'nodes'

    hm_measureshortestdistance nodes 1 .... nodes 2 ....

    with node 2 is marked by *createmark nodes 1 'by comp id' $your_comp_id

  • Beta
    Beta New Altair Community Member
    edited September 2017

    I thought about that too,

     

    But it's not the distance between node and comp, it is the distance between node and nearest comp node.

    It will be wrong if the line between two nodes is not Perpendicular to comp.

     

     

  • tinh
    tinh Altair Community Member
    edited September 2017

    Did you try with nodes->elems?

  • Beta
    Beta New Altair Community Member
    edited September 2017

    I tried, but no use,

    The valid entities are nodes, lines, surfaces, solids and points.

    May be there is no direct way to do that.

     

     

  • tinh
    tinh Altair Community Member
    edited September 2017

    Hi

    You can first search nodes-nodes

    Then use hwat::utils::GetClosestElement

    Then measure distance to that element