Click or drag to resize

IntersectionMeshMeshPredicate Method (IEnumerableMesh, IEnumerableMesh, Double, Boolean, Int32, Int32, TextLog, CancellationToken)

Determines which meshes intersect, and reports one intersecting face couple for each pair found. No geometry is computed: each pair of meshes is tested only until its first hit.

Namespace:  Rhino.Geometry.Intersect
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public static bool MeshMeshPredicate(
	IEnumerable<Mesh> meshesA,
	IEnumerable<Mesh> meshesB,
	double tolerance,
	bool fast,
	out int[] pairs,
	out int[] facePairs,
	TextLog textLog,
	CancellationToken cancel
)

Parameters

meshesA
Type: System.Collections.GenericIEnumerableMesh
The first mesh list. This cannot be null. Null entries are skipped and do not count in the indices.
meshesB
Type: System.Collections.GenericIEnumerableMesh
A second mesh list, or null. When null, every pair within meshesA is tested once; otherwise every mesh of meshesA is tested against every mesh of meshesB.
tolerance
Type: SystemDouble
A tolerance value. If negative, the positive value will be used. WARNING! Good tolerance values are in the magnitude of 10^-7, or RhinoMath.SqrtEpsilon*10.
fast
Type: SystemBoolean
True uses the fast intersector behind MeshMeshFast(Mesh, Mesh): faces that cross or touch within tolerance count, coplanar overlap without a crossing does not. False uses the accurate intersector, which also reports coplanar overlap and costs about as much as MeshMeshFast(Mesh, Mesh).
pairs
Type: SystemInt32
Flattened index couples [i0, j0, i1, j1, ...] of the meshes that intersect: i indexes meshesA and j indexes meshesB, or both index meshesA with i less than j. Empty when nothing intersects.
facePairs
Type: SystemInt32
Flattened face index couples parallel to pairs: for each couple in pairs, a face of the first mesh and a face of the second that intersect, the first ones found.
textLog
Type: Rhino.FileIOTextLog
A text log, or null.
cancel
Type: System.ThreadingCancellationToken
A cancellation token to stop the computation at a given point.

Return Value

Type: Boolean
True if any pair intersects, otherwise false. False is also returned on error or cancellation.
See Also