CADRec: Reconstructing a CAD Sequence Recursively with Localized Geometric Contexts

Haoxuan Song1Bingchen Yang2Jun Xiao1Haiyong Jiang1,✉

1 University of Chinese Academy of Sciences2 Nanyang Technological University

✉ Corresponding author

ACM TOG (SIGGRAPH Asia 2026)

Diverse blue CAD reconstructions alongside two part hierarchies showing recursive bounding-box prediction, local parts, and assembled CAD shapes.
CADRec reconstructs editable CAD sequences from point clouds through recursive part decomposition and local CADQuery program synthesis. Left: diverse reconstruction results. Right: recursive bounding-box predictions and the corresponding part hierarchies.

Video

CADRec in 20 seconds · Narrated overview · English captions availableDownload video ↓
Video transcript

CADRec reconstructs editable CAD from point clouds. The model uses local geometry to recursively split each shape. We generate CAD code per part, then merge parts in global coordinates. The results are structured, editable CAD sequences for diverse shapes.

Abstract

We present CADRec, a recursive CAD sequence reconstruction framework based on a hierarchically defined CAD DSL. This method addresses two limitations of previous methods. First, the flat, lengthy script representation of LLM-based reconstruction methods hinders generalization and does not take into account the reuse of code snippets. Second, existing one-shot and iterative geometric context encodings lack the structural clues necessary to accurately localize the geometric context for subsequent sequence reconstruction.

CADRec recursively decomposes the input shape into spatially localized parts and reconstructs each part with a local CADQuery program based on a hierarchical CAD DSL. At each node of the hierarchy, the model decides whether to further split the current part into child parts or stop and synthesize its leaf-level CAD script. The generated local programs are then mapped back to the global coordinate frame and composed into the final CAD model.

This hierarchical formulation turns global CAD reconstruction into a sequence of simpler local part prediction problems, reducing geometric complexity while preserving the structural organization of the design. To support this process, we encode localized point-cloud context and use an MLLM-based decoder to predict decomposition decisions and CAD programs. We further train the model with geometry-aware objectives that encourage consistent part decomposition and spatially grounded predictions.

Experiments on standard CAD reconstruction benchmarks demonstrate that CADRec improves both geometric fidelity and program validity over prior sequence- and code-based baselines.

Abridged from the paper. See the full paper for the complete abstract and experimental details.

Method

Given an input point cloud, CADRec recursively decomposes the shape into spatially localized parts. At each node, a shared model decides whether to split the current part into child parts or stop and generate its local CADQuery program. The predicted programs are transformed back to the global coordinate frame and composed into an editable CAD model.

Recursive pipeline: a point encoder and text tokenizer condition Qwen2-VL-2B, which predicts SPLIT with child bounding boxes or STOP with a local CADQuery script.
Localized geometry guides both the decomposition decision and the next CAD DSL prediction. Child parts return to the active queue until every leaf is resolved. View full resolution ↗

The localized point cloud is cropped and normalized within the current bounding box, then encoded by Utonia with positional features. Conditioned on these geometric tokens, Qwen2-VL-2B predicts either child bounding boxes and Boolean operations or a leaf-level CADQuery script. Leaf programs are assembled bottom-up through union and difference operations.

Hierarchical CAD Representation and Data Construction

The hierarchical CAD DSL separates structural reasoning from elementary sketch–extrude code, making intermediate parts explicit and reusable.

We convert existing CAD sequences into hierarchical training targets while preserving Boolean dependencies. Each sketch–extrude step becomes a leaf. After resolving difference operations, an overlap graph groups the remaining solids into reusable parts. Large groups are recursively partitioned, with a maximum of six children per group.

Comparison of a flat CAD-Recode script with CADRec's hierarchical DSL, showing nested parts, bounding boxes, and local CADQuery code blocks.
Hierarchical CAD representation. Each non-leaf part stores child bounding boxes and Boolean operations. Each leaf stores an elementary CADQuery code block; post-processing produces the executable global script. View full resolution ↗
Three stages of data construction: the original modeling sequence, grouping order-sensitive cutting dependencies, and assembling an overlap-based part hierarchy.
Data construction. (a) Start with a ground-truth CAD sequence. (b) Group solids with order-sensitive cutting dependencies. (c) Merge according to overlap relationships to build a part hierarchy. View full resolution ↗

Geometry-Aware Training

Contrastive geometry regularization aligns cropped or perturbed observations with the complete geometry of the same part. Box and point-mask grounding encourages predicted boxes to match their local geometric support. Both complement token prediction during training.

Limitations. CADRec currently uses a predefined sketch–extrude grammar and bounding-box localization. Richer CAD operations and more flexible decomposition remain future work.

Reconstruction Results

We evaluate CADRec on DeepCAD and the unseen Fusion360 test set, with both DeepCAD-trained and CAD-Recode-trained models. The following figures compare point-cloud inputs, prior methods, CADRec, and ground-truth geometry. Click a figure to view it at full resolution.

Fusion360 qualitative comparison, with rows for Input, PS-CAD, CAD-Recode, Cadrille, Ours, and ground truth across thirteen shapes.
Fusion360. PS-CAD is trained on DeepCAD; the other methods are trained on CAD-Recode. View full resolution ↗
DeepCAD qualitative comparison of point-cloud inputs, PS-CAD, CAD-Recode, Cadrille, CADRec, and ground-truth CAD models.
DeepCAD. PS-CAD is trained on DeepCAD; the other methods are trained on CAD-Recode. View full resolution ↗

Quantitative Comparison

Results from Table 1 of the paper. Training sets are listed explicitly to distinguish the two evaluation settings. When trained on DeepCAD and tested on Fusion360, CADRec achieves a mean CD of 0.81, an IoU of 85.8%, and an invalid rate of 0.1%.

MethodTraining setDeepCADFusion360
Mean CD ↓Med. CD ↓IoU ↑IR ↓Mean CD ↓Med. CD ↓IoU ↑IR ↓
DeepCADDeepCAD42.59.6446.77.133089.239.925.2
Point2CylDeepCAD10.24.2773.83.94.1867.53.2
HNC-CADDeepCAD10.918.6465.35.613.836.863.57.3
PartCAD#DeepCAD4.930.240.91.131.3
PS-CADDeepCAD2.100.220.45.700.941.5
CAD-RecodeDeepCAD3.370.2578.11.06.450.7266.41.8
CadrilleDeepCAD3.410.2579.40.96.650.5867.11.5
CADRec OursDeepCAD0.620.1792.70.20.810.1985.80.1
CAD-RecodeCAD-Recode0.760.1887.13.81.180.2081.94.4
CadrilleCAD-Recode0.660.1887.12.10.650.1984.41.1
CADRec OursCAD-Recode0.460.1693.30.40.480.1784.70.3

CD values are scaled by 10³. IoU and IR are reported in %. ↓ Lower is better; ↑ higher is better. — Not reported. # Results taken from the original paper. Single-candidate evaluation; see the paper for test-time sampling with 10 candidates.

Additional Reconstruction Results
Additional CADRec reconstructions of diverse shapes outside the standard reconstruction benchmarks.
Additional qualitative results from the paper. View full resolution ↗

BibTeX

If you find this work useful in your research, please consider citing our paper.

@article{song2026cadrec,
  title   = {CADRec: Reconstructing a CAD Sequence Recursively
             with Localized Geometric Contexts},
  author  = {Song, Haoxuan and Yang, Bingchen and
             Xiao, Jun and Jiang, Haiyong},
  journal = {ACM Transactions on Graphics},
  volume  = {45},
  number  = {6},
  articleno = {212},
  year    = {2026},
  month   = dec,
  doi     = {10.1145/3842561}
}