“G-code” is technically a slang word for the code format that CNC machines need for their particular kinematics they have to generate particular “toolpaths” to make particular components, etc.
In the last decade or more, 3D-printers have basically adapted to use a similar format of “G-code”.
As I understand it, the slang word “G-code” comes from the fact that the letter “G” is used quite often throughout the code in order to “prepare” the CNC machine to take actions appropriately for given situations.
G-codes that actually have the “G” are known as “preparatory” codes. But there’s also “M”-codes and plenty of other letters are used as well, such as “S”, “R”, “T”, “H”, “O”, “P”, “L”, “Q”, “N”, etc…
These codes are usually formatted into single line “blocks”, whereby the machine will read them one line at a time, and some machine can read the line usually from left to right, but some machines can read the lines all at once, and some machines from right to left – it may seem.
Different ‘controls’ and ‘machines’ have entirely different behaviors and characteristics and results from similar codes – it all depends on how the CNC machines are built and energized, etc.
The “STL” format, imo, as I understand it is basically what I’d just call a “mesh” format, and that’s all I really use it for. Yes, 3D-printers basically all rely on this “mesh” format.
While, the other machines more traditionally referred to as “CNC” machines do rely on this “mesh” format, they don’t require entirely just mesh data.
I could go off on a tangent here, but long story short, on a daily basis doing CNC work, I mostly rely on these formats: STP/STEP, IGS/IGES, and STL – and don’t forget 3DM.
3D printers have a very simplified approach to the whole CNC aspect, via STL mesh format utilization.
This may likely evolve over time, but I think in terms of simplicity and reaching a very large audience, the whole mesh(STL) thing is just easier for the end user in some ways, but there’s definitely pros and cons.
This sounds to me like a Rhino plugin oriented for “slicing” geometry into toolpath data for 3D-printing applications. There’s many slicer programs out there, but this one might be useful inside the Rhino workspace…
I believe yes, but the object might have to be a “mesh”, and remember the “G-code” is just what the 3D-printer needs to follow the “toolpaths” necessary to print the parts you’re wanting it to make.