public void finalize() { if (!gcode.IsOpened()) { return; } gcode.Finalize(maxObjectHeight, config.travelSpeed, config.endCode); gcode.Close(); }