Measure clearance between two bodies
onshape_clearanceMinimum distance between two solid bodies in the same Part Studio, each named by part id or by the feature that created it. 0 (clear: false) means they touch or overlap, so this is also the interference check — e.g.
Instructions
Minimum distance between two solid bodies in the same Part Studio, each named by part id or by the feature that created it. 0 (clear: false) means they touch or overlap, so this is also the interference check — e.g. a bracket against a dummy servo body. Returns inches and millimetres, plus the closest point on each body.
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": {
"doc": "<doc>",
"ws": "<ws>",
"elem": "<elem>",
"a": "<a>",
"b": "<b>"
},
"name": "onshape_clearance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | The first body: give exactly one of part or feature. | |
| b | Yes | The second body: give exactly one of part or feature. | |
| ws | Yes | Workspace id — the <ws> segment of the document URL. | |
| doc | Yes | Document id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>. | |
| elem | Yes | Element id (tab) — the <elem> segment of the document URL. |