Introduction: Parametric Lego Bricks in Fusion 360
In this step by step tutorial I am going to show you how to design a parametric Lego brick in Fusion 360.
The main goal is to create one design that could immediately generate all kinds of different Lego bricks just by entering 3 parameters: a length, a width and a height.
I used Fusion 360 to create this parametric design, you can download this 3D CAD software for free as long as you are using it as a hobbyist.
Step 1: How Do Lego Units Work?
The 3 parameters we will use to dimension our Lego brick, will be entered in Lego units.
Lego units work as follows:
- 1 unit has a length and width of 8 millimeters
- The height is 3,2 millimeters for the low bricks and 9,6 millimeters for the high ones. This causes 3 low bricks to have the same height as one high brick.
- There is a 0,2 mm clearance spacing to make sure that 2 adjacent blocks fit together easily.
So the determination of the height of our brick is easy, it wil be either in the "LOW" state (3,2 mm) or in the "HIGH" state. Defining the width and length of a brick however is a little bit trickier. We are going to design a brick that is 4 units long and 2 units wide as an example. This block will be 4 times 8mm long, minus the clearance spacing of 0,2mm, thus its total length will be 31,8mm. Same goes for the width which will be 2 times 8mm long, minus the spacing, which results in a total width of 15,8mm.
Step 2: Parameters in Fusion 360
We are going to start by entering these parameters into Fusion 360, then we can always reference them throughout the entire design process.
So first of all we’ll go to “Modify” and then “Change Parameters” and here we can add our first parameter by clicking the green plus icon next to “User Parameters”. We’ll give it a name “LENGTH” and set the units to “no units” because the Lego units are always whole numbers. Then we can do the same for the “WIDTH”. And we will set these to 4 and 2 for now, but we can always change this later on of course. And lastly we can enter the “HEIGHT” parameter which will be in millimeters and will have a value of 9,6 for the high state and 3,2 for the low state.
We can also make a parameter for each of these states so in the end we can just set the “HEIGHT” parameter to “HIGH” or “LOW” without having to worry about the actual dimensions. Note that you can also reference parameters to each other, so we might as well just change the value of the high state to 3 times the low state.
Step 3: Designing the Actual Brick
We will start by drawing the outer dimensions of the brick itself.
So first of all we willl sketch a center rectangle, we can do this in the top view, and put its center on the origin. We dial in the correct dimensions afterwards with the (sketch) dimensions command. The short side of our rectangle equals the “WIDTH” parameter multiplied by a length of 1 Lego unit, thus 8mm, and minus the clearance of 0.2 of a millimeter. The long side dimension equals the “LENGTH” parameter also multiplied by 8mm and minus the clearance. Don’t forget to finish the sketch by clicking the “stop sketch” icon on the top.
Next up we can extrude this sketch by going to “Create” and then “Extrude”, we can select the profile we’ve drawn and dial in a distance which equals the parameter “HEIGHT”. Now we have a brick with the overall outer dimensions, this is a good moment to play around a little bit with our 3 parameters to make sure that everything is working correctly and we haven’t made any mistakes. If we did make any, we would be better off fixing them straight away, because even small problems now can lead to bigger problems later.
Step 4: Add the Studs
The next step is making the studs on top of our brick. We’ll draw 1 stud first and copy the rest in a pattern afterwards.
We add a new sketch on top of our brick, draw a circle with a diameter of 4.8mm and add two dimensions to make sure that there is 3.9mm between the edges of the brick and the center of the circle. We extrude this circle for 1.8mm and that concludes it for the first stud. Because all the dimensions of this one stud are fixed it should always stay perfectly in the corner even when the parameters are changed.
We can now create a pattern to copy the rest of the studs. This is done by going to “Create”, “Pattern” and then “Rectangular Pattern”. We can then change the “Pattern Type” to “Features”, because the stud is just one feature that we are trying to copy, in this case an extrusion. And we can select this feature in the timeline history on the bottom. We can select 2 edges of our brick to set the correct “Directions” for our pattern, just make sure that you choose 1 edge running parallel with the direction of the width of the brick and another one running perpendicular to this first line for the length of the brick. “Distance Type” should be set to “Spacing”. When we dial in a distance of 8mm now, all the studs will be spaced precisely 1 lego unit from each other, which is exactly what we want. The quantities in both directions match with our parameters “LENGTH” and “WIDTH”.
This is again a very good moment to try and change the parameters to make sure no mistakes were made. You might have the parameters for length and width swapped around in the pattern settings for example, which can create “flying” studs where you don’t need them and a lack of studs where you do. Make sure that everything is changing as desired before you move on to the next step.
Step 5: Adding the Features on the Inside of Our Brick
Now that the outside of the brick is finished, we can hollow it out and add the rest of the features on the inside.
This is easily achieved with the “Shell” function, you can find it under the “Modify” tab in the function browser. We just have to select the faces of our brick that we want to open up, in this case the bottom, and set the “Inside Thickness” value to 1.6mm.
Now we can add the last feature, being the hollow cylinders on the inside of the brick. For this we’ll make a sketch on the bottom plane. We draw 2 concentric circles on the bottom by going to “Sketch” > “Create Sketch” and selecting the bottom plane of the origin. Next we’ll sketch one circle “Sketch” > “Circle” > “Center Diameter Circle” and we’ll repeat this command for the second circle while making sure we select the center of the first circle as the center of the second, and this will automatically generate a constraint that will make sure both circles will stay concentric. Now we enter the dimensions of the inner circle, being 4.8mm, and outer circle, being 6.5mm. Finally we’ll add 2 dimensions of 7.9mm that will lock the center of the first of these cylinders in the correct place, regardless of what parameters we’ve chosen, much like we’ve done for the first stud on the top of the brick.
Then we can extrude this sketch upward. We’ll select “Create” > “Extrude” and select the ring shaped profile we’ve just drawn. Now we change the “Extent” option of the extrusion from “Distance” to “To Object” and we select the top side of our brick. This will make sure that the hollow cylinder always has the correct height, no matter if it’s in the “LOW” or the “HIGH” state. The last step is again creating a pattern for this feature, and this is done in exactly the same way as with the studs on the top. So we choose “Create”, “Pattern” and then “Rectangular Pattern” again. Change the “Pattern Type” to “Features” and select the extrusion we just made in the timeline history on the bottom and select the 2 side edges for the directions of our pattern. “Distance Type” should be set to “Spacing” and both distances should have a value of 1 Lego unit or 8mm. Lastly we have to set the quantities to “LENGTH” - 1 and “WIDTH” -1.
Step 6: Generate Whatever Brick You Want!
Our parametric Lego brick is now finished!
We can change the parameters again to make sure that everything is adapting well to the input changes. Be aware that there are always limits when you’re designing parametric things. So if you try to generate a brick that’s 100 by 100 Lego units, your computer might have a lot of trouble calculating this. And on the other side of the spectrum, when you try to generate a 1 by 1 brick the bottom cylinder will stay there. So if you’re generating a brick with a width of 1 unit you’re better off suppressing the extrusion of this cylinder in the timeline. This can be done by right-clicking it in the history at the bottom and choosing “Suppress”. When you generate a new brick afterwards, and you need them again you can simply “Unsuppress” this feature.
And that’s how you use Fusion 360 to make a design that allows you to generate all these different bricks immediately, just by entering 3 parameters.
Participated in the
Design For Kids Challenge