SkexGen

SkexGen (SKetch and EXtrude GENerative model) is a new aproach to generate both engineering sketches and 3D mechanical parts that enables new ways to explore and control designs.

SkexGen: Autoregressive Generation of CAD  Construction Sequences with Disentangled Codebooks

So why 'sketch and extrude'? Parametric CAD makes extensive use of the sketch and extrude modeling operations to model complex 3D shapes. Constraints are used to define the relationships between sketch elements and enable quick edits.

However, setting up these constraints is both time consuming and requires expert knowledge. Take for example this heat sink design, where we want to vary the overall size and number of fins.

Example of design variation using parametric CAD
Here are the parameters driving the design –– it's a job for an expert. How might we learn from human design to automatically generate design variations while allowing user control?

Parameters needed to model design variation for a heat sink.

SkexGen tackles this problem by firstly separating out the topology from geometry in our representation, so they can be controlled individually downstream.

SkexGen sketch representation of topology and geometry.

As with prior work we generate a sequence of tokens based on the hierarchy of curves, loops, faces, and extrusions found in sketch and extrude construction sequences.

SkexGen sketch and extrude representation.

Here is where it gets interesting, these tokens are fed into separate Transformer encoders to encode the topology, geometry, and extrude information into separate quantized codebooks. A separate sketch and extrude decoder is used to generate a CAD construction sequence.

SkexGen architecture.
Using this approach the sketch generation quality is excellent. The model implicitly learns symmetries and regularities in each design without ever seeing sketch constraints.

Sketches generated using SkexGen.

When we generate 2D sketches or 3D parts we can use the same code in any of the codebooks to produce results that are similar in either topology, geometry, or extrusion parameters. Here we keep the topology code the same so the designs have similar overall structure.

SkexGen generation results using the same topology code.
An entirely new capability is to mix the codes from different designs. Here we take the topology code from a design with a series of cylinders and mix it with the geometry and extrude codes from a block to get a hybrid design.

Mixing topology, geometry, and extrude codes to create a hybrid design using SkexGen.

Code mixing can also turn 😀 into 😐.

Mixing topology, geometry, and extrude codes to create a hybrid design using SkexGen.

Paper: SkexGen: Autoregressive Generation of CAD Construction Sequences with Disentangled Codebooks (ICML 2022)
Code: https://github.com/samxuxiang/SkexGen

Created By: SFU / Autodesk Research

Co-Authors: Xiang Xu (Lead author), Joe Lambourne, Chin-Yi Cheng, Pradeep Kumar Jayaraman, Yasutaka Furukawa