← Blog

The vents that never were

26 August 2026

enclosurebug-reports

Every generator page has a Report a problem button. For the first weeks the only things it caught were my own smoke tests, little "please ignore" notes I sent through the production path to make sure the plumbing worked. Then, one Tuesday at 12:46, a real one arrived: "Vents aren't being added". Four words, no contact address, and the exact configuration attached.

That configuration is the whole reason the button exists. I did not have to guess what the person was doing. They were building a 180 by 70 by 50 mm enclosure with a snap lid, 2.4 mm walls, two round cable cutouts, and hex vents requested on the top, back and front. I pasted those values into the generator on my machine, hit preview, and watched three solid, ventless walls come back.

Wrong in a bigger way than reported

The vent pattern itself was fine. The generator lays out a staggered grid of hexagons, 3 mm across with 2.4 mm webs between them, and clears away any hex that would collide with a cutout, so a vent grille never eats the edge of an HDMI port. For that box the top wall alone came out to a few hundred little hexagons. All of that math worked.

The failure was one step later. A few hundred hexagons form a MultiPolygon, a collection of separate shapes, and the extrusion call that turns a flat pattern into a 3D cutting tool accepts exactly one shape at a time. Handed the whole collection, it threw. The code caught the exception, tried a fallback engine, which threw for a different reason, caught that too, and returned nothing. No error, no warning, no vents. Three walls of hexagons were computed and then silently dropped on the floor.

Which means the honest changelog line is not "fixed a bug where vents could be missing". Vents had never worked. Not for this user, not for anyone, not on any wall, since the day I shipped the feature. My own test prints all predate the code that broke it, and nobody before this person had bothered to tell me.

The fix, and the second bug hiding next to it

The repair is unglamorous: extrude the hexagons one by one and glue the results into a single cutter. A few hundred small extrusions instead of one impossible big one. The reported box now previews with 7 320 triangles of vent cutter on the lid alone, and both parts still come out watertight.

While I was in that function I found a second bug that had been waiting for its moment. The cutters for each wall were matched back to their walls by position in two parallel lists, and any wall that produced no pattern would silently shift every cutter after it to the wrong wall. Top vents landing in the base, that kind of wrong. It could never fire while vents as a whole were broken. Fixing the first bug would have armed the second. The cutters now travel as explicit wall-and-mesh pairs.

Both fixes went out the same day as version 1.237.2, about five hours after the report came in.

There is a lesson here about silent exception handlers, and I will not pretend I have fully learned it: the same file still has a try/except or two I need to look hard at. But the more practical lesson is about that report button. Whoever you are, four words and your attached settings fixed a feature for every user of the enclosure generator. If the vents you asked for in August come out of your printer with clean hex grilles now, that was you.