B-Rep Distance Functions (BR-DF)
- B-Rep Distance Functions (BR-DF) are a framework that encodes and analyzes geometric models from boundary representations using distance-based volumetric constructs.
- They provide explicit volumetric encoding of both geometry and topology, enabling robust algorithms for CAD, shape optimization, and level set methods.
- BR-DF methods utilize precise gradient and Hessian formulations, facilitating efficient surface reconstruction and accurate detection of singularities in 2D and 3D models.
Boundary-Representation Distance Functions (BR-DF) constitute a unified framework for encoding, analyzing, and reconstructing geometric models from their boundary representations using distance-based volumetric and functional constructs. BR-DF plays a crucial role in CAD, shape optimization, level set methods, and generative modeling, providing both explicit geometric information and a basis for robust numerical algorithms (Zhang et al., 18 Nov 2025, Abgrall, 2022, Safdari, 2016).
1. Mathematical Preliminaries: Definitions and Core Properties
Let (or, in the volumetric setting, ) be a bounded domain with a boundary representation (B-Rep) specified via vertices, edges, and faces. The BR-DF framework generalizes the notion of distance-to-boundary using the gauge function of a compact, convex set with $0$ in its interior. For any , the -distance to the boundary is defined as
where
and , the polar gauge, is given by
0
For standard Euclidean distances, 1 is the unit disk.
The volumetric extension, crucial for 3D geometry and CAD, utilizes the signed distance function (SDF)
2
The set 3 forms a watertight surface encompassing the geometry (Zhang et al., 18 Nov 2025).
For each B-Rep face 4, a per-face unsigned distance function (UDF) is defined as
5
These fields capture both the geometry (SDF) and topology (via the collection of 6) of a B-Rep model.
2. Regularity, Ridge Set, and Generalized Curvature
The regularity properties of 7 depend strongly on the boundary geometry and the choice of norm. At points 8 with a unique closest boundary point 9 and under sufficient smoothness of 0, the following hold:
- Gradient:
1
- Hessian (for 2):
3
4 is the unit vector orthogonal to 5.
Singularities arise where the closest boundary point is non-unique or the denominator vanishes, i.e., 6. The ridge set 7 (a generalization of the medial axis) consists of all points where 8 is not locally 9:
0
with 1 being loci with multiple closest boundary points (Safdari, 2016). The 2-curvature 3 generalizes traditional curvature to arbitrary gauges.
3. BR-DF Representation and Topology Encoding
In modern applications, especially CAD geometry, BR-DF encodes not only surface geometry but also face, edge, and vertex structure:
- For a discrete 3D grid, one stores 4 (SDF) and all 5 (per-face UDFs) (Zhang et al., 18 Nov 2025).
- On the zero level set 6, face indices are recovered as 7.
- Face regions, edges, and vertices are encoded via local co-minimality:
- Face patch: 8
- Edge: 9
- Vertex: $0$0
This volumetric encoding enables implicit representation of topological adjacency, obviating explicit graph structures.
4. Algorithms for Computation and Reconstruction
For 2D polygonal B-Rep boundaries under arbitrary asymmetric norms:
- Each query $0$1 computes $0$2 for every edge projection $0$3, and $0$4 for vertices.
- The minimum distance $0$5 sets $0$6. If multiple minimizers exist, $0$7 lies on the ridge.
- The gradient and Hessian are evaluated at non-ridge points as above.
- The algorithm identifies singularities via ridge conditions and provides pseudocode for efficient evaluation (Safdari, 2016).
For 3D BR-DF models:
- The Marching Cubes and Triangles (MCT) algorithm extracts the surface mesh from sampled $0$8.
- Each mesh vertex is assigned a face label via minimal $0$9.
- Edges and vertices are reconstructed by local intersection and co-minimality of UDFs, ensuring watertight, topologically consistent faceted B-Rep meshes.
- This process is strictly local per triangle, but guarantees global watertightness and combinatorial correctness (Zhang et al., 18 Nov 2025).
5. Elliptic and Variational Methods for BR-DF Computation
Traditional fast-marching and sweeping schemes solve the Eikonal equation on structured domains. For general B-Rep (complex or unstructured), the elliptic approximation via the Hopf–Cole transform provides enhanced efficiency and robustness (Abgrall, 2022):
- Given target Eikonal 0 in 1 with Dirichlet BC on 2,
- Introduce viscosity 3 to obtain 4,
- Via 5, the problem becomes linear: 6 with 7 on 8.
- Uzawa-type iterations update side boundaries using a discrete Godunov-type rule; convergence is ensured by a discrete maximum principle.
- Error estimates: 9, giving 0 for mesh size 1.
- Empirical complexity 2, significantly better than hyperbolic solvers on fine meshes (Abgrall, 2022).
The elliptic approach is particularly suitable for repeated BR-DF evaluations in turbulence modeling, image analysis, and design tasks requiring numerous distance queries.
6. Generative Modeling and Data-driven BR-DFs
The BR-DF representation underlies generative models for 3D B-Rep geometry:
- A two-stage latent diffusion framework jointly predicts the SDF and UDFs: first, bounding-box diffusion to estimate the number and extent of faces; second, 3D VQ-VAE encodings and a 3D U-Net latent diffusion model reconstruct the volumetric distance fields.
- Cross-attention in the U-Net enables conditioning the SDF (global shape) on facial UDFs and vice versa.
- The joint latent model is trained to minimize predicted noise on both surface and face-branch latents.
- Experimental outcomes show high coverage (COV≈73.7%), low Chamfer distance (≈6.6×10{-4}) validating topological and geometric faithfulness, with 100% success in producing watertight faceted B-Rep models (Zhang et al., 18 Nov 2025).
7. Applications and Implications
BR-DFs unify Euclidean, 3-norm, and arbitrary Finsler-type distance computations, generalize medial skeletons to non-Euclidean settings, and provide explicit volumetric encoding of B-Rep geometry and topology:
- Offset surface computation in CAD
- Fast front-propagation and level set schemes
- Shape optimization, variational PDEs, and Monge–Kantorovich problems
- Curvature-driven flows and image processing
- Generative 3D model synthesis from latent spaces using distance-based fields
Robustness to geometric degeneracies, explicit gradient and Hessian formulas, and amenability to linear-algebraic acceleration render BR-DF a foundational tool in modern geometric computing (Safdari, 2016, Abgrall, 2022, Zhang et al., 18 Nov 2025).
| Domain | Key BR-DF Role | Notable Reference |
|---|---|---|
| CAD Modeling | Geometry/topology encoding | (Zhang et al., 18 Nov 2025) |
| PDE/Numerics | Distance for front evolution | (Abgrall, 2022) |
| Medial Axis | Ridge set analysis | (Safdari, 2016) |
The BR-DF methodology is extensible to higher-dimensional and more abstract settings, suggesting continued relevance in shape analysis and computational design.