Skip to content

Instantly share code, notes, and snippets.

@rootiest
Created September 23, 2022 15:43
Show Gist options
  • Save rootiest/b6144ad2badddb1839ff1c79ce048fc0 to your computer and use it in GitHub Desktop.
Save rootiest/b6144ad2badddb1839ff1c79ce048fc0 to your computer and use it in GitHub Desktop.
[gcode_macro clean_nozzle]
gcode:
SAVE_GCODE_STATE NAME=clean_nozzle_state
G90
G0 Z2 F5000
G0 X116.8 Y354 F10000
{% for wipe in range(8) %}
{% for coordinate in [(81.8,354),(116.8,354)] %}
G0 X{coordinate[0]} Y{coordinate[1] - 0.5 * wipe} Z0 F6000
{% endfor %}
{% endfor %}
G0 X116.8 Y354 Z2 F5000
RESTORE_GCODE_STATE NAME=clean_nozzle_state
[gcode_macro G12]
gcode:
CLEAN_NOZZLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment