arpruss / gcodeplot

Use a 3-axis machine as a pen plotter
Other
167 stars 60 forks source link

Refactor code to use Argparse instead of GetOpt for improved readability + flexibility #43

Open Iridium-IO opened 7 months ago

Iridium-IO commented 7 months ago

Argparse

Inkscape

1 3 2

General

Note This PR also includes the changes from #42 adding Moonraker support. Sorry, I didn't quite know how to separate the changes without deleting all the Moonraker stuff, creating this PR, then re-adding the Moonraker stuff. I don't want to clog up your repo with changes and un-changes, but if you're more happy with this PR (as it's more testable since you don't have Moonraker), I can do the following steps:

Thoughts? I've tested the generated GCode using my own tests (complex overlapped shapes with variable shading/cutting) as well as running the included mpcnc and cutter config files to check that the output gcode is identical. There is some variation in both the new and old files due to non-deterministic choosing of which shapes to draw first (e.g. one time it will draw star > circle > square then the next time you run the script it will draw circle > star > square