cad_cam
Generate, simulate, and export 2.5-axis CNC toolpaths for contour milling and drilling from sketch geometry.
Instructions
Generate, simulate or export 2.5-axis toolpaths (contour + drilling).
聚合 CAM 工具。按 ``action`` 派发:
- ``toolpath``: 从当前文档的矩形/多边形(轮廓)与圆(钻孔)生成 2.5 轴刀轨,
返回轮廓数、钻孔数、刀轨长度与包围盒。
- ``simulate``: 返回仿真报告(刀轨长度 + 估算加工时间)。
- ``export_gcode``: 生成并写出 G-code(G0/G1 + 钻孔循环,M2 结束)。
When not to use: 需要完整 3D 刀具路径或刀轴控制时超出本工具范围;本工具
聚焦 2.5 轴轮廓铣削 + 钻孔。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cam | Yes | CAM action, discriminated by `action`: toolpath, simulate or export_gcode. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Written G-code path | |
| action | Yes | Action executed | |
| bounds | No | Toolpath bounds | |
| status | Yes | Operation status | |
| message | No | Status description | |
| line_count | No | G-code line count | |
| move_count | No | Total tool moves | |
| drill_count | No | Number of drill operations | |
| est_seconds | No | Estimated machining time (s) | |
| path_length | No | Cutting path length (mm) | |
| contour_count | No | Number of contour operations |