Creating Hatch Patterns Custom hatch patterns can be very helpful in apply repetitive patterns to an area of a drawing. For example, ceiling grids or floor tiles can be developed as hatch patterns.
Continuous Line Hatch Patterns Let's look at creating a hatch pattern for 24"x48" ceiling tiles.
Using Notepad or another text editor, start a new file. The first line should read
*GRID24x48, 24x48 Ceiling Grid
The * marks the beginning of a hatch pattern.
GRID24x48 is the Pattern Name. The description is 24x48 Ceiling Grid. Add the first Pattern Line.
0, 0,0, 0, 24
This will produce a pattern of lines at an angle of 0. The pattern will begin at 0,0. The spacing between lines (Delta-y) is 24.
Before adding the second line, Save your file to the AutoCAD\Support folder with the name Grid24x48.pat.
Begin AutoCAD, draw a closed shape and try out your new hatch pattern. Your pattern file will be displayed on the Custom tab.
Return to the library file and add the second Pattern Line.
90, 0,0, 0,48
This will produce a pattern of lines at an angle of 90. The pattern will begin at 0,0. The spacing between lines (Delta-y) is 48.
Save your file and try the revised hatch pattern.
Note: The location of a hatch pattern can be controlled by changing the UCS origin.
Dashed Hatch Patterns Most complex hatch patterns contain dashed lines to make up the pattern. In this exercise you will learn to create a 4" x 4" floor tile pattern with a 1/2" grout line by using dashed lines.
Using Notepad or another text editor, start a new file. The first line should read
*4x4Tile, 4"x4" Floor Tile
Reminder: The * marks the beginning of a hatch pattern. 4x4Tile is the Pattern Name. The description is 4"x4" Floor Tile.
Adding Horizontal Dashes Dashed lines are created by adding a sequence of numbers at the end of the Pattern Line. Positive numbers create dashes, while negative numbers create spaces. There is no limit to the number of dashes and spaces in a Pattern Line.
Add the first Pattern Line.
0 0,0 0,4.5 4.0,-0.5
This Pattern Line will create dashed lines 4 units long, with a space of 0.5. The Pattern Line will repeat at 4 unit intervals and the Pattern Line originate from 0,0 at an angle of 0.
It is helpful to save your Library file and try out your hatch pattern after adding each line.
Add the second Pattern Line
0 0,4, 0,4.5, 4.0,-0.5
This Pattern Line will also create dashed lines 4 units long, with a space of 0.5, but the origin is at 0,4. This will form the top of each tile.
Save your Library file and try out the revised hatch pattern.
Adding the Vertical Dashes Add the first vertical dashed Pattern Line as shown below.
90, 0,0, 0,4.5, 4.0,-0.5
This will produce a pattern of lines at an angle of 90. The pattern will begin at 0,0. The spacing between lines (Delta-y) is 4.5. The dashed line sequence is the same as the horizontal dashes.
This will be the left edge of the floor tile.
Save your Library file and try out the revised hatch pattern.
Finally, your can add the second vertical dashed Pattern Line.
90, 4,0, 0,4.5, 4.0,-0.5
Just like the horizontal dashed lines, the origin of the second vertical Pattern Line is shifted.
Creating Delta-X Hatch Pattern At the beginning of this exercise we looked at the format of a hatch pattern definition. All the hatch patterns you have created so far have used a zero Delta-X. The next hatch pattern you will create will also be of 4" x4" floor tiles, but every other row will be offset.
When creating this and any other hatch pattern, you may want to work on one Pattern Line at a time. It can also help to plan out your pattern graphically.
In the figure at the right four different Pattern Lines are illustrated in four different colors to help identify the repeating patterns. Let's start with the red lines.
The Pattern Line is dashed, with a dash length of 4" and a space of 1/2". The Delta-Y is 4 1/2". The Delta-X is 2 1/4 (half the total distance of the dash and space).
Creating Horizontal Delta-X Pattern Lines Using Notepad or another text editor, start a new file. The first line should read
*4x4Tile_Offset, 4"x4" Floor Tile, Offset
Reminder: The * marks the beginning of a hatch pattern. 4x4Tile_Offset is the Pattern Name. The description is 4"x4" Floor Tile, Offset.
Add the first Pattern Line (red).
0 0,0 2.25,4.5, 4.0,-0.5 The Delta-X shifts each successive Pattern Line 2.25. This will be the top of each tile.
Before adding the second line, Save your file to the AutoCAD\Support folder with the name 4x4Tile_Offset.pat.
Begin AutoCAD, draw a closed shape and try out your new hatch pattern. Your pattern files will be displayed on the Custom tab.
Add the second Pattern Line (green).
0, 2.25,0.5, 2.25,4.5, 4.0,-0.5 Again, the Delta-X shifts each successive Pattern Line 2.25. This time, the Pattern Line begins at 2.5,0.5. This will be the bottom of each tile.
Save your Library file and try out the revised hatch pattern.
Creating Vertical Pattern Lines With a Delta-X Ok, now for the third Pattern Line. This Pattern Line will define the right edge of each tile.
90, 1.75,0.5, 4.5,2.25, 4.0,-5
This gets a little hairy. The origin of the third Pattern Line is set to 1.75,0.50 to align with the right edge of the tile. The Dashed pattern is comprised of a 4" dash and a 5" space (one tile plus two grout lines). The line shifts 4 1/2" inches with each successive line (one tile plus and grout line). This is the Delta-X value. The distance between lines perpendicular to the line angle is 2.25 (the Delta-Y).
Add the third line (blue) to your file, save your Library file and try out the revised hatch pattern.
The fourth Pattern Line (magenta) is the same as the third, except for the origin. Add the fourth line to your file, save your Library file and try out the revised hatch pattern.
90, 2.25,0.5, 4.5,2.25, 4.0,-5
Summary
Each line of code applies to a single Pattern Line. Hatch pattern lines are "infinitely" long. The line is drawn as long as necessary, as long as it reaches a boundary. Hatch pattern are not drawn unless if no boundary if found.
Each line of pattern code must include the angle, x- and y-origin, and the x- and y-offset. This draws a continuous line. The dash parameter is optional, but when used draws a line with the dash-space-dot pattern. There is no limit to the number of data lines for a hatch pattern definition. Very complex patterns can take dozens and dozens of lines of code.
The Delta-x and Delta-y parameters are unaffected by the angle parameter since Delta-x is always in the direction of the line and Delta-y is always perpendicular (90 degrees) to the line.
To change the x,y-origin of a hatch pattern upon placing it in the drawing, set a new UCS origin. You cannot specify arcs, circles, and other round elements in a hatch pattern file. Everything consists of straight lines and dots. To simulate circular elements, use a series of very short dashes.
It's a lot easier to read your hatch pattern code if you use tabs and spaces to format the code into nice columns. There are hundreds of FREE hatch patterns out there.