CAD-from-Code: A Programmatic Data Engine for CAD Synthesis and Deterministic Evaluation
Organizations: Alibaba Group (alibaba-inc.com) · Tsinghua University (tsinghua.edu.cn) · The Hong Kong University of Science and Technology (hkust-gz.edu.cn)
Abstract
High-quality data for 3D computer-aided design (CAD) are difficult to scale because geometry, engineering drawings, annotations, and assembly semantics are often created separately. We introduce CAD-from-Code, a programmatic data engine that compiles shared executable recipes and random seeds into validated boundary-representation (B-Rep) parts, dimensioned drawings, structured annotations, and multi-part assemblies. This shared generative specification defines ground truth, controls geometric complexity and diversity, and enables deterministic replay and provenance tracing. Stage-wise validation checks verify geometric validity, task consistency, and assembly constraints. The framework rapidly generates feature-rich cases with higher average geometric complexity than the expert reference sample, without per-case expert design or LLM-generated reference answers. We construct benchmark covering 3D CAD reconstruction, annotation recovery, and assembly, with a deterministic offline evaluator requiring no LLM judges. Six LLM-based agents achieve overall scores of 0.293-0.727, revealing differences in model capabilities. On reconstruction tasks, synthetic and expert-designed cases yield similar overall mean scores and model performance trends. These results support low-cost, reproducible generation of CAD evaluation tasks with verifiable ground truth.
Figures & tables
| Work | Construction and validation | GT | Local | Asm. | Ann. | JF | Diag. |
| CAD representations and program synthesis | |||||||
| CAD-Recode [ 17 ] | Procedural sketch–extrude programs | – | – | – | |||
| Zero-to-CAD [ 1 ] | Agent synthesis; execution, geometry, export gates | – | – | – | – | ||
| CADSmith [ 2 ] | Agent synthesis; kernel feedback and VLM refinement | – | – | – | |||
| Task construction and artifact evaluation | |||||||
| Text2CAD-Bench [ 21 ] | Expert-curated text-to-CadQuery tasks | – | – | – | |||
| Track | Tasks | Representative engineering content | Capability tested |
|---|---|---|---|
| Drawing-to-STEP | 44 | Shafts, splines, gears, flanges, perforated plates, brackets, and multi-feature parts | Recover absolute dimensions, topology, feature layout, and local interfaces |
| Assembly reconstruction | 13 | Compound transmissions, modular engineering workstations, and manufacturing-platform frames | Recover component inventory, poses, mates, and consistent multi-part geometry |
| Annotation recovery | 28 | Linear and angular dimensions, radii, diameters, chamfers, and compound feature callouts | Localize annotations, interpret engineering symbols, and recover numerical fields |
| Metric | Synth. | Expert | Change |
|---|---|---|---|
| B-Rep faces | 188.8 | 135.3 | |
| Small-face fraction | 11.6% | 6.2% | |
| Distinct supporting planes | 65.5 | 25.4 | |
| Planar orientation families | 21.9 | 6.2 | |
| Surface types | 4.60 | 4.00 | |
| Boundary-curve types | 3.63 | 3.23 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Public input | Hidden ground truth | Submission |
|---|---|---|---|
| Drawing-to-STEP | Engineering drawing and task instructions | Exact STEP/B-Rep, topology, and interface regions | output.step |
| Annotation recovery | Model STEP, masked drawing, and difficulty-dependent slot hints | Complete annotation records and full annotated drawing | predictions.json |
| Assembly reconstruction | Assembly drawings, BOM, instructions, and unplaced local-coordinate part STEP files | Final poses, mates, connectors, contacts, DOF, and assembled STEP | submission.json and output.step |
| Model | Model identifier | Agent harness |
|---|---|---|
| GPT-6.1 Sol | gpt-6.1-sol | Claude Code 2.1.308 |
| Gemini 4 Argon | gemini-4-argon | OpenCode 1.19.4 |
| Claude Opus 5.5 | claude-opus-5-5 | Claude Code 2.1.308 |
| DeepSeek V4.1 Flash | deepseek-v4.1-flash-1017 | Claude Code 2.1.308 |
| Doubao Seed 2.1 Pro | doubao-seed-2-1-pro-260915 | Claude Code 2.1.308 |
| GLM 5.3 Flash | glm-5.3-flash | Claude Code 2.1.308 |
| System | Drawing-to-STEP | Annotation | Assembly | Overall |
|---|---|---|---|---|
| GPT-6.1 Sol | 0.742 | 0.750 | 0.688 | 0.727 |
| Claude Opus 5.5 | 0.597 | 0.818 | 0.653 | 0.689 |
| Gemini 4 Argon | 0.891 | 0.760 | 0.295 | 0.649 |
| DeepSeek V4.1 Flash | 0.644 | 0.482 | 0.581 | 0.569 |
| GLM 5.3 Flash | 0.631 | 0.227 | 0.241 | 0.367 |
| Doubao Seed 2.1 Pro | 0.326 | 0.198 | 0.354 | 0.293 |
Synthetic Benchmark Generation
Synthetic benchmark generation creates controlled, verifiable evaluation tasks and datasets to test models across diverse settings.
See all 310 papers