Skip to content

Gcode previews (Beta)

alexqzd edited this page Oct 31, 2021 · 3 revisions

Prerequisites

Instructions for Cura

  1. Save the script named Cura_JPEG_Preview.py to your computer.
  2. Open Cura.
  3. Click Help -> Show Configuration Folder.
  4. Move Cura_JPEG_Preview.py to the scripts folder inside Cura Configuration Folder.
  5. Restart Cura.
  6. Click on Extensions -> Post Processing -> Modify G-code.
  7. Click "Add a script", then select "Create JPEG preview" from the list.
  8. Click Close.
  9. Slice and save the gcode file to your SD card as usual.
  10. Update the firmware on your printer and enable thumbnails in Control -> Visual -> Show file thumbnails

Instructions for PrusaSlicer

  1. Save the script named PrusaSlicer_JPEG_Preview.py to your computer. It's better to save it in a path that doesn't contain spaces.

  2. Open PrusaSlicer.

  3. Go to Printer Settings -> General -> Firmware -> G-code thumbnails and write 50x50, 217x217.

  4. Go to Print Settings -> Output options -> Post-processing:
    4a. Windows:
    Write the location where you installed Python.exe and the location where you saved your script. eg. "C:\Users\Alex\AppData\Local\Programs\Python\Python39\Python.exe" "C:\Users\Alex\Documents\PrusaSlicer_JPEG_Preview.py";

    4b. macOS/Linux:
    Write the location where you saved your script.
    eg. "/Users/alex/Documents/PrusaSlicer_JPEG_Preview.py";

  5. Slice and save the gcode file to your SD card as usual.

  6. Update the firmware on your printer and enable thumbnails in Control -> Visual -> Show file thumbnails

Troubleshooting

I'm on Windows and I can't find where Python.exe is located

Run python -c "import os, sys; print(os.path.dirname(sys.executable))" on the command line and it will show you the folder

PrusaSlicer says Failed starting the script

Save the script on a path that doesn't contain spaces. Try removing the quotes too.