Benchmark: CadQuery vs. OpenSCAD for agentic CAD work
Source Entity
Hacker News

A controlled study comparing AI agent performance in CadQuery and OpenSCAD reveals both tools can successfully generate printable parts. While both achieved parity in output, the study highlights critical differences in failure modes during autonomous CAD modeling.
The Evolution of Agentic CAD: A Comparative Study
Recent advancements in generative AI have begun to bridge the gap between human-led engineering and autonomous design. A recent controlled study evaluated the efficacy of six AI agents tasked with modeling three printable parts using two distinct code-first CAD toolchains: CadQuery and OpenSCAD. The study aimed to move beyond aesthetic preference, focusing strictly on the functional capability of AI agents to produce valid, printable, and error-free geometry without human intervention.
Understanding the Toolchains
To analyze the results, one must understand the architectural differences between the two systems. OpenSCAD, the long-standing standard for code-first CAD, utilizes a constructive solid geometry (CSG) approach. In contrast, CadQuery is a Python-based library built upon the OpenCascade B-rep kernel. While OpenSCAD is often praised for its simplicity, CadQuery offers the robustness of industry-grade B-rep modeling, which theoretically provides more precision for complex engineering tasks.
The Methodology of Verification
Crucially, the study implemented a rigorous verification process by utilizing an independent parser that trusted neither tool. This objective verification is vital in agentic workflows, where AI models can often produce 'hallucinated' geometry that appears correct in a viewer but fails in slicer software. By subjecting all outputs to an independent STL check, the researchers ensured that the success metrics were based on real-world printability rather than visual approximation.
Failure Modes and AI Reliability
While all six agents successfully produced printable parts in both environments, the study noted that the fundamental difference lies in how these tools fail. In an autonomous environment, the ability of a system to provide meaningful feedback or self-correct is paramount. The study suggests that while both toolchains are capable of handling the tasks, the underlying kernels dictate the specific types of errors an agent might encounter, which is a critical consideration for those building automated design pipelines.
Broader Implications for Automated Engineering
This experiment represents a significant milestone in agentic CAD. As AI agents become more deeply integrated into the manufacturing process, the ability to rely on deterministic code-first CAD tools becomes a competitive advantage. The findings suggest that the industry is moving toward a future where AI can reliably handle iterative design tasks, provided the underlying CAD kernel is robust enough to support the agent's logic.
Conclusion
The study confirms that both CadQuery and OpenSCAD are viable candidates for AI-driven design, achieving a 100% success rate for the given tasks. However, as developers continue to refine these agents, the choice of toolchain will likely depend on the specific engineering requirements of the parts being modeled. The focus must now shift toward optimizing these agentic workflows to handle increasingly complex geometries while minimizing the specific failure modes identified in this comparative analysis.