
The LyraMaker Maze Gift Box Generator makes a cylindrical puzzle box. The lid slides over an inner box whose outer wall carries a maze, and pins inside the lid ride in the maze groove. The lid only comes off when you find the one route from the closed position to the exit at the rim, and you have to find it by feel, because the lid hides the maze.
Every maze number gives a different labyrinth. Choose the inside size, the number of pins and the difficulty, and print the optional solution card for the person who closes the box.
The LyraMaker Maze Gift Box Generator creates a 3D printable maze puzzle box in your browser: an inner box with a maze on its outer wall and a lid with pins that must follow the maze to come off. You get the box, the lid and a solution card as a ready-to-print STL or 3MF.
The inner box has a groove cut 1.6 mm deep into its outer wall. The groove is a perfect maze: the generator carves a grid of cells around the cylinder with a randomised depth-first search, so every cell can be reached and there is exactly one route between any two cells, with no loops. The exit is a channel that opens at the rim. The closed position is the bottom-row cell that is farthest from the exit along the corridors, so the route is as long as that maze allows.
The lid has one, two or three pins on its inner wall. With more than one pin the maze sector repeats around the box, so every pin follows the same path at the same time, and two pins keep the lid from tilting. When the box is closed, the lid rests on the foot of the box and the pins sit in the home cell.
For each maze a test script checks that the corridors form a tree (the number of passages is the number of cells minus one and every cell is connected), so the route is unique. It then renders the box and the lid with the same OpenSCAD engine as this page, slices both into 0.1 mm sections and moves the real lid pins along the whole route, from the closed position to beyond the rim, in steps of about 0.3 mm. For the default box the pins never touch the box and keep at least 0.4 mm of clearance, and the test confirms that walls stop the pins where there is no passage. These checks cover the files; how smoothly the lid turns also depends on your printer and filament.
Print the box standing on its foot and the lid upside down on its top; the plate is already laid out that way. No supports are needed, because the groove ceilings are only 1.6 mm deep and the pins are short. Use 0.2 mm layers or finer for the box so the maze walls come out crisp, and 3 walls so the groove floor stays solid. PLA and PETG both work.
The maze number is engraved under the foot, so you can print the same maze again or make a matching card later. Before you put the gift in, test the lid: slide it on at the exit and follow the solution card to the closed position.
The box is built with OpenSCAD WebAssembly in your browser, and nothing is uploaded. For a maze you can see, try the ball maze generator; for a box with a lid that opens normally, the hinged box; or browse every LyraMaker generator.
Yes, exactly one. The maze is a perfect maze: every corridor is connected and there are no loops, so there is one and only one route from the closed position to the exit. The test script checks this for each maze it renders.
Put the gift in, place the lid on top so the pins drop into the exit at the rim, and follow the solution card backwards from the exit arrow to the home dot. The lid ends up resting on the foot of the box.
Yes. The maze number and the size settings fully decide the maze. The number is engraved under the foot of the box, so write down the settings too.
Two pins on opposite sides hold the lid straight, so it slides without tilting or jamming. The maze is repeated on each half of the box, so both pins follow the same path.
Raise the clearance by 0.05 to 0.1 mm if the pins rub or the lid is hard to turn, and lower it if the lid wobbles. The clearance changes the groove width and the gap between the lid and the maze wall together.