Add Sketch Constraint
add_sketch_constraintAdd geometric or dimensional constraints to a FreeCAD sketch to control edge, vertex, and center relationships and set numeric values.
Instructions
Add a constraint to a sketch.
type: Coincident, Horizontal, Vertical, Distance, DistanceX, DistanceY, Radius, Diameter, Equal, Parallel, Perpendicular, Tangent, Block, Symmetric, Angle. refs: list of [geom_idx, vertex_role] pairs. vertex_role: 0=edge, 1=start, 2=end, 3=center. value: numeric value (mm or radians) for dimensional constraints.
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": {
"sketch": "<sketch>",
"type": "<type>",
"refs": "<refs>"
},
"name": "add_sketch_constraint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| refs | Yes | ||
| type | Yes | ||
| value | No | ||
| sketch | Yes | ||
| workspace | No | Run this call in this named workspace |