assembly_create_joint
Join two parts with a specified joint type in the root component, moving the first part's snap point onto the second so assembly motion is defined.
Instructions
Join two parts with a joint (created in the root component): geometry_one's part moves so its snap point lands on geometry_two's.
Getting refs: call inspect_query(kind="edge" or "face", scope=["occurrence:Lid:1"]) and use the returned refs; entities inside occurrences look like '@' (e.g. 'AbC=@Lid:1'). A native ref of a component inserted once is accepted; if inserted several times you get INVALID_PARAMS with the candidate refs.
motion keys per type (default in brackets; 'x'|'y'|'z' are axes of the joint, a ref of an edge/axis/face sets a custom direction): rigid - none; revolute - axis [z]; slider - direction [z]; cylindrical - axis [z]; pin_slot - axis [z], slide_direction [x]; planar - normal [z], primary_slide_direction (ref); ball - pitch_direction [z], yaw_direction [x]. For a hinge pass the hinge edge as the axis.
Returns {"joint": {"ref", "name", "type", "occurrence_one", "occurrence_two", "values": {"rotation_deg" | "slide_mm" | ...}, "limits": {dof: {"min", "max", "rest"}}, "is_suppressed", "health", "message"}}. Nothing is left on failure.
Example: assembly_create_joint(type="revolute", geometry_one={"kind": "curve", "entity": "E1=@Lid:1"}, geometry_two={"kind": "curve", "entity": "E2=@Box:1"}, motion={"axis": "E2=@Box:1"}) -> {"joint": {"type": "revolute", "values": {"rotation_deg": 0.0}, "occurrence_one": "occurrence:Lid:1", ...}}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flip | No | Flip the direction of geometry_one | |
| name | No | Joint name | |
| type | Yes | Joint type (degrees of freedom) | |
| angle | No | Rotation about the joint Z: degrees or expression | |
| motion | No | Motion axes of the type; values 'x'|'y'|'z' or a ref, see below | |
| offset | No | Offset along the joint Z: mm number or expression | |
| geometry_one | Yes | Snap on the MOVING part (it moves to geometry_two) | |
| geometry_two | Yes | Snap on the part it joins |