Edit assembly
asm_editMove, replace, or delete components and remove mates in a KOMPAS-3D assembly, with mate-aware placement and automatic restore if validation fails.
Instructions
Change what is already in an assembly (handles: inspect_model(sections=['components']) lists components with placement and the mates). action=move: place a component by numbers — origin [x,y,z] mm and/or its x_axis + z_axis directions; mates and fixed keep the coordinates they constrain (the answer shows held_by_mates). replace: put another file (path) in place of a component; its mates are re-evaluated (broken_mates lists the ones to re-create). delete: remove a component; delete_mate: remove a mate. Ask the user before deleting or replacing what they placed. Returns a receipt; one Ctrl+Z for the user; on a failed check the assembly is restored (VERIFY_FAILED).
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>",
"action": "<action>",
"target": "<target>"
},
"name": "asm_edit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Assembly document handle | |
| path | No | replace: .m3d/.a3d file inside the allowed roots | |
| action | Yes | ||
| origin | No | move: new origin of the component, mm | |
| target | Yes | obj: handle of the component (or of the mate for delete_mate) | |
| x_axis | No | move: direction of the component's X axis in assembly coordinates | |
| z_axis | No | move: direction of its Z axis (perpendicular to x_axis) |