G-code is the most-used programming language for controlling industrial and hobby machines, such as vinyl cutters, mills, laser cutters, and 3D printers.
The G-code “tells” the computerized machines how to make things by specifying coordinates in the X, Y, and Z planes. It instructs the machines where to move, how fast to move, and when to engage the tool.
The tools can be a highspeed drill bit, a laser, razor blade, marker pen, or, in the case of a 3D printer, the filament extruder. Some of the tools remove material, such as a mill or lathe. Others make an imprint or cut, such as a plotter, vinyl cutter, or laser cutters. In the case of 3D printing, material is added as the G-code is executed.
G-code is machine specific, and therefore the type of machine will dictate what it can produce. For example, a plotting or cutting machine will only be able to use 2D files. 3D printers can only use 3D files. Your end project will tell you if your G-code will be 2D or 3D.