Catalog / Science, Engineering & R&D / SCI-023

CNC/CAM programming automation (AI feature recognition, toolpath & NC-code generation)

AI recognises machining features in 3D part models, proposes setups, tools, strategies and feeds/speeds, and generates a CAM program that the programmer reviews and posts as NC code, for job shops and machining departments.

CNC programmers are scarce, and every new part means hours of manual CAM work: reading the model, choosing setups, tools and strategies, programming toolpaths and posting code. AI recognises the machining features in the 3D model, proposes a process plan using the shop's own tools and know-how, and drafts the CAM program for 3-axis and 3+2-axis milling. The programmer reviews, simulates and posts the result. The benefit is shorter programming time per part and a way for fewer experts to serve more jobs.

Problem & value

  • Today: in job shops (Lohnfertiger) and machining departments, a skilled programmer opens each part in CAM, picks features and setups by hand, selects tools and cutting data from experience, and verifies the result in simulation. Programming time often outweighs machine time for small batches, and retiring programmers take their know-how with them.
  • AI value: automatic feature recognition (AFR) and rule/ML-based strategy selection produce a first complete program in minutes. The expert shifts from keying operations to reviewing and optimising. Quotes can be sharper because cycle times come from a draft program instead of a guess (see AGENT-027).
  • Evidence: vendors such as CloudNC (CAM Assist for Siemens NX, Autodesk Fusion and Mastercam) and Hexagon (ESPRIT with AI-supported programming) publish productivity claims for their own customers [1][2]. These are vendor figures, so measure on your own part mix before relying on them.

Variants

  • Prismatic milling (3-axis, 3+2): the best-covered case, with many pockets, holes and faces. Mature in 2026.
  • Turning and mill-turn: feature recognition for rotational parts, mostly in classic CAM automation (ESPRIT, Mastercam, hyperMILL); AI coverage is thinner.
  • Sheet metal and nesting, wire EDM: related but separate rule-based automation.
  • High-mix/low-volume job shop: the highest pay-off because every job is new.
  • Series production: parametric templates and knowledge-based CAM may suffice; AI adds value for variants.
  • Private/maker use: hobby CNC users apply Fusion or FreeCAD Path with LLM help on G-code; this is not production-grade.

How it works

  1. 3D model (+PMI/tolerances)
  2. feature recognition (B-rep graph / rules)
  3. setup & fixturing proposal (stock, orientation, workholding)
  4. operation planning (sequence, tool selection from shop library, strategy, feeds/speeds)
  5. toolpath generation (CAM kernel)
  6. collision & material-removal simulation
  7. programmer review & edits (human-in-the-loop)
  8. post-processor
  9. NC code for the specific machine/control
  10. dry run / first-article proof on the machine
  • Feature recognition: operates on the boundary representation (faces, edges, adjacency). Rule-based AFR is well established. Learning-based methods use graph neural networks on the B-rep (for example UV-Net and BRepNet from the research literature, with the MFCAD dataset) [5].
  • Process knowledge: the plan comes from the shop's tool library, machine capabilities, material tables and past programs. Newer products learn preferences from approved programs.
  • Toolpath and code: a deterministic CAM kernel computes toolpaths and a post-processor writes machine-specific code. An LLM that writes G-code directly is not reliable enough here, since the kernel and simulation provide the geometric guarantees. LLMs are better used for the user interface, summaries, setup sheets and code explanation.
  • Human-in-the-loop: the programmer approves setups, tools and strategies, checks the simulation for collisions and gouging, and releases the code. The operator performs the first-article proof.

Data preparation

Needed are 3D models with PMI/tolerances, drawings, the machine and tool library, cutting data, fixtures and past approved NC programs. In a typical shop they are spread across the CAD/PDM system, file shares, the CAM database, the ERP (work plans) and the know-how of experienced programmers. Typical gaps are tool libraries with duplicates or wrong geometry, cutting data that differ from practice, models without PMI, 2D PDF drawings or scans only, programs not linked to their models, and several versions of a part.

Preparation steps: 1. Clean the tool and machine library (one entry per tool, correct holder and cutting data) and check access rights to part data (PREP-009, PREP-023). 2. Link approved programs to their CAD models and revisions in one structure (PREP-010). 3. Collect good reference programs and setup sheets as gold-standard examples (PREP-016). 4. Convert paper or PDF drawings with OCR where tolerances must be read (PREP-006, DOC-014). 5. Write down shop rules such as preferred tools and fixtures (PREP-013).

Plan for about 25 to 35 percent of the effort. The tool library is the most important item: a clean library often improves results more than the choice of product. Start with 20 to 50 representative parts.

Implementation paths

Which path for whom

  • SMB: Path A, because AI add-ons for mainstream CAM systems (CloudNC, ESPRIT, hyperMILL, NX CAM) are mature, run inside the existing CAM and fit standard prismatic milling.
  • Enterprise: Path B, because the value lies in connecting the CAM through its API to own tool libraries, past programs, PLM and setup sheets, where no product fits as is.
  • Developer: Path C, because FreeCAD CAM, OpenCAMLib and Open CASCADE allow own experiments, with a local code LLM for G-code review.
  • AI add-ons to CAM systems: CloudNC CAM Assist (UK vendor; plug-in for Siemens NX, Autodesk Fusion and Mastercam) [1]; Hexagon ESPRIT and ESPRIT EDGE with AI-based programming [2].
  • CAM suites with strong automation (EU marked): Siemens NX CAM [3], Autodesk Fusion, Mastercam (CNC Software, US), hyperMILL (OPEN MIND, DE, EU), TopSolid (Missler, FR, EU), Tebis (DE, EU), CAMWorks, SolidCAM, GibbsCAM, ZW3D.
  • Machine-tool builder tools: shop-floor programming from DMG MORI, Heidenhain (DE, EU) and Siemens Sinumerik for conversational and cycle-based programming.
  • Choose A when: you already run a mainstream CAM, parts are mostly prismatic milling, and tool/machine libraries are clean. Run a paid pilot on 20 to 50 of your real parts.

Path B — Build on cloud APIs

  • Use an LLM (frontier or Mistral, EU provider) around an existing CAM through its API (for example Fusion API, NX Open, Mastercam/ESPRIT APIs) to prepare jobs, fill setup sheets, search past programs, explain or review G-code and write post-processor tweaks. Geometry and toolpath generation stay with the CAM kernel.
  • Combine with cloud CAD services (for example Autodesk Platform Services) and EU-region hosting if drawings are confidential.
  • Choose B when: you need glue and assistants rather than a new CAM engine.

Path C — Self-host (open source)

  • CAM and kernels: FreeCAD Path/CAM workbench, OpenCAMLib, Open CASCADE (OCCT) for B-rep handling, and LinuxCNC or Grbl for simulation and control on small machines [4]. G-code verification with open tools such as CAMotics.
  • Models: an open-weight code LLM (for example Qwen-Coder or similar) served locally for G-code explanation and review. Learning-based AFR can run on CPU or a small GPU.
  • Hardware: HW1 for AFR and CAM; add HW2 only if an LLM assistant runs locally. This path demands in-house CAM expertise and rarely matches commercial CAM for production work.

Path D — Custom training

Worth it only for vendors, large series manufacturers or research groups. Train feature-recognition models on labelled B-rep data (public sets like MFCAD, plus the company's own labelled parts) and learn strategy selection from approved historical programs with their cutting data. Expect thousands of cleaned programs linked to their CAD models, plus months of data preparation.

State of the art (2026)

  • Commercial AI CAM has moved from demos to production at job shops: automatic setups, feature-based operations and tool selection for 3-axis and 3+2-axis parts, delivered as plug-ins inside the CAM the shop already uses [1][2].
  • Research: graph-based learning on B-reps (UV-Net, BRepNet and successors) improves feature recognition, especially for intersecting features, and generative CAD work (see SCI-024) feeds the same data representations [5].
  • LLM role: assistants for setup sheets, G-code review and post-processor editing. Direct LLM-to-G-code generation is a research topic, and published results show errors on anything beyond simple parts.
  • Limits and failure modes: 5-axis simultaneous machining, thin walls, deep cavities, chatter-prone setups, hard-to-clamp parts and exotic materials still need an expert. AFR can mis-classify interacting features. Wrong feeds/speeds or missing collision checks can scrap parts or crash machines. Machine-specific post-processors and control dialects remain a manual setup cost. Tool and fixture libraries must be accurate or the plan will be wrong.

Shared resources & combinations

  • Geometry stack: shares 3D-vision and B-rep/graph methods with SCI-024 (text/sketch-to-CAD), KNOW-020 (similar-part search to reuse past programs) and SCI-006 (design for manufacturability feedback).
  • Upstream: DOC-013 (drawing and tolerance understanding) supplies PMI; AGENT-027 (RFQ-to-quote) consumes estimated cycle times.
  • Adjacent: CODE-016 (PLC code) and ROBO-003 (robot programming) solve different programming problems; SCI-013 for requirements; VIS-057 and SCI-022 for process monitoring and test data that can feed back cutting-data tuning.
  • Shared infrastructure: a PDM/PLM or file store for models, a tool and cutting-data master, and a workflow engine.

Effort, cost & KPIs

  • Path A: weeks for plug-in rollout, plus months to clean tool libraries, fixtures and posts. Cost drivers are seats/subscriptions and library curation.
  • Path B: 2 to 4 months for an assistant layer with CAM API integration.
  • Path C: months and expert CAM staff.
  • Path D: quarters, with a data and ML team.
  • KPIs: programming hours per part, share of programs accepted without major edits, first-article success rate, scrap and crash events, machine utilisation, quote-to-order lead time, lead time for new programmers to become productive.

People & change

Start with the owner or production manager and the head of CNC programming, who define which parts and machines are in scope. Involve the CAM programmers and machine operators early: they approve setups and strategies and know the shop's tricks, so they should help build the tool library and judge the pilot. IT supports licences, file access and, for B and C, integration; customer drawings may need confidentiality checks with legal/compliance (GUIDE-010).

Works council: depends. If a works council exists, a CAM add-on that logs programmer activity or sends usage data to the vendor can fall under §87(1) no. 6 BetrVG, and the change of work processes triggers information duties under §90(1) no. 3. Agree on what is logged and that no individual performance is evaluated (GUIDE-004). Personal data are low; the DPO needs to be involved only if user telemetry is sent to vendors.

AI literacy: train programmers in reviewing AI-generated setups, simulation checks and first-article proof (GUIDE-006). Run a pilot with two programmers on real jobs, measuring programming time and rework (GUIDE-009). Typical concern: "the machine will replace programmers". Show that the programmer stays responsible, releases every program and gains time for complex parts (GUIDE-008).

Risks, regulation & compliance

  • EU AI Act: typically minimal risk. A CAM planning assistant is not an Annex III use, and AI literacy (Art. 4) applies to staff. No Art. 5 prohibited practice is involved. If AI becomes a safety component of a machine under the Machinery Regulation, the classification must be reviewed.
  • Machinery safety: Regulation (EU) 2023/1230 applies from January 2027 and addresses machinery with self-evolving behaviour. Programming aids that run offline before release are not safety functions, but any in-machine adaptive control needs assessment [6].
  • GDPR: model and drawing data generally contains no personal data. Programmer names in logs and operator data are the exceptions.
  • IP and confidentiality: customer drawings are often under NDA. Check whether cloud tools train on or retain uploaded geometry, and prefer EU hosting or on-prem processing.
  • Quality and liability: aerospace, medical and automotive customers require traceable, qualified processes (AS9100, ISO 13485, IATF 16949). Record AI-suggested versus approved programs and keep the programmer accountable.
  • Mitigations: mandatory simulation and collision checking, first-article proof, version control of programs, restricted release rights.

Getting started

  1. Measure the baseline: programming hours per part, part mix (share of prismatic 3-axis/3+2) and the programmer bottleneck.
  2. Clean up the tool library, cutting data, fixtures and machine/post definitions. AI is only as good as these.
  3. Pilot a Path A plug-in on 20 to 50 real parts and compare against the programmer's own times and cycle times.
  4. Define the review checklist (simulation, tool reach, clamping, first article) and the release rule.
  5. Capture approved programs systematically so the system and your team keep learning.

Sources

  1. CloudNC — CAM Assist — https://www.cloudnc.com
  2. Hexagon Manufacturing Intelligence — ESPRIT CAM — https://hexagon.com/products/esprit
  3. Siemens — NX CAM — https://plm.sw.siemens.com/en-US/nx/
  4. FreeCAD Path/CAM and LinuxCNC documentation — https://wiki.freecad.org/CAM_Workbench and https://linuxcnc.org
  5. Jayaraman et al. — UV-Net: Learning from Boundary Representations (CVPR 2021) — https://arxiv.org/abs/2006.10211
  6. Regulation (EU) 2023/1230 on machinery — https://eur-lex.europa.eu/eli/reg/2023/1230/oj
  7. Regulation (EU) 2024/1689 (AI Act) — https://eur-lex.europa.eu/eli/reg/2024/1689/oj