3D Printed Enclosures for Electronics and Small Runs
By the 3D Printer on Demand team · Updated July 2026
A 3D printed enclosure is a plastic box that holds and protects electronics, built layer by layer with FDM printing. Companies use them for sensor housings, control boxes, and small device cases. The design work is what decides whether the box actually works. Get four things right and the rest is easy: wall thickness, how the lid closes, where the ports come out, and which plastic you pick. This page walks through all four. When you are ready to order, our custom enclosure page covers quantities, lead time, and price.
Start with the board, not the box
The most common enclosure mistake is drawing the box first. Then the board does not fit, and the whole thing gets redone. Start from the thing going inside it.
Measure the board outline, then add room around it. Give at least 2 mm of air on every side. Measure the tallest thing on the board too, usually a capacitor or a connector shell. That sets your inside height.
Then place the standoffs. Match the mounting holes on the board, and make the posts tall enough to keep solder joints off the floor. Draw the standoff hole for a screw or a heat-set insert, not for a printed thread.
- Leave 2 mm of clearance around the board outline, more if the board flexes.
- Add 3 mm above the tallest part on the board so nothing touches the lid.
- Make standoffs at least 3 mm across, with 2 mm of wall around any insert.
- Put a small chamfer on the top of every standoff so the board drops on easily.
- Draw the cable path before you close the box. A cable with nowhere to bend will push the lid open.
Wall thickness for a printed enclosure
Wall thickness is the single biggest strength lever on a box. Too thin and it flexes when you pick it up. Too thick and you pay for plastic you did not need.
Size walls in whole passes of a 0.4 mm nozzle. That way the printer lays even lines with no gap hiding inside the wall. Our design for 3D printing guide has the full rule set.
| Box size | Wall thickness | Notes |
|---|---|---|
| Under 60 mm | 1.6 mm | Small sensor pods and inline cases |
| 60 to 120 mm | 2.0 mm | The everyday default for a desk or panel box |
| 120 to 220 mm | 2.4 mm | Add ribs across any flat face wider than 100 mm |
| Handled or dropped | 2.4 to 3.2 mm | Round the corners and fillet the floor joint |
| Wall or machine mounted | 3.2 mm at the mount | Thicken only the mounting boss, not the whole box |
How the lid closes: four ways that work
The closure is where most printed boxes fail. Pick it early, because it changes the whole shape of the part.
Answer one question first. How often does this box get opened? A box opened once a year and a box opened weekly want very different lids.
| Closure | How it works | Best for | Watch out for |
|---|---|---|---|
| Screws into heat-set inserts | Brass inserts melt into the posts and take real metal threads | Anything opened more than a few times | Needs 2 mm of wall around each insert |
| Snap fit | A printed lip clicks over a matching ledge | Cheap boxes opened now and then | Snaps fatigue, so give the arm room to bend |
| Slide-in lid | The lid slides down a printed groove | Boxes with a fixed base | Needs 0.3 to 0.4 mm of clearance in the groove |
| Tongue and groove with a gasket | A raised lip presses a soft strip against the lid | Dusty or damp spots | Costs a second part, and it is not a rating |
- Do not print fine threads on a lid. They strip. Coarse threads on a big round cap are the one exception.
- Give a snap arm at least 0.4 mm of gap around it so it does not fuse to the wall.
- Add a small pry notch. A lid you cannot get a fingernail under is a lid somebody breaks.
Cutouts for ports, buttons, and cables
Every hole in a box is a chance to be 0.5 mm off. Design the openings with room to spare and you save a reprint.
Panel connectors are the easy path. A round hole for a threaded connector is far more forgiving than a tight rectangle around a USB port. When you do need a tight rectangle, add clearance and let the connector shell hide the gap.
- Add 0.5 mm around a port opening on every side. FDM holes come out small, and a tight port cutout is the first thing that fails to fit.
- Put a fillet or a chamfer on the inside edge of a cutout. A sharp inside corner is where a dropped box cracks.
- Give a button 0.4 mm of clearance in its hole so it does not bind.
- Add a cable strain relief. A printed clamp or a zip-tie loop inside the box stops a tug from pulling a wire off the board.
- Put vent slots on a side face, not the top. A slot on the top face is a slot that collects dust.
Heat, water, and dust: what an FDM box can and cannot do
Here is the honest answer. A printed box is not a sealed box. FDM builds in stacked lines, and those lines can leave tiny paths through a wall. We do not test or rate boxes for water or dust.
What you can do is design it closer to sealed. Use a screwed lid, add a tongue and groove lip, and press a soft TPU strip or an off-the-shelf O-ring between the halves. Point the seam down so water runs off it. That gets you a box that shrugs off splashes and shop dust. It does not get you a rating, and we will not print one on the part.
Heat is easier, because it is just a material choice. Pick from the numbers below, and give yourself margin. A box in a sunny window or next to a motor gets hotter than you think.
- Indoor, room temperature: any of the five materials work.
- Near a warm motor or in a hot vehicle: PETG holds shape to 73 C, ABS to 98 C.
- Under a real heat load: PA-CF holds shape to 140 C and stays stiff.
- Outdoors: skip PLA. It softens at 57 C and gets brittle in the sun.
- Around solvents or cleaners: PETG resists more of them than PLA or ABS.
Which FDM material fits your enclosure
PETG is our default for enclosures, and it is the right answer most of the time. It is tough, it bends before it breaks, and it handles moisture and warmth well.
Switch off PETG for a reason, not by habit. Here is what each one actually buys you.
| Material | Strength | Holds shape to | Pick it when | Quote type |
|---|---|---|---|---|
| PETG | 50 MPa | 73 C | Default for indoor and outdoor boxes | Instant |
| PLA | 50 MPa | 57 C | Indoor demo boxes where looks matter and heat does not | Instant |
| ABS | 40 MPa | 98 C | Heat, impact, and boxes you plan to paint | Fast human quote |
| PA-CF | 80 MPa | 140 C | Stiff structural housings and real heat | Fast human quote |
| TPU | 35 MPa | 80 C | The gasket or the bumper, not the box itself | Fast human quote |
Print orientation for a box
A box prints best open side down. The walls rise straight up, the open mouth needs no support, and the outside faces come out clean.
That leaves the floor as the top surface, printed as a flat bridge or a sloped roof. Keep the floor simple. A floor covered in tall standoffs and pockets is the version that needs supports inside the box, and those are the hardest supports to pull out.
Print the lid flat and separate. It is faster, cleaner, and it lets you reprint just the lid when you move a port.
Layer direction also decides strength. A box is weakest between layers, so a wall pulled straight up can peel. Fillet where the wall meets the floor and that seam stops being the weak spot.
From one prototype to a production run
This is where printed enclosures beat molded ones for small numbers. There is no tooling to pay for, so the first box costs about the same as the hundredth.
That changes how you work. Print one, put the real board in it, find the two things that are wrong, fix the file, and print it again. Do that twice and you have a box that fits. With a mold you would still be waiting on the first sample.
When the design settles, the same file runs the batch. Price is one flat number per part, and the per-part price steps down at 10, 50, 250, and 1,000 units. We hold your price for 30 days, so a quote you got last week is still good. The tiers are on our pricing page.
For the ordering side, quantities, and lead time, see our custom enclosure page. This page is the design guide. That one is the order desk.
How to order your enclosure
Start with your STL file. Upload it at our instant quote page. No login is needed to see a price.
PLA and PETG get an instant auto price. ABS, PA-CF, and TPU get a fast human quote, and our team gets back to you within four business hours. Either way the price is flat per part and held for 30 days.
Order one sample or a full run. Parts ship in 2 to 5 days, made in the USA, so there are no customs delays. If you are not sure your design is ready, run it past our 7 design checks first.
Quick takeaways
- Design the box around the board. Leave 2 mm of clearance on every side and 3 mm above the tallest part.
- Use 2.0 mm walls for a normal desk box, 2.4 mm once it passes 120 mm or gets handled.
- Pick the closure early. Heat-set inserts for a lid you open often, a snap fit for a lid you rarely open.
- Add 0.5 mm of clearance around every port cutout, and fillet the inside corners.
- A printed box is not a sealed box. A gasket and a screwed lid help, but we do not rate boxes for water or dust.
- PETG is the default. Move to ABS or PA-CF for heat, and use TPU for the gasket.
- Print the box open side down and the lid flat and separate.
Have a part to print? Get an instant price.
Instant QuoteCommon questions
- Are 3D printed enclosures strong enough for real products?
- Yes, when the walls are sized right. A 2.0 mm PETG wall handles normal desk and panel use, and 2.4 to 3.2 mm handles a box that gets carried or mounted to a machine. Round the outside corners and fillet the joint where the wall meets the floor. Those two moves matter more than raw thickness.
- Which material is best for an electronics enclosure?
- PETG is the best default. It is tough, it resists moisture, and it holds shape to about 73 C. Pick ABS when the box sees heat up to about 98 C or takes hard knocks. Pick PA-CF at 80 MPa and 140 C for stiff structural housings. Skip PLA outdoors, since it softens at 57 C.
- How thick should the walls of a 3D printed enclosure be?
- Use 1.6 mm for a small box under 60 mm, 2.0 mm for a normal box from 60 to 120 mm, and 2.4 mm above that. Size walls in whole passes of a 0.4 mm nozzle so the printer lays even lines. Thicken only the mounting bosses to 3.2 mm rather than the whole box.
- Can a 3D printed enclosure be waterproof?
- Not on its own. FDM builds in stacked lines, which can leave tiny paths through a wall, and we do not test or rate boxes for water or dust. You can get much closer with a screwed lid, a tongue and groove lip, and a soft gasket between the halves. Treat that as splash resistance, not a rating.
- How do I attach the lid to a 3D printed box?
- Brass heat-set inserts are the best answer for a lid you open more than a few times. They melt into the posts and give real metal threads. A snap fit works for a lid you rarely open, and a slide-in groove works when the base stays put. Do not print fine threads, because they strip.
- Can I print just one enclosure?
- Yes. One sample is a normal order here, and it is the smart way to start. There is no tooling cost, so the first box costs about what the hundredth does. Print one, fit your real board in it, fix what is wrong, and print it again before you commit to a run.
- Do the layer lines cause problems?
- Not for function. Light layer lines are normal for FDM and do not weaken a well designed box. They do matter for sealing, since the lines can leave small paths through a wall. If you want a smoother look, the part sands and paints well, and ABS takes paint best of the five.