Table of Contents
Fetching ...

Parametric Primitive Analysis of CAD Sketches with Vision Transformer

Xiaogang Wang, Liang Wang, Hongyu Wu, Guoqiang Xiao, Kai Xu

TL;DR

This work tackles automatic parsing of hand-drawn CAD sketches into parameterized primitives and their constraint relations. It introduces a two-stage framework that recasts sketch analysis as set prediction, producing a primitive set $P$ and a constraint set $C$ via separate primitive and constraint networks, augmented by a pointer module to bind constraint parameters to primitive indices. A key contribution is decoupling primitive types from their parameters and applying Hungarian matching to align GT and predicted sets, avoiding the error accumulation seen in autoregressive methods. On two public CAD sketch datasets, the method achieves higher primitive-type/flag/parameter accuracies and constraint-type/parameter accuracies than state-of-the-art baselines, with robust performance under noise and potential extension to free-form curves.

Abstract

The design and analysis of Computer-Aided Design (CAD) sketches play a crucial role in industrial product design, primarily involving CAD primitives and their inter-primitive constraints. To address challenges related to error accumulation in autoregressive models and the complexities associated with self-supervised model design for this task, we propose a two-stage network framework. This framework consists of a primitive network and a constraint network, transforming the sketch analysis task into a set prediction problem to enhance the effective handling of primitives and constraints. By decoupling target types from parameters, the model gains increased flexibility and optimization while reducing complexity. Additionally, the constraint network incorporates a pointer module to explicitly indicate the relationship between constraint parameters and primitive indices, enhancing interpretability and performance. Qualitative and quantitative analyses on two publicly available datasets demonstrate the superiority of this method.

Parametric Primitive Analysis of CAD Sketches with Vision Transformer

TL;DR

This work tackles automatic parsing of hand-drawn CAD sketches into parameterized primitives and their constraint relations. It introduces a two-stage framework that recasts sketch analysis as set prediction, producing a primitive set and a constraint set via separate primitive and constraint networks, augmented by a pointer module to bind constraint parameters to primitive indices. A key contribution is decoupling primitive types from their parameters and applying Hungarian matching to align GT and predicted sets, avoiding the error accumulation seen in autoregressive methods. On two public CAD sketch datasets, the method achieves higher primitive-type/flag/parameter accuracies and constraint-type/parameter accuracies than state-of-the-art baselines, with robust performance under noise and potential extension to free-form curves.

Abstract

The design and analysis of Computer-Aided Design (CAD) sketches play a crucial role in industrial product design, primarily involving CAD primitives and their inter-primitive constraints. To address challenges related to error accumulation in autoregressive models and the complexities associated with self-supervised model design for this task, we propose a two-stage network framework. This framework consists of a primitive network and a constraint network, transforming the sketch analysis task into a set prediction problem to enhance the effective handling of primitives and constraints. By decoupling target types from parameters, the model gains increased flexibility and optimization while reducing complexity. Additionally, the constraint network incorporates a pointer module to explicitly indicate the relationship between constraint parameters and primitive indices, enhancing interpretability and performance. Qualitative and quantitative analyses on two publicly available datasets demonstrate the superiority of this method.
Paper Structure (14 sections, 25 equations, 6 figures, 15 tables)

This paper contains 14 sections, 25 equations, 6 figures, 15 tables.

Figures (6)

  • Figure 1: The system framework of our approach. The primitive model takes a hand-drawn sketch as input to produce a parameterized primitive set $P$. Then, the constraint model takes the primitive set $P$ as input to predict the constraint set $C$ of the primitives.
  • Figure 2: The network architecture of primitive model. The primitive model takes image patches of hand-drawn sketch as input to extract the primitives set $P$.
  • Figure 3: The network architecture of constraint model. The constraint model takes a primitives set $P$ as input to extract the constraints set $C$.
  • Figure 4: Comparison with a state-of-art primitives parsing method for hand-drawn sketches.
  • Figure 5: Comparison with the state-of-art constraints parsing methods on the noisy primitives.
  • ...and 1 more figures