Brep2Shape: Boundary and Shape Representation Alignment via Self-supervised Transformers
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 framework designed to align abstract boundary representations with intuitive shape representations. Our framework 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. Additionally, the topology attention is integrated to model the inherent 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. Code is available at this repository: https://github.com/thuml/Brep2Shape.
Lay Summary
Modern computer-aided design systems store 3D objects in a highly precise format that is very useful for engineering, but difficult for machine learning models to understand directly. Existing methods often face a trade-off: some keep the exact mathematical details of the design but are hard to relate to the object’s visible shape, while others use simpler shape descriptions that are easier to interpret but lose important geometric accuracy. This gap makes it harder for AI systems to learn from real-world CAD models. We propose Brep2Shape, a training framework that helps AI models connect precise CAD design data with the actual 3D shapes people see. Instead of relying on manual labels, our method teaches the model to infer dense points on an object’s surfaces and edges from compact design information. This encourages the model to understand how abstract design descriptions correspond to physical shapes. We also design the model to treat surfaces and curves separately while still learning how they are connected. Experiments show that Brep2Shape helps models learn faster and perform better on several CAD understanding tasks. This can support more accurate and scalable AI tools for design, manufacturing, and engineering analysis.