TL;DR
Think of a 3D mesh—whether from a physical scan or an AI generator—as a baked cake: you can see its exact shape, but you have no idea what recipe made it, making it notoriously difficult to tweak for real-world engineering. StepCAD reverse-engineers that recipe into editable, executable CAD code by pairing a step-by-step, geometry-aware language model with a local tree search that fine-tunes dimensions. Backed by a massive new synthetic dataset of complex operations, it dramatically outperforms prior methods, especially when shapes get weird and intricate.
What Problem Does This Paper Address?
Modern engineering relies on parametric Computer-Aided Design (CAD)—structured sequences of exact operations (like "draw a 12mm circle, extrude it 8mm, round the top edge"). However, 3D scanners, topology optimizers, and generative AI spit out unstructured 3D meshes: dense clouds of triangles that you can't easily edit or manufacture.
Turning a "dumb" mesh into "smart" CAD code is like trying to write a long Python script to draw a complex sculpture without ever looking at the screen while you type. Most existing AI approaches do exactly this: they look at the target 3D shape once and try to spit out the entire CAD program in a single pass. Worse, they mostly rely on basic "sketch-and-extrude" commands. If the model misjudges an early angle or needs a smooth, curved transition, errors compound, and there is no built-in way to fix the geometry mid-flight.
Methods
Instead of treating CAD generation as one-shot translation, the authors split the problem into two intuitive stages: drafting with visual feedback, followed by polishing via explicit search.
- State-Conditioned Policy ($\Pi$-StepCAD): Built on a 1.5B-parameter coding LLM (Qwen2.5-Coder) paired with a Point-MAE 3D encoder, this model writes CadQuery (Python) code one construction step at a time. Crucially, it operates in a closed loop: after predicting an action, it actually executes the code, samples a point cloud of the intermediate 3D solid it just built, and looks at both its current progress and the target mesh before deciding what to do next.
- Geometry-Aware Program Optimization: LLMs are great at high-level structure, but bad at guessing exact floating-point numbers. Taking the policy's draft program as a seed, StepCAD runs a beam search (beam width $K=2$) guided by volumetric overlap—specifically, Intersection-over-Union (IoU) with the target mesh. At each step, it tests four local code edits:
- Continuous refinement: Tweaking numbers (depths, radii) via Bayesian optimization.
- Sketch modification: Slicing the target mesh at the active workplane to extract a cleaner 2D profile.
- Complement cut: Automatically carving away regions where the generated solid overshoots the target.
- Operation skipping: Deleting steps that do more harm than good.
Datasets
To train a model that understands intermediate steps and diverse tools, the authors had to build ARCADE-1.5M, a synthetic dataset of 1.5 million executable CadQuery scripts. Unlike older staples like DeepCAD or Fusion 360—which stick almost exclusively to basic extrusions—ARCADE-1.5M uses 94 heuristic strategies to compose complex, valid single-body solids up to 150+ counted operations long. It includes revolves, sweeps, lofts, shells, fillets, and chamfers, and saves the intermediate 3D state after every solid operation, yielding 12.5 million state-action transitions.
For evaluation, the team tested on CADBench, an aggregate benchmark spanning structured CAD parts (DeepCAD, Fusion 360, ABC split into Easy/Medium/Hard), mechanical components (MCB), and free-form organic shapes (Objaverse).
Key Insights and Ideas
- Looking at your work beats blind memorization: Even without the final search stage, the step-by-step policy ($\Pi$-StepCAD) beats prior state-of-the-art methods on tough shapes. Conditioning on intermediate geometry keeps long sequences from derailing.
- Search is a plug-and-play superpower: Explicit program search isn't just a crutch for StepCAD; when the authors applied their geometry-guided tree search directly to outputs from a competing baseline (CAD-Recode) without any retraining, mean IoU jumped from 0.597 to 0.745.
- A richer vocabulary unlocks organic shapes: Because ARCADE-1.5M heavily features non-extrude operations (like sweeps in ~25% of scripts), StepCAD actually uses them. On organic shapes, StepCAD uses
loftin 30.4% of its programs (vs. 3.0% for CADEvolve), allowing it to capture smooth, curved transitions instead of approximating them with blocky staircases. - One shape, many valid recipes: Sampling from the policy reveals that it learns a genuine distribution over construction strategies—building the exact same 3D geometry via completely different, equally valid sequences of cuts and unions.
Key Results
StepCAD achieves state-of-the-art results across every split of CADBench on volumetric overlap (IoU), surface accuracy (Chamfer Distance), and Valid Shape Rate (VSR):
- Massive gains on complex geometry: On ABC Hard, StepCAD hits 0.73 IoU, an 87.2% relative improvement over the best prior baseline (0.39 IoU). On ABC Medium, it jumps from 0.43 to 0.74 IoU (+72.1%).
- Cross-domain robustness: On Mechanical and Organic shapes, it reaches 0.89 (+32.8%) and 0.71 IoU (+69.0%), respectively, while reducing Chamfer Distance by up to 27.8%.
- Near-perfect executability: Because both the closed-loop policy and search verify execution, VSR sits at 99.95%–100% across all benchmarks.
- Ablation clarity: Across controlled tests, moving from a single-shot baseline trained on ARCADE-1.5M (0.644 IoU) to intermediate-state conditioning bumps IoU to 0.682, and adding tree search vaults it to 0.816.
Limitations and Future Work
- Inference speed: Executing CAD kernels inside a tree search isn't free—refining a single shape takes roughly one minute, and the policy is capped at 12 high-level construction actions.
- Geometry $\neq$ Design Intent: StepCAD optimizes for shape overlap (IoU), not engineering semantics. For instance, if a fillet (rounded edge) has slightly the wrong radius, the search might just skip it to boost IoU rather than preserve the designer's intent.
- Coarse entity selection: The system uses broad directional selectors rather than clicking specific B-rep faces or edges, limiting surgical edits. Future work aims to blend point clouds with exact boundary representations (B-reps), speed up search, and incorporate engineering constraints.
Summary updated