arXiv:2603.26512cs.AI2026-03被引 11

用程序化验证闭环提升大模型生成CAD的精度与可靠性

CADSmith: Multi-Agent CAD Generation with Programmatic Geometric Validation

  • 多智能体架构生成代码,通过内外层循环迭代修正几何错误
  • 执行成功率100%,平均点云距离降至0.74,指标全面超越基线
  • 适合需要高精度工程建模的自动化设计场景

现有文本转CAD方法要么单次生成无几何校验,要么依赖损失严重的视觉反馈,无法发现尺寸错误。我们提出CADSmith,一个从自然语言生成CadQuery代码的多智能体流程。该系统通过双重纠错循环迭代优化:内层修复执行错误,外层基于程序化几何验证,结合OpenCASCADE内核的精确测量(边界框尺寸、体积、实体有效性)与独立视觉-语言模型的全局形状评估,实现数值精度与整体结构感知的统一。系统采用API文档检索增强生成,不依赖微调,可随底层CAD库更新保持同步。在包含100个提示的自定义基准上,分三个难度层级(T1-T3),三种消融配置下评估。相比零样本基线,CADSmith达到100%执行率(提升至95%),中位F1分数由0.9707升至0.9846,中位交并比从0.8085增至0.9629,平均切比雪夫距离从28.37降至0.74,证明闭环反馈与程序化几何验证能显著提升大模型生成CAD模型的质量与可靠性。

原文摘要 · Abstract (English)

Existing methods for text-to-CAD generation either operate in a single pass with no geometric verification or rely on lossy visual feedback that cannot resolve dimensional errors. We present CADSmith, a multi-agent pipeline that generates CadQuery code from natural language. It then undergoes an iterative refinement process through two nested correction loops: an inner loop that resolves execution errors and an outer loop grounded in programmatic geometric validation. The outer loop combines exact measurements from the OpenCASCADE kernel (bounding box dimensions, volume, solid validity) with holistic visual assessment from an independent vision-language model Judge. This provides both the numerical precision and the high-level shape awareness needed to converge on the correct geometry. The system uses retrieval-augmented generation over API documentation rather than fine-tuning, maintaining a current database as the underlying CAD library evolves. We evaluate on a custom benchmark of 100 prompts in three difficulty tiers (T1 through T3) with three ablation configurations. Against a zero-shot baseline, CADSmith achieves a 100% execution rate (up from 95%), improves the median F1 score from 0.9707 to 0.9846, the median IoU from 0.8085 to 0.9629, and reduces the mean Chamfer Distance from 28.37 to 0.74, demonstrating that closed-loop refinement with programmatic geometric feedback substantially improves the quality and reliability of LLM-generated CAD models.

CAD生成多智能体程序验证大模型应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。