Is there a way to create an offset outline of a bezier path?

Post questions on how to use or achieve an effect in Inkscape.
Jonnycakes
Posts: 4
Joined: Tue Dec 03, 2013 5:47 am

Is there a way to create an offset outline of a bezier path?

Postby Jonnycakes » Tue Dec 03, 2013 6:27 am

Image

This image is an example of what I want to do. The first image is made up of bezier paths, and I want to essentially invert it, so that the paths are tracing around the outline of the collective group of paths. I did this manually by eyeballing looped bezier paths around the first image, but I want a better method of doing this, since I plan on applying this effect to much more complicated drawings (similarly of straight paths) than this example.

I have tried placing filled polygons inside of the outlined areas and scaling them down individually, but this doesn't work. I also have tried unsuccessfully to find a way to snap to outlines of paths-even if there was a way to do this, I would at least be somewhat satisfied. Thanks!

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Is there a way to create an offset outline of a bezier p

Postby microUgly » Tue Dec 03, 2013 7:31 am

Hey Jonnycakes, you'll be pleased to know there is a simple way to do this.

  1. Select all your paths then from the `Path` menu choose `Stroke to path` (Ctrl+Alt+C).
  2. Ensure all your elements are still selected, then from the `Path` menu choose `Union` (Ctrl++)

You should now have single object you can apply a stroke like with your second example. Note that my references to the menus is from memory so I apologies for any inaccuracies. The shortcut keys are correct, however.

Jonnycakes
Posts: 4
Joined: Tue Dec 03, 2013 5:47 am

Re: Is there a way to create an offset outline of a bezier p

Postby Jonnycakes » Tue Dec 03, 2013 7:41 am

Cool, thank you! Just tried it out and it works fine. Is there a way to automatically create the outline paths once I have changed my drawing into a single object with the union tool?

Jonnycakes
Posts: 4
Joined: Tue Dec 03, 2013 5:47 am

Re: Is there a way to create an offset outline of a bezier p

Postby Jonnycakes » Tue Dec 03, 2013 8:00 am

I figured it out!

Adding to microUgly's method:

  1. Select all your paths then from the `Path` menu choose `Stroke to path` (Ctrl+Alt+C).
  2. Ensure all your elements are still selected, then from the `Path` menu choose `Union` (Ctrl++).
  3. Create a filled rectangle that overlaps the entirety of the new object.
  4. Select your object and rectangle together, and choose 'Cut path' from the 'Path' menu (Ctrl+Alt+/).
  5. The created elements will have no stroke or fill and will not be visible, so open the 'Fill and Stroke' window (Ctrl+Shift+f). Select the 'Stroke paint' tab and set the object to have a stroke color. Then select the 'Stroke style' tab and reduce the stroke width to the desired amount.

Thanks microUgly for helping out so quickly and for putting up with my Inkscape and forum noobiness.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Is there a way to create an offset outline of a bezier p

Postby Lazur » Tue Dec 03, 2013 9:38 am

And you may get better results if the original paths are not built up of one segment only.
Like in your example the corners of the rectangle would end up messed up a bit.

So my add would be to microUgly's solution, is to
draw the image from three paths -one rectangle as a closed path, one diagonal path and anotherone for the rest.
Then preferably you can combine them together to be a compound path (Ctrl+K).

After that selecting it would be easier.


Return to “Help with using Inkscape”