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:
- gctools has not been formally released - it's just a bunch of code in a github repo. As per my comment at the bottom I offered me help in properly releasing it so that we could make it a dependency for opengb and the author was receptive to the idea.
- gctools may or may not work with Python 3.x
- gctools requires pillow and matplotlib which would also need to work on Python 3.x
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_base64parameter. 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: