How to add a preview picture to your gcode

Since nobody wanted to help me (or is not interested in the feature) I found a workaround (since I don’t know a detail of the SM Luban code) by myself:

Slice the file with Snapmaker Luban and export the gcode as a file (since I only want the picture there is no need to worry about the settings).
Then slice the model with your desired software.
Open both files with a text editor.
Now copy the marked parts from the Luban-created file to the other and save the file:

Now you can send the gcode to the machine and you will see a preview after the parsing (when you copy the complete header the picture is displayed earlier but the displayed values are incorrect).

PS: Since the header only contains the graphic all other values are calculated by the software on the SM2.0 - and the size is including skirt and end script.

PPS: Maybe somebody from the programmers (or anybody interested in this) can discuss with me about my “solution”.

7 Likes