Tutorial: Using Parametrics in Sketches

What separates parametric CAD tools from simple 2D drawing programs is the intelligence that you can build in to a parametric sketch. In this tutorial, you learn some of the power that parametrics can provide in both structured (using actual dimensions) and unstructured (just dragging the geometry with the mouse) changes.

1. Open a new SolidWorks document by clicking the New toolbar button or by choosing File ➪ New.

2. From the list of templates, select a new part template, either inch or millimeter.

3. Press the Spacebar on the keyboard to open the View Orientation dialog box, and double-click the Front view.

4. Right-click the Front plane in the FeatureManager, or whatever the first plane listed is, and select Sketch.

5. Click the View menu, and make sure the Sketch Relations item is depressed. This shows small icons on the screen to indicate when parametric relations are created between sketch entities.

6. Click the Circle from the Sketch toolbar (choose Tools ➪ Sketch Entities ➪ Circle).

7. Sketch a circle centered on the Origin. With the Circle tool activated, click the cursor at the Origin in the graphics area. The Origin is the asterisk at the intersection of the long vertical red arrow and the short horizontal red arrow. After clicking the first point, which represents the center of the circle, move the cursor away from the Origin, and click again, which will establish the radius of the circle. (You can also click and drag between the circle center and the radius if you prefer). Figure 1.29 shows the result.

8. Deactivate the circle by clicking its toolbar icon or pressing the Esc key on the keyboard. Now click and hold the cursor on the circle, then drag it to change the size of the circle. The center of the circle is locked to the Origin as the Coincident icon near the Origin appears. The radius is undefined, so it can be dragged by the cursor. If the centerpoint were not defined, the location of the center of the circle could also be dragged.

9. Activate the 3 pt Corner Rectangle. To find it through a menu, choose Tools ➪ Sketch Entities ➪ 3pt Corner Rectangle.

10. Click the first point inside the circle, click the second point outside the circle, and click the third point such that one end of the rectangle is completely inside the circle. Use Figure 1.30 as a reference. Avoid making any two points vertical or horizontal from one another. You will learn in Chapter 3 about how to control automatic relations in more detail.

Using Parametrics in Sketches

FIGURE 1.30 Sketching a three-point rectangle

11. Activate the Centerline tool by choosing Tools ➪ Sketch Entities ➪ Centerline. Click and hold the left mouse button first at the Origin, then at the midpoint of the far end of the rectangle release the mouse button, as shown in Figure 1.31. When the cursor gets close to the midpoint of the end of the rectangle, it snaps into place. Press Esc to turn off the Centerline tool.

12. Select the centerline and Ctrl+select the line with which it shares the midpoint relation. After making the second selection, do not move the cursor, and you will see a set of options in a pop-up context toolbar. Click the Make Perpendicular icon, as shown in Figure 1.32, and the rectangle becomes symmetric about the centerline.

Using Parametrics in Sketches_1

FIGURE 1.31 Creating a midpoint relation between a centerline and a line

Using Parametrics in Sketches_2

FIGURE 1.32 Making the rectangle symmetric about the centerline

13. Drag one of the corners of the rectangle from inside the circle and drop it on the circumference of the circle itself. The point here is that you want the corner of the circle to be right on the circle always. A coincident relation is created by the drag-and-drop action. Now when you move either the circle or the rectangle, the other may change in size. Try dragging the circle itself, a corner point of the rectangle, or a line of the rectangle. Try dragging the centerline and the free endpoint of the centerline. Notice that the result of moving each different sketch entity is different from any of the others.

14. Click the Smart Dimension tool in the Sketch toolbar or choose Tools ➪ Dimensions ➪ Smart. Click the outside end line of the rectangle, and move the cursor away from the line. You can align the dimension one of three ways: measuring the horizontal dimension of the line, the vertical dimension, or the dimension aligned with the angle of the line. When the dimension is aligned with the angle, as shown in Figure 1.33, click the RMB. This locks in that orientation, and enables you to select a location for the dimension without affecting its orientation. Click to place the dimension. If the dimension does not automatically give you the opportunity to change the dimension, double-click the dimension and change it to 0.5 inch or 12 mm. If this is larger than the diameter of the circle, notice that the circle changes to accommodate the new width.

Using Parametrics in Sketches_3

FIGURE 1.33 Placing a dimension on an angled line

15. Drag the endpoint of the centerline around the center of the circle to see how the sketch reacts. Notice that the dimension added to the rectangle keeps it a constant width and makes it react more predictably.

16. Put a dimension on the circle. Click the circumference of the circle with the Smart Dimension tool, and then place the dimension anywhere on the screen without clicking any other geometry. Notice that diameter values of less than the dimension created in Step 14 cause errors. This makes geometrical sense. Change the diameter value to 1 inch or 25 mm.

17. Drag the endpoint of the centerline again. Notice that as you define more sizes and relationships between sketch entities, the motion of the sketch as you drag becomes more constrained and predictable.

18. Activate the Smart Dimension tool again. Click the Top plane from the FeatureManager and then click the centerline. This creates an angle dimension. Position the angle dimension and change its value to 60 degrees, as shown in Figure 1.34.

Using Parametrics in Sketches_4

FIGURE 1.34 Creating an angle dimension

19. Double-click any dimension and use either the up and down arrows to the right of it or the scroll wheel below it to change the value, as shown in Figure 1.35. Notice that not all values of all dimensions produce valid results. Also, notice that the entire sketch is black except for the outer end of the rectangle, which is now blue. This is the only thing you can now drag.

Using Parametrics in Sketches_5

FIGURE 1.35: Using arrows or scroll wheel to change dimension values

There are no comments yet, add one below.

Leave a Comment

Your email address will not be published.