Solidworks tutorial - Robosoc-Southampton/Tutorials GitHub Wiki
Welcome to Week 3
This week we'll be focusing on how to use Solidworks, the main CAD software we use when designing our robots. For today's lesson, we'll be re-creating the basic 4x2 Lego brick, as it has a nice mix of important skills to learn when first starting with Solidworks. There's going to be quite a bit of reading, but hopefully, the pictures should help smooth things out, and as always you can ask a committee member for help if need be.
We also have a couple of Youtube videos for this tutorial, in case you prefer watching a video instead of reading, you can find it at this link!
Prep Work
Before we start, it's important to get the annoying things out of the way to avoid annoyances later in the build. When you first open Solidworks, it will ask you to open a New Document, at this point select the "Part" option and click OK. At this point go to File > Save As, and save the file anywhere you can find it easily under the name LEGO_Brick.
Now we need to make sure you are working in millimetres. Again go to the top and click the settings button (The gear icon), from there click "Document Properties" and find the "Units" section and make sure that MMGS is the one selected. If it is not, select it and press the OK button to apply the changes.
The First Sketch
Now that that's all taken care off, time to start the actual design part. In the main program, find the sketch tab around the top left and select it. Now find the Sketch Button, again top left and click that. Once you click it you it will ask you to "select a plane" to sketch on. It for this build it doesn't matter which is actually selected, but for now, select the "Front Plane" by hovering over it and clicking it when plane around it turns orange.
So the plane has been selected, now time to draw some shapes! In the command area, you'll see a bunch of different tool buttons hover over them to reveal their names. We're looking for the rectangle one. Once you've found it select it and draw a rectangle onto the screen. Once it's been drawn click the green tick mark on the right to deselect the tool.
You may notice there are different options of the same tools. They all do the same thing, but slightly different and depending on what you are doing maybe a better choice. For this job, however, it doesn't matter which is selected.
A square good and all, but we want to control its exact size, and this is where the "Smart Dimensions" tool comes in handy. Select this tool and click the top line of the square. A random number will appear, change that to 15.8mm
and press enter. Since we did the settings earlier Solidworks know you're working in millimetres. Now do the same with one of the sidelines, changing the number to 9.6mm
. Once that's done click the "Exit Sketch" button at the top left.
Congratulations, you've successfully created your first sketch.
Turning this 3D
Time to enter the next dimension! For this, we're going to head to the Features tab on the command bar. All the tools on this tab are for working with 3D shapes. The tool we want is "Extruded Boss/Base". While having your sketch selected in the bar on the left (Probably named Sketch1) select the Extrude tool. You'll now see a yellow shape of your object. On the left bar find the depth input bar and change the value to 31.8mm
. Once done either press enter or click the green tick mark at the top.
Now we have the main body of the LEGO brick
Quick Navigation Tips
Before we go any further we need to quickly talk about moving around the object in the 3D space. If you hold down the middle mouse button you'll be able to rotate around the object to view it from different angles.
You can also use the "View Orientation" to choose a solid angle to look from.
Adding to 3D Objects
Now that we have the main part, we need to add the iconic top parts to it. For this, we need to start a new sketch on top of our cube. Click on the top side of the brick, a bunch of tool buttons should appear next to the mouse. Find the button that says "Normal To" when you hover over it and click it. Now that the top is the centre focus, click the Sketch button and you'll start your second sketch.
If it asks you to select a plane again, click the red X button and repeat the above step, making sure that the top side of the brick is selected when you click Sketch
For this part, we'll need the circle tool. Once you've found it click it and draw a circle somewhere inside the rectangle.
Now time again for the best tool in Solidworks, Smart Dimensions! With this tool selected click on the circle you just made and change its diameter to 4.8mm
.
Now to fix its position, still using the Smart Dimensions tool click the circle first, then the side piece of the rectangle, this will give you the distance from the edge to the circles' centre. Change the number to 3.9mm
. Repeat this step with the top side.
This is great, however, this is only one of the 8 needed on top. We could continue on like this and do the other 8 in the same way, but that's time-consuming and boring. Instead, we'll use the "Linear Sketch Pattern" tool to speed things up.
Click on the Linear Sketch tool button and then the circle you just created. Now a bunch of yellow circles should appear near the original indicating where they'll be placed.
Depending on your orientation, the amount of X and Y copies may be different from the ones shown in the pictures. That's alright as long as you make sure that all the circles fit inside the square. For me, I have 2 as my X-axis and 4 as my Y-axis. Change the distance between them to 8mm
for both the X and Y clones. Once done hit enter and exit the sketch.
Now all there is to do is extrude these circles like we did when making the main part of the brick. While selecting your second sketch, hit the Extruded Boss/Bass tool and set the amount to 1.8mm
.
You've now completed the top part of the LEGO brick as well as learnt to add to 3D objects, good job!
Subtracting from 3D Objects
The last part of the brick we need to work on is the bottom of it, meaning we need to get rid of the excess material. Just like with the top, we need to start a new sketch. Rotate the brick till the bottom is visible and click it, again making it Normal To, then clicking the Sketch tool to start a new sketch on the bottom plane.
To start we need to create the edge of the brick. Using the rectangle tool, create 1 rectangle that follows the perimeter of the bottom of the brick, and a second one inside that one. From there use the Smart Dimensions tool to make the distance between the two rectangles 1.2mm
.
From here we need to create the circles inside the rectangle. Using the Centre Circle tool create two circles with the same centre point. Again using the Smart Dimensions tool make the smaller circle have a diameter of 4.8mm
and the larger one of 6.5mm
. We can also make sure they are placed where we want it by measuring the centre distance from the edges of the outside rectangle. For the distance the circles should be 7.9mm
from all the edges.
Now we just need to make the other 2 circles, so we'll be using our good friend the Linear Sketch Pattern tool again. Select the tool and highlight both circles by clicking on them while holding CTRL down. This time we only want 2 copies in the Y direction this time, with 8mm
apart.
With everything in place, we can exit the sketch and start the subtraction. For this part we'll be using the "Extruded Cut" tool, think of it as the opposite of the Extruded Boss/Base tool, anything highlighted will be cut out of the model.
With this tool selected, while holding down the CTRL key, click on the inside rectangle and all the inner circles.
Making sure that the cut is going into the brick, set the depth to cut to 8.4mm
.
Once you've made sure everything is measured correctly, press enter to cut the shape out.
Congratulations
Good job guys, you've made your first Solidworks shape! From here the sky's your limit. If you're feeling up for some more challenges, try recreating different types of LEGO bricks.
Solidworks, Assemble!
Now that we have the LEGO brick, let's trying building something with them. With an assembly file you can take multiple different objects you've built and put them together, similar to assembling them in real life.
To start make sure that your LEGO brick is saved. Go to File > New
and you'll be asked again about what you want to make. This time click the Assembly choice before clicking the OK button.
From here it will ask you too Insert a Component into the build. You should see the name you gave your LEGO brick on the Part/Assembly list. Click it once and then bring your mouse into the empty space, your LEGO brick should be following it. Click anywhere to place it.
Now to add the second one, to do this find the Insert Components button and click it, repeating the same steps as before to add a second brick.
Now we have two bricks to work with, we'll move onto the "Mate" tool.
With the tool selected, click on the long side of one of the LEGO bricks, then click the other long side of the second brick that you want to touch and the two pieces will slide together.
Now you can do the same with the bottom of the pieces.
At now the short side.
And BOOM you have two pieces next to each other nicely.
You can also use these tools to stack the bricks on top of each other.
There are a few different types of mates you can use as well, have a go at using the cylindrical mate, it works by aligning cylindrical shapes in line with each other, perfect for mating the tops of the bricks on top of each other.
Now that you know how to mate components, see what you can make with the LEGO bricks. (Try and beat my creation!)
Want to Learn More?
This tutorial is only the beginning of what you can do with Solidworks. If you want to learn more there are many great ways to continue developing your skills.
- Solidworks has an entire library of tutorials for all skill levels
- Tutorials on Youtube (Other then us of course)
- Random messing around and playing with Solidworks
Any of these will help you get faster and better with working in a CAD environment.
LEGO Brick Dimensions
Here is a design sheet of a typical LEGO brick. This is what we will be following through this tutorial.