I'm looking for a good (i.e., efficient and flexible) Inkscape technique to achieve a selective "cutout" effect for indicating depth of and visualize separation between overlapping paths (like the "Knot" path effect, but between paths).
My usual go-to for this kind of effect is to add a "phantom path" by duplicating the original, making it white, removing any markers, increasing the stroke width, and putting it behind the actual path. This works reasonably well:
However, it comes with a couple of disadvantages:
- You have two objects now. You can group them, but node editing only affects one at a time (or at least it's not so simple), so changing anything is often annoying.
- There is no control over when the "cutout" should happen. In the figure, the red circle highlights a place where I actually don't want to cut out a grid line (like with the path on the left of it).
Alternatives I have considered and rejected:
- Globally solving the z-order of all paths so that lines which should not be cut out are in front of the "phantom paths". This might not even be doable in general, and, if at all, is very much not efficient.
- Turning the line into a filled object with "Stroke to Path" and adding a white stroke seems like it could work on first sight, but I never got acceptable results (the internal paths are completely unworkable). Also, I don't see how it could allow special treatment of markers, and solve the control problem.
I am asking the question because I have no solution for the selection part. But if I could fundamentally improve just the basic technique, that's also cool.