Booleans you can trust

“Boolean failed” is a symptom, not a cause — the crack appears where representation, numerics, and topology collide. In BIM we mix B-Rep, meshes, and SDFs, then wonder why set operations splinter. Robustness doesn’t come from a magic kernel; it’s engineered end-to-end. Pick the strategy to fit the job — exact/filtered B-Rep for tight, detail-critical solids; level-set SDF for big, messy unions; hybrids when you need both stability and edge fidelity. Treat tolerance as data rather than a global epsilon: scale it to local feature size so snapping and rounding don’t reopen cuts after precise intersections. Use just enough math to stay honest — Euler characteristic to catch non-manifold surprises, Hausdorff distance to bound drift after conversions or voxel loops. Make the publish path deterministic: pinned versions, fixed seeds, a documented tolerance policy, so clash checks and IFC handovers are reproducible. Geometry can change form, but meaning must persist — carry GUIDs and IFC classifications through every step. Less mystery, more intent — and Booleans become a reliable tool instead of a coin toss.

Common Questions

Q: Why is “Boolean failed” a symptom, not a cause? A: Because the crash usually stems from a chain: representation mismatch (B-Rep/mesh/SDF), numeric fragility, and topological defects. The error dialog is the last domino falling after upstream choices made the operation ill-posed.

Q: When should I prefer exact/filtered B-Rep over SDF level sets? A: Choose exact/filtered B-Rep for clean, detail-critical solids where edge fidelity and tight fit matter (fabrication, precise joinery). Pick SDF for large unions/differences, noisy scans, or massive federations where stability and parallelism outweigh absolute sharpness.

Q: What’s risky about snapping after exact intersections? A: Exact intersections live in high precision; you must map them back to ordinary floats. If snapping isn’t tied to local feature size, you introduce hairline gaps and topological cracks. Use a feature-aware snapping policy.

Q: How do I keep sharp edges when using SDF Booleans? A: Use adaptive narrow bands (refine near high curvature or small features), then re-project to a surface. Verify with local Hausdorff thresholds so stability doesn’t cost edge fidelity.

Q: Why split the pipeline into “fast” and “deterministic” tracks? A: To reconcile interactive speed with auditable outputs. The publish track fixes library versions and seeds, records the tolerance policy, and avoids non-associative FP reductions — so clash detections and IFC handovers are reproducible.

Q: How do I preserve identity and semantics across representation changes? A: Carry GUIDs and Ifc* classifications through B-Rep ↔ mesh ↔ SDF steps. Log each geometry state (“co-refined mesh,” “pre-surface SDF”) so downstream consumers know what they’re getting at handover.

Q: When is custom logic justified, and when is it overkill? A: Justified in narrow, high-throughput cases — extreme aspect ratios, hundreds of tiny CSG operands, strict tolerances — where tailored snapping/rounding reduces cracking. Otherwise, standard libraries plus disciplined tolerances and checks are sufficient.
Contact Elf.3D to explore how custom mesh processing algorithms might address your unique challenges. We approach every conversation with curiosity about your specific needs rather than generic solutions.

*Interested in discussing your mesh processing challenges? We'd be happy to explore possibilities together.*

Robust Booleans in BIM: From “dirty geometry” to resilient pipelines

Boolean failures in BIM aren’t random glitches; they’re the visible seams of a pipeline where representations, tolerances, and topology are pulling against each other. As multi-author, multi-tool handovers become the norm, especially around IFC 4.3.2.0 exchanges, brittle Booleans proliferate unless we design for robustness end-to-end. buildingSMART’s IFC 4.3.2.0 documentation mirrors the ISO schema and is widely used in coordination pipelines, which means heterogeneous geometry will keep flowing through your stack.

The three real causes (and why messages mislead)

Representation mismatch. B-Rep solids, triangle meshes, and volumetric level sets encode different invariants. Converting between them changes the kinds of errors you face — mesh “slivers,” B-Rep tolerance entanglements, or voxel aliasing — and those differences surface during set operations. In IFC-centric workflows, this is amplified because authoring tools approach the same schema with different geometric strategies.

Numeric fragility. Near-degenerate configurations (almost coplanar, nearly collinear) cause floating-point predicates to flip signs. The classic fix — adaptive/filtered robust predicates — delays exact arithmetic until it’s necessary, stabilizing orientation/incircle tests that many Boolean kernels depend on.

Topological ambiguity. Non-manifold edges, self-intersections, and zero-area faces make it impossible for downstream algorithms to return a consistent result. Even when intersections are computed exactly, naïve snapping back to ordinary floats can re-introduce cracks if rounding isn’t tied to local feature size. Recent “exact arrangements” work highlights both the benefits and the practical rounding pitfalls.

Choosing a Boolean strategy (fit to your inputs, not your taste)

There isn’t one “right” Boolean — there are families, each with predictable trade-offs:

  • Exact/filtered-predicate B-Rep (arrangements/co-refinement). These methods compute intersections exactly (often constructing a Weiler model), then classify facets. They preserve topology and small features better than approximate approaches — ideal when fidelity matters. The cost is performance and the need for careful, feature-aware snapping when returning to floating-point coordinates.
  • Volumetric/SDF (e.g., OpenVDB level sets). Level-set Booleans are numerically stable and embarrassingly parallel; sparse hierarchies keep memory in check. Left unrefined, they smooth sharp edges; with adaptive bands and a re-projection step, they can be both stable and crisp enough for many deliverables.
  • Hybrids. Use SDFs for the boolean itself and re-surface for detail (or maintain an analytic/B-Rep representation in parallel for downstream consumers).

At a glance

Strategy Strengths Risks Typical use
Exact/filtered B-Rep Preserves topology & small features Cost; rounding cracks if mishandled Tight fit-up; fabrication solids
Volumetric/SDF Stable; scalable; easy batching Resolution bias; edge softening Large unions/diffs; scan meshes
Hybrid Stability + detail recovery Pipeline complexity Mixed federations / handovers

Tolerance is a field, not a number

Global “epsilon” switches look convenient, but many CAD kernels treat tolerance as part of the model semantics. In Open CASCADE, for example, tolerance influences topological decisions — bluntly changing it can create downstream failures. A safer policy is a feature-scaled tolerance field:

τ = k · ℓ

where is a local feature size (e.g., minimum incident edge length or curvature radius), and k is chosen per kernel and task. Document this policy alongside the model and keep it stable across imports/exports.

Minimal math that stops big headaches

Two small checks catch the majority of silent drift:

  • Euler characteristic χ = V − E + F for manifold sanity. If χ jumps unexpectedly (or is undefined due to non-manifoldness), fix before proceeding.
  • Hausdorff distance between meshes to bound deviation after conversions or SDF round-trips; set the threshold in proportion to your local τ.

These aren’t heavy validations; they’re guardrails that keep error from compounding.

A preflight for mixed-source BIM models

  1. Normalize units and log them (don’t assume meters when a sub-model used millimeters).
  2. Repair topology (remove zero-area elements, close micro-gaps, reject non-manifold shells) before set ops. Open CASCADE’s shape-healing guidance is a starting point, but record what you change.
  3. Seed the tolerance field (τ = kℓ) and align it with your kernel’s expectations — avoid global overrides.
  4. Partition broad-phase vs narrow-phase (e.g., BVH or spatial bins) so distant parts don’t pollute numeric conditions.
  5. Preserve identity & semantics: keep GUIDs and Ifc* classifications intact through representation changes; IFC is the neutral carrier many stakeholders expect, and as of 2025 the schema is standardized as ISO 16739-1:2024 with 4.3.2.0 documentation widely referenced.

Volumetric without losing detail

OpenVDB’s sparse topology makes large unions/differences practical, but the trap is resolution bias. The remedy is to localize resolution: keep a coarse background grid with adaptive narrow bands around high-curvature or small-feature zones, then re-project the result to a surface. Validate with a per-region Hausdorff bound so stability doesn’t come at the cost of detail. This approach shows up repeatedly in level-set literature and production documentation.

Performance and determinism at publish time

Teams want interactive speed and auditable deliverables. The pragmatic answer is a dual-track pipeline:

  • During modeling, favor speed (approximate kernels, opportunistic meshing).
  • For coordination/handover, run a deterministic build: fix random seeds, pin library versions, log the tolerance policy, and avoid non-associative reductions that make results order-dependent. Determinism pays off in clash detection and version-to-version comparability for IFC deliverables.

In narrow, high-throughput scenarios (e.g., many small operands, extreme aspect-ratio features), tailored snapping/rounding policies tied to local feature scales can reduce post-intersection cracking compared to off-the-shelf defaults. Keep such tweaks documented and corralled to the publish track.

Interoperability: standards are the contract, not the implementation

IFC’s role here is contractual: it defines what information must be exchangeable, not how you compute set operations. The current ISO reference (16739-1:2024) and buildingSMART’s 4.3.2.0 docs ensure vendors converge on semantics even as geometry kernels vary. If your pipeline switches representations mid-flight (B-Rep → mesh → SDF), record the representation state at each hand-off (e.g., “co-refined mesh,” “pre-surface SDF”) and keep GUIDs consistent. Community implementer resources show active support for IFC 4.3 (ADD2), but variability persists — another reason for deterministic publishes.

Putting it together: a simple decision path

  1. What’s the input?
    • Clean, watertight solids with small features? Prefer exact/co-refinement Booleans.
    • Large unions/differences or scan meshes? Prefer SDF Booleans with adaptive refinement.
  2. What’s the contract?
    • If IFC handover is the milestone, track semantics and identity and target deterministic geometry.
  3. What’s the tolerance model?
    • Use a feature-scaled τ = kℓ policy and enforce it through conversions and Booleans.
  4. What’s the safety net?
    • Euler and Hausdorff checks gate each stage; if they trip, pause and repair.

Closing thought

Robust Booleans aren’t delivered by a single hero kernel. They emerge from a pipeline that respects representation boundaries, treats tolerance as data, and uses light metrics to keep drift in check. The tools already exist — from robust predicates to sparse level sets — but success comes from choosing when to use which, then making the publish path deterministic so others can rely on the result.


References (compact)

  1. buildingSMART, IFC 4.3.2.0 Documentation (schema aligned with ISO publication). (standards.buildingsmart.org)
  2. buildingSMART, IFC 4.3.2 Documentation portal (comprehensive reference and clarifications). (ifc43-docs.standards.buildingsmart.org)
  3. ISO, ISO 16739-1:2024 — Industry Foundation Classes (IFC). (iso.org)
  4. Shewchuk, Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates. (people.eecs.berkeley.edu)
  5. Lévy, Exact predicates, exact constructions and combinatorics for mesh CSG (exact Weiler/arrangements for robust Booleans). (arxiv.org)
  6. OpenVDB, Documentation; Museth, VDB: High-Resolution Sparse Volumes with Dynamic Topology. (openvdb.org)
  7. Open CASCADE, Modeling Algorithms / Tolerance semantics (and related Shape Healing docs). (dev.opencascade.org)