Working with Hatch Patterns and Solid Fills


Just about every drawing program has a Paint Bucket tool that lets you fill a closed area with a color or a pattern. AutoCAD has a tool that performs a similar function, though it is considerably more complex than a simple Paint Bucket tool.

The Boundary Hatch command lets you add patterns, solid fills, and gradient colors to any closed polygon (see Figure 3.15). The closed polygon can consist of any combination of objects. The only requirement is that the area to be hatched must not have large gaps.

image from book
Figure 3.15: Examples of hatch patterns within random shapes formed by a spline, a circle, an arc, and a rectangle

Placing Hatch Patterns: The Basics

A Paint Bucket tool usually just requires you to select a pattern and then click inside an area to be filled. AutoCAD requires you to work through a dialog box to select patterns and areas to fill. This section describes the basic methods for adding hatches and fills.

You can select a hatch pattern from a set of predefined patterns, or if you need just a simple hatch pattern, you can use a user-defined pattern, which is really just the standard crosshatch lines. This first example describes how to use a user-defined hatch pattern.

  1. image from book To open the Hatch and Gradient dialog box, as shown here, click the Hatch tool on the fly-out toolbar of the 2D Draw control panel, or enter H. Hatch is also located in the Draw drop-down menu.

    image from book

  2. In the Type drop-down list in the Type and Pattern section, select User Defined. The User Defined option lets you define a simple crosshatch pattern by specifying the line spacing of the hatch and whether it is a single- or double-hatch pattern. The Angle and Spacing input boxes become available so that you can enter values.

  3. Enter the spacing between the cross-hatching in the Spacing input box.

  4. Enter the angle for the cross-hatching in the Angle input box.

  5. Turn on the Double option (just below the Angle input box) if you want a crosshatch hatch pattern. Also notice that the Swatch sample box in the Type and Pattern group displays a sample of your hatch pattern.

  6. image from book In the Boundaries section, click the Add Pick Points button. The dialog box momentarily closes, allowing you to select a point inside the area you want hatched.

  7. Click a point anywhere inside the area you want hatched. Notice that a highlighted outline appears in the area. This is the boundary AutoCAD has selected to enclose the hatch pattern. You can select additional closed areas at this time.

    If you have text in the hatch boundary, AutoCAD avoids hatching over it, unless the Ignore option is selected in the Island Display Style options. You can find the Island Display Style options in the expanded view of the Hatch and Gradient dialog box. See "Controlling the Behavior of Hatch Patterns and Fills" later in this chapter.

  8. Press to return to the Hatch and Gradient dialog box.

  9. Click the Preview button in the lower-left corner of the dialog box. The hatch pattern appears in the area you indicated in step 6. You'll also see the following prompt:

       Pick or press Esc to return to dialog or <Right-click to accept hatch>: 

  10. Press Esc or the spacebar to return to the dialog box to make further changes, or right-click to apply the hatch pattern. You can also press to apply the hatch pattern.

In this example, you selected only one area to fill. You can select multiple areas, as indicated in step 6. If after you have previewed the hatch pattern in step 8 you decide you need to select more areas, you can do so by clicking the Add Pick Points button again and selecting more areas.

In step 6, AutoCAD finds the actual boundary for you. Many options give you control over how a hatch boundary is selected. For details, see the section "Understanding the Boundary Hatch Options" later in this chapter.

Say you want to add a hatch pattern that you previously inserted in another part of the drawing. You might think you have to guess at its scale and rotation angle. But with the Inherit Properties option in the Hatch and Gradient dialog box, you can select a previously inserted hatch pattern as a prototype for the current hatch pattern. However, this feature does not work with exploded hatch patterns.

Using Predefined Patterns

The user-defined hatch pattern is just one type of hatch you can apply to a drawing. AutoCAD also provides sets of predefined patterns. Figure 3.16 shows you all the patterns available. You can also create your own custom patterns, though that process is beyond the scope of this book.

image from book
Figure 3.16: The predefined hatch patterns available in AutoCAD

To use any of these patterns, select the Predefined option from the Type drop-down list in the Hatch and Gradient dialog box.

image from book

You can then select a predefined hatch pattern by clicking the Browse button to the right of the Pattern drop-down list to open the Hatch Pattern Palette dialog box. The Browse button in AutoCAD is indicated by an ellipsis.

image from book

From here you can select a pattern from one of four tabs: ANSI, ISO, Other Predefined, and Custom. The ANSI and ISO patterns are standard patterns used with the ANSI and ISO standards. The Other Predefined patterns are architectural and other patterns you might find useful. The Custom patterns are ones that users have created on their own and placed in a special file.

Within the Other Predefined tab, patterns with the AR prefix are architectural patterns that are drawn to full scale. In general, you will want to leave their scale settings at 1. You can adjust the scale after you place the hatch pattern using the Properties palette, as described later in this chapter.

Adding Solid Fills

To add solid fills, you use the same process as adding a predefined hatch pattern, but you use a specific predefined pattern called a solid. You can see the solid pattern at the top left of the Other Predefined tab of the Hatch Pattern Palette dialog box.

image from book

When you use this pattern, a solid color, initially black, fills the area you select for hatching. You can change the color by altering the Color property of the solid hatch pattern. See Chapter 4 for more about editing the properties of objects.

image from book
ANNOTATIVE HATCH PATTERNS

AutoCAD 2008 offers a feature called annotation scale. With this feature, you can assign several scales to certain types of objects, and AutoCAD will display the object to the proper scale of the drawing. Hatches can take advantage of this feature to allow hatch patterns to adjust their spacing or pattern size to the scale of your drawing. The Annotative option in the Options group of the Hatch and Gradient dialog box turns on the annotation scale feature for hatch patterns. You'll learn how to use annotation scale in Chapter 8.

image from book

Positioning Hatch Patterns Accurately

In the previous example, you placed the hatch pattern without regard for the location of the lines that make up the pattern. In most cases, however, you will want accurate control over where the lines of the pattern are placed. For example, you might want to place a floor tile pattern in a specific location in a floor plan. Or you might want to find the most efficient location for ceiling tiles in a ceiling plan. In the top image in Figure 3.17, a floor tile pattern is placed without regard for the snap origin. The hatch pattern around the perimeter is not evenly spaced. With some careful planning, the hatch pattern's origin is moved to the location shown in the lower image in Figure 3.17. This results in a more evenly spaced tile pattern around the perimeter of the room.

image from book
Figure 3.17: Placing a floor tile pattern where you want it using Hatch Origin

You can also click the Swatch button to browse through a graphical representation of the predefined hatch patterns.

Hatch patterns use the same origin as the snap origin. (See Chapter 2 for more information about the snap origin.) By default, this origin is the same as the drawing origin, 0,0. You can change the snap origin (and thus the hatch pattern origin) by using the Snapbase command. The hatch pattern then uses the new snap base as its origin.

The Hatch and Gradient dialog box also contains a set of options that let you select an origin for the pattern you are currently placing in the drawing. You can use the Hatch Origin option group in the lower-left corner to determine a point in the drawing to be the hatch origin.

image from book

To set a hatch origin, select the Specified Origin option. You can then determine the origin in two ways. You can click the Click to Set New Origin button. The dialog box temporarily closes to let you select an origin in the drawing. The Hatch and Gradient dialog box then returns so that you can apply more options to your hatch pattern.

The other way to set the hatch origin is to use the Default to Boundary Extents option. This option lets you set the origin based on the extents of the hatch boundary rather than on a point you select. The hatch boundary extents is an imaginary rectangle that represents the outermost boundary of the pattern. If you are hatching a rectangular area, the hatch boundary extents is the same as your selected boundary, but if the area is an irregular shape, an imaginary rectangular area defines the outermost boundary of the pattern, as shown in Figure 3.18. In this figure, the pattern outside the irregular shape shows you the relationship between the visible pattern and the boundary extents. In reality, only the dark pattern within the irregular shape is drawn.

image from book
Figure 3.18: Boundary extents are shown in gray. The hatch pattern appears only within the irregular shape.

When you select this option, you can select options from the drop-down list: Bottom Right, Bottom Left, Top Right, Top Left, and Center. You can select one of these five options to position the hatch origin in relation to the boundary extents. A graphic appears to the right of the list to show the location of the hatch origin. A red cross appears on the graphic telling you where the origin will be when you add the pattern.

The Store as Default Origin option maintains the origin you select as the default hatch origin for later hatch pattern insertions.

Editing the Hatch Area

The Hatch command has an option, Associative, that automatically adjusts the shape of a pattern to any changes in the boundary of the hatch pattern. (The Associative option is in the Options section on the Hatch tab in the Hatch and Gradient dialog box.)

image from book

When the Associative option is turned on, the hatch pattern "flows" into any changes you make to the boundary of the pattern. In the right image in Figure 3.19, the diagonal hatch pattern in the center of the rectangle changes when the arc is moved. (The original pattern appears in the left image.)

image from book
Figure 3.19: The Associative hatch option causes hatch patterns to automatically adjust to changes in the pattern's boundary.

The Associative option can save time when you need to modify your drawing, but you need to be aware of its limitations. A hatch pattern can lose its associativity when you do any of the following:

  • Erase or explode a hatch boundary

  • Erase or explode a block that forms part of the boundary

  • Move a hatch pattern away from its boundary

These situations frequently arise when you edit an unfamiliar drawing. Often, boundary objects are placed on a layer that is off or frozen, so the boundary objects are not visible. Or the hatch pattern might be on a layer that is turned off, and you proceed to edit the file, not knowing that a hatch pattern exists. When you encounter such a file, take a moment to check for hatch boundaries so you can deal with them properly. You might need to turn on or thaw all the layers in the drawing so you can make all of the hatch patterns visible and selectable (see chapter 7, "Getting Organized with Layers," for more on layers).

Modifying a Hatch Pattern

Like everything else in a project, a hatch pattern might eventually need changing in some way. Hatch patterns are like blocks in that they act like single objects. You can explode a hatch pattern to edit its individual lines. The Properties palette contains most of the settings you'll need to make changes to your hatch patterns:

  1. Double-click the hatch pattern you want to edit. The Hatch Edit dialog box looks the same as the Hatch and Gradient dialog box.

    image from book

    When you double-click a hatch pattern, you don't display the typical Properties palette. Double-clicking complex objects such as text, blocks, attributes, and hatch patterns opens a dialog box in which you can edit the object in a more direct way. You can still access the Properties palette for any object by selecting the object, right-clicking, and choosing Properties from the shortcut menu.

  2. Click the Browse button to the right of the Pattern drop-down list to open the Hatch Pattern Palette dialog box. If the Browse button is not available, make sure that Predefined is selected in the Type drop-down list.

    image from book

  3. Double-click the pattern you want to use.

  4. Click OK to accept the change to the hatch pattern. The selected pattern appears in place of the original pattern.

In this example, I used a predefined pattern. You can also replace a pattern with a user-defined pattern if you prefer. Select User Defined from the Type drop-down list, and then specify spacing and angle values.

The other items in the Hatch Edit dialog box duplicate some of the options in the Hatch and Gradient dialog box. They let you modify the individual properties of the selected hatch pattern. The section "Understanding the Boundary Hatch Options" describes these other properties in detail.

image from book

If you create and edit hatch patterns frequently, you will find the Modify II toolbar useful. It contains an Edit Hatch tool that gives you ready access to the Hatch Edit dialog box. To open the Modify II toolbar, right-click an empty area on any toolbar, and then click Modify II in the shortcut menu that opens.

If you prefer, you can make modifications to a hatch pattern through the Properties palette. To open the Properties palette, right-click a pattern, and choose Properties from the shortcut menu. The Properties palette displays a Pattern category, which offers a Pattern Name option.

When you click this option, a Browse button appears. Click it to open the Hatch Pattern Palette dialog box. You can then select a new pattern from the dialog box. The Type option in the Properties palette lets you change the type of hatch pattern from Predefined to User Defined or Custom.

Understanding the Boundary Hatch Options

The Hatch and Gradient dialog box contains many other options that you didn't explore in the previous exercises. For example, instead of selecting the area to be hatched by clicking a point, you can select the actual objects that bound the area you want to hatch using the Add: Select Objects button. Clicking the Swatch sample box in the Type and Pattern group opens the Hatch Pattern Palette dialog box, which lets you select a predefined hatch pattern from a graphic window.

Other options in the right column of the Hatch and Gradient dialog box include the following:

  • Remove Boundaries Lets you remove objects that you do not want to include as part of the boundary. Examples of this are furniture outlines in a floor pattern or some objects that you might have accidentally selected as part of a boundary set.

  • Recreate Boundary Allows you to re-create a boundary after you've added a polyline or region to an existing hatch pattern boundary.

  • View Selections Temporarily closes the dialog box and then highlights the objects that have been selected as the hatch boundary by AutoCAD. Press to return to the dialog box.

  • Create Separate Hatches You can hatch several separate areas at once in AutoCAD, but by default, even though the hatches are in separate areas, they behave as one object. You can force separate hatch areas to behave as separate hatch objects by turning on this option.

  • Draw Order Lets you control whether your hatch pattern is drawn over existing objects or whether they are to be placed "underneath" existing objects. Hatch patterns can cover or draw over existing graphics. This is especially true of solid fill or gradient hatch patterns.

  • Inherit Properties Lets you select a hatch pattern from an existing one in the drawing. This is helpful when you want to apply a hatch pattern that is already used but you do not know its name or its scale, rotation, or other properties.

At the top of the column of options in the Options group is the Associative option. This option lets you determine whether the hatch pattern being inserted is associative or nonassociative. As discussed earlier, an associative hatch pattern automatically changes to fill its boundary whenever that boundary is stretched or edited.

Controlling the Behavior of Hatch Patterns and Fills

AutoCAD's Boundary Hatch command has a fair amount of intelligence. It can detect the shape of an area and fill the area accordingly. Boundary Hatch can also detect objects within a closed area, such as an island, and hatch around it, as shown in Figure 3.20.

image from book
Figure 3.20: A hatch pattern can fill a complex shape and detect islands within the shape.

image from book

If you prefer, you can control how AutoCAD treats these island conditions and other situations by expanding the Hatch and Gradient dialog box. To do this, click the More Options button in the lower-right corner of the dialog box.

The dialog box expands to the right, showing several more options.

image from book

In addition to controlling the island detection feature of hatch patterns, the additional Hatch and Gradient options let you fine-tune other aspects of hatch pattern creation.

ISLANDS

The options in the Islands section control how nested boundaries affect the hatch pattern. The graphics show the effect of the selected option. The Islands options include the following:

  • Island Detection Detects an island within a boundary.

  • Normal Causes the hatch pattern to alternate between nested boundaries. The outer boundary is hatched; if a closed object is within the boundary, it is not hatched. If another closed object is inside the first closed object, that object is hatched. This is the default setting.

  • Outer Applies the hatch pattern to an area defined by the outermost boundary and by any boundaries nested within the outermost boundary. Any boundaries nested within the nested boundaries are ignored.

  • Ignore Supplies the hatch pattern to the entire area within the outermost boundary, ignoring any nested boundaries.

BOUNDARY RETENTION

The Boundary Hatch command can also create an outline of the hatch area using one of two objects: 2D regions, which are like 2D planes, or polyline outlines. Boundary Hatch actually creates such a polyline boundary temporarily to establish the hatch area. These boundaries are automatically removed after the hatch pattern is inserted. If you want to retain the boundaries in the drawing, make sure the Retain Boundaries check box is selected. Retaining the boundary can be useful if you know you will be hatching the area more than once or if you are hatching a fairly complex area.

BOUNDARY SET

If the current view contains a lot of graphic data, AutoCAD can have difficulty or be slow in finding a boundary. If you run into this problem or if you want to single out a specific object for a point selection boundary, you can further limit the area that AutoCAD uses to locate hatch boundaries by using the Boundary Set options:

  • New Lets you select the objects from which you want AutoCAD to determine the hatch boundary, instead of searching the entire view. The screen clears and lets you select objects. This option discards previous boundary sets. It is useful for hatching areas in a drawing that contain many objects that you do not want to include in the hatch boundary.

  • Current Viewport Tells you that AutoCAD will use the current view to determine the hatch boundary. Once you select a set of objects using the New button, you'll also see Existing Set as an option in this drop-down list. You can then use this drop-down list to choose the entire view or the objects you select for the hatch boundary.

The Boundary Set options are designed to give you more control over the way a point selection boundary is created. These options have no effect when you use the Add: Select Objects button to select specific objects for the hatch boundary.

GAP TOLERANCE

This option lets you hatch an area that is not completely enclosed. The Tolerance value sets the maximum gap size in an area that you want to hatch. You can use a value from 0 to 5000.

INHERIT OPTIONS

If you use the Inherit Properties hatch option to duplicate an existing hatch pattern, the Inherit Options group lets you determine the pattern's origin.

Choosing Colors and Patterns for Gradient Fill Shading

image from book You might have noticed that one of the hatch patterns offered is a solid. The solid hatch pattern lets you apply a solid color to a bounded area instead of a pattern. AutoCAD also offers a set of gradient patterns that let you apply a color gradient to an area.

You can apply a gradient to an area in the same way that you apply a hatch pattern, but instead of using the Hatch tab of the Hatch and Gradient dialog box, you use the Gradient tab to select a gradient pattern.

image from book

Instead of hatch patterns, the Gradient tab presents a variety of gradient patterns. It also lets you control the color of the gradient. For example, if you want to set shades of blue, you can click the One Color button and then double-click the blue color swatch.

image from book

When you double-click the color swatch, the Select Color dialog box opens, displaying a palette of true color options.

image from book

You can then select the color you want for the gradient. The Shade/Tint slider just to the right of the color swatch on the Gradient tab lets you control the shade of the single-color gradient.

If you want the gradient to transition between two colors, click the Two Color radio button. When you click Two Color, the slider below the Two Color option changes to a color swatch. You can double-click the swatch or click the Browse button to the right of the swatch to open the Select Color dialog box.

Just below the One Color and Two Color options are the gradient pattern options. You can choose from nine patterns, and you can select an angle for the pattern from the Angle drop-down list. The Centered option places the center of the gradient at the center of the area selected for the pattern.

To place a gradient pattern, select a set of objects or a point within a bounded area, just as you would for a hatch pattern. You can then click the Preview button to preview your hatch pattern, or you can click OK to apply the gradient to the drawing.

image from book
HOW TO QUICKLY MATCH A HATCH PATTERN AND OTHER PROPERTIES

Another tool to help you edit hatch patterns is Match Properties, which is similar to Format Painter in the Microsoft Office suite. This tool lets you change an existing hatch pattern to match another existing hatch pattern. Here's how to use it:

  1. Click the Match Properties tool in the Standard toolbar.

  2. Click the source hatch pattern you want to copy.

  3. Click the target hatch pattern you want to change.

The target pattern changes to match the source pattern. The Match Properties tool transfers other properties as well, such as layer, color, and linetype settings. You can select the properties that are transferred by opening the Property Settings dialog box.

image from book

To open this dialog box, enter S after selecting the object in step 2, or right-click and choose Settings from the shortcut menu. You can then select the properties you want to transfer from the options shown. All the properties are selected by default. Note that you can also transfer text and dimension style settings. You'll learn more about text and dimension styles in Chapters 9 and 10.

image from book

image from book
TIPS FOR USING THE BOUNDARY HATCH

Here are a few tips for using the Boundary Hatch feature:

  • Watch out for boundary areas that are part of a large block. AutoCAD examines the entire block when defining boundaries. This can take time if the block is quite large. Use the Boundary Set option to "focus in" on the set of objects you want AutoCAD to use for your hatch boundary.

  • If the area to be hatched is large yet will require fine detail, first outline the hatch area using a polyline. Then use the Add: Select Objects tool in the Hatch And Gradient dialog box to select the polyline boundary manually, instead of depending on Boundary Hatch to find the boundary for you.

  • Consider turning off layers that might interfere with AutoCAD's ability to find a boundary. Boundary Hatch works on nested blocks as long as the nested block entities are parallel to the current UCS.

image from book




Introducing AutoCAD 2008
Introducing AutoCAD 2008
ISBN: 0470121505
EAN: 2147483647
Year: 2007
Pages: 147
Authors: George Omura

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net