This Inkscape extension performs the classic hatch and crosshatch fill operations on selected closed objects and closed paths in an Inkscape drawing. Should nothing be selected, then every closed path and closed object in the document is hatch filled. The orientation and spacing of the hatch fill is user selectable as is whether or not to draw hatches or crosshatches.
The extension works by computing the points of intersection between a hatch or crosshatch grid with the selected closed objects or paths. An odd/even rule is then applied to determine which segments of the hatches or crosshatches to retain: for a given hatch line, its first intersection is considered to be the hatch line entering a closed figure, the second intersection it leaving, the third it entering another object (or section of an object), and so on. While this algorithm works well in most cases, one fault with it occurs when a hatch line intersects the corner of an object. In some circumstances this can appear to the an odd intersection and lead to stray, unwanted hatch lines. (And the manual workaround is to change the spacing of the hatch lines.)
Another drawback of this extension is that the fills it generates are not smooth, continuous tool paths. Rather the fills are many independent line segments, each segment requiring pen up and pen down operations in order to be drawn. While the fills may look pleasant on a computer display, they are not optimal for the task of plotting a color filled region with a pen plotter.
And, unlike Inkscape "Live Effects", the hatches generated by this extension do not change when the object of the hatching changes its shape. This is a limitation of the Inkscape extension mechanism.
Note that this extension was originally designed for use with the Eggbot. However, it works quite well for other applications. The default hatch spacing of 8 pixels, while appropriate to the Eggbot, may be slightly too wide for the Unicorn.
This extension is intended for use with Inkscape 0.47 and later. The following directions are appropriate for Inkscape on OS X and Linux. They should work as well on Windows.
Download the eggbot_hatch.py and eggbot_hatch.inx files from the Eggbot source code repository at
On OS X and Linux systems, place these two files in the directory ~/.config/inkscape/extensions/. Create that directory if i does not already exist. Alternatively, you can place them in the system-wide Inkscape extension directory (/Applications/Inkscape.app/Contents/Resources/extensions/ on OS X). On Windows, place the two files in the extensions folder under your Inkscape install directory. This is likely the directory C:/Program Files/Inkscape/share/extensions/.
Restart Inkscape. Inkscape only loads new extensions at startup.
- Check to see that the extension appears under Extensions > Eggbot Contributed > Hatch fill. That is, under Inkscape's Extension menu item, select the "Eggbot Contributed" submenu. In the resulting pop up menu, you should then see a "Hatch fill..." item.
- To hatch all closed objects and closed paths in the current drawing, just run the "Hatch fill..." extension from the Extensions > Eggbot Contributed menu. To hatch specific objects or paths, select them first before running the extensions.