Source-linked AI summary

Engineering Sketch Generation for Computer-Aided Design

Karl D. D. Willis, Pradeep Kumar Jayaraman, Joseph G. Lambourne, Hang Chu, Yewen Pu

arXiv:2104.09621v1cs.LGcs.CVcs.GR

TL;DR

Engineering sketches are the 2D basis of parametric CAD, but directly generating them is challenging because they combine geometric primitives with topology needed for downstream use. CurveGen and TurtleGen generate sketch geometry and topology without a constraint solver; human evaluation found their sketches more realistic than the current state of the art.

  • Problem

    Direct engineering-sketch synthesis remains limited, despite its role in parametric CAD, because sketches combine disparate geometric primitives with topology needed for closed profiles and constraints.

    Source: §1 · p. 1
  • Method

    CurveGen predicts curve vertices and hyperedges, while TurtleGen generates drawing-command sequences; both produce geometry and topology without a sketch constraint solver.

    Source: §1 · p. 2
  • Results

    Human evaluation found that CurveGen and TurtleGen produce more realistic engineering sketches than the current state of the art.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Engineering sketches are an important building block toward synthesizing and composing solid models with editable parametric CAD histories.

    Source: §1 · p. 1, §5 · p. 8

Abstract

from arXiv · show

Engineering sketches form the 2D basis of parametric Computer-Aided Design (CAD), the foremost modeling paradigm for manufactured objects. In this paper we tackle the problem of learning based engineering sketch generation as a first step towards synthesis and composition of parametric CAD models. We propose two generative models, CurveGen and TurtleGen, for engineering sketch generation. Both models generate curve primitives without the need for a sketch constraint solver and explicitly consider topology for downstream use with constraints and 3D CAD modeling operations. We find in our perceptual evaluation using human subjects that both CurveGen and TurtleGen produce more realistic engineering sketches when compared with the current state-of-the-art for engineering sketch generation.

1. Introduction

Engineering sketch generation is underexplored despite sketches’ role as the 2D basis of parametric CAD; their varied primitives and topology make generation challenging. CurveGen and TurtleGen generate sketch geometry and topology without a constraint solver, and human evaluation finds their sketches more realistic than the state of the art.

1. Introduction

  • Engineering sketches are the 2D basis of parametric CAD, which the paper identifies as the foremost 3D modeling paradigm for manufactured objects.The paper frames sketch generation as an enabling technology for solid models with editable parametric CAD histories.Source: §1 · p. 1
  • Engineering sketches are composite curves of 2D primitives whose topology supports closed profiles and constraints such as coincidence and tangency.Topology also supports grouping primitives into closed loops for 3D modeling operations.Source: §1 · pp. 1–2
  • Generating sketches could support reverse engineering from sparse scans, user-input auto-completion, and beautification of approximate freehand geometry.The paper describes these as potential applications, including easing the burden of producing complex sketches.Source: §1 · pp. 1–2
  • Human evaluation found that CurveGen and TurtleGen produce more realistic engineering sketches than the current state of the art.The paper also reports quantitative and qualitative results, including a perceptual study comparing the models with a state-of-the-art baseline.Source: §1 · p. 2
  • Both models generate geometry and topology directly without a sketch constraint solver.CurveGen predicts vertices and indexed hyperedges; TurtleGen generates pen commands that form closed loops.Source: §1 · p. 2
  • CurveGen’s hyperedge cardinality implicitly encodes sketch primitive type, grouping vertices into lines, arcs, or circles.This representation captures topology linking curves, which the paper identifies as vital for engineering sketches.Source: §1 · p. 2

2. Related Work

Related work spans vector graphics, technical drawings, layout generation, program synthesis, and reverse engineering, but engineering sketch generation must handle geometric primitives together with their topology. The paper distinguishes its approach by generating line, arc, and circle geometry while explicitly considering topology for downstream CAD operations.

2. Related Work

  • Unlike much prior vector-graphics work using Bézier curves, this paper uses lines, arcs, and circles and explicitly considers topology for constraints and 3D CAD operations.These primitives are described as easier to control parametrically, less prone to numerical issues, and liftable to prismatic shapes such as planes and cylinders.Source: §2 · p. 2
  • Technical-drawing research includes projection datasets and vectorization, while this work generates new sketch geometry suitable for 3D CAD modeling operations.The cited vectorization method predicts line and Bézier-curve parameters and refines them with optimization.Source: §2 · pp. 2–3
  • Generative layout work shares the need for connected parts and relationships such as parallelism, symmetry, and perpendicularity.The paper notes these relationships as critical when designing engineering sketches.Source: §2 · p. 3
  • Program synthesis can represent sketches as sequences of commands, with future applications including repetitions, symmetries, and modifications.The paper frames this as a potential approach for modeling more complex operations.Source: §2 · p. 3
  • Reverse-engineering methods fit line and arc primitives to 2D profiles from 3D scans, while this paper focuses on generating 2D sketches as a building block for solid-model synthesis.The stated target is synthesis and composition of solid models with parametric CAD history using common modeling operations.Source: §2 · p. 3
  • SketchGraphs predicts geometric constraint graphs and relies on a sketch constraint solver, whereas this work directly predicts geometry without that solver.The paper also reports that its methods naturally generate regular patterns such as horizontal and vertical lines and symmetries.Source: §2 · p. 3

3. Method

The method defines two representations for structured engineering sketches and implements two generative architectures over them. CurveGen predicts hypergraph vertices followed by curves; TurtleGen generates drawing-command sequences.

3.1. Engineering Sketch Representation

  • Sketches use either a hypergraph of quantized vertices and primitive-defining hyperedges or ordered turtle commands that draw loops.Hyperedge cardinality encodes line, arc, or circle; turtle commands extend loops using quantized displacements.Source: §3.1 · pp. 3–4

3.2. Generative Models

  • The paper compares two neural architectures, CurveGen and TurtleGen, for engineering sketch generation.Source: §3.2 · p. 4

3.2.1 CurveGen

  • CurveGen adapts PolyGen to generate hypergraph vertices followed by conditioned hyperedges, then recovers curve primitives as a post-process.Source: §3.2.1 · p. 4

3.2.2 TurtleGen

  • TurtleGen generates tokenized drawing-command sequences with a nine-layer Transformer, then executes them to recover sketch geometry and topology.Training sequences randomize loop order, starting vertex, and drawing direction; sampled sequences are preconditioned with randomly selected initial steps from a fixed dictionary.Source: §3.2.2 · pp. 4–5

4. Results

The evaluation compares CurveGen and TurtleGen with SketchGraphs using quantitative metrics, human judgments, and qualitative examples. Human subjects judged CurveGen the most realistic of the generated sketches, while examples also show closed profiles extruded into 3D and outputs post-processed with constraints.

4.1. Data Preparation

  • 87.01% of SketchGraphs sketches were duplicates; filtering left 1,106,328, 39,407, and 39,147 sketches for training, validation, and test.The filtering also removes invalid data and construction curves.Source: §4.1 · p. 5

4.2. Experiment Setup

  • CurveGen training uses 2 million iterations, while TurtleGen uses 0.5 million iterations to see the same number of training samples.Both models took about 48 hours to train; SketchGraphs training took about 27 hours.Source: §4.2 · pp. 5–6

4.3.1 Metrics

  • Bits per Vertex and Bits per Sketch measure test-set negative log-likelihood, while Unique, Valid, and Novel are evaluated on 1,000 generated samples.Lower bits scores are better; lower Unique indicates more duplicates.Source: §4.3.1 · p. 6, Table 1 · p. 6

4.3.2 Quantitative Comparison

  • Bits-per-vertex and bits-per-sketch results are not directly comparable across models; TurtleGen most frequently produces invalid sketches, while removing SketchGraphs duplicates improves output variety.The reported SketchGraphs novelty on duplicate-containing training data suggests memorization of duplicated sketches.Source: §4.3.2 · p. 6

4.4. Perceptual Evaluation

  • Human subjects found CurveGen output the most realistic of the generated engineering sketches.Figure 4 reports the percentage judged more realistic than human-designed sketches and inter-rater agreement.Source: Figure 4 · p. 6, §4.4 · p. 8

4.5. Qualitative Results

  • CurveGen consistently generates sketches with closed loops, symmetrical features, perpendicular lines, and parallel lines.The qualitative comparison shows randomly selected valid generated sketches alongside human-designed sketches.Source: Figure 5 · p. 7, §4.5 · p. 8
  • Closed profiles from CurveGen sketches can be lifted into 3D through procedural extrusion.The examples demonstrate generated sketches being used to produce 3D geometry.Source: §4.5 · p. 8, Figure 6 · p. 8
  • Auto-constraining in AutoCAD snaps near-perpendicular lines to perpendicular and establishes constraints for further editing.The figure compares unconstrained CurveGen output with the auto-constrained result.Source: §4.5 · p. 8, Figure 7 · p. 8

5. Conclusion

CurveGen and TurtleGen generate engineering sketches that the paper reports as more realistic than the current state of the art. The authors identify synthesis and composition of editable parametric solid models as a broader goal, with constraints and repetitions as future directions.

5. Conclusion

  • CurveGen and TurtleGen produce more realistic output than the current state of the art, while constraints and repetitions are proposed as future directions.The authors position engineering sketches as building blocks toward solid models with editable parametric histories.Source: §5 · p. 8

A.1. TurtleGen Program Example

The TurtleGen example program draws an outer loop and an inner circle. Its instructions lift the pen to the start of each loop and draw counter-clockwise.

A.1. TurtleGen Program Example

  • The example TurtleGen program encodes a sketch using loopstart, line, arc, and circle commands.The program given is one possible TurtleGen program for the illustrated sketch.Source: §A.1 · p. 11
  • The first five drawing commands create the outer loop counter-clockwise from the lifted pen position.The pen returns to (0, 0) for each loop.Source: §A.1 · p. 11
  • The final commands lift to a vertex and draw the inner circle counter-clockwise.The example starts this loop at (86, 85).Source: §A.1 · p. 11

A.2. Additional Qualitative Results

The supplementary section provides additional qualitative sketch-generation results. The figures place human-designed SketchGraphs examples beside outputs from CurveGen, TurtleGen, and the SketchGraphs generative model.

A.2. Additional Qualitative Results

  • The supplementary material is described as providing additional qualitative results in Figures 8 and 9.These results extend the qualitative examples beyond the main-text comparison.Source: §A.2 · p. 11, Figure 8 · p. 12, Figure 9 · p. 13
  • Figure 8 presents additional samples, ordered as human-designed sketches followed by CurveGen, TurtleGen, and SketchGraphs generations.The caption identifies the examples as randomly selected generated sketches.Source: Figure 8 · p. 12
  • Figure 9 gives another set of human-designed and generated sketches in the same left-to-right model order.The displayed model order is CurveGen, TurtleGen, then SketchGraphs after the human examples.Source: Figure 9 · p. 13
Loading 2104.09621v1…