hexagon logo

Find the closest node to a point

Hi everyone,
 
I am looking for a solution for finding the node of a mesh that is the closest node to a specific point.
Currently, my solution is to export the mesh and writing a specific small code in matlab for doing it but it is not very efficient.
 
Thank you in advance.
 
Best regards
Parents
  • There is an undocumented function in the utilities, give it try:
    Regards,
    Karl
    e.g::
     
    STRING node_list2[VIRTUAL]
     
    bv_get_closest_nodes_4.get( [0.5 0.6 0.7], 0.05,123, node_list2 )
     
    This should result in that the 123 closest nodes to location x=0.5, y=0.6, z=0.7
     
    So to find the closest node you may want to call:
     
    bv_get_closest_nodes_4.get( [0.5 0.6 0.7], 1.E8,1, node_list2 )
     
    Note that 1.E8 isn't used in this case. The tolerance is only used when max_find=0
Reply
  • There is an undocumented function in the utilities, give it try:
    Regards,
    Karl
    e.g::
     
    STRING node_list2[VIRTUAL]
     
    bv_get_closest_nodes_4.get( [0.5 0.6 0.7], 0.05,123, node_list2 )
     
    This should result in that the 123 closest nodes to location x=0.5, y=0.6, z=0.7
     
    So to find the closest node you may want to call:
     
    bv_get_closest_nodes_4.get( [0.5 0.6 0.7], 1.E8,1, node_list2 )
     
    Note that 1.E8 isn't used in this case. The tolerance is only used when max_find=0
Children
No Data