amorphitec / opengb

3d printer controller with touchscreen interface and websocket API
http://opengb.readthedocs.org/
Other
12 stars 4 forks source link

Gcode file thumbnails generated on upload #13

Open amorphic opened 8 years ago

amorphic commented 8 years ago

It would be great if opengb provided thumbnail images of our uploaded gcode. The put_gcode_file method already allows the frontend to generate and upload a thumbnail via the optional thumbnail_png_base64 parameter. But if this is not present the backend should have a go.

As per this post the gctools project has been designed with the purpose of manipulating gcode with Python.

One of the features of the GCode class is a render method which outputs an svg representation of the gcode. This would be a quick way to render thumbnails on the backend however: