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 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 – and a single prism cannot represent it.
  • 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.

Those cases are refused rather than approximated by the nearest prism, which would silently change the geometry.

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_prisms_exact
Exact boolean of two coaxial prisms.
unsupported