regionBooleanXY MethodStatic
Return areas defined by a boolean operation.
regionBooleanXY(loopsA: AnyRegion | AnyRegion[], loopsB: AnyRegion | AnyRegion[], operation: RegionBinaryOpType, mergeToleranceOrOptions: number | RegionBooleanXYOptions = Geometry.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 split (a region with) overlapping loops into a UnionRegion with
adjacent Loops: regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union).
@note The Union operation does not currently attempt to return a region with minimal loops. This may change with future development.
@returns a region resulting from merging input loops and the boolean operation.
| 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 | 
| mergeToleranceOrOptions | number | RegionBooleanXYOptions | absolute distance tolerance for merging loops, or multiple options settings. Default value is smallMetricDistance. | 
Returns - undefined | AnyRegion
a region resulting from merging input loops and the boolean operation.
Defined in
- curve/RegionOps.ts Line 442
Last Updated: 24 October, 2025