1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Wiley SolidWorks 2009 Bible Part 5 pot

80 207 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 80
Dung lượng 2,57 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Figure 8.7 shows a pattern that cannot be created using the Geometry Pattern option.. Figure 8.8 shows an example of the Pattern Faces option working with a Circular Pattern feature... A

Trang 3

Mirroring in a sketch is a completely different matter from patterning in a sketch It offers superior performance, and the interface is better developed Mirrored entities in a sketch are an instrumen-tal part of establishing design intent

Two methods of mirroring items in a sketch are discussed here, along with a method to make ties work as if they have been mirrored when in fact they were manually drawn

enti-Mirror Entities

Mirror Entities works by selecting the entities that you want to mirror along with a single line, and clicking the Mirror Entities button on the Sketch toolbar It is a simple and effective tool that you can use on existing geometry This method is the fastest way to use the tool but there are other methods You can preselect or post select, using a dialog box to select the mirror line, which does not need to be a centerline

center-One feature of Mirror Entities may sometimes cause unexpected results For example, in some ations, Mirror Entities will mirror a line or an arc and merge the new element with the old one across the centerline This happens in situations where the mirror and the original form a single line or a single arc SolidWorks may delete certain relations and dimensions in these situations

situ-Dynamic Mirror

As the name suggests, Dynamic Mirror mirrors sketch entities as they are created You can activate it

by selecting a centerline and clicking the button on the Sketch toolbar Dynamic Mirror is not on the toolbar by default; you need to select Tools ➪ Customize ➪ Commands to add it to the toolbar You can also access Dynamic Mirror through the menus at Tools ➪ Sketch Tools ➪ Dynamic Mirror.When you activate this function, the centerline displays with hatch marks on the ends and remains active until you turn it off or exit the sketch Figure 8.5 shows the centerline with hatch marks

FIGURE 8.5

The Dynamic Mirror centerline with hatch marks

Trang 4

Symmetry sketch relation

I have covered the Symmetry sketch relation in previous chapters on sketching, but I mention it here because it offers you a manual way to mirror sketch entities There are editing situations when you may not want to create new geometry, but instead use existing entities with new relations

driving them To create the Symmetry sketch relation, you must have two similar items (such as lines or endpoints) and a centerline selected

Mirroring in 3D sketches

Chapter 31 deals with 3D sketches in more detail, but I discuss the mirror functionality here to connect it with the rest of the mirroring and patterning topics 3D sketches can contain planes and

if you are sketching on a plane in a 3D sketch, you can mirror items on it You cannot mirror

general 3D sketch entities

Sketch patterns are also unavailable in the 3D sketch, but starting with the 2009 release, you can use the Move, Rotate, and Copy sketch tools on planes in 3D sketches Combining one questionable

functionality (3D sketches) with another (sketch patterns) does not usually improve either one

Geometry Pattern

The SolidWorks Help file says that the Geometry Pattern option in feature patterns results in a

faster pattern because it does not pattern the parametric relations This claim is valid only when there is an end condition on the patterned feature such that the feature will actually pattern the end condition’s parametric behavior The part shown in Figure 8.6 falls into this category The

improved rebuild time goes from 30 to 11 seconds Although a 60 percent reduction is cant, the most compelling argument for the use of the Geometry Pattern is to avoid the effect of patterning the end-condition parametrics

signifi-Because of this speed differential, you need to be careful about using the Geometry Pattern option SolidWorks turns this option on by default for some patterns where you may not wish to use it for rebuild time reasons

Under some conditions, Geometry Pattern will not work One example is any time a patterned face merges with an unpatterned face These situations can be difficult to identify Figure 8.7 shows a pattern that cannot be created using the Geometry Pattern option The boss merges with the side face of the block, which generates the error message shown in the figure The circular part shown

in the image is an exception where the partial cylindrical bosses merge with the side of the der, but Geometry Pattern works

cylin-In some situations, SolidWorks error messages may send you in a loop One message may tell you that the pattern cannot be created with the Geometry Pattern turned on, so you should try to turn

it off When you do that, you may get another message that says the pattern will not work, and

that you should try to use the Geometry Pattern setting In cases like this you may try to use a ferent end condition, or change the selection of features patterned along with the feature, such as fillets You may also try to pattern bodies or even faces rather than features

Trang 5

A geometry pattern test

Geometry pattern off — Parametrics are patterned

Geometry pattern on — Parametrics not patterned

FIGURE 8.7

Merged faces

Trang 6

Patterning Bodies

I cover multiple bodies in depth in Chapter 26, but need to deal with it briefly here Any sion of patterning is not complete without a discussion of bodies because using bodies is an avail-able option with all the pattern and mirror types

discus-SolidWorks parts can contain multiple solid or surface bodies A solid body is a solid that comprises

a single contiguous volume Surface bodies are defined differently, but they can also be patterned and mirrored as bodies

There are both advantages and disadvantages to mirroring and patterning bodies instead of

fea-tures The advantages can include the simplicity of selecting a single body for mirroring or ing In cases where the geometry to be patterned is complex or there is a large number of features, patterning bodies also can be much faster However, in the example used earlier with patterning features in a 20-by-20 grid of holes, when done by patterning a single body of 1" × 1" × 5" with a 5" diameter hole, patterning bodies gives a rebuild time of about 130 seconds with or without

pattern-Verification On Rebuild It is the function that combines the resulting bodies into a single body that takes most of the time This says that for large patterns of simple features, patterning bodies is

not an efficient technique Although I do not have an experiment in this chapter to prove it, I

believe that creating a pattern of a smaller number of complex bodies using a large number of tures in the patterned body would show a performance improvement over patterning the features.Another disadvantage of patterning or mirroring bodies is that it does not allow you to be selective You cannot mirror the body minus a couple of features without doing some shuffling of feature order in the FeatureManager Another disadvantage is that if the base of the part has already been mirrored by a symmetrical sketch technique, then body mirroring is not going to help you mirror the subsequent features Also, the Merge Bodies option within the mirror feature does not work as you would want it to It merges only those bodies that are part of the mirror to bodies that are part

fea-of the mirror Pattern Bodies does not even have an option to merge bodies Both fea-of these

func-tions are often going to require an additional combine feature (for solid bodies) or knit (for surface bodies) to put the final results together

Some of these details may seem obscure when you’re reading about them, but when you begin to work patterning bodies and begin trying to merge them into a single body, read over this section again The inconsistency between the Merge option existing in Mirror but not in Pattern is unex-plainable, and a possible opportunity for an enhancement request

CROSS-REF Bodies are discussed in more detail in Chapter 26 Surface modeling is covered in Chapter 27.

Patterning Faces

Most of the pattern types have an option for Pattern Faces This option has a few restrictions, the main limitation being that all instances of the pattern must be created within the boundaries of the same face as the original Figure 8.8 shows an example of the Pattern Faces option working with a Circular Pattern feature

Trang 7

A circular pattern using the Pattern Faces option

To get around this limitation, you can knit and pattern the surface body, as shown in Figure 8.9

FIGURE 8.9

Patterning a surface body

Split in face means faces

from feature on side cannot be

patterned all the way around

Trang 8

CROSS-REF Working with surface bodies is covered in Chapter 27.

Patterning Fillets

You may hear people argue that you cannot pattern fillets This is partially true and partially

untrue It is true that fillets as individual features cannot be patterned For example, if you have a symmetrical box and a fillet on one edge and want to pattern only the fillet to other edges, this

does not work However, when fillets are patterned with their parent geometry, they are a perfectly acceptable candidate for patterning This is also true for the more complex fillet types, such as vari-able radius and full radius fillets You may need to use the Geometry Pattern option, and you may need to select all the fillets affecting a feature, but it certainly does work

Understanding Pattern Types

Up to now, I have discussed patterns in general; differentiated sketch patterns from feature

pat-terns, face patpat-terns, and body patterns; and looked at some other factors that affect patterning and mirroring I will now discuss each individual type of pattern to give you an idea of what options are available

Linear Pattern

The Linear Pattern feature has several available options:

n Single direction or two directions Directions can be established by edge, sketch entity,

axis, or linear dimension If two directions are used, the directions do not need to be pendicular to one another

per-n Spaciper-ng The spaciper-ng represeper-nts the ceper-nter-to-ceper-nter distaper-nce betweeper-n patterper-n iper-nstaper-nces,

and can be driven by an equation

n Number of Instances This number represents the total number of features in a pattern,

which includes the original seed feature It can also be driven by an equation Equations are covered in detail in Chapter 9

n Direction 2 The second direction works just like the first, with the one exception of

the Pattern Seed Only option Figure 8.10 shows the difference between a default direction pattern and one using the Pattern Seed Only option

two-n Itwo-nstatwo-nces to Skip This optiotwo-n etwo-nables you to select itwo-nstatwo-nces that you would like to

leave out of the final pattern Pink dots are the instances that remain, and the red dots are the ones that have been removed Figure 8.11 shows the interface for skipping instances You may have difficulty distinguishing the red and pink colors on the screen

Trang 9

Using the default two-direction pattern and the Pattern Seed Only Option

Original feature Pattern seed only

FIGURE 8.11

Using the Instances to Skip option

n Propagate Visual Properties This option patterns the color, texture, or cosmetic thread

display, along with the feature to which it is attached

n Vary Sketch This option in patterns is often overlooked and not widely used or

under-stood While it may have a niche application, it is a powerful option that can save you a lot of time if you ever need to use it

Vary Sketch allows the sketch of the patterned feature to maintain its parametric relations

in each instance of the pattern It is analogous to the Geometry Pattern Where Geometry Pattern disables the parametric end condition for a feature, Vary Sketch enables the para-metric sketch relations for a pattern

To activate the Vary Sketch option, the Linear Pattern must use a linear dimension for its Pattern Direction The dimension must measure in the direction of the pattern, and add-ing the spacing for the pattern to the direction dimension must result in a valid feature.The sketch relations must hold for the entire length of the pattern Figure 8.12 shows the sketch relations and the resulting pattern The preview function for this feature does not work

Trang 10

FIGURE 8.12

Using the Vary Sketch option

ON the CD-ROM

ON the CD-ROM To better understand how this feature works, open the sample file from the CD-ROM called Chapter 8 Vary Sketch.sldprt , and edit Sketch2.

Edit the 40-inch dimension Double-click it and use the scroll arrow to increase the dimension; watch the effect on the sketch If a sketch does react to changes properly, then it cannot be used with the Vary Sketch option In this case, the 40-inch dimension is used as the direction The

direction dimension has to be able to drive the sketch in the same way that this one does These dimensions cannot pass through the Zero value and cannot flip directions or move into negative values

To make the sketch react this way to changes in the dimension, the slot was created using the directional offset that was demonstrated in an earlier chapter, which means that the whole opera-tion is being driven by the construction lines and arcs at the centerline of the slot Sketch points along the model edges are kept at a certain distance from the ends of the slots using the 50-inch dimensions The arcs are controlled by an Equal Radius relation and a single 58-inch radius

bi-dimension The straight lines at the ends of the slots are controlled by an Equal Length relation.This type of dimensioning and relation creation is really what parametric design is all about The Vary Sketch option takes what is otherwise a static linear pattern and makes it react parametrically

in a way that would otherwise require a lot of setup to create individual features If you model

everything with the level of care that you need to put into a Vary Sketch pattern feature sketch, then your models will react very well to change

Circular Pattern

The Circular Pattern feature requires a circular edge or sketch, a cylindrical face, a revolved face, a straight edge, an axis, or a temporary axis to act as the Pattern Axis of the pattern All the other

options are the same as the Linear Pattern — except that the Circular Pattern does not have a

Direction 2 option, and the Equal Spacing option works differently

Trang 11

name equal spacing is a bit misleading because all Circular Patterns create equal spacing between

the instances, but somehow everyone knows what they mean

Without using the Equal Spacing option, the Angle setting represents the angular spacing between instances

The Vary Sketch option is available in Circular Pattern as well The principles for setup are the same, but you must select an angular dimension for the direction The part shown in Figure 8.13 was created using this technique

FIGURE 8.13

A Circular Pattern vary sketch

Curve Driven Pattern

A Curve Driven Pattern does just what it sounds like: it drives a pattern along a curve The curve could be a line, an arc, or a spline It can be an edge, a 2D or 3D sketch, or even a real curve fea-ture An interesting thing about the Curve Driven Pattern is that it can have a Direction 2, and Direction 2 can also be a curve This pattern type is one of the most interesting, with many options available

For an entire sketch to be used as a curve, the sketch must not have any sharp corners — all the entities must be tangent This could mean using sketch fillets or a fit spline The example shown in Figure 8.14 is created using sketch fillets This pattern uses the Equal Spacing option, which spaces the number of instances evenly around the curve It also uses the Offset Curve option, which maintains the patterned feature’s relationship to the curve throughout the pattern, as if an offset of the curve goes through the centroids of each patterned instance The Align to Seed option

is also used, which keeps all the pattern instances aligned in the same direction

Trang 12

FIGURE 8.14

The Curve Driven Pattern using sketch fillets

Figure 8.15 shows the same part using the Transform Curve positioning option and Tangent to Curve alignment option

Instead of an offset of the curve going through the centroids of each patterned feature instance, in the Transform Curve, the entire curve is moved rather than offset On this particular part, this

causes a messy pattern The Tangent to Curve option gives every patterned instance the same entation relative to the curve as the original

ori-The Face Normal option is used for a 3D pattern, as shown in Figure 8.16 Although this ality seems a little obscure, it is useful if you need a 3D curve-driven pattern on a complex surface

function-If you are curious about this example, it is on the CD-ROM with the filename Reference3d

CurveDriven.sldprt

Trang 13

Using the Transform Curve and Tangent to Curve options

FIGURE 8.16

Using a 3D curve-driven pattern

Using a Direction 2 for a curve-driven pattern creates a result similar to that in Figure 8.17 This is another situation that, although rare, is good to know about

Trang 14

FIGURE 8.17

Using Direction 2 with a curve-driven pattern

The rest of the Curve Driven Pattern works like the other pattern features that have already been demonstrated

Sketch Driven Pattern

Sketch-driven patterns use a set of sketch points to drive the locations of features The Hole

Wizard drives the locations of multiple holes using sketch points in a similar way However, the Sketch Driven Pattern does not create a 3D pattern in the same way that the Hole Wizard does Figure 8.18 shows a pattern of several features that has been patterned using a sketch-driven pat-tern A reference point is not necessary for the first feature

The Centroid option in the Reference Point section is fine for symmetrical and other easily able shapes such as circles and rectangles, where you can find the centroid just by looking at it, but

defin-on more complex shapes, you may want to use the Selected Point optidefin-on The Selected Point

option is shown in Figure 8.19

Table Driven Pattern

A table-driven pattern drives a set of feature locations, most commonly holes, from a table The table may be imported from any source with two columns of data (X and Y) that are separated by a space, tab, or comma Extraneous data will cause the import to fail

The X,Y Origin for the table is determined by a Coordinate System reference geometry feature The

XY plane of the Coordinate System is the plane to which the XY data in the table refers

You can access the Coordinate System command through the menus at Insert ➪ Reference

Geometry ➪ Coordinate System You can create the Coordinate System by selecting a combination

of a vertex for the Origin and edges to align the axes Like the Sketch Driven Pattern, this feature can use either the centroid or a selected point on the feature to act as the reference point

Trang 15

Using a sketch-driven pattern

FIGURE 8.19

Using the Selected Point option in a sketch-driven pattern

Selected point corresponds to thesketch points in the pattern

Trang 16

The fact that this feature is still in a floating dialog box points to its relatively low usage and ity on the SolidWorks upgrade schedule The interface for the feature is rather crude in compari-son to some of the more high-usage features This interface is shown in Figure 8.20.

The Pattern Layout panel enables you to control spacing and other geometrical aspects of the

selected pattern layout, as well as the minimum gap from the fill boundary This is most useful for patterns of regularly spaced features with an irregular boundary

Trang 17

NOTE More information is available on RealView capable video cards from the SolidWorks corporate Web site, at www.solidworks.com/pages/services/

VideoCardTesting.html?lsrc=quick_links .

Trang 18

Cosmetic Patterns are appropriate if your manufacturing method does not require actual geometry For example, rapid prototyping requires explicit geometry in order to build a part, but a perforated sheet metal panel or a knurled cylindrical handle may require only a note on a drawing for the

shop to set up a manufacturing process to create the geometry

To apply a Cosmetic Pattern to a face, feature, body, or entire part, use the RealView tab from the Task Pane, and select Appearances ➪ Miscellaneous ➪ Pattern or ➪ RealView Only Appearances Drag and drop the desired pattern onto the model, and use the pop-up to apply it to a face, fea-ture, body, or the entire part Figure 8.22 shows the RealView tab of the Task Manager with some

of the Cosmetic Pattern options

CROSS-REF You can find more details about RealView appearances in Chapter 5.

FIGURE 8.22

Cosmetic Pattern options in the RealView tab of the Task Manager

Trang 19

Because symmetry is an important aspect of modeling parts in SolidWorks, mirror functions are a commonly used feature This is true whether you work on machine parts, sheet metal, injection-molded, cast, or forged parts I discussed sketch-mirroring techniques earlier in this chapter, and now I will discuss 3D mirroring techniques

Mirroring bodies

Earlier in this chapter, I discussed patterning bodies I mentioned that the patterning and ing tools in SolidWorks do not have adequate functionality when it comes to body management Neither tool allows the patterned or mirrored bodies to be merged with the main body if the main body is not being patterned or mirrored Figure 8.23 shows the Options panels for both the Linear Pattern (on the left) and the Mirror (on the right) features Here you can see that the pattern func-tion has no provision whatsoever for merging bodies The Mirror appears to have the functionality, but it applies only to bodies that are used or created by the Mirror feature

mirror-In future versions of SolidWorks, these features will hopefully be outfitted with more complete merge and feature scope functionality, such as Extrude features

FIGURE 8.23

Options panels from the Linear Pattern and Mirror PropertyManagers

BEST PRACTICE

BEST PRACTICE Mirroring bodies is the fastest and simplest method when a part has complete sym- metry However, this may not be an option if the part is not completely

symmetri-cal Also, the decision to mirror must often be made when you are creating the first feature If the first feature is modeled as a sketch that is built symmetrically around the Origin, then you may need to cut the part in half to mirror it This is an adequate modeling technique, although it

is not as clean as it could be.

Mirroring features

Features can be mirrored across planes or flat faces used as the plane of symmetry If you are roring many features, then it is best to mirror them all with a single mirror feature rather than to make several mirror features You may have to do this by moving the mirror feature down the tree

mir-as you add new features Depending on your part and what you are trying to accomplish, it may be better to mirror bodies than features, but you should not go too far out of your way or model in a contrived manner to make this happen

Trang 20

Mirroring entire parts

Often when modeling, you are required to have a left- and a right-handed part For this, you need

to use a method other than body or feature mirroring The Mirror Part command creates a brand new part, by mirroring an existing part The new part does not inherit all the features of the origi-nal, and so any changes must be created in the original part If you want different versions of the two parts, you need to use Configurations, which have not been covered yet in this book

CROSS-REF Configurations are covered in detail in Chapter 10.

You can use the Mirror Part command by pre-selecting a plane or planar face You should be

careful when choosing the plane because the new part will have a relationship to the part Origin, based on the plane on which it was mirrored

The Mirror Part command is found in the Insert menu When mirroring a part, you can bring

several entity types from the original file to the mirrored part These include axes, planes, cosmetic threads, and surface bodies Sketches and features are two commonly requested items to be

brought forward by the Mirror Part command, but this is not possible in the current version of the software

Mirror Part invokes the Insert Part feature, which is covered in more detail in Chapters 26 and 28,

on Multibodies and Master Model techniques, respectively

One of the options available when you make a mirrored part is to break the link to the original

part This option brings forward all the sketches and features of the original part, and then adds a Move/Copy Body feature at the end of the tree that simply mirrors the body

NOTE Under normal circumstances, you cannot get the Move/Copy Body feature to mirror a body SolidWorks has applied some magic pixie dust behind the scene to make

this happen.

Tutorial: Creating a Circular Pattern

Follow these steps to get practice with creating circular pattern features:

1 Draw a square block on the Top plane centered on the Origin, 4 inches on each

side, 5-inch thick extruded Mid Plane with 5-inch chamfers on the four corners.

2 Pre-select the top face of the block and start the Hole Wizard (Pre-selection avoids a

3D placement sketch.) Select a counterbored hole for a 10-32 socket head cap screw, and place it as shown in Figure 8.24

3 Create an axis using the Front and Right planes Click Insert ➪ Reference

Geometry ➪ Axis Select the Two Planes option, and select Front and Right planes from the flyout FeatureManager (Click the bar that says Axis at the top of the PropertyManager

to access the flyout FeatureManager.) This creates an axis in the center of the rectangular part

Trang 21

Start drawing a plate with holes

4 Click the Circular Pattern tool on the Features toolbar Select the new Axis in the top

Pattern Axis selection box in the Circular Pattern PropertyManager Select the Equal Spacing option and make sure that the angle is set to 360° Set the number of instances to 8

5 In the Features To Pattern panel, select the counterbored hole Make sure that

Geometry Pattern is turned off

6 Click OK to finish the part, as shown in Figure 8.25.

FIGURE 8.25

The finished circular pattern

Trang 22

Tutorial: Mirroring Features

Follow these steps to get some practice with creating mirror features:

1 Open the file from the CD-ROM called Chapter8Tutorial2.sldprt.

2 Open a sketch on the side of the part, as shown in Figure 8.26 The straight line on

top is 1.00 inch long, and the angled line ends 2.70 inches from the edge, as shown

FIGURE 8.26

The sketch for the Rib feature

3 Click the Rib tool on the Features toolbar or select it from the menu at

Insert ➪ Features ➪ Rib Set the material arrow to go down toward the block, and the

thickness setting to go to the inside by 375 inches The PropertyManager and the view should look like Figure 8.27

4 Create a linear pattern using the rib, making it go 2 inches into the part.

5 Create a chamfer on the same side of the part as the original rib, as shown in Figure

8.28 The chamfer is an Angle-Distance using 60° and 5 inches.

6 Create a round hole, sized and positioned as shown.

7 Mirror the hole and the chamfer about the Right plane The parametrics of the

cham-fer will have difficulty patterning, and so you need to use the Geometry Pattern option The finished part is shown in Figure 8.29

Trang 24

FIGURE 8.29

The finished part

Tutorial: Applying a Cosmetic Pattern

1 Open the file from the CD-ROM for Chapter 8 called Chapter8–tutorial–

cosmeticpattern.sldprt.

2 Click the RealView tab in the Task Pane These steps will work whether or not you

have RealView actually turned on

3 Expand the Appearances heading, then the Metal heading, then Steel, and then drag

the Sandblasted Steel icon from the lower panel onto the part When the pop-up

appears, select the Part icon, to apply the appearance to the entire part Figure 8.30 shows the Task Pane and the pop-up

4 Now expand the Miscellaneous listing (under Appearances), and the Pattern

head-ing drag the Waffle Pattern onto the large cylindrical face of the part, and then Alt-click

the Face icon in the pop up toolbar Using the Alt key while dragging or to select face, feature, body or part automatically activates the PropertyManager to edit the appearance Figure 8.31 shows the Appearances PropertyManager

5 In the Mapping tab of the Appearances PropertyManager, select the cylindrical

map-ping under the Mapmap-ping Style section of the Mapmap-ping Controls panel.

6 Change the Rotation to 45 degrees, and choose the smallest Mapping Size.

Trang 25

Applying an appearance to a part

Trang 27

Parametric sketch relations are not the only way to drive dimensions

with intelligence You can also use equations, link values, and global

variables Equations help you to create simple or complex mathematical

relations between dimensions Link values are essentially a quick way of

making two dimensions equal Global variables can be used in equations like

other dimension names These three techniques are all very similar and related

to one another in the interface, but are used in different ways in different

situations

Equations are a very powerful extension of the set of parametric power tools

that SolidWorks offers to users Like other aspects of the software, they can

cause problems if used incorrectly, and have functionality that may appear

incorrect at times, but it is all for good reason

Understanding Equations

You can find the Equations tool on the Tools toolbar or through the menus

at Tools ➪ Equations Figure 9.1 shows the Equations main interface along

with the Add Equation window As I have noted with other areas of the

interface, Equations still uses a floating dialog box SolidWorks has put

most functions in the PropertyManager, because equations tend to be more

horizontal than vertical, while the PropertyManager is more vertical than

horizontal

IN THIS CHAPTERUnderstanding equations Using link values Using global variables Using expressions Tutorial: Using equations

Trang 28

FIGURE 9.1

The Equations interface

Using the Equations interface, you can turn off equations temporarily by deselecting the Active check box in front of the equation Equations can also be deactivated by a design table I will discuss design tables in more detail in Chapter 10, which discusses configurations

BEST PRACTICE

BEST PRACTICE Although I do not cover configurations until Chapter 10, I will mention part of the relationship between equations and configurations here Equations and configurations

(particularly those that are driven by a design table) should probably not be mixed This is not because they do not work together, but more for the sake of organization When controlling dimensions, it can become confusing if the changes are being driven from multiple sources Also, there is no reason not to bring your equations into Excel rather than using the comparatively limited equation functionality offered by SolidWorks Of course, every user will have his own rea- sons for working one way or another, and this is really just a question of personal preference.

Creating equations

Equations are easy to create and useful for many purposes A common situation where you would use an equation is to space a pattern of holes evenly along an edge, including the gap on both ends, where the gap at the ends is half of the regular spacing Before you write an equation, you need to take care of a few organizational details

Naming dimensions

It is not necessary to name every entity in every SolidWorks document, but you should get in the habit of naming important features, sketches, and even dimensions Dimensions become particularly important when you use them in equations, configurations, and design tables Under most circumstances, you do not use or even see dimension names, but with equations, you do.Named dimensions make a huge difference when you want to recognize the function of an equation by simply reading it A most obvious example would be the difference between D3@Sketch6 and Length@WindowExtrusionSketch The first name means nothing, but the second one

is descriptive if you are familiar with the part

Trang 29

panel shown in Figure 9.2, type the new name for the dimension in the Name text box You

cannot use the symbol @ in dimension names because it is used as a delimiter between the name

of the dimension and the feature or sketch to which it applies Also be aware that even though the software allows you to change the name of the sketch or feature in the Dimension PropertyManager,

it will not accept this change

FIGURE 9.2

Renaming a dimension

BEST PRACTICE

BEST PRACTICE You should keep dimension names as short as possible while still making them unique and descriptive This is because space in the interface is often limited, and

when combined with sketch or feature names (and even part names when used in an assembly), the names can become difficult to display in a readable fashion.

TIP You can show dimension names as a part of the dimension itself by accessing the setting at ToolsOptionsGeneralShow Dimension Names Another useful

piece of information is that the FeatureManager Filter filters dimension names Figure 9.3 shows the filter displaying features and sketches that contain a dimension containing the filtered word

“height.” Other filtered words display in tool tips, but dimension names appear not to.

Building the equation

When creating an equation in SolidWorks, it is often a good idea to write it out on paper first

Examine the part shown in Figure 9.4, where the relevant dimensions have been named and

displayed The behavior to be driven by the equations is that the number of holes — called

Instances here — is the driving variable From that number, the spacing of the holes is calculated over the length of the part There is also a gap on each end of the pattern of holes This gap

(measured between the center of the last hole and the end of the part) needs to always be half of the spacing between the holes The sigma symbols to the left of the dimensions indicate that an equation is driving it Dimensions driven by equations cannot be directly edited

Trang 30

FIGURE 9.3

Using the FeatureManager Filter to filter dimension names

FIGURE 9.4

Variables for the hole pattern

In this case, more sophistication has not been implemented to account for the diameter of the holes possibly interfering with one another when there are a large number of holes In other words, because there are two values that need to be calculated (the spacing and the gap), you need to create two equations Because the gap dimension is always half of the spacing, the spacing needs to

be calculated first, as follows:

Spacing = Length / ((Instances-1)+1)

The Instances –1 term stands for the number of spacings If you have two holes, then there is only one spacing The +1 term stands for the two half-spacings for the two ends The second equation is

simpler and looks like this:

Trang 31

they are listed in the Equations dialog box Because the gap is dependent on the spacing, the

spacing must be calculated before the gap If it is done the other way around, you can get into a situation where it takes two rebuilds to finalize a set of equations, or even a situation where in

every rebuild, all of the numbers change This is called a circular relation, and is a common error

in order or history dependent functions, not just in SolidWorks, but in many CAD applications Figure 9.5 shows the resulting set of equations

FIGURE 9.5

Equations for the hole pattern

Before beginning to build the equation, you should first display the dimensions that you need to use

to create the equation You can add dimensions to the equation by clicking them from the graphics

window To do this, right-click the Annotations folder at the top of the FeatureManager, and select

Show Feature Dimensions You should also select the Display Annotations option if it is not already on When you have done this, all of the dimensions that you need to create every feature are displayed Also

be sure to turn on Tools ➪ Options ➪ General ➪ Show Dimension Names

TIP For models that have more than a few features, showing all of the dimensions in the entire model may overload the screen with information In this case, you can

dou-ble-click a feature from the FeatureManager to show all of the dimensions on that feature.

To build the equation, first use the Equation button on the Tools toolbar to open the Equations dialog box Then press the Add button to display the Add Equation dialog box To add dimensions

to the equation section, just click the dimension You can use the keypad on the dialog box or on your keyboard to add operators and syntax All standard rules of syntax apply for the order of

operations, use of parentheses, and driving versus driven sides of the equation

Using comments

Notice the comment to the right of the first equation in Figure 9.5 Comments can be very useful for annotating equations for yourself or others Two important reasons to annotate are to remember the significance of variables or dimensions and to add special notes about the logic of the equation

You can make comments for equations by using a single quote after the end of the equation, or by using the Comment button in the Add Equation dialog box In the following example,

“Spacing@LPattern1” = “Length@Sketch1” / (“Instances@LPattern1”) ‘This must be solved first

the comment, “This must be solved first,” is applied to the equation using the single quote

before the comment

Trang 32

Adding to the earlier discussion about projected changes to the Equation interface, several standard selection functionalities do not work in the Edit Equation dialog box These include triple-clicking to select all (although double-clicking works to select a single word) and pressing Ctrl+A to select all.

TIP You can make general comments for the model in the Design Journal, a Microsoft Word document that is embedded into the SolidWorks file The Design Journal is

found in the Design Binder folder near the top of the FeatureManager.

ON the CD-ROM

ON the CD-ROM You can find the part used in this section on the CD-ROM with the filename Chapter 9 Equations.sldprt .

Using driven dimensions

Sometimes it is more convenient to use a driven (reference) dimension in an equation This is particularly true when using geometry is the best way to calculate a number For example, if you are manufacturing a helical auger in 90-degree sections from flat steel stock, then you need to design the auger in 3D, but begin to manufacture it in 2D

What is the shape of the auger when flat? The best way to figure this out (aside from lofted bends, which are discussed in Chapter 29) is to use a little high school geometry, a construction sketch, and some simple equations

Figure 9.6 shows a 90-degree section of an auger blade The outside diameter is 12 inches, and the blade width is 3 inches The overall height is 4 inches In this case, the auger is represented as a surface because the thickness is ignored Surface features can be useful in situations like this (used

as construction geometry) and are discussed in Chapter 27

FIGURE 9.6

Representation of the auger

Trang 33

simplify the calculation, and give it a visual result.

FIGURE 9.7

Triangles calculate the length of the helical edge

From this point, you can calculate the flat pattern again, using SolidWorks’ sketch-solving capabilities

as the calculator Think of the auger as being the cardboard tube inside a roll of paper towels If you examine one of these tubes closely, you see that it is simply a straight and flat strip of cardboard that has been wound around a cylinder What was the flat, straight edge of the original board is wound into a helix This method is simply reversing that process

This example requires the little-used arc-length dimension to drive the size of the arc The hypotenuse dimensions are shown by driven or reference dimensions, and these are used to drive the arc-length dimensions, as shown in Figure 9.8 Remember that you can create arc length dimensions by using the Smart Dimension tool to click both endpoints of the arc and then the arc itself Arcs driven by arc length dimensions often do not react to changes predictably, given the radius and center or end point locations are not necessarily defined

Trang 34

FIGURE 9.8

Figuring the flat pattern of the auger

The reasoning behind this example may be a little difficult to grasp, but the equations and the sketches are certainly simple

CAUTION

CAUTION Using reference dimensions on the driving (independent, or right) side of the equation can in some situations require more than one rebuild to arrive at a stable

value (meaning a value that does not change with the next rebuild) SolidWorks issues a warning when it sees that you are using a reference dimension in an equation, but it does allow it.

Equations are listed in the Equations folder in the FeatureManager You can edit or delete them through the right-mouse button menu

In words, this is how an IIF statement is used:

If some relationship is fulfilled, then the IIF function returns a value If the relationship is not fulfilled, then it returns a different value

Trang 35

IIF(expression, value if true, value if false)

In practice, you could use it like this:

IIF(x>5, x-1, x+1)

which reads, “if x is greater than 5, then subtract 1 from x; if not, then add 1 to x.” One of the

reasons why this is considered a parlor trick is that this function causes the value of x to oscillate between two numbers (depending on the number that it starts with) with each rebuild It may be difficult to imagine an application where this sort of behavior would be desirable, but when you combine it with a macro that simply rebuilds a model a number of times, you can use it to create a certain animation effect

ON the CD-ROM

ON the CD-ROM A simple example of the filename Chapter 9 Oscillate.sldprt IIF function can be found on the CD-ROM with the The equation is shown in Figure 9.9.

FIGURE 9.9

An equation using IIF

TIP You can find some great examples of this function at www.mikejwilson.com ,

along with many other extremely creative examples of SolidWorks modeling The model on this site called Ship in a Bottle.sldprt also includes a macro that will rebuild the model a certain number of times, which is useful for animations that are created in this way.

SWITCH

The SWITCH function enables you to have a list of relationships with associated values The value

of the first relationship in the list that is satisfied is returned by the SWITCH function For example,

Trang 36

Using Link Values

Link values are simply a way to link several dimensions together, making them equal A link value

is not exactly like an equation that sets the dimensions equal, because it does not depend on order like an equation does All dimensions are set to the same value simultaneously

Link values are available by right-clicking the dimension Unfortunately, they are not available from the right-mouse button menu when the dimension tool is active To apply a link value to a new dimension, you must place the dimension, exit the dimension tool, right-click the dimension, and select Link Value

Link values are listed under the Equations folder in the FeatureManager Figure 9.10 shows the link values in a listed part, and the drop-down list from which you can select them or type them Notice again that the Link Values feature also operates from a dialog box instead of the

PropertyManager

FIGURE 9.10

Link values listed in the FeatureManager, and the Shared Values interface

NOTE Another way to access link values is through the Modify dialog box If you click the down arrow at the right end of the dimension value box, you can select between

Link Values and Equations In fact, if you press the Down Arrow key on the keyboard, the Equation interface becomes available There is no similar trick to get Link Values to appear.

The first link value that is assigned in a part must be manually typed in After you add the first one, you can link other dimensions to this link value by using the scroll arrows shown in Figure 9.10 You cannot edit link values, meaning you cannot change a dimension from linking to a value called “height” to a value called “length.” In order to change the value to which a dimension is linked, you must first unlink the value and then relink it The Unlink function is available from the right-mouse button menu in the same way that you assign link values Dimensions that have a link value have the small chain symbol displayed to the left of the dimension

To link several dimensions to the same value at the same time, you can CTRL select multiple dimensions and then right-click one of them and select Link Value It will link all the dimensions selected at once (Thanks to Brian McElyea for this suggestion!)

Trang 37

This is intended to reflect sheet metal functionality, but it is useful for models of various

manufacturing techniques.

To take this one step further, you can save a part template with a thickness link value; all of your

new parts will also have this functionality right from the start To save the template with a link value, you must create at least one dimension to assign the link value, and then delete the

geometry (and the dimension); however, the link value will remain.

Link values of different types are not necessarily interchangeable You cannot use angular

dimension link values on radius, diameter, or linear dimensions You can use linear and diameter link values interchangeably, but not angle link values

Using Global Variables

Global variables are assigned in the Equations dialog box as simply the variable name equaling the value Figure 9.11 shows a list of equations, link values, and global variables When you are typing in the name of the variable, you do not need to add the quotation marks; they are added automatically

FIGURE 9.11

Equations, link values, and global variables

Despite the word variable in the name global variable, the values are not variable They are fixed,

and only changeable through the Equations dialog box The only place where you can use global variables is in equations You cannot directly enter them into dialog boxes for dimension values, or use them like Link Values

You can use custom and file properties to drive equations If you right-click your Equations folder and select Show Properties, you see that the default file properties already exist in the list:

Trang 38

Global VariableCustom PropertyDefault File Property

FIGURE 9.12

Equations and properties

In the equation editor shown on the right in Figure 9.12, you can expand the list of global, custom and default properties for easy selection and placement into equations Any custom properties you add that are of the type “number” are automatically added to this list, and can also be used in equations Notice that the custom property “cost” is a property saved in my template and gets picked up for use here

Using Expressions

Expressions, unlike all of the previous variables, values, and equations, can be entered directly into dimension dialog boxes in the Modify dialog box and PropertyManager value boxes The expressions have to be composed of numbers and mathematical operators An expression such as

Trang 39

1+1/2

or

1 1/2.

In the second case in this example, the plus symbol is understood

Other types of operations are also available, such as changing units in a dimension box For

example, if you are editing a part in inches, and enter 40mm, then SolidWorks does the conversion for you You can even mix units in a single expression such as 4.875+3.5mm, where the inch part

is assumed as the document units

SolidWorks does not remember the expression itself, only the final value Expressions can be

entered into any place where you enter dimensions for SolidWorks features

Tutorial: Using Equations

Follow these steps to get some practice with using equations:

1 Start from the part on the CD-ROM with the filename Chapter9Tutorial

Start.sldprt.

2 Show the dimension names This setting is found at Tools ➪ Options ➪ General ➪ Show

Dimension Names

3 Double-click the Circular Pattern feature to display the angle and number of

instances of the feet and related features You may have to move the angle dimension

to see the pattern instance number

4 Click the instance number Change the name of the dimension to # (pound or number

sign) in the Dimension PropertyManager Make sure that Instant3D is turned off when doing this

5 Double-click the first feature, which is the revolve, and rename the 3.60-inch

dimension to CapRad, again by selecting it and using the PropertyManager.

6 Write an equation that drives the number of legs by CapRad/7.

a Open the Equations dialog box at Tools ➪ Equations

b Click Add to add an equation

c Double-click the Circular Pattern and click the # dimension Make sure that the name

of the dimension is listed in the equation box, and type an equal sign

d Double-click the Revolve feature and select the CapRad dimension; then type the

characters /1.5.

e Add a comment to the equation to reflect which dimension is driving which dimension

Trang 40

7 Click Rebuild, press Ctrl+B or Ctrl+Q to rebuild the model, and observe whether

any update takes place.

8 Rename the 6.00-inch dimension for the height of the revolved feature to DomeHt.

9 Create a second equation that drives the DomeHt dimension at the current ratio of

the height to the radius.

a Create a global variable called Ratio = 6/3.6 (1.66667) in the Equations dialog box

b Create the equation The equation will take the form of DomeHt = (Ratio) × CapRad

You can use the drop down under the calculator pad to select the Ratio variable from the list

10 Use a link value to make the radii of Fillet1 and Fillet2 the same.

11 Double-click the revolve feature Change the CapRad dimension to 5 and rebuild You

should observe 3 feet Change it again to 6, and you should see 4 feet

12 Save and close the part with a new name, including your initials or the date.

Summary

SolidWorks equations and related dimension-management tools are powerful, but often leave you wishing for a little more flexibility and control The interface is not up-to-date with the rest of the SolidWorks interface, and so I would look to see an updated equation interface soon that integrates dimension input, link values, and global variables

If you want to encourage SolidWorks to revise certain features, then you can go to the SolidWorks Web site and submit an enhancement request They do look at customer input when developing or updating functionality

Ngày đăng: 11/08/2014, 18:20

TỪ KHÓA LIÊN QUAN