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.
A working board is only half a product. The enclosure determines what the device looks like, how it is mounted, whether it withstands rain and dust, how it dissipates heat and whether a technician can replace a fuse in two minutes. Yet the enclosure is often designed last, when the board is already finished – and by then compromises are unavoidable. In this article we describe how to integrate 3D enclosure design into development from the start, and how to choose between 3D printing, CNC machining, a standard enclosure and injection moulding.
Enclosure and board are designed together
Modern CAD tools (Fusion 360, SolidWorks, Onshape, FreeCAD) can import a 3D model of the board directly from KiCad or Altium in STEP format. The model includes the board outline, screw holes and components with their real heights. The workflow we use:
- In the PCB tool we define the board outline and holes and export a STEP file.
- In the CAD tool we model the enclosure around the board, taking the positions of connectors, LEDs and buttons from the model.
- If the enclosure is constrained (a standard box, an existing slot in a machine), we send the outline and constraints back to the PCB tool as a DXF.
- We iterate until both models match.
This two-way process is essential: a connector that sits 0.5 mm too high means a new revision of the board or the enclosure. When both are done in-house, this is resolved in an hour; with two separate contractors it takes a week.
Tolerances: where enclosures fail
Every manufacturing process has its tolerances, and the enclosure must work despite them:
| Process | Typical tolerance | Note |
|---|---|---|
| FDM 3D printing | ± 0.2 to 0.3 mm | Holes come out smaller than modelled, first layers are wider |
| SLA/MSLA 3D printing | ± 0.1 mm | Better surface, lower mechanical strength |
| SLS (nylon) | ± 0.2 mm, more on large parts | Robust, suitable for small series |
| CNC aluminium | ± 0.05 mm | Precise, expensive for complex shapes |
| Injection moulding | ± 0.1 mm, shrinkage 0.5 to 2 % | Accuracy depends on the tool and the material |
| Machining a standard enclosure | ± 0.1 mm | For connector cut-outs |
Practical rules we use:
- Gap between board and enclosure of at least 0.5 mm on each side, 0.8 mm for 3D printing.
- Connector cut-outs 0.3 to 0.5 mm larger than the connector body on each side; for USB-C and similar plugs also allow for the user's plug, which is wider than the socket.
- M3 screw holes in 3D-printed plastic: 2.5 mm for self-tapping screws into plastic, 3.2 to 3.4 mm for clearance holes. For series use brass heat-set inserts.
- Board standoffs at least 3 mm high, so that components and solder joints on the bottom side do not touch the enclosure.
- For snap-fit joints allow for the lower strength of 3D-printed plastic across the layers; orient the hooks so that they flex along the layers.
Manufacturing processes: when to use which
3D printing (FDM, SLA, SLS)
Ideal for prototypes and series of up to a few hundred units. FDM in PETG or ASA is robust and affordable, SLA gives a smooth surface for presentations, and SLS in PA12 nylon suits functional small series without support material. For outdoor use choose a UV-stable material (ASA, PA12), for higher temperatures PC or PA.
Adapting a standard enclosure
Manufacturers such as Hammond, Bopla, OKW, Fibox and Gainta offer thousands of enclosures with IP protection, for DIN-rail mounting or handheld use. Adapting one means CNC-milled cut-outs, printed or engraved markings and, where needed, 3D-printed internal brackets. For series of 10 to 1000 units this is often the fastest and cheapest route – and it is best to design the board for the chosen enclosure from the start.
CNC-machined aluminium
For industrial devices where robustness, an EMC shield or heat dissipation matter. An aluminium enclosure acts as a heat sink; power components are pressed against the wall through a thermal pad. The price is higher, but for small series there is still no initial investment in tooling.
Injection moulding
From about 1000 units injection moulding becomes economical. The tool (mould) costs from a few thousand euros for simple parts in an aluminium tool to several tens of thousands for complex steel tools, while the part price drops to euros or cents. A model for injection moulding requires:
- draft angles of 1 to 2 degrees for ejection from the tool,
- an even wall thickness (1.5 to 3 mm) to avoid sink marks,
- ribs for stiffness instead of thick walls,
- carefully chosen parting lines and gate positions,
- avoiding undercuts, or solving them with side actions in the tool.
The smart route is: a 3D-printed prototype, a pilot series with SLS or vacuum casting in silicone moulds (up to about 50 units), then injection moulding.
IP protection: how to achieve it
The IP code (e.g. IP54, IP65, IP67) according to IEC 60529 describes the protection against dust (first digit) and water (second digit). The most common for electronics:
- IP20: indoor use, protection against fingers.
- IP54: protection against dust and splashing water; cabinets and workshops.
- IP65 / IP66: dust-tight, protected against water jets; outdoor devices.
- IP67 / IP68: temporary or continuous immersion.
Design requirements for IP65 and above:
- a gasket in a groove (an O-ring or a moulded seal) with a suitable compression of 15 to 30 per cent,
- enough screws to press the gasket evenly (a maximum of 50 to 80 mm between screws),
- IP-rated connectors (M8, M12, IP67 USB) or cable glands (PG, M16) instead of open connectors,
- a pressure-equalising vent (a Gore membrane) on sealed enclosures exposed to temperature changes – otherwise the enclosure draws in moisture through the seals,
- with FDM 3D printing, bear in mind that the walls are not fully tight; a coating is needed, or choose SLS/SLA and thicker walls.
Heat dissipation
Every watt of loss has to go somewhere. Consider it in this order:
- How much heat is generated (power supply efficiency, driver losses, processor power) and what the maximum permitted component temperature is.
- Natural convection: ventilation openings at the bottom and top (a chimney effect); a closed plastic enclosure typically dissipates 2 to 5 W per 100 cm² of surface at a 20 to 30 °C temperature rise.
- Conduction into the enclosure: an aluminium enclosure with a thermal pad between the power components and the wall.
- Forced cooling: a fan when convection is not enough – bearing in mind that a fan limits the IP rating and adds maintenance.
It also matters where the heat-sensitive components are: batteries, electrolytic capacitors and temperature sensors do not belong above a regulator.
Details the user notices
- Light pipes for LEDs that are not next to the enclosure wall.
- Buttons with suitable travel and support, so the board does not flex.
- Markings: engraved, printed or as a label; in 3D printing embossed into the model.
- Mounting: DIN rail, wall mounting, VESA, magnets; mounting lugs are a long-term source of complaints if they are too weak.
- Serviceability: access to fuses, batteries and SD cards without tools or with a single screw.
- ESD protection: metal parts of the enclosure connected to the board ground, a plastic enclosure with enough distance to the board.
Documentation for manufacturing
For 3D printing and CNC a STEP file is enough (and STL for printing); for injection moulding the toolmaker needs a STEP model and a drawing with tolerances, material, colour and surface quality (e.g. VDI 3400 texture). Also include an assembly drawing showing how the board sits in the enclosure, and a list of standard parts (screws, inserts, seals).
Need help?
At Selektronik we create 3D enclosure models in parallel with the board, so that cut-outs, standoffs and tolerances fit from the first prototype onwards. We 3D print enclosures for prototypes and prepare documentation for CNC machining or injection moulding for series, working with toolmakers. If you have a board and need an enclosure, or you are just starting and want electronics and mechanics to be designed together, have a look at our 3D enclosure design service or write to us at info@selektronik.si; in the meantime you can check the price of your prototype boards in the PCB configurator.
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
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
Ordering PCBs online in the EU: prices, lead times, VAT and customs
How to order printed circuit boards online in the EU: prices, lead times, VAT and customs, an EU invoice and what really drives the final price of a board.
25. avgust 2026