G-Code Post Processor with Embedded JavaScript

A scriptable GCode post-processor that lets you embed inline JavaScript directly in your CNC, 3D printer, or laser cutter workflow for real-time transforms, parameter control, and custom automation.


A JavaScript implementation of a GCode (CNC, 3D printer, Laser Cutter) post processor for programmatically adjusting GCode via inline-JavaScript and global transformation.

Extensive documentation and a local computer (Node) version available:

replicantfx/gcode-post-processor

Created by: Emily A Shilling

First Release: 6 NOV 2022

This is a gcode post processor for standard and 3D printer flavored gcode. An input file is processed by this engine and when the engine encounters a <<<javascript code>>> section, that code is executed as JavaScript. This allows the user extreme customization of the resulting gcode via a language already heavily understood. Additionally users can define (and adjust real-time) a global geometric transform to scale, rotate, translate GCode programmatically.

Major Features

  • 3D Printer, CNC, and Laser Cutter Compatible
  • Works with Prusa Slicer, Simplify3D, and Cura
  • 3D transformation capable for all coordinates (including extruder)
    • Scale
    • Translate
    • Rotate
    • Skew
  • Adjust Extruder and Feedrate Multipliers
  • All GCode parameters exposed — modify anything with your own JavaScript run as a post processor