HiDiGen: Hierarchical Diffusion for B-Rep Generation with Explicit Topological Constraints
Authors: Shurui Liu, Weide Chen, Ancong Wu
Organizations: School of Computer Science and Engineering, Sun Yat-sen University, China · School of Intelligent Systems Engineering, Shenzhen Campus of Sun Yat-sen University, China
Boundary representation (B-rep) is the standard 3D modeling format in CAD systems, encoding both geometric primitives and topological connectivity. Despite its prevalence, deep generative modeling of valid B-rep structures remains challenging due to the intricate interplay between discrete topology and continuous geometry. In this paper, we propose HiDiGen, a hierarchical generation framework that decouples geometry modeling into two stages, each guided by explicitly modeled topological constraints. Specifically, our approach first establishes face-edge incidence relations to define a coherent topological scaffold, upon which face proxies and initial edge curves are generated. Subsequently, multiple Transformer-based diffusion modules are employed to refine the geometry by generating precise face surfaces and vertex positions, with edge-vertex adjacencies dynamically established and enforced to preserve structural consistency. This progressive geometry hierarchy enables the generation of more novel and diverse shapes, while two-stage topological modeling ensures high validity. Experimental results show that HiDiGen achieves strong performance, generating novel, diverse, and topologically sound CAD models.
Figures & tables
Figure 1: Comparison of learning paradigms for B-rep generation : (a) implicit topology encoding, (b) decoupled topology-geometry generation, and (c) our hierarchical generation framework.
Figure 2: HiDiGen pipeline overview. Our framework generates B-rep models in two hierarchical levels: Level 1 produces face-edge topology ( EFi ) and coarse geometry (face bounding boxes Bi , edge curves Ei ); Level 2 refines edge-vertex topology ( EVi ) and detailed geometry (face surfaces Fi , vertex positions Vi ), with each stage conditioned on prior outputs.
Figure 3: Illustration of the contextual conditioned embedding for face geometry generation. We gather the corresponding face bounding boxes and edge geometries, and further derive topological connectivity relationships to form the conditioning embedding.
Dataset
MMD ↓
COV ↑
JSD ↓
Valid ↑
Unique ↑
Novel ↑
CC ↑
MC ↑
DeepCAD
DeepCAD
1.021
72.43
1.623
60.50
91.27
93.74
10.51
1.81
BrepGen
0.874
71.13
1.584
69.27
99.08
99.54
9.30
0.86
DGTBrepGen
0.867
76.83
1.504
73.27
99.13
99.21
9.78
0.73
HiDiGen
0.856
71.37
1.424
75.77
99.52
99.71
11.03
1.99
ABC
BrepGen
1.543
66.37
2.377
53.47
97.64
98.57
10.76
1.37
DGTBrepGen
1.455
68.20
2.024
63.53
98.86
99.02
11.45
1.06
Table 1: Quantitative comparison of shape generation methods on the DeepCAD and ABC datasets. Lower values are better for MMD-CD and JSD (both scaled by 102 ), while higher values are better for COV, Valid, Unique, Novel, CC, and MC. All metrics except CC and MC are reported as percentages. Best results are bolded .
Figure 4: Qualitative comparison of unconditioned B-rep models generated by our method and prior approaches, including DeepCAD [ 24 ] , BrepGen [ 26 ] , and DTGBrepGen [ 14 ] , on the DeepCAD dataset. Our method generates more versatile and consistently watertight solid B-reps, demonstrating geometric fidelity and topological correctness.
Figure 5: HiDiGen failure cases illustrating error propagation between topology and geometry: (a) erroneous topology yields incorrect geometry; (b) inaccurate geometry leads to spurious topological connections.
Figure 6: Point cloud conditioned B-rep generation.
Dataset
MMD ↓
COV ↑
JSD ↓
Valid ↑
DeepCAD
w/o Bi
0.869
70.23
1.437
75.03
w/o Ei
0.871
70.87
1.441
73.27
HiDiGen
0.856
71.37
1.424
75.77
ABC
w/o Bi
1.483
63.27
1.873
64.83
w/o Ei
1.579
61.40
1.948
62.80
HiDiGen
1.414
65.43
1.845
65.77
Table 2: Quantitative comparison of HiDiGen with ablation variants on DeepCAD and ABC datasets.
Figure 7: Failure cases illustrating topological and geometric inconsistencies in generated B-reps.
Figure 8: Additional qualitative results of HiDiGen on the DeepCAD datasets.
Figure 9: Additional qualitative results of HiDiGen on the ABC datasets.
Boundary representation (B-Rep) generation is a fundamental task in computer-aided design, yet the direct synthesis of high-fidelity and structurally valid B-Reps remains a major challenge. Existing deep generative methods suffer from two forms of brittleness: representation brittleness, caused by padding noise and feature contamination in the latent space, and generation brittleness, stemming from sequential error propagation and a train-inference mismatch due to non-differentiable validity enforcement. We propose HiFi-BRep, a novel framework that addresses these limitations through two synergistic contributions. First, a topology-aware encoder constructs a high-fidelity latent representation by eliminating padding via learnable queries and preventing feature contamination with topology-guided attention. Second, a single-stage decoder jointly predicts geometry and topology in parallel, embedding core manifold constraints as a differentiable learning objective. This design ensures mutual guidance between geometry and topology while avoiding cascaded errors. Extensive experiments show that HiFi-BRep significantly outperforms state-of-the-art methods in both structural validity and geometric fidelity, providing a robust solution for high-quality B-Rep synthesis. Code and models are publicly available at https://github.com/1nnoh/HiFi-BRep.
Junhao Hou, Chenqi Luo, Pufan Wang +5
State Key Lab of CAD&CG, Zhejiang University · Hangzhou Dianzi University · Guangzhou University
Generating a boundary representation (B-rep) conditioned on a single image requires faithful reconstruction of geometry, valid topology, and support for complex shapes. We present UniBRep, a geometry-first framework that adapts a pretrained image-to-3D model to generate a feature mesh as a unified intermediate representation. Its surface provides a geometric scaffold, while spatially aligned learned features encode face-separation cues for topology recovery. Dual decoder branches generate the geometry and face-separation features; a geometry- and feature-guided construction pipeline then fits parametric surfaces, recovers boundary curves and connectivity, and assembles an explicit B-rep using a CAD kernel. Recovering topology from mesh regions avoids predefined architectural face-count limits, allowing face count to scale with shape complexity. On the standard DeepCAD benchmark, UniBRep produces valid B-reps for 80.49% of inputs and reduces face Chamfer distance from 0.1096 to 0.0345 relative to CADDreamer. In a matched comparison, UniBRep also outperforms the HoLa public demo across all reported metrics. Further evaluations demonstrate scalability to high-complexity shapes beyond the standard 30-face range, generalization to objects outside the CAD training distribution, and qualitative transfer to real photographs.
Haiyang Ying, Allen Tu, Jiaye Wu +2
University of Maryland, College Park, Maryland, USA · Amazon, Bellevue, Washington, USA
Multi-stage boundary representation (B-Rep) generation leverages intermediate wireframes to synthesize CAD models. However, geometric and topological risks in these wireframes -- such as self-intersections, edge collapses, and disconnected vertices -- can propagate to invalid final B-Reps. Mitigating such failures by retraining large generative models is computationally prohibitive. We propose Wireframe Detection and Repair (WDR), a training-free framework that intervenes at the intermediate wireframe stage to improve downstream B-Rep validity. WDR features a Geometric-Topology Anomaly Detector (GTAD) that combines parallel VLM-based coarse screening with geometric and topological detectors to predict downstream invalidity risk and route generation to dedicated branches. An Energy-Guided Geometric-Topology Repair (EGGTR) module then performs detector-triggered guided regeneration through geometry and topology branches. By scaling test-time computation via Energy-Guided Resampling and training-free guidance for diffusion models, WDR can be integrated into autoregressive and diffusion pipelines without retraining. Extensive experiments demonstrate consistent improvements in kernel-checked validity while largely retaining the measured diversity and distributional quality of synthesized CAD models. The code will be made publicly available upon acceptance.
Jingyu Wu, Youcheng Cai, Tengyu Luo +1
University of Science and Technology of China, Hefei, China