Comparing filament brands
I created a Python3 script that can be used with the standard version of Slic3r. Feel free to use.
- in Printer Settings, Custom G-code enter
;+L=[layer_num],Z=[layer_z] in the "After layer change G-code" box. The script will search for this marker and insert a temperature change G-Code instruction when the the next box begins.
- save script to a local file and set the path to it in Slic3r' s post-processing scripts (under Print Settings, Output options). Under Windows, you may need to wrap the script in a batch file (unless you have already a setting to open .py files with the Python3 interpreter).
- I start printing the base with 200°C. The boxes start with 220°C for the first (lowest) box, then each box is 5°C cooler, reaching 190°C for the top box. See OctoPrint screenshot. This is different from the original gradient. If you want to use this script for the original tower, you must update the temperatures.
- The script also generates a M117 instruction so you can see the current temperature in the display.
# Author: Adrian Weiler 2018
# Dedicated to the public domain http://creativecommons.org/publicdomain/zero/1.0/
# To the extent possible under law, the author has waived all copyright and related or neighboring rights to this file.
LAYER_CHANGE_RE = re.compile(r';\+L=([0-9]+),Z=([0-9.]+)')
if __name__ == '__main__':
temperatures = [[0, 200], [3, 220], [13, 215], [23, 210], [33, 205], [43, 200], [53, 195], [63, 190], [999999, 0]]
index = 0
for line in fileinput.input(inplace=True, backup=".bck"):
layer_change = LAYER_CHANGE_RE.match(line)
z = float(layer_change.group(2))
if z > temperatures[index]:
t = temperatures[index]
print ("M104 S%d" % t)
print ("M117 t=%d" % t)
index += 1