Ask an FDM printer for a 20mm hole and you'll typically get something closer to 19.8mm. Ask for a 20mm boss and you'll get something closer to 20.2mm. This isn't drift or bad luck — it's two separate, well-understood mechanisms, both large enough to matter and both correctable once you know which one you're fighting.
Mechanism one -- extrusion geometry
A nozzle deposits a bead of a fixed width, commonly 0.4mm, and the slicer's toolpath follows the model's outline with the centre of that bead. On an external wall, this means the bead sits half its width outside the true line, so the printed perimeter is oversized by roughly one extrusion width across the part. On an internal feature like a hole, the same bead sits half its width inside the true line, so the hole is undersized by the same amount. This is often called "elephant's foot" when it happens at the base layer specifically — the first layer flattens slightly under its own weight and the nozzle's proximity to the bed, widening the very bottom of the part more than the layers above it.
Mechanism two -- thermal shrinkage, and it is not isotropic
Plastic contracts as it cools from extrusion temperature to ambient, and FDM parts don't shrink the same amount in every direction. X and Y shrinkage is fairly small and fairly uniform, because each layer is deposited quickly and constrained by the layers already cooled beneath it. Z shrinkage behaves differently — interlayer bonding depends on the layer below still being warm enough to fuse with the one being deposited on top of it, and the strength and completeness of that bond varies by material. This is also why layer adhesion and dimensional stability trade off against each other: a hotter nozzle improves bonding but increases shrink and warp risk; a cooler one reduces shrink but risks weak interlayer strength.
How this differs by material
- PLA is semi-crystalline but cools and solidifies quickly, giving it the smallest and most consistent shrink of the common materials -- generally the easiest to hit a tight tolerance with.
- PETG bonds layers more strongly than PLA, which is good for part strength but means more retained internal stress as it cools -- slightly more prone to Z-axis variation and to elephant's foot on a heated bed.
- ABS has the highest thermal contraction of the three, and cools unevenly without an enclosure -- outer walls cool and shrink before the core does, which is the direct cause of corner lift and warping on large flat parts, not just a tolerance nuisance.
Compensating for it in Bambu Studio
Bambu Studio exposes this directly under Process —> Quality. XY Hole compensation adjusts every hole in the model independently of the outer contour — a positive value grows a hole, correcting for the undersizing described above. XY Contour compensation does the same for external walls, shrinking or growing the whole outline. Elephant foot compensation is separate again — it shrinks the first few layers specifically, rather than the whole model, which is the correct fix for a first-layer bulge without over-correcting the layers above it. For plain circular holes and shafts under 50mm, Bambu Studio also has Auto Circle Compensation, which applies a filament-specific correction the slicer already has built in for a growing list of Bambu-branded filaments — worth enabling as a first pass, though it doesn't cover every material and doesn't replace calibrating your own values for the filaments it doesn't know.
Calibrating it for real, per material
None of these values are universal — they correct for a specific printer, nozzle, and filament combination, so the right number for one spool of PETG isn't guaranteed to be right for another brand, or even another colour of the same brand. The way to find the real number is a calibration print, and it's worth keeping one on file per material rather than guessing fresh each time:
- Print a stepped test plate. A small plate of holes (or a matching set of pins and holes) sized in fine steps -- commonly 0.05mm increments across a range like -0.3mm to +0.3mm -- lets you print every plausible compensation value in one job instead of one test print per guess.
- Measure with calipers, not by eye. Find the step that comes out closest to the nominal dimension, and separately note the one that gives the cleanest press-fit against a real pin or bolt if that's what the part will need to hold.
- Record it against that specific filament, not just "PETG." Batch-to-batch variation in a filament is real -- a value that was right for one spool can drift slightly on the next. Treat the calibration as a starting point to re-check occasionally, not a number to set once and forget.
- Re-run it after any major printer change. A nozzle swap, a bed level, or a new hotend all shift the baseline slightly -- worth re-calibrating rather than assuming last month's number still holds.
The takeaway for design work
Compensation settings fix the printer's average error. They do not eliminate part-to-part variation from bed adhesion, ambient temperature, or filament moisture content, which is why a genuinely critical fit still deserves a physical test print rather than blind trust in a calibrated number. Calibration gets you close on the first attempt; verification is what gets you exact.