Octoprint 3D

03-12-2021
octoprint3.user.js Shows 3D previews of gcode files in Octoprint.

Octoprint contains a list of printed and to be printed objects. Only the file names are there. So you don't see what the object to be printed (or printed) looks like.

For a better overview, I programmed a Greasemonkey script that shows the files as a 3D image, just on Octoprint's own website.

How it works

  • Most of the STLs I create for printing come from OpenScad. I put them in a temporary folder on my hard drive. For example: device.stl.
  • Then I slice it with Slic3r and a gcode file comes out. For example device_0.2mm_PLA_MK3S_59m.gcode. Octoprint shows the name of that gcode file.
  • The Greasmonkey script looks at the file in Octoprint (the gcode file) and assumes that an STL with the same name (device.stl) is in the folder .
  • The Greasemonkey script then calls a My Projects function where it converts an STL file into an image so that the browser can display that image.

Download the latest version of my Github.

Update 3/12/2021:
- Possibility to indicate multiple STL folders
- Left margin made wider so you can see more
- Made the left margin higher so you can see more without having to scroll

How to use

This script is for Firefox.

Download the Greasemonkey add-on and open the script.

The name of the script must end with .user.js.

View 30 more scripts
 
×
×