---
title: "Snap-fit vs screws vs magnets in 2026: how to close a 3D printed enclosure"
description: "Five ways to close a 3D printed box: screws, snap-fit, magnets, a sliding lid and a friction lid. What each asks of the design and the print, and its prompt."
canonical: https://speakcad.com/blog/snap-fit-vs-screws-vs-magnets-enclosure-lid-2026
published: 2026-11-17
updated: 2026-11-17
publisher: SpeakCAD
---

# Snap-fit vs screws vs magnets in 2026: how to close a 3D printed enclosure

> Five ways to close a 3D printed box: screws, snap-fit, magnets, a sliding lid and a friction lid. What each asks of the design and the print, and its prompt.

Choose the closure by how often the box is opened. Screws for a box that must stay shut and is opened rarely; a snap-fit lid for one opened now and then, with no hardware; magnets for one opened every day; a sliding lid for a battery compartment; a friction lid for a prototype. Each asks something different of the design, the material and the print, and each fails in its own way.

## The short answer

- **Stays shut, opened rarely, or lives outdoors: screws.** The only closure that can squeeze a gasket.
- **Opened now and then, no hardware: snap-fit.** Print it in PETG.
- **Opened every day, by hand: magnets.** Nothing wears, but a knock can open it.
- **A battery door, or a box you reach into often: a sliding lid.**
- **A prototype, or a box that only keeps dust out: a friction lid.** The simplest to design.

## Side by side

| Closure | Opens | You add | The number that matters | Goes wrong when |
|---|---|---|---|---|
| Screws | With a screwdriver | Screws, plus inserts or nuts if it opens often | For M3: 3.4 mm in the lid, 2.5 mm in the pillar | The thread cut in the plastic strips |
| Snap-fit | By hand, now and then | Nothing | 0.2 mm of interference, an arm 6 times its thickness | An arm snaps at its root |
| Magnets | By hand, daily | Magnets and a drop of glue | A 6 mm magnet in a 6.2 mm pocket | A magnet is glued the wrong way round |
| Sliding lid | By hand, often | Nothing | 0.4 to 0.6 mm in the grooves | The lid's first layer bulges and jams |
| Friction lid | By hand | Nothing | 0.2 to 0.3 mm around the lip | It loosens, or pops off in a fall |

Clearances are per side and come from the [tolerances guide](/guides/tolerances-and-clearances).

## Screws: for a box that must stay shut

**The design.** A pillar in each corner of the base with a hole for the screw, and a matching hole in the lid. For an M3 screw that cuts its own thread, the pillar hole is 2.5 mm. In the lid the screw slides through a 3.4 mm hole, and a flat head sinks into a 6.6 mm countersink, a cone only 1.6 mm deep. A socket head needs a counterbore 3.4 mm deep with 2 mm of plastic under it, which is too much for a thin lid. [Countersink or counterbore](/guides/countersink-counterbore-screw-hole) has the other sizes.

**The material and the print.** Any filament, though PETG and ABS hold a thread cut by the screw better than PLA. Print 3 walls or more, so the screw bites into solid plastic.

**How often.** A thread cut in plastic survives a handful of openings. A box opened regularly wants metal for the screw to turn in: [a heat-set insert or a nut in a hexagonal pocket](/blog/heat-set-inserts-vs-nut-traps-vs-self-tapping-screws-2026).

**What goes wrong.** Overtightening strips the thread, and a pillar that is too thin splits along its layers.

**In SpeakCAD.** All of it is hand work: **Hole** with its Screw head choice for the lid, **Add** for the pillars, Hole with the tap toggle in each pillar, Duplicate for the other three corners. Or say "lid screwed with four M3 screws into corner pillars". Outdoors, add a groove for a 2 mm O-ring; [the outdoor sensor enclosure](/blog/outdoor-sensor-enclosure-3d-print) has its numbers.

**Look elsewhere if** the box opens every day: nobody keeps a screwdriver next to a remote control.

## Snap-fit: no hardware, opened now and then

**The design.** A cantilever clip is a small arm with a hook at its end. It bends as the lid goes on and springs back behind a ledge. Give the hook 0.2 mm of interference and a 45° lead-in, make the arm at least 6 times as long as it is thick, put a small fillet at its root, and keep the lid at 1.6 mm or more so the clips have something to pull against. Between the lid and the box, leave 0.2 to 0.3 mm.

**The material and the print.** PETG or nylon flexes without cracking. PLA is stiff and brittle: fine for a lid opened a few times, wrong for one opened every week. An arm is strongest printed lying flat, so that it bends along its layers. On a lid printed flat the arms stand up and bend across them, the weak way, which is why the bend has to stay small and the arm long. Use 3 walls or more and 0.16 to 0.20 mm layers.

**How often.** Now and then. Every opening bends the plastic, and clips relax with heat: snap fits creep in the sun.

**What goes wrong.** An arm too short to bend, so the lid will not close; an arm that snaps at a sharp root; a hook with too much interference. [A five-minute test slice of the rim](/blog/3d-printed-part-does-not-fit-five-minute-test) finds the right number before the long print.

**In SpeakCAD.** A snap-fit hook is not a hand tool. Say "snap-fit lid" and the AI builds the clips and reports the interference it used.

**Look elsewhere if** the box sits in a car or in the sun, or if one broken clip would mean reprinting a six-hour base.

## Magnets: for a lid opened every day

**The design.** Pairs of small disc magnets, one in the lid and one in the base, in pockets that face each other. A 6 mm magnet presses into a 6.2 mm pocket with a 0.3 mm chamfer at the mouth; make the pocket 0.2 mm deeper than the magnet so it sits just below the surface. A pocket needs plastic around it, so it goes in a corner pillar about 10 mm across, not in a 2 mm wall. Magnets do not stop a lid sliding sideways: add a lip that drops inside the box with 0.3 mm of clearance.

**The material and the print.** Any filament. Put the pockets on faces that print facing up. Press the magnets in cold, with a drop of glue: heat weakens them, so a soldering iron is the wrong tool.

**How often.** As often as you like. Nothing bends and nothing wears.

**What goes wrong.** Polarity. Let each pair snap together first, mark the two outer faces with a pen, and only then glue. A magnet without glue ends up stuck to its partner, out of its pocket. Keep magnets away from a compass sensor or a reed switch on the board inside.

**In SpeakCAD.** A magnet pocket is a hand tool: **Cut**, a circle 6.2 mm across and 2.2 mm deep for a 6 × 2 mm magnet, placed by its distances from the edges, then Duplicate.

**Look elsewhere if** the box travels in a bag, where a knock opens it, or if it has to seal.

## The two simple ones: a sliding lid and a friction lid

**A sliding lid** is a flat plate that runs in two grooves along the top of the long walls. Leave 0.4 to 0.6 mm in the grooves, chamfer the lid's bottom edge by 0.5 mm against the bulge of the first layer, and ask for a thumb grip and a small bump that clicks at the end of its travel. It opens as often as you like, which is why battery compartments use it. The grooves are AI work: say "sliding lid in side grooves", and ask for their upper side at 45° so they print without sagging. **Look elsewhere if** the lid is long and thin, because it bows, or if the box has to seal.

**A friction lid** has a lip that pushes into the box, 0.2 to 0.3 mm smaller per side than the opening, with a 0.5 mm chamfer to find its way in. It is the quickest closure to shape by hand: a plate the size of the box, then **Add** a rectangle on its underside as the plug. To the AI: "friction lid with a 0.3 mm lip". **Look elsewhere if** the box is carried around: a friction lid loosens with use and pops off in a fall.

## Mix them

The best lids often use two. A lip for alignment plus two magnets. A sliding lid plus one screw for transport. Two fixed tabs along one edge and a single snap on the other, which halves the clips that can break.

For a circuit board, the [enclosure generator](/enclosure-generator) and the [PCB enclosure guide](/blog/pcb-enclosure-generator-any-board) start from the board's own measurements, and the lid is one phrase in the description.

Shaping a part by hand (a hole, a cut, an added shape, text, rounded corners, a shell, every size typed in millimetres) is free, and so is downloading what you shaped. With the AI, a request spends credits for the work it takes: a quick edit usually 1–2, a small change 1–2, a new part or a design change 3–8, never more than 15 credits; on a plan the first 3 small changes of each part are free; without a plan a new part spends 3. Start with Maker: 50 credits a month for $7.99, cancel anytime.

## Prompts to try

- A two-part enclosure for a 70 x 50 mm PCB with 3 mm holes 4 mm from each corner, 20 mm internal height, 2 mm walls, a 3 mm lid screwed with four M3 countersunk screws into corner pillars with 2.5 mm holes the screws cut their own thread in ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520two-part%2520enclosure%2520for%2520a%252070%2520x%252050%2520mm%2520PCB%2520with%25203%2520mm%2520holes%25204%2520mm%2520from%2520each%2520corner%252C%252020%2520mm%2520internal%2520height%252C%25202%2520mm%2520walls%252C%2520a%25203%2520mm%2520lid%2520screwed%2520with%2520four%2520M3%2520countersunk%2520screws%2520into%2520corner%2520pillars%2520with%25202.5%2520mm%2520holes%2520the%2520screws%2520cut%2520their%2520own%2520thread%2520in))
- A box 90 x 60 x 35 mm outside with 2 mm walls and a snap-fit lid 1.6 mm thick: two cantilever clips on each long side, 0.2 mm interference, 45 degree lead-in, 0.3 mm clearance between lid and box ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520box%252090%2520x%252060%2520x%252035%2520mm%2520outside%2520with%25202%2520mm%2520walls%2520and%2520a%2520snap-fit%2520lid%25201.6%2520mm%2520thick%253A%2520two%2520cantilever%2520clips%2520on%2520each%2520long%2520side%252C%25200.2%2520mm%2520interference%252C%252045%2520degree%2520lead-in%252C%25200.3%2520mm%2520clearance%2520between%2520lid%2520and%2520box))
- A box 100 x 70 x 40 mm outside with 2.4 mm walls, a lid with a 2 mm lip that drops inside with 0.3 mm clearance, held by four 6 x 2 mm magnets in pockets 6.2 mm across and 2.2 mm deep in 10 mm corner pillars ([open in SpeakCAD](https://app.speakcad.com/signup?next=%2F%3Fprompt%3DA%2520box%2520100%2520x%252070%2520x%252040%2520mm%2520outside%2520with%25202.4%2520mm%2520walls%252C%2520a%2520lid%2520with%2520a%25202%2520mm%2520lip%2520that%2520drops%2520inside%2520with%25200.3%2520mm%2520clearance%252C%2520held%2520by%2520four%25206%2520x%25202%2520mm%2520magnets%2520in%2520pockets%25206.2%2520mm%2520across%2520and%25202.2%2520mm%2520deep%2520in%252010%2520mm%2520corner%2520pillars))

## FAQ

### What is the best way to close a 3D printed enclosure?

It depends on how often it opens. Screws for a box that must stay shut, is opened rarely or lives outdoors; a snap-fit lid in PETG for one opened now and then with no hardware; magnets for one opened every day; a sliding lid for a battery compartment; a friction lid for a prototype.

### How do I design a 3D printed snap-fit lid that does not break?

Give each clip 0.2 mm of interference and a 45° lead-in, make the arm at least 6 times as long as it is thick, put a small fillet at its root, and print in PETG with 3 walls or more. An arm bends best along its layers, so keep the bend small when the arms print standing up. Test the fit on a five-minute slice of the rim before the full print.

### What size hole do I need for a magnet in a 3D print?

0.2 mm larger than the magnet for a press fit: a 6.2 mm pocket for a 6 mm magnet, with a 0.3 mm chamfer at the mouth and 0.2 mm of extra depth so the magnet sits just below the surface. Check the polarity of each pair before gluing, and press magnets in cold, because heat weakens them.

### Can I screw directly into a 3D printed part?

Yes, for a joint opened a few times. Make the hole smaller than the screw so it cuts its own thread: 2.5 mm for M3, 3.3 mm for M4. Print 3 walls or more, and prefer PETG or ABS, which hold the thread better than PLA. For a lid opened often, use a heat-set insert or a nut in a hexagonal pocket.

### How much clearance does a 3D printed sliding lid need?

0.4 to 0.6 mm per side in the grooves, plus a 0.5 mm chamfer on the lid's bottom edge so the bulge of the first layer does not jam it. Print the lid flat and the base open side up.

## About SpeakCAD

SpeakCAD is the most intuitive CAD for 3D printing, made for people who own a 3D printer and need a part that fits something they have: tap a face and type a size to shape it with simple tools, or describe it to the AI, on your phone or computer, and download a print-ready STL, 3MF or G-code sliced for your printer.

SpeakCAD works inside ChatGPT and Claude as a plugin (an MCP server): ask the assistant for a part with its measurements and SpeakCAD's own CAD AI designs it, shows it in 3D in the chat and hands over a print-ready STL, 3MF or G-code sliced for your printer.

- Live demo, no account: https://speakcad.com/demo
- In ChatGPT, Claude and other MCP clients: https://speakcad.com/chatgpt-plugin, https://speakcad.com/claude-connector, https://speakcad.com/mcp-server
- Pricing: https://speakcad.com/pricing
- FAQ: https://speakcad.com/faq
- Site index for AI assistants: https://speakcad.com/llms.txt
