Hole
part_holeCreates a hole feature on a planar face in KOMPAS-3D, optionally threaded, with through/blind depth and point or reference-distance positioning.
Instructions
Hole feature on a planar face (appears as «Отверстие» in the tree), optionally with a cosmetic thread from KOMPAS's own thread database (ГОСТ 24705-2004 by default: 'M8' = coarse pitch, 'M20x1.5' = fine). Position: at=[x, y] — a point on the face (on faces parallel to XY these are the global X, Y; required for round faces, which take no references) — or distances dist1/dist2 from two references ref1/ref2. With a thread and no diameter the hole diameter is the thread's minor diameter D1 from that database (M8 -> 6.647); pass diameter to use a tap drill instead (e.g. 6.8 for M8). Verified: the volume must shrink; receipt.removed_centroid_mm shows where the hole axis landed. For several identical holes use part_pattern on the result. 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>",
"face": "<face>"
},
"name": "part_hole"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | [x, y] point on the face (global X, Y on faces parallel to XY) | |
| doc | Yes | Document handle from doc_list/doc_open, e.g. 'doc:12001:0a1b2c3d' | |
| end | No | blind hole bottom: 118° drill point or flat | cone |
| face | Yes | topo: planar face the hole starts on (select ... extreme) | |
| name | No | Meaningful feature name for the tree, e.g. 'Отв_крепёжные_6xD11' | |
| ref1 | No | first position reference: topo: side face / straight edge of a straight-edged face, or a default plane XY|ZX|ZY (from ZY the distance goes to +X, from ZX to -Y) | |
| ref2 | No | second position reference, not parallel to ref1 | |
| depth | No | mm (blind hole) | |
| dist1 | No | mm from ref1 to the hole axis | |
| dist2 | No | mm from ref2 to the hole axis | |
| thread | No | e.g. 'M8', 'M20x1.5' | |
| through | No | through all | |
| diameter | No | mm; optional when thread is given | |
| standard | No | thread.db table, default 'cil1_24705-2004' | |
| thread_length | No | mm; default = whole hole |