arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2505.19713cs.GR
收藏

CAD-Coder:基于链式思维和几何奖励的文本到CAD生成

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

The University of Hong Kong(香港大学)

Yandong Guan, Xilin Wang, Ximing Xing, Jing Zhang, Dong Xu, Qian Yu

AI总结:

CAD-Coder将文本到CAD生成转化为CadQuery脚本生成,通过监督微调和强化学习提升代码有效性与几何精度,实现LLM直接生成复杂CAD模型。

摘要:

本文介绍了CAD-Coder,一种将文本到CAD生成转化为CadQuery脚本生成的新框架。该表示方法使直接几何验证、更丰富的建模词汇和无缝集成现有LLM成为可能。为增强代码有效性和几何精度,我们提出两阶段学习流程:(1)在配对文本-CadQuery数据上进行监督微调,(2)使用组奖励策略优化(GRPO)的强化学习,由包含几何奖励( Chamfer距离)和格式奖励的CAD特定奖励引导。我们还引入了链式思维(CoT)规划过程以提高模型推理能力,并通过自动化流程构建了包含11万文本-CadQuery-3D模型三元组和1500个CoT样本的大型高质量数据集。大量实验表明,CAD-Coder使LLM能够直接从自然语言生成多样、有效且复杂的CAD模型,推动了文本到CAD生成和几何推理的前沿发展。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑