Kragrathea / OctoPrint-PrettyGCode

114 stars 21 forks source link

Add G2/G3 Support #84

Closed FormerLurker closed 3 years ago

FormerLurker commented 3 years ago

Adds support for G2/G3. There are a few constants that can be used to adjust the rendering to match Marlin firmware (but not 100% of the options have been added yet). R and K are not yet supported since I don't know how K works (not in the docs I've seen) and I have no code with which to test R. There is some code commented out that should be close, but needs to be debugged. Let me know if anything needs modification, or if you need gcode to test it. You could always install arc welder and use that to generate arcs in X Y Z I J E F form.

I hope this relieves you of some issues caused by my plugin :)

Resolves #52.

FormerLurker commented 3 years ago

OK, sorry, I have no idea why those other commits are showing up. Hopefully you can do a squash and merge or something :(

Let me know if I need to do anything different. I'm still learning github after 3 years of working with it.

Kragrathea commented 3 years ago

Looks good! The merge stuff is just Github being weird I think.

There is actually one more part to this I forgot. The G2/G3 commands should also be segmented in the PrintheadSimulator "class" addCommand() function. This is what animates the printhead when you are printing. As it is currently it will probably just move in a straight line instead of an arc.

That said, I am OK with that behavior for now. Its enough to have the arcs displayed correctly. Do you still want me to pull this change?

FormerLurker commented 3 years ago

Why don't you pull this one, and I will work on the simulator bit next and submit another pr?

Kragrathea commented 3 years ago

Done. I'll do a new release in a few days. I want to see if there are any issues with the release I just did.

FormerLurker commented 3 years ago

I know how that goes. No nees to rush anything.