add_sketch_relation
Add geometric relations (horizontal, parallel, tangent, symmetric) to open sketch entities by ID, constraining under-defined geometry. User dimensions and relations are protected from conflicts.
Instructions
Add a geometric relation in the open sketch. Entities are given by id (drawing order; see list_sketch_entities): 3 for a whole entity, '3:start', '3:end' or '3:center' for one of its points, or 'origin'. A relation that contradicts a size the tools added from the drawing (named DrawnN) replaces it (the result says which); one that contradicts the user's own dimensions or relations is refused, naming them, and not left in the sketch. Under-defined geometry is free to move, so for 'symmetric' first define the centerline (dimensions or relations) if it must stay put. 'fix' is refused in a part sketch (dimension from the user's references instead) and allowed in an assembly sketch.
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": {
"relation": "<relation>",
"entities": "<entities>"
},
"name": "add_sketch_relation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit of the 'edge:x,y,z' points (mm, cm, m, inch or ft) | |
| entities | Yes | Entity references as strings, e.g. ['1'], ['2', '4'], ['origin', '1:start'], or a model edge by a point on it: ['1:center', 'edge:80,40,5'] | |
| relation | Yes | Relation type. horizontal/vertical take one line or two points; merge takes two points; symmetric takes two entities (or two points) plus a centerline. |