Introduction
In Computer-Aided Design (CAD), models are traditionally stored as Boundary Representations (B-Reps)—complex structures of vertices, edges, and faces that must be perfectly "watertight" and topologically consistent to be useful in engineering. While Generative AI has made strides in 3D modeling, it often struggles with the strict requirements of CAD. Existing methods either predict modeling sequences (like "sketch and extrude"), which are difficult to learn for complex shapes, or generate geometry directly, which frequently results in "broken" models with gaps or invalid connections.
This paper introduces B-Rep Distance Functions (BR-DF), a novel volumetric representation designed to bridge the gap between the continuous nature of neural networks and the structured requirements of professional CAD software. By combining standard Signed Distance Functions (SDF) with per-face Unsigned Distance Functions (UDF), the authors provide a framework that guarantees a 100% success rate for topological validity.
The BR-DF Representation
The core innovation of this work is the dual-field volumetric representation. Instead of a single distance field, BR-DF utilizes two distinct types of information:
- SDF (Signed Distance Function): A standard 3D grid that encodes the overall shape of the object, defining the boundary between the interior and exterior.
- Per-face UDFs (Unsigned Distance Functions): For every face in the model, a corresponding distance field is generated. This allows the system to identify not just where the surface exists, but specifically which face a point on that surface belongs to.
Marching Cubes and Triangles (MCT)
To convert these volumetric fields back into a structured B-Rep, the authors developed the Marching Cubes and Triangles (MCT) algorithm. Standard Marching Cubes extracts a mesh from an SDF, but MCT extends this by using the per-face UDFs to partition the surface.
The algorithm follows a "minimum face" rule: a point on the extracted surface is assigned to whichever face has the smallest UDF value at that location. This approach effectively "Voronoi-tessellates" the surface, ensuring it is perfectly partitioned without overlaps or gaps. Edges and vertices are then mathematically derived from the intersections where these face boundaries meet.
Generative Pipeline
The authors implement this representation within a two-stage latent diffusion model:
- Stage 1: A Transformer predicts bounding boxes for the individual faces of the target object.
- Stage 2: A multi-branch 3D U-Net generates the SDF and UDF volumes simultaneously. The architecture includes specialized "inter-branch" layers (face-to-face, surface-to-face, and face-to-surface) to ensure that the overall geometry and the individual face partitions remain perfectly aligned.
Key Results and Insights
The researchers evaluated BR-DF on industry-standard benchmarks like DeepCAD and the ABC Dataset. The results demonstrate a significant leap in robustness:
- 100% Validity: While previous state-of-the-art methods like BrepGen achieved validity rates of roughly 63%, BR-DF achieved a perfect 100% success rate in producing topologically valid models.
- High Fidelity: The reconstruction accuracy (measured via Chamfer Distance) is extremely high, indicating that the generated models closely match the intended ground truth.
- Differentiable CAD: Because the representation is volumetric, it allows for Constructive Solid Geometry (CSG) operations—such as unions and intersections—to be performed directly on the distance fields before conversion.
Limitations and Future Work
Currently, BR-DF produces "faceted" B-Reps (meshes where groups of triangles represent faces). While these are valid B-Reps, professional workflows often require "parametric" B-Reps (smooth NURBS surfaces). Additionally, the model is currently limited to objects with 40 faces or fewer due to the memory requirements of 3D U-Nets. Future research aims to scale the resolution and develop methods to transition directly from these distance functions to smooth, editable parametric formats.
Summary updated