G-code files are normally created when slicing software processes a 3D model, but there are some interesting tricks to be done when G-code is created directly.