Lune

NeurIPS2025Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

14 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CADFS: A Big CAD Program Dataset and Framework for Computer-Aided Design with Large Language Models cites Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts
  • CADFS: A Big CAD Program Dataset and Framework for Computer-Aided Design with Large Language Models cites DeepCAD: A Deep Generative Network for Computer-Aided Design Models
  • Pointer-CAD: Unifying B-Rep and Command Sequences via Pointer-based Edges & Faces Selection cites Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts
  • Pointer-CAD: Unifying B-Rep and Command Sequences via Pointer-based Edges & Faces Selection cites ComplexGen: CAD reconstruction by B-rep chain complex generation
  • From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code Generation cites Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts
  • From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code Generation cites DeepCAD: A Deep Generative Network for Computer-Aided Design Models
  • Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts cites Fusion 360 gallery: a dataset and environment for programmatic CAD construction from human design sequences
  • Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts cites DeepCAD: A Deep Generative Network for Computer-Aided Design Models
  • Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive Grounding cites Text2CAD: Generating Sequential CAD Designs from Beginner-to-Expert Level Text Prompts
  • Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive Grounding cites Fusion 360 gallery: a dataset and environment for programmatic CAD construction from human design sequences
  • Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive Grounding cites DeepCAD: A Deep Generative Network for Computer-Aided Design Models
  • CME-CAD: Heterogeneous Collaborative Multi-Expert Reinforcement Learning for CAD Code Generation cites From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code Generation
  • CME-CAD: Heterogeneous Collaborative Multi-Expert Reinforcement Learning for CAD Code Generation cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ComplexGen: CAD reconstruction by B-rep chain complex generation cites DeepCAD: A Deep Generative Network for Computer-Aided Design Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers14

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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 on19

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. DeepCAD: A Deep Generative Network for Computer-Aided Design ModelsRundi Wu, Chang Xiao, Changxi ZhengICCV 2021 · 290 citations
  3. 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
  4. 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
  5. ComplexGen: CAD reconstruction by B-rep chain complex generationHaoxiang Guo, Shilin Liu, Hao Pan, Yang Liu et al.SIGGRAPH 2022 · 106 citations

Related papers

  1. Multi-Agent CAD Code GenerationYang Liu, Daxuan Ren, Yijie Ding, Jianmin Zheng et al.SIGGRAPH 2026
  2. ReCAD: Reinforcement Learning Enhanced Parametric CAD Model Generation with Vision-Language ModelsJiahao Li, Yusheng Luo, Yunzhong Lou, Xiangdong ZhouAAAI 2026 · 4 citations
  3. CAD-Recode: Reverse Engineering CAD Code From Point CloudsDanila Rukhovich, Elona Dupont, Dimitrios Mallis, Kseniya Cherenkova et al.ICCV 2025 · 16 citations
  4. TOOLCAD: Exploring Tool-Using Large Language Models in Text-to-CAD Generation with Reinforcement LearningXing Wu Yifei Gong, Tukang Wenda LiuACL Findings 2026 · 1 citation
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines