MillBill: A Machining Agent with Geometric Feedback

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

TL;DR

MillBill is an autonomous machining agent that bridges the gap between high-level process planning and low-level geometric precision. By separating "process knowledge" (handled by a language model) from "geometric execution" (handled by a specialized algorithmic harness), it can turn CAD models into accurate CNC programs with minimal human intervention.

What Problem Does This Paper Address?

Automating Computer-Aided Process Planning (CAPP)—the bridge between a 3D CAD design and the G-code that runs a CNC machine—has been a "holy grail" in manufacturing for decades. It requires two distinct types of intelligence:

  1. Process Knowledge: Knowing which tools to use, in what order, and at what speeds/feeds for a specific material.
  2. Geometric Precision: Calculating exact toolpaths that remove material without "gouging" (cutting too deep) or leaving excess stock.

Large Language Models (LLMs) are great at the first part but notoriously bad at the second. When LLMs try to write G-code or geometry scripts directly, a single misplaced decimal point results in a ruined part. MillBill solves this by offloading the math to a "geometric harness" while letting the LLM focus on the strategy.

Methods

MillBill uses a multi-stage pipeline that treats the LLM as a supervisor rather than a calculator:

  • Feature Recognition: A Graph Neural Network (AAGNet) analyzes the CAD model (B-rep) to identify machining features like holes, slots, and pockets.
  • Reach-Aware Setup Planning: Unlike many planners that only look at "visibility," MillBill uses a geometric algorithm to check if a physical tool and its bulky holder can actually reach a region without colliding with the part.
  • The Agentic Loop: A mid-sized, locally hosted LLM (Qwen3.8-27B) acts as the "brain." It receives a list of features and proposes a machining plan.
  • The Geometric Harness: This component (built on FreeCAD) takes the LLM's plan and generates precise toolpaths. It then runs a high-fidelity simulation of the material removal.
  • Feedback & Refinement: If the simulation detects errors (like a gouge or leftover material), it sends specific geometric feedback back to the LLM. The LLM then revises the plan (e.g., "use a longer tool" or "reduce the depth of cut") and tries again.
Figure 1. MillBill overview. The language model revises a standard-practice machining plan; the geometric harness executes it, simulates the result and returns its deviations from the design. (1) The target B-rep. (2) AAGNet labels each face with a machining feature class (Sec. 3.1). (3) Setups are chosen among the six axis directions by what the cutters can reach (Sec. 3.2). (4) The model revises the operations, tools and cutting parameters of each setup, within the tool library and the machine limits (Sec. 3.3). (5) The harness writes the toolpaths and G-code (Sec. 3.4). (6) The simulated workpiece is compared with the design (blue: excess material, grey: within 0.1 mm, red: gouge), and the deviations go back to the agent (Secs. 3.5 and 3.6).

Datasets

The authors introduced a massive new open benchmark for the community:

  • GrabCAD Benchmark: A collection of 4,294 parts from GrabCAD, each paired with realistic milling stocks (like stepped shafts or prismatic bars).
  • Evaluation Set: A stratified sample of 100 complex parts used to compare MillBill against frontier models.
  • MFInstSeg: Used for training the initial feature recognition model.

Key Insights and Ideas

  • Separation of Concerns: The core "aha!" moment is that LLMs shouldn't do math; they should do logic. By providing the LLM with a "harness" that handles the toolpaths, the system becomes much more robust.
  • Local is Better for Industry: Because MillBill uses a mid-sized open model (Qwen), it can be hosted locally. This is a huge win for manufacturers who cannot send proprietary, "top secret" CAD files to external API providers like OpenAI.
  • Reachability vs. Visibility: In real machining, just because you can see a hole doesn't mean you can machine it. Accounting for the tool holder's geometry during setup planning is a critical real-world detail often missed in academic papers.

Key Results

MillBill was tested against "code-writing frontier agents" (where models like GPT-6 Astra or Claude 5.5 try to write their own geometry code).

  • Accuracy: MillBill achieved 97.4% accuracy (measured as the fraction of the target surface within 0.1mm tolerance).
  • Outperforming Giants: It outperformed the best frontier model agent (GPT-6 Astra), which reached 94.3%.
  • Reliability: MillBill had a significantly lower "gouge" rate (0.54%) compared to baselines, which is critical because a gouge usually means the part must be scrapped.
  • Efficiency: The system is fast, taking an average of 16.1 minutes to plan and verify a part from scratch.

Limitations and Future Work

While impressive, MillBill currently has some constraints:

  • 3-Axis Only: It is limited to indexed three-axis machining (approaching the part from six fixed directions). It cannot yet handle simultaneous 5-axis motion.
  • Physics Ignorance: The simulation is purely geometric. It doesn't account for tool deflection, heat, vibration (chatter), or tool wear.
  • Workholding: It doesn't model how the part is actually clamped to the machine, which can interfere with toolpaths.

The authors suggest that future versions will tackle 5-axis setups and more complex verification of threads and surface finishes. Not discussed in the paper is how the system might handle multi-material parts or integrated additive/subtractive manufacturing.

Summary updated

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 proposes operations and cutting parameters for indexed three-axis machining. A geometric harness generates toolpaths, simulates material removal, and returns feedback for plan refinement. Setup planning accounts for what the available cutters can physically reach, rather than visibility alone. We evaluate the resulting programs by the fraction of the target surface area within the specified tolerance after simulated machining. With Qwen3.8-27B, MillBill outperforms frontier-model approaches that construct their own geometry and toolpath workflows on the evaluated machining tasks. Code: https://github.com/kulibinai/millbill
BibTeX
@misc{savrasov2026millbill,
  author = {Gennadii Savrasov and Artem Slavin and Soslan Kabisov and Andrey Kuznetsov and Anton Konushin and Dmitrii Zhemchuzhnikov},
  title = {{MillBill: A Machining Agent with Geometric Feedback}},
  year = {2026},
  eprint = {2611.22565},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22565},
}
Figure