cam_post
Post-process Fusion CAM setups or operations to G-code using a named post, save .nc files, and return paths, line counts, and initial lines for verification.
Instructions
Post-process to G-code; returns the .nc paths, line counts and the first head_lines lines.
post: a post from Fusion's library by name ('fanuc.cps') or a system:// URL. targets: setup/operation names (default: all operations of the last setup), which need valid toolpaths. output_dir default: /test_output/nc. split: 'auto' posts one program, but Fusion for Personal Use refuses tool changes in one program, so it then writes one program per tool (_01_T1.nc, ...; run them in order); 'tool' always splits; 'none' fails instead. Files Fusion writes to its default NC folder are moved to output_dir. A bad adsk.cam call can crash Fusion: if status reports last_crash, do not repeat that call unchanged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cam_post"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post | No | fanuc.cps | |
| setup | No | ||
| split | No | auto | |
| targets | No | ||
| filename | No | ||
| timeout_s | No | ||
| head_lines | No | ||
| output_dir | No | ||
| program_name | No | 1001 | |
| allow_user_document | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |