Overview of Hatch Pattern Definitions (Concept)

AutoCAD

 
Overview of Hatch Pattern Definitions
Concept Procedure Quick Reference
 
 
 

In addition to using the predefined hatch patterns that are supplied, you can design and create your own custom hatch patterns.

In addition to using the predefined hatch patterns that are supplied, you can design and create your own custom hatch patterns. Developing a hatch pattern definition requires knowledge, practice, and patience. Because customizing hatches requires familiarity with hatch patterns, it is not recommended for new users.

The hatch patterns supplied by AutoCAD are stored in the acad.pat and acadiso.pat text files. You can add hatch pattern definitions to this file or create your own files.

Regardless of where the definition is stored, a custom hatch pattern has the same format. It has a header line with a name, which begins with an asterisk and is no more than 31 characters long, and an optional description:

*pattern-name, description

It also has one or more line descriptors of the following form:

angle, x-origin,y-origin, delta-x,delta-y,dash-1,dash-2, …

The default hatch pattern ANSI31 shown in the Boundary Hatch and Fill dialog box looks like this:

and is defined as follows:

*ANSI31, ANSI Iron, Brick, Stone masonry
45, 0,0, 0,.125 

The pattern name on the first line, *ANSI31, is followed by a description: ANSI Iron, Brick, Stone masonry. This simple pattern definition specifies a line drawn at an angle of 45 degrees, that the first line of the family of hatch lines is to pass through the drawing origin (0,0), and that the spacing between hatch lines of the family is to be 0.125 drawing units.

Hatch pattern definitions follow these rules:

  • Each line in a pattern definition can contain up to 80 characters. You can include letters, numbers, and the special characters underline (_), hyphen (-), and dollar sign ($). However, you must begin a pattern definition with a letter or number, not a special character.
  • AutoCAD ignores both blank lines and text to the right of a semicolon.
  • Each pattern line is considered to be the first member of a line family, created by applying the delta offsets in both directions to generate an infinite family of parallel lines.
  • The delta-x value indicates the displacement between members of the family in the direction of the line. It is used only for dashed lines.
  • The delta-y value indicates the spacing between members of the family; that is, it is measured perpendicular to the lines.
  • A line is considered to be of infinite length. A dash pattern is superimposed on the line.

The process of hatching consists of expanding each line in the pattern definition to its infinite family of parallel lines. All selected objects are checked for intersections with any of these lines; any intersections cause the hatch lines to be turned on and off as governed by the hatching style. Each family of hatch lines is generated parallel to an initial line with an absolute origin to guarantee proper alignment.

If you create a very dense hatch, AutoCAD may reject the hatch and display a message indicating that the hatch scale is too small or its dash length too short. You can change the maximum number of hatch lines by setting the MaxHatch system registry variable using (setenv “MaxHatch” “n”) where n is a number between 100 and 10000000 (ten million).

NoteWhen changing the value of MaxHatch, you must enter MaxHatch with the capitalization as shown.