gCodeToSVG is a simple script that converts a 3D STL model to a stepped grayscale SVG image.

Using CURA as the slicer, gCodeToSVG converts the gcode for use on a 2.5D router using Easel.

Step 1. Create or Download desired STL file.

Step 2. Open STL in CURA
— Note. Why CURA? The gcode from CURA is easily parsed. It is easy to discern the layers and external perimeters, making it easy to ignore the fill and internal perimeters.
— This has been specifically tested on gcode produced by CURA 15.04.4 on my Mac.
— Note. Will other slicers work? Not for this. I opened gcode from other slicer. I’d have to write much new code for this to work. Stick with CURA.

Step 3. In CURA, use the “Layer Height” and Z scale to produce the number of layers.
— Note. There are 256 available “grays” from black to white. So there is no reason to have more than 256 layers.
— Note. Using all 256 layers as stepped grayscale will make a huge SVG and Easel will run slowly.
— Note. Save gCode using default .gcode extension

Step 4. Using gCodeToSVG, upload your .gcode file. You will see a prepended timestamp when uploaded.

Step 5. Once uploaded, user will have option to set the lowest and highest values.
— Note. Remember that in Easel, black represents cutting through to the bottom of the material.
— Note. Also, white represents the surface of the material.
— Note. (Zero=Black) (127=50% Gray) (255=White)

gCodeToSVG
If there are questions or concerns, feel free to email.

steve AT cuttingedgedata DOT com