Skip to content

Python little utility to modify some G-codes for custom machines

Notifications You must be signed in to change notification settings

kitusmark/Gcode-Modifier

Repository files navigation

Gcode-Modifier

Python little utility to modify some G-codes for custom CNC machines. The purpose is to make 3D printer G-codes compatible with custom CNC machines.

Here is the list of functions that currently work:

  • Delete all comments.
  • Delete specified axis command. Default is A for MACH3 machines that doesn't have A Axis for the extruder.

Requirements

  • Have python 2.7 installed.
  • Have a G-code generated by any 3D printer slicer or G-code generator. For this application I recommend Slic3r.

Usage

first you need to clone/download the repository in your computer:

git clone https://github.com/kitusmark/Gcode-Modifier.git

Decompress it if you need to, open a terminal and go to the directory:

python modifier.py

will print a list of g-codes inside the same directory and expects the name of the file you want to work with.

python modifier.py file.gcode

will get the file, parse it and print some statistics. Then, it will ask you if you want to delete the comments of the file (they start with ";"). After that, it will ask you if you want to delete the A axis of the file.

The output file will be file_prepared.gcode

TO-DO

  • Capability to select the output file extension
  • Add custom G-codes between layers
  • Add custom G-codes between travels
  • Improve parsing and statistics
  • Add file verification when input file
  • Put all files related functions in a module

About

Python little utility to modify some G-codes for custom machines

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages