Cat Nap — Raspberry Pi 4 case under a sleeping cat
113 L × 77 W × 72 H mm (plus feet). Four printed parts, none needs supports.

A white cat asleep on a purple quilted cushion, with a gold star beside it. The Pi is inside the cushion. The quilting's seams are grooves, and the slits along them are the vents. The fan stands inside the end under the cat's head. This case has no camera and no power button: the Pi starts when it is plugged in.
Files
| File | What it is |
|---|---|
3mf/plate_1_purple.3mf |
base and shell, in print orientation |
3mf/plate_2_white.3mf |
the cat |
3mf/plate_3_gold.3mf |
the star |
stl/ |
the same four parts one by one |
step/catnap_assembly.step |
assembled CAD model of the base and shell with a reference Pi and fan, for Fusion / FreeCAD / Onshape. The cat and the star are not in it (see below) |
catnap_case.py |
parametric source. uv run catnap_case.py regenerates everything above |
preview/ |
renders: assembled, front, rear, top, exploded, inside, print plates |
The base and shell are drawn as solids, like the other cases. The cat and the star are not: each is a blend of rounded shapes turned into a mesh of triangles (70,000 for the cat). A mesh goes into STL and 3MF files but not into a STEP file.
Printing
One plate per filament colour.
| Plate | Colour | Parts | Time | Filament |
|---|---|---|---|---|
| 1 | purple | base, shell | 2 h 46 min | 76 g |
| 2 | white | cat | 37 min | 26 g |
| 3 | gold | star | 3 min | 1 g |
Times and weights are Bambu Studio's own estimates for the P2S, 0.4 mm nozzle, "0.20mm Standard" with 3 walls, Bambu PLA Basic.
In Bambu Studio, for each plate:
- File → Import → Import 3MF/STL/STEP… and pick the plate file. It will say the file was not made by Bambu Studio and only the geometry is loaded: that is expected. If it asks whether to load it as one object with multiple parts, answer no.
- Process "0.20mm Standard". Under Strength set Wall loops to 3. Leave supports off.
- Choose the filament, Slice plate, Print plate.
The parts are already turned the right way up. Don't auto-orient them:
| Part | How it lies on the bed |
|---|---|
| base, cat, star | as they stand |
| shell | upside-down, standing on its flat top |
The shell has to be upside-down. Its socket openings run down to its lower edge, so as
it stands its wall would start as separate pieces with bridges laid across them, which
is how the Fossil Rib Cage's first shell failed. Upside-down it starts as one flat
face 97 × 62 mm and the openings are open at the top. To try it on its own before the
whole purple plate, import stl/shell.stl instead: 2 h 9 min, 52 g.
The cat's eyes and nose are grooves about 1 mm deep. In white plastic they show as shadow only. For the dark eyes of the picture, run a fine black paint pen along them.
PETG is the safer choice next to a Pi 4, at least for the two purple parts.
Hardware
| Qty | Screw | Where |
|---|---|---|
| 4 | M3 × 8 pan head | base → shell, from underneath |
| 3 | M3 × 8 pan head | shell → cat, up through the top from inside the shell |
| 4 | M2.5 × 6 | Pi → base posts |
| 1 | M2.5 × 6 | shell → star, up through the top from inside the shell |
| 4 | 12 mm stick-on rubber feet | recesses under the base |
| 1 | CanaKit Raspberry Pi Fan (RSP-FAN, 30 × 30 mm) | inside the end under the cat's head |
All screws thread straight into the plastic (pilot holes are sized for that). The fan and feet are the same ones the other cases use.
Assembly

- Hold the cat on the shell's flat top and fit 3 M3 screws up into it from inside the shell. The three holes only line up one way: the head over the end with the two fan channels inside, the face toward the side with no socket openings.
- Fit the star the same way with one M2.5 screw. Turn it how you like before the screw is tight.
- Turn the shell upside-down and slide the fan between the two channels, label toward the wall, until it meets the ceiling. Two ridges pinch it, so it should stay there when you turn the shell over.
- Put the flashed microSD card in the Pi first: it cannot be reached once the case is closed (see "The microSD card" below). Screw the Pi to the four posts in the base: microSD end toward the thin bar in the floor, USB and Ethernet toward the other end.
- Turn the shell upright and hold it over the base. Plug the fan's two wires onto pins 4 and 9 (see "Wiring" below).
- Lower the shell straight down inside the base's rim. Its socket openings are slots open at the bottom, so it passes the sockets. The bar in the floor comes up under the fan.
- Turn the case over, fit the 4 base screws, and stick on the feet.
The microSD card
There is no opening for it, and none can be cut as the case is drawn. The card is under the end of the Pi nearest the fan. Its end is 13 mm inside the cushion's end under the cat's head, and 15 mm inside the piping. A card leaves its socket by sliding about 13 mm straight out, and the fan stands across that way from the floor to the ceiling, 1.2 mm from the card's end (0.6 mm for a fan 7.6 mm thick). A slot in the end would open onto the fan.
To change the card:
- Unplug the cables.
- Turn the case over and take out the 4 base screws.
- Turn it back and lift the shell straight up. The fan comes with it on its two wires: set the shell down beside the base, or pull the wires off pins 4 and 9.
- The Pi stays on the base. Pull the card out by its end and push the new one in.
- Close the case as in steps 5 to 7 above.
What it would take to reach the card with the case closed. None of these is drawn:
- Lift the fan about 5 mm, on a bar between two posts either side of the card's way. The cushion gets 5 mm taller, and the card is reached through a slot 3 mm tall at the seam under the fan: pulled out with tweezers, pushed in with something thin and flat. Air the fan blows out could then come back in under it, unless a closed channel round the slot stops it.
- A 25 mm fan, lifted the same 5 mm, fits under the top as it is. It is not the fan the other cases use.
- Lay the fan flat under the top, over the Pi's chip. The outside stays as it is, and the end under the cat's head is free for a recess a finger reaches the card through. The fan's mount, the air's path and the assembly all change.
Wiring
With the USB-C and HDMI side toward you, the 40-pin header runs along the far edge of the Pi and pin 1 is at its left-hand end (the fan's end). The row nearer the far wall holds the even pins, the row nearer the middle of the board the odd ones.
- Fan red → pin 4 (5 V): far row, second from the left.
- Fan black → pin 9 (ground): near row, fifth from the left.
Count carefully: the first two pins of the far row (pins 2 and 4) carry 5 V. Bridging 5 V to a GPIO pin can damage the Pi. The fan runs whenever the Pi has power.
Fan

The fan stands upright 2.2 mm inside the end wall under the cat's head. Nothing clips: a channel each side holds it sideways and front to back, the ceiling stops it above, and a thin bar across a hollow in the base's floor pushes it up against the ceiling by about half a millimetre. The bar is printed flat, so it bends along its layers. That is the strong direction, unlike the upright clip that broke on the Arcade Wedge.
With its label toward the wall the fan blows into the gap between it and the wall, and out through the 12 slits that open into that gap. The channels close the gap's sides, so most of what the fan blows leaves that way. Air comes in through the other 6 slits on that end and the 53 along the two sides. Turned round, the fan draws air in through the end instead.
Check before printing
- Fan: the channels take a fan 30 × 30 mm square and up to 7.6 mm thick.
CanaKit publishes 30 × 30 mm but not the thickness; 7 mm is the figure usually
quoted. If yours is thicker, set
FAN_T_MAXto its thickness and re-run the script. - Plugs: where the sockets are, the cushion is cut back to a flat wall, and under
the back sockets the base's rim dips. A plug's moulding stops at that wall, 1.2 mm
from the socket's face, and has room for 11 mm of height at the HDMI sockets. If
your HDMI plug is taller, lower
Z_DIP.
What differs from the concept picture
- It is the picture seen in a mirror. On a Pi 4, with USB and Ethernet at the right-hand end, USB-C and HDMI are along the near side. Built as pictured, the power and TV cables would leave from under the cat's face. Mirrored, they leave behind the cat, and USB and Ethernet are at its tail end, on the left as you face it.
- The back has sockets too: USB-C, two HDMI and audio.
- The cushion's top is flat. The shell prints standing on it. From its widest line the side rounds over until it leans 45°, then meets the top at an edge. The cat covers most of the top, and the star sits on the rest.
- The cushion is cut back to a flat wall round the sockets, in a bay at the USB end and one at the back. It swells 4.2 mm at its widest, further than a plug reaches.
- The seams are grooves, not raised stitching, and the diamonds between them do not puff up. The slits are straight, cut at 45° like the seams so that none has a flat top either way up. There are none on the USB end.
- The piping is the base's rim. It dips under the back sockets (see "Plugs").
- The cat is plainer: no paws, and its eyes and nose are grooves in white.
- The star lies on the flat top, not on the shoulder, and is 20 mm across.
- A fan, which the picture does not show.
What has been checked
- Nothing here has been printed.
- Both checks of
../print_check.py(uv run ../print_check.py stl/*.stl), which the Fossil Rib Cage's two failed prints were missing: - Every part starts on the bed as one piece, and no piece starts apart from the
rest higher up. An earlier drawing of the shell failed this: where seams from two
walls met on a corner, they cut under the sliver of skin between them, and twelve
specks of 0.1 to 0.2 mm² started in mid-air. The seams now stop 0.6 mm short of
each corner's diagonal (
SEAM_WEB). - No piece leans while it stands alone. The pieces that do stand alone are upright: in the shell, the two strips between the USB and Ethernet openings (3 × 5.4 mm, 20 mm tall) and the posts between the back openings (the thinnest 1.9 × 2.4 mm, 9 mm tall), the same as the Rib Cage's; on the cat, the two ears, for 7 and 9 mm. Worked out as beams, the strips move 0.08 mm at the top for each newton pushed sideways. The grille bars of the Arcade Wedge's shell, which printed, move 0.47.
- Undersides, by scanning the print-orientation STL files for faces that lean more than 45°. The shell has none. The base has the bar under the fan (a 21 mm bridge) and the roofs of the feet's recesses (12 mm) and the screw heads' (7 mm), as the other cases' bases do. The cat has the top of the nose's groove, which leans 51°, and the two upper ends of the eyes' grooves, under 1 mm² each. Its screw holes and the star's end in a point, not a flat roof.
- In CAD: the base and shell do not overlap each other, the reference Pi, a fan 7 or 7.6 mm thick, or the heads of the screws under the top. The fan was stepped out of its channels and the shell, with the fan in it, off the base over the Pi. Nothing touches except the two things meant to: the bar that pushes the fan up, and the ridges that pinch it.
- In CAD, the microSD card's way out: a card pulled 13 mm straight out of its socket meets the fan and the shell's end wall, not the base. The reference fan is its frame and hub only, so it shows a small overlap; a real fan's blades fill the rest of its face. With the shell lifted off, nothing on the base is in the way. No card has been tried in a printed case.
- The cat and the star: each mesh is a closed surface. Their undersides lie inside the shell's flat top, the cat's 2.7 mm from its edge and the star's 1.0 mm. Each screw hole has at least 3 mm of plastic round it, and the star is 5 mm from the cat's tail.
- In the slicer: the three plates slice in Bambu Studio with the P2S profile, no supports, no warnings. Both of the Rib Cage's failed plates passed this too, so it says little.
- What to look at on the first print of the shell: from the bed the side leans out at 45°, standing straighter as it rises, and that outer face is the one seen. It may come out rough for the first few millimetres, next to the top. The wall is a closed ring 2.4 to 6.6 mm thick all the way, cut by three rows of slits.
- What depends on the printer and has no check here: the shell inside the base's rim
(
FIT), the fan's pinch (FAN_GRIP) and its spring bar (SPRING_PRESS, and whether a 0.6 mm bar bridges 21 mm cleanly), the screws biting into the cat and the star, and how much the seams show at 0.5 and 1 mm deep.
Parameters worth knowing (top of catnap_case.py)
| Name | Default | Effect |
|---|---|---|
HL, WS, R0 |
52.1 / 34.5 / 6 | half-length, half-width and corner radius of the flat faces the cushion swells out from. The Pi sits against one side; the other has the room for the screw blocks |
Z_TUCK, Z_W, BULGE |
6.8 / 17.5 / 4.2 | where the swell starts, where it is widest, and by how much |
ROOF_T |
2.6 | thickness of the flat top. The cushion's height follows from the fan's |
RIM_T, RIM_ROUND, BASE_CH |
2.2 / 1.6 / 2 | the piping: how far it stands out, its rounding on top, its 45° cut underneath |
Z_DIP |
4.6 | top of the rim under the back sockets (6.4 elsewhere) |
QUILT_N |
2 | size of the diamonds: their pitch is the cushion's length less its width, times 2, divided by this |
GROOVES, SEAM_WEB |
2 × 0.5 and 1 × 1 / 0.6 | each seam's two steps (width × depth), and how far the seams stop from a corner's diagonal |
SLIT_L, SLIT_W, SLIT_W_FAN |
6 / 2.2 / 3 | the slits: length, width, width on the fan's end |
FIT |
0.25 | clearance between printed parts; raise it if your printer runs tight |
FAN_T_MAX, FAN_OFF |
7.6 / 2.2 | thickest fan the channels take, and how far it stands off the wall |
FAN_GRIP |
0.25 | height of the two ridges that pinch the fan (less = looser) |
SPRING_PRESS, SPRING_GAP |
0.5 / 1.4 | how far the fan bends the bar under it, and the depth of the hollow below the bar |
CAT_SCREWS, STAR_XY |
three / one | where the screws come up through the top |
BODY_C, BODY_R, HEAD_C, HEAD_R, HEAD_YAW |
see file | middle and radii of the cat's body and head, and how far the head is turned |
EAR_*, TAIL |
see file | the ears, and the points and radii the tail runs through |
EYE_*, NOSE_* |
see file | the face: place, size, width and depth of each groove |
CAT_STEP, CAT_FACES |
0.3 / 70,000 | how finely the cat is sampled, and how many triangles are kept |
STAR_R, STAR_R_IN, STAR_H, STAR_TURN |
10.5 / 5 / 6.4 / 12 | the star: tips, notches, height, and how far it is turned |
M3_PILOT, PI_SCREW_PILOT |
2.8 / 2.15 | self-tapping hole sizes |
Before printing a changed cat, look at it: a part of it that hangs out further than
45° will not print, and nothing in the script stops you drawing one. Run
uv run ../print_check.py stl/*.stl after any change.
Redrawing the previews
uv run catnap_case.py --assembled /tmp/catnap_assembled
/Applications/Blender.app/Contents/MacOS/Blender -b -P render_previews.py -- \
/tmp/catnap_assembled stl preview
Where the dimensions come from
- Raspberry Pi 4 Model B: official mechanical drawing (https://datasheets.raspberrypi.com/rpi4/raspberry-pi-4-mechanical-drawing.pdf).
- Fan: CanaKit Raspberry Pi Fan product page (https://www.canakit.com/raspberry-pi-fan.html): 30 × 30 mm. The thickness is the usual value for 30 mm fans, not a CanaKit figure.
- The 11 mm allowed for an HDMI plug's moulding is a guess at what cables have, not a measurement of yours.