An enclosure is a set of promises

Design the interior, mounting, cable access, and assembly sequence before celebrating the outside of the box.

Guides· · 3 min read

An enclosure has to contain the board, admit the connectors, tolerate assembly, and leave the thing inside able to do its job. Looking like a box is the least demanding item on the list.

Begin with a dimensioned drawing or measurements of the exact board revision. Connector overhangs, underside components, mounting holes, and the swept volume of a plug can matter as much as the board outline. A rectangle copied from a search result is a sketch, not a fit check.

Define the interior first

Consider an illustrative board envelope 50 mm wide and 30 mm deep. If the proposed space allowance is 1 mm on each side, the internal plan is 52 × 32 mm. With 2 mm walls, the outside plan becomes 56 × 36 mm. These numbers demonstrate the arithmetic; they are not a recommended clearance or wall thickness.

Height needs its own accounting: board thickness, standoffs, underside components, tallest component, lid intrusion, and clearance. A programmatic model should name those parameters separately instead of hiding all of them inside one mysterious “height” slider.

JSCAD supports constructing and combining geometry programmatically. Its usual millimeter export convention must be made explicit in the project file because the modeling operations themselves are unitless. JSCAD

Assemble it in your head, then challenge the story

Ask whether the board can enter the opening, whether a screw can reach its boss, and whether the connector can be inserted after the lid is fitted. Check a cable’s exit direction and strain relief. Include access to buttons and removable media that are actually required.

A useful early prototype is a thin perimeter or a partial mounting plate. It tests the board and connectors without committing to the full housing. Verify the file in the slicer before printing. Geometry that exists in a preview is not automatically a sensible toolpath.

Separate shape validity from engineering approval

A basic generator can reject negative dimensions, walls that consume the cavity, overlapping holes, or bosses outside the base. It can test whether its mesh exports and whether the expected cavity exists.

It cannot infer that a printed enclosure is electrically safe, weatherproof, flame resistant, or suitable for a specified load. Those properties need material evidence, an appropriate design, and relevant testing. Do not let a green “valid” label imply more than “the geometry passed these listed checks.”

For a first project, keep the scope to a low-voltage bench enclosure. Exclude mains wiring, batteries requiring protective design, waterproof claims, and load-bearing applications from a generic box recipe.

Choose fit through a test

The lid, screw holes, and insert pockets all depend on the printing process. Prusa identifies several variables affecting mating-part tolerances; that is why a small coupon is preferable to assuming one clearance works everywhere. Prusa Research

Use the process from The hole you drew is not the hole you printed before locking those dimensions. Store the chosen allowance with its calibration record. A fit value without the conditions that produced it becomes folklore very quickly.

Export enough to revise it

Keep the parameter file beside the mesh. Include units, generator version, board revision, chosen allowances, and a short note about what the prototype established. Export the base and lid as distinct parts with predictable filenames.

After printing, record the first assembly problem rather than immediately modifying three dimensions. Was the cavity wrong, the connector blocked, or the fit too tight? The next revision should answer the failure you observed.

The goal is not to finish the perfect box on the first attempt. It is to make each box tell you something useful before it joins the drawer of previous boxes.

Sources

Put this to work