PR-CAD: Progressive Refinement for Unified Controllable and Faithful Text-to-CAD Generation with Large Language Models
Authors: Jiyuan An, Jiachen Zhao, Fan Chen, Liner Yang, Zhenghao Liu, Hongyan Wang, Weihua An, Meishan Zhang, Erhong Yang
Organizations: National Language Resources Monitoring and Research Center for Print Media, Beijing Language and Culture University, China · School of Information Science, Beijing Language and Culture University, China · School of Computer Science and Technology, Beijing Jiaotong University, China · School of Computer Science and Engineering, Northeastern University, China · Department of Computer Science and Technology, Tsinghua University, China · School of Computer Science and Technology, Harbin Institute of Technology (Shenzhen), China
The construction of CAD models has traditionally relied on labor-intensive manual operations and specialized expertise. Recent advances in large language models (LLMs) have inspired research into text-to-CAD generation. However, existing approaches typically treat generation and editing as disjoint tasks, limiting their practicality. We propose PR-CAD, a progressive refinement framework that unifies generation and editing for controllable and faithful text-to-CAD modeling. To support this, we curate a high-fidelity interaction dataset spanning the full CAD lifecycle, encompassing multiple CAD representations as well as both qualitative and quantitative descriptions. The dataset systematically defines the types of edit operations and generates highly human-like interaction data. Building on a CAD representation tailored for LLMs, we propose a reinforcement learning-enhanced reasoning framework that integrates intent understanding, parameter estimation, and precise edit localization into a single agent. This enables an "all-in-one" solution for both design creation and refinement. Extensive experiments demonstrate strong mutual reinforcement between generation and editing tasks, and across qualitative and quantitative modalities. On public benchmarks, PR-CAD achieves state-of-the-art controllability and faithfulness in both generation and refinement scenarios, while also proving user-friendly and significantly improving CAD modeling efficiency.
Figures & tables
Figure 1: PR-CAD enables user-friendly and controllable CAD generation through progressive refinement.Below each subfigure is the user’s intended input described via text instructions, with the corresponding CAD model output above. PR-CAD allows users to generate and progressively refine (add, modify, and delete) their designs from scratch. Users can flexibly choose either qualitative or quantitative descriptions of their intent until the model matches their envisioned design.
Figure 2: High-quality data annotation pipeline for generation task. Based on the DeepCAD dataset, it generates both generation instructions and CAD sequence representations. Multimodal large models are utilized to produce quantitative and qualitative CAD generation instructions from nine views and JSON descriptions. Code translation and large language models are applied to convert JSON descriptions into various CAD sequence representations.
Figure 3: Human-like instruction annotation pipeline for CAD model editing task. In the first stage, CAD model pairs are generated by removing S-E operations or loops, forming deletion and addition pairs as training data (as shown in I). Simultaneously, qualitative add instructions are generated based on the deleted portions. Next, using the trained add/delete model, new CAD models are generated based on the above instructions (as shown in II). The resulting new model and the original model form the edited CAD model pair. Finally, the JSON descriptions are converted into editing instructions and sequence representations in the same manner as for generation tasks (Figure 2 ).
Figure 4: Overview of the PR-CAD post-training process. The post-training process consists of two stages: supervised fine-tuning and reinforcement learning. Using the highly human-like interaction data curated earlier, we employ Qwen2.5-7B-Instruction as the base model. First, DeepSeek ( Liu et al., 2024 ) is used to construct a structured chain of thought by analyzing the input and output data. Then, the model is fine-tuned through supervised learning with cross-entropy loss to learn the task patterns. Afterward, reinforcement learning is applied to the fine-tuned model using rewards based on chamfer distance, among others. For generation tasks, the Current CAD Model is initially empty; for editing tasks, chamfer distance is calculated only for the edited portion of the model.
Method
Generation Task
Editing Task
Quantitative
Qualitative
Quantitative
Qualitative
IR ↓
Mean CD ↓
IR ↓
VLM-Eval ↑
IR ↓
Mean CD ↓
IR ↓
VLM-Eval ↑
GPT-4o (zero-shot)
74.22
133.52
66.48
55.85
25.81
23.30
27.76
61.01
GPT-4o (few-shot)
55.95
77.49
49.24
58.91
15.47
15.52
13.47
66.18
Text2CAD
0.97
27.68
3.41
66.35
✗
✗
✗
✗
Text-to-CadQuery
6.62
11.32
✗
✗
✗
✗
✗
✗
Table 1: Comparison of PR-CAD with existing methods for both generation and editing tasks. The evaluation metrics include quantitative measures (IR, Mean CD) and qualitative evaluations (IR, VLM-Eval). PR-CAD significantly outperforms other methods across both tasks, demonstrating superior controllability and model faithfulness. CD values are scaled by 10 3 . ”✗” indicates that the method does not support the corresponding task. ↑: the higher, the better; ↓: the lower, the better. Best performance is highlighted in bold .
Figure 5: Visualization comparison among different methods or models, including the closed-source model GPT-4o relying on context learning capabilities, Text-to-CADQuery for CAD model generation, CAD-Editor designed for CAD editing, and our proposed method.
Interaction Method
Experts
Novices
Success Rate
Avg. Turns
Avg. Time
SUS
Success Rate
Avg. Turns
Avg. Time
SUS
Single-turn Generation
56.25%
1
6’48”
38.125
31.25%
1
9’27”
25.125
Multi-turn Interaction
100%
3.375
3’24”
93.125
81.25%
4.53
5’16”
80.625
Table 2: Human Interaction Results. Comparison of experts and novices using two interaction methods: end-to-end generation and Progressive Refinement. Metrics evaluated include success rate, average number of turns, average time per turn, and System Usability Scale (SUS) scores.
Figure 6: Examples of CAD modeling through multi-turn dialogues. (a) In this step, the specified cube is enlarged based on the earlier description. (b) The next step accurately identifies the cube from the previous operation and completes the enlargement. (c) In this step, the edited cube is identified and moved towards the base edge. (d) Finally, this step precisely undoes all the operations performed in the previous three steps.
Training Strategy
IR
Mean CD
Median CD
VLM-Eval
Qwen2.5-7B
✗
✗
✗
✗
Qwen2.5-7B w/o SFT
✗
✗
✗
✗
Qwen2.5-7B w/o RL
12.67
84.63
6.54
56.44
Qwen2.5-7B w/o SCoT
2.48
11.34
2.08
68.81
Qwen2.5-7B t/o/o Generation
9.45
42.07
5.49
60.56
Qwen2.5-7B t/o/o Editing
6.94
20.05
1.90
65.54
Table 3: Ablation Studies for Post-Tuning LLMs with Various Training Configurations. We assess the impact of different training configurations, including baseline models, reinforcement learning-only fine-tuning (w/o SFT), supervised fine-tuning-only (w/o RL), training without structured reasoning (w/o SCoT), and single-task data training. The notation t/o/o (trained only on) indicates that the model was trained exclusively on one type of data. Best performance is highlighted in bold .
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7: The difference in model performance caused by using different CAD sequence representations, while keeping all other supervised fine-tuning strategies identical. Best performance is highlighted in bold.
Figure 8: Numerical issues due to scaling. The above image shows a typical example where accuracy errors caused by scaling result in internal through-holes, which should have the same radius, displaying ladder.
Figure 9: Robustness Example. When the user requests the outer ring radius to be smaller than the inner ring radius, the model automatically reduces the inner ring radius to ensure the model can generate correctly.
Computer-Aided Design (CAD) is an expert-level task that relies on long-horizon reasoning and coherent modeling actions. Large Language Models (LLMs) have shown remarkable advancements in enabling language agents to tackle real-world tasks. Notably, there has been no investigation into how tool-using LLMs optimally interact with CAD engines, hindering the emergence of LLM-based agentic text-to-CAD modeling systems. We propose ToolCAD, a novel agentic CAD framework deploying LLMs as tool-using agents for text-to-CAD generation. Furthermore, we introduce an interactive CAD modeling gym to rollout reasoning and tool-augmented interaction trajectories with the CAD engine, incorporating hybrid feedback and human supervision. Meanwhile, an end-to-end post-training strategy is presented to enable the LLM agent to elicit refined CAD Modeling Chain of Thought (CAD-CoT) and evolve into proficient CAD tool-using agents via online curriculum reinforcement learning. Our findings demonstrate ToolCAD fills the gap in adopting and training open-source LLMs for CAD tool-using agents, enabling them to perform comparably to proprietary models, paving the way for more accessible and robust autonomous text-to-CAD modeling systems.
Yifei Gong, Xing Wu, Wenda Liu +1
School of Computer Engineering & Science, Shanghai University
We introduce CADFS, a data-centric framework that enables large vision-language models to generate complex CAD design histories. Existing generative CAD systems are restricted to sketch-extrude operations due to simplified representations and limited datasets. We address this by introducing a FeatureScript-based representation and constructing a dataset of 450k real-world CAD models spanning 15 modeling operations. We obtain the dataset via a new pipeline that reconstructs clean, executable FeatureScript programs and provides multimodal annotations. Fine-tuning a VLM on this representation yields state-of-the-art results in text-conditioned CAD generation and image-based reconstruction, producing more accurate, diverse, and feature-rich designs than prior frameworks. Ablations show that each individual component of our framework, i.e., the FeatureScript representation, the extended operation set, and representation-aligned textual descriptions, significantly improves performance. Our framework substantially broadens the complexity and realism achievable in generative CAD. The CADFS framework and the new dataset are available at https://voyleg.github.io/cadfs/.
The field of Computer-Aided Design (CAD) generation has made significant progress in recent years. Existing methods typically fall into two separate categories: parametric CAD modeling and direct boundary representation (B-Rep) synthesis. In modern feature-based CAD systems, parametric modeling and B-Rep are inherently intertwined, as advanced parametric operations (e.g., fillet and chamfer) require explicit selection of B-Rep geometric primitives, and the B-Rep itself is derived from parametric operations. Consequently, this paradigm gap remains a critical factor limiting AI-driven CAD modeling for complex industrial product design. This paper presents FutureCAD, a novel text-to-CAD framework that leverages large language models (LLMs) and a B-Rep grounding transformer (BRepGround) for high-fidelity CAD generation. Our method generates executable CadQuery scripts, and introduces a text-based query mechanism that enables the LLM to specify geometric selections via natural language, which BRepGround then grounds to the target primitives. To train our framework, we construct a new dataset comprising real-world CAD models. For the LLM, we apply supervised fine-tuning (SFT) to establish fundamental CAD generation capabilities, followed by reinforcement learning (RL) to improve generalization. Experiments show that FutureCAD achieves state-of-the-art CAD generation performance. Code and dataset are available at: https://github.com/JohanStackk/FutureCAD