# CAD-Coder: Text-to-CAD Generation with Chain-of-Thought and Geometric Reward

arXiv: https://arxiv.org/abs/2505.19713 · HTML: https://mlsanity.com/paper/2505.19713/

## Key facts

- Cited by 56 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 26 May 2025.

## Built on by (most cited first, 30 of 56)

- [Reinforcement Learning Meets Large Language Models: A Survey of Advancements and Applications Across the LLM Lifecycle](https://mlsanity.com/paper/2509.16679/) (2025)
- [Articraft: An Agentic System for Scalable Articulated 3D Asset Generation](https://mlsanity.com/paper/2605.15187/) (2026)
- [CADmium: Fine-Tuning Code Language Models for Text-Driven Sequential CAD Design](https://mlsanity.com/paper/2507.09792/) (2025)
- [CME-CAD: Heterogeneous Collaborative Multi-Expert Reinforcement Learning for CAD Code Generation](https://mlsanity.com/paper/2512.23333/) (2025)
- [cadrille: Multi-modal CAD Reconstruction with Reinforcement Learning](https://mlsanity.com/paper/2505.22914/) (2025)
- [BenchCAD: A Comprehensive, Industry-Standard Benchmark for Programmatic CAD](https://mlsanity.com/paper/2605.10865/) (2026)
- [From Intent to Execution: Multimodal Chain-of-Thought Reinforcement Learning for Precise CAD Code Generation](https://mlsanity.com/paper/2508.10118/) (2025)
- [ReCAD: Reinforcement Learning Enhanced Parametric CAD Model Generation with Vision-Language Models](https://mlsanity.com/paper/2512.06328/) (2025)
- [Pointer-CAD: Unifying B-Rep and Command Sequences via Pointer-based Edges & Faces Selection](https://mlsanity.com/paper/2603.04337/) (2026)
- [CAD-Judge: Toward Efficient Morphological Grading and Verification for Text-to-CAD Generation](https://mlsanity.com/paper/2508.04002/) (2025)
- [Text-to-CAD Evaluation with CADTests](https://mlsanity.com/paper/2605.07807/) (2026)
- [IterCAD: An Iterative Multimodal Agent for Visually-Grounded CAD Generation and Editing](https://mlsanity.com/paper/2606.13368/) (2026)
- [ArtiCAD: Articulated CAD Assembly Design via Multi-Agent Code Generation](https://mlsanity.com/paper/2604.10992/) (2026)
- [Clarify Before You Draw: Proactive Agents for Robust Text-to-CAD Generation](https://mlsanity.com/paper/2602.03045/) (2026)
- [Towards High-Fidelity CAD Generation via LLM-Driven Program Generation and Text-Based B-Rep Primitive Grounding](https://mlsanity.com/paper/2603.11831/) (2026)
- [CADReasoner: Iterative Program Editing for CAD Reverse Engineering](https://mlsanity.com/paper/2603.29847/) (2026)
- [TOOLCAD: Exploring Tool-Using Large Language Models in Text-to-CAD Generation with Reinforcement Learning](https://mlsanity.com/paper/2604.07960/) (2026)
- [Beyond NL2Code: A Structured Survey of Multimodal Code Intelligence](https://mlsanity.com/paper/2606.15932/) (2026)
- [CADFS: A Big CAD Program Dataset and Framework for Computer-Aided Design with Large Language Models](https://mlsanity.com/paper/2605.01925/) (2026)
- [InCoder-32B-Thinking: Industrial Code World Model for Thinking](https://mlsanity.com/paper/2604.03144/) (2026)
- [Embodied CAD: Solver-Grounded LLM Agents for Parametric B-Rep Assembly Modeling](https://mlsanity.com/paper/2606.31252/) (2026)
- [Procedura: Agentic 3D Modeling with Procedural Control](https://mlsanity.com/paper/2608.26238/) (2026)
- [BrepCoder: A Unified Multimodal Large Language Model for Multi-task B-rep Reasoning](https://mlsanity.com/paper/2602.22284/) (2026)
- [GIFT: Bootstrapping Image-to-CAD Program Synthesis via Geometric Feedback](https://mlsanity.com/paper/2603.27448/) (2026)
- [ArtisanCAD: An Industrial-Level CAD Agent with Expert-Grounded Knowledge Distillation](https://mlsanity.com/paper/2607.05750/) (2026)
- [Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agents](https://mlsanity.com/paper/2510.17491/) (2025)
- [ComAct: Reframing Professional Software Manipulation via COM-as-Action Paradigm](https://mlsanity.com/paper/2606.13239/) (2026)
- [CADIR: A Cross-Backend Editable Intermediate Representation for Agentic CAD Generation](https://mlsanity.com/paper/2608.00891/) (2026)
- [CAD-Tokenizer: Towards Text-based CAD Prototyping via Modality-Specific Tokenization](https://mlsanity.com/paper/2509.21150/) (2025)
- [STEP-LLM: Generating CAD STEP Models from Natural Language with Large Language Models](https://mlsanity.com/paper/2601.12641/) (2026)

## Abstract (arXiv)

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.
