Skip to main content

Module boolean_exact

Module boolean_exact 

Source
Expand description

Exact boolean over axis-aligned prisms (#66).

§Why this family, and why it is genuinely exact

Exact boolean support previously reached only half-space-bounded difference and intersection. Widening it to arbitrary solids needs a general polyhedral boolean, which is a large algorithm in its own right.

But there is a family where the general problem collapses to one the kernel already solves EXACTLY: two prisms sharing an extrusion axis. Their boolean is the 2D boolean of their cross-sections crossed with the boolean of their height intervals. axiolid-overlay computes the planar part exactly, so the result is exact – not a tessellated approximation.

That family is not a toy. A wall with a rectangular opening is exactly this shape, and it is the dominant pattern in building models.

§When the answer is NOT a prism

The reduction to one prism only holds when the result is itself a prism:

  • Intersection: always. The heights intersect to one interval.
  • Union: only when both operands span the same height. Otherwise the result is stepped – two different cross-sections at two heights.
  • Difference: only when the tool spans at least the subject’s full height. A tool ending mid-way leaves a stepped solid for the same reason.

Stepped results are built as column solids instead (column, #120): the plan is cut into cells by an exact arrangement of every operand ring, and each cell carries the heights its operands give it. The result is still exact, with ledge faces where the section changes; it is never approximated by the nearest prism. A result enclosing a cavity carries it as a void shell; one with several pieces as well as a cavity is refused by name.

Structs§

ArcPrism
A prism whose cross-section may contain arc edges (ADR 0050).
Prism
A prism: a closed planar cross-section swept along +z.

Functions§

boolean_arc_prisms_exact
Exact boolean of two coaxial prisms whose sections may contain arcs.
boolean_arc_prisms_exact_solids
Exact boolean of two coaxial arc prisms, one exact B-rep per piece.
boolean_prisms_exact
Exact boolean of two coaxial prisms.
boolean_prisms_exact_solids
Exact boolean of two coaxial prisms, one exact B-rep per separate piece.
clip_arc_prism_exact
Cut an arc prism with a half-space: the prism’s material on the kept side of a plane (#120).
unsupported