Back to blog

Magnets in 3D prints - pocket, clearance and a pause in the print

Published: Updated: 6 min read
Magnets in 3D prints - pocket, clearance and a pause in the print

A magnet turns an ordinary print into something that sticks to the fridge, closes a lid or holds a bin to a baseplate. All it takes is a small neodymium disc and a well designed pocket. Too tight and it cracks or the magnet will not go in; too loose and the magnet falls out at the first tug.

Below are the sizes and methods we use in our generators: Gridfinity, QR codes and the 3D city map.

GridfinityFree toolGridfinityBins and baseplates on the 42 mm grid

Which magnets

The usual choice is neodymium discs of 6×2, 8×2, 10×2, 10×3, 12×3, 15×3 and 20×3 mm (diameter × thickness). 6×2 mm is the Gridfinity standard; bigger discs hold signs and stands on a fridge or a steel sheet. Standard N-grade neodymium magnets lose strength above about 80 °C, so they do not suit parts near a radiator or in a car in the sun.

Pocket size: how much clearance

A hole printed horizontally usually comes out slightly smaller than in the model, and the magnet itself has a manufacturing tolerance. That is why the pocket is larger than the magnet:

  • diameter: +0.3 mm (a 10 mm disc goes into a 10.3 mm hole) - this is what the QR code and sign generators use;
  • depth: +0.15-0.2 mm, so the magnet does not stick out above the surface and catch the nozzle;
  • press fit without glue: reduce the clearance to 0.1-0.15 mm and test it on a sample, as it depends on the printer and material;
  • Gridfinity: a 6.5 × 2.4 mm pocket for a 6 × 2 mm magnet; with glue the clearance can be larger.

Open pocket: magnet after printing

The simplest way: a pocket open at the bottom or the back, with the magnet glued in after printing using a drop of cyanoacrylate glue or epoxy. A pocket on the bed side needs no supports and is the most accurate, because the first layer lies flat. This is how we make the pockets in the Gridfinity feet and on the back of the 3D map (8 × 2 mm disc).

The downside: the magnet is visible and is held only by the glue. Before gluing the next magnets, check the poles - all of them in the bins and the baseplate must face the same way, or the parts will repel.

Closed pocket: a pause in the print

You can also seal the magnet inside the print. The pocket starts a few layers above the bed, and the printer stops as soon as the pocket is finished. You drop the magnet in, resume, and the next layers cover it for good. No glue is needed and the magnet is invisible.

In Bambu Studio and OrcaSlicer you add the pause in the preview: right-click the layer slider at the first layer above the pocket and add a pause. In PrusaSlicer it is the pause print command (M601) at the same spot. The QR code generator in pause mode tells you the height at which to stop the print.

  • leave at least 0.6 mm under the pocket (3 layers of 0.2 mm) so the floor does not break through under pressure;
  • put about 1 mm of material over the pocket - a thinner layer over an empty space prints unevenly;
  • every millimetre over the magnet weakens the pull, so do not overdo the cover thickness;
  • watch out for a steel nozzle: a hardened steel nozzle can attract the magnet and pull it out of the pocket. A brass nozzle does not.

Need a print like this?

Send a model or describe the part - you'll usually get a free quote within 24 hours.

Request a quote

Common problems

  • The magnet will not go in: the hole came out too small because the first layer spread (elephant's foot). Increase the clearance or enable elephant foot compensation in the slicer.
  • The magnet falls out: too much clearance or too little glue. For a press fit pocket reduce the clearance by 0.05 mm and print a sample.
  • The nozzle hits the magnet after the pause: the pocket was too shallow. Add 0.2 mm of depth.
  • The parts repel: the magnets went in the wrong way round. Mark the pole with a marker before gluing.

Finish: rounded edges and chamfers

In the “Finish” panel you choose how the edges look: rounded, chamfered or sharp. The model still prints without supports, and the edge on the bed gets a small chamfer (up to 0.45 mm) that hides the “elephant’s foot” of the first layer. Where a part has to fit (hooks, holes, inner sizes), the generator only finishes the edges that do not change the fit. A rounded print looks bought rather than prototyped, and it does not cut your hand.

Ready models with pockets

In the Gridfinity generator you can switch on 6 × 2 mm pockets under the bin feet and in the baseplate. In the QR code generator you choose an insert (magnet or NFC sticker), the disc size and the mode: open pocket or pause. More about clearances for press fits and snap fits is in our article on fits and tolerances.

Frequently asked questions

How much clearance for a magnet in a 3D print?+

About 0.3 mm on the diameter (a 10 mm disc in a 10.3 mm hole) and 0.15-0.2 mm on the depth. For a press fit without glue usually 0.1-0.15 mm, but it is best to check on a small sample.

How do I insert a magnet during printing?+

Add a pause in the slicer at the first layer above the pocket. When the printer stops, drop the magnet in and resume. The next layers cover the magnet for good.

How much material should be over the magnet?+

About 1 mm. Less prints unevenly over the empty pocket; more clearly weakens the pull.

What glue should I use for a magnet?+

Cyanoacrylate glue (a drop is enough) or epoxy. Both work well with PETG and PLA. Check the poles before gluing.

Will a magnet in a print survive heat?+

Standard N-grade neodymium magnets lose strength above about 80 °C, and PLA softens already at about 55-60 °C. For a car or hot spots choose ASA and magnets with a higher temperature grade.

Recommended gear for this topic

Affiliate links: if you buy something I get a small commission, and you pay the same. As an Amazon Associate I earn from qualifying purchases.

Sources

  1. Insert pause or custom G-code at layer, Prusa Knowledge Base
  2. Neodymium Magnets (NdFeB) - grades data, Eclipse Magnetics
  3. Temperature and Neodymium Magnets, K&J Magnetics

Author

Bartosz Budny, founder of BnB3D

He has worked in 3D printing for more than 10 years: servicing, building and running printers, and has designed in Fusion 360 for more than 5 years. He writes about what he prints and tests on his own printers in Myszków, Poland (over 4,000 print hours on his MakerWorld models alone).

Got a project to print?

Send a model or a description - you'll usually get a free quote within 24 hours.

Request a quote