measure distance
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
-
Hi Toan,
Did you try with hm_getdistance
The format is hm_getdistance entity_type id1 id2 syst_id
0 -
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
0 -
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.
0 -
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
0 -
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.
0 -
Did you try with nodes->elems?
0 -
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.
0 -
Hi
You can first search nodes-nodes
Then use hwat::utils::GetClosestElement
Then measure distance to that element
0