A Unity-based tool for generating G-Code to cut precisely spaced holes in CNC-machined plates for gear assemblies. Originally built for use in educational gear puzzles, the tool features automatic route optimization to minimize total tool travel distance.
- G-Code Generation: Automatically generates CNC-compatible G-Code for gear hole layouts.
- Route Optimization: Integrates a modified Ant Colony Optimization algorithm to reduce toolpath length.
- Educational Use: Designed for hands-on learning in preschool and primary schools, with Komtek Halmstad.
- Built in Unity: Includes an intuitive interface for visualizing gear placement and toolpaths.
Gears were laser-cut from plexiglass and used in physical puzzle activities in schools. The route optimization significantly reduced the cutting distance — from 158 cm down to 64 cm.
| Before Optimization | After Optimization |
|---|---|
![]() |
![]() |
Main view and UI:
Additional views:
The route optimization is based on Dr. James McCaffrey’s Ant Colony Optimization algorithm, adapted and extended for CNC use cases.
- Download the runnable Windows executable here:
📁 Dropbox – gears_cnc




