OctoPrint: Pause/Resume G-Code to move nozzle away

This pause / resume G-Code for OctoPrint (will likely also work with other platforms, but we only tested using OctoPrint) will move the nozzle 100mm away from the part being printed during the pause and (after clicking resume) will move to the original position i.e. it will continue the print normally.

This is useful to prevent heat damage to the part and also allow you to clean the nozzle during pause

Pause G-Code:

G91 ; Set relative positioning mode
G0Z100 ; Move Z up 100mm to assist nozzle cleaning
G90 ; Set absolute positioning mode

Resume G-Code:

G91 ; Set relative positioning mode
G0Z-100 ; Move Z down 100mm to return to print position
G90 ; Set absolute positioning mode