cs.CVNov 15, 2026

Geo2Gcode: From 3D Geometry to CNC Programs through Structured Machining Primitives

Authors: Sangmin Hong, Dohee Cho, Mohsen Yavartanoo, Kyoung Mu Lee

Organizations: IPAI, Seoul National University · Dept. of ECE & ASRI, Seoul National University

Abstract

Turning a 3D shape into a Computer Numerical Control (CNC) program is still largely manual. For every part, a machinist chooses setups, tools, step-downs, and toolpath patterns. We present Geo2Gcode, which converts a target mesh directly into standard G-code through structured machining primitives. Each primitive couples an indexed machining direction, a closed per-view reconstruction of the target, and explicit tool-radius, layer-height, and clearing-pattern parameters, and compiles deterministically into layerwise toolpaths via signed-distance queries. Most of the fidelity comes from this compiler. A lightweight selector trained with a voxel stock simulator fills in primitive parameters without per-part manual settings, approaching the finest fixed setting at about a quarter of its toolpath length. In simulation on ABC parts, Geo2Gcode reaches roughing fidelity comparable to an expert-tuned commercial CAM setup with a moderately longer toolpath, and clearly improves on a default CAM configuration. Generated programs run in a commercial G-code simulator, and one part is machined on a physical CNC mill. These results demonstrate that roughing programs can be generated directly from geometry without per-part CAM tuning.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. MillBill: A Machining Agent with Geometric Feedback

    Nov 17, 2026Gennadii Savrasov, Artem Slavin, Soslan Kabisov +3ManufacturingLLM Agent Planning

  2. PrintAnything: Learning an Intermediate Representation for 3D printing G-code Generation

    Jul 30, 2026Sangmin Hong, Daniel Sungho Jung, Heewon Kim +1Point Cloud LearningCode Generation