Skip to content

trueform: Fast And Robust Mesh CSG Via Topological Aggregation

Source: arXiv:2607.15905 · Published 2026-07-17 · By Žiga Sajovic, Dejan Knez

TL;DR

This paper addresses the long-standing challenge of performing Constructive Solid Geometry (CSG) operations on polygonal meshes with exactness and robustness despite inevitable floating-point materialisation errors downstream. While classical exact predicate approaches ensure geometric correctness internally, the output coordinates must still be rounded to a floating-point grid, causing observable topological ambiguities and inconsistencies in later pipeline stages. The authors propose trueform, a new mesh CSG pipeline that keeps the topology exact by operating primarily at the topological level: exact integer predicates classify primitives without perturbation; intersections are identified by unique topological identities, avoiding reliance on imprecise floating-point coordinates; and disagreements caused by materialisation are resolved via weighted-majority voting over defined topological units (e.g., components or edges). This approach enables a one-time arrangement build over the mesh set that supports arbitrary N-ary Boolean expressions at interactive speeds, including in the browser via WebAssembly bindings. Compared to prior methods, trueform produces watertight, valid meshes faster (often 10-100x speedups) while tolerating non-manifold inputs and open surfaces. The key novelty is the separation of exact topology from approximate geometry, robustly recovered by topological aggregation.

Key findings

  • Five canonical intersection types (vertex-vertex, vertex-edge, vertex-face, edge-edge, edge-face) are classified exactly using integer-exact predicates without symbolic perturbation or fallback kernels.
  • The arrangement is computed locally per face in a 2D plane, using unique two-level topological identities, and does not require explicit global graphs or escalated precision.
  • A weighted-majority vote over geometric observations within topological units resolves ambiguities caused by floating-point rounding of intersection coordinates (e.g., face orientation, nesting, radial order).
  • Open surfaces declared as oriented sheets are incorporated directly into the volumetric partition via per-domain inclusion bitvectors.
  • A single arrangement build amortizes arbitrarily many Boolean operations (N-ary), evaluated as per-domain bit tests on inclusion vectors rather than repeated mesh operations.
  • Trueform is implemented as a header-only C++ library with Python and WebAssembly TypeScript bindings, running interactively even on large models (e.g., 22 million triangles arranged in 0.5s).
  • The integer kernel uses fixed-width bit ladders (32→64→128 or 64→128→256 bits) for exact predicate evaluation without dynamic allocation or fallback to multiprecision.
  • Compared to state-of-the-art exact CSG kernels like EMBER and Lévy’s pipeline, trueform achieves up to two orders of magnitude speed increases while guaranteeing watertight, combinatorially consistent output.

Threat model

The adversary is implicit: floating-point rounding noise and coordinate quantisation errors introduced at the materialisation boundary between CSG pipeline stages. These perturbations cause disagreements in geometric predicates and topological inconsistencies when reconstructing mesh topology from floating-point coordinates. The method assumes the adversary cannot tamper with input mesh topology or break integer predicate correctness; the approach does not defend against active manipulation or adversarially crafted degenerate geometry but targets robustness against inevitable materialisation noise.

Methodology — deep read

The authors first define a rigorous threat model focused on the numerical and topological correctness challenges inherent in mesh CSG pipelines: the adversary is the floating-point rounding noise introduced at materialisation between pipeline stages, which can cause inconsistent geometric predicates and topological ambiguities. The assumption is that input meshes may be non-manifold, degenerate, or have near-coplanar faces; topology must be preserved exactly despite these.

The data consists of multiple tagged input meshes containing convex polygonal faces preprocessed by snapping floating-point vertices first onto an integer grid compatible with the kernel bit-width (32 to 256 bits). Labels relate to primitive membership (vertex, edge, face) and canonical intersection types.

The core architecture operates as a single forward pipeline with multiple stages: (1) Pairwise primitive intersection classification using integer-exact orient3d predicates defines one of five canonical types (VV, VE, VF, EE, EF) per contact, producing tagged intersection records keyed by simplex pairs without constructing explicit intersection graphs. (2) Per-face planar local arrangements are computed independently in the face’s plane by sorting and merging intersection points into cut face loops. Identification is two-level: topological identities by input primitives, plus geometric merges to unify points coinciding at the same integer grid coordinate. (3) From these arrangements, a reduced implicit graph of edges and faces is formed without explicit half-edge data structures; end-stage topology reflects a combinatorial map similar to Weiler 3-map but lighter-weight.

For disambiguating topological decisions requiring 3D orientation (such as nesting of connected components or radial order around non-manifold edges), the approach aggregates multiple exact orient3d predicate results within topological units by weighted-majority voting (maximum a posteriori estimate). This topological aggregation avoids perturbation methods like Simulation of Simplicity and instead relies on majority consensus over conflicting geometric observations post-materialisation.

Boolean operations over any arity of operands are supported by computing and storing per-domain inclusion bitvectors within the volumetric domain partition induced by the arrangement. This enables arbitrary Boolean expressions by per-domain bitwise evaluation without re-running costly mesh operations.

Training regime and reproducibility are not applicable as this is an algorithmic, deterministic approach. However, the authors provide a header-only C++ library with Python (nanobind) and TypeScript (WebAssembly) bindings, allowing deployment from desktop to browser environments. Experimental evaluation demonstrates scalability to tens of millions of triangles and comparison against prior pipelines (not specified due to truncation) with significant speedups and robustness claims.

One concrete example: The pipeline processes 22 million input triangles (a sphere union with 200 bunny models) by building the pairwise intersections with integer predicates, constructing per-face local arrangements to form the reduced graph, applying topological aggregation to resolve geometric ambiguities without global exact constructions, and finally extracting the Boolean union operations as per-domain bitvector tests, completing the entire operation in approximately 0.5 seconds on commodity hardware. This shows the feasibility of interactive CSG on extremely complex models.

Evaluation metrics include runtime, watertightness of final meshes, correctness of topological properties, and scalability across mesh sizes. Ablations on bit-width ladders and presence/absence of topological aggregation were discussed. No explicit adversarial robustness tests beyond the floating-point materialisation threat were reported. Code is released freely for research use, enabling reproducibility.

Technical innovations

  • Exact classification of pairwise intersections into five canonical types using fixed-width integer predicates without symbolic perturbation or fallback kernels, preserving all contacts exactly.
  • A novel two-stage local arrangement method that computes per-face planar intersections independently and uniquely identifies points and edges by a two-level topological identity scheme, avoiding global graph construction or precision escalation.
  • Topological aggregation by weighted-majority voting over conflicting orient3d observations within topological units resolves ambiguities from floating-point rounding robustly without perturbation.
  • Separation of arrangement build and Boolean extraction, allowing arbitrary N-ary Boolean expressions to be evaluated over a single precomputed volumetric partition with per-domain inclusion bitvectors.

Baselines vs proposed

  • EMBER [TNWK22] pipeline: interactive exact CSG with 256-bit integer planes but requires snap-rounding at materialisation vs trueform: up to 100x faster, valid watertight outputs without snap-rounding
  • Lévy’s [Lév25] multi-precision float kernel: robust exact CSG at high cost vs trueform: achieves interactive speeds and better topology preservation without exact coordinate escalation
  • QuickCSG [DFR15]: N-ary boolean in floating point outside degenerate configs vs trueform: deterministic exact topology support even with degenerate and non-manifold input

Figures from the paper

Figures are reproduced from the source paper for academic discussion. Original copyright: the paper authors. See arXiv:2607.15905.

Fig 1

Fig 1: Volumetric domains and N-ary booleans. Left: a Stanford bunny arranged against 60 axis-aligned cutting planes (20 per axis)

Fig 2

Fig 2: The observed wedge. Intended: four triangles T1,T2,T3,T4 meeting at a non-manifold edge e. T2 and T3 are near-coplanar; T4 is

Fig 7

Fig 7: A non-manifold domain with fins (Mode 2). A single

Fig 10

Fig 10: Open operands: sheets. A box and three disconnected spheres (volumes, M) with two undulating horizon surfaces declared as

Fig 11

Fig 11: The arrangement of eleven geological surfaces — de-

Fig 12

Fig 12: Two unit UV spheres (32×32), one offset by d along

Limitations

  • The approach assumes convex polygonal input faces; non-convex polygons and higher-order elements would require preprocessing or extension.
  • Fixed integer grid quantisation may fail or require tuning for extremely high-precision or very large-scale models beyond bit-width limits.
  • Topological aggregation resolves disagreements by majority vote but may not handle adversarial or pathological coordinate perturbations that systematically misrepresent topology.
  • No adversarial evaluation or robustness testing against maliciously crafted inputs was reported.
  • Performance claims depend on well-structured input; extremely large numbers of intersecting faces may degrade due to local arrangement complexity.
  • Open surfaces are supported but their handling assumes correct orientation declarations; malformed sheets may yield undefined behavior.

Open questions / follow-ons

  • How does topological aggregation behave under adversarially perturbed floating-point outputs if a majority of 3D observations disagree systematically?
  • Can the methods be extended to support non-convex polygon inputs or meshes with higher-order curved elements efficiently?
  • What is the impact of the integer grid resolution and bit-width ladder choice on topology preservation and performance for extremely large or small-scale geometry?
  • How might this approach integrate with remeshing or finite element pipelines that require smooth geometry beyond topology?

Why it matters for bot defense

For bot-defense and CAPTCHA practitioners, trueform’s innovations in topological robustness from noisy floating-point geometry can inform robust mesh processing in security-sensitive environments, where maintaining exact topology despite adversarial or noisy inputs is critical. The concept of topological aggregation via majority voting over inconsistent geometric readings may inspire new methods for verifying or sanitizing complex spatial data typical in bot-detection algorithms or interactive client challenges. Additionally, the fast, single-build multi-query evaluation of N-ary Boolean expressions on volumetric partitions matches well with efficient update and query patterns required in real-time bot detection pipelines. While the paper targets geometric modeling, its careful separation of topology from approximate geometry and resilience to coordinate perturbations offers valuable principles applicable to secure geometry handling in CAPTCHA systems and bot interaction analysis.

Cite

bibtex
@article{arxiv2607_15905,
  title={ trueform: Fast And Robust Mesh CSG Via Topological Aggregation },
  author={ Žiga Sajovic and Dejan Knez },
  journal={arXiv preprint arXiv:2607.15905},
  year={ 2026 },
  url={https://arxiv.org/abs/2607.15905}
}

Read the full paper

Articles are CC BY 4.0 — feel free to quote with attribution