Cat Nap

This is the README that comes in the download. The files it names are in the zip.

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.

assembled

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:

  1. 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.
  2. Process "0.20mm Standard". Under Strength set Wall loops to 3. Leave supports off.
  3. 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

exploded

  1. 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.
  2. Fit the star the same way with one M2.5 screw. Turn it how you like before the screw is tight.
  3. 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.
  4. 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.
  5. Turn the shell upright and hold it over the base. Plug the fan's two wires onto pins 4 and 9 (see "Wiring" below).
  6. 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.
  7. 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:

  1. Unplug the cables.
  2. Turn the case over and take out the 4 base screws.
  3. 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.
  4. The Pi stays on the base. Pull the card out by its end and push the new one in.
  5. 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:

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.

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

inside

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

What differs from the concept picture

What has been checked

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