Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A g-code preprocessor for grbl. Checks and validates g-code compatibility, converts g-code into a more grbl-friendly format, and provides a way to implement and translate canned cycles and other high-level tasks. Written in Python.
branch: master

Merge pull request #2 from siredmar/master

Adding command line options for infile and outfile. Can easily modified to return more opts.
latest commit feaa5d0720
Sonny Jeon authored
Failed to load latest commit information.
COPYING Initial commit. added file existency check
readme.textile Edited readme.textile via GitHub


preGrbl – A g-code preprocessor for grbl, the 3-axis CNC Arduino firmware.

PreGrbl intends to offload higher level tasks and computationally expensive routines from the on-board firmware of Grbl, primarily to keep Grbl simple and efficient. These tasks include more robust and complete NIST g-code error checking, implementing canned cycles by translating the tool paths, and converting the g-code into a Grbl-friendly format.

In the near future, PreGrbl may be used as a starting point for a full-featured CNC user interface for Grbl, much like EMC2 or Mach3. For example, a GUI interface would translate a g-code program with canned cycles into a Grbl-friendly format and stream it in the background directly to Grbl.

Current Features:
– Notifies unsupported g-code commands for grbl
– Converts G02/03 arcs to G01 linear interpolations
– Removes comments, block delete characters, and line numbers
– Removes spaces and capitalizes commands
– Minor input error checking
– OPTIONAL: Remove unsupported grbl G and M commands

To Do:
– Add canned cycle translation
– Number precision identification and truncation
– Arc conversion option
– More robust and complete error checking
– Command line interface options
– Improve g-code parsing to NIST standards
– Support inverse feed rates

Something went wrong with that request. Please try again.