Extrude a sketch
onshape_extrudeExtrude the closed regions of a sketch into a solid. op=NEW makes a body, ADD merges into existing bodies, REMOVE cuts them, INTERSECT keeps the overlap. end_type picks blind, symmetric or through-all; opposite flips the direction.
Instructions
Extrude the closed regions of a sketch into a solid. op=NEW makes a body, ADD merges into existing bodies, REMOVE cuts them, INTERSECT keeps the overlap. end_type picks blind, symmetric or through-all; opposite flips the direction.
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>"
},
"name": "onshape_extrude"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | NEW makes a new body; ADD/REMOVE/INTERSECT combine with existing bodies (default NEW). | |
| 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 "Extrude"). | |
| depth | No | Extrusion depth in inches; the total depth when symmetric. Required unless THROUGH_ALL or depth_variable. | |
| sketch | Yes | Feature id of the sketch to extrude. | |
| end_type | No | BLIND goes `depth` along the sketch normal (default); SYMMETRIC goes `depth` in total, half each side of the sketch plane; THROUGH_ALL goes past every body and ignores `depth`. | |
| opposite | No | Go against the sketch normal instead of along it. Not with SYMMETRIC. | |
| 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 (by name) for the depth instead. |