Desiccant is common in 3D printing because the drier plastic filament is, the better it prints. Beads of silica gel are great for controlling humidity, but finding a porous container for them that is a convenient size is a little harder. 3D printing is a generally useful solution for custom containers, but suffers from a slight drawback in this case: printing dense grills or hole patterns is not very efficient for filament-based printers. Dense hole patterns means lots of stopping and starting for the extruder, which means a lot of filament retractions and longer print times in general.

The green model is used as a modifier to the orange container (of which only the corners are left visible here)
[The_Redcoat]’s solution to this is to avoid hole patterns or grills altogether, and instead print large wall sections of the container as infill-only, with no perimeter layers at all. The exposed infill pattern is dense enough to prevent small beads of desiccant from falling through, while allowing ample airflow at the same time. The big advantage here is that infill patterns are also quite efficient for the printer to lay down. Instead of the loads of stops and starts and retractions needed to print a network of holes, infill patterns are mostly extruded in layers of unbroken lines. This translates to faster print speeds and an overall more reliable outcome, even on printers that might not be as well tuned or calibrated as they could be.

To get this result, [The_Redcoat] modeled a normal, flat-walled container then used OpenSCAD to create a stack of segments to use as a modifier in PrusaSlicer. The container is printed as normal, except where it intersects with the modifier, in which case those areas get printed with infill only and no walls. The result is what you see here: enough airflow for the desiccant to do its job, while not allowing any of the beads to escape. It’s a clever use of both a high infill as well as the ability to use a 3D model as a slicing modifier.

There’s also another approach to avoiding having to print a dense pattern of holes, though it is for light-duty applications only: embedding a material like tulle into a 3D print, for example, can make a pretty great fan filter.