Gcode generating scripts for 3D printing