Salome HOME
PAL0023627: [IMACS] ASERIS: project point to the mesh
[modules/smesh.git] / src / SMESH_SWIG / smeshBuilder.py
index 1a39b452b4e7378b542b51589fcad7ae194f24f0..fed6214bbc2a85023a408b43aef7a9b23c1bc373 100755 (executable)
@@ -4228,6 +4228,17 @@ class Mesh(metaclass = MeshMeta):
         else:
             return self.editor.FindElementsByPoint(x, y, z, elementType)
 
+    def ProjectPoint(self, x,y,z, meshObject, elementType):
+        """
+        Project a point to a mesh object.
+        Return ID of an element of given type where the given point is projected
+        and coordinates of the projection point.
+        In the case if nothing found, return -1 and []
+        """
+        if ( isinstance( meshObject, Mesh )):
+            meshObject = meshObject.GetMesh()
+        return self.editor.ProjectPoint( x,y,z, meshObject, elementType )
+
     def GetPointState(self, x, y, z):
         """
         Return point state in a closed 2D mesh in terms of TopAbs_State enumeration: