Verifies that a point is on a mesh.
rhinoscriptsyntax.IsPointOnMesh (object_id, point)
rhinoscript.mesh.IsPointOnMesh (object_id, point)
object_id |
Required. String or Guid. The object's identifier. |
point |
Required. List of 3 numbers or Point3d. The test, or sampling, point. |
Boolean |
True if successful, otherwise False. |
None |
On error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select a mesh")
if rs.IsMesh(obj):
point = rs.GetPointOnMesh(strObject, "Pick a test point")
if point:
if rs.IsPointOnMesh(obj, point):
print "The point is on the mesh"
else:
print "The point is not on the mesh"