LibreCAD Custom Hatch Patterns

Add style to your LibreCAD drawings by creating and using custom hatch patterns. LibreCAD comes packaged with 62 patterns – I counted – that will work for most cases. But there have been times when I needed a unique hatch pattern.

Creating your own hatch patterns is literally the same as creating any other design inside of LibreCAD. By convention, patterns have the origin of 0,0 and do not exceed 100,100. Patterns should still work with different origins and with larger and smaller sizes.

  1. Create a new LibreCAD document (or any editor that can create DXF files).
  2. Open Options > Current Drawing Preferences > Units. Change the “Main drawing unit” to “None”.
  3. Draw your new hatch pattern.
  4. Save the DXF file to the pattern folder described below.

Pattern Locations

Hatch Patterns are stored in multiple locations and varies for each operating system. Below are the most common locations for each operating system. It’s also possible to set a custom directory inside of LibreCAD application settings.

Windows

C:/Users/<USER>/Documents/LibreCAD/patterns

Linux

~/.librecad/patterns
/usr/share/doc/librecad/patterns
/usr/share/librecad/patterns

macOS

~/.librecad/patterns
~/Documents/librecad/patterns

Using Hatch Patterns

To use the new pattern, simply select the entities that make up one or more closed contours. Once selected, click on the hatching tool and use the drop down list to find your new pattern.

The pattern will be under the filename you saved it as. If the pattern does not show up in the list, you might have to close out of LibreCAD before it appears – but this is unlikely.

Crashes

If your program crashes when trying to use the hatching tool, you might have a pattern that is empty. There is a bug in LibreCAD where empty patterns may cause the program to crash.

There is another issue that occurs when the last pattern you used has been deleted; the program might crash when opening the hatching tool. You can fix this by opening the configuration file “LibreCAD.conf” and deleting the line that beings with HatchPattern=.