G-code is a catch-all term for the control language used by CNC machines,
3D printers, and other electronically controlled precision machines. It is a
way for you to tell the machine to move to various points at a desired speed,
control the speed of a cutting tool (such as a spindle), turn on and off various
coolants, and perform other actions, usually all part of moving a toolhead
across a toolpath .
You experience an example of G-code, however briefly, every time you make
a model in MakerWare, though you might not notice it. Every time you make
a new model or export the build instructions to an SD card, MakerWare uses
a tool, called a slicer , under the hood to generate the G-code that the Repli-
cator 2 uses to make your object.
As far as languages go—and as far as implementations of G-code are con-
cerned—the Replicator flavor of G-code is tremendously simplified. With a
tiny bit of study, it is almost human readable-if dull reading at that. A typical
document is a long series of G1 commands (“Go to this x/y/z position and
this speed”), with all of the fussy machine mode setting and pre-heating and
cooling at the head and tail of the print.
As all of the fine details including curves tend to be rendered as a series of
small segments rather than long straight runs, reading G-code by eye without
a G-code visualization tool can be difficult. But as the positioning information
tends to be absolute, based on a point (X0, Y0, Z0) right at the center, top
surface of the build platform, you can look through a script and always know
where you are.
In theory, you could recover from a power outage partway through a print by
measuring exactly where it left off, using a text editor to delete all the G-code
in the file from the first layer (identified as “Slice 0”) up to the layer where
you want to resume, and saving that file. Then you could use MakerWare's
File → Make from File option to print everything from that layer on. But that's
going to take a combination of luck and skill to get just right!
Occasionally, you may find that you need to modify the default print settings.
Some of the most commonly modified print settings are infill, layer height
and number of shells.
You can access the additional menu options by clicking the “Show Advanced”
button at the lower-left corner of the Make dialog ( Figure 6-30 ).