olistrik / goskew

GoSkew is a program for post-processing G-code to account for axis skew.
GNU General Public License v3.0
28 stars 4 forks source link

Support bgcode or error #10

Open olistrik opened 1 month ago

olistrik commented 1 month ago

binary gcode is the new format from prusaslicer, but they don't run the post-processing scripts against the normal gcode before producing bgcode which breaks goskew.

bgcode is open source, and there is a C++ library (and python bindings) for it here: https://github.com/prusa3d/libbgcode

I've never messed with foreign function calls, or making golang bindings for a C/C++ library. I think it's possible with cgo, but it would require investigation. As it is open source I could port it to golang, but I'd really rather not. Porting gskewer wasn't that big of a deal, but bgcode is an entirely different beast.

At the very least, I should be able to detect bgcode files and error on them. Hopefully prusaslicer will also error if a post-processing script errors.

olistrik commented 1 month ago

@devilzmods Just so you know, I'm thinking of adding better support for bgcode.