1

I am new to Inkscape (though I have experience in other vector drawing software), and am facing the following problem. I am tracing a street map for a town using a bitmap from OpenStreetMap. I am using bezier curves for the roads. Different roads have different colors and sizes, shown in the figure by the green and yellow lines. I have also created a frame or bounding box for the map, shown in graphic as a rectangle with a gray fill. enter image description here

My question is how you would tackle the following two issues in Inkscape.

  1. I would like any roads that I have accidentally drawn over the bounding box to be cut off flush with the inner border of the bounding box, such as the green major road in the graphic above.

  2. I would like any roads that overlap to be cut off flush with each other. For example, the yellow minor roads should be cut off flush where they intersect with the edge of the green major road in the graphic.

I have experimented with different combinations of Path functions (Cut, Division, Break Apart) but I haven't found what I'm looking for. I sort of have this idea that it's because one element is a shape, but I'm not having any success when dealing with two paths either. Perhaps I'm just approaching this the wrong way. Do I need to convert objects or strokes to paths, or use masks, or...?

1 Answer 1

1

You don't have to do that. Boolean operations work best on closed paths (shapes). Converting strokes to paths is destructive, you can't reverse it, and it would make any further editing nearly impossible.

Instead try this.

  1. Bring the green line to the top of the stack, it will cover over the yellow lines.

  2. Copy the background rectangle. Select and Group everything.

  3. Do a Paste in Place to get the rectangle back, select all then apply a clipping mask.

  4. Paste in Place again, set the rectangle fill to none, and add a stroke.

An example

enter image description here

The good thing about doing it this way is that it's non-destructive, and so all the paths will still be editable. It's useful if you need to change something later.

enter image description here

1
  • Thanks - that worked very well on the example graphic, but not on the original and more complex drawing. I eventually realised that I'd left a couple of objects on different layers locked, and so they weren't getting picked up by the Select All. Once I unlocked them it worked fine, so - other readers - if you're about to try this solution, bear that in mind. Mar 31 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.