Captive nuts and clearance holes
The most reliable thread on a printed part is the one you don't print. An FDM plastic thread is built from stepped beads, strips out by the third time you tighten it, and holds nothing below M6. Trap a steel nut inside the model instead and let the bolt thread into it, and you get a joint as strong as the hardware you drop in, built from parts already sitting in your drawer. The whole trick is the pocket that holds the nut — a hexagon sized with just the right clearance, retained so it can't fall out, lined up with a clearance hole that spreads the load. Get those three things right and the joint is cheap, strong, and reusable. Get the hex clearance wrong by 0.1 mm, though, and the nut spins free the first time you tighten it.
Why the hex pocket grips
Model the pocket as a hexagonal prism that matches the nut's across-flats dimension. It isn't just any hole — it's the exact shape of the nut, and that's why it works. The six flat walls of the pocket sit against the six faces of the nut, so when the bolt goes in and tightens, the nut can't rotate — the pocket walls take all of the tightening torque. Nothing holds the nut but the geometry.
That's why it's cheap. You don't print a thread, which would be weak and single-use — you only print the negative of a standard nut. The steel supplies the strength; the plastic just houses it and stops it from turning. A hardware-store M3 nut takes a tightening torque that no printed M3 thread survives without stripping.
The pocket depth matches the nut thickness, with a little axial clearance. That way the nut seats flat against the floor and the bolt shank passes all the way through it, with the full thread engaged. Leave 0.1–0.2 mm of margin on height rather than cutting to the exact figure. Between a bridged ceiling printed on top and the tolerance on the nut's own thickness, a pocket cut to nominal often won't let the nut seat flat, or won't give the mating part a solid face to bear against. But don't overdo it: if the pocket is too deep, the nut shifts around inside and drifts off-center under the clearance hole; too shallow, and the top face of the nut stands proud of the part surface and stops the mating part from bearing.
Hex clearance is decided in tenths of a millimeter
Here's the number that decides whether the part is good or goes in the bin. A printed hexagon comes out smaller than its nominal dimension, for the same reason any interior cavity comes out small: the nozzle lays down a bead about 0.45 mm wide, centered on its path; the half that falls toward the inside of the pocket eats into the cavity, stealing material from every wall. The corners are worse, because the nozzle can't trace a zero-radius vertex — it rounds it off to the radius of its own tip and leaves the hexagon's edges blunt, exactly where the nut needs to seat.
That's why you draw the pocket with clearance, not to the size of the nut. A reasonable starting value is +0.1 to +0.15 mm over the across-flats dimension for a 0.4 mm nozzle; go higher if the nut won't seat. That margin lets the nut drop in under finger pressure, without forcing. The underlying cause — that narrowing of the bead — isn't purely geometric: if your printer over-extrudes or you don't have the slicer's hole compensation enabled (hole/XY compensation or horizontal expansion), every pocket and clearance hole comes out tight at once. Fix that once in the slicer, rather than calibrating part by part for a problem that belongs to the machine.
The error band is narrow and you pay for it on both sides:
| Clearance over across-flats | What happens on assembly |
|---|---|
| 0 / negative | The nut won't go in; force it and you split a wall or crack the pocket |
| +0.1 mm | Press fit: goes in firm, clean, doesn't turn |
| +0.15 mm | Drops in under finger pressure; doesn't turn when tightened (starting point) |
| +0.3 mm or more | It shifts around and spins free: the bolt never threads up |
The too-tight failure is physical and self-explanatory: the hexagon already comes out narrow because of the bead, so at zero clearance the nut interferes with the walls and, when you force it, splits the pocket along a layer line. The wall works in tension just like in a press fit and gives way along its seam. The too-loose failure is sneakier: a loose nut doesn't butt against the walls until it has turned a few degrees, and in those degrees of play the bolt, instead of pulling the nut against the pocket, spins the nut along with it. The joint never tightens up. Print a test pocket and trim in 0.1 mm steps if your machine lays the bead wide.
Retain the nut so it doesn't fall out
An open pocket holds the nut against rotation, but not against gravity: if the opening faces up or sideways, the nut falls out before you ever get the bolt in, and assembling a stack blind, with a loose nut rattling inside, makes the job harder for no reason. It's worth retaining the nut, and there are two ways to do it, depending on how you orient the pocket for printing.
The first is a lip or snap fit: narrow the mouth of the pocket by about 0.2 mm relative to the across-flats dimension, so the nut clicks past that neck and stays trapped behind it. The lip is flexible — it's a few tenths of a millimeter of plastic — so it gives as the nut goes in and springs back to retain it. Its reliability depends on the material and the layer orientation: a lip whose layer lines run along the insertion force delaminates easily, and in PLA, which is stiff, the lip tends to snap rather than flex; PETG and ABS are more forgiving. Get the thickness right: too thick and the lip won't flex, so it breaks; too thin and it strips on the first assembly.
The second is geometric and exploits the print orientation. A horizontal pocket — opened on a vertical face of the part, so you slide the nut in from the side — prints with a bridged ceiling: the layers that close the pocket off at the top cross the gap with nothing below to hold them up. That is where the physical limit lies: a bridge only holds if it is narrow. The molten bead crosses the span in tension, anchored only at its two edges, and if the span is wide the ceiling sags onto the nut, the layers drop into the cavity, and the nut no longer seats. An M3 or M5 nut pocket is small enough that the ceiling spans it cleanly, so this orientation usually comes out fine; but don't try it on a wide pocket without checking the bridge first. The span limits are in Supports and bridging.
The orientation to always avoid is a flat, wide ceiling printed over a pocket opened upward with no support: the closing layers have nothing to rest on and collapse into the cavity. If the design forces you into that layout, either chamfer the ceiling so it's self-supporting, or accept putting support inside the pocket and cleaning it out afterward.
The clearance hole and the engagement length
The nut is half the joint; the other half is the hole the bolt passes through. That hole, in the part the bolt clamps (not the one carrying the nut), has to let the shank through with clearance, without the thread biting into the wall. If the clearance hole is tight, the bolt grabs against the rough printed wall and you spend half the tightening torque overcoming friction instead of tensioning the joint.
Make it ≈ bolt nominal Ø + 0.5–0.6 mm: an M3 takes ~3.5 mm, an M4 ~4.5 mm, an M5 ~5.5 mm. Be careful not to go too small on the M3: the hole also comes out narrowed by the bead, so a nominal 3.4 mm ends up rubbing the shank on many machines. That clearance covers the bead's narrowing and also leaves margin for the shank to drift a touch out of line without rubbing, which is exactly what you want in a clearance hole.
| Bolt | Nut across-flats | Hex pocket (flats + 0.15) | Clearance hole Ø |
|---|---|---|---|
| M3 | 5.5 mm | ~5.65 mm | ~3.5 mm |
| M4 | 7.0 mm | ~7.15 mm | ~4.5 mm |
| M5 | 8.0 mm | ~8.15 mm | ~5.5 mm |
What the clearance hole decides, together with the nut's position, is the engagement length: how many threads of the bolt actually grip inside the nut. That matters because a bolt's load isn't shared equally across all the threads. The first thread to take load carries most of the stress, and each thread after it carries less. That's why the rule of thumb is to engage on the order of half to one thread diameter: a standard M3 nut (DIN 934) is about 2.4 mm thick — less than a full diameter — yet engages enough in practice. Don't chase a full diameter with an ordinary nut; it can't deliver one, and the threads at the bottom barely work. What does kill the joint is engaging less than the nut thickness because the clearance hole came up short or the nut seated badly: that's where you concentrate all the force on two or three threads and strip the thread.
Think also about the whole path of a through-bolt: the shank first passes through a clearance hole in the top panel, crosses the joint plane, and threads into the captive nut in the bottom one. If you want the bolt head flush instead of standing proud, add a counterbore — a flat-bottomed recess above the clearance hole, at the head diameter with a little clearance — to sink it. Three holes, three different jobs: the clearance hole lets the shank through, the counterbore hides the head, the pocket traps the nut.
When to choose a captive nut
The captive nut wins when the part is too thin or too soft for anything else, or when you simply have a drawer of M3 nuts and want to fasten two parts together right now. It needs no special tools or consumables — just hardware-store fasteners and a well-sized pocket — and the joint comes out reusable: you take it apart and tighten it back up without spending anything. Its weak point is assembly — the loose nut you have to retain — which is why the retention from the previous section isn't optional whenever the opening doesn't face up.
For a cleaner thread — one that survives repeated assembly and disassembly with no loose part to fall out during the print — the next step is Designing for heat-set inserts: a metal thread melted into the wall instead of trapped in a pocket. And if your nut pocket opens upward with a ceiling to bridge, look over Supports and bridging first so you don't sag the closure onto the nut itself.
