Skip to content

Intermact API Reference / @intermact/core / booleanOp

Function: booleanOp()

booleanOp(a, b, op, style?): IMObject2D

Defined in: packages/core/src/pcg/operators.ts:233

Boolean combination of two filled polygons (design.md §6.6). Uses the single contour of each object's geometry as the operand ring; best suited to simple, transversally overlapping polygons (see geometry/boolean.ts).

Parameters

a

IMObject2D

b

IMObject2D

op

BooleanOp

style?

ObjectStyle

Returns

IMObject2D

Throws

IntermactError invalid-argument if either operand exposes more than one contour. The underlying single-ring algorithm would silently drop the extra rings and return a geometrically wrong result, so multi-contour inputs are rejected rather than mis-combined.

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)