Sweep a profile along a path
onshape_sweepSweeps closed sketch regions along another sketch's edges to create or combine solid bodies in an Onshape Part Studio.
Instructions
Sweep the closed regions of one sketch along the edges of another.
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>",
"profile": "<profile>",
"path": "<path>"
},
"name": "onshape_sweep"
}
}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 "Sweep"). | |
| path | Yes | Feature id of the path sketch. | |
| profile | Yes | Feature id of the profile sketch. | |
| validate | No | Re-read the feature list afterwards and fail if the feature regenerated with an error (default true). |