add_mate_by_face_position
Mate two components by selecting face positions like top or bottom, avoiding locale-sensitive face indexing. Resolves position keywords to matching faces for each component.
Instructions
Crea un mate entre dos componentes usando posiciones de cara.
Conveniencia: en lugar de copiar nombres de entidades sensibles a locale ("Cara<1>@bracket-1@assy"), nombras la cara por su posición relativa en el componente — "top"/"bottom"/"left"/"right"/"front"/ "back". El tool resuelve la cara cuyo normal apunta en el eje pedido. [en: Mate two components by face position — convenience wrapper avoiding locale-sensitive face-index or entity-name handling. Resolves position keywords to the matching face on each component.]
Args: component1_name, component2_name: SW component instance names from get_active_assembly_info, e.g. "Pieza1-5" / "Pieza1-6". face1_position, face2_position: One of "top", "bottom", "left", "right", "front", "back". Interpreted in each component's local coordinate frame: - top = +Y (highest Y face) - bottom = -Y (lowest Y face) - right = +X left = -X - back = +Z front = -Z (the original sketch face for an extrusion in +Z direction). For Pieza-style box parts inserted at default orientation this matches viewport intuition. mate_type: "coincident" (parts touch face-to-face) or "distance" (parts maintain a fixed offset). distance_mm: Required for "distance" mates; ignored for "coincident". align: "ALIGNED" (face normals same direction — parts overlap) or "ANTIALIGNED" (face normals opposite — parts touch). Default "ANTIALIGNED" because that's the typical stacking intent.
Example — stack Pieza1-6 on top of Pieza1-5: add_mate_by_face_position( "Pieza1-5", "top", "Pieza1-6", "bottom", mate_type="coincident", )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| align | No | ANTIALIGNED | |
| mate_type | No | coincident | |
| distance_mm | No | ||
| face1_position | Yes | ||
| face2_position | Yes | ||
| component1_name | Yes | ||
| component2_name | Yes |