Title: CAD-Coder: Text-to-CAD Generation with Chain-of-Thought and Geometric Reward
Venue: NeurIPS 2025
Accepted: yes
Keywords: CAD generation

text-to-CAD

LLM
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.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nIn this work, the authors 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, the authors 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. They 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.\n\nSTRENGTHS AND WEAKNESSES:\nStrength:\n\n1. The idea is novel. Although the representation, CodeQuery, is not proposed by the authors, using CodeQuery for LLM is reasonable as it makes the LLM easier to learn this format of code.\n\n2. Introducing GRPO into the design of CAD is novel. Since RL is getting more and more attention in the research field of code generation of LLM, introduing into CAD design is reasonable and effective.\n\n3. In line 265-280, the authors have demonstrates the details of implementation, which is very useful for reproduction.\n\n\n\nWeakness:\n\n1. The training curves of GRPO are not shown in the work. Showing how the reward and generation length is growing during training is extremely important in this work.\n\n2. The authors does not show 3D meshes or rendered videos in supplementary results. I think using solely single-view images to demonstrate the results are not very good for demonstrate the full 3D results of this work.\n\n3. Although some baselines are not open-sourced, currently only one baseline (Text2CAD) is compared in Table 1, which makes it not very solid.\n\nQUESTIONS:\n1. How about the failure cases of this method? What is the common failure case of this method looks like?\n\n2. How long does it take to generated a single mesh?\n\n3. How long does it take to train GRPO?\n\nLIMITATIONS:\n1. Currently, the generated shapes are rather simple, compared to SOTA 3D generation results like *Trellis: Structured 3D Latents for Scalable and Versatile 3D Generation*.\n\n2. The method only supports text-to-CAD, instead of sketch-to-CAD.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-06-29"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper bridges text-to-CAD by introducing an intermediate representation in the form of CadQuery scripts and leveraging a large language model to generate CadQuery code from text descriptions. To implement this pipeline, the authors construct data from the Text2CAD dataset by feeding command sequences and text descriptions into a pretrained LLM to generate multiple CadQuery script candidates. These candidates are evaluated by computing the Chamfer Distance between the executed 3D models and the ground-truth models. The input description, the selected CadQuery script, and the corresponding CoT are then assembled into a corpus and used to fine-tune the pretrained LLM. The fine-tuning process follows the standard SFT+GRPO approach, where Chamfer Distance is used as the reward signal in GRPO. Experiments demonstrate the effectiveness of CAD-Coder compared to the original LLMs.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n\n1.\tA solid exploration of CAD code generation using large language models.\n\n2.\tThe metrics demonstrate that the proposed method outperforms the original large language model and Text2CAD in terms of geometry quality and generation success rate.\n\n3.\tThe paper is well-written and easy to follow.\n\nWeaknesses:\n\n1.\tTechnically sound but lacks novelty in the fine-tuning strategy. The paper directly adopts SFT+GRPO for refinement, so the main contribution lies in dataset construction rather than the training method. (However, this does not affect my overall rating.)\n\n2.\tThe experiments do not clearly justify the need for intermediate CadQuery scripts.\n\n3.\tBased on the authors' description, there seems to be some uncertainty in the CadQuery script generation process. Using Chamfer Distance for filtering may also fail in certain cases. This concern is discussed in more detail under the Question section.\n\n4.\tNatural language capabilities and conversation: The paper lacks evaluation of the model’s inherent language understanding abilities.\n\nQUESTIONS:\n1.\tMax sequence length and compactness. Is there an issue with sequence length when using CadQuery scripts? For complex models, such as porous structures, how are long input and output sequences handled? What is the maximum sequence length supported by the LLM?\n\n2.\tUncertainty in data construction. While I fully appreciate the training process (it's clearly explaine), the data construction raises some questions. If I understand correctly, the dataset contains only command sequences and text descriptions, not ground-truth CadQuery code. Instead, the CadQuery code is generated by the LLM and then filtered based on its distance from the ground-truth point cloud. My concern is, shouldn't there be a human review step to ensure the correctness of the scripts? If not, how can the accuracy of the generated CadQuery code be guaranteed?\n\n3.\tWhy not generate CAD commands directly? As a follow-up to the previous question, why not directly generate the command sequence text instead of CadQuery code? Are there any experiments showing that using CadQuery code is superior to generating plain CAD command sequences?\n\n4.\tNatural language capabilities and conversational ability. Compared to prior work like Text2CAD, how well does this method preserve the LLM’s conversational and natural language understanding abilities?\n\nLIMITATIONS:\nAs stated in the conclusion of the paper, the limitations include the lack of multi-modal input support, shallow CoT prompting, and the absence of fine-grained reward mechanisms.\n\nFrom my perspective, I also question the model's interactive capabilities and its ability to perform fine-grained edits.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 5, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 2, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces CAD-Coder, a new framework that translates natural language into CadQuery scripts. It features a two-stage training approach combining supervised learning and reinforcement learning with GRPO, along with a chain-of-thought planning process. The results show that CAD-Coder improves the ability of LLMs to generate accurate, complex CAD models from text.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths:\n1. The paper is well-written and logically structured, with clear explanations.\n2. The proposed method is straightforward and technically sound, with accessible implementation details.\n3. The geometry reward in GRPO training appears to be a notable and reasonable contribution, as it shifts from language-level loss optimization to direct end-to-end optimization of geometric quality.\n4. I think Converting CAD command sequences into CadQuery code is a practical and intuitive approach, enabling direct manipulation of geometric parameters through code.\n\nWeaknesses:\n\n1. Although topological rewards are introduced, quantitative results still do not adequately reflect multi-dimensional indicators, making it difficult to comprehensively assess industrial applicability.\n2. Lacks direct comparison with recent CAD-specific generators (such as CAD-Translator, CAD-LLaMA), somewhat weakening experimental persuasiveness.\n3. RL fine-tuning requires 8×A800 GPUs and 146 hours. The paper does not yet discuss lightweight approaches or migration strategies for small-to-medium models, or impacts on actual deployment.\n\n[1] Cad translator: An effective drive for text to 3d parametric computer-aided design generative modeling. ACM MM 2024.  \n[2] Cad-llama: Leveraging large language models for computer-aided design parametric 3d model generation. CVPR 2025.\n\nQUESTIONS:\nThere are some experimental details that need to be confirmed.\n1. How does the method adapt to multi-component, highly-constrained assemblies (including complex features like rotation, lofting, chamfering, etc.)? What are the anticipated key technical challenges?\n2. After generating \\<think\\> reasoning, how much does the average latency per sample increase? In editing scenarios, how does time consumption scale with script length?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 4, "ORIGINALITY": 4, "DATE": "2025-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents CAD-Coder, a text-conditioned large language model (LLM) for generating CAD models in the form of CadQuery code. The proposed pipeline first undergoes supervised fine-tuning, followed by Group Reward Policy Optimization using a geometry-aware reward based on Chamfer Distance and an auxiliary format-consistency reward. To support training, the authors introduce a dataset of 110k triplets created by translating Text2CAD command sequences into CadQuery code. CAD-Coder achieves lower Chamfer Distance compared to Text2CAD and general-purpose LLMs.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths** \n\n- Text to CAD is rapidly gaining attention and the community needs stronger baselines on popular LLMs. The reviewer thinks that this paper is well aligned with current interests.     \n\n- Switching from CAD token sequences to a Pythonic CAD API such as CADquery brings multiple benefits. CADquery is well suited for generation via LLMs, compact and editable by engineers.     \n\n- The authors adapt proven LLM techniques to CADQuery generation, showing how methods like SFT, CoT, and GRPO can be effectively transferred to structured code tasks, offering useful insights for both CAD and ML research.\n\n\n**Weaknesses**\n \n-  The data synthesis pipeline appears suboptimal. Intuitively, this translation task is not especially difficult, given that the LLM is provided with the full input sequence. However, the quality of the translated data significantly impacts the reported performance throughout the paper. The proposed translation method yields near-identical results for only a small subset of the samples (8k out of 178k with very low Chamfer Distance). The authors themselves note that training on a larger dataset of medium-quality translations leads to worse performance. Moreover, the test set is generated using the same translation pipeline, which fails for a large portion of the data (32k out of 178k, or about 17%). This raises concerns about the fairness of comparisons with Text2CAD, given that the evaluation relies on noisy test data.\n \n-  The quality of the baseline comparisons raises concerns. In the reviewer's experience, GPT models are increasingly capable of generating valid CadQuery code. However, in Table 1, the authors report only a 93% instruction rate (IR) for GPT-4o, which suggests suboptimal prompting, potentially due to inadequate instructions or a lack of in-context examples. Moreover, the paper provides no details on how the LLM baselines were constructed, making it difficult to assess the validity of the comparison.\n \n- The reviewer is also concerned about the results in Table 2, particularly the poor performance of the supervised fine-tuning (SFT) baseline. It is surprising that SFT underperforms, especially considering that Text2CAD, which uses a significantly smaller model than Qwen2.5-7B-Instruct, achieves better results without any reinforcement learning. This discrepancy is also visible in Figure 3, where the SFT variant fails to generate simple geometries in response to straightforward prompts, such as those shown in the first row. These unintuitive results may be linked to the limitations of the data synthesis pipeline.\n\n- Given the paper's focus on Pythonic CAD generation, the proposed data synthesis approach could be extended to other aspects of code quality, such as adding comments, choosing meaningful variable names, or structuring code more clearly.     \n\n- CADAssistant is incorrectly described as using CadQuery, whereas it actually relies on the FreeCAD Python API.\n \n- Authors do not clarify if they will release the constructed CADQuery dataset\n\nQUESTIONS:\n- Could the authors address the concerns on the data synthesis pipeline (first mention weakness above)?\n\n- Could the authors provide details on how the GPT-4o baseline was constructed, including prompt design and use of examples? What explains the relatively low 93% instruction rate, given recent improvements in LLMs?\n\n- Could the authors elaborate on the training setup for the SFT baseline and explain its underperformance, especially in simple cases? Is this potentially linked to limitations in the data synthesis process?\n\nLIMITATIONS:\nThe limitations are addressed in a dedicated paragraph.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-07-02"}