Customizable Temperature Calibration Tower

by kerog777 Jan 28, 2016
Download All Files

Thing Apps Enabled

Please Login to Comment

That’s now in the default install? Looks like it should work, but I haven’t tested it.

Hi kerog777,
there is a script inside Cura 4, is it fine for the test or does it has to be modified or exchanged?

Here is the script fixed for deltas (with negative coordinates)

THANKS - this also fixed an issue where if you forgot, which I did, to set initial temp correct, it wouldn't change until the next change...Now starts properly at layer 0!

Your script asks for a variable for "Temperature increment" - the help text says "decrease the temperature by this much at each level". To avoid confusion, you should label this field "Temperature decrement", as increment means increase - I was planning on going the wrong direction in heat before reading the help text! :) Great tool - I didn't know I needed it before I saw it, but I need it.

To install the script in Cura 3.2.1 and later:

  • Click Help menu item.
  • Click "Show Configuration Folder".
  • Find the folder call "scripts"
  • Place the script (with file extension .py) into the script folder: Be sure the name is: VaryTempWithHeight.py
  • Restart Cura.

You should be able to see the script

  • Click Extensions -> Post Processing -> Modify G-Code
  • Click “Add a script”
    "Vary Temp With Height" should be near the end of the list.

I did as above and the script does not show up when I restart Cura 3.3.1
Its placed in C:\Users\Jim\AppData\Roaming\cura\3.3\scripts as per show config folder under help

Alternatively, you can use the "Change at Z 5.5.1 (Experimental)" plugin that comes with the latest versions of Cura to set the nozzle temp at each height (the markers are 10mm apart).

Only 1st layer is printing :(

Cura 3.3.1
Change at z 5.5.1 (experimental)
Windows 10
I've added all the necessary scripts from 190 deg to 220 deg

It will only print the first layer and then it think it's done...what am I missing?

Thank you!

What kind of printer do you have? The postprocessing script shouldn't have any effect on printing other layers. Maybe send me a copy of your gcode and I can take a look?

I've attached the G-code which for some reason only shows 1 layer... so strange...I loaded your file, added the post processing scripts to change the temp by 5 degrees every 10mm for 50 layers from 190 to 210...

Thanks for any help you can offer :)

Excellent, thank you for your time and concern! I'll grab the code after work today and send it your way. I'm running an Anet A8. Correction on the version of 'change at z' is 5.1.1. Cheers,

I've installed this with no problems but don't observe a decrease in temperature on either the Cura monitor screen or LCD. Any suggestions? What do you input for printing temperature on the Cura prepare screen?

Check the gcode for M104 commands? You should be able to save the code with and without the postprocessing and do a diff on the two files to verify that it's working properly. What kind of printer are you using? I suppose it's possible that your firmware does not accept the standard RepRap gcode.

Script installation does work, you just have to get rid of the suffix I used to distinguish the two versions. Rename to VaryTempWithHeight.py before putting in the scripts folder.

Thanks! I had this issue where it didn't appear (Cura 3.2.1). Removed "Cura3" from the filename fixed it.

Script installation doesn't work for cura 3.2.1. The script is not shown in the list of post processing scripts :(
It requires an additional manual setup.

Yes I agree, Same here!

Awesome! Ive been looking for something like this all day! Finally one that works!

If you are using the Cura AppImage for Linux, since version 3.1.0 you can add post-processing scripts in ~/.config/cura/3.1/scripts . Then you can find them in menu Extensions:Post Processing:Modify G-Code.

So I downloaded this and used the file "TempCalTower220" and curas z-height temp customization which worked, but it printed without the overhangs/shelfs on the side, it was just flat on 3 sides with the temps on the 4th side.
I then tried to use the customizer and got an error that said
"#<RuntimeError: Failed to get https://www.thingiverse.com/download:2026670 403: Forbidden>"
and the email it send to tell me when it was done also said
"Unfortunately, there was an error generating your customized Thing based on Customizable Temperature Calibration Tower.
Sorry about that! If errors persist, let us know."

Not sure what to do.

Try again? Sounds like a one-time error sort of thing. If it's still giving a problem, let me know what input values you were trying. Remember you can always just download the OpenSCAD source and edit the parameters yourself.

To get the script to load in Cura 3 and up, drop the VaryTempWithHeightCura3.py into:

[program files]\Ultimaker Cura 3.x\plugins\PostProcessingPlugin\scripts

The script won't load and throws an error because the file name differs from the class name contained in the file. Rename the file to:


This fixed the problem loading the script for me!

Yes, this fix is confirmed. The file name must match the script name/key.

I have also found a bug which prevents this script from adding the temperature changes to the gcode:

If your object is plated so that it has negative coordinates, it seems the script will not find the Z,Y,Z lines. Which means it won't add the temperature changes.

This can be fixed by replacing

    # Set our command regex
    cmd_re = re.compile((
        r'G[0-9]+\.?[0-9]* X[0-9]+\.?[0-9]* '
        r'Y[0-9]+\.?[0-9]* Z([0-9]+\.?[0-9]*)'


    # Set our command regex
    cmd_re = re.compile((
        r'G-?[0-9]+\.?[0-9]* X-?[0-9]+\.?[0-9]* '
        r'Y-?[0-9]+\.?[0-9]* Z(-?[0-9]+\.?[0-9]*)'

in the script file.

Should I print this with my layer cooling fans off?

If you normally print with your fans off (for instance for ABS), I would say yes. The idea is to replicate the settings that you would be using in normal use.

Hi folks,
installed cura 3.1 today and the script is not showing up. Doesn't matter where i put it, it will not show under "AddScripts"

Hi everyone, Cura 3.1 just realeased. It looks liek teh scripts now have to go in a scripts folder under Users/"your account"/roaming/cura/scripts.

I have put them in there and a VaryTempWithHeightCura.cpython-35 file was generated when I started cura. However nothing appears in teh scripts list.

Anyone had any luck with this on Cura 3.1?

I am using Cura 3.1 and I could not get the script to work either..
However good news. Looks like Cura 3.1 has a script that can do this built in.

This is how I do it, there could be a better way I am still a noob and just learning.

  1. Go to Extensions then Post Processing and next Modify G-Code.
  2. Click on "Add a script" then select "TweakAtZ 5.1.1 (Experimental)"
  3. Trigger = Height, Tweak Height = 10mm, Behavior = Keep value, No. Layers = 1
  4. Check mark "Tweak Extruder 1 Temp" and set "Extruder 1 Temp" to the temperature you want at the "Tweak Height" you set in step 3.
  5. Repeat steps 2 through 4 adding 10mm to "Tweak Height" and adjusting your "Extruder 1 Temp" accordingly.

That's it just keep adding a new script until you have one for each temperature change you want. and don't forget to adjust your temperatures under "Material" on your model to control what temperature it starts at before the scripts start.

This works for all the decremental temperatures. The initial Temp is set to 210 (at least in my Cura G-Code output)
I editted the G-Code with Notepad++ changing the first temperature setting of the Hotend; Commands M104 & M109 need to be set to the desired initial temperature.

If it were 230 degrees, like this:

M104 S230
M109 S230

I put mine in (mac) ~/Library/Application Support/cura/3.1/scripts.

No luck, nothing showing up.

Did you try the place I specified in the updated description? /Applications/Cura.app/Contents/Resources/plugins/plugins/PostProcessingPlugin/scripts

That's the first thing I tried yes. But no luck.

Hi, I wanted to try this for my new 3D printer, but it looks like the new Cura version (I'm currently using 3.0.4) doesn't quite work the same way as the old version when it comes to post processing scripts. I have went ahead and remade the script (and tweaked it slightly) for the new way cura does it. You can find it here: https://github.com/DJSymBiotiX/CuraPlugins/blob/master/post_processing_scripts/VaryTempWithHeight.py

This was done rather quickly just for my own personal use, but I figured I'd chime in here and let you know. If you want me to add credits to you or anything like that on my github, I am happy to do so, just let me know what to put. I might also make a bit of a tutorial on where to put this file and how to use it as it doesn't seem to be trivial in the new cura.

Let me know if you have any questions or concerns, thanks!


I was just thinking about updating the plugin for the new Cura. Would it be OK with you to just add your version in if I credit you?

yeah no problem that works for me.

OK, I updated it with Mac instructions as well as your Windows instructions. Let me know if there are any further mods you think I should make to the description.

Getting "Invalid plugin file" when trying to install the plugin in Cura. =(

Thank you for including a py script to make it possible to understand the way it is working.

I thought that first value "adjust temperature each time height changes by this much" was in layers but it means changes in mm.
The second value is in Celcius also.

Just signed up to make this comment, saving some prints, newbie here :D

Thanks! Worked great. Found that my black PLA works best at 186 degrees with 178 being lower limit. Sliced with Cura 15.04., start at 220; no infill, no top.

I'm running the most recent Cura (2.6.1) and when I go to "Add new Plugin" it won't let me select this file. Any help?

Should you run this at 0% infill?

In Cura 2.5 I didn't need the Python script.

Go to Extensions -> Post Processing -> Modify G-Code
Click "Add A Script"
Select "TweakAtZ" to add a processing step

Trigger: Height
Tweak Height: 10mm
Extruder 1 Temp: Set this to the first temp above the base temp, eg. For the 240 tower, set it to 236

Now just repeatedly add as many TweakAtZ steps as you have temperature transitions above the base.
Each time bump the Tweak Height up by 10mm, and the temperature down by the gradient on the model, eg. 4C for the 240 tower.

Watch your printer status screen carefully while printing for extruder temp to make sure that the temperature transitions made it into the G-Code correctly.

I am able to get the first Tweak to make the first temp change but there after there are no more changes for the rest of the tweak instances I put in with Cura 3.04. Printing from SDcard.

For the plugin settings, "Adjust temperature each time the height changes by this much". This much what? Levels? Millimeters?

I must be missing something simple but when I install (I think I installed it) the plugin should it generate a m104 in the gcode but all i get it this.
;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line
;M109 S{print_temperature} ;Uncomment to add your own temperature line
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15.0 F{travel_speed} ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
G1 F{travel_speed}
;Put printing message on LCD screen
M117 Printing...

Would love to know the answer to this question as well. The extruder doesn't heat up at all unless I preheat it.

How do you customize the label on the side "8.1 Atomic" ?

It's the "Machine" field. The default is not "8.1 Atomic", which may be what was confusing you.

For anyone using this, I don't believe this work for Cura 2.X needs to be 15.X

Download cura 15.01 for this

thanks for the upload and the plugin works great.

any chance you can add one that has the bridging test? still learning to modify designs.

Not sure what you mean. The tower has bridging in it to some extent already. That's what the indentations are about. Were you looking for something more explicitly aimed at bridging?

I was using the wrong file, I found the one with overhangs. Thanks again for the upload. I use it on every roll of filament and keep it for reference.

Dumb question but how exactly do I use the plugin?

Here's what I did:

  • Go to Applications folder and find Cura
  • Right-click and select "show content"
  • From there, navigate through "Contents/Resources/plugins"
  • Simply drop the .py file there, and restart Cura.
  • You will find the plugin under the "plugins" tab in Cura -> slect it, then press the down arrow to have it appear in the box underneath the plugins list.
  • ...
  • Profit

Is this the same for 2.3.1? Are you saying to open application data the right click on cura then show contents and the contents folder will show up then resources/plugins? Not at home just trying to figure this out.

Looked around a bit, and I'd have to say not. I couldn't see any way to use your own custom plugin on the new version. I imagine they'll get there eventually. In the meantime, I am still using

You drop the file in the plugins folder, which on Windows should be under C:\Program Files (x86) or something. On Unix or OSX I think you have a .cura/plugins folder in your home directory. Restart Cura, and it should show up in the plugins tab. Beyond that, see http://wiki.ultimaker.com/How_to_use_plugins

can't seem to run through customizer. I get the error
"#<JSON::ParserError: A JSON text must at least contain two octets!>"

Seems to be working for other people. Can you tell me what settings you entered?

Thx dude! Been wanting too test out a temperature tower but haven´t figured out the Cura M104command yet. I am gonna test this when i get home from work tonight!