K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

CADENA: Stepwise CAD Reverse Engineering

arXiv:2608.007992026-07-31

AI不再一次性吐出整份CAD代码,而是像人类工程师一样一步步搭建并随时检查

CADENA是一个把3D网格(只有三角面片、没有可编辑结构的形状数据)还原成可编辑CAD程序的模型,它不像以往系统那样一次性生成整段代码,而是每次只添加一个操作,执行后再对比目标形状与当前结果,决定下一步该做什么。具体做法是把目标形状和当前已建部分叠加渲染成一张八视角图像,连同一个提示点一起输入图像转代码的视觉语言模型,由它预测并执行下一步操作,如此循环。作者还提出了真实机械零件基准CADENA-Bench和表面匹配指标GMS,并报告CADENA在DeepCAD、Fusion360、MCB、CADENA-Bench和BenchCAD五个数据集上都优于此前方法。

METAL MEDIA 解读图

CADENA的逐步CAD重建循环

证据状态已报告实测结果

  1. 叠加对比图像把目标网格(绿色)与当前部分建造结果(红色)从八个视角叠加渲染成一张图像,并附上标注修改位置的提示点
  2. 视觉语言模型预测下一步操作模型根据这张图像和提示点预测下一行要追加的CAD命令(如extrude、revolve)
  3. 执行并更新执行预测出的操作,生成新的部分建造结果,并重新渲染与目标的对比图像
  4. 循环并选择最佳步骤该循环最多重复20次,每一步的建造结果都会与目标计算IoU并记录,最终返回IoU最高的那一步作为输出程序
  5. 训练:先监督微调再强化学习先用规则生成器产出的程序和中间形状进行监督微调,再以执行后几何体的IoU作为奖励进行强化学习优化
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 以往大多数AI系统一次性生成整份CAD程序(构建零件的命令序列),从不检查中间几何结果;CADENA则像人类工程师那样每次只加一个操作,执行后再看结果决定下一步。
  2. 模型在每一步把目标网格(绿色)和当前部分建造结果(红色)从八个视角叠加渲染成一张图像,再加上一个标注修改位置的提示点,输入到一个图像转代码的视觉语言模型中预测下一个CAD操作。
  3. 训练分两阶段:先用规则生成器产出的程序与中间形状做监督微调,再用在线强化学习进一步优化,奖励信号是执行后的部分建造结果与目标网格之间的IoU(体积重叠比例)。
  4. 作者构建了包含3396个真实机械零件、分为六大类别的CADENA-Bench基准,以及新指标GMS,它不仅要求表面位置匹配,还要求表面朝向(法线)也匹配。
  5. 推理阶段,由于每一步的中间结果都会被执行并与目标打分对比,系统会返回整条链中IoU最高的那一步作为最终结果,因此后面步骤即使出错也不会让最终结果变差。
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

研究结果

  • 在DeepCAD、Fusion360、MCB、CADENA-Bench、BenchCAD五个数据集上,按Chamfer距离、IoU、GMS、无效率等指标衡量,CADENA被报告优于对比方法。
  • 相比只做一步的单次生成(k=1),仅增加第二个操作就让GMS在DeepCAD上提升4.4、Fusion360提升4.9、MCB提升3.9;用满20步预算后分别提升6.0、7.4、7.6。
  • 逐步改进带来的收益集中在单次生成表现最差的那25%零件上(例如DeepCAD最差分位数提升21.3 GMS,而最好分位数几乎不提升),其中一部分近乎完全失败的零件被从IoU低于0.30挽救到高于0.70(DeepCAD 66个、Fusion360 24个、MCB 22个)。
  • 训练语料中各类操作(如extrude)出现的位置几乎与步骤序号无关,但CADENA实际生成时会随输入形状调整首选操作:在DeepCAD上以extrude开头的比例为80.1%(语料中仅53.6%),在以车削类回转体为主的MCB上则以revolve开头达73.2%(语料中仅32.5%)。
  • 识别出四种常见失败模式:齿轮齿数等重复特征只被近似而非精确计数;弹簧螺旋线等DSL词汇之外的形状被替换为最接近的基本图元;八个固定渲染视角都看不到的内部空腔无法被还原;以及若第一步就设定了错误的基准面或原点,后续步骤也无法纠正该错误。

可应用场景

  • 把扫描件或缺乏历史记录的旧3D模型还原为工程师可以修改的参数化CAD程序
  • 作为逆向工程流程中的辅助工具,在最终确定设计前自动审查中间CAD建造结果
  • 把CADENA-Bench用作按机械零件类别分别评测CAD重建方法的标准化基准,而非只看单一平均分

局限与待验证事项

  • 模型所用DSL(CAD操作词汇表)之外的几何形状(自由曲面、非圆形螺旋线、拔模角等)无法精确表达,只能被最接近的操作近似替代。
  • 模型只观察八个固定渲染视角,任何在这些视角下都无法显现的内部空腔、盲孔或倒扣结构都无法被还原。
  • 如果第一步就设定了与目标不一致的基准面或原点,后续步骤无法纠正这一根本性错误,只能在错误基础上继续添加。
  • 部分密切相关的方法(SOV-CAD、CADFS、Zero-to-CAD)由于缺少可运行的权重、使用专有输出格式或工具链不完整,未能在同等条件下直接对比,只作说明性讨论。
  • 齿轮与轴承类零件仍是表现最弱的类别,主要因为难以精确计数齿轮齿数等重复特征。

为什么重要

把扫描件或没有历史记录的旧3D模型还原成可编辑CAD模型目前仍严重依赖专家的人工劳动,这种边建边查的做法有望减少早期错误在后续步骤中悄悄累积放大的问题,对更复杂的机械零件也更有潜力。同时CADENA-Bench和GMS为CAD逆向工程研究提供了更贴近真实机械零件的评测方式,而不只是简单的草图-拉伸形状。

本文术语

  • CAD逆向工程 · 根据已有的3D形状(网格)反推出能够生成它的、可编辑的CAD命令序列(程序)
  • 网格(mesh) · 由许多三角面片组成的3D形状数据,只有表面坐标,没有孔、壁厚等可编辑概念
  • IoU(交并比) · 衡量两个立体形状体积重叠程度的比例,数值越高表示重叠越充分
  • GMS(通用匹配分数) · 本文提出的新指标,不仅比较表面位置,还比较表面朝向(法线方向)是否一致
  • 强化学习(RL) · 不直接给出正确答案,而是通过对结果打分(奖励)来引导模型逐步做出更好选择的训练方法

论文原文摘要(英文)

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

作者 · Soslan Kabisov

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Soslan Kabisov et al., arXiv:2608.00799, arxiv-nonexclusive