Loading
cfinke

Customizable LEGO-Compatible Brick

by cfinke Dec 30, 2014
Download All Files

Thing Apps Enabled

Please Login to Comment

Hi I'm trying to make a slope brick with 2x4 studs and slope at 45 degrees like this image
but i can't because it doesn't matter if I change values between block width or block length it always stays with two studs on top and a long slope 3 studs long, i can't get it turned.

here are the parameters :

block_width = 2;
block_length = 4;
block_type = "slope";
slope_stud_rows = 1;

and this

block_width = 4;
block_length = 2;
block_type = "slope";
slope_stud_rows = 1;

makes the exact same piece I looked a bit on the code and didn't find where the reverting happens

Where did you find the measurements?
I used a caliper and found the following (commented are your measurements) :

    //wall_thickness=(brand == "lego" ? 1.45 : 1.5);
    wall_thickness=(brand == "lego" ? 1.1 : 1.1);
    //stud_diameter=(brand == "lego" ? 4.85 : 9.35);
    stud_diameter=(brand == "lego" ? 4.6 : 9.0);
    //wall_play = 0.1 * 1;
    wall_play = 0.25 * 1;

As you can see the differences are rather important and make a real difference when you try to plug a series of bricks side by side.
I did not yet print with the modified values (the printer is currently printing duplo tracks...), but I will tell you pretty soon if the bricks are better with those.
Anyway, changing the values is a pleasure with your script, you really did a very good job!!

Goulou

As soon as you load the customizer, the bottom left displays a red box with this error:
/usr/local/bin/openscad/openscad: error while loading shared libraries: libCGAL.so.10: cannot open shared object file: No such file or directory

There is no sample image of the LEGO you are customizing, as well. Using latest Chrome.

when i go to use the customizer app it gives me an error, how do i fix i. I am using google chrome

Did you get that error right away, or after changing some settings?

Same error here - also tried Edge (you never know). I made a DUPLO, 2x2, nothing more. Is there a problem with the database in the Background?

I am getting the same error now. It looks like it must be an issue on Thingiverse's end, so I'll contact them about it.

Any update from Thingiverse?

The reply from Thingiverse is that Customizer is down and under maintenance, but you can try running Customizer on your own computer by following these instrucstions: https://www.thingiverse.com/thing:2812634

How to run Customizer on your own computer
by DrLex

No, I haven't heard back from them. I guess I'll try again.

I get the same error in both IE and Chrome

I get the same error. It happens with the default setting or customizing. Getting an http 403 forbidden error.

Same Error for me. :(

Great work, thank you!

Can I add a couple of requests for your wishlist?
Currently have vertical_axle_holes are always cross-shaped, and technic_holes are always round. Would be great if we could have round vertical holes and cross-shaped horizontal holes.

Unfortunately, I really don't know how to send a "Pull Request" on Thingverse -- Is there a github repo or something?

I can't guarantee that I'll be able to get those added, but I'll keep those ideas in mind.

If you feel like taking a stab at it, the code is available here: https://github.com/cfinke/LEGO.scad

thanks! :D
i want print , whit configurator, a baseplate DUPLO, but is tall
not like this
https://vignette.wikia.nocookie.net/lego/images/1/1c/Duplo_base_plate_2.jpg/revision/latest?cb=20111211000112
is possible, reduce hight?

Try this one: https://www.thingiverse.com/thing:2575891

You can see the settings I used in the Instructions section.

6x10 Duplo Plate
by cfinke

Wow great work. I am looking for these. Only one problem, Thinkcad sees the file as 1. I cant ungroup these. Is it possible to share all these stones in separate files. Many thanks

The LEGO.stl file is just an example of all the difference types of bricks LEGO.scad can generate. If you use the Customizer, you can create STLs for individual bricks.

On my MakerSelect v2 the legos were a tad bit too small. If I up the size by 1.035 in the slicer they fit great. Is there anyway to do that within OpenScad to save as part of the script?

Yeah, at line 101, right in front of the call to block(), you could add scale([1.035, 1.035, 1.035])

See https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#scale for more details.

Thank you for your reply, that sounds exactly like what I need.

This is however my first time at using OpenSCAD could I ask for a bit more detail? My line 101 is below, where would I put that change exactly? Thanks in advance for your assistance.

translate([0, 0, (block_type == "tile" ? block_height_ratio * block_height : 0)]) rotate([0, (block_type == "tile" ? 180 : 0), 0]) {

The line immediately after that should look like this:

block(

Change that line to look like this:

scale([1.035, 1.035, 1.035]) block(

Thank you so much for your help, and putting up with an OpenSCAD newb. Cheers!

On MakerBot Replicator 5th Gen, I needed to change the studs to 1.0475 and the wall thickness to 1.05.

Cheers,

E.

Hi.
Can you add maybe a piece of code if you know how for adding let say 0.6 mm chamfer on the top of Duplo studs? It comes easier to attach other stuff on them.

Ive noticed after some trial and error that a "stud rescale" of 1.035 is perfect for a Wanhao I3 with a 0.4 mm nozzle.
This configuration produces studs with exact diameter of original lego (4.85 mm) and fits perfectly.

Hi,Thanks for sharing.

Any reason for the baseplate not being perfectly flat on the underside?

Makes it hard to print and is not like the usual baseplate are made.

http://imgur.com/a/QMWd4

It's a bug -- definitely not intended. I think block_type=baseplate should use block_height_ratio=1 to get a regular-sized baseplate.

Like everyone else here, I found that the bricks are too small to fit on real Lego bricks. Yes, we can scale them up, but given that so many people are having this problem, maybe you could look at changing the defaults. It'd save a lot of comments.
Also, I am wondering why the addition of splines running down the inside walls of your bricks. They add to the printing time but don't as far as I can tell, actually serve any purpose (none of my real LEGO bricks have them.

I'm going to reprint a few bricks and compare against the LEGO bricks I have; everything seemed to work fine on my printer when I first wrote the code.

I think the bricks I modeled the library after had the splines on the underside, but I'll have to double-check.

First, thank you for this filez!! What scale are you using.? Itried to import to fusion360, but upon inspection to scale, I found similar sized objects have totally different measurements

I've never used Fusion360, but the units in the file are millimeters.

Thank you... what program did you use to design these, SCAD?

Hi, I'm having trouble getting the bottom of your Lego to fit to the top of one of my other real Lego's. every thing fits perfect except for the bottom,, it seems to be to small. I have tried to scale it bigger, but it dose the entire thing so i'm worried that when it gets to the right size for the bottom to fit, the rest will be to big. plz help and thanks for your time.

i am having same issue.
the top part of the printed brick can fit on the bottom of a LEGO brick, but the top part of a LEGO brick cannot fit the bottom of the printed brick.

its off by 10 microns thereabouts.

scaling up wont work as the printed brink will be larger

Do you have access to a Duplo-size block? It'd be interesting to see if a printed Duplo would fit with it.

I haven't experienced this, and I don't know what would cause it. You could try scaling the entire brick by 105% and then setting the stud_rescale parameter to .95. That might work, but it's just a guess.

I have the same problem. I looked at this option but couldn't scale it to 105%, only options were 1/3, 1/2 or whole numbers. I tried some different settings with no luck. Could this be something with material? I am using ABS

Under the "Stud Rescale" option, if you enter 1.05, it will rescale to 105%.

Comments deleted.

Ok thanks. I'll give it a try

Comments deleted.

One problem: The little rods running down the insides of the bricks are preventing mine from connecting with authentic LEGO bricks. Could you add an option to remove them? Thanks.

I am having this problem too. The studs on the top of the 3d printed brick fit perfectly into the bottom of a real brick, but the studs on the real brick don't fit into the bottom of the 3d printed brick. The problem seems to be because of the little rods that run vertical on the inside of the brick.
I didn't see an option to remove them in the customizer, but perhaps I missed it? Or if that option is not there, hopefully it could be added.

The rods are there intentionally, as they are on real LEGO bricks. They're supposed to add tension on the sides of the studs that the brick is clicking into.

There's no option to remove them, but if you download the SCAD script, you can comment out lines 284-292 (the two translate() blocks after the comment // Interior splines to catch the studs.)

Is there a way for the wing to be notched on the lower corner as the Space Lego wings ? Thanks

There's not, but I'll keep it in mind.

Comments deleted.

Hello I love this. As a novice printer, I made a small brick but I find it's too small to connect on top of a real lego piece. Do you find this also and is there a way to adjust it?

You could try setting the "Stud Rescale" parameter under the "printer-specific" tab to 1.2 and see if that helps the fit. If it's too big with that value, start decreasing it by 0.05 until you find the size that works for your printer and plastic.

Hi!
First of all thanks for this awesome work!

I'm having problems making wings like this: http://www.thedailybrick.co.uk/lego-parts/wedge/plate/lego-wing-2-x-4-right-41769-63330.html

Can You tell me if it's possible at all?

It appears that it's not possible. I'll try and fix this bug when I have some time, but it might not be soon.

Thanks!

If I have some time I might take on learning SCAD and try to fix it my self. Let You know if I can make it.

I freaking love this Thing! It meets all my lego / duplo needs! Rock on! I would be interested to learn a little bit more about how you made this so customizable!

Worked great. It was my first print on a Robo 3D. thank you

Hi,
Are you able to add the name option to this project as per http://www.thingiverse.com/thing:340321

Lego Block Necklace/Keychain
by aubenc

Printed it, worked well. Will take a picture soon!

Looking forward to it!