Table of Contents
Fetching ...

Brep2Shape: Boundary and Shape Representation Alignment via Self-Supervised Transformers

Yuanxu Sun, Yuezhou Ma, Haixu Wu, Guanyang Zeng, Muye Chen, Jianmin Wang, Mingsheng Long

TL;DR

Brep2Shape tackles the representation gap in boundary representations (B-rep) for CAD by learning to map parametric boundary expressions to explicit shape samples through a self-supervised pre-training objective. It introduces a Dual Transformer backbone with topology attention that processes surfaces and curves in parallel while exploiting B-rep topology to maintain consistency between entities. Empirical results on four CAD benchmarks demonstrate state-of-the-art accuracy and faster convergence, with strong data scalability and cross-domain transfer, including robustness under limited labeled data. The approach reduces labeling needs and provides scalable, generalizable geometric representations for downstream CAD tasks such as classification and segmentation.

Abstract

Boundary representation (B-rep) is the industry standard for computer-aided design (CAD). While deep learning shows promise in processing B-rep models, existing methods suffer from a representation gap: continuous approaches offer analytical precision but are visually abstract, whereas discrete methods provide intuitive clarity at the expense of geometric precision. To bridge this gap, we introduce Brep2Shape, a novel self-supervised pre-training method designed to align abstract boundary representations with intuitive shape representations. Our method employs a geometry-aware task where the model learns to predict dense spatial points from parametric Bézier control points, enabling the network to better understand physical manifolds derived from abstract coefficients. To enhance this alignment, we propose a Dual Transformer backbone with parallel streams that independently encode surface and curve tokens to capture their distinct geometric properties. Moreover, the topology attention is integrated to model the interdependencies between surfaces and curves, thereby maintaining topological consistency. Experimental results demonstrate that Brep2Shape offers significant scalability, achieving state-of-the-art accuracy and faster convergence across various downstream tasks.

Brep2Shape: Boundary and Shape Representation Alignment via Self-Supervised Transformers

TL;DR

Brep2Shape tackles the representation gap in boundary representations (B-rep) for CAD by learning to map parametric boundary expressions to explicit shape samples through a self-supervised pre-training objective. It introduces a Dual Transformer backbone with topology attention that processes surfaces and curves in parallel while exploiting B-rep topology to maintain consistency between entities. Empirical results on four CAD benchmarks demonstrate state-of-the-art accuracy and faster convergence, with strong data scalability and cross-domain transfer, including robustness under limited labeled data. The approach reduces labeling needs and provides scalable, generalizable geometric representations for downstream CAD tasks such as classification and segmentation.

Abstract

Boundary representation (B-rep) is the industry standard for computer-aided design (CAD). While deep learning shows promise in processing B-rep models, existing methods suffer from a representation gap: continuous approaches offer analytical precision but are visually abstract, whereas discrete methods provide intuitive clarity at the expense of geometric precision. To bridge this gap, we introduce Brep2Shape, a novel self-supervised pre-training method designed to align abstract boundary representations with intuitive shape representations. Our method employs a geometry-aware task where the model learns to predict dense spatial points from parametric Bézier control points, enabling the network to better understand physical manifolds derived from abstract coefficients. To enhance this alignment, we propose a Dual Transformer backbone with parallel streams that independently encode surface and curve tokens to capture their distinct geometric properties. Moreover, the topology attention is integrated to model the interdependencies between surfaces and curves, thereby maintaining topological consistency. Experimental results demonstrate that Brep2Shape offers significant scalability, achieving state-of-the-art accuracy and faster convergence across various downstream tasks.
Paper Structure (69 sections, 1 theorem, 26 equations, 10 figures, 13 tables)

This paper contains 69 sections, 1 theorem, 26 equations, 10 figures, 13 tables.

Key Result

Theorem 4.1

For a $C^2$ continuous boundary curve $\mathcal{C}$ discretized via the first-order Lagrange interpolant $\mathcal{L}_i(t)$ with a maximum step size $h$, the RMSE $E_{RMSE}$ satisfies: This indicates that the approximation error vanishes quadratically with respect to the maximum step size.

Figures (10)

  • Figure 1: (a) Representation gap between continuous methods and discrete methods. (b) Overview of Brep2Shape. Our self-supervised pre-training task aligns precise expressions with intuitive geometries to learn generalizable representations for downstream tasks.
  • Figure 2: (a) Position and (b) weight modifications of a single control point lead to opaque spatially-varying shape deformations.
  • Figure 3: Overview of Dual Transformer. (a-b) Topology Attention: Face and edge streams incorporate cross-stream geometric features as attention biases to encode topological adjacency. (c) Decomposition: Entities in B-rep models are near-losslessly decomposed into Bézier primitives. (d) Tokenization: Hierarchical aggregation of Bézier primitives into entity-level embeddings (face or edge tokens).
  • Figure 4: Scaling behavior of Brep2Shape. Top: Scaling pre-training data from 25k to 250k with a fixed 6-layer Dual Transformer. Bottom: Scaling model size from 2 to 12 layers using a fixed 50k uniform subset. Dashed lines denote the performance of the state-of-the-art BRT baseline. Overall, increasing data scale or model size leads to consistent improvements in pre-training and downstream tasks.
  • Figure 5: Limited data generalization analysis on MFCAD++ and TMCAD under varying numbers of labeled training samples.
  • ...and 5 more figures

Theorems & Definitions (4)

  • Remark 3.1: Why topology matters for Brep2Shape
  • Remark 3.2: Edge-level supervision as a cross-entity consistency signal
  • Theorem 4.1: Quadratic convergence for boundary approximation
  • proof