Customizing Hatch Patterns

It is possible to add new patterns to the ones supplied with AutoCAD. You can add these new patterns (called custom hatch patterns) to the file ACAD.PAT (or ACADISO.PAT for metric patterns), or you can define each new pattern and assign it to its own .PAT file. ACAD.PAT and ACADISO.PAT are found in the ACADR15SUPPORT folder of a standard AutoCAD installation. If you choose to store each custom pattern in its own .PAT file, the file must have the same name as the pattern. The new custom pattern files should be placed in one of the directories/folders defined in your installation’s support file search path (see the OPTIONS command). Because hatch pattern files are ASCII files, a text editor is all you need to create these custom pattern files and to add them to the ACAD.PAT file.

Note

If you choose to add custom hatch patterns to the ACAD.PAT file, you should first make a backup copy of this file. This will allow you to revert to a functional file should ACAD.PAT become corrupted. Creating a folder under your AutoCAD 2002 installation called SAFE, for example, provides a convenient place to locate such backup files.


A hatch pattern consists of one or more families of parallel pattern lines. The rules for defining a pattern line are the same as those for defining a new linetype except that no text or shapes can be included in the definition of a hatch pattern line (refer to Chapter 5,“Using Linetypes and Lineweights Effectively,” for information on linetypes). A pattern definition can be broken down into two components: the header and the definition body. These will be explained in the next section.

Note

Although the rules for defining a hatch pattern are relatively straightforward, implementing the rules can take time, effort, and patience. A much easier and more cost-effective solution might be to purchase any of several third-party hatch pattern sets. If you definitely want to define your own pattern, read on.


Defining the Header Line

The first line in any pattern definition is called the header line. The format for the header line is as follows:

							*Pattern-name [, description]
						

The pattern name cannot contain any blank spaces. As shown, the description and the preceding comma are optional and are used only by the HATCH command.

Tip

Although the description portion of the header line is optional, you may want to always include a descriptive phrase. This is especially helpful when working in the ACAD.PAT file, where the pattern names are frequently short and non-descriptive.


The header line is followed by one or more pattern line descriptors, one for each family of lines. A pattern line has the following syntax:

Angle, x-origin, y-origin, delta-x, delta-y [,dash-1, dash-2, …] 

The following line descriptor, for example, would result in the hatch shown on the left in Figure 16.20:

Figure 16.20. The L45 and TRIANG patterns.


*L45, 45 degree lines @0.25 units 
45,0,0,0,0.25 

Each family of lines starts with one line, and the line’s angle and origin are specified by the first three numbers of the line descriptor. In the L45 example, the first line is drawn at a 45-degree angle through the point 0,0. The family of lines is generated by offsetting each successive line by delta-x and delta-y offsets with delta-x measured along the line and delta-y measured perpendicular to the lines. In L45, each succeeding line is offset 0 in the x direction and 0.25 in the y direction. With no other dash specifications included in the definition, AutoCAD draws the lines with the current linetype.

The pattern shown on the right in Figure 16.20 is one found in AutoCAD’s ACAD.PAT file. It has the following definition:

*TRIANG, Equilateral triangles 
60, 0,0, .1875,.324759526, .1875,-.1875 
120, 0,0, .1875,.324759526, .1875,-.1875 
0, -.09375,.162379763, .1875,.324759526, .1875,-.1875 

In this example, the pattern consists of three families of lines: one family drawn at 60 degrees, another drawn at 120 degrees, and a third drawn at 0 degrees. The dash specifications (the last two numbers of each line) indicate that each line is to consist of a 0.1875 dash and a 0.1875 space repetitive pattern.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.151