Skip to content
/ gcode-sort Public

Optimize a GCODE file by reducing the total time spent moving the bit (G0) vs cutting or carving (G1)

License

Notifications You must be signed in to change notification settings

Q42/gcode-sort

Repository files navigation

gcode-sort

Optimize a GCODE file by reducing the total time spent moving the bit (G0) vs cutting or carving (G1)

Before

image

After

image

Features

  • should work with gcode from Easel
  • fast optimization using the 2-opt algorithm that is commonly used for solving the Traveling Salesman Problem.
  • option to show/hide travel/cutting/z changes.
  • reports what you save (in term of total distance)
  • download the optimized file

Known issues

  • hard-coded work area of 512x512

Bugs? Issues?

If you encounter a bug or have a gcode file that wasn't handled properly, please create an issue with the relevant file attached and I will take a look at it.

Want to contribute? Request a feature?

Any help is appreciated. Send in a PR or reach out to me.

Thanks

Thank to @pedrohfsd for his javascript version of the 2-opt algorithm. I used it because it was easy to understand and adapt.

About

Optimize a GCODE file by reducing the total time spent moving the bit (G0) vs cutting or carving (G1)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published