3D Printing, Maker, OpenSCAD, Programming

Print your own LEGO-compatible bricks

Given that I have a 3D printer and a five-year-old son, it was inevitable that I would eventually print some LEGO-compatible bricks.1 I knew that bricks were a popular “look what I can print” demo, but after I tried out a few of the popular printable LEGO-compatible models [1] [2], I found that none of them were designed accurately enough to reliably interlock with genuine LEGO bricks, and none of the libraries included support for any shapes besides the basic rectangular brick.

To solve this problem, I’ve written a LEGO-compatible brick generator that is more feature-rich than any other. It has support for customizing the following brick aspects:

  • Length, width, and height
  • Shape: brick, tile (smooth-topped brick), wing, slope (brick with an angled face), curve (brick with a curved face), or baseplate.
  • Size: LEGO or DUPLO
  • Hollow or solid studs (the little bumps on top of the bricks)
  • Horizontal rod holes
  • Vertical axle holes
  • Notched sides on wings so that the wing can be attached to a plate.
  • Slope/curve length/angle
  • Curve style: convex or concave
  • Double-sided bricks (studs on both the top and bottom)
  • Roadways: smooth sections on the top of a brick

These characteristics can combine to create millions of unique bricks. You can generate anything from this vanilla 2×4:


to this extensively customized brick that you’ll never be able to buy from LEGO:


This assortment of bricks contains examples of all of the available customizations:


But this is still just a tiny fraction of the possible permutations.

Here are a few bricks I’ve printed. I haven’t gone crazy with customizations, mainly because what I print is dictated by what my son asks for, and he’s only been requesting wings, wings, and more wings so he can build spaceships.

The script is available on GitHub, and I’ve published it on Thingiverse as well for easy customizing. (It’s by far my most popular Thingiverse model.) Download the script, print your own bricks, and send me a photo.

1. At the request of the LEGO corporation, homemade bricks should be called “LEGO-compatible bricks,” not “LEGO bricks.” FYI.


25 thoughts on “Print your own LEGO-compatible bricks

  1. Jason Gilbert says:

    Awesome, thanks for sharing your hard work! Can I ask what printer you have, or what to look for in a printer to make these blocks at good quality, I.e respectably good ‘snap’ when connecting with actual Lego blocks?

    • I have an Orion Delta 3D. I don’t know what to look for specifically, but on whatever printer you try it on, you’ll want to play with the stud_rescale parameter to get the studs to print at just the right size so they’ll give that satisfying snap.

  2. Andrew Ennis (Bath, UK) says:

    I don’t have a 3-D printer, but I need about 15 special size Lego window frames. I am building a 1:25 scale model of my own house, but the standard Lego windows available are too small for most of the windows on my model.
    Do you produce Lego-compatible bricks for people commercially?

  3. Jealous Dad, aka Heath says:

    Hi. I have really been dying to get some custom made pigeons to put on buildings in my cityscape? Would you be able to produce some 5-10 as an order? Thanks!

    • It’s maybe a few pennies cheaper, but the time commitment and the lower quality don’t make up for the price difference. If you can easily buy the replacement piece you need, you’re likely better off just buying it.

  4. Raoul Duke says:

    you are awesome for doing this! srsly.

    any idea/thoughts/leads how i could get/make/design 2×2 by 2×2 angle brackets with arbitrary angles of my choice instead of just the half-pi standard?

    • Sure, I wrote up an OpenSCAD script to generate angle plates: http://github.com/cfinke/LEGO.scad/blob/master/LEGO-Angle-Plate.scad

      This is the default output: a 90º plate with both sides 2×2.

      But you could make the angle anything. Here’s one with an angle of 45º and different size sides:

      Here’s the underside of one with an angle of 100º, a 2×3 base, and a 4×1 overhang:

      Depending on the size of the overhang, you’re limited to about 112º before it starts to get chopped off. This script doesn’t do plates with negative angles (the overhang jutting up from the base with the studs on the “bottom” of it), but it’s not hard to imagine that it could be modified to do so. Also, both sections of the plate are the standard 1/3 brick height. I think the real LEGO angle plates have the overhang as thick as a baseplate, but I didn’t have one handy to measure. I’ll find one and update the script if necessary.

      Actually manufacturing these is up to you — you could print them yourself (somehow) or order them from Shapeways or another print-on-demand service. They *should* work, but maybe do a test run before ordering a gross. :-)

  5. Matthieu Godbout says:

    Hello Mr. Finke, I really appreciate your work since it could help me imagine new set of LEGO-compatible bricks. You wrote on this page that the fit with LEGO bricks is acceptable to your 6-old son, but not satisfying to you. Why do you think so? Is it too hard or too easy too assembly or disassembly? Before I can verify your dimensions with my own prints (the MakerGear M2 I will use seams to reach as good accuracy as your Orion Delta), I would like to understand where your bricks show some defect. I thought the genuine LEGO bricks could have some subtle taper angles on their sides, on the sides of their studs and maybe elsewhere… Thank you.

  6. Leonard says:

    I would like to print some of the space lego from the late 1970’s and early 1980’s, the sets sell for a premium on eBay today and it would be amazing to have them printed again as lego no more make them. How does copyright work with LEGO designs, do the copyrights expire after X number of years? Is there anyone printing the 1970’s and 1980’s space lego currently?

    • According to LEGO’s legal department:

      “You can generally use them for your personal project or if nobody is making any money from it. Read the LEGO® Fair Play policy to find out more: http://aboutus.lego.com/en-us/legal-notice/fair-play/

      As I understand it, as long as you don’t post designs online that claim to be genuine LEGO bricks (thus, the “LEGO-compatible” disclaimer I used), you can create and print any brick designs you like for your own use.

  7. Martin Silsby says:

    Hi like what I have seen you have done. Since I am in the UK, could you give some details on the Orion Delta 3D printer. I don’t know what and it’s consumables. How long to print an item. Really looking at printing tools, head gear, food stuff, swords, sheds etc. Have you tried any of these sort of things. Thanks for the information and work you done will be checking out the links.

  8. Ben Weinberger says:

    I love it. Have you created a project to print heads with custom faces (such as from a JPG or something so that I can print faces of my family onto some lego heads and snap them onto lego bodies)? Also, how long would you printer take to print one head?

    • No, my printer can only print one color at a time, so custom faces are out of the question. You might have luck printing faces onto stickers correctly sized to fit exactly on a blank yellow LEGO head.

Leave a Reply

Your email address will not be published.