The foundation of any 3D SOLIDWORKS model is a 2D sketch. This is because SOLIDWORKS builds 3D features based on the guidance of 2D sketches. This chapter will get you started with SOLIDWORKS 2D sketching. We will cover multiple sketching commands that will allow you to sketch shapes such as rectangles, triangles, circles, and ellipses. You will also learn how to combine those different sketches and create more complex shapes. Then, we will explore the different levels at which SOLIDWORKS defines a sketch. Mastering SOLIDWORKS 2D sketching is essential if we wish to build a 3D model.
The following topics will be covered in this chapter:
In this chapter, you will need to have access to SOLIDWORKS.
Check out the following video to see the code in action: https://bit.ly/3GKC1xu
In this section, we will discuss what SOLIDWORKS sketches are. We will inform you of the importance of SOLIDWORKS sketching functions and how to view them when modeling with SOLIDWORKS. SOLIDWORKS sketches are the base of each SOLIDWORKS model. Thus, it is important to master SOLIDWORKS sketching first.
Sketches are typically viewed as fast drafts of a certain shape. For example, the following diagrams show a hand-drawn sketch of a square and a sketch of a cube, respectively. The main point of these is to provide a rough idea of an object.
In this hand-drawn sketch, we are communicating the idea of a square, without specifying how big that object is:
Similarly, the following hand-drawn sketch communicates the idea of a cube, without specifying how big the cube is:
SOLIDWORKS sketches are a bit different. In SOLIDWORKS, a sketch is a fully dimensional and exact shape that's mostly given in two dimensions. SOLIDWORKS also has a 3D sketches function that is more commonly used with surface modeling. In this book, we will only use 2D sketching.
The following diagram shows a SOLIDWORKS sketch of a square with a side dimension of 50 mm. Note that the sketch is different than the one we looked at previously; it is an exact square and not an approximation of a square:
SOLIDWORKS sketches are the starting points of any 3D model. They are the basic guiding elements for 3D SOLIDWORKS features. For example, if we want to make a cube, we have to start by drawing the preceding square sketch. After that, we can extrude it to generate a cube, as shown in the following diagram.
Note that you can see our initial sketch at the bottom of the cube.
When we create a 3D shape in SOLIDWORKS, we often start by creating a 2D sketch and then apply a feature to it. Then, we keep iterating those two steps as the 3D shape becomes more complicated. This is why it is very important that we master SOLIDWORKS sketching before anything else.
The preceding diagram also shows the common sequence of a SOLIDWORKS model, starting with a sketch rather than a feature. The sequence then repeats as the model becomes more complex.
SOLIDWORKS has many ready-made commands that we can use to create simple sketch shapes such as lines, squares, circles, ellipses, arcs, and so on. We will learn about these sketching commands in this chapter. However, it is important to understand that all complex sketches are a combination of different simpler sketches.
Let's illustrate this with an example. The following figure shows a sketch of a relatively complex shape:
Note that the complex shape is made up of a combination of different simple elements. This image can be easily made with four different sketching commands: lines, arcs, circles, and slots. The following figure shows how we can break down the complex sketch into these four sketching commands. All the unmarked elements of the sketch are repetitions of the marked ones. We can refer to each of these elements (a line or an arc, for example) as a sketch entity:
Simplifying complex sketches so that they're simple elements is a skill that takes time to build. Since we've just started sketching, we may face difficulties simplifying complex sketches. This book will help you develop this skill, but you will become better at it with experience.
Now that we know what sketches are, we can start defining the elements that are involved in our sketches. We will start with sketch planes.
Sketch planes are flat surfaces that we can use as bases for our sketches. They are important because they give our sketches a solid location. If we didn't have them, our sketches would float undefined in 3D space.
SOLIDWORKS provides us with default sketch planes when we start a new part. We can find them listed in the design tree. The default sketch planes are the Front Plane, the Top Plane, and the Right Plane. They are listed in the following screenshot:
To help you visualize these default planes, imagine a box and the planes being the top, the front, and the right-hand sides of it. The following figure shows the three default planes in the shape of a box:
These three planes are not the only ones that are available to us. In addition to the default planes, we can use any other 2D straight surface as a sketch plane as well. We also have the option of creating our own planes based on different geometrical references. We will explore these possibilities later in the book. Now that we've identified our sketch planes, we can start using those planes to create our sketches.
In this section, we will discuss how to start sketching, what it means to define a sketch, and what the major geometrical relations that exist in SOLIDWORKS sketching are. These topics will be our practical introduction to getting into SOLIDWORKS sketching.
To start a sketch, we need to have a part file open. Then, we can follow these steps to get into the sketching mode:
Now that we are in the sketching mode, we can see multiple sketching commands on the command bar. This includes commands for sketching simple shapes such as lines, rectangles, circles, polygons, arcs, and others. Let's go over these commands in more detail. However, since we are already in the sketching mode, take some time to randomly click on those commands and try them out on the canvas.
There are two alternative ways to start the sketching mode, as follows:
Before we start applying these sketching commands, we will discuss what it means to define a sketch.
Now that we know how to start sketching, we will learn about what defines a sketch. Constructing a sketch will require two elements: the first is the sketch entities, such as lines, arcs, and circles, while the second is the dimensions and relations that define the sketch entities. Remember that SOLIDWORKS is a form of engineering software that aims to support the design and manufacture of products. Defining sketches ensures the design intent integration in the design. Thus, defining shapes is very important.
To define sketches, we can use dimensions and relations. Let's start by defining them:
To illustrate this, let's look at a visual comparison between two lines. One is Fully defined and one is Under defined:
Of the two preceding lines, the one on the left is fully defined while the one on the right is under-defined. The line on the left is defined as such because of the following:
These dimensions and relations are what make a sketch defined. It may not look like there's much of a difference between them when we look at the two lines, assuming that we drew them on paper. However, when we work with a computer program, we need to let the computer know everything about the line (or any other sketch entity); otherwise, it won't know what we want.
To make it easier to distinguish between fully defined and under defined sketches, SOLIDWORKS color-codes them. Black parts are fully defined, while blue parts are under defined. In addition to color-coding, SOLIDWORKS also indicates the status of our sketch below the canvas. The following screenshot shows an indication of a Fully Defined sketch. Other classifications include Under Defined and Over Defined:
Note
You can change the default color code through the settings if needed.
Sketches are defined with measurements and relations, where measurements refer to numbers and relations refer to geometrical relations. We will explore geometrical relations in the next section. Also, in the section titled Under defined, fully defined, and over defined sketches, we will be discussing those terms in more depth.
The following table summarizes the majority of the geometrical relations we will come across while working with SOLIDWORKS sketching. You don't need to memorize all of these relations for now. Simply read through the following table and use it as a reference as we continue to develop our SOLIDWORKS skills. The relations in the following table have been organized in alphabetical order. In the SOLIDWORKS interface, we will deal with these icons more and more since they will appear in the sketches themselves, as well as when we choose which relation to apply them to:
These icons and their relations will repeatedly show up as we are creating sketches. Thus, it is important that we know what they mean. We will start using these relations in the next section, that is, when we start sketching different shapes.
In this section, we will discuss the major sketching functions and how to use them. These include sketching lines, rectangles, circles, arcs, and ellipses. We will address each of these sketching commands separately and find out how to define each one.
On the canvas, you should be able to see a small red dot with arrows, as shown in the following figure. This dot is located exactly where the two red arrows meet and represent the origin point of the canvas. It is also the only defined and fixed point in our SOLIDWORKS infinite canvas:
Because it is the only fixed point, it is very important to always link our sketches to that origin point. Otherwise, our sketch will always be under-defined in the infinite canvas.
To illustrate how to sketch lines, we will sketch the following shape. Note that the sketch is fully defined, and so SOLIDWORKS will show it filled in with black after it's been sketched. Also, take note of the relations and dimensions (in millimeters) shown in the following figure:
Let's go ahead and start constructing the shown sketch. To do that, we will go through two stages: outlining and defining.
In the outlining stage, our aim will be to draw a rough outline of the final shape. Here, we will not pay much attention to dimensions or relations. We will follow these steps in the outlining stage:
In the defining stage, we will work on defining our outline with the necessary dimensions and relations to fully define our sketch. Note that some of the relations are set automatically by SOLIDWORKS, according to how we place our lines. Follow these steps for the defining stage referring to the numbers indicated in Figure 3.18:
Note
SOLIDWORKS can apply relations automatically if they can be inferred by how you sketch an entity. For example, if you try to sketch a horizontal line, SOLIDWORKS will apply the relation horizontal to the line automatically. In this case, you will see the relation listed under Existing Relations in the Line Properties.
Note
Tip
We can select multiple sketch entries at the same time by clicking and holding down Ctrl on the keyboard and selecting multiple entities.
Note
By following the preceding steps, we will have set up all the relations for our sketch. Note that many parts of the sketch are still blue. Try to click and hold different parts of the sketch, points, or lines and move the mouse around. All the sketch elements will move in a way that preserves all the relations that have been set.
Note
To delete a dimension, select it and press Delete on the keyboard. Alternatively, we can right-click on the dimension and select Delete from the options that are available.
Note the shown sketch in the exercise is shaded indicating an enclosure. You can turn this feature on and off by toggling the Shaded Sketch Contours command on the command bar, as shown in the following screenshot.
At this point, we will see that the sketch is fully black, indicating that it is fully defined. This concludes our first sketching exercise. In this simple exercise, we have covered many essential sketching features that we'll keep using when we model with SOLIDWORKS throughout this book, including the following:
These sketching commands are essential to sketching using SOLIDWORKS sketching tools. In the next section, we will use these skills to sketch rectangles and squares.
In this section, we will learn how to sketch rectangles and squares. To illustrate this, we will sketch the following diagram. We have already covered most of the concepts we'll need in order to complete the sketch, including how to get into the sketching mode and how to define a sketch. In this example, the dimensions are in IPS (inch, pound, second), where the length is in inches. Note that we coded the sketch with R1 and R2, indicating rectangles 1 and 2, and S1, indicating square 1:
To create this sketch, we will go through the same two stages that we went through previously: outlining and defining.
For outlining, we will draw an arbitrary outline of the final shape we want to draw. Let's get started:
Both commands create rectangles; the difference is how those rectangles are created. A Center Rectangle is created with two clicks: one indicating the center and the other indicating a corner. The Corner Rectangle is created with two clicks, indicating the opposing corners. Note that the small figures also show us how to draw that particular type of rectangle by showing us the sequence of clicks that are needed.
Tip
You can delete any part of the sketch by highlighting or selecting that part and pressing Delete on the keyboard. Alternatively, you can right-click and select Delete.
Tip
Since we are creating the centerline, note that we can move the line endpoint slowly at an angle until the vertical relation appears, at which point, you can lock it on that. This is one way in which SOLIDWORKS interprets the relations we want to apply and applies them for us. We can use this approach to make sketching faster.
For our defining stage, we will define the outlined shape by applying relations and dimensions. Follow these steps to do so:
At this point, we should have a fully black shape that is fully defined. Also, take note of the status of the sketch, which is shown at the bottom of the SOLIDWORKS screen. It is indicated as Fully Defined, as shown in the following screenshot:
This concludes our sketching exercise. In this simple exercise, we have covered many essential sketching features that we will capitalize on throughout our SOLIDWORKS interaction, including the following:
At this point, we already have many of the sketching basics under our belt. Now that we're advancing, we won't need as much guidance as all the commands will start becoming second nature to us. Before moving on, take the time to experiment with creating other types of rectangles, such as the 3 Point Corner Rectangle and the 3 Point Center Rectangle. In addition, take some time to experiment with creating a Parallelogram. We can find all of these shapes in the Rectangle command drop-down menu.
Now, we know how to sketch lines, rectangles, and squares. Next, we will develop our skills by addressing circles and arcs.
In this section, we will sketch circles and arcs. First, let's break down what a circle and an arc are. The following figure shows a circle. Note that a circle is defined by its Center (a point) and its Diameter:
The following figure shows an arc, as well as the elements that define it. An arc can be defined by its Center (a point), as well as other points, which indicate the endpoints of the arc. This is in addition to its Radius and various distances:
Each of these elements can be controlled with dimensions or relations. Each point can be understood as a standalone entity that we can use for relations or dimensions.
To illustrate these two commands, we will sketch the following shape:
Similar to what we did previously, we will do outlining and then defining. We will start with the outlining stage, as follows:
Now that we've finished outlining, we can start defining the sketch elements in the defining stage. Let's get started:
This concludes this exercise of using circles and arcs. At this point, our sketch is fully defined. Before moving on, take some time to individually experiment with creating a Perimeter Circle, a Tangent Arc, and a 3 Point Arc. These are some other ways we can create circles and arcs that we did not explore in this exercise. However, all these commands follow the same principles when it comes to making circles and arcs. Now that we've mastered how to create circles and arcs, we will address ellipses and construction lines.
In this section, we will discuss what ellipses are, how to define them, and how to make them in SOLIDWORKS. We will also touch on the idea of construction lines. We can look at an ellipse as a combination of two axes and five points, as shown in the following figure:
When we define an ellipse in SOLIDWORKS, we can use the four points and the center as our defining factors. We can also define an ellipse with the help of construction lines, which we can use to define the size and the location of the ellipse. To illustrate this, we will sketch the following ellipse:
Similar to all our other exercises, we will sketch the ellipse in two stages: outlining and then defining. Let's start with our outlining stage:
As usual, now that we've finished our shape outline, we can start our definition stage:
Alternatively, we can sketch normal lines and turn them into construction lines. Do that by clicking on the normal line or any other sketch entity and checking For construction from the Options tab that appears on the left.
This concludes this exercise on creating an ellipse. In this exercise, we covered how to draw and define an ellipse, and what construction lines are and how to utilize them to define our sketches.
In the exercise, we defined construction lines using the Line Properties. However, you can also sketch one directly using the drop-down menu for the Line command and selecting Centerline as shown in the following figure.
Both ellipses and construction lines will be very useful as we advance our SOLIDWORKS skills. Now, we will look at the fillets and chamfers commands so that we can improve our sketching skillset further.
In this section, we will discuss making fillets and chamfers for our sketches. Fillets and chamfers can be applied between two sketch entities, usually between two lines. They are defined as follows:
The following figure illustrates the shapes of fillets and chamfers, as well as how they are defined:
To illustrate how to create fillets and chamfers, we will sketch what's shown in the following figure:
Fillets and chamfers are different than other sketching commands in that we will apply and define them at the same time. Thus, they won't follow our typical procedure of outlining and then defining. To create the sketch, we will use the IPS measurement system. To achieve the preceding sketch, we will need to sketch a 4 x 2-inch rectangle, which will be our starting point. Note that we marked the different lines with the letter L and marked the different vertices with the letter V for ease of reference:
Now, we can start creating the fillet, as follows:
Tip
Press Ctrl + Z to undo the fillet you've applied.
Now that we've sketched the fillet, we will move on to sketching the chamfer:
Tip
If you apply the wrong chamfer, you can click on the Undo button. Alternatively, you can press Ctrl + Z on your keyboard.
This concludes how to create fillets and chamfers. In this exercise, we learned what fillets and chamfers are and what defines them, and how to create fillets and chamfers in SOLIDWORKS sketching mode.
Now we know how to use all the major basic sketching commands. You will use these commands over and over again when working with the software. Now, we will dig deeper into what the different types of definition statuses mean, that is, under defined, fully defined, and over defined.
SOLIDWORKS sketches can fall under three status categories according to how they are defined. They can be under defined, fully defined, or over defined. These terms have already been mentioned briefly, but in this section, we will explore what those statuses are, as well as some ways to deal with them. We will explore these different statuses by drawing and defining a triangle that's under defined so that it becomes over defined.
Usually, the starting point of a sketch is under defined. Under defined sketches have parts of them that are loose or lack proper definition; for example, a line without a specific length. To find out more about under defined sketches, we'll examine the following sketch. We will use the MMGS measurement system for this exercise. We have indicated the lines and points with the letters L and P for reference:
Take some time to sketch the preceding sketch and examine it. From this sketch, we can see the following:
We will always try to make our sketches fully defined. To fully define a sketch, we can simply add more dimensions and/or relations to turn the blue parts black.
To find out which parts of the sketch need definition, we can click and hold on any of the blue parts and move them. The resulting movement tells us which parts need definition. For example, if we hold and move P2 left and right, we will notice that L1 changes in length. This indicates that we can define P2 by setting a dimension for L1 (or between P1 and P2), as shown in the following figure. After defining the length, we will notice more lines turned black. Now, if we click on P2 and try to move it, it will be fixed:
We can do the same movement test for L3 and P3 and decide what elements of the sketch we can define further.
Fully defined sketches are where all of the parts of the sketch are fully fixed. In other words, no part of the sketch can be moved from its current position. To illustrate this, we will take another look at the sketch we started and fully define it. We will do this by adding an angle of 45 between L1 and L3. The fully defined result is as follows:
Note that the sketch is now fully black on your screen. Also, if you hold and try to move any of the sketch parts, they will not move because they are fully restrained. When the sketch is Fully Defined, SOLIDWORKS will take note of this at the bottom of the interface. Remember that we fully defined a sketch by adding relations and dimensions until all the sketch elements were fixed:
When sketching with SOLIDWORKS, we will mostly try to make our sketches fully defined in order to capture our full design intent. Now, let's look at over defined sketches.
Over defined sketches are those with more relations and dimensions than are needed for the sketch elements to be fully fixed. This is not a recommended status to have for a sketch. Over defined sketches occur when we apply contradicting relations to define a particular part of a sketch. To illustrate this, we can add an extra dimension to L2. Once we do that, we will get the following message:
Let's examine these two options and their results:
Keep in mind that the best practice is to have our sketches fully defined to ensure that we are fully capturing the design intent of our sketch.
All the definition statuses are related to how many relations and dimensions we add to our sketch. A fully defined sketch has all the sketch elements fully fixed with the proper number of relations and dimensions to fully capture the design's intent. Under defined sketches have fewer relations than they require, and over defined sketches have more relations than needed.
In this chapter, we learned about the different aspects of SOLIDWORKS sketching that form our sketching foundations. We learned what sketching is and how to sketch different sketching elements, including lines, rectangles, circles, arcs, ellipses, fillets, and chamfers. We also covered using dimensions and relations to define sketches, as well as the meaning of the different sketch definition statuses, that is, under defined, fully defined, and over defined.
All of this information is part of our sketching foundation, which we will use every time we build a 3D model with SOLIDWORKS. In the next chapter, we will address additional sketching commands that can greatly enhance our sketching performance and speed, such as patterns and mirrors.
Answer the following questions to test your knowledge of this chapter:
Important Note
The answers to the preceding questions can be found at the end of this book.