StepCAD: Mesh-to-CAD Code Generation via LLM Policy and Geometry-Guided Search

NeurIPS 2026

Massachusetts Institute of Technology
CADBench Stage I · Policy extrude
IoU vs. input0.000
Input mesh Policy program After search
Loading geometry…
Example
Replay
I · Policy
    II · Search
      CadQuery program
      
                

      StepCAD writes a CadQuery program one operation at a time, looking at the target and at the part built so far, then a geometry-guided search makes local edits that close the remaining gap. An illustrative part built to show both stages. Every step is a real CadQuery program, executed and scored by IoU against the target part. Real CADBench runs follow in the method and results below.

      87.2%relative IoU gain on ABC Hard over the best prior method
      1.5Mexecutable CAD programs in ARCADE-1.5M
      12.5Mintermediate state–action transitions
      150+operations in the longest programs

      Abstract

      Recovering executable CAD programs from 3D meshes is challenging due to the compositional nature of CAD construction and the interaction between discrete modeling choices and continuous parameters. Many learning-based methods predict complete programs in a single pass and rely predominantly on sketch-extrude representations, limiting operation diversity and opportunities to correct geometric errors during reconstruction.

      We introduce StepCAD, a generative optimization approach that combines a state-conditioned CAD policy with geometry-guided search. Given an input mesh, the policy predicts construction actions conditioned on both target and intermediate geometry, and an IoU-guided tree search refines the resulting program through local edits. We also introduce ARCADE-1.5M, a large-scale dataset of 1.5M executable CAD programs spanning diverse operations, sequences with a maximum length of 150+ counted operations, and 12.5M intermediate state-action transitions.

      Experiments across multiple CAD reconstruction benchmarks show that StepCAD achieves state-of-the-art geometric reconstruction accuracy with consistently high validity, yielding up to 87.2% relative IoU improvement over the strongest evaluated baseline, with particularly large gains on complex shapes.

      Method

      StepCAD splits mesh-to-CAD into two parts. A learned policy writes the program one operation at a time and sees the geometry it has built so far. A geometry-guided search then makes local edits to that program wherever it still disagrees with the input. Everything below is drawn from one real run on a CADBench part: a stepped boss from CADBench's ABC set, also the first part in the replay above.

      I

      Π-StepCAD writes the program step by step

      At each step the policy sees the target and the current shape, predicts the next CadQuery operation, and the kernel executes it.

      Input mesh m
      Input mesh: stepped boss
      sample
      Target cloud Qm
      Point cloud sampled from the input mesh
      Shared Point-MAE encoder
      Qwen2.5-Coder-1.5B policyπθ(at | Qt−1, Qm, a<t)
      
              
      Execute in CadQuery · sample Qt
      Current shape St step 1
      Intermediate shape
      IoU 0.653
      feeds back as Qt

      The actual search on the stepped boss

      Hover a candidate to see the edit it tried.

      Edit sketch+0.117 IoU
      Bearing housing · Mechanical
      Before sketch edit→After sketch edit

      Replaces the base sketch with the profile sliced from the mesh at that plane, recovering the housing's outline.

      Complement cut+0.039 IoU
      Bladed disc · DeepCAD medium
      Before complement cut→After complement cut

      Adds a cut-extrude that removes material the program put where the mesh has none.

      Refine parameters+0.032 IoU
      Bladed disc · DeepCAD medium
      Before refinement→After refinement

      Bayesian optimisation of one operation's depths, radii and sketch dimensions.

      Skip operation+0.028 IoU
      DC motor · Mechanical
      Before skipping→After skipping

      Drops an operation that hurts the fit, here a cut that took away material the motor body needs.

      material added and material removed by each edit, from exact B-rep Booleans between the program before and after.

      ARCADE-1.5M Dataset

      To learn operations beyond sketch-and-extrude, we built ARCADE-1.5M: 1.5M executable CadQuery programs generated by 94 workflow-inspired strategies from ABC sketch loops. Every intermediate state must be a valid single solid, every program is re-executed from scratch before export, and the geometry after each solid operation is kept. That gives 12.5M state–action pairs for training the policy.

      Solid-operation coverage

      Share of programs that contain each operation at least once.

        ARCADE-1.5MCADEvolve

        Longer and more complex programs

        Per-program averages across datasets.

        Mesh-to-CAD Results

        We evaluate on CADBench, with seven splits spanning DeepCAD, Fusion 360, ABC (Easy / Medium / Hard by face count), mechanical parts (MCB) and organic shapes (Objaverse). We compare against CAD-Recode, Cadrille, CADEvolve and CADReasoner using their public checkpoints. StepCAD is best on every split, and the harder the shape, the larger the lead.

        Mean IoU by method

          Relative IoU gain over the best prior method

          Sorted by gain. The largest jumps come on ABC Hard, ABC Medium and organic shapes.

          Reconstructions

          Parts from CADBench's ABC split, from easy to hard, next to the CadQuery programs StepCAD recovers for them. Hover or tap a card to see the input.

          Where the gains come from

          Training data, state conditioning and search (paper Table 3). All variants except the public CADEvolve checkpoint are trained on ARCADE-1.5M.

          BibTeX

          @inproceedings{nehme2026stepcad,
            title={StepCAD: Mesh-to-CAD Code Generation via LLM Policy and Geometry-Guided Search},
            author={Nehme, Ghadi and Ahmed, Faez},
            booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
            year={2026}
          }