Calculates the intersection of a mesh object with another mesh object.
rhinoscriptsyntax.MeshMeshIntersection (mesh1, mesh2, tolerance=None)
rhinoscript.mesh.MeshMeshIntersection (mesh1, mesh2, tolerance=None)
mesh1 |
Required. String or Guid. The identifier of the first mesh object. |
mesh2 |
Required. String or Guid. The identifier of the second mesh object. |
tolerance |
Optional. Number. The intersection tolerance. Of omitted, Rhino's internal zero tolerance is used. |
List |
A list of 3-D point arrays that identify the vertices of the intersection curves (polylines) if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
mesh1 = rs.GetObject("Select first mesh to intersect", rs.filter.mesh)
mesh2 = rs.GetObject("Select second mesh to intersect", rs.filter.mesh)
results = rs.MeshMeshIntersection(mesh1, mesh2)
if results:
for points in results: rs.AddPolyline(points)