DeepCAD: A Deep Generative Network for Computer-Aided Design Models
New1. Overview
DeepCAD is the official code release for the ICCV 2021 paper "DeepCAD: A Deep Generative Network for Computer-Aided Design Models" by Wu, Xiao, and Zheng at Columbia University. Its central idea is to reframe CAD modeling as a sequence-generation problem rather than a geometry-reconstruction problem. Traditional representations such as meshes, voxels, or B-rep surfaces are hard to edit and discard design intent; DeepCAD instead represents a CAD model as an ordered sequence of modeling commands (sketch, extrude, boolean, fillet) and learns that sequence directly. This sequence representation carries the design history, so generated models open and stay editable in mainstream CAD software. For engineers building a design-to-simulation loop, DeepCAD is the first building block that turns design intent into a learnable object and is the common vocabulary for later text-to-CAD and mesh-to-CAD work. After reading you should be able to judge whether, when your task is to generate, complete, or edit parametric CAD rather than merely produce an uneditable mesh, a sequence-generation route like DeepCAD fits better than a geometry-reconstruction route.
2. How It Works
DeepCAD's representation learning has three steps. First, serialization: a CAD model's B-rep is parsed through the Onshape parser into a sequence of command tokens, with sketch primitives (Line, Arc, Circle) and solid operations (Extrude, Boolean); each command's parameters are quantized into a fixed-dimensional vector and the whole sequence is padded to a fixed length, yielding a dense vector sequence. Second, the autoencoder: an attention-style Transformer encoder maps the sequence to a latent vector, and a decoder reconstructs the command sequence, trained on a combined loss of command-type classification and parameter regression. Third, generation: a WGAN-GP discriminator is trained on the encoded latents so that randomly sampled latents decode into legal, diverse, and novel CAD programs. The release ships the Onshape parser, training and evaluation scripts, a model pretrained on roughly 178k ABC-derived command sequences, and a STEP exporter that loads in SolidWorks, Fusion 360, and Onshape. The key point is that DeepCAD learns how to model, not merely what a shape looks like, so its output is a feature tree, not a blob of mesh.
3. Scope and Assumptions
DeepCAD assumes your CAD models can be expressed as the command-sequence vocabulary it supports (mainly sketch primitives plus extrude and boolean), and that you have or can build enough command sequences to train or fine-tune. Its training data come from Onshape public models and the ABC dataset, so the model favors the design styles covered by those corpora. It is not a general mesh or point-cloud reconstructor: if you hold only an STL mesh or point cloud, you must first convert it into DeepCAD's sequence representation, and that mesh-to-CAD step is exactly what later work such as CADFit addresses; DeepCAD itself does not include it. Moreover, its command vocabulary limits it to parts that are programmatically describable; free-form surfaces, lofts, and sweeps that resist simple command sequences are weakly covered. Deployment also carries environment risk: the official code targets Linux, an NVIDIA GPU, Python 3.7, PyTorch 1.5, and pythonocc (OpenCASCADE bindings), a stack now several generations old, so porting to new hardware and frameworks takes real effort. Treat DeepCAD as a design-intent generator rather than a geometry solver to avoid disappointment.
4. Getting Started
The fastest entry is the repository's training and evaluation scripts together with the pretrained weights: clone rundiwu/DeepCAD, install the pythonocc and PyTorch 1.5 dependencies per the README, then first run the data parser (Onshape to command sequence) and the autoencoder reconstruction to confirm reconstruction error is reasonable, before loading the pretrained model for latent sampling and observing the diversity and legality of generated results. For a first experiment, use an ABC subset, fix the random seed, record dependency versions, and export several generated CAD programs to STEP, then open them in SolidWorks or Fusion to check whether they are genuinely editable and whether the feature tree is clean. The most common beginner failure is forcing old code onto a new PyTorch or Python and hitting a pythonocc compile error, or feeding a mesh directly to the model and forgetting the serialization pre-step. Before writing any generated result into a proposal, do a manual editability check (cut a hole, change a dimension) in a classical CAD tool, because rendering a shape and keeping an editable feature tree are two different things. Background theory is available in the physics-based deep-learning material and geometric deep-learning tooling covered on this site.
5. Comparison with Alternatives
Comparison is meaningful only against the same objective. Against geometry-reconstruction routes (representing shape as point clouds, meshes, or occupancy fields and then generating) DeepCAD outputs editable command sequences directly, skipping the "reconstruct geometry then reverse it into CAD" detour, at the cost of generating only in-vocabulary command combinations. Against sketch-level work like SketchGraphs and Engineering Sketch Generation, DeepCAD reaches solid operations (extrude, boolean) and is a more complete CAD program generator. Against later BrepGen (diffusion-based B-rep generation), DeepCAD is the autoregressive sequence paradigm: more interpretable and easier for a CAD kernel to validate, whereas BrepGen has the edge on more complex topology. Against PolyGen (autoregressive mesh generation) the paradigm is similar (both serialize geometry) but the target representation differs: CAD commands versus mesh vertices and faces. Unlike physics-AI foundation models such as POSEIDON, which operate at the simulation end, DeepCAD sits at the design end, and the two form an upstream-downstream pair of "design generation then simulation evaluation." The crux is whether you need editable design intent or an uneditable shape: choose sequence generation for the former, geometry reconstruction for the latter.
6. Benchmarks and Evidence
DeepCAD's public evidence is mainly the paper and the accompanying ABC command-sequence dataset. The paper reports training on about 178k CAD command sequences converted from the ABC dataset; the autoencoder reconstruction shows good command-level accuracy and parameter error, and the latent WGAN-GP produces models that beat naive random sampling baselines on novelty, diversity, and validity. Two caveats deserve a cool head. First, these numbers are given by the authors on their own train-test splits, not from independent blind tests; "validity" means the command sequence executes in a CAD kernel, not that the geometry satisfies engineering constraints. Second, the ABC dataset distribution is biased toward Onshape public-model styles, so DeepCAD's generalization is bounded by that distribution, and later work such as BrepGen and text-to-CAD reports different conclusions on more complex benchmarks, indicating the ceiling of sequence generation is still being explored. Any precision or diversity number destined for a proposal should come from your local rerun on a fixed data split and fixed pretrained weights, not from a README example. Downstream validation references on this site show how CAD geometry enters simulation.
7. Role in Physics-AI Workflows
In a physics-AI workflow DeepCAD sits at the very upstream of design generation. Its most natural use is to supply candidate geometry for design exploration: before committing to a part's form, sample a batch of editable CAD programs in latent space, export them as STEP, and hand them to a solver such as OpenFOAM or a physics-AI framework such as POSEIDON for simulation evaluation, then use the simulation score as feedback to steer generation, forming a generate-simulate-filter loop. Compared with manual modeling, this approach produces and evaluates many more candidates per unit time, which suits rapid iteration in the topology-concept phase. It can also patch reverse engineering: when only a reference shape exists and you need a set of editable initial designs quickly, DeepCAD's sequence prior helps complete an incomplete modeling history. But stay sober: DeepCAD does not guarantee manufacturability or structural soundness, so a simulation feedback loop is indispensable; feeding unvalidated generations straight into a physics-AI framework as training data amplifies the data-distribution bias. Position it as an editable-candidate generator and feature-tree source, not an automatic design endpoint, to match engineering reality.
8. Limitations and Failure Modes
DeepCAD has several clear failure modes. First, input mismatch: it eats and spits command sequences, so handing it a raw mesh or point cloud yields meaningless output. Second, out-of-vocabulary geometry: free-form surfaces, lofts, sweeps, and complex fillet chains that resist its limited command set get approximated as sketch-plus-extrude combinations, losing design intent. Third, out-of-distribution generalization: training data skew toward Onshape and ABC styles means quality drops on industrial sheet metal, injection-molded parts, and complex castings with drafts and ribs. Fourth, an editability trap: a decoded command sequence may "run" in a CAD kernel yet carry redundant steps, degenerate sketches, or numerically ill-conditioned parameters, so it opens in mainstream CAD but is unpleasant to modify. Fifth, environment fragility: the official dependencies are pinned to PyTorch 1.5, Python 3.7, and pythonocc, and newer environments frequently fail to compile. A frequently overlooked failure is mistaking "generated a shape that looks right" for "generated a design ready to manufacture"; shape correctness is not engineering soundness, which also needs tolerances, materials, and manufacturability checks far outside DeepCAD's scope.
9. Version and Source Notes
Record 1: DeepCAD was published by Wu, Xiao, and Zheng at Columbia University; the paper "DeepCAD: A Deep Generative Network for Computer-Aided Design Models" appeared at ICCV 2021, arXiv 2105.09492, with the official repository rundiwu/DeepCAD under the MIT license. Record 2: the paper reports training on roughly 178k CAD command sequences converted from the ABC dataset; the autoencoder and latent WGAN-GP learn on that sequence distribution; these are project-authored benchmark figures, not independent blind tests. Record 3: the code release includes the Onshape parser, training and evaluation scripts, a pretrained model, and a STEP exporter, with the runtime pinned to Linux, an NVIDIA GPU, Python 3.7, PyTorch 1.5, and pythonocc. Record 4 (reconciliation discipline): when citing DeepCAD results, you must record the data source (Onshape or ABC split), the pretrained-weight version, the PyTorch and pythonocc versions, and the evaluation metric, because sequence-generation quality depends heavily on those choices; a precision number without version and split cannot be reproduced and should not enter an external proposal. These records were verified on 12 November 2026 against the official repository and paper; author-supplied benchmark numbers are treated as project-authored capability statements, not independent validations.
10. References
- Wu R., Xiao C., Zheng C., "DeepCAD: A Deep Generative Network for Computer-Aided Design Models," ICCV 2021, arXiv:2105.09492.
- Koch S. et al., "ABC: A Big CAD Model Dataset For Geometric Deep Learning," CVPR 2019, arXiv:1812.06216.
- Seff A. et al., "SketchGraphs: A Large-Scale Dataset for Modeling Relational Geometry in Computer-Aided Design," ICML 2020 Workshop on Object-Oriented Learning, arXiv:2007.08506.
- Willis K. D. D. et al., "Engineering Sketch Generation for Computer-Aided Design," CVPRW 2021 Sketch-Oriented Deep Learning Workshop, arXiv:2104.09621.
- Nash C. et al., "PolyGen: An Autoregressive Generative Model of 3D Meshes," ICML 2020, arXiv:2002.10880.
- Xu X. et al., "BrepGen: A B-rep Generative Diffusion Model with Structured Latent Geometry," SIGGRAPH 2024, arXiv:2401.15563.
- Qi C. R. et al., "PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation," CVPR 2017, arXiv:1612.00593.
- Riegler G. et al., "OctNet: Learning Deep 3D Representations at High Resolutions," CVPR 2017, arXiv:1611.05009.