python3 script for 3D rendering gcode files with Mayavi
--help
is showing usage- different options to show bed, model + moves + supports
- auto adjust camera based on the model dimensions and location
- remove first 5 gcode entries from object - helps not to show pruge lines, which would distract the camera view etc
- option to define output image resolution
- option to show image preview (no more weird unrendered windows)
- set env var
LOGLEVEL=DEBUG
to see log flood on stderr - python 3.10+
Good examples:
Not so great examples:
- python 3.10+
- tested under Ubuntu 22.04, and nothing else
- no longer compatible with forked projects
- some gcode files are rendered weird, see
test_nano.gcode
, for example I have some custom gcode to trigger photos for timelapse, and thus some renders contain those lines that go to the back of the plate and then to the right - this is especially visible inskullbowl
,crystal
andtest_nano
examples - no support for bgcode
- no support for absolute moves in gcode
Tested under Ubuntu 22.04
suto apt install -y mayavi
pip3 install -r requirements.txt
python ./gcode2png.py --help
python ./gcode2png.py --moves=true --show=true --drop=0 tests/test.gcode
python ./gcode2png.py --moves=true --drop=0 tests/test.gcode tests/test.png
make clean
make -j12 all
make -j12 previews previews_md
- initial gcode2png idea forked from Zst, which was forked from shodushi
- gcodeParser.py
- add thumbnail generations for Linux
- add install to makefile