# MillBill: A Machining Agent with Geometric Feedback

AI.info

> Turning a CAD model into a working machining program requires two very different skills: process knowledge (which operation, which cutter, what speeds and feeds) and precise 3D geometry (toolpath…

**arXiv**: 2611.22565 · Preprint · not peer-reviewed

**Published**: 2026-11-17

**Authors**: Gennadii Savrasov, Artem Slavin, Soslan Kabisov, Andrey Kuznetsov, Anton Konushin, Dmitrii Zhemchuzhnikov

## In plain words

Turning a CAD model into a working machining program requires two very different skills: process knowledge (which operation, which cutter, what speeds and feeds) and precise 3D geometry (toolpath coordinates, offsets, swept volumes).

## AI summary

## Overview

**Research area:** AI for computer-aided manufacturing — specifically, LLM-based agents that convert CAD models into CNC machining programs (G-code).

**Technical level:** Advanced. The paper assumes familiarity with boundary-representation (B-rep) CAD models, CAM process planning, three-axis milling, and LLM agent architectures.

**Scope (one sentence):** The paper presents MillBill, an agent that splits CNC machining planning into language-model decisions (operations, tools, cutting parameters) and a geometric harness that generates toolpaths, simulates material removal, and feeds measured deviations back to the model, evaluated on 100 parts scored by simulated machining accuracy.

## What This Paper Is About

Turning a CAD model into a working machining program requires two very different skills: process knowledge (which operation, which cutter, what speeds and feeds) and precise 3D geometry (toolpath coordinates, offsets, swept volumes). Existing language-model approaches either stop before toolpaths are ever executed, or hand the numerical geometry work to the model, where one wrong number produces a program that runs but machines the wrong part. MillBill's goal is to let a mid-sized, locally hosted open model handle only the process decisions while deterministic geometric algorithms do all the numerical execution and verification, then feed back the measured error so the plan can be refined.

## Key Contributions

1. **MillBill, a B-rep-to-G-code pipeline with a strict division of labour:** a language model revises operations, tools and cutting parameters, while a geometric harness recognises features, selects setups by tool accessibility, generates every toolpath, simulates the cut and reports deviations. The model never writes coordinates or G-code.
2. **An open benchmark of 4,294 GrabCAD parts paired with milling stocks**, along with a protocol that simulates and scores any planner's G-code by the fraction of target surface area within tolerance.
3. **State-of-the-art results with a locally hosted open model:** MillBill with Qwen3.8-27B reaches 97.4% of target surface within 0.1 mm on 100 parts, outperforming code-writing agents built on frontier models (GPT-6 Astra at 94.3%, Opus 5.5 at 83.0%) and CNCGEN-style learning approaches it compares against in discussion (CNC-Net at 42.3%).
4. **A reach-aware setup planner** that screens the whole tool library for holder clearance using one height-map dilation per remaining pair of holder overhang and reach, selecting setups greedily by newly reachable material rather than by visibility alone.

## Main Findings

- **Overall accuracy:** MillBill leaves 97.4% of the target surface within τ = 0.1 mm, versus 94.3% for the GPT-6 Astra code-writing agent, 83.0% for the Opus 5.5 agent, and 42.3% for CNC-Net. It also has the smallest gouged area (0.54%, against 1.50% for the best baseline) and the smallest excess-material area (2.1%).
- **The harness does most of the work:** Executed without the language model at all (the standard-practice reference plan), the pipeline already reaches 97.0%. Adding the model raises this to 97.4% (paired difference 0.35 pp, 95% bootstrap CI [0.09, 0.68]; better on 43 parts, worse on 23) and cuts gouged area from 0.77% to 0.54%. That gouge reduction comes entirely from the ten single-setup parts; on the 90 multi-setup parts the gouged area is 0.46% with the model and 0.45% without it.
- **Setup planning is the largest single lever:** Replacing reach-aware setups with a single +z setup drops accuracy from 97.4% to 66.4% and raises excess material from 2.1% to 33.1%.
- **The same open model fails badly when asked to write code:** As a code-writing agent, Qwen3.8-27B reaches 7.9% on 82 scored parts, below the uncut stock baseline of 10.6%, against 97.4% inside MillBill. Frontier code-writing agents err mainly in the transformations of the ±x and ±y setups and in tool offsets.
- **Refinement rounds help but saturate:** With a budget of one build, MillBill leaves 95.6% within tolerance; a second build raises this to 97.2% and a third to 97.4% (430 setups in total across the benchmark).
- **Accuracy depends on tolerance choice:** At τ = 0.2 mm and 0.5 mm, MillBill stays ahead (98.0% and 98.1%, against 95.3% and 95.6% for the GPT-6 Astra agent). At τ = 0.05 mm the GPT-6 Astra agent is slightly ahead (90.2% against 89.3%).
- **Residual errors are mostly unremoved material and local gouges**, with up to 35.5% excess on part p05451. Feature recognition fell back from AAGNet to rule-based recognition on five parts and FreeCAD timed out twice, yet every part still received a program.
- **Failed parts are not imputed:** Code-writing agents on GPT-6 Astra scored 99/100 parts, Qwen3.8-27B scored 82/100, and CNC-Net scored 99/100, whereas MillBill and Opus 5.5 scored all 100.

## Methodology in Plain English

The input is a target part as a STEP B-rep, a stock that contains it, a workpiece material, and optional drawing notes such as threads and surface finish. The machine is a three-axis vertical machining centre with a library of 75 cutters and a machine profile limiting spindle speed, feed, power and torque. Parts may be machined in several indexed setups, each approaching from one of six axis directions (±x, ±y, ±z).

The pipeline works like this. First, a graph neural network (AAGNet, trained on MFInstSeg) labels each face of the B-rep with a machining feature class — holes, pockets, slots, steps, chamfers, rounds — and feature dimensions are then measured directly on the B-rep. Drawing notes are parsed by the language model into structured annotations and matched to features by a weighted score over type, dimension and location.

Second, setups are chosen by what the cutters can physically reach, not just what is visible. Because a cutter has finite length and sits in a holder much wider than itself, the harness tests whether the holder would clear the surrounding part material, using height-map dilations to evaluate all voxels at once, and picks setups greedily by newly reachable volume, preferring +z when it is nearly as good.

Third, a language model (Qwen3.8-27B) revises a standard-practice reference plan in three stages: a knowledge-retrieval agent pulls machining guidelines and flags violations; a process-sequence agent orders operations subject to hard precedence constraints; and a tool-selection and cutting-parameter agent picks cutters from the library and adjusts speed, feed and depths of cut, all clamped to machine limits.

Fourth, the harness executes the plan in FreeCAD's CAM workbench, generating roughing, finishing, drilling and helical paths, gouge-checking every harness-generated move, and writing G-code.

Fifth, the harness simulates the program exactly — no workpiece discretisation — by testing query points against the analytically swept cutter solids, with golden-section search where the containment condition is convex. The score is the area-weighted fraction of sampled target surface points that show neither excess material nor gouge.

Finally, the harness localises defects to features and to the last operation that cut there, applies automatic corrections such as adding rest finishing, and returns the rest to the model, which may apply a limited set of fixes (switch tool, change finishing allowance, depth of cut, stepover, peck depth, or drop an operation). The best of at most three builds is kept.

## Why This Matters

This paper makes a concrete architectural argument: for tasks where numerical precision is the bottleneck, it is better to give the language model the judgement calls and give algorithms the geometry. It shows that a 27B open model, kept on local hardware so proprietary parts never leave the building, can beat frontier models that are asked to write their own geometry code — and it supplies a simulator-based scoring protocol that can evaluate any planner's G-code, not just its own.

**Real-world applications:**

- **Job shops and small manufacturers** that want to go from a customer's STEP file to a first-cut program without a dedicated CAM programmer, while keeping design data on-premises.
- **Defence, aerospace and other confidential supply chains**, where sending CAD models to a third-party API is not permitted — the entire pipeline runs on local GPUs.
- **Automated quoting and manufacturability feedback**, since the same simulator reports unreachable volume, feature-level deviations and inherent limits such as corners smaller than the smallest cutter.
- **Training and process-standardisation**, where the standard-practice reference plan and knowledge base encode shop rules and can flag guideline violations before cutting metal.

**Industry relevance:** The paper targets the long-standing automation gap in computer-aided process planning, which still relies on human experts in practice. Its emphasis on verification-in-simulation rather than model self-confidence maps directly onto how machining is actually validated, and its open code and benchmark give CAM vendors and researchers a reproducible target to beat.

## Future Directions

- **Extending beyond indexed three-axis machining** to inclined setups and simultaneous five-axis motion, which are explicitly out of scope.
- **Modelling workholding and machine travel**, so that setups are filtered by whether the part can actually be clamped and whether it fits the machine envelope — six of the 100 evaluation parts exceed a typical 600 × 400 × 450 mm travel and are currently kept without penalty.
- **Physical fidelity in simulation:** accounting for tool deflection, vibration and wear, and simulating taps and thread mills so that thread geometry is verified rather than only planned.
- **Reducing reliance on the model and improving feedback:** the no-LLM reference already reaches 97.0%, and the model's measurable contribution is small, so better use of the geometric feedback signal — and better feature recognition on real (non-synthetic) parts — are open questions. Future work also lists verification of surface finish.

## Target Audience

Researchers and engineers working at the intersection of LLM agents, CAD/CAM and manufacturing automation; CAM software developers interested in simulator-based verification and reach-aware setup planning; industrial practitioners evaluating whether on-premises open models can be trusted with real machining decisions; and benchmark designers looking for a rigorous, execution-grounded evaluation protocol rather than text-matching metrics.

## Authors’ abstract

Turning a CAD model into a machining program requires both process knowledge and geometric precision. Language models can generate such workflows by writing geometry and toolpath code for each part, but this makes numerical execution part of the model's task. We introduce MillBill, an agent that separates machining decisions from their geometric execution and verification. Given a boundary-representation part, stock, and material, a locally hosted, mid-sized open model…

[The full abstract on arXiv](https://arxiv.org/abs/2611.22565)

[Read the original paper](https://arxiv.org/abs/2611.22565)

## Related papers

- [CADMAGEDDON: High-Fidelity CAD Reconstruction with Local Inference](https://ai.info/paper/cadmageddon-high-fidelity-cad-reconstruction-with-local-inference-2611.22563) 2026-11-17 · cs.AI · Also by Andrey Kuznetsov, Anton Konushin +3
- [CADFather: Autonomous CAD Reconstruction through Coordinated Tool Use](https://ai.info/paper/cadfather-autonomous-cad-reconstruction-through-coordinated-tool-use-2610.09127) 2026-10-06 · cs.AI · Also by Andrey Kuznetsov, Anton Konushin +2
- [Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code](https://ai.info/paper/metrics-in-the-loop-complexity-feedback-reshapes-agent-written-code-2611.23817) 2026-11-18 · cs.AI · Key terms of the title in common
- [How Feedback-Free Self-Evolution Reshapes Agent Skills: A Systematic Study](https://ai.info/paper/how-feedback-free-self-evolution-reshapes-agent-skills-a-systematic-2611.25534) 2026-11-19 · cs.AI · Key terms of the title in common
- [MLExpert: Towards a Generalist Agentic Model for Autonomous Machine Learning Engineering](https://ai.info/paper/mlexpert-towards-a-generalist-agentic-model-for-autonomous-machine-2610.22344) 2026-10-15 · cs.AI · Key terms of the title in common

---

Canonical: https://ai.info/paper/millbill-a-machining-agent-with-geometric-feedback-2611.22565
