研究人员使用Claude Opus 5 AI代理分别采用CadQuery和OpenSCAD两种代码优先CAD工具完成三个3D打印部件的建模任务,对比这两种工具在自主生成功能零件中的表现1。本次测试涉及六个AI代理、三个建模任务,所有生成的STL文件均经过独立解析器验证1。使用的工具版本为CadQuery 2.8.0(Python 3.14)和OpenSCAD 2026.06.121。
三个任务分别为L型支架、两部分卡扣式外壳和M24x2螺纹软管接头1。在迭代次数上,两种工具表现相当,均完成了11个版本1。然而,具体表现存在差异:L型支架任务中,OpenSCAD仅用两个版本完成,而CadQuery则在单个圆角操作失败(.fillet(3.0))上耗费了约三分之一的时间1。两部分卡扣式外壳任务中,CadQuery用5个版本完成,OpenSCAD则需8个版本;其中CadQuery的参数链功能便于维度关联1。螺纹接头任务中,OpenSCAD一次编译成功耗时43毫秒,但CadQuery第一版本中union()操作静默丢弃了几何体,导致体积错误(7065立方毫米对比预期的10323立方毫米)1。
测试发现两种工具的自我验证机制均不可信:CadQuery报告有效性为真但存在体积错误,OpenSCAD则认证了包含非流形边和零面积三角形的STL文件1。渲染图像对问题检测的帮助有限,相比之下,体积、角度和干涉等数值检查才是识别缺陷的关键1。几何重计算速度方面,OpenSCAD快16毫秒而CadQuery耗时1.9秒,但在AI代理循环中这一差异并不显著1。研究团队认为验证能力和数值断言比语法便利性更为重要,决定继续采用OpenSCAD但将补充数值检查机制1。
Researchers conducted a comparative evaluation of two code-first CAD tools by deploying six AI agents powered by Claude Opus 5 to complete three 3D-printing component modeling tasks using CadQuery and OpenSCAD respectively 1. All output STL files were validated through independent parsers, with CadQuery running version 2.8.0 on Python 3.14 and OpenSCAD using version 2026.06.12 1. The three tasks encompassed an L-shaped bracket, a two-part snap-fit enclosure, and an M24x2 threaded hose connector 1.
Both tools generated printable and functionally correct parts across the benchmark, but exhibited markedly different failure modes 1. CadQuery failures were explicit and early, typically manifesting as exceptions that halted execution—notably, one task encountered a .fillet(3.0) error that consumed approximately one-third of the tool's iterations 1. OpenSCAD failures, by contrast, were silent and late-stage: in the threaded connector task, OpenSCAD completed compilation in 43 milliseconds on its first attempt but produced a geometry with incorrect volume due to a union() operation that silently discarded components, registering 7,065 cubic millimeters instead of the expected 10,323 cubic millimeters 1. The CadQuery enclosure required five iterations while OpenSCAD needed eight, though CadQuery's parametric chaining proved advantageous for dimensional relationships 1. OpenSCAD completed the bracket in just two versions 1.
Both tools' self-validation mechanisms proved unreliable for agentic workflows 1. CadQuery reported valid=True despite the volume discrepancy, while OpenSCAD certified STL files containing non-manifold edges and zero-area triangles 1. The research found that numerical assertions—volume checks, angular measurements, and interference detection—were far more critical than rendering visualization or syntax convenience for catching defects 1. Despite OpenSCAD's 16-millisecond geometric recomputation advantage over CadQuery's 1.9-second cycle, the differential had negligible impact within agent iteration loops 1. The ModelRift team concluded that OpenSCAD would remain their primary tool but would be augmented with numeric validation mechanisms to detect silent failures 1.
评论
还没有评论,欢迎留下第一条。