create_contour
Creates or regenerates a 2D contour toolpath in the active machine group from selected chains, with tool-sized lead in/out moves and specified depth.
Instructions
Create and regenerate a 2D contour toolpath in the active machine group. Closed chains run clockwise, so comp_side left cuts outside and right cuts inside. Lead in/out arcs and lines are sized to the tool.
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": {
"tool_number": "<tool_number>",
"depth": "<depth>"
},
"name": "create_contour"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lead | No | Lead in/out: {"line": length, "arc_radius": r} (default both 100% of the tool diameter), or false for none | |
| name | No | ||
| chain | No | Geometry to machine: {"entity_ids": [..]} (ids from list_geometry), or {"level": n, "depth": z or "all", "closed_only": bool}: curves lying flat in the tool plane. Omit = all levels. If curves are at several depths, depth (plane Z) is required. Closed chains run clockwise seen from the plane, so comp_side left = outside, right = inside. | |
| depth | Yes | Final depth (absolute Z unless linking.depth_incremental) | |
| plane | No | Tool plane: top, front, back, bottom, left, right or a plane name (HMC: front = B0). Curves are chained in this plane | |
| coolant | No | flood, mist, thru or off | |
| linking | No | Heights: {"clearance", "retract", "feed_plane", "top_stock"} are absolute Z unless the matching "*_incremental": true (also "depth_incremental"); "clearance_on", "retract_on", "rapid_retract". For drilling, feed_plane is the R plane. | |
| subtype | No | basic, chamfer_2d, ramp_2d, remachining_2d, oscillate_2d | |
| comp_side | No | left or right of the chain direction | |
| comp_type | No | computer, control, wear, reverse_wear, off | |
| feed_rate | No | ||
| depth_cuts | No | Multiple Z steps: {"max_rough_step", "finish_cuts", "finish_step"} | |
| parameters | No | Any other parameter by path, e.g. {"LeadInOut.Enabled": true}. See get_operation_parameters for names. | |
| leave_stock | No | Stock to leave on walls (default 0) | |
| plunge_rate | No | ||
| tool_number | Yes | ||
| retract_rate | No | ||
| length_offset | No | H number (default: the tool's) | |
| spindle_speed | No | ||
| diameter_offset | No | D number (default: the tool's) | |
| leave_stock_floor | No |