Hatch fill
<<< Eggmazing || Hatch fill || Name Poem >>>
This extension performs the classic hatch and crosshatch fill operations on selected closed objects in an Inkscape drawing. Should nothing be selected, then every closed object in the drawing will be filled. The orientation and spacing of the hatch fill is user selectable as is whether or not to draw hatches or crosshatches. The choice of value for the hatch spacing will depend upon the thickness of the pen you are plotting with. For a 0.3 mm Sharpie pen, try using a value of 8 or 7 pixels.
Note that the fill generated by this extension is not a single, smooth, continuous tool path. Rather each fill is composed of many individual line segments, each segment requiring pen up and pen down operations in order to be drawn. Consider first using Inkscape's live effects "Hatches (rough)" to generate your fills. The results will plot faster. Reserve use of this extension for cases in which "Hatches (rough)" will not work correctly such as hollow regins (e.g., an annulus). The tutorial Drawing a smiley face demonstrates the use of "Hatches (rough)". See also creating filled regions for additional hints on Hatches (rough) and other region-filling methods.
In the drawing,
the objects can be filled differently by selecting them individually or in groups and applying the extension one at a time to each selection. To fill the three polygons on the left as a group, select the star and then while holding down the shift key, also select the two rectangles. Alternatively, you can click and drag to select them all at the same time. Once they are selected, apply the "Hatch fill" extension from the EggBot Contributed extension list . Next, convert the text to a path by selecting it and applying the "Object to Path" item of the Path menu. Then, with the result selected, again apply the "Hatch fill" extension. This process can be repeated for other objects to be filled.
Notes
1. The extension tries to determine an appropriate line thickness for the generated hatch lines. This is an issue as the object being filled may be subject to a scaling operation. In that case, the hatch lines need to be given thicknesses such that when the scaling is applied to them, they appear to have an appropriate thickness. If the hatch lines should appear too thick or thin, then you can change their thickness within Inkscape. Note, however, that the thickness they are drawn with on your computer screen has no bearing how they will appear when plotted with your Eggbot.
2. The extension works by computing the points of intersection between a hatch or crosshatch grid with the selected closed objects. 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 object, 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. The workaround is to change the spacing of the hatch lines.
<<< Eggmazing || Hatch fill || Name Poem >>>