MeshMeshIntersection

Calculates the intersection of a mesh object with another mesh object.

Syntax

rhinoscriptsyntax.MeshMeshIntersection (mesh1, mesh2, tolerance=None)

rhinoscript.mesh.MeshMeshIntersection (mesh1, mesh2, tolerance=None)

Parameters

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.

Returns

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.

Example

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)

Also See

CurveMeshIntersection

MeshClosestPoint