Skip to content

Instantly share code, notes, and snippets.

@justheath
Last active May 25, 2023 01:36
Show Gist options
  • Save justheath/a41e43ac8d128cd0f010c4f39c45a3bb to your computer and use it in GitHub Desktop.
Save justheath/a41e43ac8d128cd0f010c4f39c45a3bb to your computer and use it in GitHub Desktop.
Start / End Gcode for Slicer
# Note: variables used below should be same as those in the [START/END]_PRINT macros.
#### CURA Start and End G-code for use with Klipper
# Start G-Code
# Pass the filament's temperature values
SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=bed_temp VALUE={material_bed_temperature_layer_0}
SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=extruder_temp VALUE={material_print_temperature_layer_0}
# calls the Klipper macro to prepare extruder and bed
START_PRINT
# End G-Code
# use machine_depth to move bed to front to "present" the completed print
SET_GCODE_VARIABLE MACRO=END_PRINT VARIABLE=machine_depth VALUE={machine_depth}
# calls the Klipper macro to shut things down and cool off
END_PRINT
#### PRUSASLICER version for use with Klipper
# Start G-code
SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=bed_temp VALUE=[first_layer_bed_temperature]
SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=extruder_temp VALUE=[first_layer_temperature]
START_PRINT
# End G-code
SET_GCODE_VARIABLE MACRO=END_PRINT VARIABLE=machine_depth VALUE=235
END_PRINT
@justheath
Copy link
Author

Updated to match what I'm currently using in PrusaSlicer

@justheath
Copy link
Author

justheath commented Sep 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment