3D-printed enclosures for electronics: design rules
How to design a 3D-printed enclosure for a PCB: wall thickness, standoffs, heat-set inserts, snap fits, connector cut-outs, LED light pipes, cooling and sealing.
A printed circuit board is rarely the finished product. It needs an enclosure that holds it in place, protects it from dust and touch, gives access to the connectors and shows the status of the device. For prototypes and small series, 3D printing is the fastest and cheapest route to a custom enclosure – but only if the model is designed with the characteristics of the technology in mind. In this guide we collect the rules we use ourselves when designing enclosures for electronics.
Start with the printed circuit board
Before you draw the first wall, you need accurate data about the board:
- the board outline and the positions of the mounting holes (export a STEP model, or at least a DXF of the outline, from your PCB CAD program),
- the height of the tallest component on both sides,
- the position and type of connectors, switches, LEDs and antennas,
- the heat sources (regulators, MOSFETs, processors) and their power,
- how the enclosure will be mounted (on a desk, on a wall, on a DIN rail).
The best workflow is to import the 3D model of the board with its components into the CAD program and model the enclosure around it. That way you immediately see collisions and can check the cut-outs before printing anything.
Wall thickness
Wall thickness determines stiffness, weight and price. For electronics enclosures we recommend:
| Technology | Minimum | Recommended for enclosures | Note |
|---|---|---|---|
| SLA (resin) | 1.0 mm | 1.5 to 2.0 mm | Thin walls can warp during curing |
| MJF / SLS (nylon) | 0.8 mm | 1.5 to 2.0 mm | Best strength-to-weight ratio |
| FDM (PLA, ABS) | 1.2 mm | 2.0 to 2.5 mm | A multiple of the nozzle width (0.4 mm) |
| SLM (metal) | 0.8 mm | 1.0 to 1.5 mm | Thinner than plastic, but heavier |
Keep the walls even throughout the enclosure. Thick walls next to thin ones cause uneven shrinkage and warping, and they also raise the price disproportionately, as material is charged by volume. If you need stiffness, add ribs 60 to 70 % of the wall thickness instead of thicker walls.
Standoffs and screw bosses
The board must be raised off the bottom so that the solder joints on its underside do not touch the wall. Standard standoffs are 3 to 5 mm high and shaped as cylinders 6 to 7 mm in diameter for an M3 screw.
Three common ways to fasten the board:
- Self-tapping screw into plastic. A hole of 2.5 mm (MJF, SLA) or 2.6 to 2.7 mm (FDM) for an M3 screw; the boss should have an outer diameter of at least 6 mm and a depth of at least 6 mm. Suitable for a few assemblies, not for frequent disassembly.
- Threaded heat-set inserts. The best solution for repeatable screwing. For an M3 insert, model a hole of 4.0 mm (check the size of your insert) and 1 mm deeper than the insert length; the boss should have an outer diameter of at least twice the insert diameter. The insert is pressed in with a soldering iron in PLA/ABS/nylon; in resin the grip is weaker, so glue or a nut is the better option.
- Captive nut. A hexagonal pocket for an M3 nut (5.5 mm across flats plus 0.2 mm tolerance) works very well in FDM and metal, where inserts are not possible.
Connect the bosses to the enclosure wall with a rib, not just to the bottom – otherwise they break off when screwed.
Snap fits
A lid without screws is an elegant solution, but snap fits require a material that can flex. In practice:
- Nylon (MJF, SLS) is the best choice: tough, it withstands thousands of cycles.
- FDM works if the latch is oriented to run along the layers rather than across them; otherwise it breaks off after a few uses.
- Standard resin is too brittle for snap fits; choose a flexible resin or, better, screws.
Dimensionally, the latch should be at least 5 times as long as it is thick, 1.5 to 2 mm thick at the root, with the transition into the wall rounded to a radius of at least 0.5 mm. The hook should be 0.8 to 1.2 mm high, with a chamfered insertion side at 30 degrees and a steeper retention side.
Connector cut-outs and tolerances
The most common mistake in a first prototype is a USB plug that will not go into the enclosure. The connector on the board is never exactly where it is drawn, and the enclosure always shrinks slightly during printing. That is why cut-outs should be modelled with clearance:
| Feature | Addition to the nominal size | Note |
|---|---|---|
| Connector cut-out (USB-C, RJ45, DC socket) | +0.4 to +0.6 mm on each side | Also allow for the cable overmould, not just the plug |
| Clearance hole for an M3 screw | 3.2 to 3.4 mm diameter | 3.4 mm preferred for FDM |
| Hole for a 3 mm or 5 mm LED | +0.2 to +0.3 mm | For a snug fit without glue |
| Groove for a (sliding) lid | 0.2 to 0.3 mm clearance | MJF/SLA; 0.4 mm for FDM |
| Press fit | -0.05 to -0.1 mm | SLA and MJF only – test it |
| Space between board and wall | at least 0.5 mm per side | Board dimensions can deviate by up to 0.2 mm |
| Gap between lid and base | 0.15 to 0.3 mm | A smaller gap needs a more precise technology |
A connector set deep inside the enclosure needs a larger cut-out because of the cable overmould; check the dimensions of the cables your customers will use, not just the one on your desk.
LED indicators and light pipes
You have three options for showing the device status:
- A hole with the LED through the wall is the simplest, but requires the LED to be in exactly the right place.
- A light pipe guides the light from the LED on the board to the surface of the enclosure. Print it separately in clear resin (SLA): a cylinder 2 to 3 mm in diameter inserted into a hole in the enclosure. If it is shorter than 15 mm and straight, the efficiency is perfectly acceptable.
- A thin wall. With white nylon or white resin, a wall 0.8 to 1.0 mm thick above a bright LED lets through enough light for a discreet indicator without a hole.
Ventilation and heat dissipation
A closed plastic enclosure dissipates heat poorly. For electronics with losses above roughly 1 to 2 W, consider:
- Ventilation slots at the bottom and the top to create natural airflow. The slots should be 1.5 to 2 mm wide and 10 to 20 mm long; narrower slots fill up in FDM, wider ones let in fingers and foreign objects.
- Hot components close to the wall, ideally with a thermally conductive pad between the component and the wall; in an aluminium metal enclosure this already makes an effective heat sink.
- Material: PLA softens at 55 °C, so for anything that gets warm nylon (MJF, SLS) or ABS is the better choice.
- A fan in the enclosure needs an opening with a protective grille and a large enough outlet on the opposite side.
Sealing and IP protection
For devices used outdoors or in humid environments:
- Design the enclosure with a groove for an O-ring or sealing cord around the perimeter of the lid. The groove should be 1.3 times as wide and 0.75 times as deep as the seal diameter, so the seal is compressed by 20 to 30 %.
- Space the lid screws no more than 50 mm apart, so the pressure is even.
- Cable glands (PG7, M12) need a threaded or clearance hole and a flat contact surface with the wall.
- A watertight model is a prerequisite: an MJF or SLA enclosure is inherently impermeable to water, whereas an FDM part is not, due to microscopic gaps between the layers; FDM is not a suitable choice for IP protection.
- With SLA, orient the sealing surfaces so that no support marks end up on them.
Orientation, supports and cosmetics
With SLA and FDM the model is printed with supports, which leave marks on the surface. If the visible outer surface matters, mark it and the enclosure will be printed with the supports on the inside. MJF and SLS need no supports, but the smoothest surfaces form on downward-facing faces.
Round all outer edges with a radius of at least 0.5 to 1 mm. Rounded edges look better, chip less and reduce stress concentration.
Enclosure checklist
- Even walls, within the recommended values for the technology.
- The board raised on standoffs, bosses connected to the wall.
- Connector cut-outs with 0.4 to 0.6 mm clearance, cable overmoulds taken into account.
- LEDs visible through a hole, a light pipe or a thin wall.
- Ventilation if the losses exceed a few watts.
- Snap fits only in nylon or correctly oriented FDM.
- Seal and cable glands for outdoor use.
- Lid and base as separate files.
Need help?
Building an enclosure for your own board is exactly what we do every day. If you have a model, upload it to the 3D printing configurator and see a price estimate in the chosen technology within seconds. If you still need an enclosure, send us the board data and, as part of our 3D enclosure design service, we prepare a model that follows all of the rules above and is ready to print.
Read next
Custom 3D printing service in the EU: from model to quote
Step by step: uploading several models, 3D preview, choosing the material, the price estimate, the quote, lead times, the EU invoice, quality control and model errors.
15. september 2026
3D enclosure design for electronics: from PCB to finished product
A guide to 3D enclosure design for electronics: CAD, tolerances, 3D printing or injection moulding, IP protection, connector cut-outs and heat dissipation.
10. september 2026
Metal 3D printing (SLM): stainless steel 316L and titanium TC4
How SLM metal 3D printing works, the properties of 316L stainless steel and TC4 titanium, design rules, supports, post-processing and when it beats CNC machining.
27. avgust 2026