Creating Hatch Patterns


AutoCAD provides several predefined hatch patterns you can choose from (see Figure 20.9), but you can also create your own. This section demonstrates the basic elements of pattern definition.

click to expand
Figure 20.9: The standard hatch patterns

Unlike line types, hatch patterns cannot be created while you are in an AutoCAD file. The pattern definitions are contained in an external file named Acad.pat . You can open and edit this file with a text editor that can handle ASCII files, such as Windows Notepad. Here is one hatch pattern definition from that file:

*square,Small aligned squares
0, 0,0, 0,.125, .125,-.125
90, 0,0, 0,.125, .125,-.125

You can see some similarities between pattern descriptions and line-type descriptions. They both start with a line of descriptive text and then give numeric values defining the pattern. However, the numbers in pattern descriptions have a different meaning. This example shows two lines of information. Each line represents a line in the pattern. The first line determines the horizontal line component of the pattern, and the second line represents the vertical component. Figure 20.10 shows the hatch pattern defined in the example.

click to expand
Figure 20.10: A square pattern

A pattern is made up of line groups. A line group is like a line type that is arrayed a specified distance to fill the area to be hatched. A line group is defined by a line of code, much as a line type is defined. In the square pattern, for instance, two lines ”one horizontal and one vertical ”are used. Each of these lines is duplicated in a fashion that makes the lines appear as boxes when they are combined. Figure 20.11 illustrates this point.

click to expand
Figure 20.11: The individual and combined line groups

Look at the first line in the definition:

0, 0,0, 0,.125, .125,-.125

This example shows a series of numbers separated by commas; it represents one line group. It actually contains four sets of information, separated by blank spaces:

This system of defining hatch patterns might seem somewhat limiting, but you can do a lot with it. Autodesk managed to come up with 69 patterns ”and that was really only scratching the surface.

Tip  

If you want to include thick lines in your hatch patterns, you have to "build up" line widths with multiple line-type definitions.

click to expand
Figure 20.14: How the direction of the line group copy is determined



Mastering AutoCAD 2005 and AutoCAD LT 2005
Mastering AutoCAD 2005 and AutoCAD LT 2005
ISBN: 0782143407
EAN: 2147483647
Year: 2004
Pages: 261
Authors: George Omura

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