Projects / Gcmc


Gcmc is a front-end language for generating G-code, SVG, and DXF for CNC mills, lathes, laser cutters, and other numerically controlled machines employing G-code, SVG, or DXF. The language is a context-free grammar created to overcome the archaic format of G-code programming, but can be used more generally for many targets. Gcmc aims to be more readable and understandable than G-code and enable programmatic designing. Gcmc makes extensive use of vector mathematics to support the 3D nature of CNC machining. It handles units as millimeters, mils (inch), degrees, and radians and performs automatic conversions where necessary.

Operating Systems

Recent releases

  •  14 Mar 2014 22:10

    Release Notes: This release fixes a few memory issues that could lead to wrong results or corruption. Binary operators are now available, and the syntax now takes an "everything is an expression" approach. The documentation has been greatly expanded, and several examples are added for tool.compensation, involute gears, floret patterns, continuous curvature pocketing, and trochoidal milling.

    •  21 Feb 2014 23:53

      Release Notes: This release adds constructs such as repeat() and the ternary operator ?:. The local keyword allows assignment and functions allow passing by reference. The pre/post inc/dec operators can be part of expressions. Strings concat using +. The + and - operators changed undef handling and +| and -| operators were added. Several functions have been added, such as pathmode() to set blending, and fixpos_*() to set/store/restore known positions. The functions to_native() and ismodemm() allow coding across mm/inch systems. Canned cycles were added as library functions.

      •  05 Feb 2014 23:52

        Release Notes: This release fixes a bug is the execution of the if/elif/else execution, which ignored the final else if all if/elif clauses were false. Smaller fixes include accounting for rounding errors for 180 degree arcs and documentation updates. Head() and tail() functions now allow negative counts to get partial lists without knowing the actual count. The new comment() function allows easier inclusion of gcode comments/debug statements into the compiled code.

        •  11 Dec 2013 16:38

          Release Notes: This release adds gcode-as-function output to create callable and include-able subroutines. The new built-in function reverse() can be used to change the order of vectors and vectorlists. Fixes include proper unit handling in position() return values, and toolchange() now emits an M6 code to activate the change. The function reference documentation is updated to include return types/values for all built-in functions.

          •  29 Nov 2013 23:48

            Release Notes: This release adds command-line defines to set up variables from the command line. Documentation has been revamped, and a man page is now available. The syntax and function reference have been rewritten in HTML and include more detailed info. Also, package files are included for RPM and DEB packages and can be built from the tarball. Fixes include correction of relative mode, speed-up in execution using bsearch, and comparisons taking units properly into account.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.