constrain
Position two components relative to each other using origin geometry, faces, or circular edges, and report any other components that move.
Instructions
Constrain two components, at any depth — by origin geometry, faces or circular edges. Prefer origin geometry: it survives part edits; face and edge numbers change with the topology.
References: "Part:1#XY" / "#XZ" / "#YZ" / "#X" / "#Y" / "#Z" / "#ORIGIN" (origin geometry), "Sub:1/Part:1#F12" (face, from find_faces), "Sub:1/Bolt:1#E4" (edge, from find_edges). A list index works as the component: "2#XY".
Says which OTHER components the constraint moved — one can drag parts you didn't mean to touch.
Args: a, b: References; a is the one meant to move. kind: "mate" (faces against each other, axes in line), "flush" (faces the same way), "angle", or "insert" (two circular edges: a bolt into a hole). offset: mm for mate / flush / insert. Its sign is easy to get wrong — give a_at too. angle: Degrees for kind="angle". a_at: Where a's face must end up, e.g. {"Z": 182.5}. If it lands elsewhere, the offset is tried with the other sign. axes_opposed: For insert: True = the components face each other (normal bolt / hole case).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"a": "<a>",
"b": "<b>"
},
"name": "constrain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes | ||
| a_at | No | ||
| kind | No | mate | |
| angle | No | ||
| offset | No | ||
| instance | No | Which connected Inventor to use (list_instances). Leave empty when only one is connected. | |
| axes_opposed | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |