Work

CADRec: Reconstructing a CAD Sequence Recursively with Localized Geometric Contexts

Year: 2026
Type: article
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. Notably, the robustness of our approach is particularly evident in cross-dataset scenarios: when trained on the limited DeepCAD dataset and tested on the unseen Fusion360 set, our method drastically reduces mean CD, median CD, and IR by 85.8%, 67.2%, and 92.3%, respectively. The code and data for this paper are available on: https://github.com/shinodashx/CADRec.
Language: English
Open Access status: hybrid
OpenAlex ID: W7225614987
FWCI:
Cites: 34
Cited by:
Related to: