TL;DR
CADMAGEDDON is an open-source agentic system that reconstructs high-fidelity, editable CAD models from raw triangle meshes. By combining a mid-sized vision-language model (Qwen2.5-Coder-32B, referred to in the paper as Qwen3.8-27B) with precise geometric fitting tools, it outperforms even cloud-based frontier models while running entirely on local hardware like a single GPU or a modern laptop.
What Problem Does This Paper Address?
In engineering, parts are often shared as "dumb" meshes—collections of triangles that lack the feature-level history (sketches, extrusions, holes) required for parametric editing. While engineers need to reconstruct these into editable CAD models, the process is currently manual and tedious.
Existing automated solutions face a "trilemma":
- Accuracy vs. Intent: Learned models that generate code in one pass often lack numerical precision, while direct geometric fitting methods often misinterpret the "design intent" (e.g., turning a single complex feature into many tiny, uneditable ones).
- Complexity: Most training data consists of simple "sketch-extrude" shapes, causing models to fail on real-world mechanical parts like gears or impellers.
- Privacy: Many state-of-the-art systems rely on massive cloud-based APIs (like GPT-4o). For companies working with proprietary designs, uploading sensitive geometry to an external server is a non-starter.
Methods
CADMAGEDDON adopts an agentic approach that separates high-level structural reasoning from low-level geometric precision. Instead of asking a model to guess coordinates, the system uses a loop:
- Geometric Instruments: Algorithmic tools analyze the target mesh to detect "named entities"—planes, cylinders, hole patterns, and cross-section levels. These tools fit parameters (like a cylinder's radius) with mathematical precision.
- Visual Reasoning: A Vision-Language Model (VLM) acts as the "engineer." It views renders of the mesh and the current reconstruction, then issues commands using the names provided by the instruments (e.g., "extrude profile R0 to level E1").
- Iterative Refinement: After each step, the system calculates a "residual"—a visual map of what volume is still missing (green) or what is in excess (red). The agent uses this feedback to add new features or correct previous mistakes.
The system is designed to be lightweight, using FP8 weights to fit the model onto a single 48GB GPU, making local inference viable for most engineering firms.
Datasets
The authors evaluated CADMAGEDDON across five major benchmarks to ensure robustness:
- DeepCAD & Fusion 360: Standard datasets consisting of human-authored construction sequences.
- MCB (Mechanical Components Benchmark): A collection of real-world mechanical parts.
- BenchCAD & BenchCAD-2: Industrial part families designed to test frontier models.
- CADENA-Bench: A deduplicated corpus used to evaluate surface-level reconstruction quality.
Key Insights and Ideas
- Tools Over Scale: The researchers found that a mid-sized, locally-run model equipped with the right geometric "instruments" can outperform much larger frontier models that lack specialized CAD tools.
- Naming is Power: By creating a small grammar for geometric entities (e.g.,
F#for surfaces,C#for hole stacks), the agent can communicate complex design choices without needing to predict precise floating-point numbers, which is a known weakness of LLMs. - Residual-Driven Correction: The ability to "undo" or "replace" features based on visual volume discrepancies allows the agent to recover from early errors, a capability missing in most single-pass reconstruction models.
- Workflow Integration: Unlike many research projects that output proprietary formats, CADMAGEDDON writes both CadQuery and native FreeCAD code, allowing the results to be dropped directly into existing professional workflows.
Key Results
CADMAGEDDON achieved state-of-the-art results across the board, particularly on complex mechanical parts where surface structure is critical.
- Superior Accuracy: It reached the highest Intersection over Union (IoU) and Generalized Match Score (GMS) on all five benchmarks. On the MCB dataset, GMS rose from 0.705 (prior best) to 0.818.
- Beating Frontier Models: On BenchCAD, CADMAGEDDON achieved a 0.991 IoU, surpassing the self-reported scores of frontier models like Claude 3.5 Sonnet (0.963) even when those models were given access to similar tools.
- Reliability: It significantly reduced the "invalid rate" (parts where the system fails to produce any geometry), leaving at most 0.67% of parts without a reconstruction, compared to ~20% for some optimization-based baselines.
Limitations and Future Work
- Clean Input Requirement: The system currently assumes a "clean" mesh. It does not yet handle noisy scans from real-world 3D scanners or meshes with missing regions.
- Single Parts Only: The current iteration focuses on individual parts; reconstructing complex assemblies remains a future challenge.
- Speed: Because it relies on an iterative loop (30–60 model calls per part), it is slower than single-pass learned models.
- Design Intent: While the output is editable, the system currently uses literal values for dimensions rather than inferring high-level parametric relationships (e.g., "this hole should always be centered on this face").
Summary updated