Cutting lines inside / outside of shape.
- October 12, 2020
- 6 replies
- 10763 views
Hello,
I am using Illustrator to create complex pen-plotter drawings that typically involve a lot of cross-hatched shading. I am looking for a way to automate one of the most needlessly laborious parts of this process.
At present, to fill an area with parallel lines (I will refer to them as hatch-lines,) I first create the hatch-lines using the blend tool. I expand the blend, then I place a shape on top to delineate the area I want to cut, and I use the Shape Builder tool to delete the unnecessary parts of each hatch-line individually, using the alt-click. I am looking for a way to automate this process. (See Image 1).
Unfortunately the Pathfinder tool does not do quite what I want. The Divide command can erase lines outside of a shape, but only if the shape is simple, without "undercuts." It does not seem to be able to erase lines inside of a shape. (See Image 2).
I need to actually sever the paths at the desired locations (where they intersect the shape's outline) and delete the unwanted parts of the path (either inside or outside the shape, depending on the context.). I can't simply "mask" the image by layering filled shapes on top, because these are vector files for pen plotter, and all vectors will be plotted whether or not they are obscured.
Does anyone know a solution? Would it be possible to write a script which could perform these behaviors? Please let me know if any further clarification or elaboration is needed. If I could automate this task it would save hours or even days of alt-clicking per drawing!
With gratitude,


JCO





