Skip to content

Gcode file thumbnails generated on upload #13

Description

@amorphic

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions