Cut a hole
onshape_holeExtrude a sketch as a cut (REMOVE) to create a hole through a body. Sketch a circle first, then set depth beyond the body for a through-hole.
Instructions
Extrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the 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>",
"sketch": "<sketch>",
"depth": "<depth>"
},
"name": "onshape_hole"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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. | |
| name | No | Feature name shown in the tree (default "Hole"). | |
| depth | Yes | Cut depth in inches; make it deeper than the body to cut through. | |
| sketch | Yes | Feature id of the sketch to cut with. | |
| validate | No | Re-read the feature list afterwards and fail if the feature regenerated with an error (default true). | |
| depth_variable | No | Use a Part Studio variable for the depth. |