regionBooleanXY MethodStatic
Return areas defined by a boolean operation.
regionBooleanXY(loopsA: AnyRegion | AnyRegion[], loopsB: AnyRegion | AnyRegion[], operation: RegionBinaryOpType, mergeTolerance: numberGeometry.smallMetricDistance): undefined | AnyRegion
@note For best results, input regions should have correctly oriented loops. See sortOuterAndHoleLoopsXY.
@note A common use case of this method is to convert a region with overlapping children into one with
non-overlapping children: regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)
.
@returns a region resulting from merging input loops and the boolean operation. May contain bridge edges added to connect interior loops to exterior loops.
Parameter | Type | Description |
---|---|---|
loopsA | AnyRegion | AnyRegion[] | first set of loops (treated as a union) |
loopsB | AnyRegion | AnyRegion[] | second set of loops (treated as a union) |
operation | RegionBinaryOpType | indicates Union, Intersection, Parity, AMinusB, or BMinusA |
mergeTolerance | number | absolute distance tolerance for merging loops |
Returns - undefined | AnyRegion
a region resulting from merging input loops and the boolean operation. May contain bridge edges added to connect interior loops to exterior loops.
Defined in
- curve/RegionOps.ts Line 391
Last Updated: 07 June, 2025