MeshMath

Temperature tower G-code generator

Slice any temperature tower model normally, then load the G-code here to add a temperature change at every section.

Nothing is uploaded; the file is edited on your device.

Plan

SectionStarts at ZTemperature

How it works

The tool reads every move line with a Z value (G0/G1 … Z). When the nozzle reaches a new section it inserts M104 S<temp> just before that move, so the temperature changes at the right layer:

section = floor((Z − first Z) ÷ section height)
temperature = start + section × change

Use M104 (set and continue) for towers — the hotend adjusts within a few seconds. M109 waits for the temperature but can leave blobs. The model's sections must match your section height; most popular towers use 10 mm sections with a ~1 mm base.

Suggested ranges

MaterialStart → end
PLA220 → 190 °C
PETG250 → 220 °C
ABS / ASA260 → 230 °C
TPU235 → 210 °C

Pick the coolest section with good layer bonding and bridges — usually 5–10 °C above where stringing stops being the main problem. Then check your filament is dry if stringing persists everywhere.

FAQ

How do I make a temperature tower?

Download any temperature tower STL, slice it at a single temperature, then load the G-code here, set the start temperature, change per section and section height, and download the modified file.

Does this work with Bambu Studio, PrusaSlicer, Cura and OrcaSlicer?

Yes — it edits plain G-code, so it works with any slicer that outputs standard G0/G1 moves. For Bambu .3mf print files, export plain G-code first.

Should temperatures go up or down the tower?

Start hot at the bottom and go cooler, because the bottom is printed first and hotter layers stick best to the bed.

Can I use this for a retraction test?

This version changes temperature. For retraction, change one retraction setting per print or use your slicer's built-in calibration.

Recommended gear

Some links are affiliate links: if you buy through them MeshMath may earn a small commission at no extra cost to you. Picks are generic categories, not paid placements.

Related tools