CAD-Coder: Text-to-CAD Generation with Chain-of-Thought and Geometric Reward
Yandong Guan, Xilin Wang, Ximing Xing, Jing Zhang, Dong Xu, Qian Yu
Abstract
In this work, we introduce CAD-Coder, a novel framework that reformulates text-to-CAD as the generation of CadQuery scripts - a Python-based, parametric CAD language. This representation enables direct geometric validation, a richer modeling vocabulary, and seamless integration with existing LLMs. To further enhance code validity and geometric fidelity, we propose a two-stage learning pipeline: (1) supervised fine-tuning on paired text-CadQuery data, and (2) reinforcement learning with Group Reward Policy Optimization (GRPO), guided by a CAD-specific reward comprising both a geometric reward (Chamfer Distance) and a format reward. We also introduce a chain-of-thought (CoT) planning process to improve model reasoning, and construct a large-scale, high-quality dataset of 110K text-CadQuery-3D model triplets and 1.5K CoT samples via an automated pipeline. Extensive experiments demonstrate that CAD-Coder enables LLMs to generate diverse, valid, and complex CAD models directly from natural language, advancing the state of the art of text-to-CAD generation and geometric reasoning.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a1f30965-fbbd-4ce4-aa14-2bee4b64cd82Cited by top-tier papers14
- CME-CAD: Heterogeneous Collaborative Multi-Expert Reinforcement Learning for CAD Code GenerationKe Niu, Haiyang Yu, Zhuofan Chen, Zhengtao Yao et al.CVPR 2026 · 18 citations
- Pointer-CAD: Unifying B-Rep and Command Sequences via Pointer-based Edges & Faces SelectionDacheng Qi, Chenyu Wang, Jingwei Xu, Tianzhe Chu et al.CVPR 2026 · 10 citations
- Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive GroundingJiahao Li, Qingwang Zhang, Qiuyu Chen, Guozhan Qiu et al.ICML 2026 · 7 citations
- From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code GenerationKe Niu, Haiyang Yu, Zhuofan Chen, Mengyang Zhao et al.AAAI 2026 · 5 citations
- CADFS: A Big CAD Program Dataset and Framework for Computer-Aided Design with Large Language ModelsVladislav Pyatov, Gleb Bobrovskikh, Saveliy Galochkin, Nikita Boldyrev et al.CVPR 2026 · 4 citations
Builds on18
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- DeepCAD: A Deep Generative Network for Computer-Aided Design ModelsRundi Wu, Chang Xiao, Changxi ZhengICCV 2021 · 290 citations
- Fusion 360 gallery: a dataset and environment for programmatic CAD construction from human design sequencesKarl D. D. Willis, Yewen Pu, Jieliang Luo, Hang Chu et al.SIGGRAPH 2021 · 197 citations
- Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text PromptsMohammad Sadil Khan, Sankalp Sinha, Talha Uddin Sheikh, Didier Stricker et al.NeurIPS 2024 · 148 citations
- ComplexGen: CAD reconstruction by B-rep chain complex generationHaoxiang Guo, Shilin Liu, Hao Pan, Yang Liu et al.SIGGRAPH 2022 · 106 citations
Related papers
- Multi-Agent CAD Code GenerationYang Liu, Daxuan Ren, Yijie Ding, Jianmin Zheng et al.SIGGRAPH 2026
- ReCAD: Reinforcement Learning Enhanced Parametric CAD Model Generation with Vision-Language ModelsJiahao Li, Yusheng Luo, Yunzhong Lou, Xiangdong ZhouAAAI 2026 · 4 citations
- CAD-Recode: Reverse Engineering CAD Code From Point CloudsDanila Rukhovich, Elona Dupont, Dimitrios Mallis, Kseniya Cherenkova et al.ICCV 2025 · 16 citations
- CADMate: Generating CAD Assembly Plan with Geometric Chain-of-Thought and Spatial Physical RewardsJiali Chen, DingBa Fu, Xusen Hei, Yuhang Liu et al.ACL 2026
- Op-CAD: Benchmarking and Investigating Operation-oriented CAD GenerationYixue Bai, Yufei Gu, Zeke XieICML 2026
