cam_add_operation
Adds a machining operation to a Fusion CAM setup using a chosen strategy, tool, geometry, and parameters, returning parameter errors for invalid settings.
Instructions
Add an operation to a setup with a tool from cam_list_tools (made with Tool.createFromJson).
strategy: a name from cam_list_strategies (face, contour2d, pocket2d, adaptive2d, drill, ...). geometry, the selections a strategy needs: {"holes": {"diameter_mm": 16, "tol_mm": 0.01}} or {"holes": "all"}: hole faces for drill/bore; {"contour": "outline", "side": "outside"}: contour2d on the part's base silhouette (climb cut). params / params_json: Fusion parameter name -> value. Strings are expressions and LENGTHS NEED UNITS ('1 mm', '-0.5 mm'); bools become true/false; numbers are unitless. Verified names: contour2d bottomHeight_offset, doMultipleDepths, maximumStepdown; drill drillTipThroughBottom, breakThroughDepth, cycleType ("'drilling'", "'deep-drilling'"), incrementalDepth; any op tool_spindleSpeed, tool_feedCutting. tool_number: default reuses the number of the same tool, else the next free one (H/D offsets follow). Returns parameter_errors for any names that did not apply.
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": {
"strategy": "<strategy>",
"tool_id": "<tool_id>"
},
"name": "cam_add_operation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| setup | No | ||
| params | No | ||
| tool_id | Yes | ||
| geometry | No | ||
| strategy | Yes | ||
| timeout_s | No | ||
| params_json | No | ||
| tool_number | No | ||
| allow_user_document | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |