让AI生成的CAD代码不仅外形对,还符合设计意图。
CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification

- 用约束意图树显式表达设计逻辑和层级关系
- 通过对比实际代码与预期约束,发现并修复设计错误
- 适合需要可编辑、可验证的复杂零件设计场景
自然语言驱动的计算机辅助设计(CAD)代码生成旨在将设计意图转化为可执行、可编辑的参数化程序。大型语言模型(LLMs)使这一目标日益可行,但实用系统必须保留生成几何体背后的构建过程。现有基准和方法多关注生成的CAD模型与参考几何体的匹配程度,常使用交并比(IoU)等指标。这类指标容易忽略零件分解、构造层次、布尔运算、草图结构和几何关系中的错误。为此,本文提出CIT-CAD框架,从输入描述中推断出约束意图树(CIT),显式表示所期望的实体、层级、操作和关系。该树兼具指导代码生成与定义验证约束双重作用。系统从生成的程序中提取实际约束,与预期约束对比,利用不一致定位并修复设计违规。实验表明,该框架提升了CAD生成性能,尤其在更复杂的多实体设计中提升显著。本工作首次将文本到CAD生成从仅关注几何匹配推进到可构建、可验证、可修复的合成范式。
原文摘要 · Abstract (English)
Natural-language Computer-Aided Design (CAD) code generation aims to turn design intent into executable and editable parametric programs. Large language models (LLMs) make this goal increasingly practical, but useful systems must preserve the construction process behind the rendered geometry. Existing benchmarks and methods mostly focus on how closely the generated CAD model matches the reference geometry, often using metrics such as Intersection over Union (IoU). Such metrics can miss errors in part decomposition, construction hierarchy, Boolean operations, sketch structure, and geometric relations. This gap calls for a representation that makes design intent explicit and lets a system check generated code against that intent. We propose CIT-CAD, a framework that infers a Constraint Intent Tree (CIT) from the input description to represent the intended entities, hierarchy, operations, and relations. The tree has two roles: it guides CAD code generation and defines expected constraints for verification. The framework extracts actual constraints from the generated program, compares them with the expected constraints, and uses mismatches to localize and repair design violations. Experiments show that the framework improves CAD generation performance, with larger gains on more complex multi-entity designs. By turning design intent into an explicit and checkable object, this work is the first attempt to move text-to-CAD generation beyond rendered-geometry matching toward construction-aware synthesis, verification, and repair.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。