Вы находитесь на странице: 1из 27

Engineering 2

Tutorial 1

Building A Parametric Model: A Spur Gear

2002-2006 Dale Gipson All Rights Reserved

Gear 1
In this tutorial, we learn techniques for creating a parametric design. Parametric means that the design is controlled by parameters, such as dimensions. Dimensions can control the shape of a part or assembly, not just report its size. This is a big difference over other types of CAD systems. Why make a model parametric? Because in real-world designs, we do not create just one version of a part. The very design process itself involves making changes, trying out different approaches. And it is a lot easier to create shapes when we can change the shape later by changing dimensions, instead of having to redraw the part. To learn parametric design techniques, we will create a simple gear in a series of steps. The gear model will be parametric, as demonstrated by its ability to create more than one gear from the same model. Thus one of the parameters is the number of teeth in the gear. The first step is to draw a sketch that details the main geometry of the gear as seen from one angle. Then we will create a sketch that shows how it should look from a side angle. The idea is that the resultant part should conform to, and be controlled by both sketches.

The purpose of building these reference geometry sketches is to have a small number of places where the overall shape is defined. This makes it easier to make changes later.

Step 1- Create Front-View Reference Geometry


We start by creating a new part, and opening a sketch on plane P Front. Draw 3 concentric circles, centered on the Origin. The outer circle will be the diameter of the gear, the middle circle the diameter of the hub, and the center circle the diameter of the shaft hole. Because the dimensions will control the size of the circles, it is only necessary to draw them at a rough approximation of their size, then dimension them. Dimension as shown below. Be sure that the documents units are in inches!

Next, add a rectangular keyway slot on the center shaft hole, and a single tapered tooth at the top, as shown below. Include the centerlines as shown, and trim them to the circles.

Note that the keyway and tooth are symmetric and centered on the Origin. How is this done? (Hint: note the centerlines on each.)

Set the Angle of the tooth taper at 14 degrees. Dimension the tooth as .05 high and .05 wide. Dimension the keyway as 1/32 high and 1/32 wide as shown below. Set the heights by dimensioning the centerlines.

Close the sketch. Very Important: Do not close the part! Change the default name of the sketch to RG F, for Reference Geometry, Front Side. Note: it is important to name your sketches and features. While it will not affect how SolidWorks builds your model, it will be a huge help when things go wrong, as they absolutely will, and you need to trace down a problem. Checking the Sketch Relations of a sketch becomes a nightmare when everything is labeled Sketch 1, Sketch 2, etc. We will associate sketches with the features they control. Since no two items may have the same name, we cannot have a sketch called Foo and a feature Foo too. So we add a prefix to our sketch names, as follows: RG Foo F GS Foo Reference Geometry for feature Foo, Front View-(Used by other sketches) Geometry Sketch for feature Foo-(Actually used to create the feature)

Step 2- Create Right-View Reference Geometry


We have created reference geometry outlining the part as seen from the Front view. We will now create a second reference sketch outlining the part as seen from the Right side view. Together, these two sketches will give us a 3-Dimensional wireframe of the model. Open a new sketch on plane P Right. Draw one tall rectangle that represents the gear as seen from the side, and a second 3-sided rectangle that represents the gear hub as seen from the side. Use a centerline coincident with the part origin to make the lines symmetric. Notice that one rectangle is on one side of the part Origin, the other on the other. Dimension as shown. You should get the following result:

Now in order to make the model parametric, we wish to have the geometry of the first sketch control the heights of the boxes. What we want to do is to make the points of the corners of the larger box pierce the corresponding points on the original drawing RG F. To do this, rotate the view to isometric (Ctrl-7) so that you can see both sketches at the same time, as shown below:

Now use Add Relations to make the point of the rectangle on the corner pierce the outer circle of the first sketch. Bring up the dialog by clicking on the Add Relations toolbar button, or select Tools / Relations / Add from the menu, and choose pierce. The line should turn black as shown below. Now do the same with the other lines, until all lines turn black, as shown below.

Close the sketch. Rename the sketch to RG R for Reference Geometry, Right Side. Hide sketch RG F by right-clicking on its icon in the Feature Manager, and selecting Hide.

Step 3- Primary Extrusions.


To create the main gear face, we have several approaches that would all work. One way that we will not use would be to extrude a circle up from plane P Front to the correct thickness, as shown below:

Another way, the one we will use here, is to create a revolved boss of a cross-section. In this particular model, the revolved boss is not the easiest way, but as you will see later, will allow us to make changes easier later on. Open a new sketch on P Right. Rotate view Normal To the sketch using the toolbar button. (Or you can use Ctrl-8.) Right-click on one edge of the right-most rectangle from the sketch RG R, and choose Select Chain from the menu. Notice that the entire rectangle is highlighted. Project the rectangle from the original sketch into the current sketch using Convert Entities. To do this, click on the Convert Entities button on the toolbar, or Tools / Sketch Tools / Convert Entities. The rectangle should turn black. Select the centerline and project it too, using Convert Entities, as shown below:

Hide sketch RG R, so that you only see the converted lines. Now trim off the bottom rectangle and the right side of the line using the Trim tool , so that you are left with a single rectangle at the top. This rectangle should be a half-cross-section of the gear face, as shown below left:

Now draw a new horizontal centerline from the lower left-hand corner of the rectangle, towards the left, as shown above right: This centerline is necessary to define the axis of the revolve. Rotate the view to isometric using the toolbar button, or Ctrl-7. Finally, create the revolved solid of the gear face, by clicking on the Revolved Boss/Base button on the toolbar, or Insert/Base/Revolve. You should see a big blue cylinder. Make sure the settings are One Direction, and 360 degrees. Click OK. Re-name the feature in the Feature Manager tree Base, and its rename its associated sketch GS Base

Now extrude the gear hub. We will create it as a simple extrude of a circle. Open a new sketch on P Front. Rotate view Normal To. Show both sketches RG F again, and select the middle circle. Convert Entities, then hide sketch RG F again. You should now see a single black circle. Now show sketch RG R again. Rotate the view to isometric using the toolbar button, or Ctrl-7. Now extrude the hub, using the Extruded Boss/Base. feature. The default for extrude will be a Blind extrusion as shown in the preview below.

Instead, click on the top left corner of the left-most rectangle, as shown below.

Notice that the preview cylinder changed size, and now its Direction 1 thickness shows Up To Vertex and is controlled by sketch RG R. Click Ok. Hide sketch RG R. Name the feature Hub, and its associated sketch GS Hub After extruding, your model should like the solid body shown below.

Save the file as Gear 1.

Step 4-Add The Tooth


We now need to create the teeth. To do this, we will need to define the tooth shape, then create a single tooth. Once we have one tooth, we can replicate the tooth to create the others. Open a new sketch on P Front. Rotate the view Normal To. Show sketch RG F. Right-click on one edge of the tooth, (the small trapezoid at the top of the circle), then select Select Chain. Convert Entities. Click on the outer circle, and Convert Entities. Trim the circle under the tooth, so there is only one contour. Hide RG F.

Fillet the four edges of the tooth, with a fillet radius of .010, as shown above center. Now make the outer circle a construction line, by selecting it and clicking the Construction Geometry toolbar button, or checking the For construction checkbox in the Properties dialog on the left. Finally, draw a line between the two fillet endpoints of the tooth that touch the circle. Be careful not to drag the line out horizontally, but rather at a slight angle. Then turn off the line tool, and drag the end point to be coincident with the endpoint of the other fillet, as shown above right. If you drag the line horizontally, you may get an The sketch is over defined error, and will have to delete the Horizontal relation. Rename the current sketch to GS Tooth.

Show sketch RG R again. Rotate to Isometric. Now Extrude, in the same manner as we did the Hub feature, except select the top right corner of the right-most rectangle in RG R. Then hide sketch RG R. Name the feature Tooth

Save the file.

Step 5-Copy The Teeth


We will now copy the single tooth in a circular pattern, to produce the remaining teeth. To make a circular pattern, we need a axis around which to rotate a feature. Turn on Temporary Axes from the menu via View / Temporary Axes. You should see a blue line at the center axis. Select the Tooth feature in the Feature Manager, and Ctrl-click the temporary axis in the center of the hub (multiple-selection). Then click on the Circular Pattern icon on the toolbar, or Insert / Pattern/Mirror / Circular Pattern. In the Property Manager, make sure that Equal spacing is checked, and the pattern is for 360.00 degrees. Change the default number of 2 to 20. Notice that the preview shows all 20 teeth.

Click OK. Rename the feature from CirPattern1 to 20 Tooth. Turn off the Temporary Axes.

Step 6-Cut The Bore Hole And Keyway.


Now we need to add the bore and keyway to the gear, but as separate features. (Why?) Show sketch RG F. Open a new sketch, on plane P Front. Rotate the view Normal To. Select the innermost circle, and do a Convert Entities. Do an Extruded Cut, and select Through All for Direction 1. Check the checkbox for Direction 2, and then make sure it is set to Through All as well. Click OK. Name the feature Bore Hole. Also, name the sketch GS Bore Hole Open a second sketch, on plane P Front. Zoom in on the part of the sketch for the keyway (the small rectangle on the inner circle) and right-click on one edge of the rectangle. Select Select Chain, then Convert Entities. Close the bottom of the box with a line. Do an Extruded Cut, Through All in both directions.

Name the feature Keyway, and its sketch GS Keyway Hide sketch RG F. Save the file.

Step 7-Making It Parametric: Adding Configurations


We have a gear, but now we wish to make it parametric. By that, we mean that its dimensions control its shape and size. This means that this model will have the ability to be modified, and yet remain in a way that retains the original design intent. The design intent is up to the designer. For gears, it would seem reasonable that the first way that we would wish to change the design is to add or remove teeth, change hub diameters, bore sizes, and the like. But it must still look and act like a gear when we have finished the modifications. The first logical modification is to change the number of teeth. We currently have a 20tooth spur gear. Lets make a 14-tooth version of the same gear. The first step is to add a configuration. SolidWorks supports the concept of configurations, which are separately-maintained versions of the model. Each configuration can have its own dimensions, and even private features. For example, some gears may not have keyways, other may not have hubs. To add a configuration to the part, switch the Property Manager to the Configuration Manager. Do this by clicking on the Configuration Manager tab on the top left of the Property Manager, which is the third on to the right. Right-click on the Gear1 Configuration(s) icon at the top of the tree, and select Add Configuration. In the Configuration Name field, enter 14 Tooth. Click OK. We now have two configurations. To keep things clear, rename the original configuration by slowly double-clicking on the Default icon, and typing in 20 Tooth as the new configuration name. Alternatively, select Default and press the F2 key. Double-click on the 14 Tooth configuration to make it the current configuration.

Switch the Property Manager back to the build tree, by clicking on its tab at the top of the Property Manager, which is the left-most of the three tabs. Now lets make a 14-tooth gear. Note: There is an easier way to do to make different patterned configurations (see step 12). But the following steps will introduce the techniques that are normally used to manipulate multiple configurations. So although there is a better way in this case, the techniques are important. Right-click on the feature named 20 Tooth, and select Suppress from the menu. Notice all but one of the teeth disappear. Now roll-back the build tree by dragging the yellow bar of the bottom of the tree window up until it is just above the 20 Tooth feature, as shown below. Notice that the bore hole and keyway disappear.

Now make a new feature, called 14 Tooth, that contains 14 teeth instead of 20. Make the feature exactly the same way that you made the 20 Tooth feature. (Review the steps of the 20 Tooth feature, if you need to.) Now Roll-Forward the build tree by dragging the bottom back all the way back down, or by right-clicking in the Feature Manager tree area, and selecting Roll to End. The gear re-builds, only this time with 14 teeth instead of 20, as shown below:

Save the File. Notice that we can switch between 14 teeth and 20 teeth, just by double-clicking on the associated configuration in the Configuration Manager. Try it. Go to the Configuration Manager and double-click the two configurations back and forth. Leave it on the 14 Tooth configuration.

Step 8-Deciding How To Calculate Gear Diameters


If we look at the gear we have so far, it is fairly obvious that the tooth spacing is a bit wide for the number of teeth. It is incorrect for the 20 Tooth configuration, but is especially noticeable in the 14 Tooth configuration. We need to determine a precise answer. Look at sketch RG F. How do we change the spacing between the teeth? By changing the diameter of the gear? (Why?) Is it clear they are related to another? What we want is for the diameter to be correct for the number of teeth. How can we calculate that? Before we can make the diameter be based upon the number of teeth, we need to figure out the relationship between the two. To get a hint at the relationship, we could draw a temporary sketch, that shows the teeth meshing, and then study it. The sketch might look something like this:

Hint: This might suggest that the spacing between the teeth is pretty close to the width of the top of the tooth.

Step 9-Making The Gear Diameters Configuration-Specific


Obviously, the 14-tooth gear needs to have a smaller diameter. Lets experiment with the diameter, and find one that looks not too far off. Open sketch RG F by Right-clicking on its icon, and choosing Edit Sketch. Rotate view Normal To. To try to fix this, we will make the diameter of the circle configuration-specific. That is, it has a different value for each configuration. Double-click on the gear diameter dimension, the one that has the value 1.000, and change the drop-down from All Configurations to This Configuration. Change the value from 1.000 to .75, and click OK. Exit the sketch, which will cause it to rebuild.

This looks considerably better, but the spacing is still too wide. If you switch back and forth between the two configurations, you will see that they now have two different diameters. Note that we can make the hub diameter, keyway and bore diameters all configuration-specific in exactly the same way, by modifying their dimensions. We can control the diameter in a configuration-specific way, but we still do not have a precise set of values. There is some relationship between tooth spacing and the number of teeth, and the resultant diameter. We need to determine what that relationship should be. There are two relationships to explore here: 1) the relationship between tooth spacing and diameter, and (2) the relationship between number of teeth and diameter.

Often, when you cannot find a solution, it can help to draw some geometry to help you study the problem. The best way to visualize the way in which the tooth spacing affects diameter is to draw a second adjacent tooth, and see if this suggests anything. Edit the sketch RG F. Draw in a centerline, starting from the outer circle on one side of the tooth, going outward, but not vertical. Make it coincident with the center of the outer circle, as shown below left. This line will be a radial line, that is, if you drag it around, it rotates around the center of the circle. Make that line equal in length to the centerline of the tooth. Make the vertical centerline of the tooth non-construction geometry, using the Construction Geometry button.

Select the tooth and its (now solid) centerline, and also the radial centerline. Click on the Mirror icon to mirror the tooth around the centerline, as shown above right. Notice that you can drag this new tooth around the circle. So, if we could set the distance at the between the teeth, we can define how gear will look at that diameter. It should be a small step to use the spacing to set the diameter. Drag a line between the right side of the base of the original tooth, and the left side of the base of the new mirrored tooth. How long should this line be? Take another look at the mesh drawing above. Make the length of the tooth spacing line equal to what it should be the same as. (Hint: take another look at the tooth-mesh drawing at the beginning of Step 9.)

Notice that the sketch locked, that is everything turned black as shown below. Make the old tooth centerline, and all of the new lines construction geometry. Exit the sketch.

Save the file. Show sketch RG F. This will show the teeth at the same time as the sketch. Now notice that this new calculated tooth does not line up with the one that is actually generated. This is because the new tooth has the correct spacing, and the generated tooth is too widely spaced. So we need to get the generated tooth to match the calculated one.

Edit sketch RG F again. Right-click on the dimension of the outer circle (will have a value of .750), and choose Driven from the menu. This converts the dimension from controlling (driving) the diameter of the circle, to merely reporting it (being driven). Notice that the circle and the teeth turn blue. This is because their locations are no longer fixed. Select one corner of the new tooth, and drag it gently side to side. As you do this, what happens to the diameter of the circle? Notice that what is happening is that the angle of the centerline of the new tooth changes with respect to that of the original tooth. From this information, it should be clear that the diameter of the circle is a function of the angle of its teeth, when the spacing is constant. From this, you should be able to deduce how to set the exact, correct diameter for a given number of teeth.

Step 10-Making The Gear Diameters Exact

Assignment:
Modify the original RG F sketch so that the diameter of the gear is a function of the number of teeth. Do this so that the dimension is configuration-specific. Hint 1: Is the angle between any two adjacent teeth in a 20-tooth gear the same as in a 14-tooth gear? (Remember what happened when you dragged the new tooth.) Hint 2: If there are 360 degrees in a circle, and you have 14 teeth, how many degrees does each tooth and its adjoining space use? Hint 3:This is about geometry. The solution should be a formula or equation. In other words, do not use a calculator and hard-wire the dimension. Do not guess. With the correct solution, you should be able to absolutely define the diameter given the number of teeth. Done correctly, the positions of the teeth in RG F line up with the actual tooth positions:

And the finished 20-tooth and 14-tooth gear configurations should look like:

Hide RG F. Note that the configuration specific requirement is achieved by making your settings different for the two different configurations. (See the discussion on how to make dimensions configuration-specific, at the beginning of Step 10.) Make the 14 Tooth configuration the current one, and then save the part.

Step 11-Use Of Equations


The purpose of this final step is to demonstrate one of the most important aspects of parametric design: the ability to retrofit a model to allow a more sophisticated use of it. In this case, we will generalize the model to so that it can make a wide range of gears. From here, it should be obvious how to create gears of any arbitrary number of teeth, except for one minor nuisance. Each new gear instance would have to have a Circular Pattern feature of its own, to hold its specific number of teeth. In order to make the spur gear fully parametric, we need to have only one place where we set the number of teeth. The logical place is to set the value in the circular pattern feature. To make this work, we will use a powerful feature in SolidWorks, called equations. While all geometry relations in SolidWorks are in essence equations under the hood, the equations feature allows us to define equations, such as formulae, that work across sketches. And, most importantly, it allows us to define equations that forward-reference other features in the Feature Manager tree. The first step is to delete the 20 Tooth feature (not configuration!) in the Feature Manager, and rename the 14 Tooth feature to just Teeth. This is because when we are done, all teeth will be defined by that one feature. Switch configurations to the 20 Tooth configuration. Notice that all but one of the teeth disappeared. This is because the Teeth feature was originally suppressed in the 20 Tooth configuration. Unsuppress the Teeth feature by right-clicking on the feature icon, and choosing Unsuppress. Now the teeth reappear, but the number is wrong. The diameter is correct for 20 teeth, but there are only 14. So we are going to build an equation that sets the angle dimension value in RG F, from the number of teeth defined in the Teeth feature, which is much further down in the build tree. (Note that the Teeth feature is currently set to 14.) Rotate the view to Front view, and double-click on the RG F icon in the build tree. This will display all of the dimensions and sketch lines in RG F. Now push the Zoom To Fit button.

Start the Equation Editor, by clicking on the Equations button, . If this button is not visible, right-click in an empty section of the toolbars at the top of the SolidWorks window, and make sure that the Tools toolbar is checked. Then launch the Equation Editor. Equations allow us to define dimensions based upon a formula. They set the values of dimensions, which have names. We do not know the names that SolidWorks picked for the dimensions (unless we name them ourselves.) But we do not actually need to know them, because we can just select them with the mouse, and let SolidWorks do the work. Click on the dimension of the angle of the teeth, which is shown as 18.00 in the current model. It should highlight. Now click on the Add button in the Equations editor.

Notice that SolidWorks fills in the name (in quotes) of the dimension followed by an equal sign, as the left side of the equation. (In your model, it may not be D9@RG F, it might have a slightly different number.) Type in 360/ as the start of the right side of the equation.s

Now we need to pick up the number of teeth from the Teeth feature. First, clear the selection of RG F, by clicking somewhere in the unused area in the window pane. The window should only show the gear (which in Front view might be next to invisible!) Then double-click the icon of the Teeth feature. (You may have to drag the New Equation dialog out of the way.

Notice that SolidWorks displays two numbers, which are the two main parameters to the Circular Pattern feature. The first is the number of degrees of the pattern (360), and the second is the number of patterned features (14). Since we are in the 20 Tooth configuration, 14 is not the right number. But we are not concerned about this, because we are setting up a general equation, and are only interested in the reference to the number of teeth, not its value.

Click on the 14 value, and the New Equation dialog should add the number of teeth:

The final equation then looks something like: "D9@RG F" = 360/"D1@Teeth" Click OK on the Add Equation dialog, and OK again on the Equations dialog. Now the diameter of the gear should be a function of the number of teeth. Press the Rebuild button. Rotate the view to isometric, and click if necessary to clear the dimension values. The gear should be a correctly-formed 14-tooth gear. The final step is to make it a 20-tooth gear again. Double-click on the Teeth feature again, which will display the two dimension values. Then double-click on the 14 value. This will bring up the Modify dialog. Click on the drop-down and change All Configurations to This Configuration Now change the value 14 to 20. Click the OK checkmark button, and notice that the value becomes 20 when the dialog closes.

Click on the rebuild button again.

The gear rebuilds, with 20 teeth this time, and at the correct diameter. Save. Just to check, try switching back and forth between the 20 Tooth configuration and the 14 Tooth configuration. Notice that everything works correctly. In summary, we learned how to evolve a design. We first built a simple gear, then made changes to make the model more general. Had we known exactly what we intended to do from the start, we would probably not have done it one way and then changed it, but would have built the final design directly. But the point is that we do not need to know the final design before we start. Designs evolve. The purpose of this tutorial was to show how to work in a way that can account for inevitable changes. This design will evolve further in the next tutorials. You are done with the first version. Congratulations!

Вам также может понравиться