AutoCAD: Understanding the .pat Hatch Pattern Files

How do you define a new custom Hatch Pattern? Better understand how the .pat files work.
Català - Castellano - Deutsch
Searching for how to generate custom hatch pattern definitions in AutoCAD i came across this post by Ellen Filkenstein. Although the post gives you an idea on how these pattern definitions work, it took me a while to understand everything. So I went to the acad.pat file and I picked a complicated pattern to see if I could figure out how it works. I chose the AR-CONC pattern. This is a snapshot of it.


The first thing I realized disappointed me. I thought the pattern files could define any geometry, and somehow they do, but it turns out that any geometry created has to be based on straight lines. Let me show you why. Although the AR-CONC pattern seems pretty random, it is not. If you pay attention to it you will see that the triangles repeat themself on straight lines.


So, does the pattern definition describe a triangle and how often should be repeated? Not at all. A more detailed look to the pattern showed me that there is not such a thing as triangles in the pattern, but lines that intersect each other creating triangles (I know, that is the same almost, but not in terms on how you define the patter, see the image below).


So how are this lines defined to end up showing like triangles? Here is the tricky part. See the image below that belongs to the acad.pat definition for the AR-CONC pattern.


There are 4 elements that are important here:
  1. Defines de Angle that the line should take.
  2. Defines the X and Y coordinates of the start point of that line.
  3. Sets de Delta-x and Delta-Y displacements.
  4. Defines the linetype.
Ok, I know, this is textbook theory, I had no idea what this meant after I read about it. So I hatch some region in AutoCAD with this pattern and I searched for a line that was at an angle of 50 degrees. Surprise!! I found one. And suddenly everything made sense. It would take me long to describe it all so I made a quick diagram. See it below. The colors correspond with the numbers of the previous image for easy reference.


See how the angle (red) corresponds with the one described in the pattern file. The start point is 0,0. And here comes the juicy part. In Blue, the linetype. The pattern describes 0.75,-8.25. This means 0.75 units of dash, 8.25 units of space (the negative sign means space, 0 would mean a dot). And finally the file defines 4.12975034,-5.89789472 as Delta-x, delta-y displacement. See it in the picture with the green dimensions.
I guess now we can start defining our own patterns...or maybe not. Sincerely having the SUPERHATCH command available through the express tools, the process of generating your own pattern files seems a bit outdated. Of course the entities created with SUPERHATCH are blocks and not Hatch patterns, so they will give you much less freedom to edit them, so it is your choice to decide which method to use. I will talk soon in a new post about the SUPERHATCH command with more detail.


1 comment:

  1. the batter way to explain from u and i am trying to give this site to all of my frnd

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...