Source-linked AI summary
ComplexGen: CAD Reconstruction by B-Rep Chain Complex Generation
Haoxiang Guo, Shilin Liu, Hao Pan, Yang Liu, Xin Tong, Baining Guo
TL;DR
Reconstructing structured CAD from point clouds is difficult because prior approaches do not jointly recover all B-Rep primitives and their topology. ComplexGen predicts these elements and relationships with a neural network, then refines them through constrained global optimization. The authors report more complete and structured reconstructions, including under noisy and missing data.
Problem
Prior methods improve reconstruction of individual B-Rep primitives but do not simultaneously recover patches, curves, and corners, leaving incomplete structures whose topology is difficult to make consistent.
Source: §1 · p. 1Method
ComplexGen uses a sparse CNN and tri-path transformer to predict B-Rep primitives and topology, followed by global optimization for a precise, valid model.
Source: §1 · p. 2, §4.1 · p. 5Results
Holistic B-Rep modeling achieves more complete and structured CAD reconstruction, with tests also reporting robustness to noisy and missing data.
Source: §6 · p. 10Takeaways & Limitations
Explicit topology supports validity constraints, including closed face-boundary loops, for more regular CAD reconstruction.
Source: §1 · p. 2The authors describe this as a first effort at holistic B-Rep reconstruction from point clouds and note that each implementation step could be improved.
Source: §6.7 · p. 15
Abstract
from arXiv · showhide
We view the reconstruction of CAD models in the boundary representation (B-Rep) as the detection of geometric primitives of different orders, i.e. vertices, edges and surface patches, and the correspondence of primitives, which are holistically modeled as a chain complex, and show that by modeling such comprehensive structures more complete and regularized reconstructions can be achieved. We solve the complex generation problem in two steps. First, we propose a novel neural framework that consists of a sparse CNN encoder for input point cloud processing and a tri-path transformer decoder for generating geometric primitives and their mutual relationships with estimated probabilities. Second, given the probabilistic structure predicted by the neural network, we recover a definite B-Rep chain complex by solving a global optimization maximizing the likelihood under structural validness constraints and applying geometric refinements. Extensive tests on large scale CAD datasets demonstrate that the modeling of B-Rep chain complex structure enables more accurate detection for learning and more constrained reconstruction for optimization, leading to structurally more faithful and complete CAD B-Rep models than previous results.
1 INTRODUCTION
ComplexGen addresses incomplete CAD reconstructions by generating B-Rep primitives and their topology together, then refining the predicted structure under validity constraints. The authors report more accurate detection and topology reconstruction, alongside more complete results under noisy or incomplete inputs.
1 INTRODUCTION
- Prior approaches improve individual primitive reconstructions but do not simultaneously recover patches, curves, and corners, leaving incomplete models with difficult topology.Such models make it nontrivial to establish conforming elements and proper topology.Source: §1 · p. 1
- B-Rep represents vertices, edges, and faces with their topology, whose chain-complex constraints include closed loops around face boundaries.These constraints provide structural validity conditions for CAD reconstruction.Source: §1 · p. 2
- The framework combines a sparse CNN encoder and three communicating transformer-decoder paths to predict geometric primitives and their topology.A global optimization then extracts a precise, valid model from the imprecise probabilistic prediction.Source: §1 · p. 2
- Holistic B-Rep chain-complex modeling enables more accurate detection and topology reconstruction, with constraints supporting more regular and complete reconstruction.The authors identify face-boundary loop closedness and edge manifoldness among the constraints used in global optimization.Source: §1 · p. 2
- Tests on a large-scale ABC benchmark report total B-Rep recovery with part accuracy comparable to or better than prior methods; noisy and incomplete inputs test robustness.Joint reasoning across element orders improves robustness to data corruption.Source: §1 · p. 2
- The paper contributes chain-complex reconstruction, a tri-path neural generator, and neurally guided global optimization for structurally valid CAD models.The authors also state that code and data are open-sourced.Source: §1 · p. 2
2 RELATED WORK
Prior CAD reconstruction work either fits surface primitives, recovers wireframes, or optimizes structure, while learned methods address subsets of the B-Rep. ComplexGen instead predicts a holistic structure and uses topology and geometric constraints in global optimization.
2 RELATED WORK
- Traditional primitive-fitting approaches use probabilistic search or variational optimization, while structural constraints can improve regularity but remain prone to local optima.The cited approaches include RANSAC [Schnabel et al. 2009, 2007] and global optimization.Source: §2 · p. 2
- Learning-based methods assign surface-patch types and parameters to points, recover wireframes from corners and lines, or autoregressively generate polygonal vertices and faces.These methods address different parts or representations of CAD reconstruction.Source: §2 · p. 2
- ComplexGen jointly represents elements of multiple orders and their topology, addressing the limited scope of methods that reconstruct only parts of the B-Rep.Its network prediction guides global optimization with topology and geometric-fitting constraints.Source: §2 · p. 3
- Procedural reconstruction searches for CSG operations or sketch-and-extrude sequences, but these models do not cover all CAD operations and can struggle with freeform curves and surfaces.B-Rep is described as a widely used underlying CAD representation.Source: §2 · p. 3
- Transformer-based CAD detection can predict element positions directly, but a naive DETR adaptation lacks cross-element consistency and robust geometric accuracy.ComplexGen adds topology generation, which the authors report improves detection and supports neurally guided optimization toward manifold, complete models.Source: §2 · p. 3
3 CAD MODELS AS B-REP CHAIN COMPLEXES
ComplexGen represents CAD reconstruction as generating a B-Rep chain complex: geometric elements and their topology are modeled together, then optimized and refined into a valid structure.
3 CAD MODELS AS B-REP CHAIN COMPLEXES
- B-Rep models represent solid boundaries with linked faces, edges, and vertices, each geometrically embedded using primitive types.The paper treats topology and geometry as separate, explicit aspects of the representation.Source: §3 · p. 3
3.1 B-Rep Chain Complex
- A B-Rep chain complex links vertices, edges, and faces through boundary operators, with each face’s edges forming closed loops.The chain-complex property ∂1◦∂2 = 0 encodes this closed-boundary condition.Source: §3.1 · p. 3
3.2 Structure Representation and Validness
- A valid B-Rep requires edges adjacent to two faces, open or closed edges to have two or zero endpoints, and faces to have closed boundary loops.Validity also requires the geometry to realize the topology with sufficient accuracy.Source: §3.2 · p. 4
3.3 Method Overview
- ComplexGen predicts elements, their topology, and geometry from a point cloud, then optimizes for likely connections under topological constraints and refines the geometry.The network output is generally not precise or valid on its own; evaluation includes large-scale datasets and noisy or partial point-cloud stress tests.Source: §3.3 · pp. 4–5
4 LEARNING TO GENERATE B-REP CHAIN COMPLEXES
ComplexNet predicts B-Rep elements, their geometry, and topology from point clouds, then trains these outputs against matched ground-truth structures. Its design combines explicit topology modeling with unified geometric generation for diverse primitives.
4.1 ComplexNet Design
- A SparseCNN encoder and three transformer-decoder paths generate vertices, edges, and faces with predicted presence, geometry, and mutual topology.The paths exchange context across element groups to support coherent B-Rep structures.Source: §4.1 · p. 5
- Hypernetworks map canonical curve and patch domains to spatial geometry, providing a unified representation across primitive types.This explicit generation accommodates algebraic surfaces and freeform splines without online fitting during the network forward pass.Source: §4.1 · p. 6, Figure 4 · p. 7
- Explicit adjacency prediction complements geometric proximity, helping encode topology when clutter makes proximity alone ambiguous.The paper reports that explicit topology modeling enhances structurally valid B-Rep reconstruction compared with implicit topology from proximity.Source: §4.1 · p. 7
4.2 Loss Functions
- Training matches unordered generated element sets to ground truth by bipartite matching, using a cost similar to the loss to stabilize correspondences across iterations.Matched elements receive geometry and type supervision, while topology is compared for matched elements.Source: §4.2 · pp. 7–8
- Matching omits binary topology predictions because including them would create an intractable quadratic assignment problem; topology loss and the tri-path design support consistent elements empirically.The matching cost instead uses per-element attributes.Source: §4.2 · p. 7
- The training objective combines detection, primitive-type, geometry-regression, and topology losses, but does not include geometry-topology consistency or topology constraints under full supervision.The authors note these additional targets could support self-supervision when ground-truth labels are missing.Source: §4.2 · pp. 7–8
- Order-preserving point-array distances supervise curves and patches, penalizing irregular shapes that aggregated metrics such as Chamfer distance do not penalize.The matching distances account for curve reversals and patch flips or cyclic shifts where applicable.Source: §4.2 · p. 8
5 NEURALLY GUIDED B-REP RECONSTRUCTION
The reconstruction stage turns probabilistic network predictions into a valid B-Rep structure through constrained optimization, then refines element geometry to fit points while respecting topology. It also uses topology to regularize fitting and assess geometric consistency.
5 NEURALLY GUIDED B-REP RECONSTRUCTION
- Global optimization recovers a valid B-Rep chain complex from uncertain element and topology predictions, balancing predicted likelihoods with structural constraints.The process separates chain-complex extraction from geometric refinement.Source: §5 · p. 8, §5.1 · p. 8
5.1 Chain Complex Extraction
- The extraction objective combines predicted topology probabilities with geometry-proximity fitness for candidate adjacencies.The objective searches for element and relationship variables that form a valid structure while agreeing with predictions and proximity.Source: §5.1 · pp. 8–9
- To make extraction tractable, the method removes candidates below 0.3 validness, linearizes quadratic constraints, and solves an integer linear program.With a 20-minute limit, 3k samples were solved except one; lowering that case’s threshold from 0.3 to 0.1 enabled a solution.Source: §5.1 · p. 9
5.2 Geometric Refinement
- Geometric refinement iteratively fits primitives to input points and adjacent elements while constraining shapes to satisfy the solved topology.Only patches are fitted directly to input points; assigned points beyond distance 0.02 are filtered out.Source: §5.2 · p. 9
- Refinement first fits spline patches, then converts them to predicted primitive types and refits with type constraints, improving initialization for cones and cylinders.Spline fitting avoids reliance on point normals, to which cone and cylinder fitting is sensitive.Source: §5.2 · pp. 9–10
- Boundary types constrain surface axes: cylinder axes align with linear boundaries and meet circular boundaries perpendicularly, while cone axes are perpendicular to circular boundaries.These topological cues can regularize fitting when points are noisy or highly incomplete.Source: §5.2 · p. 10, Figure 5 · p. 10
5.3 Structure Validity Assessment
- The chain-complex representation supports validity assessment by checking whether adjacent elements meet with sufficient geometric accuracy.The check measures corner-to-curve, corner-to-patch, and curve-to-patch distances for topology-designated adjacent pairs.Source: §5.3 · p. 10
6 RESULTS AND DISCUSSION
The results and discussion assess ComplexGen’s reconstruction structure and completeness, including its robustness to noisy and partial inputs and limits in feature detection and out-of-distribution performance. They also examine a geometric mismatch in an otherwise 97%-valid reconstruction and outline possible improvements to element proposals, complex extraction, and geometric refinement.
6.1 Setup
- The experiments use a cleaned ABC subset with 20k training and 3k test models; inference takes 89 ms, while chain-complex extraction averages 545 seconds and refinement 8 seconds.The dataset uses the same split as Sharma et al. 2020 for fair comparisons.Source: §6.1 · p. 10
6.2 Evaluation Metrics
- The evaluation measures primitive detection and type accuracy, topology errors and consistency, and patch fitting accuracy, coverage, recall, and topology fidelity.Detection F-scores use a geometric threshold of 0.1; topology inconsistency measures normalized residuals of the structural equations.Source: §6.2 · pp. 10–12
6.3 Ablation Study
- ComplexNet improves detection accuracy for all three element groups over the separate-decoder baseline, while global optimization produces complete models with zero topology inconsistency.Optimization can slightly change detection accuracy and move topology farther from ground truth; geometric refinement introduces slight F-score decreases from Ours-Topo to Ours-All.Source: §6.3 · pp. 12–13, Table 2 · p. 13
6.4 Comparison
- After filtering high-residual patches, residual error is 0.0088, slightly below HPNet’s lowest, while recall is 81.1% and comparable to the best prior result.Our patch coverage is higher than other compared methods, and our patch-to-patch topology error is generally lower than theirs.Source: Table 3 · p. 13, §6.4 · pp. 13–14
- Compared with PIENET’s sharp-feature curves and corners, ComplexGen’s curves and corners connect into closed patch boundaries and include smooth features needed to delineate patches.The paper presents this as a qualitative comparison because the methods target substantially different outputs.Source: §6.4 · p. 14, Figure 9 · p. 15
6.5 Stress Tests
- Under noisy and partial inputs, ComplexGen is less affected than ParseNet and retains more complete, regularized reconstructions, though its real-scan doorknob prediction is fragmented.Networks trained on synthetic data also process ShapeNet objects, but the doorknob result exposes a training bias toward subtle mechanical-part variations.Source: §6.5 · p. 15, Table 4 · p. 15, Figure 10 · p. 16
6.7 Limitations and Future Work
- The framework is an initial holistic point-cloud approach, but detection can miss small geometric features; the authors propose combining segmentation-based and generative approaches.They note that each implementation step could be improved.Source: §6.7 · p. 15
6.6 Validness Assessment Results
- With a 0.03 distance threshold, many test samples have high validness ratios, and detected violations can pinpoint structural issues in reconstructed models.Issues may stem from network predictions or local optima in chain-complex extraction or geometric refinement; repairing them is future work.Source: §6.6 · p. 15, Figure 12 · p. 16
6.7 Limitations and Future Work
- A 97%-valid example still has a topologically connected curve-and-corner mismatch that is geometrically unrealizable because the curve is predicted as a circular arc.The curve and one corner are redundant relative to ground truth; the model’s lower part is valid and matches ground truth.Source: Figure 13 · p. 16
- First-pass geometric segmentation could guide element proposals, following adaptive proposal generation shown to improve 2D image detection [Meng et al. 2021].Source: §6.7 · p. 16
- Future work can improve complex extraction with input-point correspondences and validation-tuned weights, and geometric refinement with CAD-operation constraints inferred from typed primitives and topology [Lambourne et al. 2021; Xu et al. 2021].Source: §6.7 · p. 16
7 CONCLUSION
ComplexGen represents CAD B-Rep models as chain complexes and generates them from point clouds through learning and optimization. Tests show this structure-rich approach recovers more complete and regular models.
7 CONCLUSION
- ComplexGen represents CAD B-Rep models as chain complexes and generates them from point clouds through learning and optimization.The representation introduces structural constraints intended to enhance model validness.Source: §7 · p. 17
- A three-path transformer network simultaneously generates corners, curves, patches, and their mutual topological relationships.The design improves detection and topology reconstruction over a baseline without topology generation.Source: §7 · p. 17
- Neurally guided optimization finalizes predicted complexes through tractable combinatorial and geometric fitting problems with structural-validness constraints.Source: §7 · p. 17
- Extensive tests on a large dataset demonstrate recovery of more complete and regular CAD B-Rep models.Source: §7 · p. 17
A NETWORK STRUCTURE DETAILS
The network uses a sparse CNN encoder and a tri-path transformer decoder, with hypernetwork-based geometry embeddings and separate projection heads for validness, classification, and topology.
A NETWORK STRUCTURE DETAILS
- The sparse CNN encoder has 22 convolution, pooling, and instance-normalization layers organized with residual blocks.Its sequence includes three 256-channel blocks, a convolution from 256 to 384 channels, pooling, and a 384-channel block.Source: A NETWORK STRUCTURE DETAILS · p. 18
- The tri-path transformer decoder has six layers and eight attention heads per self- or cross-attention operation, with no dropout.The authors report that dropout causes instability for their regression task.Source: A NETWORK STRUCTURE DETAILS · p. 18
- Geometry embedding modules use latent element vectors to generate MLPs that map unit parameter domains to spatial points.The generated MLP has three layers with feature sizes [x, 64, 64, 3], where x is 1 for curves and 2 for patches.Source: A NETWORK STRUCTURE DETAILS · p. 18
- Validness and classification use three-layer MLP projection heads, while topology generation uses fully connected layers and dot-product correlation.The MLP heads have a fixed intermediate dimension of 384; topology heads first project latent vectors to 256 dimensions.Source: A NETWORK STRUCTURE DETAILS · p. 18
B ILP FORMULATION OF THE STRUCTURE EXTRACTION PROBLEM
The formulation replaces quadratic binary-variable products with auxiliary binary variables and linear constraints, yielding a linear-constraint reformulation of the structure-extraction problem.
B ILP FORMULATION OF THE STRUCTURE EXTRACTION PROBLEM
- A binary product xy is represented by a binary variable z constrained by z ≤ x, z ≤ y, and z ≥ x + y − 1.Source: B ILP FORMULATION OF THE STRUCTURE… · p. 18
- The structure-extraction problem is reformulated using binary variables Y and Z with corresponding linear constraints replacing quadratic constraints.Source: B ILP FORMULATION OF THE STRUCTURE… · p. 18
- The displayed constraints bound each Z[i,j,k] by FE[i,j] and EV[j,k] and require it to be at least their sum minus one.Source: B ILP FORMULATION OF THE STRUCTURE… · p. 18
Related papers
Cited by
- GraphCAD: Geometry-Aware Diffusion on Edge-Adjacency Graphs for CAD Generation2026
- SubDGuide: A Modeler-Inspired Agentic Workflow for Mesh-to-SubD Reconstruction2026
- CADFather: Autonomous CAD Reconstruction through Coordinated Tool Use2026
- Learn the Solid, Not the File: Canonical Inputs for Neural Networks on CAD Boundary Representations2026