Task
Given a STEP assembly and a set of faces selected on one part in it, find every place in the assembly where those faces fit or mate, and highlight all of them.
Two example cases to keep in mind while building this:
- Select the 4 faces of a lathe chuck key → find the matching slot(s) in the chuck (there may be more than one, e.g. a 4-jaw chuck with 4 identical key slots).
- Select the sliding faces of a bench vice jaw → find the counterpart faces on the vice body that they slide against.
Inputs
- STEP file of a single part
- Faces selected on that part (face IDs)

Single Key-part with faces-to-be-mated selected (green)
- STEP file of the assembly the part belongs to, containing the other parts to search for a fit

Example assembly:
WM290V_RedrawStart.stp
CAD-model page link; if the attached-file doesn’t download.
<aside>
💡
You can split this assembly into smaller sub-assemblies while testing; to ease any iterative runs.
It is encouraged to test your algorithm on more assemblies to fully validate your solution !
</aside>
Output
- Every other face (or face group) in the assembly that the selected faces fit against or mate with
- Which part(s) each match is on
- All matching instances, not just one

for the selection in img1; 3 candidate parts are highlighted. These have faces that the key’s selection-faces can mate with.
Approach
Your call. whatever fits (no pun intended). Take inspiration from assembly-mating modules across CAD software. Justify your approach, and why it felt like the best soln.
What makes it hard
- Has to work for any selection of faces, not just a single hole or a known fastener shape — hardcoded "circular hole" matching fails.
- Faces come in different types (planar, cylindrical, conical, spherical, freeform) and matching has to at least handle the common ones. Planes, cylinders, cones, spheres are acceptable face-choices.