TL;DR
CADReasoner is a novel AI framework for CAD reverse engineering that mimics human workflows by iteratively editing code based on geometric discrepancies. By fusing multi-view renders and point clouds within a fine-tuned Vision-Language Model (VLM), it achieves state-of-the-art reconstruction accuracy and virtually eliminates code execution errors on both clean and noisy 3D scan data.
What Problem Does This Paper Address?
Converting raw 3D scans or meshes back into clean, editable, parametric CAD models—a process known as reverse engineering—is a cornerstone of modern manufacturing, robotics, and digital archiving. However, most existing AI approaches treat this as a "single-shot" prediction task. These models try to generate the entire CAD program in one pass, which frequently results in missed fine details or invalid, uncompilable geometry.
In contrast, human engineers naturally refine designs by repeatedly comparing their current model to the target scan, identifying discrepancies, and fixing errors. While some recent AI methods attempt to mimic this loop using frozen Large Vision-Language Models, they lack deep 3D grounding. Other methods use reinforcement learning (RL) with simple scalar rewards, which provides too coarse a signal for complex geometric reasoning. Furthermore, most models are trained on perfect synthetic data, causing them to fail when faced with real-world scan defects like noise, occlusions, and missing patches.
Methods
CADReasoner introduces a closed-loop, geometry-driven program editing framework based on a fine-tuned VLM (specifically, Qwen2-VL 2B). Instead of predicting the final CAD code in one go, it autoregressively updates a runnable CadQuery Python script over multiple iterations.
Key innovations include:
- Cross-Modal Discrepancy Feedback: At each step, the model evaluates the difference between the target shape and the current prediction using two complementary modalities:
- Multi-view overlays: Eight orthographic and isometric views where the target and predicted meshes are rendered in different color channels (Green and Red). Discrepancies are visually obvious, while perfect overlaps appear yellow.
- Point-cloud offsets: Metric nearest-surface distance vectors that act as local error signals, showing exactly how much and in what direction the geometry needs to move.
- Scan-Simulation Pipeline: To bridge the gap between synthetic training data and real-world scans, the authors developed a virtual 3D scanning algorithm that simulates incomplete surface coverage, smoothed edges, and missing regions during both training and evaluation.
- Curriculum Supervised Fine-Tuning (SFT): The model is trained using a multi-stage curriculum with on-policy rollouts. This ensures the editor learns how to fix its own specific generation errors over time, preventing it from collapsing into trivial first-step behaviors.
Datasets
The authors utilized several key datasets to train and benchmark their approach:
- CAD-Recode corpus: A massive, procedurally generated dataset containing ~1 million CadQuery programs, used to pretrain the editor.
- DeepCAD: A standard benchmark of 8,046 user-authored parts from Onshape.
- Fusion360 Gallery: A geometrically richer dataset consisting of 1,725 real-world design sequences.
- MCB (Mechanical Components Benchmark): A curated 5,000-shape subset stratified by ISO part categories, representing significantly higher geometric complexity.
Each evaluation dataset was split into two tracks: a clean track (using original meshes) and a scan-sim track (processed through the scan simulator to mimic real sensor data).
Key Insights and Ideas
- Geometry Over Scalar Rewards: Instead of relying on RL fine-tuning—which recent studies suggest merely reweights existing behaviors rather than injecting new task knowledge—CADReasoner puts rich geometric evidence directly into the supervised fine-tuning stage.
- The Power of Complementary Modalities: Multi-view images excel at capturing global topology and silhouette inconsistencies, while point clouds provide precise metric distances. Fusing them prevents the model from choosing brittle code paths that look right from one angle but fail metrically.
- Non-Monotonic Refinement: In complex cases, refinement isn't always a straight line. As shown in the iterative rollouts, the model might temporarily add or remove elements across iterations before arriving at the optimal shape, proving the value of a multi-step reasoning budget.
Key Results
- State-of-the-Art Accuracy: CADReasoner consistently outperforms existing models like
cadrilleandCAD-Recodeacross DeepCAD, Fusion360, and MCB benchmarks in terms of Chamfer Distance (CD) and volumetric IoU. - Zero Invalid Rate (IR): By iteration 5 ($t=5$), CADReasoner achieves an Invalid Rate of 0.0% across multiple modalities and datasets under stochastic beam sampling, meaning it completely eliminates code compilation and geometry generation failures.
- Robustness to Scan Artifacts: On the challenging scan-sim track, baseline models degrade substantially (e.g.,
cadrille-SFTChamfer Distance drops significantly). In contrast, CADReasoner retains performance close to the clean setting, achieving near-clean CD values (0.16 on DeepCAD and 0.15 on Fusion360).
Limitations and Future Work
Despite its strong performance, CADReasoner has a few limitations:
- Compute Overhead: Iterative rendering, modality extraction, and multi-step decoding increase the computational cost and time required during inference compared to single-shot methods.
- Complex Feature Histories: While CadQuery programs are highly editable, scaling this approach to extremely long, highly complex industrial feature histories with hundreds of sequential operations remains an open challenge.
The authors suggest that future work could explore tighter integration with interactive user interfaces (UIs) for human-in-the-loop engineering or scaling up the underlying VLM backbone to handle even more intricate geometries.
Summary updated