The case is a program: Atmos One's enclosure is 372 lines of Python
The enclosure of Atmos One is written as code. Its parts share one file of dimensions with the circuit boards, and every build measures 17 distances and fails if one is too small.
Most enclosures are drawn: someone opens a CAD program, sketches a profile and pulls it into a solid. The enclosure of [Atmos One](#/story/atmos-one) was written instead. Its parts are a Python file of 372 lines, and a second file of 241 lines builds them, measures them and refuses to finish if something is too close.
The commit that added the model sits 2 hours 35 minutes into [the project's log](#/story/one-day-64-commits), and it names Claude Fable 5.2 as co-author. This article is about what that code describes, what it checks, and what it cannot know.
One note on the film: every part in it was built by the project's own code. The air sensor alone is a plain block, because its 3D model belongs to its maker and is not in the repository.
What the case is

A wedge that leans back 15 degrees: 140 mm wide, 90 mm high, 64 mm deep at the desk and 40 mm at the top.
- Shell. Five of the six faces are one piece of aluminium, milled from a block, then bead-blasted and anodised.
- Rear cover. The sixth face is black plastic, held by four screws.
- Inside the shell: the display bonded into a pocket in the front, the main board on four bosses behind it, a light pipe, a microphone port and a steel ballast on the floor.
- On the cover: the air sensor in a cradle, the small USB-C board on a shelf, and the antenna.

Three cables join the two halves. The cover, with everything on it, comes off after four screws and three plugs.
One file of dimensions, read by two worlds
The model takes its dimensions from one parameter file: width, height, wall thickness, where the board's mounting holes are. The programs that generate the circuit boards read the same file.
The log shows why that matters. Twenty-two minutes after the first model, a commit is titled "Board screws reachable". The two lower board screws sit close to the floor of the shell, so a straight driver cannot reach them; they need a ball-end key lying at about 10 degrees. The fix moved one mounting hole on the board inboard, so that its lane passes beside a corner boss of the shell, and narrowed the ballast so both lanes stay free.
That is a change to a circuit board, to an aluminium part and to a steel block at once. In the commit it is a change to the parameter file and small edits to the board generator and the enclosure model. The same commit carries the regenerated board file, its factory outputs and the changed enclosure model.
What the build checks, every time

After building the parts, the program loads the 3D exports of both circuit boards and the sensor's model, and then checks three things.
- Nothing overlaps. Every pair of solids that could meet is tested, about 160 solids. The release reports none.
- 17 distances are large enough. Each one has a minimum and a written reason.
- The vent slots are big enough for the air sensor.
If any of the three fails, the build fails. Some of the 17 distances, from the release's report:
| Between | Measured | Minimum | Why it is there | | --- | --- | --- | --- | | Antenna and the aluminium | 15.6 mm | 10 mm | Metal close to an antenna detunes it | | Parts on the board and the rear cover | 14 mm | 5 mm | Room for cable plugs and their bends | | Display flex parts and the board | 1.3 mm | 0.8 mm | Parts sit on the flex, under the board | | Ballast and the parts on the board | 1.22 mm | 1.0 mm | The board leans over the steel block | | Light pipe and the light sensor | 0.66 mm | 0.3 mm | The pipe ends just above the sensor | | Cover glass and its pocket | 0.15 mm | 0.1 mm | A gap all round for the glass to drop in |
A separate check looks from the other side. It opens the two board files and confirms that the outline, the slots, the mounting holes and the parts whose position the case dictates are where the parameter file says: 16 of 16.
The air path

The air sensor has a small fan. It draws air in through two inlets and blows it out through one outlet, and its maker's guide says how much open area each needs in the wall: at least 56 mm² for the inlets and 148 mm² for the outlet.
The cover has 3 slots over the inlets and 7 over the outlet. The program adds up their open area from the model: 125 mm² and 213 mm². If a later change shrinks them below the minimum, the build fails.
The sensor is on the cover for a reason the project writes down: its air face has to be pressed against the wall it breathes through, and the cover is the only wall that is assembled in that direction. A foam gasket seals the inlets from the outlet and both from the inside of the device, so the air that is measured never passes through the enclosure.
The same page also says: "No CFD was run." The areas are computed from the model. How the air really moves is not simulated.
A finger on the screen
A light wedge with a touch screen has an obvious problem: push the top of the screen and it rocks back. The model estimates the device at about 496 g, of which the shell is 212 g and a steel ballast on the floor is 145 g. With those numbers it takes about 2.6 N on the top edge of the screen to rock it, and more lower down.
The project is plain about how soft that figure is. The masses of the display, the sensor and the boards are estimates, and the note beside them reads "weigh the parts".
What the program does not know
- Cables. Their lengths and routes are described in words. Their volume is not in the overlap check.
- Screws and the adhesive frame under the cover glass are not modelled.
- Airflow. No flow simulation was run. Heat is a rough estimate from a separate script, which rates itself at about ±30 %.
- A real part. Nothing here has been machined, moulded or printed. Tolerances are written down, and no part has been measured against them.
The project plans for that. Next to the aluminium shell it exports a second shell for 3D printing, with thicker bosses for threaded inserts and every internal dimension kept, so fit, cable routing and airflow can be tried before any metal is cut.
What to take from it
You do not need to write your case in Python to copy the habits.
- Keep the dimensions that the board and the case share in one place, and let both read it.
- Write each minimum distance down with its reason. A number without a reason gets changed.
- Check them again after every change, not once at the end.
- Print the case before you pay for metal.
When the files are ready, the two halves take different roads on EIN. The boards go through a PCB request, with a DFM check and prices from makers. A case goes in as an Other Request, with its 3D file and drawing attached. [A case for your board](#/story/a-case-for-your-board) walks through that part.