PrimAsm: A Benchmark and Learning Framework for Primitive Geometric Constraint Prediction in CAD Assembly

Zhen Xia, Shuai Zhao, Chenyang Du, Lin Luo, Zhaorui Xiang, Ziyue Zhu, Yuli ChenarXiv 2026

TL;DR

In parametric CAD, engineers don't assemble parts by typing in 3D coordinates—they declare symbolic rules like "this face is coincident with that face" or "these two cylinders are concentric," and let a geometric constraint solver do the math. This paper introduces PrimAsm, a massive dataset of 1.8M real-world primitive constraints, and GeCoNet, a neural network that takes two unposed 3D CAD parts and predicts the exact set of face-to-face constraints needed to snap them together in one pass.

What Problem Does This Paper Address?

Assembly modeling takes up roughly a third of a CAD engineer's workflow. Instead of prescribing rigid 6-DoF poses, engineers specify primitive geometric constraints between boundary-representation (B-Rep) entities—faces, edges, and vertices—which a downstream geometric constraint solver (GCS) then resolves into a valid 3D arrangement.

Existing machine learning approaches miss this mark in two ways:

  • Point-cloud pose predictors output numerical $\text{SE}(3)$ poses, which don't give a CAD solver the symbolic, entity-level rules it needs.
  • Joint/mate predictors assign a single high-level label (like "revolute") to a pair of parts, rather than the full set of primitive face-pair constraints that coexist between them.
Figure 2: Prediction targets in assembly: from point-cloud arrangement (Du et al. 2024), to part-pair joints (Jones et al. 2021), to primitive constraints on B-Rep face pairs.

The authors formalize primitive geometric constraint prediction: given two unposed B-Rep parts in their local coordinate systems, predict a set of typed cross-part face-pair constraints (coincident, concentric, parallel, perpendicular, tangent) along with their binary alignment attributes (Aligned vs. Anti-Aligned).

Methods

The authors propose GeCoNet, which predicts these constraints in one pass through three stages:

  • Topology-Aware B-Rep Encoder: Built on a replaceable B-Rep backbone (defaulting to AAGNet), it combines backbone features, analytic surface geometry embeddings, and a topological fingerprint (derived from Laplacian eigenvectors and neighbor surface-type histograms) to distinguish faces that look identical locally but play different structural roles. Edge-gated message passing across the face-adjacency graph adds local assembly context.
  • Type-Agnostic Top-$K$ Proposal: Since most cross-part face pairs aren't constrained, dense classification is wasteful and severely imbalanced. A proposal head scores each face's "objectness" and selects the top-$K$ candidate faces per part.
  • Type-Aware Relational Decoder: The candidate pools undergo intra-part self-attention and rounds of score-guided cross-attention, assisted by learnable context queries. Type-specific heads predict constraint logits—combining relational scores with zero-initialized geometric priors and masking out physically inadmissible surface combinations (e.g., concentric excludes planar faces)—while a shared head predicts alignment (Aligned / Anti-Aligned).
Figure 1: Manual versus automatic constraint specifica- tion. Engineers add each constraint, whereas GeCoNet pre- dicts a constraint set from an unposed part pair in one pass.

Datasets

The authors introduce PrimAsm, extracted from native SolidWorks assemblies in public CAD repositories:

  • Scale: 884K CAD part instances (exported to STEP) and 1.8M designer-authored inter-part constraints across seven types (coincident, concentric, parallel, perpendicular, tangent, distance, angle).
  • Density: Averages 2.02 constraints per part instance—higher constraint density than existing benchmarks like AutoMate (1.07) and JoinABLe (0.21).
  • Face-Level Track: Retains the 98.13% of constraints that are face–face, focusing on the five non-parametric types (distance and angle are excluded because they require continuous scalar regression). Data is split 80%/10%/10% by source assembly to prevent leakage.
Figure 3: Primitive geometric constraints and statistics of PrimAsm: (a)–(g) the seven constraint types with participating B-Rep faces highlighted, (h) the constraint-type distribution, and (i) the face-count distribution across parts in the benchmark.

Key Insights and Ideas

  • Pruning alone isn't enough: Simply using Top-$K$ pruning with a pairwise MLP doesn't resolve pair ambiguity; the type-aware relational decoder is what drives the jump in performance.
  • Topology matters: Ablating the topological fingerprint or intra-part geometric bias causes sharp drops in F1, showing that structural context is crucial for telling geometrically similar faces apart.
  • Relation scoring is the bottleneck, not proposal recall: An oracle Top-$K$ proposal adds only 0.34% CoverAcc, meaning the model is already finding the right candidate faces—the harder part is scoring their exact relationships.
  • Strong rotational robustness: At inference, GeCoNet is nearly unaffected by independent random rotations of the input parts, and degrades only modestly under additional random translations, without any retraining.

Key Results

On the PrimAsm face-level track:

  • Overall: GeCoNet + AAGNet achieves 73.02% recall, 54.48% CoverAcc, 28.53% micro-F1, and 34.19% macro-F1, outperforming the strongest non-learning baseline (geometric $k$-NN: 14.33% CoverAcc, 25.06% micro-F1) and the best learning-based baseline (Dense AAGNet MLP: 35.28% CoverAcc, 22.39% micro-F1).
  • Encoder generality: Across six different B-Rep encoders (including JoinABLe, UV-Net, and BRepNet), GeCoNet consistently beats all baselines in CoverAcc and macro-F1.
  • Per-type performance: GeCoNet + AAGNet leads in average F1 (27.22%) and CA@3 (53.34%), with particular strength on concentric (32.59% F1) and the rare perpendicular (24.00% F1) types.

Limitations and Future Work

  • Scope of constraints: The current face-level task excludes distance and angle constraints (which require continuous parameter regression) as well as constraints involving B-Rep edges. Extending GeCoNet to handle these is left for future work.
  • Safety: As with any automated CAD tool, predicted constraints should be validated before being used in safety-critical engineering applications.

Summary updated

BibTeX
@misc{xia2026primasm,
  author = {Zhen Xia and Shuai Zhao and Chenyang Du and Lin Luo and Zhaorui Xiang and Ziyue Zhu and Yuli Chen},
  title = {{PrimAsm: A Benchmark and Learning Framework for Primitive Geometric Constraint Prediction in CAD Assembly}},
  year = {2026},
  eprint = {2612.03120},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.03120},
}
Figure