BRepNet: Neural Networks for CAD B-Reps
- BRepNet is a neural network architecture that operates directly on CAD boundary representations using oriented coedges to capture precise geometry and topology.
- It defines convolutional kernels over inherent B-rep connectivity, achieving state-of-the-art segmentation (92.52% accuracy, 77.10% IoU) with significantly fewer parameters.
- BRepNet preserves full CAD precision, overcoming limitations of mesh and point-based methods and enhancing efficiency in 3D geometry analysis.
Boundary representation neural networks (BRepNet) are a class of neural network architectures designed to operate directly on the native boundary representation (B-rep) data structures used in Computer-Aided Design (CAD). Unlike conventional deep learning models for 3D geometry, which rely on polygon meshes or point clouds and thus lose or approximate intrinsic CAD structure, BRepNet leverages exact parametric geometry and topological connectivity at the coedge level. By defining kernels over the oriented coedges inherent to B-reps, BRepNet achieves state-of-the-art accuracy for per-face operation segmentation, with a significantly reduced parameter count compared to mesh and point-based approaches (Lambourne et al., 2021).
1. Overview and Motivation
Boundary representations (B-reps) are the standard for describing 3D solid models in CAD, consisting of trimmed parametric surfaces (faces), curves (edges), and vertices. Manifold topology is encoded via rich pointer structures—particularly oriented coedges, which link faces and edges via circular doubly-linked lists for each loop. Existing deep learning approaches for 3D shapes predominantly utilize triangle meshes or point clouds, leading to three primary limitations: loss of exact parametric geometry, computational cost due to meshing or sampling, and discarding of rich topological relationships. BRepNet is the first neural network architecture that operates directly on native B-rep data structures, defining learnable convolutional kernels over neighborhoods of oriented coedges accessed via inherent topological pointers (next, previous, mate, face, edge). This design tightly couples the model’s receptive field with the CAD model’s native structure, preserving the full precision and connectivity of the input while enabling superior segmentation performance with fewer parameters.
2. Formal Structure of B-Rep Entities
B-rep solid models consist formally of a set of entities:
- Vertices:
- Edges: , each realized as a parametric curve carrying two oriented coedges, one for each direction.
- Faces: , each a clipped parametric surface bounded by loops.
- Coedges: , each with an explicit orientation.
Key binary adjacency and incidence matrices connect these entities:
- if is the next coedge after in the same loop.
- , so if $c_j$ is previous to .
- if is the mate (opposite orientation) of —these are two coedges for the two directions along the same B-rep edge.
- Incidence matrices: , if borders ; , if lies on .
This formalism enables message-passing and convolution exactly along the data structure that defines the shape and logical history of a CAD solid.
3. Kernel Design and Message Passing Mechanism
At the core of BRepNet is the definition of convolutional kernels with respect to oriented coedges. The model maintains hidden-state feature matrices at each layer : , , , where is the entity embedding size. For each coedge , neighboring face, edge, and coedge features are aggregated by applying products of pointer/incidence matrices (kernel walks) to define , , —sequences that determine how each kernel gathers features via the B-rep’s intrinsic connectivity. For a given coedge , the message-passing step concatenates (row-wise) the gathered hidden states into . This is passed through a two-layer MLP with ReLU activation to yield outputs for coedge, face, and edge features at the next layer; pooling is used to aggregate coedge-leveled features onto faces and edges. Final segmentation predictions are pooled per face using a max operator.
4. Network Architecture and Input Encoding
BRepNet employs three types of input features:
- Faces: one-hot encoding of surface type (plane, cylinder, cone, sphere, torus, other) and the face area.
- Edges: one-hot encoding of curve type (line, circle, ellipse, helix, intersection), curve convexity flag (concave/convex/smooth), closed-loop status, and edge length.
- Coedges: binary flag indicating if the coedge direction matches the parametric direction of its edge.
Two convolution units are stacked by default, each operating as described in the message passing mechanism. The final unit outputs only the segmented predictions (8 classes, corresponding to specific modeling operations) with per-face aggregation performed by max-pooling over all of a face’s bounding coedges. The loss is the per-face cross-entropy:
where is the number of operation classes.
5. Fusion 360 Gallery Segmentation Dataset
BRepNet was evaluated on the Fusion 360 Gallery segmentation dataset, which provides 35,858 B-rep CAD models obtained from the Autodesk Fusion 360 Gallery. Each model has faces annotated by one of eight modeling operations: ExtrudeSide, ExtrudeEnd, CutSide, CutEnd, Fillet, Chamfer, RevolveSide, RevolveEnd. The dataset contains only these four operation types to ensure consistent annotation; further distinctions, such as additive/subtractive or “side”/“end,” yield the eight-class segmentation problem. The dataset is split into 70% train (30,459 bodies), 15% validation, and 15% test (5,399 bodies). For baseline comparisons, high-quality triangle meshes (approximately 3,000 triangles per model) and uniformly-sampled point clouds (2,048 points per model) are provided. Additional per-operation and per-face metadata support history recovery and further analysis.
6. Experimental Results and Performance Analysis
Segmentation accuracy and intersection-over-union (IoU) metrics establish BRepNet as the leading architecture for CAD operation segmentation on the Fusion 360 Gallery dataset. Comprehensive ablation studies were conducted to explore kernel design and input features:
| Kernel Variant | Accuracy (%) | IoU (%) | Parameters (×10³) |
|---|---|---|---|
| Simple edge | 91.02 ± 0.20 | 74.03 ± 0.55 | 359 |
| Asymmetric | 91.66 ± 0.17 | 75.01 ± 0.54 | 359 |
| Asym+ | 91.82 ± 0.13 | 75.06 ± 0.71 | 358 |
| Asym++ | 92.05 ± 0.07 | 75.69 ± 0.38 | 359 |
| Winged edge | 92.52 ± 0.15 | 77.10 ± 0.54 | 359 |
| Winged edge+ | 92.50 ± 0.15 | 76.86 ± 0.47 | 357 |
| Winged edge++ | 92.50 ± 0.12 | 77.14 ± 0.44 | 358 |
The most effective configuration is the “winged edge” kernel variant, which achieves 92.52% accuracy and 77.10% IoU. Removal of individual input features (surface type one-hot, curve type one-hot, edge convexity flag, edge length, face area) degrades IoU by up to 4.6 percentage points, confirming the contribution of parametric information. Comparison to state-of-the-art mesh and point-based networks demonstrates that BRepNet outperforms these alternatives, for example:
| Method | Per-face Accuracy (%) | IoU (%) | Parameters (k) |
|---|---|---|---|
| BRepNet | 92.52 ± 0.15 | 77.10 ± 0.54 | 359 |
| ECC | 90.36 ± 0.23 | 72.08 ± 0.50 | 359 |
| PointNet++ | 74.00 ± 0.84 | 34.78 ± 2.23 | 1,404 |
| MeshCNN | 62.99 ± 0.37 | 20.59 ± 0.41 | 2,280 |
ECC (Edge-Conditioned Convolution [Simonovsky2017]) was trained on the face-adjacency graph with coedge and edge features. MeshCNN and PointNet++ results were obtained using their official implementations and prescribed hyperparameters. BRepNet achieves superior accuracy and IoU while using only about one-quarter of the parameters of PointNet++ and MeshCNN (Lambourne et al., 2021).
7. Implementation Details
BRepNet was implemented using PyTorch and trained on NVIDIA Tesla V100 GPUs. Optimization used Adam (learning rate , , ) with mini-batches of approximately 1,000 faces each (multi-model batches were formed by block-diagonalizing the adjacency and pointer matrices). Training ran for 50 epochs (final model selected by lowest validation loss), with each epoch requiring ≈45 seconds (total ≈12 minutes). No data augmentation was used; features are coordinate-free and defined only by the B-rep combinatorics and native parametric attributes. For baseline comparisons, official implementations of PointNet++ (TensorFlow), MeshCNN (PyTorch), and ECC (PyTorch-Geometric NNConv) were used with their recommended hyperparameters.
A plausible implication is that BRepNet’s utilization of rich CAD-native topology and geometry overcomes key limitations of mesh and point cloud methods, both in accuracy and computational efficiency, and suggests promise for further end-to-end CAD-centric deep learning research (Lambourne et al., 2021).