Optimizing CAD Models with Latent Space Manipulation

Jannes Elstner, Raoul G. C. Schönhof, Steffen Tauber, Marco F. HuberarXiv 2023

Abstract

In the domain of industrial automation, optimizing CAD models for abstract features like "automation capability" remains a significant challenge. These features are often difficult to simulate and lack the large, labeled datasets required for traditional machine learning. This paper presents a novel approach by adapting image-manipulation techniques, specifically latent space manipulation, to 3D engineering data. By utilizing a 3D StyleGAN and a custom classifier, we demonstrate that abstract automation-related features, such as "grabability," can be optimized within a voxel-based generative framework. Our results show that navigating the latent space of pretrained generative adversarial networks offers a viable path for enhancing CAD designs without the need for complex rule-based systems or slow physical simulations.

Introduction: The Challenge of Design for Automation

Modern manufacturing relies heavily on "Design for Automation," where parts are engineered to be easily handled by robotic systems. However, defining "automation capability" mathematically is notoriously difficult. Traditional optimization methods struggle with these abstract concepts, and the lack of labeled 3D data prevents the use of standard supervised learning. While 2D image manipulation (e.g., StyleCLIP) has successfully used latent spaces to edit abstract features like facial expressions, these techniques have not yet been fully realized for 3D CAD data. This research bridges that gap, proposing a method to "edit" 3D parts to improve their industrial functionality.

Methodology: The NeuroCAD Pipeline

The researchers developed a pipeline called NeuroCAD, which treats CAD optimization as a latent space manipulation problem. The process begins by converting CAD models into $64 \times 64 \times 64$ binary voxel grids.

The NeuroCAD pipeline: An input model is inverted into latent space, modified by a Latent Mapper, and reconstructed by StyleGAN.

At the core of the system is a 3D StyleGAN architecture adapted to learn the manifold of valid engineering shapes (specifically screws and bolts) from unlabeled data. To guide the optimization, the system employs a Comparator Network—a 2-channel CNN trained to determine which of two parts is superior for a specific task. Optimization is achieved by finding a part's latent code and shifting it in a direction the Comparator Network identifies as an improvement. This is executed either through direct Latent Optimization or via a Latent Mapper that learns the transformation.

Datasets and Training

The model was trained and tested using several key datasets:

  • Mechanical Components Benchmark (MCB): A filtered subset of ~22,800 screws and bolts used to train the 3D StyleGAN.
  • ABC Dataset: While tested, the extreme geometric diversity of this million-model dataset caused convergence issues for the 3D StyleGAN, highlighting the current limits of voxel-based generative models.
  • Custom Grabability Dataset: A "toy" dataset of 1,000 pairs was created to train the Comparator Network, providing relative feedback on which parts offered better surface area for robotic gripping.

Key Results and Insights

A primary insight of this work is the effectiveness of relative comparisons over absolute scoring. By asking the network to identify the "better" part in a pair, the researchers provided a sufficient gradient for optimization without needing arbitrary numerical scales.

An example of an optimized CAD part where the head has been widened to increase grabability.

The system successfully proved that the "disentangled" latent spaces found in 2D GANs also exist in 3D voxel models. When tasked with improving "grabability," the model naturally learned to enlarge the head of the screw, identifying the geometric relationship between surface area and robotic handling. The Latent Mapper approach proved highly efficient, allowing for near-instantaneous optimization proposals once training was complete.

Limitations and Future Directions

While a successful proof of concept, the current $64^3$ voxel resolution results in "blocky" geometry unsuitable for high-precision manufacturing. Furthermore, the GAN occasionally produces unrealistic artifacts or incomplete geometry that would be non-functional in a real-world setting. Future research will focus on moving toward more precise CAD representations, such as Boundary Representation (B-Rep) or Constructive Solid Geometry (CSG), to ensure that optimized parts adhere to strict engineering constraints and manufacturing rules.

Summary updated

BibTeX
@misc{elstner2023optimizing,
  author = {Jannes Elstner and Raoul G. C. Schönhof and Steffen Tauber and Marco F. Huber},
  title = {{Optimizing CAD Models with Latent Space Manipulation}},
  year = {2023},
  eprint = {2303.12739},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.12739},
}
Figure