neuralcad / docs /wiki /cnc-agentic-programming.md
CallMeDaniel's picture
docs: add CNC/CAM knowledge wiki and slicer/preview design spec
265686c
# CNC Agentic Programming
## Overview
Agentic CNC programming uses autonomous AI agents to plan, generate, validate, and optimize CNC machining workflows. Rather than fully autonomous operation, the winning approach is **agent-assisted**: AI proposes machining strategies, human reviews and approves.
## Industry State of the Art
### Commercial Systems
**CloudNC CAM Assist 2.0**
- Used by 1,000+ machine shops globally
- Generates trillions of machining strategies, simulates to find optimal
- Physics-based Cutting Parameters Engine for feeds/speeds
- Integrates with Mastercam, Fusion 360, Siemens NX, SolidCAM
- Supports 3-axis and 3+2-axis
- Completes ~80% of CAM programming in minutes
**Toolpath.com**
- AI CAM using game-based simulation (chess-engine approach)
- Learns through virtual machining scenarios, not user data
- Analyzes geometry, fixturing, tool access for minimum setups
- Exports to Autodesk Fusion with geometry, tools, and setups
**Mastercam 2026.R2 Copilot**
- ~200 toolpath types via voice or text commands
- GPU-accelerated simulation (90min CPU tasks in 22min)
- Adjusts feed rates and spindle speeds across operations
**Siemens NX CAM Copilot** (beta)
- Generates 3 machining strategies per feature
- 80% programming time reduction claim
- Context-aware guidance, learns from past patterns
### Research Systems
**ChatCNC** (Journal of Manufacturing Systems, 2025)
- Multi-agent + RAG for conversational CNC monitoring
- 93.3% accuracy on production-tracking queries
- Merges LLM agents with real-time CNC machine data
**CADSmith** (arxiv 2603.26512)
- Multi-agent text-to-CAD with Planner/Coder/Executor/Validator/Refiner
- 100% execution rate, median F1 0.98, IoU 0.96
- Two nested correction loops (code errors + geometry validation)
- See [Multi-Agent CAD Research](multi-agent-cad-research.md) for details
## Key Insight
AI-generated G-code still requires ~50% rework for complex parts. Current AI tools are force multipliers for experienced machinists -- the expert handles the final 20%. Fully autonomous end-to-end CNC programming without human review remains aspirational.
## NeuralCAD Approach
NeuralCAD implements agentic CNC programming through its multi-agent pipeline:
1. **Design Agent** -- clarifies intent, proposes form factors
2. **Engineering Agent** -- specifies dimensions, materials, tolerances
3. **CNC Agent** -- advises on manufacturability, tool access, axis requirements
4. **CAD Coder Agent** -- generates CadQuery Python code
5. **CAM Agent** -- selects operations, tools, generates toolpath via ocp-freecad-cam
The orchestrator (Gemini-powered) routes user messages to relevant agents, chains their outputs, and triggers the CAM pipeline after successful CAD generation.
## Open-Source CNC Projects
| Project | URL | Description |
|---------|-----|-------------|
| Generic CAM | genericcam.sourceforge.net | Multi-axis toolpath generator, reads STL/GTS |
| PathCAM | github.com/xenovacivus/PathCAM | 2.5D toolpath for CNC routers |
| Toolpath_Gcode_generation | github.com/zhangty019 | 5-axis toolpath and G-code examples |
| NEPath | github.com/WangY18/NEPath | Toolpath planning for additive/CNC |