BGcode support and parse error
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Hi I started 3d printing recently and saw that the printer had little preview thumbnails on its screen so I thought that having thumbnail support in Dolphin would be really nice, and apparently you beat me to it, awesome! So I tried the AUR package (very cool).
Unfortunately, it doesn't work with the newer binary gcode format that prusa uses, though they do have the spec and a working converter here: https://github.com/prusa3d/libbgcode
I tried exporting to regular gcode that has the thumbnails embedded as comments but for some reason the gcode-thumb util crashed with the error:
```
thread 'main' panicked at /home/test/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gcode-0.6.1/src/words.rs:105:47:
: ParseFloatError { kind: Invalid }
```
Setting RUST_BACKTRACE=full yielded nothing useful, unfortunately.
A different tool using python (https://github.com/OctoPrint/gcode-thumbnail-tool) did successfully extract the images, so I'm not sure what the issue is. Having a working thumbnailer would be very awesome.
Here are sample files in normal gcode and bgcode (renamed to .txt because github is dumb)
[Simple.gcode.txt](https://github.com/user-attachments/files/23435312/Simple.gcode.txt)
[Simple.bgcode.txt](https://github.com/user-attachments/files/23435313/Simple.bgcode.txt)
I also tried it with this other test file from the aforementioned python project, same issue:
https://github.com/OctoPrint/gcode-thumbnail-tool/blob/main/tests/_files/prusa_2.9.3.gcode
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.