OrthoLatentCAD: Orthographic Spatial Latents for Hand-Drawn CAD Program Generation
Organizations: Zhejiang University of Technology
Abstract
Freehand orthographic drawings capture early design intent, yet recovering executable sketch--extrude CAD programs from raster front, right, and top views remains challenging: noisy, dimension-free 2D layouts must be reconciled into an ordered construction history. We introduce Hand2CAD, a benchmark of 215K ABC-derived synthetic orthographic-drawing--CAD program pairs and 1,000 real three-view sets drawn by CAD-trained participants. Recovering CAD programs from orthographic drawings requires both cross-view geometric reasoning and alignment between visual features and program representations. We propose OrthoLatentCAD to address these two challenges. It fuses local geometry with global context on canonical planes, exchanges evidence between paired plane lines indexed by the same shared-axis coordinate, and maps the spatial representation to ordered program latents through queries inherited from a frozen CAD autoencoder. Across the evaluated one- to three-view configurations, OrthoLatentCAD outperforms protocol-matched baselines in procedural accuracy, compiled geometry, and CAD-kernel validity while benefiting from additional views. Without real-data fine-tuning, it also outperforms the baselines on held-out real drawings. We will release the dataset, code, and evaluation scripts.
Figures & tables
| Model | Views | Procedural accuracy | Distribution (valid) | Instance CD (valid) | Validity | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ACC | ACC | Line | Arc | Circle | Ext. | COV | MMD | JSD | Mean | Median | IR | ||
| DeepCAD | F+R+T | 76.4 | 69.2 | 79.4 | 60.3 | 61.2 | 70.1 | 80.1 | 1.72 | 3.98 | 0.82 | 0.53 | 57.2 |
| Hand2CAD | F | 79.8 | 71.6 | 82.4 | 62.1 | 64.2 | 73.3 | 81.7 | 1.66 | 3.80 | 0.78 | 0.49 | 51.3 |
| Hand2CAD | F+R | 81.5 | 73.4 | 83.8 | 64.5 | 67.1 | 75.6 | 82.3 | 1.63 | 3.74 | 0.71 | 0.45 | 48.1 |
| Hand2CAD | F+R+T | 83.1 | 75.0 | 85.8 | 67.2 | 69.9 | 78.0 | 82.9 | 1.60 | 3.71 | 0.63 | 0.40 | 42.4 |
| Drawing2CAD-Raster | F+R+T | 84.2 | 74.3 | 87.5 | 69.2 | 72.9 | 80.2 | 83.5 | 1.55 | 3.21 | 0.53 | 0.31 | 36.4 |
| Variant | Views | Procedural accuracy | Distribution (valid) | Instance CD (valid) | Validity | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ACC | ACC | Line | Arc | Circle | Ext. | COV | MMD | JSD | Mean | Median | IR | ||
| w/o OSL | F+R+T | 85.0 | 77.2 | 87.0 | 70.1 | 72.6 | 82.0 | 81.9 | 1.51 | 3.49 | 0.57 | 0.37 | 35.8 |
| w/o OMP | F+R+T | 86.2 | 78.4 | 88.1 | 71.8 | 74.0 | 83.5 | 83.1 | 1.45 | 3.38 | 0.53 | 0.34 | 32.9 |
| w/o PLA | F+R+T | 84.6 | 76.8 | 86.8 | 69.4 | 72.1 | 81.4 | 81.3 | 1.53 | 3.52 | 0.58 | 0.38 | 37.1 |
| w/o latent loss | F+R+T | 86.5 | 78.5 | 88.4 | 72.3 | 74.6 | 83.9 | 83.8 | 1.44 | 3.35 | 0.52 | 0.33 | 32.6 |
| Intra-plane only | F+R+T | 87.3 | 79.3 | 89.5 | 73.5 | 76.4 | 85.1 | 84.8 | 1.39 | 3.27 | 0.49 | 0.32 | 30.5 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Sequence Type | Token Type | Token Value | Token Representation | Description |
| Sketch Sequence | pad | 0 | Padding Token | |
| cls | 1 | Begin-of-Sequence Token | ||
| 2 | Start Sketch | |||
| 3 | Start Sketch Plane | |||
| 4 | Start Loop | |||
| 5 | Start Curve |
| Setting | Procedural accuracy | Exact reconstruction | Kernel validity | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ACC | ACC | Line | Arc | Circle | Extrude | Exact Cmd. | Exact Prog. | IR | IR | |
| Stage 1 (free-running) | 99.76 | 99.89 | 99.86 | 99.51 | 99.75 | 99.59 | 99.64 | 98.67 | 2.78 | 0.18 |
| Model | Procedural accuracy | Distribution (valid) | Instance CD (valid) | Validity | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ACC | ACC | Line | Arc | Circle | Ext. | COV | MMD | JSD | Mean | Median | IR | |
| DeepCAD | 62.3 | 54.1 | 66.0 | 46.8 | 49.5 | 59.2 | 72.4 | 2.05 | 4.88 | 0.95 | 0.64 | 55.2 |
| Hand2CAD | 78.4 | 69.7 | 82.0 | 61.6 | 65.3 | 72.9 | 80.7 | 1.72 | 4.12 | 0.75 | 0.49 | 48.7 |
| Drawing2CAD-Raster | 79.8 | 73.1 | 84.6 | 63.2 | 69.1 | 78.4 | 82.3 | 1.62 | 3.99 | 0.72 | 0.45 | 43.5 |
| OrthoLatentCAD | 84.2 | 76.0 | 87.5 | 70.4 | 73.1 | 80.6 | 85.8 | 1.48 | 3.76 | 0.62 | 0.40 | 39.8 |
Parametric CAD Modeling
Parametric CAD modeling represents 3D designs as editable, constraint-driven construction histories and develops methods to generate, reconstruct, and revise them.
See all 90 papers