Openscad Lego-Like brick

by jag Jan 21, 2011
Download All Files

Thing Apps Enabled

Please Login to Comment

how do I add a technic hole to the brick?

This 'lego' block really locks into place. Although you need to keep unlock/lock them pieces to make it more loose. Good thing for building!

This looks really interesting. I want to make bird feeders to promote wildlife in impoverished countries like Haiti. It would be great if they fit together in an array so folks can have many bird feeders on a single window. Thanks!

This is a nice effort but is no one having problems with these? I could not get good fit with real bricks and measured the STLs. The bottom/female side is not symmetrical. If I measure one side of a "chamber" it is 5.78 and when measuring the opposite chamber which should be an exact mirror of the first the corresponding side 5.44. A ~0.35 mm difference just can't work well here where friction fit is essential.

Not quite sure how that could happen, everything is constructed in openscad with rectangles, no polygons so all the walls should be parallel. What size brick were you making? Are you sure it isn't your printer?
Is the outside of the brick a uniform size?
It is a little tricky getting the fit right, it depends a lot on the calibration of your printer. LEGOs are extremely precise little pieces. It's pretty much impossible to get as good a fit with an FDM machine.

Yes I am sure. The error can be measured in the STL file, which means the error has nothing to do with the slicer or printer. If you open the STL in MeshLab and use the measure tool you can see the error clearly.The pockets vary in size.

It is also visible by the naked eye directly in OpenSCAD now when I am aware of the error. Make the brick 2x2, press F5 and view the bottom side with CTRL+5.

I see it now. I haven't printed these since I had a thing-o-matic which was somewhat less precise.
I misunderstood you. I thought you were saying the sides weren't parallel. It turns out the reinforcements on the bottom weren't quite spaced correctly. Hopefully they are correct now.

These are excellent! Any chance we can get support for slanted bricks?

Axel holes are only top surface thick. Won't keep the axle in alignment. If they were extruded through to the bottom or as deep as you can make them they would be stronger and give more stability.

I uploaded a new scad script.

I fixed a few bugs. This was one of my first openscad programs and it shows...

I didn't have a problem with the knob height, but I would recommend using $fs=0.1 to get nicer knobs (i.e. not hexagons). Maybe this will help with fitment. I can't wait to print all kinds of sizes. I played with the block sizes and the script seems very robust. Excellent job! Flattrd. :)

Thanks! I made the knobs more circular. I'm not sure if it will make much of a difference. It actually might make more of a difference on the bottom (that's where the hexagons seem to be more noticeable).

The knobs on the top don't change height with the change of the height parameter...

But otherwise a nice script.

fixed. I hadn't tested that yet. The script doesn't seem to work right now if you want to make a plate (height of .33). I'll have to look into that when I get a chance.