AI news and explainers at 7 AM weekdays, plus a Sunday weekly at 8Get it in your inbox

METAL LAB

CADENA: Stepwise CAD Reverse Engineering

arXiv:2608.007992026-07-31

An AI that reverse-engineers CAD models one build step at a time, checking its work after every move

CADENA turns a 3D mesh (a raw triangle-based shape with no editable structure) back into an editable CAD program, but instead of emitting the whole program in one shot like prior systems, it adds one operation at a time and compares the target shape against what it has built so far before choosing the next step. It does this by feeding a vision-language model a single image that overlays the target and current build from eight viewpoints plus a hint point, predicting and executing one operation per round. The authors also introduce CADENA-Bench, a benchmark of real mechanical parts, and GMS, a surface-matching metric, and report CADENA outperforming prior methods on DeepCAD, Fusion360, MCB, CADENA-Bench, and BenchCAD.

METAL LAB explanatory visual

CADENA's step-by-step CAD reconstruction loop

Evidence statusMeasured results reported

  1. Overlay comparison imageTarget mesh (green) and current partial build (red) are rendered from eight viewpoints into one overlay image, plus a hint point marking where to edit next
  2. Vision-language model predicts next operationThe model looks at this image and hint point and predicts the next single-line CAD command (e.g. extrude, revolve) to append
  3. Execute and updateThe predicted operation is executed to produce a new partial build, and a fresh comparison image is rendered against the target
  4. Repeat and select best stepThis loop repeats up to 20 times; the IoU of every intermediate build against the target is tracked, and the step with the highest IoU is returned as the final program
  5. Training: supervised fine-tuning then RLThe model first learns from a rule-based generator's programs and intermediate shapes, then is refined with reinforcement learning rewarded by the IoU of executed geometry
An explanatory diagram made by METAL LAB, not a figure supplied by the paper's authors.

What they did

  1. Most prior AI systems generate the entire CAD program (the sequence of commands that builds a part) in a single pass without ever checking the intermediate geometry; CADENA instead adds one operation at a time, executes it, and inspects the result before deciding the next step, the way a human engineer would.
  2. At each step, the model renders the target mesh (green) and the current partial build (red) from eight viewpoints into a single overlay image, plus a hint point marking where to modify, and feeds this to an image-to-code vision-language model that predicts the next CAD operation.
  3. Training first uses supervised fine-tuning on programs and intermediate shapes produced by a rule-based generator, then refines the model with online reinforcement learning where the reward is the IoU (volume overlap) between the executed partial build and the target mesh.
  4. The authors built CADENA-Bench, a benchmark of 3,396 real mechanical parts grouped into six part families, and GMS, a new metric that checks whether surfaces match not just in position but also in orientation (normal direction).
  5. At inference, because every partial build is executed and scored against the target, the system returns whichever step along the chain achieved the best IoU, so a bad late step never makes the final result worse.
Figure 1: CADENA overview. The target mesh (green channel) and the current partial prediction (red channel) are rendered into a single aligned multi-view image consisting of six orthographic views (with depth encoded as color intensity) and two isometric views. Predominantly green regions indicate missing geometry, while predominantly red regions indicate excess material. Given this image and a hint point specifying the region to modify, the image-to-code VLM predicts the next operation, which is appended to the program. The updated program is then executed, producing a new partial build, and the process repeats until the stopping criteria are met.
Figure 1: CADENA overview. The target mesh (green channel) and the current partial prediction (red channel) are rendered into a single aligned multi-view image consisting of six orthographic views (with depth encoded as color intensity) and two isometric views. Predominantly green regions indicate missing geometry, while predominantly red regions indicate excess material. Given this image and a hint point specifying the region to modify, the image-to-code VLM predicts the next operation, which is appended to the program. The updated program is then executed, producing a new partial build, and the process repeats until the stopping criteria are met.
Table 1: CAD reverse engineering on external benchmarks. Median CD↓ (×103) at 8k and 30k sampled points, mean IoU↑ (%), GMS↑ (%), and IR↓ (invalid rate, %) on DeepCAD, Fusion360, and MCB. A prediction is invalid if it fails to build or is not watertight; invalid predictions are counted in IR and excluded from all means. All metrics are evaluated in the fixed normalized frame used for all methods; IoU is additionally restricted to parts with watertight ground truth.
DeepCADFusion360MCB
MethodCD8​k↓CD30​k↓IoU↑GMS↑IR↓CD8​k↓CD30​k↓IoU↑GMS↑IR↓CD8​k↓CD30​k↓IoU↑GMS↑IR↓
CAD-Recode0.170.05591.492.97.90.170.06087.285.813.60.660.52471.154.721.5
cadrille0.170.05989.794.80.30.170.06684.886.80.80.850.72066.255.01.5
CADReasoner0.160.04991.094.93.00.150.05086.388.67.21.441.29069.055.231.7
CADEvolve0.160.05092.495.30.90.160.05688.188.22.70.630.50072.958.39.2
CADFit†0.180.05291.489.827.50.170.05488.284.625.60.480.36575.860.129.7
CADENA-SFT0.160.04891.795.32.60.140.04688.890.83.80.430.25975.263.412.0
CADENA-RL0.150.04296.197.00.30.120.03894.193.31.20.220.09388.273.70.7
Figure 2: Stepwise reconstruction by CADENA. Each row follows one part from its first operation to the returned program. Columns are selected steps, annotated with the step index and the IoU of the build against the target at that point; the DSL line emitted at the step appears beneath each panel, and the rightmost column is the ground truth. The three parts are returned after 17, 4 and 16 operations. The model establishes bulk geometry first and adds detail later — teeth, holes and pockets appear only once a body exists to cut them from — and IoU rises along every row, since a prefix that lowers it is never the one selected.
Figure 2: Stepwise reconstruction by CADENA. Each row follows one part from its first operation to the returned program. Columns are selected steps, annotated with the step index and the IoU of the build against the target at that point; the DSL line emitted at the step appears beneath each panel, and the rightmost column is the ground truth. The three parts are returned after 17, 4 and 16 operations. The model establishes bulk geometry first and adds detail later — teeth, holes and pockets appear only once a body exists to cut them from — and IoU rises along every row, since a prefix that lowers it is never the one selected.
Table 2: Per-category GMS↑ on CADENA-Bench (3396 mechanical parts, six part families). GMS is averaged over valid predictions (buildable and watertight), as in Table 1.
Shafts &Gears &Housings &Flat &Springs &Tooling &
MethodbushingsbearingsframesleversfastenersgaugesAll
(762)(749)(359)(464)(1046)(17)(3396)
CAD-Recode53.839.156.158.845.338.748.9
CADReasoner55.646.956.469.743.438.552.9
cadrille57.637.254.562.146.341.849.8
CADEvolve59.641.359.466.447.944.752.9
CADFit†60.861.348.566.242.323.154.8
CADENA-SFT70.847.858.166.851.943.457.8
CADENA-RL73.058.170.776.863.460.067.0
Figure 3: Qualitative comparison across methods. Each row is one input part, labelled with the dataset it comes from; each column is one method, with the target in the rightmost column. The GMS of that single reconstruction is printed beneath each panel. Grey panels mark predictions that failed to build, and predictions that build without being watertight are annotated as such; both count toward the invalid rate and are excluded from the means in Table 1. The failures are not spread evenly — they concentrate on the turned and patterned parts of MCB and CADENA-Bench, which is the same pattern the per-family results show.
Figure 3: Qualitative comparison across methods. Each row is one input part, labelled with the dataset it comes from; each column is one method, with the target in the rightmost column. The GMS of that single reconstruction is printed beneath each panel. Grey panels mark predictions that failed to build, and predictions that build without being watertight are annotated as such; both count toward the invalid rate and are excluded from the means in Table 1. The failures are not spread evenly — they concentrate on the turned and patterned parts of MCB and CADENA-Bench, which is the same pattern the per-family results show.
Table 3: Vision2Code on BenchCAD. Voxel IoU↑ and invalid rate↓ (%). The comparison is not like-for-like and should not be read as a ranking; see the note below.
ModelInputGraded byVoxel IoU↑IR↓
Frontier vision–language models
GPT-5.6 Sol (thinking)imagevendor0.706
GPT-5.6 Luna (thinking)imagevendor0.631
GPT-5.6 Terra (thinking)imagevendor0.623
GPT-5.5 (thinking)imagevendor0.444
Claude Mythos 5 (thinking)imagevendor0.384
Claude Opus 5 (thinking)imagevendor0.366
Gemini 3.1 Pro (thinking)imageBenchCAD0.35518.5
Claude Opus 4.7 (thinking)imageBenchCAD0.2793.5
Specialist CAD models
qwen3-2b-rl-iidimageBenchCAD0.7521.1
CADEvolveimageBenchCAD0.7507.3
CADENA-RL (ours)meshours0.9100.9
Figure 4: Inference-time ablations, all replayed from the stepwise records of the reported model. (a) Quality against the operation budget k: k=1 is a single-pass model, and the curve saturates around eight operations, so the budget of 20 used throughout is not a tuned quantity. (b) The gain is concentrated in the hardest quartile of each dataset — parts whose first operation scores worst — and is essentially zero for the easiest. (c) Per-part view on MCB: each point is a part, comparing the reconstruction after one operation with the selected prefix. Points above the diagonal are improved by stepping; the shaded region marks parts rescued from near-total failure.
Figure 4: Inference-time ablations, all replayed from the stepwise records of the reported model. (a) Quality against the operation budget k: k=1 is a single-pass model, and the curve saturates around eight operations, so the budget of 20 used throughout is not a tuned quantity. (b) The gain is concentrated in the hardest quartile of each dataset — parts whose first operation scores worst — and is essentially zero for the easiest. (c) Per-part view on MCB: each point is a part, comparing the reconstruction after one operation with the selected prefix. Points above the diagonal are improved by stepping; the shaded region marks parts rescued from near-total failure.
Table 4: Comparison of the SFT and RL models under greedy decoding and sampling (T=1.0, E=12). IoU and GMS are means reported in percent, CD values are medians (computed with 8192 and 30000 sampled points), and IR is the fraction of invalid generations. Best values per dataset are in bold.
DeepCADFusion360MCB
DecodingModelIoU %↑CD8​k↓CD30​k↓GMS %↑IR %↓IoU %↑CD8​k↓CD30​k↓GMS %↑IR %↓IoU %↑CD8​k↓CD30​k↓GMS %↑IR %↓
GreedySFT91.70.160.04895.32.6388.80.140.04690.83.7775.20.430.25963.312.04
RL96.10.150.04297.00.3594.10.120.03893.31.2288.30.220.09373.70.74
SamplingSFT93.60.150.04695.60.1591.80.130.04292.30.6482.80.310.15070.00.36
RL96.60.150.04297.40.0795.20.120.03694.20.2389.50.220.08975.10.06
Figure 5: Characteristic failures. Five parts on which CADENA fails, with the target above and the returned reconstruction below. They illustrate three of the four modes discussed in this section: countable features are approximated rather than counted, so the impeller and the radial fan keep the right body and the wrong blades; helical geometry outside the DSL’s vocabulary is replaced by the nearest available primitive, a thread standing in for a coil spring; and where no single canonical view resolves the shape, the reconstruction collapses to a rough envelope of it, as in the valve body and the bracket. None of these is a failure to emit valid CadQuery — every reconstruction shown builds and is watertight, and would be counted in the means of Table 1.
Figure 5: Characteristic failures. Five parts on which CADENA fails, with the target above and the returned reconstruction below. They illustrate three of the four modes discussed in this section: countable features are approximated rather than counted, so the impeller and the radial fan keep the right body and the wrong blades; helical geometry outside the DSL’s vocabulary is replaced by the nearest available primitive, a thread standing in for a coil spring; and where no single canonical view resolves the shape, the reconstruction collapses to a rough envelope of it, as in the valve body and the bracket. None of these is a failure to emit valid CadQuery — every reconstruction shown builds and is watertight, and would be counted in the means of Table 1.
Table 5: CADENA against the DeepCAD figures reported by SOV-CAD. Their values are quoted from their Table II (the stronger of their two variants); ours are the CADENA-RL row of Table 1. The two are measured under different protocols — see the note below — so this is a comparison of published numbers, not a controlled one.
SOV-CADCADENA-RL
Median CD↓0.380.15
IoU↑0.840.961
IR↓7.3%0.3%
Table 6: Operations of the CADENA DSL. Surface form as emitted, grouped by what the operation does to the running solid. Bracketed arguments are optional and do occur in generated programs. Attested is the number of occurrences in the 994-program corpus; the operation marked ∗ does not appear there and was verified against programs generated fresh from the repository presets, and ✓ marks one that is attested in the corpus but whose occurrences we did not tally. The generator implements further operations that the CADENA corpus does not use; they are omitted.
OperationEmitted formAttested
Sketch-based
extruder=extrude(r, pt, ’PL’, "sk", h[, on_surf])1312
revolver = revolve(r, pt, ’PL’, "sk", angle, ’AXIS’)312
holer = hole(r, pt, ’PL’, "sk", depth)470
shellr=shell(r, pt, ’PL’, "sk", h, wall, bottom)
orto_cutr=orto_cut(r, pt, ’PL’, "sk", extent)170
Swept and lofted
loftr=loft(r, pt, ’PL’, [profile, …][, ruled=True])89
sweepr=sweep(r, "profile", "path")278
sweep_advr=sweep_adv(r, "profile", "path")110
springr=spring(r, pt, ’PL’, profile, pitch, height, radius,
angle, centre, seed[, body_mode=, turns=, tails=])
Parametric features
gearr = gear(w0, outer_radius=, cylinder_height=,26
number_outer_teeth=, outer_tooth_profile=, …)
Edge operations (selector chains)
filletr=r.edges(PointOnEdgeSelector([x,y,z])).fillet(rad)180
chamferr=r.edges(PointOnEdgeSelector([x,y,z])).chamfer(w[, w2])177
Table 7: Comparison of reward functions across the deepcad-1000, fusion360-1000, and mcb-1000 datasets. All rows share the RL setup of Section 3 and differ only in the reward; decoding is greedy.
deepcad-1000fusion360-1000mcb_1000
ModelIoU↑CD↓GMS↑IR↓IoU↑CD↓GMS↑IR↓IoU↑CD↓GMS↑IR↓
SFT0.91900.15640.95490.04170.87950.14440.90620.05710.84650.12130.77130.1174
RL (IoU)0.96200.14670.97370.00810.93170.12360.93490.03100.91430.09290.83100.0091
RL (MPR, 0.5/0.5)0.94650.14950.97030.00200.91140.13120.92940.00600.90030.09410.82580.0070
RL (MPR, 0.9/0.1)0.95460.14870.96940.00200.92960.13120.92890.00300.92410.09470.82470.0010
RL (IoU + KL)0.96500.14760.97430.00300.93770.12590.93870.01000.93400.09360.83390.0000
Table 8: Full-test-split evaluation for the RL (IoU) / RL (IoU + KL) pair — same checkpoints as in Table 7. RL (MPR, 0.9/0.1) was not evaluated on the full splits.
deepcad_test_meshfusion360_test_meshmcb_test_mesh
ModelIoU↑CD8​k↓GMS↑IR↓IoU↑CD8​k↓GMS↑IR↓IoU↑CD8​k↓GMS↑IR↓
SFT0.91670.15810.95280.02630.88800.14220.90790.03770.75240.43160.63390.1204
RL (IoU)0.96100.14770.97000.00350.94100.12430.93340.01220.88250.22360.73730.0074
RL (IoU + KL)0.95890.14710.97230.00470.94270.12320.93770.00870.88210.22760.73610.0102
Table 9: GMS as a reward: the target metric (GMS) improves, but IoU and CD degrade, especially on mcb-1000.
deepcad-1000fusion360-1000mcb_1000
ModelIoU↑CD↓GMS↑IR↓IoU↑CD↓GMS↑IR↓IoU↑CD↓GMS↑IR↓
SFT (intermediate)0.91080.16060.94610.02150.85340.16390.88210.05600.80300.14900.68630.0493
RL (IoU)0.94510.15380.95270.00910.90130.14570.89350.03840.87480.12200.70280.0030
RL (GMS)0.89820.16210.96460.01210.84270.16960.90320.04600.75880.30350.72850.0204
Table 10: GMS gain from the operation budget, by difficulty quartile. Q1 contains the parts whose first operation scores worst. Gains concentrate where single-pass generation fails.
k=1 (single-pass)k=20 (full)
QuartileDeepCADMCBDeepCADMCB
Q1 (hardest)72.839.294.1 +21.353.4 +14.2
Q295.058.997.7 +2.770.8 +11.9
Q398.178.398.2 +0.182.5 +4.2
Q4 (easiest)98.787.398.7 +0.087.7 +0.4
Table 11: Operation distribution, corpus vs. inference (% of steps). The training corpus is nearly position-agnostic, while CADENA’s choice of first operation inverts between DeepCAD and MCB according to the geometry.
PositionOperationTraining corpusDeepCADFusion360MCB
1stextrude53.680.170.326.0
revolve32.516.127.273.2
2ndextrude34.836.638.931.1
hole20.062.960.467.6
5thextrude46.820.423.515.3
hole21.179.375.784.2
Table 12: CADENA-Bench, all metrics over the full benchmark (n=3396). Median CD at 8k and 30k sampled points, mean IoU and GMS, and the invalid rate. CD, IoU and GMS are computed only over parts for which a method returned a valid prediction, so each row’s means describe a different subset and IR is the column that says how large that subset is. This is the invalid rate for CADENA-Bench that Table 2 does not carry.
MethodCD8​k↓CD30​k↓IoU↑GMS↑IR↓
CAD-Recode1.06140.904868.6448.8927.9
cadrille1.26731.125368.7749.790.8
CADReasoner1.97071.832768.3452.8739.9
CADEvolve1.31171.143373.0052.9010.8
CADFit†0.71250.536475.6954.8018.8
CADENA-SFT0.96430.773873.8857.9612.8
CADENA-RL0.33100.176387.5766.951.6
Table 13: CADENA-Bench by part family: shafts & bushings, gears & bearings, housings & frames. Metrics and averaging rule as in Table 12. Gears & bearings is the family on which the learned methods lose most, and the only one where direct fitting outscores CADENA.
Shafts & bushings (n=762)Gears & bearings (n=749)Housing & frames (n=359)
MethodCD8kCD30kIoUGMSIRCD8kCD30kIoUGMSIRCD8kCD30kIoUGMSIR
CAD-Recode1.00890.840271.6353.7520.11.28591.079562.3439.0935.91.19321.076273.5056.0834.3
cadrille1.05060.907173.2957.550.91.48281.286165.7237.180.41.82091.747970.1254.460.6
CADReasoner2.08821.945369.4155.5521.02.58672.464165.6946.9074.22.18562.020571.7256.4139.8
CADEvolve0.98550.851877.6859.5710.91.63141.452667.7841.3412.11.62751.472375.5859.398.6
CADFit†0.45360.271181.5360.8116.10.55920.359079.6161.2718.61.73661.550563.4848.4525.6
CADENA-SFT0.31760.141586.3670.7611.71.85631.668863.0747.7511.61.95741.823877.0058.0611.4
CADENA-RL0.28250.103091.7773.031.30.49070.304385.0358.130.80.58070.444987.2270.741.9
Table 14: CADENA-Bench by part family: flat & levers, springs & fasteners, tooling & gauges. Metrics and averaging rule as in Table 12. Tooling & gauges holds 17 parts, too few for its column to be read as a ranking; it is reported for completeness.
Flat & levers (n=464)Springs & fasteners (n=1046)Tooling & gauges (n=17)
MethodCD8kCD30kIoUGMSIRCD8kCD30kIoUGMSIRCD8kCD30kIoUGMSIR
CAD-Recode0.39310.317572.9658.7933.51.12150.992267.1745.3123.41.87591.771367.2738.6623.5
cadrille0.36820.264570.8262.060.91.43121.284766.0346.311.02.18442.025175.4841.790.0
CADReasoner0.29640.194574.5769.6729.42.87672.712762.7543.3633.71.89751.778282.1138.4747.1
CADEvolve0.34480.234576.2666.408.91.47731.342571.0047.8911.42.07451.925975.4544.6717.6
CADFit†0.25850.170979.9266.2017.71.58091.412266.3442.9718.96.81126.551740.1223.0523.5
CADENA-SFT0.24530.167075.7966.7510.41.16880.983070.8551.9216.21.42421.333567.8743.365.9
CADENA-RL0.15860.056688.3876.812.40.34320.198685.9463.351.80.32900.190391.4959.985.9

Findings

  • CADENA is reported as achieving the best results among compared methods on DeepCAD, Fusion360, MCB, CADENA-Bench, and BenchCAD across metrics including Chamfer distance, IoU, GMS, and invalid rate.
  • Compared to a single-pass model (one operation only), adding just a second operation raised GMS by +4.4 on DeepCAD, +4.9 on Fusion360, and +3.9 on MCB; using the full 20-operation budget raised GMS by +6.0, +7.4, and +7.6 respectively.
  • The gains from stepping were concentrated in the hardest quarter of parts (those a single-pass model handled worst) — e.g. +21.3 GMS for the worst DeepCAD quartile versus 0 for the easiest — and a subset of near-total failures (66 DeepCAD, 24 Fusion360, 22 MCB parts) were rescued from below 0.30 IoU to above 0.70 IoU.
  • While the training corpus placed operations like extrude at roughly the same rate regardless of step position, CADENA's actual first choice shifted with the input shape: it opened with extrude in 80.1% of DeepCAD parts versus 53.6% in the corpus, and with revolve in 73.2% of MCB parts (dominated by turned, rotationally symmetric bodies) versus 32.5% in the corpus.
  • Four recurring failure types were identified: repeated features like gear teeth are approximated with roughly the right count rather than counted exactly, out-of-vocabulary shapes (e.g. helical springs) are replaced by the nearest available primitive, hidden internal cavities invisible from any of the eight rendered views are never recovered, and an early wrong reference plane is never corrected by later steps.

Where it can be used

  • Converting scanned or legacy 3D models without editable history back into parametric CAD programs that engineers can modify
  • Serving as an assistive tool in reverse-engineering pipelines that reviews intermediate CAD builds automatically before finalizing a design
  • Using CADENA-Bench as a standardized way to compare CAD reconstruction methods per mechanical-part family rather than a single averaged score

Limits and open work

  • Geometry outside the model's DSL vocabulary (freeform blends, non-circular helical shapes, draft angles) cannot be represented exactly and gets approximated by the nearest available operation.
  • Because the model only observes eight fixed rendered viewpoints, internal cavities, blind bores, and undercuts invisible from any of those views cannot be recovered no matter how many steps are taken.
  • If the very first operation sets an inconsistent reference plane or origin, later steps cannot correct that underlying error, only build on top of it.
  • Several closely related methods (SOV-CAD, CADFS, Zero-to-CAD) could not be directly benchmarked due to missing checkpoints, proprietary output formats, or incomplete released tooling, so comparisons to them are limited or indirect.
  • The gears & bearings part family remains the weakest category, largely due to the difficulty of counting repeated features like gear teeth exactly.

Why it matters

Converting scanned or legacy 3D shapes into editable CAD models currently takes heavy expert effort, and this stepwise, self-checking approach points toward reducing early mistakes that would otherwise silently compound through the whole program. The new CADENA-Bench and GMS metric also give the field a more realistic way to test CAD reverse-engineering methods on real mechanical parts rather than only simple sketch-extrude shapes.

Terms in this paper

  • CAD reverse engineering · Inferring the editable design commands (a CAD program) that would produce a given 3D shape
  • mesh · A 3D shape represented as a set of triangles, with no built-in notion of holes, walls, or other editable features
  • IoU (Intersection over Union) · A measure of how much two 3D shapes overlap in volume, expressed as a percentage
  • GMS (Generalized Match Score) · This paper's new metric that scores agreement of surface position and orientation, not just occupied volume
  • reinforcement learning (RL) · A training method where the model improves by receiving reward scores for its outputs rather than being shown the exact correct answer

Original abstract (English)

Computer-Aided Design (CAD) underpins modern engineering, yet converting existing shapes into editable models still demands substantial expert effort. Most AI systems emit the entire CAD program in a single pass, never inspecting the intermediate geometry. In contrast, human engineers build a part feature by feature, checking after each operation what remains to be modeled. We introduce CADENA (Spanish for "chain"), a model that reconstructs a 3D mesh as a parametric CAD program, growing its seq

Authors · Soslan Kabisov

Read on arXiv

Latest papers

All papers →

Latest from METAL LAB

Figures: Soslan Kabisov et al., arXiv:2608.00799, arxiv-nonexclusive