# Raspberry Pi case generator

Generate a 3D-printable vented case for Raspberry Pi 5, Pi 4, or Zero 2 W with official hole patterns, fan clearance, GPIO slot, and wall or VESA mounts.

- Page: https://paramlet.com/tools/pi-case/
- Tool id: `pi-case` · version 1.3.0 · Paramlet Module Spec 1.1 · API version 1 · docs: https://paramlet.com/agents/
- Category: workshop / jigs-fixtures · status: live
- Parameter schema (JSON Schema): https://paramlet.com/tools/pi-case/schema.json · presets: https://paramlet.com/tools/pi-case/presets.json
- Core parameters (`exportFormat`, `exportTol`, `units`, `massUnits`) are in schema.json under `x-coreParams`, not `properties`; both are accepted.
- Presets: `measure-your-own` (Measure your own board), `fits-raspberry-pi-5` (Fits Raspberry Pi 5), `fits-raspberry-pi-4` (Fits Raspberry Pi 4 Model B), `fits-raspberry-pi-zero-2-w` (Fits Raspberry Pi Zero 2 W). Each has a page: https://paramlet.com/tools/pi-case/measure-your-own/, https://paramlet.com/tools/pi-case/fits-raspberry-pi-5/, https://paramlet.com/tools/pi-case/fits-raspberry-pi-4/, https://paramlet.com/tools/pi-case/fits-raspberry-pi-zero-2-w/
- Deep link with parameters: `https://paramlet.com/tools/pi-case/?p=<url-encoded JSON>` or single values `?key=value`
- Deep link with a project: `https://paramlet.com/tools/pi-case/#project=<base64url project JSON>` (8,000 characters max)
- In the page: `window.paramlet` (getSchema, getParams, getState, getRecommendedMaterials, setParams, loadProject, getProject, exportModel, exportSTL, export3MF).
- WebMCP tools: `pi_case_get_parameter_schema`, `_get_state`, `_set_parameters`, `_load_project`, `_download`, and `get_recommended_materials`.
- Validation: unknown keys and out-of-range values are rejected; nothing is applied from an invalid request. Keys with x-agentSafe false can only be changed in the page.
- Output: 3mf, stl (default 3mf), millimetres, parts lying on the bed in print orientation. Every download contains README.txt and parameters.json (a project file).
- Downloads: free and unlimited at launch; API exports use the same download path as the button, including a short page with recommended products (affiliate links) that the user closes before the file starts.
- Export types: `3mf`, `stl`.

## Features

- Official mechanical-drawing presets for Raspberry Pi 5, Pi 4, and Zero 2 W
- Vented lid with optional 30 mm or 40 mm fan opening and GPIO slot
- Wall keyhole ears, VESA 75/100 mm mounting tabs, or desk feet
- Board-specific port cut-outs with editable cable clearance
- PETG default with thermal warning for PLA (55 C HDT)
- A colour to match your filament or your room
- A lid in a colour of its own: a two-colour case from two filaments, with no nozzle change

## Use cases

- House a Raspberry Pi 5 with active cooler clearance and generous top vents
- Mount a Pi 4 behind a monitor using 75 mm or 100 mm VESA tabs
- Print a slim snap-lid enclosure for Raspberry Pi Zero 2 W with GPIO access
- Build a custom SBC box from your own measured PCB dimensions

## Safety

- Hot material: nozzle and bed are hot while printing; let parts cool before handling.
- PLA softens above ~55 C; use PETG or ASA for Raspberry Pi 5 under load.

## Recommended materials & tools

_As an Amazon Associate Paramlet earns from qualifying purchases. Some links are affiliate links; we may earn a commission at no extra cost to you._

- [Raspberry Pi 5 (4 GB)](https://paramlet.com/go/pi5-4gb?src=agent) — Exact match for the Fits Raspberry Pi 5 preset (85×56 mm PCB, 58×49 mm holes, official drawing). (Affiliate link (Amazon Associates, tag paramlet-21))
- [Raspberry Pi 5 (8 GB)](https://paramlet.com/go/pi5-8gb?src=agent) — 8 GB RAM variant of Raspberry Pi 5 — identical 85×56 mm PCB and port layout. (Affiliate link (Amazon Associates, tag paramlet-21))
- [Raspberry Pi 4 Model B (4 GB)](https://paramlet.com/go/pi4-4gb?src=agent) — Exact match for the Fits Raspberry Pi 4 preset (85×56 mm PCB, R3 corners, official drawing). (Affiliate link (Amazon Associates, tag paramlet-21))
- [PETG Filament 1.75 mm (1 kg) — heat-resistant & durable](https://paramlet.com/go/petg-filament-1kg?src=agent) — Stronger and more heat-resistant than PLA for molds, jigs and outdoor parts. (Affiliate link (Amazon Associates, tag paramlet-21))

## FAQ

**Why does this case default to PETG instead of PLA?**
Raspberry Pi 5 operates up to 70 C ambient while PLA softens around 55 C (Prusament TDS). PETG (68 C HDT) handles sustained SoC heat much better.

**Will the official Raspberry Pi 5 Active Cooler fit?**
Yes — set internal height to 24 mm or more and enable lid vents for unobstructed intake.

**How is the board held, and how do I get it out?**
The board is pushed onto four pins, one in each mounting hole. Each pin is 0.5 mm thinner than the hole you enter, 2.2 mm for the 2.7 mm holes of a Raspberry Pi, so the board goes on and stays by itself. To take it out, lift one corner of the board gently. The pins are 4 mm long.

**How is the lid held on?**
By a lip all round: the lid has a rim that drops into the opening of the base, with a little play. There are no screws and no snap hooks. Print both parts flat and try the lid before you put the board in. If it is tight, sand the rim lightly.

**Which way round are the ports?**
With the microSD side on the left: on a Pi 4 or Pi 5 the power and micro-HDMI are on the front long side, and the USB and Ethernet on the right short side. On a Zero 2 W the mini-HDMI and both micro-USB are on the front long side. The lid goes on top, with the GPIO slot over the long side opposite the ports.

**Can I use a HAT or a heatsink?**
Yes, as long as it is not taller than the internal height. Set the height to the tallest part on top of the board, plus a millimetre. A HAT that is fixed with the four mounting screws does not fit: the standoffs end in pins, not in screw holes.

**What do I need for the fan?**
A 30 mm or 40 mm fan and four self-tapping screws: the holes in the lid are 3.3 mm. The opening is 3 mm smaller than the fan. The screw holes are 24 mm apart for a 30 mm fan and 32 mm apart for a 40 mm fan.

## Parameters

| key | label | type | range / values | default | agents |
|---|---|---|---|---|---|
| `boardProfile` | Port layout profile | string | generic|pi5|pi4|zero2w | "generic" | yes |
| `pcbLength` | PCB length | number | 35–160 mm (step 0.5) | 85 | yes |
| `pcbWidth` | PCB width | number | 20–120 mm (step 0.5) | 56 | yes |
| `holeSpacingX` | Hole spacing X | number | 15–145 mm (step 0.5) | 58 | yes |
| `holeSpacingY` | Hole spacing Y | number | 10–110 mm (step 0.5) | 49 | yes |
| `holeDia` | Mounting hole Ø | number | 2–4 mm (step 0.1) | 2.7 | yes |
| `holeInset` | Hole inset from edge | number | 2–12 mm (step 0.5) | 3.5 | yes |
| `cornerRadius` | Corner radius | number | 0–8 mm (step 0.5) | 3 | yes |
| `innerHeight` | Internal height (cooler / HAT) | number | 14–50 mm (step 1) | 25 | yes |
| `wallThickness` | Wall thickness | number | 1.6–4 mm (step 0.2) | 2.2 | yes |
| `pcbClearance` | PCB side clearance | number | 0.3–2 mm (step 0.1) | 0.6 | yes |
| `portClearance` | Port cut-out margin | number | 0.5–2.5 mm (step 0.1) | 1 | yes |
| `fanSize` | Top fan opening | string | none|30|40 | "none" | yes |
| `gpioSlot` | GPIO ribbon slot in lid | integer | 0|1 | 1 | yes |
| `lidVents` | Top ventilation slots | integer | 0|1 | 1 | yes |
| `mountStyle` | Mounting style | string | desk|wall|vesa75|vesa100 | "desk" | yes |
| `material` | Filament material | string | petg|asa|pla | "petg" | yes |
| `wallCount` | Perimeter walls | integer | 2–6 count (step 1) | 3 | yes |
| `infill` | Infill | integer | 5–100 pct (step 5) | 20 | yes |
| `lidTexture` | Lid surface texture | string | none|hex|diamond|waves|dots|basketweave|wood|hammered|folk | "none" | yes |
| `textureDepth` | Texture depth | number | 0.3–0.6 mm (step 0.1) | 0.4 | yes |
| `textureScale` | Texture scale | number | 4–18 mm (step 1) | 8 | yes |
| `color` | Colour | string | string | "#23252b" | yes |
| `lidColor` | Lid colour | string | string | "#23252b" | yes |
