Cut a hole
onshape_holeExtrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the body: end_type THROUGH_ALL needs no depth. A sketch on a body's face points out of the body, so pass opposite to cut into it.
Instructions
Extrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the body: end_type THROUGH_ALL needs no depth. A sketch on a body's face points out of the body, so pass opposite to cut into it.
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 | No | Cut depth in inches; the total depth when symmetric. Required unless THROUGH_ALL or depth_variable. | |
| sketch | Yes | Feature id of the sketch to cut with. | |
| 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 for the depth. |