Embedding magnets, nuts and tags mid-print

Design· 9 min read· Updated 16 October 2026

Pausing a print, dropping an object into a pocket and letting the printer close the lid over it gives a part with no glue, no visible hole and nothing that can fall out. It needs three things to go right: a pocket the object drops into without standing proud, a pause on exactly the right layer, and a pause command that parks the nozzle instead of letting it sit on the print.

Embed, press in or glue?

An object can go into a print three ways:

Embedding suits magnets in lids and toys, nuts behind a clean surface, weights in bases, NFC tags in key fobs and coasters, and anything that must not be removable.

Sizing the pocket

Diameter or width. Printers make holes smaller than modelled, typically by 0.1–0.3 mm. For a drop-in fit, add that shrinkage plus about 0.2 mm of slip. A 6 × 2 mm magnet on a printer that shrinks holes by 0.2 mm needs a 6.4 mm hole to come out at about 6.2 mm. Measure your own shrinkage once with a test print; the tolerance guide explains why holes shrink.

Hex nuts. Size the pocket across the flats, not the corners. An M3 nut is 5.5 mm across flats and 2.4 mm high, so a pocket of about 5.9 × 2.6 mm is a reasonable start on a printer with 0.2 mm hole shrinkage. Align one flat with the X or Y axis so the straight sides print cleanly.

Depth and headroom. The object must sit completely below the top of the pocket, or the nozzle will hit it. Make the depth the object height plus 0.2 mm, then round up to a whole number of layers. Magnet thickness varies a little between batches, so measure a few.

Position. Keep at least two or three walls of solid plastic around the pocket and a few solid layers below it. If the pocket sits in infill, the object can push through the floor when you press it in.

A worked example

A 6 × 2 mm magnet, 0.2 mm layers, the pocket floor at 1.0 mm. Depth 2.0 + 0.2 = 2.2 mm, which is exactly 11 layers, so the pocket top is at 3.2 mm. The last open layer is the one ending at 3.2 mm (layer 16); the pause goes before the layer from 3.2 to 3.4 mm (layer 17), the first that roofs the pocket.

Finding the layer to pause at

The pause must come after the last layer that still has the pocket open and before the first layer that covers it. If it comes too early, the pocket is not deep enough yet and the object sticks out. If it comes too late, the pocket is already closed.

The reliable way is the slicer preview, not arithmetic. Slice, move the layer slider to the top of the pocket, and step until the layer that first bridges across it appears. That is the pause layer. Step back one layer and check that the pocket is open and full depth. Slicers differ in whether a pause is inserted "at" or "before" a selected layer and in how they count layers, which is why the preview check matters; the same caution applies to colour changes in finding the colour-change layer.

If the first layer height differs from the rest, layer numbers and heights no longer line up neatly. Work from the heights the preview shows.

The cap layers above the object

The first layer over the pocket is a bridge across the void, landing partly on the object. Short bridges such as a 6 mm magnet pocket print well; for larger pockets, check the bridge settings in the bridging guide. Then:

How thick the cap over an NFC tag can be, and what else reduces the read range, is covered in NFC tags inside 3D prints.

Pause commands by slicer and firmware

All the common slicers can insert a pause at a layer; what happens when the printer reads it depends on the firmware and the printer profile.

Two settings to check before the first attempt: that the pause parks the head away from the print, and how long the heaters stay on while paused. Some firmware turns heaters off after an idle timeout, and a print that has cooled may lose adhesion. The G-code guide covers the commands themselves.

At the printer: the pause step by step

  1. Before the print, lay out the objects, check that each one fits a test pocket, and note the time when the pause will happen.
  2. When the printer pauses, do not touch the bed or the part, and do not move the head. Pushing on a bed-slinger's bed or nudging the part can cause a layer shift.
  3. Insert each object with tweezers or a stick, and press it to the bottom of the pocket. Check that nothing stands proud: slide a flat ruler across the top.
  4. Remove any strings or blobs near the pockets; the nozzle may have oozed while parked.
  5. Resume and watch the first layer over the pockets. If the nozzle catches an object, stop at once.

Magnet polarity

Two parts that should attract each other repel if one magnet goes in the wrong way round. Plan it before printing:

Problems and safety

Magnets and children

Small strong magnets are dangerous if swallowed: two magnets, or a magnet and a piece of metal, can attract each other through the walls of the intestine. Fully embed magnets in toys and items children can reach, use enough cap layers that they cannot be chewed or broken out, and do not use lead weights in items that are handled; steel works for weighting.

Bins with magnet holes built in Make Gridfinity bins and baseplates in any grid size, with optional holes for 6 × 2 mm magnets and screws.
Open the Gridfinity generator →

Frequently asked questions

How big should a magnet pocket be?

For a magnet dropped in during a pause, model the hole about 0.4 mm larger than the magnet: roughly half of that is lost to the printer shrinking holes, and the rest is the gap that lets it drop in. Make the depth the magnet thickness plus about 0.2 mm, rounded up to whole layers, so the magnet never stands above the pocket.

At which layer should I pause to insert a magnet?

At the first layer that covers the pocket. In the slicer preview, step through the layers until the pocket is roofed over for the first time and add the pause there; the layer below should still show the pocket open. The pause then happens after the pocket walls are complete and before the cap starts.

Why did the nozzle hit the magnet after resuming?

The magnet stood above the top of the pocket — the pocket was too shallow, not rounded up to a whole layer, or the magnet was not pushed fully down or was pulled up by a steel part on the toolhead. Add depth, press each object down, and use a drop of glue if magnets jump.

Will the heat of printing damage the magnet?

Usually not. The nozzle passes over the magnet only briefly. Standard-grade neodymium magnets are typically rated to around 80 °C, so a bed at 60 °C is fine; with hotter beds or enclosed chambers, choose a higher-temperature grade or keep the magnet higher in the part.

Can I embed an NFC tag the same way?

Yes. A thin round tag in a shallow pocket, covered by a few solid layers, reads through plastic without problems. Keep metal objects away from the tag and keep the cap thin. The NFC keychain generator uses an open pocket instead, for gluing the tag in after printing.

Keep reading