Part 5 · Design for printing

Tolerances & fits

Why a 10 mm hole prints at 9.7 mm, how much clearance every kind of fit needs, and how to calibrate your printer so the parts you design actually go together on the first try.

Intermediate⏱ 40 min read
What you will learn

Where dimensional errors come from, how to choose clearance for press, snug, slip, sliding and print-in-place fits, how to design and print a tolerance test coupon, how to set up CAD parameters so a one-number change adapts a design to a new printer or filament, and how to compute recommended hole sizes with the calculator on this page. All values assume a 0.4 mm nozzle and 0.2 mm layers; they are starting points that you must verify with your own printer.

🔰 Where dimensional errors come from

Tolerance is the permitted deviation from a nominal size. A machinist working with a lathe expects ±0.01 mm; a typical FDM printer delivers roughly ±0.1–0.3 mm on small features and about ±0.5 % on larger ones. The good news is that most of the error is systematic, meaning it is the same every time, so you can measure it once and design around it. Truly random error is much smaller.

1 · CAD modelexact numbers(0 mm error) 2 · Slicerline width, polygonapproximation 0.01–0.05 3 · Printersteps, belts, flow±0.05–0.15 mm 4 · Materialshrink 0.2–2 %moisture, temp 5 · Measuringcaliper ±0.02,squish of soft plastic Systematic (calibrate away) • Extrusion squish makes outer walls 0.05–0.1 mm too big per side • Holes print 0.1–0.3 mm too small (polygon + bead push-in) • Shrinkage scales with size: 0.3 % of 100 mm = 0.3 mm Random (design a margin for it) • Temperature and humidity swings between prints • Filament diameter variation ±0.02 mm • Worn nozzle, loose belt, variable first-layer squish Strategy: measure → compute offset → put it into one CAD parameter → verify with a test coupon.
Figure 1. The five places where a printed dimension can drift from the model. Calibration removes the systematic part; clearance covers the random part.

🔰 Shrinkage and horizontal expansion

Two different effects change sizes in the XY plane, and they push in opposite directions on different features:

Plan view: CAD (dashed) vs printed (solid) outer face: +0.05–0.1 mm per side (squish) hole: −0.1 to −0.3 mm diameter (inner bead + polygon) Blue dashed = CAD outline · solid = what the printer makes Cooling shrinkage hot: as extruded, 100.0 mm cooled: 99.7 mm (PLA, 0.3 %) ΔL = L × s s = 0.2–0.5 % PLA, 0.5–1 % ABS nylon up to 1.5–2 %
Figure 2. Left: outside surfaces grow while holes shrink, so the same offset must be applied with opposite signs. Right: cooling shrinkage scales with the dimension, which is why large parts need a bigger correction than small ones.
Why holes print small

Slicers approximate a circle with a polygon whose corners lie on the circle, so the polygon’s sides lie inside it. In addition, the inner perimeter bead is pressed inward by the plastic’s own flow and surface tension. Both effects reduce the hole and both scale weakly with diameter, so a 3 mm hole typically loses 0.15–0.25 mm while a 30 mm hole loses roughly 0.2–0.3 mm.

🔰 Clearance tables: from press fit to loose

A fit describes how two mating parts relate: a shaft (the male feature: pin, rod, boss) goes into a hole (the female feature). Clearance is hole minus shaft; a negative number is an interference (press fit). The numbers below are diametral CAD clearance: the hole diameter in the model minus the shaft diameter in the model, for a well-tuned 0.4 mm printer printing PLA or PETG with the axis vertical. Add more for large diameters, horizontal axes or high-shrink materials, and subtract for very well-calibrated machines.

Fit classCAD clearance (diametral)BehaviorTypical use
Press fit0.00 to +0.10 mmNeeds a hammer or vise; permanent.Dowel pins, bushings, magnets, bearings in a tight seat.
Snug / transition+0.10 to +0.20 mmHand push, holds without glue.Lid plugs, alignment pins, inserts with glue.
Slip fit+0.20 to +0.30 mmSlides by hand with slight resistance, no wobble.Stack-up parts, slide-on caps, general assembly.
Sliding / running+0.30 to +0.40 mmMoves freely, small play.Hinge pins, drawers, rotating knobs.
Loose+0.40 to +0.60 mmObvious play, tolerant of warping.Large parts, hot-chamber materials, lids that must always close.
Print-in-place0.30–0.50 mm per sideParts print separated and move after printing.Chains, hinges, captive balls, gear trains.
Press0.0–0.1 mminterference after print Snug0.1–0.2 mmhand push, no play Slip0.2–0.3 mmslides with friction Sliding0.3–0.4 mmmoves freely Loose0.4–0.6 mmplay, forgiving Gaps drawn about 12× larger than real for clarity. Start with “slip” (0.25 mm) when unsure and adjust after the first test print.
Figure 3. Hole-and-shaft sections for the fit classes (gaps exaggerated). The press fit is drawn with the shaft filling the hole entirely to show that, after printing, the shaft is slightly bigger than the undersized hole.

Print-in-place clearances

When two moving parts print together in one job, the gap between them must be large enough that the neighboring surfaces do not fuse, yet small enough to avoid slop. Horizontal gaps (side faces) and vertical gaps (top and bottom faces) behave differently because vertical gaps are quantized by layer height: each gap should be a multiple of the layer height, and at least two layers.

0.4 0.4 0.4 0.4+ (sag room) captive core Print-in-place rules (0.4 mm nozzle) • Side gap: 0.3 mm minimum, 0.4–0.5 mm safe • Top gap: 2–3 layers (0.4–0.6 mm) • Bottom gap: 0.3–0.5 mm; the roof over it must be a bridge or a 45° chamfer • Round the moving surfaces so they do not catch • Print slowly with cooling; avoid gaps in hot chamber materials (they fuse) • After printing, flex or twist the joint to break any thin skin between the surfaces
Figure 4. A captive core inside a print-in-place sleeve. The vertical gaps must be multiples of the layer height; the side gaps must clear the squish-out of both parts.
X2D note

A hot chamber (up to 65 °C) keeps the plastic warmer and can reduce the effective gap, so print-in-place parts in ABS, ASA or nylon need 0.1 mm more side clearance than the same design in PLA with the chamber cold. Fans on the X2D also cool bridges and overhangs better; see Engineering materials & chamber.

🔧 Hole undersize rules, teardrops and diamonds

Holes need two corrections: size (they print small) and shape (horizontal ones sag at the top, see Design principles). First the size.

8 segments sag = 0.076 rr = 5 mm → 0.38 mm 16 segments sag = 0.019 rr = 5 mm → 0.10 mm 64+ segments sag = 0.0012 rr = 5 mm → 0.006 mm Check your exports Coarse STL mesheslose size before theprinter even starts.Use $fn ≥ 64 or STEP. sag (mm) = r × (1 − cos(180° / n)) for a polygon whose corners lie on the circle. Blue dashed = ideal circle.
Figure 5. Why mesh resolution matters for holes. A 16-sided polygon already makes a 10 mm hole 0.1 mm too small at the flats; use finely tessellated exports (or STEP files) for precision features.

The second contribution is physical: the inner perimeter of a hole is pushed inward by the bead. The practical result is the following rule table.

HoleAdd to the CAD diameterComment
Vertical, 2–10 mm+0.15 to +0.25 mmMost reliable; start at +0.2 mm.
Vertical, 10–40 mm+0.20 to +0.30 mmLarge holes shrink more in absolute terms.
Horizontal, any size+0.25 to +0.40 mmPlus teardrop or diamond shape to avoid a sagging roof.
Tiny holes < 2 mm+0.20 to +0.30 mmOften too tight; print undersize and drill.
Screw clearance, M33.4–3.5 mm (nominal 3.0)Slip fit for the thread; more in the joint chapter.
Pin hole for 1.75 mm filament rod1.9–2.0 mmCommon cheap pin for hinges and alignment.
Pro trick: size by the part that matters

Put the clearance on the hole, not on the shaft. A shaft that carries a load should keep its nominal size so it stays strong, while a hole is easy to enlarge by adding 0.2–0.3 mm. For round bar stock or commercial hardware (bolts, bearings, magnets) the shaft is a fixed purchased dimension, so the only variable is the printed hole.

Teardrop and diamond geometry

0.71 D D Teardrop apex 45° tangent lines 1.41 D Diamond inscribed circle = D Which one? Teardrop: round at thebottom, pointed top. Diamond: symmetric,safe in any orientation. Flatten a sharp apexby 0.2 mm if it digs in.
Figure 6. Teardrop apex height is r·√2 = 0.707·D above the hole center (tangent lines at 45°). A diamond circumscribed around the circle has a diagonal of 1.414·D.

🔧 Test coupons and the tolerance gauge

A test coupon is a small, fast print that measures your actual tolerances so you never guess. A single coupon with a row of holes in 0.05 mm steps and a matching peg tells you at a glance which clearance feels “snug”, “slip” and “sliding” on your printer with this filament. Print it each time you change material, nozzle, or printer.

0.100.150.200.250.300.350.400.45 PegØ 8.0 mm How to read it 1. Print the plate flat and the peg upright. Do not sand either part. 2. Test the peg in each hole. The first hole it enters with a light push is your “snug” value; the first it turns freely is “sliding”. 3. Write the numbers on the plate (the label on each hole is diametral clearance in mm) and keep it with the filament spool.
Figure 7. A tolerance gauge: one peg, a row of holes with growing clearance. The peg diameter is fixed; the holes grow 0.05 mm at a time. Hole radii are drawn with exaggerated differences.

Parametric OpenSCAD tolerance gauge

Paste this into OpenSCAD, set the peg size you actually need, render (F6) and export STL. Print the plate flat and the peg standing on its end. The code needs no libraries.

// tolerance_gauge.scad - peg and plate clearance test
peg_d    = 8;      // nominal shaft diameter (mm)
c_first  = 0.10;   // smallest diametral clearance (mm)
c_step   = 0.05;   // clearance increment (mm)
n_holes  = 8;      // number of holes
plate_t  = 3;      // plate thickness (mm)
margin   = 5;      // border around holes (mm)
$fn      = 96;     // fine tessellation so holes stay round

pitch  = peg_d + 2 * margin;
plate_w = pitch * n_holes;

module label(txt) {
    // engraved 0.6 mm deep, readable at 3 mm height
    translate([0, -peg_d / 2 - 1.5, plate_t - 0.6])
        linear_extrude(1)
            text(txt, size = 2.5, halign = "center", valign = "top");
}

module plate() {
    difference() {
        translate([0, -pitch / 2, 0])
            cube([plate_w, pitch, plate_t]);
        for (i = [0 : n_holes - 1]) {
            c = c_first + i * c_step;
            translate([pitch * (i + 0.5), 0, -1])
                cylinder(d = peg_d + c, h = plate_t + 2);
            translate([pitch * (i + 0.5), 0, 0])
                label(str(c));
        }
    }
}

module peg() {
    // 12 mm tall peg with a 0.4 mm chamfer at both ends
    cylinder(d1 = peg_d - 0.8, d2 = peg_d, h = 0.4);
    translate([0, 0, 0.4]) cylinder(d = peg_d, h = 11.2);
    translate([0, 0, 11.6]) cylinder(d1 = peg_d, d2 = peg_d - 0.8, h = 0.4);
}

plate();
translate([plate_w / 2, pitch + 6, 0]) peg();

A ready-made version of this gauge and other calibration models are listed on the Downloadable test models page.

Also test the opposite fit

To test an external fit such as a lid over a box, print a row of small lids with 0.1–0.5 mm of gap and a fixed box rim. To test slot tolerances, add a plate with slots instead of holes. A good coupon takes 5–10 minutes and uses less than 10 g of filament.

🚀 Fit classes and how they compare with machined fits

Mechanical engineers describe fits with ISO symbols such as H7/g6 (a close running fit) or H7/p6 (a light press fit). Those fits typically sit in precision grades IT6–IT7, with tolerance zones of 0.01–0.02 mm for a 10 mm diameter. FDM at its best delivers roughly the IT13–IT15 range, which is 0.2–0.5 mm for the same diameter. You cannot print a true H7/g6 fit directly, but you can reproduce the behavior of each class by shifting the nominal size and then ream or drill when you need precision.

Machined classBehaviorFDM equivalentTip
H7/p6 interferenceHammered togetherPress fit: 0.0–0.1 mm CAD clearanceAdd a lead-in chamfer 0.5 mm; cut a slit to let it flex.
H7/k6 transitionMallet or hand pressSnug: 0.1–0.2 mmUse for alignment pins that must not wobble.
H7/h6 locationSlide by hand, no playSlip: 0.2–0.3 mmDo not expect it to be precisely coaxial.
H7/g6 close runningSmooth rotationSliding: 0.3–0.4 mmPrint the bearing seat vertically.
H9/d9 free runningPlenty of playLoose: 0.4–0.6 mmFor large or warping parts.

🚀 Tolerance stacking

When several parts are assembled in a chain, their individual errors add up. This is tolerance stack-up. A tolerance of ±0.1 mm on each of four stacked parts can accumulate to ±0.4 mm in the worst case, which is the difference between a perfect lid and a lid that will not close. Statistically the errors rarely all align, so the likely stack is the root sum of squares (RSS): √(4 × 0.1²) = ±0.2 mm.

20 ±0.1 20 ±0.1 20 ±0.1 20 ±0.1 stack length 80.0 mm (±0.4 worst case, ±0.2 RSS) housing 81.0 ±0.2 Gap budget nominal: 1.0 mm worst case: 1.0 − 0.4 − 0.2 = 0.4 mm ✓ still fits with no clearance: −0.6 mm ✗ collision Always include a deliberate gap in the stack (at least the sum of the worst-case tolerances).
Figure 8. Tolerance stack-up in a chain of parts. Worst-case stacks add linearly; typical stacks add in quadrature. Design for the worst case when a failure is expensive.

🔧 Calibration offsets

The test coupon tells you how far your printer is from the model. Convert that into numbers you can use:

1 Printcoupon (20 mmcube + holes) 2 Measure3× each, meanat 20 °C 3 Computeoffset = (nom −meas) / 2 4 ApplyCAD parameteror slicer XY comp. 5 Verifyreprint, within±0.05 mm? if not, repeat (usually two rounds are enough)
Figure 9. The calibration loop. Two passes bring most printers to ±0.05 mm on the calibrated features.
  1. Print a coupon with a 20 mm outside cube, a 10 mm hole (vertical) and a 10 mm hole (horizontal). Use your normal profile and material.
  2. Measure each dimension three times with calipers; let the part cool to room temperature first and average the readings.
  3. Outside offset: (20 − measured) ÷ 2 gives the per-side error. Example: measured 20.12 mm → −0.06 mm per side.
  4. Hole offset: 10 − measured hole diameter. Example: measured 9.78 mm → add +0.22 mm to the CAD hole diameter.
  5. Enter the values as parameters in your CAD file (next section) or use the slicer’s XY hole and contour compensation. Prefer one place, not both.
  6. Reprint the coupon with the corrections and confirm.

🔧 Designing tolerance parameters in CAD

Never type 8.2 into a sketch and move on. Instead, define the tolerances once as named parameters at the top of the model and use them everywhere. When you change printer, nozzle or filament, you edit three numbers and every hole, lid and pin follows. Fusion, Onshape and FreeCAD call them user parameters, variables or a spreadsheet; OpenSCAD and CadQuery use ordinary variables. A step-by-step workflow with a complete OpenSCAD example is on the Parametric CAD workflow page.

Tolerance parameters tol_press = 0.05 tol_snug = 0.15 tol_slip = 0.25 tol_slide = 0.35 tol_pip = 0.40 hole_extra = 0.10 wall = 1.35 layer = 0.20 Pin hole: pin_d + tol_snug Lid gap: lid_id + tol_slip Hinge: pin_d + tol_slide Moving gap: tol_pip per side Why it pays off • New filament: edit one line • New printer: swap a profile • Share the design: others tune it too • No hidden magic numbers in sketches
Figure 10. One parameter block, many features. The names say which kind of fit the feature wants; the numbers belong to your printer and filament.
Design intent

Name parameters by what the fit does (tol_snug), not by value (tol_015). The value will change when the printer changes; the intent will not.

🔧 Per-material shrinkage

Shrinkage matters when one of the mating parts is not printed (a steel pin, a bearing, a magnet) because then only the printed hole shrinks. It also decides how much a large part needs to be scaled. The table shows typical linear shrinkage after cooling; treat the ranges as indicative and measure your own with a 100 mm bar.

MaterialLinear shrinkage (typical)Warp riskNotes
PLA0.2–0.5 %LowThe most dimensionally stable; good for tight fits.
PETG0.2–0.6 %LowSquishes more; holes often smaller than PLA.
ABS0.5–1.0 %HighNeeds a warm enclosure; large flat parts warp.
ASA0.4–0.9 %Medium–highSimilar to ABS, slightly better.
PC0.5–0.8 %HighNeeds high bed and chamber temperature.
Nylon (PA6, PA12)1.0–2.0 %HighAlso absorbs moisture and swells 1–3 % in size when conditioned.
TPU0.4–1.2 %LowSoft: calipers squash it, so measure lightly.
CF/GF-filled grades0.1–0.5 %Low–mediumFillers reduce shrinkage and warping to roughly 1/3–1/2 of the unfilled polymer.
Typical linear shrinkage, midpoints (% of dimension, indicative)
PLA0.35 %
PETG0.4 %
CF-filled0.3 %
PC0.65 %
ASA0.65 %
ABS0.75 %
Nylon1.5 %
X2D note

A heated chamber (up to 65 °C) lets you print ABS, ASA, PC and nylon with less warping, and reduces the temperature step each layer experiences on cooling, but it does not remove shrinkage. For official guidance on materials and chamber temperatures, read Engineering materials & chamber and the Bambu Lab wiki.

🔧 Compensating in the slicer

Slicers can apply the correction for you. The two settings to know live under Quality → Precision in Bambu Studio and OrcaSlicer:

contour −0.05 mm hole +0.10 mm Slicer or CAD? Pick one Slicer compensation: + works for every downloaded model − applies to all holes the same, tiny or huge CAD parameters: + distinct clearance per fit type − only for models you design yourself Never apply both: you would count the correction twice. Start slicer comp. at 0 and design clearances in CAD.
Figure 11. Slicer XY compensation grows holes and shrinks contours by a fixed amount. Use it for downloaded models, or for your whole printer profile, but not on top of CAD clearances.
Auto hole compensation on the X2D

The X2D offers automatic hole and contour compensation, but only with designated Bambu filaments and only for vertical circular holes. Check the printer and slicer notes in Bambu Studio settings & profiles before relying on it, and keep your measured offsets as a fallback.

🔧 Post-print machining: drilling and reaming

When a hole must be accurate (a bearing seat, a precision pin), print it undersize and finish it with a drill or reamer. A drill bit cuts a round, straight hole regardless of print errors. Reaming then brings it to size with a smooth surface.

1 · Print undersize hole 7.6 mm for an 8 mm bore 2 · Drill sharp bit, 200–500 rpm,peck to clear plastic 3 · Ream hand reamer → 8.0 mm,straight and smooth Work slowly: friction melts PLA at about 60 °C. Back out often, never force, and clamp the part.
Figure 12. Print undersize, drill, ream. The hole diameters are for a 0.4 mm nozzle; leave at least 0.3 mm of stock for the final cutting tool.
TargetPrint holeFinish with
3.0 mm dowel (press)2.6–2.7 mm3.0 mm drill, hand ream
M3 clearance3.2–3.4 mm3.4 mm drill if tight
M3 tapped thread2.7–2.8 mmM3 hand tap (2.5 mm tap-drill size, printed a little oversize)
608 bearing seat (22 mm)21.6 mmReamer or boring, stop at 22.05 mm for a light press
8 mm smooth rod7.6 mm8.1 mm drill for slip, 8.0 for snug

🚀 Thread tolerance

Printed threads work if you respect the nozzle. A 0.4 mm nozzle cannot resolve fine metric pitches: use pitch ≥ 1.5 mm, preferably 2–4 mm, and a trapezoidal or square profile with a flank angle around 30°–45°. Between a bolt and nut leave a radial clearance of 0.2–0.35 mm (0.4–0.7 mm on the diameter).

0.25 Nut (internal thread) Bolt (external thread) Rules for printed threads • Pitch 2–4 mm (M12 and larger), 3–6 full turns • Radial clearance 0.2–0.35 mm per side • Flat crests and roots; avoid sharp 60° ISO tips • Print with the axis vertical (layers cut across the thread, so each tooth is one set of layers) • Add a lead-in chamfer 0.5–1 mm • Small screws (M2–M6): use real hardware and tap or use heat-set inserts (see joints page)
Figure 13. A printed thread pair in section: the same profile, shifted by a half pitch, with a uniform clearance of about 0.25 mm. Dimension shown at exaggerated scale.

🔧 Assembly with dowels

Dowels (short cylindrical pins) align two parts accurately regardless of how rough the printed surfaces are. They are the most reliable way to join split models, lids and large assemblies. The trick is to use a snug fit in one part and a slip fit in the other: the snug side holds the pin permanently, the slip side lets the second part come off.

Slip hole (+0.25)Snug hole (+0.10) upper part lifts off the dowel dowel stays pressed in the lower part Printed alternative: 1.75 mm filament offcuts in1.9–2.0 mm holes (cheap, glueable, shear-strong enoughfor alignment)
Figure 14. Snug on one side, slip on the other. Use at least two dowels (not collinear with each other and the load) to lock out rotation, and chamfer the hole entries by 0.5 mm.

🧮 Recommended hole diameter calculator

Enter the shaft you need to fit and your conditions. The tool applies the clearance classes above plus corrections for orientation, nozzle size and material shrinkage and returns the diameter to type into CAD. It is a starting point; always confirm with the test coupon.

Hole & clearance calculator

Positive grows the hole. Leave at 0 until you have measured.
8.25 mm
recommended CAD hole diameter
Shaft diameter (CAD)
8.00 mm
Total added to CAD hole
+0.25 mm
Shrink correction
+0.00 mm
Target printed hole
≈ 8.25 mm
Intended clearance
≈ +0.25 mm
Uncertainty
± 0.10 mm

Key takeaways

Next: Joints & fasteners uses these clearances for snap-fits, inserts and threads. Practice with Level 2 exercises.