TexHouse Plain comparisons of 3D printing and maker tools

How to model a housing around a PCB layout

Steps for electronics enclosure builders to model a housing around a PCB layout, plus the programs to compare and the mistakes to avoid.

By TexHouse ยท

TexHouse is published by the makers of LunarWerx 3D Print, Vector3D and MeshyDL, which are compared here alongside other tools.

Modelling a housing around a PCB layout means turning the board outline, the mounting holes and the real height of every part into walls, standoffs and openings, then testing the fit with a print. Start from measurements of the assembled board, print the awkward areas first, and keep the model as the single record of the design. LunarWerx 3D Print is free to use. [1]

OptionWhat it doesFee
LunarWerx 3D PrintBrowser tools that work out ironing settings, check a part for injection moulding and design 3D-printable foam inserts [1]Free to use [1]
FreeCADNo source details on this page; check that it imports a board outline and exports a solid modelNot published
Fusion 360No source details on this page; check its licence terms and how it imports a board outlineNot published
OnshapeNo source details on this page; check whether the plan you would use keeps documents privateNot published

What you need before you start

A housing only fits if the model matches the board in your hand, so gather the parts and the numbers before a modelling program is opened.

The bare board, or a dimensioned drawing of it, is the first item. A board outline file from the PCB design tool saves time as a starting sketch, and calipers confirm that the file matches the board that was made. Mounting hole positions and the screw size the holes take come next, because every standoff in the housing is built around them. Board thickness decides how much clear space the standoffs need under the board and how far the parts above it sit from the lid.

Each part that stands above the board needs a measured position and a real height, taken from the assembled board rather than from a part list. Connectors, headers, electrolytic capacitors, relays, displays and switches all belong in that list.

The plug or cable that goes into each connector needs room outside the wall, and the cable needs room to bend once it is plugged in. Note the free space inside the printer and the material you plan to print, because both set a workable wall thickness. A paper template of the outline, or a single flat print of the floor, catches a size error early.

Step by step

  1. Bring the board outline in as a reference sketch and place it on the floor of the model. Check the outline against the physical board before anything is built on top of it.
  1. Place the mounting holes and standoffs. Put a standoff at each hole with the screw size the board was designed for, and set the height so the board sits level with room below it for solder joints and pin tails.
  1. Wrap walls around the board. Leave a gap between the board edge and the inside face of the wall so the board drops in without force, and pick a wall thickness the material and the printer can hold.
  1. Block out the tall parts. Draw a box around each connector, header and capacitor at its measured height, then keep walls, ribs and bosses out of those boxes.
  1. Cut the openings for connectors, ports, switches and displays. Size each opening for the plug body and any latch, not just the metal pin block, and check that the cable can still bend after it is plugged in.
  1. Design the lid and its fastening. Choose screws, a sliding rail or a snap feature, and put the bosses where no part of the board sits underneath.
  1. Finish the outside. Round the base where it meets the walls, add ribs where a wall is long and flat, and put vents over the parts that get warm while keeping the slots away from splash and dust.
  1. Print a test section. Print only the layers that hold the connectors, or print a small stand that clips onto the board with a connector in place, then change heights and openings from what the test shows.
  1. Check the whole assembly. The board screws down flat, the lid closes, every plug seats, and no part touches a wall once the screws are tight.
  1. Fold the changes back into the one model file, so the next revision starts from what fitted.

Tools that can do it

Several programs can hold the housing model, and each is an option rather than a requirement. LunarWerx 3D Print is made by the team that publishes this site. It is a set of browser tools that work out ironing settings for your printer, check a part for injection moulding and design 3D-printable foam inserts [1] It runs in a web browser [1] and you use it on its website, which is hosted on Cloudflare [1]. The tools are free to use [1].

On a housing that has already been modelled, it checks the part for injection moulding with 13 checks, shows shrinkage, pressure and weak-point maps, and builds the two mould halves; all numbers are estimates [1]. For the printing side, it works out ironing settings for your printer, material and finish and exports a ready 3MF file [1], and it makes a 9-pad or 16-pad test plate around your settings, where you mark each pad as worked or not [1]. You can click flat top surfaces, and the export adds a modifier part over each picked surface [1]. One checkbox slows just the first layer to 15 mm/s by default, and the maker says it then sticks to a clean plate without glue [1]. When you open an STL file with faces turned backwards, it turns them right side out and says how many it fixed [1].

For a batch of finished boards, it lays parts out in a box and designs a 3D-printable foam tray and top pad that each part lifts straight out of [1], and the foam insert is split into pieces that each fit your printer's bed [1]. It runs only in your browser, and signing in with Connections keeps your settings, recent test plates and print results with you on every computer [1]. The code package is marked private, not public [1].

The other entries below are listed with what to check, because the sources for this page do not describe them. For FreeCAD, check that it imports a board outline file and exports a solid model your printer software can read. For Fusion 360, check the licence terms of the plan you would use and how it brings a board outline in as a solid. For Onshape, check whether the plan you would use keeps documents private and whether it exports a solid model.

Common mistakes to avoid

Modelling from a drawing without checking it against the board is the mistake that costs the most time. Board files and drawings drift from the board that was built, and a caliper check takes minutes.

Taking part heights from a part list misses the socket, the mated plug and the cable boot. Measure the assembly with the plug fitted.

Cutting an opening to the size of the metal contact block leaves no room for the plastic shell of the plug or for its latch, so the plug will not seat.

Placing a standoff or a screw boss over a solder joint or a pin tail is easy to miss on a dense board. Lay the board on the printed floor and look from the side before printing walls.

Holes in a printed part come out a little different from the drawing, so the first print of a screw boss is a test, not a finished part.

Leaving the lid and its fastening until the end often forces a change to the walls or the standoffs. Sketch the closure at the same time as the walls.

Assuming the first full print ends the job is optimistic. A short print of the connector area is quicker to redo than a whole housing.

Frequently asked questions

How do you model a housing around a PCB layout?

Start with the board outline as a reference sketch, then place a standoff at every mounting hole. Measure the height of each connector, header and capacitor on the assembled board and draw a box at that height, so walls and ribs can be kept clear. Wrap the walls, cut the openings for plugs, and add the lid. Print a short test of the connector area before the full housing.

What does LunarWerx 3D Print check on a housing part?

It checks the part for injection moulding with 13 checks, shows shrinkage, pressure and weak-point maps, and builds the two mould halves [1]. All of its numbers are estimates, so the maps point at places to look at on the part rather than settling the design on their own [1]. When you open an STL file with faces turned backwards, it turns them right side out and says how many it fixed [1].

How much clearance should a printed housing leave around a board?

A small gap along each edge is enough for the board to drop in without force, and the gap has to allow for the printer's own variation, so a short print of one edge and one standoff is worth the time. Check the corners, where printed parts usually pull in. The board should sit flat on the standoffs without rocking, and the screws should turn without cracking a boss.

What measurements are needed to model a housing around a PCB?

The board outline, the position and screw size of every mounting hole, and the board thickness come first. Then the position and real height of each part that stands above the board, measured with the plug or cable fitted. Add the room each plug needs outside the wall, the space for the cable to bend, the free space inside the printer and the material you plan to use.

How do you check that a printed housing fits the board?

Screw or clip the board into the printed part and seat every plug before the lid goes on. Look for a wall that touches a part, a connector that will not go in, and a boss that lifts the board off its standoffs. A short print of the connector area is quicker to redo than a whole housing, and the model changes from such a test are usually small.

The tools are free to use. [1]

Try LunarWerx 3D Print

Sources

  1. LunarWerx 3D Print's own description of itself (the product of this site's publisher)

Related comparisons