This is a post processing script for 3d printing slicers to convert a series of line segments into curves. It fits a series of G1 moves to an arc, then replaces those segments with a single G2 or G3 gcode command. Therefore it only works with 3d printers that support G2 and G3.
I wrote this a while ago and have been using it with my linuxcnc driven delta printer. I only found out recently that the marlin firmware, as is used in my Prusa i3 Mk2.5s, also supports G2/G3, so I’ve pushed the code out to github – 3dPrintSmoothing