A two-piece FDM case for the Raspberry Pi 4 (and other NopSCADlib-catalogued
SBCs) with a 40 mm intake fan, heat-set inserts at every repeated-assembly
point, and cable access through open skirted edges — no connectors ever fight
a tight hole. The standoff pattern is generated from the board's own mounting
hole list at build time, so pointing board at another PCB re-places the
standoffs automatically.
The Raspberry Pi 4 and 40 mm fan are shown for fit — both are purchased separately (see the bill of materials below).
Shown in the case's own charcoal, so the board reads dark; the color notch view lower down shows the green board and gold header pins seated just below the notch lip.
What you get
base— the tray: floor, skirted cable edges, four board standoffs (generated frompcb_screw_positions), four through-bored lid-screw posts (~95 × 76 × 26 mm)lid— the flat top: register lip (notched around the lid-screw posts), co-planar intake grille over the Ø37 fan zone (not an open bore), four insert bosses on the inner face, lid-screw holes (~95 × 76 × 2.5 mm plate + 7 mm bosses)sbc-case-coupon— two crops of the same case corner that nest; print it first to tune the fits (~33 × 76 × 26 mm)sbc-case-grille-coupon— a lid-plate crop over the fan bore at the same outer-face-down pose aslid; plate only (lid_tthick): co-planar grille plus the four M3 fan screw holes on 32 mm pitch, without the inner heat-set insert bosses. You can hold a 40 mm fan on the outer face and nut the screws to check pattern and frame coverage; M3 × 20 screws meant for inserts have nothing to bite. Print it to comparegrille_hole_d/grille_webwithout a full lid (~45 × 45 × 2.5 mm)
Plus the hardware on the bill of materials (see ASSEMBLY.md): 8 × M3 heat-set inserts, 4 × M2.5 screws, 4 × M3 cap screws, 4 × M3 × 20 dome screws + washers, one 40 mm 5 V fan, and four adhesive rubber feet — plus 4 × M3 nuts if you'll run the grille-coupon fan check. The screws come out of one standard M2.5 / M3 assortment; add one bag of M3 heat-set inserts, that single fan, and a strip of adhesive feet — four carts, not five separate hardware orders.
Print settings
- Material: PETG or ASA
- Layer height: 0.2 mm
- Infill: 15 %, gyroid
- Supports: none needed — both parts are support-free by design
- Vents: leave supports off — each of the four +Y-wall slots is a 12 mm tunnel whose ceiling bridges only the 2.0 mm wall thickness, so it comes out clean even in PETG; a little ceiling droop inside the slots is normal and faces down into the tunnel — you only notice it from vent height, not from across the desk. ASA — the page's other supports-off material — bridges a touch fuzzier here than PETG; same call, leave supports off, the droop still faces down into the tunnel. Auto-supports here just weld into the tunnels.
- Orientation:
basefloor-down as modeled;lidouter-face-down (the renderedpart="lid"orientation) — the register lip and fan bosses print as standing features. Print the coupon first (with a brim) — see below. - Seam: set it to Back (or a scarf seam). The stock Aligned seam stacks a vertical ridge on the base's show walls, and one stack lands inside the cavity right where the lid lip registers.
- Plate (PETG): print PETG on a textured sheet — it welds to smooth PEI.
- Enclosure (ASA): ASA wants an enclosure — the flat 94.5 × 76.2 mm lid
and the long open skirt edges lift on a cold chamber. No enclosure → use PETG.
And coupon in the material you'll ship: ASA prints the register fit tighter
than a PETG coupon suggests (its shrink eats the 0.25 mm
fit_clearancebudget), so bumpfit_clearancea hair before reaching for sandpaper. - Lid first layer: enable elephant-foot compensation for the
lid. It prints outer-face-down, so its show face is the bed face (thebasealready carries a 0.6 mm bed chamfer; the lid plate does not). Printing the coupon, which nests the lid and base crops on one plate? A global elephant-foot setting is fine — the base crop's fit is a vertical cavity wall the compensation never touches, and its floor-and-skirt footprint hides the 0.1–0.2 mm shave. - Feet: stick four adhesive rubber feet on the floor — the case sits on a flat base, and feet keep it from walking when you plug a cable in one-handed.
- Grille holes (PETG): a few wisps or strings across the ~30 small through-holes are normal — clear them with a needle or fingernail before assembly.
- Grille tone: a faint blade-pass hum at full fan speed is normal for a close co-planar grille on a 5 V + GND hookup (constant speed) — unplug the fan lead at the GPIO header when silence matters, or add a separate PWM or buck controller if you want variable speed.
The as-printed pose — iso, top, front and bottom-iso of the sliced parts:
Parameters
| Parameter | Default | What it does |
|---|---|---|
board | RPI4 | NopSCADlib board type — standoffs follow its hole list |
fit_clearance | 0.25 mm | lid register lip vs cavity wall; tune on the coupon |
standoff_h | 5 mm | board standoff height (4–6 per the brief) |
interior_h | 24 mm | interior height; sized over the tallest RPI4 connector |
fan_type | fan40x11 | fan vitamin; grille clip and boss pitch follow it |
fan_center | (−10, 0) mm | fan position; biased toward the SoC |
grille_hole_d / grille_web | 5.0 / 2.0 mm | co-planar intake holes and solid web (B11) |
board_clr | 0.75 mm | board-to-wall clearance |
wall / floor_t / lid_t | 2.0 / 2.0 / 2.5 mm | shell thicknesses |
All parameters are at the top of sbc-case.scad in Customizer sections;
override on the command line with -D 'fit_clearance=0.3'.
Assembly & use
Full bill of materials and step-by-step instructions: ASSEMBLY.md and the exploded view below. The short version: melt the inserts in flush with the post top (see the exploded view), drop the board on (it self-locates on the standoffs), screw it down, seat the lid, bolt the fan on blowing into the case.
If a fit is off, tune it on the coupon (NOTES.md, "Print this first") and reprint only the affected part — the coupon is cropped from the same geometry, so what you feel there is what the full parts do.
Living with it
- Swap the micro-SD without opening the case. The −X edge is open, so the card — and every cable — should come out with the lid on and every screw untouched — the first real print verifies the card clears the restored rim (the planned field test in NOTES). The 2 a.m. reflash needs no tools.
- GPIO stays reachable. A notch in the +Y wall clears the 2×20 header, so jumper wires reach the pins with the lid on. A full 2×20 IDC ribbon socket (~51 × 8 mm) does not: the lid-on window is 55 × 8.5 mm in the wall but only 6.0 mm high inside the lid lip, and the two fan leads that already exit here cannot share that opening with the housing. A seated full socket keeps the lid off until the queued wider notch; stay on jumpers for day-to-day work with the lid on. The two fan leads ride the +X end of the notch, low where they exit — keep jumpers toward the centre or above them.
- Serviceable where it counts. The heat-set inserts sit at the two joints you ever revisit — the lid and the fan — so opening the case or swapping the fan (a sleeve-bearing 40 mm fan is typically a 4–6 year part) never chews a plastic thread. The board screws are the ones you touch once. One catch the fan adds: it lives on the lid, but its lead plugs into the board — so unplug that lead at the header before you lift the lid, or a set-aside lid hangs by two wires.
- Closed ceiling over the fan bore. The fan bolts to the lid's outer
face (above the plate); the grille is co-planar holes in the plate, not a
blade guard from outside. It closes the case ceiling over the Ø37 zone so fingers and larger dropped
objects (coins, washers) meet the 2 mm webs instead of falling through a bare
bore — not protection against small hardware: Ø5 mm holes still pass M2.5/M3
screws (
2.5–3 mm shank), paperclips, and stiff wire. With the lid off the case, a pencil tip fits a hole where a fingertip meets the web (assembled, the fan bolts to the outer face and covers the grille). Geometric open area inside the bore is ~38 % of an unobstructed Ø37 disc at the default 5.0 / 2.0 mm holes and webs — 21 full holes, no partials at the rim (62 % less open area than a bare bore; not a measured airflow figure). Opensbc-case.scad, setparttogrille-coupon, and tunegrille_hole_d/grille_webin the Customizer (the wrappersbc-case-grille-coupon.scaddoes not list those sliders — OpenSCAD only exposes variables assigned in the file you opened, not in aninclude), then reprint the grille coupon to compare presets on the bench (for example Ø6 holes on 7.6 mm pitch — 1.6 mm webs, ~49 % open — stays above the 1.2 mm web floor) before committing to a fulllidreprint. The grille coupon proves hole size, web width, and printability of the co-planar pattern only — it does not measure airflow, thermals, or noise, and the fit coupon still proves register lip, post, and board-pilot fit only (no grille).
Lid part at print pose; the fan mounts on the opposite face in use.
- Keep it breathing. The fan still blows in through the grille and the open-skirted case, so it is an intake for dust too — on an always-on build, blow through the grille and the vent row out every few months.
Licensing
This design incorporates parts of NopSCADlib, which is licensed under GPL-3.0: the board, fan, insert and screw definitions it reads at build time and renders in its assembly documentation. The exported case geometry is therefore a GPL-3.0 combined work — you may print and share it freely under those terms, keeping the license and attribution intact. This isolation is deliberate (see docs/licensing.md): designs that do not use NopSCADlib in this repo are unaffected.










