add_mate
Mate faces of two components or add multiple mates in one call; choose coincident, distance, parallel, perpendicular, angle, or concentric and receive per-mate results.
Instructions
Mate a face of one component to a face of another, or add several mates in one call.
comp_a/comp_b are component names ('Bed' or 'Bed-1'; 'Leg-1/Thigh-1' inside
a sub-assembly). face_a/face_b select a face in that component's OWN frame:
by direction "+x"/"-x"/"+y"/... (optionally "+y:inner" for the cavity side
of a hollow part), by its list_faces(component=...) index, "#5", or by a
point on it, "@x,y,z" (a hole's wall: its centre plus the radius along x).
mate_type between planar faces:
"coincident", "distance" (distance_mm), "parallel", "perpendicular" or
"angle" (angle_deg between the faces' normals, 0..180); "concentric" between
two cylindrical faces (a pin in a hole, a hinge axis), leaving the turn
about the axis free. flip takes the other solution: the mirror side of a
distance, the other turning direction of an angle. A distance or angle
mate returns its dimension: drive it with
set_dimension, or step it with check_motion. An angle mate's dimension
then turns the joint the whole way round, past 180 and below 0 (-30 is 30
the other way, the same turn as 330). The result is measured back
after the rebuild; a mate that does not hold is removed and the components
are put back.
Several at once: mates=[{"comp_a": "Bolt-1", "face_a": "#3", "comp_b": "Plate-1", "face_b": "#12", "mate_type": "concentric"}, ...], each with the arguments above. stop_on_error=True stops at the first that fails; the mates before it stay. Returns a result per mate (its name and dimension, or the error), how many were added, failed and not tried, and the mate count.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "add_mate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flip | No | ||
| mates | No | ||
| comp_a | No | ||
| comp_b | No | ||
| face_a | No | ||
| face_b | No | ||
| angle_deg | No | ||
| mate_type | No | coincident | |
| distance_mm | No | ||
| stop_on_error | No |