- The paper presents a meshing algorithm that treats the B-Rep topology as an invariant, decoupling topological correctness from geometric approximation.
- It employs a discrete pipeline—including sampling, snapping, loop embedding, stitching, and remeshing—to generate watertight meshes with a consistent combinatorial structure.
- Empirical results on over 10,000 challenging models show >93% geometric accuracy and robust performance compared to traditional heuristic methods.
Topology-Preserving Boundary-Representation Meshing: Algorithmic Foundations and Empirical Analysis
Introduction and Motivation
The conversion of parametric B-Rep (Boundary Representation) models into watertight, topologically faithful meshes is a critical yet unsolved problem in computer-aided design (CAD), simulation, and geometric modeling. Despite B-Reps forming the backbone of solid modeling in major CAD kernels, their inherent geometric and topological inconsistencies—arising primarily from surface/curve intersection approximations, disjoint representations of trims, and parameterization artifacts—have continued to impede robust downstream meshing, finite element analysis, and high-fidelity rendering workflows. Existing surface meshing pipelines typically employ geometric heuristics and repair strategies that lack topological guarantees, yet even slight geometric inconsistencies or approximation errors routinely lead to non-manifold meshes, missing adjacencies, and downstream failures.
This work, "Topology-First B-Rep Meshing" (2604.02141), presents a meshing algorithm that treats the topology of the input B-Rep as an unalterable invariant: the mesh is guaranteed to possess the same discrete combinatorial structure as the original model, regardless of geometric inconsistencies or user-specified tolerance. The approach decouples topological correctness from geometric approximation, fundamentally departing from conventions in the B-Rep-to-mesh conversion literature.
Figure 1: Inconsistency between curves (black) and the 2D trimming curves lifted with the parameterization (red). Since the method relies only on the 3D curves (black), it successfully generates a mesh despite these inconsistencies.
B-Rep Structure, Geometry, and Topological Inconsistency
B-Reps comprise both a combinatorial topological structure—faces bounded by loops of edges and vertices—and a parametric geometric embedding, typically via NURBS patches and high-order parametric curves. Importantly, faces are trimmed, not entire parametric surfaces, leading to duplication and misalignment between (i) 3D spatial curves and (ii) their projected counterparts (trimming curves) on patch parameter domains.
Figure 2: Parametric domain of a patch with its 2D trimming curves. Approximation errors can yield unintended intersections and artifacts due to the duplicated geometry of the trims.
These geometric inconsistencies are endemic, even in highly engineered kernels such as Parasolid or ACIS. They arise from:
- Approximate computation of patch–patch intersections, producing high-genus, high-degree intersection curves, which are inseparable from kernel tolerances and geometric error.
- Separate storage of 3D curves and their parameter-space projections with no guarantee of mutual consistency.
The outcome is pervasive: parametric trimming curves frequently self-intersect or misalign, edges possess slight gaps in 3D, and the parameterizations themselves can be singular or degenerate for thin features.
The Proposed Topology-First Meshing Paradigm
The method introduced in this work makes several crucial departures from existing paradigms:
- Exclusive Incorporation of 3D Curves: The algorithm ignores 2D trimming curves, reconstructing trims per patch directly in 3D space, thus eliminating dependency on unreliable parameter-space data.
- Topological Skeleton as Invariant: The mesh's combinatorial structure (faces, loops, edges, vertices and their adjacencies) mirrors the input B-Rep exactly.
- Single-Tolerance Geometry Control: Mesh–geometry deviation is bounded only by a user-defined tolerance, ϵ, controlling geometric fidelity but never permitting topological discrepancy.
- No Post-hoc Repair: Heuristic repair and feature-merging found in conventional methods are replaced by an explicitly topology-preserving tracing and stitching procedure, validated at each stage by purely discrete criteria.
Figure 3: A B-Rep contains topology (combinatorial structure of faces, loops, edges, vertices) embedded in geometry (3D surfaces, curves, points).
Figure 4: Overview of the topological entities and their relationships.
Algorithmic Pipeline
The pipeline consists of five discrete phases, each guaranteeing topological invariance:
Figure 5: Overview of the five-stage algorithm—sampling, snapping, embedding, stitching, and remeshing—to robustly convert B-Reps into topologically valid meshes.
- Sampling: Each geometric primitive—vertices, edges (as 3D parametric curves), and faces (as parametric surfaces)—is discretized. For surfaces, projected quadrature sampling ensures that all regions conform to the user-specified ϵ. No trimming is applied at this stage.
- Curve Snapping: Endpoints of sampled edge polylines are snapped to their associated vertex locations. Laplacian smoothing distributes snapping error, ensuring connections faithfully reflect the B-Rep graph.
- Loop Embedding: For each face, mesh cycles are traced on the patch mesh to represent every (possibly non-manifold) loop. Non-manifold loops are handled by temporary entity duplication; core tracing relies on closest-point projection and Dijkstra-based chain-building.
Figure 6: Edge chain tracing on the mesh—project two points, trace a path using Dijkstra's algorithm, and repeat to preserve the correct partitioning topology.
- Stitching: Trimmed meshes for each face are merged across common edges. Vertex snapping is reinforced, and Laplace smoothing disseminates positional update errors. Discretizations are made conforming by edge refinement on mismatched sides.
Figure 7: After embedding, different numbers of vertices may exist along adjacent representations of a b-edge; refinement aligns these for conformity and global watertightness.
- Remeshing: Isotropic remeshing improves quality while enforcing strict invariants to avoid topology change. Geometric envelopes prevent deviation beyond ϵ; b-edges and b-vertices are strictly preserved.
Empirical Results and Robustness
The method was evaluated on >10,000 B-Rep models from the ABC and Fusion360 datasets, which include challenging cases with thin features, periodic patches, near-degenerate domains, and both manifold and non-manifold loop configurations. Key findings include:
- Topological Correctness: The method succeeds (modulo resource limits) on all cases, including those where OpenCascade, NetGen, Gmsh, and Mefisto fail or produce meshes with missing features.
- Geometric Accuracy: In >93% of models, normalized geometric error is below 3% of bounding box diagonal; only 1% of models exhibit error above 10%, typically due to pathological or degenerate input.

Figure 8: Histogram of geometric error relative to bounding box diagonal—strong geometric faithfulness is achieved across large and diverse test sets.
- Heuristic Acceleration: Heuristics designed for performance are validated for topological correctness and revert to conservative algorithms otherwise, ensuring mesh integrity.
- Complex Topologies and Geometries: The approach robustly meshes models with non-manifold loops (Figure 9), periodic faces (Figure 10), and extremely small or degenerate parametric domains (Figure 11).
- Head-to-Head Benchmarking: Competing systems frequently fail due to parameter sensitivity, memory overflow, or crash on complex input, whereas topology-first meshing produces valid outputs consistently.




















Figure 12: Comparison of B-Rep meshing results across Gmsh, Mefisto, OCC, NetGen, and this method at multiple resolutions. Only the topology-first algorithm captures all features without failure.
Implications for Modeling, Simulation, and Future Directions
Algorithmically enforcing B-Rep topology provides significant practical benefits:
- Reliability: Meshes are always topologically consistent and ready for downstream isogeometric analysis, simulation, or rendering without manual repair.
- Boundary Condition Transfer: Mesh face correspondence to B-Rep entities is trivial, facilitating assignment or transfer of physical properties.
- Scale-Invariance and Automation: The method tolerates extreme feature scales, eliminating manual intervention in meshing pipelines (Figure 13).
From a theoretical perspective, the approach demonstrates that robust mesh generation for complex industrial B-Reps is feasible by fully separating combinatorial and geometric concerns. It highlights the limitations of geometric heuristics alone and suggests that further integration of topological priors into geometric algorithms—potentially within the CAD kernel itself—could provide more reliable modeling primitives.
Potential future directions include:
- Integrating explicit geometric error certificates alongside the topological guarantee framework.
- Extending correspondence propagation from the B-Rep boundary to patch interiors, facilitating dense mapping and inverse design applications.
- Incorporating topological-aware intersection algorithms inside CAD kernels, building upon recent surface/surface intersection advances [yang2023topology].
Conclusion
This work establishes a robust, topology-preserving pipeline for B-Rep meshing, sidestepping the pitfalls of inconsistent geometry and heuristic repair. By treating the B-Rep topology as an invariant and executing all stages under discrete (not geometric) guarantees, the method yields consistent success across a diverse range of challenging real-world models. While geometric errors remain possible for ill-posed or highly inconsistent input, the paradigm sets a new standard for automation and reliability in CAD-to-mesh pipelines and suggests rich avenues for the further union of topological and geometric modeling.
(2604.02141)