Algorithms
April 20, 2026
topologyexact-arithmeticparallelbooleansarrangements

Exact Mesh Arrangements and Booleans in Real-Time

Arrangements, booleans, and self-intersection resolution at interactive speeds on million-polygon meshes via exact arithmetic and canonical topology. 6× faster than MeshLib, 84× faster than CGAL.

Žiga Sajovic, Polydera

Mesh arrangements decompose overlapping geometry into classified regions — splitting faces along intersection curves so every face belongs to exactly one region. Mesh booleans select which regions to keep: union, intersection, difference.

7msIntersection curves2×1M polygons · 233× CGAL
28msBoolean union2×1M polygons · 6× MeshLib · 84× CGAL
173msPolygon arrangements2×1M polygons · 32× libigl

Real meshes are not ideal manifolds. They carry non-manifold flaps, inconsistent winding, coplanar faces, and accumulated pipeline artifacts. trueform handles all of them.

FeatureHandlingConvex polygonsNative — not limited to trianglesNon-manifold edgesHandled directlyInconsistent windingBayesian classifiers per manifold edge-connected componentSelf-intersecting inputResolved via polygon arrangementsCoplanar primitivesResolved via topological exactness — aligned/opposing boundary classificationHole cutsHole patching into the faceContour crossingsResolved via indirect predicates

Exactness

Two kinds of exactness matter in mesh arrangements: geometric and topological.

Geometric exactness

Input coordinates are scaled to exact integer space. All predicates — orientation tests, intersection points, determinants — are computed with exact integer arithmetic through a precision chain. No floating-point operation participates in any geometric decision.

CoordinatesIntermediatePredicatesint32 base (default)int32int64int128int64 base (extended)int64int128int256 (custom)

orient3d_sign returns −1, 0, or +1 — exactly. Zero means coplanar, not "close to coplanar."

Topological exactness

An intersection point can land on a vertex, on an edge, or at the meeting point of two coplanar edges. Five distinct configurations:

TypeConfigurationResolutionEFEdge pierces faceSigned volume ratiosEECoplanar edge crossing2D orient2d on projected planeVEVertex on edgeorient2d + between testVFVertex in face interior2D winding testVVCoincident verticesExact coordinate match

Geometric exactness without topological exactness is typically paired with Simulation of Simplicity (SoS). SoS perturbs input so all configurations collapse to EF — deterministic but arbitrary. A square placed into a cube with edges on faces might produce no intersections, partial, or all, depending on perturbation order. These configurations are not edge cases to avoid — they define contour crossings in multi-mesh arrangements.

trueform classifies all five exactly — orient3d_sign separates coplanar from non-coplanar, orient2d_sign resolves the coplanar cases. Each configuration is resolved to its canonical form.

Arrangements

Arrangements resolve multiple mutually intersecting meshes simultaneously.

Indirect predicates

An intersection edge is defined by its originating face pair. An intersection point between two edges is defined by the union of their face pair IDs — a unique triplet of three faces. This identifies points topologically, avoiding geometric ambiguity. Coordinates are computed from the triplet via orient2d-based interpolation in integer arithmetic, only when needed.

ABCD

3D configuration

(A,B)(A,C)(A,D)3 edges · 6 vertices

Edges on face

{A,B,D}{A,C,D}7 segments · 2 crossings

Intersection graph

Indirect predicates allow the arrangement to be formulated in two stages: compute pairwise intersection contours between all mesh pairs, then intersect those contours within each face.

Stage 1: pairwise intersection contours

An AABB tree narrows candidates to overlapping face pairs. For each pair, intersections are computed exactly. Each intersection produces an edge on both faces, tagged with its originating face pair.

Stage 2: per-face contour intersections

Each intersected face carries a small number of edges from different mesh pairs — typically 2–5. These are projected to the face plane and intersected with topological exactness: VV, VE, and EE configurations classified via orient2d. The result is an intersection graph embedded in the face, defining how it will be split.

Each face has few edges — trivial to process. Each face is independent — all processed in parallel. Points are identified across faces via their triplets.

Booleans

A boolean is an arrangement with a classification step. After splitting faces along intersection curves, each resulting face must be labeled as inside or outside the other mesh. The boolean operation selects which labels to keep.

Components

Faces are grouped into manifold edge-connected components. Two faces belong to the same component if they share a manifold edge that is not an intersection edge. Non-manifold edges and intersection edges act as barriers — they prohibit crossing between components. Each component receives a single label.

Wedge classification

For each intersection edge in a component, the two same-mesh faces sharing that edge form a wedge. A test point from the opposite-mesh neighbor is classified against this wedge using exact orient3d:

ResultMeaningVoteon_negative_sideTest point inside wedgeinsideon_positive_sideTest point outside wedgeoutsideon_boundaryCoplanar — skip

Coplanar face pairs are classified directly as aligned or opposing boundary based on normal direction.

Bayesian classification

Each intersection edge contributes an observation to its component — inside or outside. The per-component label is determined by a Beta-Bernoulli classifier over these observations: inside, outside, aligned boundary, or opposing boundary. Components with no intersection edges fall back to signed distance or ray-based containment tests.

Operation mapping

OperationKeep from AKeep from BUnionoutside + aligned boundaryoutsideIntersectioninside + aligned boundaryinsideDifferenceoutside + opposing boundaryinside

Comparison with existing SDKs

Four libraries are commonly used for mesh booleans: CGAL, libigl, MeshLib, and trueform. This is how they compare.

Capabilities

FeaturetrueformMeshLibCGALlibiglConvex polygonsTrianglesTrianglesNon-manifold edgesAuto-deletesRequires manifoldRequires manifoldInconsistent windingBayesianSelf-intersecting inputLimitedCoplanar primitivesExactSoSKernel-dep.EPECKHole cutsN-mesh arrangementsCurve extractionStandaloneIndirectIndirect

Performance

Stanford Dragon at varying resolutions. Linear scaling is maintained through 2M+ polygons.

Apple M4 Max 16 threads Clang -O3 mimalloc

Boolean union

trueform uses exact predicates and canonical topology. MeshLib uses SoS with int32. CGAL uses EPIC kernel. libigl uses EPECK (GMP).

PolygonstrueformMeshLibCGALlibigl2 × 58K6.4 ms14.9 ms133 ms588 ms2 × 142K9.0 ms25.1 ms329 ms1225 ms2 × 244K12.4 ms54.4 ms573 ms1973 ms2 × 481K16.8 ms124.7 ms1082 ms3666 ms2 × 723K22.7 ms112.1 ms1746 ms5703 ms2 × 1.03M27.8 ms161.5 ms2339 ms7735 ms

Polygon arrangements

Two copies concatenated into a single self-intersecting mesh. MeshLib not benchmarked — refuses nested contour crossings.

Polygonstrueformlibigl117K12.7 ms642 ms284K27.0 ms1205 ms488K42.4 ms1785 ms962K78.1 ms2907 ms1.45M128.4 ms4382 ms2.05M173.2 ms5509 ms

Intersection curves

Standalone extraction of crossing polylines. Most SDKs only provide curves as a side-effect of a full boolean operation.

PolygonstrueformCGAL2 × 58K2.3 ms86.9 ms2 × 142K3.4 ms230.7 ms2 × 244K4.1 ms416.7 ms2 × 481K5.4 ms777.1 ms2 × 723K7.0 ms1266.8 ms2 × 1.03M7.3 ms1695.6 ms

Interactive charts, full methodology, and source code: trueform benchmarks.

Try it live · Documentation · GitHub · Open Lunar

Cite as
@article{polydera:exact-mesh-arrangements-and-booleans-in-real-time,
  title={Exact Mesh Arrangements and Booleans in Real-Time},
  author={Sajovic, {\v{Z}}iga, Polydera},
  year={2026},
  url={https://polydera.com/algorithms/exact-mesh-arrangements-and-booleans-in-real-time},
  organization={Polydera}
}