Edit / delete feature
feature_editModify an existing KOMPAS-3D feature by changing its parameters, renaming it, excluding it from calculation, or deleting it, with automatic backup and single-step undo if verification fails.
Instructions
Change an existing feature: params = its parameters, as listed by inspect_model(obj=…) under definition.params / editable — extrusion {depth, depth2, direction normal|reverse|both|middle, through, sketch}, revolve {angle, axis}, fillet {radius}, chamfer {distance, angle}, shell {thickness, outward}, hole {diameter, depth, through}, circular_pattern {count, step (null = even over 360°), axis}, linear_pattern {count, step, axis}, offset_plane {offset, reverse}, sketch {: mm or an expression such as a part variable name}; one Ctrl+Z, and the call is rolled back if this or any other feature breaks. To keep a parameter driven by a part variable use variables_set(expr) instead. Also: rename, exclude from / include in the calculation, or delete (delete=true: dependent features may break — then the call is rolled back; ask the user before deleting anything they built). NOTE: renaming is not undoable by Ctrl+Z in KOMPAS. Returns a receipt: created object handles, volume/mass before and after, backup path. The whole call is ONE Ctrl+Z for the user; if verification fails the model is restored and VERIFY_FAILED is returned.
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>",
"obj": "<obj>"
},
"name": "feature_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document handle from doc_list/doc_open, e.g. 'doc:12001:0a1b2c3d' | |
| obj | Yes | obj: handle from inspect_model/receipt, or '$N' inside batch | |
| delete | No | delete the feature | |
| params | No | new parameter values, e.g. {'depth': 15, 'direction': 'reverse'} | |
| rename | No | new meaningful name | |
| exclude | No | true = exclude from calculation |