Measure distance between node and mesh group in python

Hello,
is it possible to get the distance between a node and an object (mesh group) in python?
in the interface, I can do this but from the documentation (Measurements — Mesh 9.12.0 documentation )
I can not see an example of this and furthermore there are several that are mentioned as ‘(not available yet)’. is this possible or not?
regards

Hello Franco,

please find in this script
test_mesh_mindistance2.py (1,5 Ko)
an example on how to call MinDistance in python on a mesh.

In Mesh_nodes, I created two nodes on which I want to get the min distance to Mesh_1.

Note that the object (mesh or group) has to be passed as the 2nd argument:

smesh.MinDistance(Mesh_nodes, Mesh_1, id1=node_1)

This does not work yet:

smesh.MinDistance(Mesh_1, Mesh_nodes, id2=node_1)

Christophe

1 Like

thanks Christophe for the reply!

1 Like