cs.AIApr 11, 2026

Learning Hierarchical and Geometry-Aware Graph Representations for Text-to-CAD

Authors: Shengjie Gong, Wenjie Peng, Hongyuan Chen, Gangyu Zhang, Yunqing Hu, Huiyuan Zhang, Shuangping Huang, Tianshui Chen

Organizations: South China University of Technology · Zhuzhou CRRC Times Electric Co., Ltd. · Guangdong University of Technology

Abstract

Text-to-CAD code generation is a long-horizon task that translates textual instructions into long sequences of interdependent operations. Existing methods typically decode text directly into executable code (e.g., bpy) without explicitly modeling assembly hierarchy or geometric constraints, which enlarges the search space, accumulates local errors, and often causes cascading failures in complex assemblies. To address this issue, we propose a hierarchical and geometry-aware graph as an intermediate representation. The graph models multi-level parts and components as nodes and encodes explicit geometric constraints as edges. Instead of mapping text directly to code, our framework first predicts structure and constraints, then conditions action sequencing and code generation, thereby improving geometric fidelity and constraint satisfaction. We further introduce a structure-aware progressive curriculum learning strategy that constructs graded tasks through controlled structural edits, explores the model's capability boundary, and synthesizes boundary examples for iterative training. In addition, we build a 12K dataset with instructions, decomposition graphs, action sequences, and bpy code, together with graph- and constraint-oriented evaluation metrics. Extensive experiments show that our method consistently outperforms existing approaches in both geometric fidelity and accurate satisfaction of geometric constraints.

Figures & tables

Appendix figures & tables18 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. HierCAD: Hierarchical Text-to-CAD Design via Structure Alignment and Parameter Grounding

    Jul 13, 2026Jimin Xu, Tianbao Wang, Tao Jin +1Parametric CAD ModelingText-to-CAD Generation

  2. CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification

    Sep 7, 2026Yali Du, Hui Sun, San-Zhuo Xi +1Parametric CAD ModelingText-to-CAD Generation

  3. CADKnitter: Compositional CAD Generation from Text and Geometry Guidance

    Dec 12, 2025Tri Le, Khang Nguyen, Baoru Huang +2Diffusion Model GuidanceParametric CAD Modeling