Creating custom hatch pattern (.pat files)

Hi,

I just want to happily share in this community that I wrote a script for creating custom hatch patterns. I couldn’t find something similar so I decided to make one myself and hope it reaches whoever struggled similarly.

The script inputs any lines (not polylines nor curves) and outputs a .pat file that multiple CAD software read as hatch patterns.

More detailed descriptions, source code, instructions, and examples had been included in the GitHub link below.

Enjoy! :slight_smile:

2 Likes

Looks great!

It still boggles my mind that the major CAD packages don’t have this functionality built in. Autocad still ships with the same acad.pat file since at least R14 (the earliest version I ever used), and the Help page for how to make your own patterns is still the same eldritch horror that it was back then.

2 Likes

The AutoCAD help forum in general is a circle of hell on its own, also apparently the functionality isn’t available for AutoCAD LT

Personally I simply create a block of the pattern, then use the XCLIP command to fit it inside wherever I need to. Sadly, XCLIP is the one AutoCAD functionality that is not available in Rhino, despite being pretty much vital

This has been a highly requested feature for a while now.

3 Likes

Unfortunately, Revit ignores Xclip boundaries in linked DWGs :upside_down_face:

1 Like

Custom Hatches can be handled in Rhino WIP two ways:

Rhino has a Hatch Pattern command that can create Hatches:

More control over exact hatch patterns can be done thru Grasshopper:

Rhino 9 comes with 40 or so patterns. There are also many places to download PAT files to use:

But none of these are like XClip. If a clipped drawing is wanted, then use the:

1 Like

Hi blu -

No. You’ll need Rhino 9 for this.
-wim