Chamfer edges
chamferBevels sharp edges with an equal-distance chamfer, cutting the same amount off both faces for lead-ins and bolt or shaft tips. Appends the feature to the tree and returns its ID and health.
Instructions
Bevel edges with an equal-distance chamfer: a flat, angled cut that takes the same
distance off both faces at each edge (a 45 degree bevel on a right-angle edge). Use it for
lead-in bevels, bolt and shaft tips and to break sharp edges; use fillet instead for a
rounded blend. The part must already exist (extrude first) and the edge IDs come from
get_body_details. It appends one chamfer feature at the end of the feature tree and
returns its feature_id, name and health (OK / WARNING / ERROR - a distance too large for
the geometry gives ERROR with a warning, but the feature still exists). It does not measure
the result: confirm with get_part_properties (the volume drops) or a screenshot. Change
the size later with update_feature (parameter width), remove it with delete_feature.
Only equal distances are supported; for a two-distance or distance-and-angle chamfer use
add_feature with raw JSON.
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": {
"document_id": "<document_id>",
"element_id": "<element_id>",
"edge_ids": "<edge_ids>",
"distance": "<distance>"
},
"name": "chamfer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Feature name shown in the tree. | Chamfer |
| distance | Yes | How far the bevel reaches from the edge along BOTH faces: a number in the configured unit (mm by default), a string with a unit ('0.5 in') or an expression ('#c'). It must fit the adjacent faces, or Onshape reports ERROR. | |
| edge_ids | Yes | Edge IDs to bevel, from get_body_details (include_edges is on by default). IDs can change when the part is rebuilt, so read them again after other edits. | |
| element_id | Yes | Element (tab) ID: the string after /e/ in the Onshape URL. Get it from get_document. | |
| document_id | Yes | Onshape document ID: the 24-character hex string after /documents/ in the document URL. Get it from list_documents. | |
| workspace_id | No | Workspace ID (the string after /w/ in the URL). Optional - defaults to the document's main workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||