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
For standard Euclidean distances, is the unit disk.
The volumetric extension, crucial for 3D geometry and CAD, utilizes the signed distance function (SDF)
The set forms a watertight surface encompassing the geometry (Zhang et al., 18 Nov 2025).
For each B-Rep face , a per-face unsigned distance function (UDF) is defined as
These fields capture both the geometry (SDF) and topology (via the collection of ) of a B-Rep model.
2. Regularity, Ridge Set, and Generalized Curvature
The regularity properties of depend strongly on the boundary geometry and the choice of norm. At points with a unique closest boundary point and under sufficient smoothness of , the following hold:
- Gradient:
- Hessian (for ):
is the unit vector orthogonal to .
Singularities arise where the closest boundary point is non-unique or the denominator vanishes, i.e., . The ridge set (a generalization of the medial axis) consists of all points where is not locally :
with being loci with multiple closest boundary points (Safdari, 2016). The -curvature 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 (SDF) and all (per-face UDFs) (Zhang et al., 18 Nov 2025).
- On the zero level set , face indices are recovered as .
- Face regions, edges, and vertices are encoded via local co-minimality:
- Face patch:
- Edge:
- Vertex:
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 computes for every edge projection , and for vertices.
- The minimum distance sets . If multiple minimizers exist, 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 .
- Each mesh vertex is assigned a face label via minimal .
- 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 in with Dirichlet BC on ,
- Introduce viscosity to obtain ,
- Via , the problem becomes linear: with on .
- Uzawa-type iterations update side boundaries using a discrete Godunov-type rule; convergence is ensured by a discrete maximum principle.
- Error estimates: , giving for mesh size .
- Empirical complexity , 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, -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.