TL;DR
CADENA is a novel AI framework that reverse-engineers 3D meshes into editable, parametric CAD programs by generating operations one step at a time. By executing the code and inspecting the intermediate geometry at every step, it mimics human engineers and prevents early errors from compounding silently.
What Problem Does This Paper Address?
Converting raw 3D geometry (like scanned meshes or legacy files) into editable, parametric CAD models is a bottleneck in modern engineering. Without a parametric history, engineers cannot easily modify a part—there are no handles to widen a bore or lengthen a bracket.
Most existing AI approaches attempt to solve this by generating the entire CAD program in a single pass. This leads to two major failures:
- Compounding Errors: An error made early in the program text ruins the rest of the geometry because the model never checks its intermediate work.
- Corpus Bias: Single-pass models heavily condition on the text statistics of their training data rather than the actual geometric requirements of the shape in front of them.
Additionally, the community lacks realistic benchmarks; existing datasets are dominated by simple "sketch-and-extrude" shapes that do not reflect real-world mechanical engineering.
Methods
CADENA (Spanish for "chain") reformulates CAD reconstruction as a sequential decision problem. Instead of predicting a massive block of code, it appends one operation at a time, executes it, and evaluates the remaining residual geometry.
Key components include:
- Visual Feedback Loop: The target mesh and the current partial build are rendered together from eight viewpoints into a single multi-view image. The target uses the green channel and the current build uses the red channel. Mismatches are instantly recognizable: yellow indicates overlap, green shows missing geometry, and red highlights excess material.
- Hint Points: To guide the model when multiple disconnected discrepancies exist, the system provides a 3D coordinate "hint point" near the boundary of the next region to modify.
- Single-Variable DSL: The model utilizes a specialized CadQuery-based Domain Specific Language where every operation consumes and rebinds a single running variable
r(e.g.,r = extrude(r, ...)). This design ensures that any step is a well-formed continuation of any prefix, freeing the model from tracking complex variable names and allowing it to focus purely on geometry. - Training Pipeline: The vision-language backbone (Qwen2-VL-2B) is first trained via Supervised Fine-Tuning (SFT) on millions of synthetic step-by-step operations. It is then optimized using online Reinforcement Learning (RL) via Group Relative Policy Optimization (GRPO), using executed volumetric Intersection-over-Union (IoU) as the reward signal.
Datasets
The authors evaluated CADENA across several standard and newly introduced benchmarks:
- CADENA-Bench: A new benchmark introduced in this paper containing 3,396 unique real mechanical parts filtered from industrial corpora (MCB, TMCAD, CADNet). The parts are deduplicated and classified into six distinct engineering families (e.g., shafts & bushings, gears & bearings, housings & frames).
- Standard Datasets: DeepCAD, Fusion 360 Gallery, and MCB.
- BenchCAD: Used for direct comparison against commercial frontier models.
Key Insights and Ideas
- Geometry Over Code Text: By conditioning the model on the geometric residual rather than the history of the code tokens, CADENA breaks free from dataset biases. For instance, it naturally opens with a
revolveoperation for rotationally symmetric parts and anextrudeoperation for prismatic ones, purely based on the shape it sees. - Test-Time Selection: Because every intermediate state is an executable solid, the model can score its own chain of modifications during inference. If a late operation degrades the shape, the system gracefully rolls back and returns the historical prefix that maximized the geometric match.
- Generalized Match Score (GMS): The authors introduce GMS, a metric that matches points by both position and surface normal. Standard metrics like IoU can be fooled by a voxelized block that fills the same volume as a cylinder; GMS ensures that surface types actually match, proving that the underlying CAD tree structure is correct.
Key Results
- State-of-the-Art Accuracy: CADENA-RL outperforms all prior learned methods across all five evaluated datasets. On the challenging CADENA-Bench, it achieves an overall IoU of 87.57% and a GMS of 66.95%.
- High Reliability: Unlike other baselines that frequently output unbuildable or corrupted code on complex parts, CADENA-RL maintains an exceptionally low invalid rate (1.6% on CADENA-Bench and under 1.2% on external datasets).
- Outperforming Frontier Models: When tested on BenchCAD, CADENA-RL achieved a voxel IoU of 0.910, substantially outperforming general-purpose frontier models like GPT-5 Sol (0.706) and Gemini 3.1 Pro (0.355).
Limitations and Future Work
- Countable Features: The model struggles with highly repetitive, discrete features. For example, it frequently gets the exact number of gear teeth wrong because missing a single tooth provides too weak of a geometric error signal to trigger a correction.
- Occluded Geometry: Because the visual feedback relies on an 8-view rendering protocol, internal cavities, blind holes, and severe undercuts remain invisible to the model. Incorporating a point-cloud modality is suggested as a next step.
- Inference Speed: Executing a CAD kernel and re-rendering multi-view images at every single step makes CADENA computationally heavier and slower than traditional single-pass models.
Summary updated