booleanRegions2D
static booleanRegions2D(a: readonly OffsetRegion[], b: readonly OffsetRegion[], operation: 'union' | 'intersection' | 'subtraction'): OffsetRegion[]
Booleans of point regions. Results come back at the input height, wound the same way, each ring starting at its smallest x.
booleanCurvedRegions2D
static booleanCurvedRegions2D(a: readonly CurvedRegion2D[], b: readonly CurvedRegion2D[], operation): CurvedRegion2D[]
The same, for regions of line and arc edges.
insetCurvedRegion2D
static insetCurvedRegion2D(region: CurvedRegion2D, distance: number): CurvedRegion2D[]
Insets one region by a distance above zero; holes grow by the same distance. Each arc keeps its centre, and a reflex corner rounds to an arc of the distance. An inset past the half width is an empty list.
Types
OffsetRegion
{ outer: { x, y, z }[]; holes: { x, y, z }[][] }. All points are at one height.
CurvedRegion2D
{ outer: CurvedRegionEdge[]; holes: CurvedRegionEdge[][] }.
CurvedRegionEdge
Rules
- Outer rings run clockwise in XZ, and holes counter-clockwise.
- The tolerance is
OG_REGION_TOLERANCE,1e-6m. - A plain ring is not a region and throws
InvalidParameter. - More than 100 000 points or edges across both operands throws
LimitExceeded.

