Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Autocad 2005 And Autocad LT 2005 Bible (2004).pdf
Скачиваний:
92
Добавлен:
17.08.2013
Размер:
32.22 Mб
Скачать

426 Part II Drawing in Two Dimensions

1

2

Figure 16-15: A bushing.

3.Choose Draw Boundary. In the Boundary Creation dialog box, choose Region as the Object type.

4.Choose Pick Points.

5.At the Select internal point: prompt, choose 1 in Figure 16-15.

6.Press Enter to end internal point selection. The prompt responds:

4 loops extracted.

4 Regions created. BOUNDARY created 4 regions

7.To see the new region, start the MOVE command. At the Select objects: prompt, pick 2. Move the region to the right — the exact distance is not important. You see both the new region and the original objects.

8.Save your drawing.

Creating Hatches

Hatches are patterns that fill in an area. Most types of drafting make use of hatching. In architectural drafting, hatched areas are used to indicate materials, such as insulation or grass. In mechanical drafting, hatching often indicates hidden areas or certain materials. AutoCAD and AutoCAD LT provide a large number of hatch patterns. Hatches are created from repeating patterns of lines. You can also create solid fills in the same way you create hatch patterns.

Cross-

Chapter 31 explains how to create your own hatch patterns.

Reference

 

Figure 16-16 shows a drawing with a simple hatch pattern. Here the cross-section shows solid metal hatched to distinguish it from the holes.

Chapter 16 Drawing Complex Objects 427

Figure 16-16: Hatch patterns help you distinguish different materials or textures.

Thanks to Jerry Bottenfield of Clow Valve Company, Oskaloosa, Iowa, for this drawing.

Understanding hatch patterns

New

Feature

Tip

Hatch patterns may seem complex, but they are easy to use, after you understand how they work. Hatch patterns have two qualities that are similar to dimensions:

They are blocks. This means that all the lines that fill in an area are one object. Blocks are covered in Chapter 18.

They are associative. If you edit the object that is hatched, the hatch automatically adjusts to fit the new shape of the object.

You have several ways to specify exactly what area you want to hatch. Often, the key to successful hatching lies in how you construct the area you want to hatch. You can use the BOUNDARY and REGION commands covered in previous sections of this chapter to create complex closed areas that you can hatch.

You can specify a gap tolerance to hatch areas that aren’t completely closed.

AutoCAD stores hatch pattern definitions in the acad.pat file. AutoCAD LT uses the aclt.pat file. If you create your own hatch patterns, you can put them in another file with the filename extension PAT.

Create a separate layer for hatch patterns. You may want to turn off or freeze your hatch layer to reduce visual clutter or assist in selecting objects. Hatches are also typically a different color than the model you’re hatching.

Defining a hatch

To hatch an area, choose Hatch from the Draw toolbar. This starts the BHATCH command. The Boundary Hatch and Fill dialog box opens, shown in Figure 16-17. (Note that

the AutoCAD LT dialog box doesn’t have a Gradient tab.)

428 Part II Drawing in Two Dimensions

Figure 16-17: The Boundary Hatch and Fill dialog box with the Hatch tab on top.

Use this dialog box to define your hatch. From the Type drop-down list, choose one of the three options:

Predefined: Enables you to select any of the standard hatch patterns.

User-defined: Enables you to define your own hatch pattern by specifying the angle and spacing, using the current linetype.

Custom: Enables you to choose a pattern you’ve created in your own .pat file.

Click the Pattern drop-down list to choose the hatch patterns. Or click the box marked with an ellipsis to open the Hatch Pattern palette and choose from the image tiles, as shown in Figure 16-18.

On the

Mhatch creates solid fills for a selection of closed objects. Look in \Software\Ch16\

CD-ROM

mhatch.

In the palette, click the tabs to see the different types of hatches. Click the image tile to choose a hatch pattern and click OK. The palette is simply another method of choosing the hatch pattern — you can also choose the pattern by using the Pattern drop-down list. The swatch shows you how your chosen hatch will look.

Cross-

You can drag hatches from your drawing to the Tools palette to create hatch tools that you can

Reference

then drag into your drawing. See Chapter 26 for a description of the Tools palette.

 

The Custom Pattern drop-down list is available only if you have chosen Custom as the pattern type. Here you choose the name of your custom hatch pattern.

Chapter 16 Drawing Complex Objects 429

Figure 16-18: The Hatch Pattern palette, shown with the Other Predefined tab on top.

Use the Angle text box to rotate the angle of the hatch pattern. You can choose from the dropdown list or type an angle. Watch out here — many of the patterns are already defined at an angle. The hatch pattern in Figure 16-19 uses a 0-degree angle because ANSI31 is defined as diagonal lines.

The Scale box determines the scale of the hatch pattern. You can choose from the drop-down list or type a scale. A scale of 1 (the default) creates the hatch as defined. A scale of 0.5 shrinks it by one-half. Figure 16-19 shows two hatch patterns using the ANSI31 pattern. The left one uses a scale of 1, and the right one uses a scale of 0.5.

Scale = 1

Scale = 5

Figure 16-19: You can scale the hatch pattern to your needs.

430 Part II Drawing in Two Dimensions

The Spacing box and the Double check box are available if you choose a user-defined hatch pattern. A user-defined hatch uses the current linetype and creates a hatch based on the spacing and angle you specify. Figure 16-20 shows a user-defined double hatch with an angle of 45 degrees and 0.1-unit spacing.

Figure 16-20: A user-defined hatch.

To define a user-defined hatch pattern:

1.Choose Hatch from the Draw toolbar to open the Boundary Hatch and Fill dialog box.

2.In the Type drop-down list, choose User-Defined.

3.In the Angle box, type an angle or choose one from the drop-down list. When creating a user-defined hatch, you need to specify the actual angle that you want to see.

4.In the Spacing box, enter the spacing between the lines. For example, type .5 to create a hatch pattern with lines 0.5 units apart.

5.If you want to cross-hatch so that the parallel lines are crossed by an equal number of perpendicular lines, check Double.

The ISO Pen Width box is available only for ISO predefined hatch patterns. This feature adjusts the scale of the pattern according to the pen width you specify. When you choose a pen width from the drop-down list, the scale shown in the Scale box automatically changes to be equal to the pen width. Note that you still have to separately set the width of your plotter pens when you plot your drawing.

In the next section, I explain how to place the hatch.

The Express Tools SUPERHATCH command creates a hatch pattern from an image, block, xref, or wipeout. Choose Express Draw Super Hatch. For information on installing Express Tools, see Appendix A.

Chapter 16 Drawing Complex Objects 431

Determining the hatch boundary

Hatching an entire object is the simplest way to place a hatch. But often the area you want to hatch is fairly complex, and the program needs to do some calculations to determine it.

The Boundary Hatch and Fill dialog box offers two ways to specify the hatch boundary — you can pick points inside an area and let the command try to find an enclosed boundary, or you can select objects. If you want to hatch an entire object:

1.Choose Select Objects. You return temporarily to your drawing.

2.Select all the objects you want to hatch. You can use all the standard object-selection options to select objects. Remove and Add are especially helpful.

3.Press Enter to end object selection and return to the dialog box.

If the area you want to hatch does not neatly fit into one or more objects, choose Pick Points. You return to your drawing and see the following:

Select internal point: Selecting everything...

Selecting everything visible...

Analyzing the selected data...

Select internal point:

 

The command is determining the boundary set, which is simply everything visible on the

 

screen. At the Select internal point: prompt, pick a point that is inside the boundary

 

that you want to hatch. You can continue to pick internal points to hatch adjoining areas.

 

Each boundary is helpfully highlighted. Press Enter to return to the dialog box.

Tip

While you’re in your drawing, either before or after picking points or selecting objects, you can

 

right-click to open a very useful shortcut menu.

Choose from the following options on the shortcut menu:

Enter: Returns you to the dialog box

Undo Last Select/Pick: Undoes your most recent object selection or point pick

Clear All: Undoes all your picks/object selections

Pick Internal Point: Switches to picking internal points

Select Objects: Switches to selection of objects

Normal Island Detection: Sets island detection to Normal mode

Outer Island Detection: Sets island detection to Outer mode

Ignore Island Detection: Sets island detection to Ignore mode

Preview: Previews the hatch

This shortcut menu enables you to manage the hatch boundary without returning to the dialog box. Previewing the hatch before applying it is always a good idea.

432 Part II Drawing in Two Dimensions

After previewing a hatch, right-click to accept the preview and place the hatch. Press Esc or left-click to return to the Boundary Hatch and Fill dialog box. From the dialog box, click OK to create the hatch and return to your drawing.

Note

To display hatches — solid fill or lines — the FILL system variable must be on, which it is by

 

default. To turn FILL off, type fill and off . You must regenerate the drawing to see the

 

effect.

The dialog box has several other options:

Click Preview if you want to try it before you apply it.

Click View Selections if you want to temporarily return to your drawing and check which objects you’ve selected.

Choose Inherit Properties to use the hatch type, pattern, angle, scale, and/or spacing of an existing hatch. You return to your drawing to pick a hatch pattern. You then return to the Boundary Hatch and Fill dialog box.

Choose a draw order for hatches from the Draw Order drop-down list. By default, hatches display behind their boundaries, so that when you pick a boundary, you select the boundary, not the hatch.

New

Control over the draw order of hatches is new for AutoCAD 2005 and AutoCAD LT 2005.

Feature

 

Click Nonassociative if you want to create a hatch that is not associated with its object. By default, hatches are associative.

Caution

If you use the new gap tolerance feature (which I cover in the “Other advanced options” sec-

 

tion later in this chapter, subsequent hatches are set to nonassociative. If you want associa-

 

tive hatches for closed areas, be sure to choose Associative in the Composition area of the

 

dialog box.

The Remove Islands option is discussed in the next section.

Islands

Islands are enclosed areas entirely inside a hatch boundary. Islands make hatching more difficult because you may or may not want to hatch the inside of the island.

Note Text is counted as an island, enabling you to hatch areas that contain text without hatching over the words.

Managing islands when you select objects to hatch

When you choose the hatching boundary by selecting objects, you must also select the islands. If you select the entire area by window, you automatically include the internal islands. If you need to pick individual objects, you must also pick the islands individually. If you later erase an island, you don’t lose hatch associativity and the hatch regenerates so that it covers the entire outer boundary.

Chapter 16 Drawing Complex Objects 433

The resulting hatch depends on the boundary style. To specify the boundary style, in the Boundary Hatch and Fill dialog box, click the Advanced tab, shown in Figure 16-21.

Figure 16-21: The Advanced tab is used to refine the hatching process.

Three boundary styles affect how islands are hatched:

Normal: Hatches alternating areas so that the outer area is hatched, the next inner island is not hatched, the next inner island is hatched, and so on.

Outer: Hatches only the outer area and does not hatch any inner islands.

Ignore: Ignores islands and hatches everything from the outside in.

Figure 16-22 shows three copies of a nut hatched in the three styles. To hatch this model, I selected the entire model, except the spout at the bottom, with a window.

Normal

Outer

Ignore

Figure 16-22: Hatching islands using the three boundary styles.

434 Part II Drawing in Two Dimensions

Managing islands when you pick points to specify the hatch

When you pick points instead of selecting objects, you don’t need to select the islands. Hatching detects islands by default. As soon as you pick points, the Remove Islands button becomes available, and you can select the islands to remove them from consideration. For example, if you remove all the islands shown in Figure 16-22, the result is the same as using the Ignore style — everything inside the outside boundary is hatched.

Other advanced options

On the Advanced tab, you can also specify a smaller boundary set than the objects visible onscreen. Use this when you’re picking points and have such a complex drawing that the process of analyzing the visible objects takes a long time.

When you pick points to determine the hatch boundary, the hatching process uses the same mechanism as the BOUNDARY command to temporarily create a boundary for hatching. Check Retain Boundaries on the Advanced tab if you want to draw the boundary as an object and specify if you want it to be a region or a polyline. Otherwise, the boundary is discarded when the hatch is placed. For more information, see the discussion of the BOUNDARY command earlier in this chapter.

You can choose whether you want to include islands in the boundaries by choosing the Island detection method. The Flood method includes islands as boundary objects. The Ray casting method excludes islands as boundary objects.

New

You can now hatch areas that are not completely closed using the new Gap Tolerance feature.

Feature

In the Gap Tolerance text box, enter a value greater than the size of the gap. You can use val-

 

 

ues from 0 to 5000. In order to hatch an unclosed area in this way, you need to pick points

 

rather than choose objects. When you do so, the Open Boundary Warning message opens.

 

Click Yes to hatch the open boundary. Note that the hatch is not associative, which means that

 

if you modify your almost closed area, you need to rehatch.

Dragging and dropping hatch patterns

After you have spent the time creating a hatch, you may want to use that hatch in other drawings. You can open a .pat (hatch pattern) file from the DesignCenter, preview its hatch patterns, and drag any hatch pattern into any closed object in your current drawing. Here’s how to drag a hatch pattern from the DesignCenter:

1.Click DesignCenter on the Standard toolbar (or press Ctrl+2) to open the DesignCenter.

2.Use the Tree view to navigate to the folder that contains your acad.pat, aclt.pat, or other .pat file. If necessary, click the Desktop button and navigate from there.

Note

To find the location of your .pat files, choose Tools Options and click the File tab. Double-

 

click the Support File Search Path option. One of the paths listed contains your hatch files.

3.Double-click the folder and select a hatch pattern (.pat) file. A preview of all the hatch patterns appears in the right pane.

4.From the right pane of the DesignCenter, drag the hatch pattern that you want onto a closed object in your drawing (or an unclosed object with the gap tolerance value

greater than the gap). If you need more options, right-click the pattern as you drag and choose BHATCH from the shortcut menu to open the Boundary Hatch and Fill dialog box and specify the hatch parameters in the usual way.

Chapter 16 Drawing Complex Objects 435

You can drag a hatch pattern to a tool palette to create a hatch with the properties, such as layer and angle, of the hatch in your drawing. Then you can drag that hatch tool onto any closed area in your drawing. The hatch automatically fills the area with the same properties. For more information on tool palettes, see Chapter 26.

Creating gradient fills

Gradients are fills that gradually change from dark to light or from one color to another. Use gradients to create presentation-quality illustrations without rendering. You can use gradients as a substitute for shading because they offer more-flexible options. AutoCAD LT doesn’t offer the gradient feature.

To create a gradient:

1.Choose Hatch from the Draw toolbar to open the Boundary Hatch and Fill dialog box.

2.Click the Gradient tab, shown in Figure 16-23.

Figure 16-23: Use the Gradient tab of the Boundary Hatch and Fill dialog box to create gradient fills of closed objects.

3.Choose One Color or Two Color.

If you choose One Color, click the ellipsis button to the right of the color swatch to open the Select Color dialog box, where you can choose the color you want. (For instructions on using this dialog box, see Chapter 11.) Then use the Shade/ Tint slider to choose if you want the gradient to range lighter or darker. You see the result in the gradient swatches below the slider.

If you choose Two Colors, you see two color swatches. Click each ellipsis button and choose a color.

4.Choose one of the nine gradient styles.

436 Part II Drawing in Two Dimensions

5.If you want the gradient to be symmetrical, check the Centered check box. To create a gradient that isn’t symmetrical, uncheck the Centered check box. When you uncheck the Centered check box, the gradient focus moves up and to the left. (You can change this location by changing the angle, as explained in the next step.)

6.From the Angle drop-down list, choose an angle. If your gradient is centered, the gradient rotates around its center and remains symmetrical. If your gradient is not centered, the gradient rotates around the edges. Watch the gradient style tiles to see the results. You can type an angle that is not on the list.

7.Choose Pick Points to pick a location inside a closed area or choose Select Objects to select closed objects, as explained in the section, “Determining the hatch boundary.” (The other options are the same as for hatches.) In your drawing, specify the area you want to hatch and then end selection to return to the dialog box.

8.To preview the gradient, click Preview. To return to the dialog box, press Esc.

9.Click OK to finalize the hatch.

You can use the Gap Tolerance feature to fill an almost enclosed area with a gradient. For more information, see the discussion on hatches in the “Other advanced options” section earlier in this chapter.

See Figure 16-24 for an example of some gradient fills. You could turn off the boundary layer for a more realistic look.

Figure 16-24: These gradients give the illusion of light shining from the left. (Refer to Figure 8-26, which shows the original isometric drawing without the gradients.)

Thanks to James Wedding for permission to use this drawing from Jones & Boyd, Inc.

Editing hatches

To edit a hatch pattern including a solid or gradient, double-click it. The Hatch Edit dialog box (shown in Figure 16-25) opens. You can also choose Modify Object Hatch and then select a hatch object.

As you can see, this dialog box is exactly the same as the Boundary Hatch and Fill dialog box, except that not all the options are available. You can use this dialog box to change any of the hatch properties. You can change the boundary style on the Advanced tab. You can also preview the hatch. After you make your changes, click Apply to return to your drawing.

Chapter 16 Drawing Complex Objects 437

Figure 16-25: The Hatch Edit dialog box.

Because hatches are associative (unless you explode them or choose to create them as nonassociative), when you edit their boundaries, they adjust to fit the new boundary. However, if the new boundary is no longer closed, the hatch may lose its associativity. You see the Hatch boundary associativity removed warning message.

New

By default, object snaps don’t work with hatch lines so that you don’t accidentally draw to a

Feature

hatch line instead of a nearby object. If you want to snap to hatch lines, choose Tools

 

 

Options, click the Drafting tab, and uncheck the Ignore Hatch Objects checkbox. Click OK to

 

return to your drawing.

You can also edit a gradient (AutoCAD only) in the Properties palette. Choose Properties on the Standard toolbar and use the items in the Pattern section. You can change the colors, angle, type, and whether or not it is centered.

You may find it difficult to select solid fill hatches. In some locations, you can pick the solid hatch, while at other points you get the Other corner: prompt, meaning that no object was found. Try a crossing window. If necessary, try a crossing window at the edge of the hatch. This always selects the solid hatch but also selects the boundary. Hatches have a grip at their center. If you can find the grip and include it in the window, you can easily select the solid hatch.

New

You can now trim hatches. Choose any object that crosses the hatch as the cutting edge and

Feature

then select the hatch (on the side you want to trim) as the object to trim. Chapter 10 covers

 

 

trimming objects.

On the

The drawing used in the following Step-by-Step exercise on creating and editing hatches,

CD-ROM

ab16-f.dwg, is in the Drawings folder on the CD-ROM.

438 Part II Drawing in Two Dimensions

STEP-BY-STEP: Creating and Editing Hatches

1.Open ab16-f.dwg from your CD-ROM.

2.Save the file as ab16-06.dwg in your AutoCAD Bible folder.

3.Choose Hatch from the Draw toolbar. On the Hatch tab of the Boundary Hatch and Fill dialog box, choose ANSI35 from the Pattern drop-down list. From the

Scale drop-down list, choose 0.5. Click Select Objects.

4.You’re now back in your drawing. Pick the two large circles in Figure 16-26. Right-click and choose Preview. Press Esc to return to the dialog box. Click OK to create the hatch and end the BHATCH command.

1 2 3 4

Figure 16-26: The result after editing the two hatches.

5.Again choose Hatch from the Draw toolbar. From the Type drop-down list, choose User-defined. Set the angle to 135 and the spacing to 0.05.

6.Choose Pick Points. In your drawing, pick points 1, 2, 3, and 4 in Figure 16-26. Right-click and choose Preview. Right-click again to create the hatch and end the BHATCH command.

7.Click the circumference of the left large circle. (If necessary, zoom in to avoid selecting

the hatching.) Pick the top grip to make it hot. At the Specify stretch point or [Base Point/Copy/Undo/eXit]: prompt, type .35 . Press Esc to remove the grips.

8.Double-click one of the hatches at the top of the model. Notice that this action selects all the hatches because they were created with one command. In the Hatch Edit dialog box that opens, change the angle to 90 and the spacing to 0.04. Click OK. Your drawing should look like Figure 16-26.

9.Save your drawing.

Using the SOLID command

The SOLID command creates solidly filled areas. (It is not directly related to 3D solids.) In general, BHATCH is much more flexible. However, although the SOLID command is a 2D command, it’s sometimes used in 3D drawing. When you create a 2D solid and give it thickness, it creates surfaces with tops and bottoms. See Chapter 24 for a description of how to use the SOLID command to create 3D models.