forked from rootiest/zippy-klipper_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CIRCLE_WIPE.cfg
32 lines (30 loc) · 1.29 KB
/
CIRCLE_WIPE.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[gcode_macro CIRCLE_WIPE]
gcode:
# Adjust these if necessary to fit on your bed
{% set X_MAX = printer.toolhead.axis_maximum.x|default(200)|float %}
{% set Y_MAX = printer.toolhead.axis_maximum.y|default(200)|float %}
{% set X_MIN = printer.toolhead.axis_minimum.x|default(0)|float %}
{% set Y_MIN = printer.toolhead.axis_minimum.y|default(0)|float %}
{% set X_CENTER = ((X_MIN + X_MAX) * 0.5) %}
{% set Y_CENTER = ((Y_MIN + Y_MAX) * 0.5) %}
{% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %}
{% set PRIMER_HEIGHT = 0.70 * NOZZLE %}
{% if printer.toolhead.homed_axes != "xyz" %}
{action_respond_info("Please home XYZ first")}
{% elif printer.extruder.can_extrude != True %}
{action_respond_info("Extruder temperature too low")}
{% else %}
SAVE_GCODE_STATE NAME=WIPE_LINE_state
M117 Priming nozzle
M82
G90
G92 E0
G1 X{X_MIN} Y{Y_CENTER} Z3 F2500
G1 X{X_MIN} Y{Y_CENTER} Z{PRIMER_HEIGHT} F5000.0
G2 X{X_MAX} Y{Y_CENTER} I{X_CENTER} J{Y_CENTER} F1800
G2 X{X_MIN} Y{Y_CENTER} I{X_CENTER} J{Y_CENTER} F1800
RESTORE_GCODE_STATE NAME=WIPE_LINE_state MOVE=0
M117 Priming complete
{% endif %}
# This is necessary to use G2/G3 commands:
[gcode_arcs]