Click or drag to resize

BrepCreateBooleanUnionWithIndexMap Method

Compute the Boolean Union of a set of Breps, reporting which inputs produced each result.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public static Brep[] CreateBooleanUnionWithIndexMap(
	IEnumerable<Brep> breps,
	double tolerance,
	bool manifoldOnly,
	out int[][] indexMap
)

Parameters

breps
Type: System.Collections.GenericIEnumerableBrep
Breps to union. May not contain nulls.
tolerance
Type: SystemDouble
Tolerance to use for union operation.
manifoldOnly
Type: SystemBoolean
If true, non-manifold input breps are ignored.
indexMap
Type: SystemInt32
indexMap[i] holds the positions in breps of the inputs that produced result i. Null when this method returns null.

Return Value

Type: Brep
An array of Brep results or null on failure. May be empty when the union produced no geometry.
Remarks
A union result can come from several inputs, so this reports a list per result where CreateBooleanDifferenceWithIndexMap(IEnumerableBrep, IEnumerableBrep, Double, Boolean, Int32) reports one index. The indices name the group of inputs a result was built from, which is not always the same as the inputs its geometry reached: a result made of disconnected pieces is separated into one result per piece, and each piece names the whole group. An input absorbed by another contributes no geometry and appears in no entry of indexMap. An input the operation could not use is absent in the same way: one that is non-manifold when manifoldOnly is true, or one the Boolean kernel cannot accept. An input whose shells are disjoint produces one result per shell, and each of those names it. A null element in breps throws ArgumentException, because the reported indices are positions in that sequence. The other CreateBooleanUnion overloads drop nulls silently and renumber what follows.
See Also