4 ms·
Do you make use of loops and variables and branching? Folks get an awful lot of work done using G-code thus, incl. work on lathes which few CAM programs would
by WillAdams 3y ago
Do you make use of loops and variables and branching?
Folks get an awful lot of work done using G-code thus, incl. work on lathes which few CAM programs would handle with aplomb, let alone the same mathematically correct efficiency.
- jakobson14 3y agoUsing gcode on a lathe or other subtractive machine is ORDERS of magnitude more productive because orders of magnitude less code is required because orders of magnitude fewer operations are required. With a subtractive process you typically only need to put a few holes into specific locations using a cutting tool roughly the same size as the hole. Jog over, plunge, jog over to the next site, plunge. Maybe you need to mill out a few pockets or an exterior shape, in which case you switch to an endmill that's good for mass material removal and perform 2-3 passes around the outline's polygon. And then there are additive processes that 3D printers use. Try to back-of-the-envelope how many passes of the tool head are required to build a 5x5x5cm cube using a hotend that has an orifice of 0.0004 cm and a layer thickness of 0.0002 cm. It's a lot of passes, and because gcode was designed for the subtractive processes where only a few passes are typically required, it contains zero macro commands for doing it in fewer lines of code. If you want to infill with a fancy material-saving pattern, the complexity of the movements required goes exponential and so does the LoC.
- brookst 3y agoI use loops and branching, but way up in the Grasshopper programming layer, not gcode. My work is things like https://www.instagram.com/p/CZrtHC_px1D/ https://www.instagram.com/p/CZrtHC_px1D/ , where the modulations happen at so many layers that it's much easier to generate gcode from a higher level programming language. Plus it's nice to be able to visualize a piece in CAD before generating the gcode.