Introduction
Researchers from Autodesk have introduced CurveGen and TurtleGen, two generative models designed to produce realistic 2D engineering sketches. Unlike traditional methods that rely on brittle mathematical constraint solvers, these models learn to generate geometrically and topologically sound sketches directly from data. This work represents a significant step toward the full automation of 3D Computer-Aided Design (CAD) model synthesis.
The Challenge of CAD Sketching
In CAD workflows, 3D objects typically originate as 2D "engineering sketches"—structured collections of geometric primitives such as lines, arcs, and circles. For these sketches to be functional, they must be "watertight" (forming closed loops) and adhere to specific engineering constraints, such as tangency or perpendicularity, to allow for 3D operations like extrusion.
Previous AI models for vector graphics often focused on freeform shapes like fonts, which lack the structural rigor required for engineering. Earlier attempts at engineering sketch generation, such as SketchGraphs, attempted to predict a constraint graph first and then solve it—a process that is often computationally expensive and prone to failure. This research explores whether geometry and topology can be generated directly to produce sketches that are immediately ready for 3D modeling.
Methodology
The authors proposed two distinct Transformer-based architectures:
- CurveGen: Adapted from the PolyGen architecture for 3D meshes, CurveGen operates in two stages. A Vertex Model first predicts a set of 2D points, followed by a Curve Model that groups these points into primitives (hyperedges). The type of primitive is determined by the number of points in a group: two points form a line, three an arc, and four a circle.
- TurtleGen: Inspired by "Turtle Graphics," this model generates a sequence of pen commands (e.g., pen_down, draw, pen_up). This sequential approach inherently favors the creation of closed loops, which are essential for 3D CAD operations.
By utilizing the Transformer architecture, both models can capture long-range relationships, ensuring global consistency and alignment across the sketch.
Dataset and Preprocessing
The models were trained on the SketchGraphs dataset, which contains approximately 9.8 million real-world designs from Onshape. A critical contribution of this work is the rigorous data filtering process. The authors discovered that the raw dataset was heavily populated with duplicates. By removing nearly 87% of the data, they ensured the models learned to generalize rather than memorize. The final training set consisted of 1.1 million unique sketches, each containing 16 or fewer curve primitives.
Key Insights
- Implicit Constraint Learning: Remarkably, the models learned to respect engineering constraints like symmetry and perpendicularity implicitly. Without a formal solver, the Transformers identified patterns in the data, such as 90-degree angles and aligned holes.
- Topological Integrity: By representing sketches as structured data objects (hypergraphs in CurveGen or sequential paths in TurtleGen), the models ensure the output is a valid CAD object rather than just a pixel-based image.
- Beautification Applications: The models show potential for "beautifying" hand-drawn rough sketches by automatically snapping them into clean, topologically correct engineering drawings.
Key Results
A perceptual study was conducted to evaluate the realism of the generated sketches compared to human-designed ones.
- Realism: CurveGen sketches were rated as the most realistic, with human subjects often unable to distinguish them from professional human designs.
- Validity: CurveGen produced valid sketches—those capable of being processed by CAD kernels—81.5% of the time, a significant improvement over the previous state-of-the-art baseline of 65.8%.
- Novelty: Both models achieved high novelty scores (~90%), indicating they were synthesizing original designs rather than reproducing training examples.
Limitations and Future Directions
Despite these advancements, several challenges remain. The current models are limited to sketches with 16 or fewer curves, whereas industrial designs are often much more complex. Additionally, while the sketches appear constrained, they lack mathematical precision (e.g., a line might be 89.9° instead of exactly 90°). Future work will focus on incorporating "design intent" features, such as circular patterns and explicit parametric variables, to better align with professional CAD requirements.
Summary updated