Should Premade GCODE Be Used?

By on July 15th, 2018 in Ideas

Tags: ,

 3D printing when someone else slices the 3D model
3D printing when someone else slices the 3D model

I’ve seen pre-made GCODE a few times recently, and I am a bit suspicious of it. 

GCODE is the set of machine instructions that drives a machine to print a specific 3D model. The GCODE is created by a “slicing” program that takes as input a 3D model and generates machine movement instructions for each layer of the printed model. 

Typically 3D printer manufacturers bundle a slicing program with their equipment, one that’s been tested extensively to ensure it works properly with the intended materials and especially the machine models involved from the manufacturer. 

The normal workflow for 3D Printing is to slice the 3D model, usually a .STL file, into a GCODE file. This file is transferred – wireless, by USB cable or by external media – to the printer, which then faithfully executes the instructions and prints the 3D model. 

This workflow requires that the slicer have digital  possession of the .STL file, which effectively means control over the 3D model. While the .STL file is not quite the same as having the original CAD file that generated it, in many cases the .STL file is really the final valuable representation of the object. 

To get around this intellectual property dilemma, some have used GCODE as a means of protecting the .STL: provide the user with a pre-sliced GCODE file so they never encounter the .STL file. There are ways around this, however, as at least one company can actually reverse engineer an .STL file from a given set of GCODE.

This could theoretically work, as it is commonly done with new machine distributions: you’ll often find an SD card with pre-sliced GCODE on it when opening up a new 3D printer. 

However, that GCODE was sliced with parameters specifically for that machine, and certainly for the spool of material that was included with the machine. 

That’s the scenario where this approach almost always works. But there are many where it cannot be guaranteed to work. 

I’m always a bit suspicious of pre-sliced GCODE, simply because I don’t know what parameters were used. Was it high resolution? Did it require a different nozzle size? 

One persistent problem I’ve almost always encountered on 3D printers is peculiarities in the print surface. Over time the print bed will erode, warp or even be damaged. No problem, just print “around the issue” by relocating your print. I used one specific 3D printer for quite a while even though it had a chunk chopped out of the print surface due to over-zealous print removal. 

But you can’t do that with pre-sliced GCODE. Invariably the pre-sliced code will position the print at the center of the print surface, eliminating any possibility of you moving things around. 

So yes, pre-sliced GCODE can work, but it is totally inflexible and can actually not work on certain machines. 

All this suggests that the file formats and protocols we use are not quite amenable to what people would want to do with the prints. Maybe there is a need for some type of GCODE manipulator, that could, for example, reposition the print by adding offsets where required, or adjust the temperatures throughout the file. I’m not aware of any such tools, but it seems that they could easily be created. 

By Kerry Stevenson

Kerry Stevenson, aka "General Fabb" has written over 8,000 stories on 3D printing at Fabbaloo since he launched the venture in 2007, with an intention to promote and grow the incredible technology of 3D printing across the world. So far, it seems to be working!