3D Printing: GCode File Preview in GNOME

When dealing with a lot of G-code it comes handy to have a small thumbnail preview in the file browser under GNOME, hence I coded this package.

It supports Slic3r, Prusa Slicer and Cura.

Download

https://github.com/Spiritdude/Nautilus_Thumbnailer_GCode

gcode2png

The package includes gcode2png which can be used standalone as well.

20mm cube sliced with Slic3r and converted with gcode2png to PNG
USAGE gcode2png 0.0.7: [<opts>] <file.gcode> ... 
   options:
      --version               print version and exit
      --autolevel             level Z minimum to 0 (default: off)
      --output=<fn>           override .gcode -> .png conversion
      --size=<w>x<h>          set size of image (default: 512x512)
      --rotate=<x>,<y>,<z>    rotate model (default: 30,0,-20)
      --dist=<d>              set distance multiplier (default: 1)
      --color=<r>,<g>,<b>     set color (default: .1,.8,.1)
      --grid=0 or 1           set grid (default: 1)
      --grid_size=<s>         set grid size (default: 10)
      --nozzle=<d>            set nozzle diameter (default: 0.4)
      --complete=<i>          set completeness: 0..1 or 0%..100%
      
   examples:
      gcode2png gcube.gcode
      gcode2png --output=cube-normal.png cube.gcode
      gcode2png --color=1,0,0 3DBenchy.gcode
      gcode2png --complete=50% 3DBenchy.gcode

That’s it.