I’ve been doing some test prints that are a combination of a series of experiments (for me) to ensure I know how to print parts that meet some fairly narrow tolerances. On the other end, I wanted my tests to be more than a chain of print->measure cycles. So I thought I would print in LEGO.
I found an Open-SCAD model for LEGO on Thingiverse, which led to the GitHub code: https://github.com/cfinke/LEGO.scad
From the SCAD code I printed a 2x6 brick, with no rescaling.
The print turned out well, but it was a tad off. I noticed the wall dimensions weren’t quite right, and the studs had no rounding, as well as being slightly off. So I found what looked like reliable lego measurements on-line and confirmed as much as I could with calipers, then changed the code. Also the shrinkage during the wash+cure process was enough that the entire brick was a bit too small. It would fit with actual lego bricks, but the female side was too tight, and the male side a bit too small – would click in but not very firmly.
Notice the crack that formed in the corner of the brick.
In generation two I fixed all those problems, printing with a scaling factor of 1.009. My previous experiments with clear resin suggested that was probably a reasonable scaling factor.
Generation 2 fits well with actual LEGO pieces, although perhaps a scaling factor like 1.01 or 1.011 would be closer to actual lego specs. Still the print male side to LEGO female side is a bit looser than the print female side to actual LEGO male.
These prints were still missing a couple features of the actual lego pieces. The actual lego pieces have little supporting struts between the walls and the central cylinders. They also have little recesses opposite the studs. So I put those in, and made a 3rd print.
I also had it carve-out a little text on the side of the brick.
That is the print sitting on top of an actual LEGO brick.
Oh, and here is the GitHub repo for my variation on the Open-SCAD lego-compatible brick design.