Filling an open path

Post questions on how to use or achieve an effect in Inkscape.
faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Filling an open path

Postby faermi » Tue Jul 04, 2017 5:55 pm

Hi all!

I have a problem that has probably been asked before, but I have not been able to find the exact answer:

If I have an open path such as this one:

fillopenpath.png
fillopenpath.png (10.78 KiB) Viewed 2851 times


What would be the easiest, fastest way to fill it? If I directly try to fill it I get something like this:

filledopenpath.png
filledopenpath.png (12.9 KiB) Viewed 2851 times


Thanks a lot in advance for your help!

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

Re: Filling an open path

Postby Lazur » Tue Jul 04, 2017 6:44 pm

Hi.

It's not a problem with a trivial solution.

There are two options I can think of. One is to generate a convex hull of the subpaths, the other is using the bucket tool on a blurred/outsetted duplicant.
Here is a topic on the first, can't find the topic for the latter.

As a third option which would probably work instead, select all nodes and click the connect two nodes with a path segment icon.

faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Re: Filling an open path

Postby faermi » Tue Jul 04, 2017 7:51 pm

Lazur wrote:Hi.

It's not a problem with a trivial solution.

There are two options I can think of. One is to generate a convex hull of the subpaths, the other is using the bucket tool on a blurred/outsetted duplicant.
Here is a topic on the first, can't find the topic for the latter.

As a third option which would probably work instead, select all nodes and click the connect two nodes with a path segment icon.


Hey, thanks a lot for your quick reply! I will try the convex hull approach. The second option... I am afraid I am too much of a noob to understand what you exactly mean. With regards to the third option... it might indeed be the simplest approach; will resort to that if the others prove to be too complex.

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Filling an open path

Postby Raspi » Tue Jul 04, 2017 7:59 pm

Use the 'Fill Between Many' LPE

In case the Strokes are one path, perform a 'Break apart' (if already broken apart, make sure they all have the same direction, if not apply 'Reverse')
Draw a path (a rectangle for example), give it the desired Fill colour
Apply the 'Fill between many' LPE to the rectangular path
Copy the strokes one by one and add them to the LPE via the Paste button in the LPE menu

faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Re: Filling an open path

Postby faermi » Tue Jul 04, 2017 8:19 pm

Raspi wrote:Use the 'Fill Between Many' LPE

In case the Strokes are one path, perform a 'Break apart' (if already broken apart, make sure they all have the same direction, if not apply 'Reverse')
Draw a path (a rectangle for example), give it the desired Fill colour
Apply the 'Fill between many' LPE to the rectangular path
Copy the strokes one by one and add them to the LPE via the Paste button in the LPE menu


Hey, thanks for your reply. I have had a look at the LPE list and that one does not appear. Does it have to be installed apart or anything like that?

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

Re: Filling an open path

Postby Lazur » Tue Jul 04, 2017 8:31 pm

Oh I forgot that lpe existed. Was introduced in 0.92, I haven't used it.

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Filling an open path

Postby Polygon » Tue Jul 04, 2017 8:35 pm

I´m pretty sure I´d go the other way around than expecting any software to recreate what I destroyed deliberately. ;-)
So draw the shape first give it a color - duplicate and eliminate fill and give it a stroke - now go on inserting nodes - open nodes and delete what you don´t want.

Cheers
P.

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Filling an open path

Postby Raspi » Tue Jul 04, 2017 9:37 pm

faermi wrote:Hey, thanks for your reply. I have had a look at the LPE list and that one does not appear. Does it have to be installed apart or anything like that?

As Lazur said, it comes with the latest version of Inkscape.

The solutions you got so far are all technical exercises. Even said LPE will give you straight edges between the gaps of your strokes, not rounded ones, that follow the elliptical shape of the overall path.

Therefore i like Polygon's train of thought.

But what is it that you are trying to achieve artistically ?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Filling an open path

Postby brynn » Tue Jul 04, 2017 10:04 pm

I would look towards how you ended up with a collection of several disconnected path segments which imply a circular object (although it doesn't appear to be a true circle, as you might get from a deliberate path operation with a circle). Anyway, I would start a step or 2 before you were when you had this result, and try to improve whatever you were trying to do.

Or else enable the Ellipse tool and draw a new circle?

If you somehow opened a file and this was an object in the file, it's not reasonable to expect that it can be easily filled. (edit - a little more info about your goals and requirements might help us to offer more specific suggestions.)

I've actually been wondering what the Fill Between LPEs actually do. Assuming this what these LPEs actually do, simply applying one of those LPEs to a path does not give a clue how it works.

Fill Between Many - any clue how to use it?

fbm.png
fbm.png (30.2 KiB) Viewed 2752 times


Fill Between Strokes - any clue?

fbs.png
fbs.png (29.99 KiB) Viewed 2752 times


I'm not sure if this is their purpose. Maybe it is, but it's certainly not obvious how to make it work.

I think Moini did some research about these, and might have posted somewhere about it. But I can't recall exactly where it might have been posted (if something was posted).

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Filling an open path

Postby brynn » Tue Jul 04, 2017 10:11 pm

I've tried copying some random paths and clicking that clone or linked icon. It enters the path id into the little window, but so far, doesn't affect the original circular object. (this is on fill between many)

faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Re: Filling an open path

Postby faermi » Tue Jul 04, 2017 11:48 pm

Raspi wrote:
faermi wrote:Hey, thanks for your reply. I have had a look at the LPE list and that one does not appear. Does it have to be installed apart or anything like that?

As Lazur said, it comes with the latest version of Inkscape.

The solutions you got so far are all technical exercises. Even said LPE will give you straight edges between the gaps of your strokes, not rounded ones, that follow the elliptical shape of the overall path.

Therefore i like Polygon's train of thought.

But what is it that you are trying to achieve artistically ?


Well, Polygon and you are right. I am fairly new to Inkscape and everything feels a bit alien. The objective is to be able to fill the "body" in this figure:

FirstBubble.png
FirstBubble.png (26.42 KiB) Viewed 2715 times


I have overthought and overcomplicated it - Turns out that I should probably have been using the "Fill" tool - Duh + Facepalm.

Thanks a lot for all the help and suggestions; I have nevertheless learnt a lot about the different tools and options that Inkscape offers!

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Filling an open path

Postby Polygon » Tue Jul 04, 2017 11:53 pm

You can leave the head/body shape as a whole and can fill all other shapes (opened or not) with different colors. No need to destroy the outline.
Citronicus.gif
Citronicus.gif (79.65 KiB) Viewed 2695 times

:mrgreen:

Cheers
P.
Attachments
Citronicus.svg
(8.57 KiB) Downloaded 162 times
Last edited by Polygon on Wed Jul 05, 2017 12:20 am, edited 2 times in total.

faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Re: Filling an open path

Postby faermi » Tue Jul 04, 2017 11:58 pm

Polygon wrote:You can leave the head/body shape as a whole and can fill all other shapes (opened or not) with different colors. No need to destroy the outline.

Cheers
P.


But to fill an open path... I have to create a duplicate, close it, fill it and remove the stroke to generate my colored surface and put the original open path on top of it, right?

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Filling an open path

Postby Raspi » Wed Jul 05, 2017 12:02 am

faermi wrote:I have overthought and overcomplicated it - Turns out that I should probably have been using the "Fill" tool - Duh + Facepalm.

Dont worry, Inkscape requires a bit of a learning curve.
Lots of things work with "tricks" and you just have to know how it works.

When it comes to cartoons, i like to use the Clone Original path LPE.
You draw your shapes (even open paths can work), then draw another random two point path with the Bezier tool. It will act as the outline, so give it a black Stroke and no Fill.
Copy the shape you want to give an outline to the clipboard. Apply the Clone Orignal Path LPE to the black stroke path, then paste.

The cool thing about this LPE is that you can work some more on your cartoon and the outline will follow all changes automatically because its a clone.

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Filling an open path

Postby Polygon » Wed Jul 05, 2017 12:20 am

I updated my last reply.

Cheers
P.

faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Re: Filling an open path

Postby faermi » Wed Jul 05, 2017 2:26 am

Polygon wrote:I updated my last reply.

Cheers
P.


Hey, thanks a lot for taking the time to do the drawing and explaining it so patiently :) :) :)

faermi
Posts: 7
Joined: Tue Jul 04, 2017 5:47 pm

Re: Filling an open path

Postby faermi » Wed Jul 05, 2017 2:27 am

Raspi wrote:
faermi wrote:I have overthought and overcomplicated it - Turns out that I should probably have been using the "Fill" tool - Duh + Facepalm.

Dont worry, Inkscape requires a bit of a learning curve.
Lots of things work with "tricks" and you just have to know how it works.

When it comes to cartoons, i like to use the Clone Original path LPE.
You draw your shapes (even open paths can work), then draw another random two point path with the Bezier tool. It will act as the outline, so give it a black Stroke and no Fill.
Copy the shape you want to give an outline to the clipboard. Apply the Clone Orignal Path LPE to the black stroke path, then paste.

The cool thing about this LPE is that you can work some more on your cartoon and the outline will follow all changes automatically because its a clone.


I will try this as well! Thanks a lot for your support and patience!


Return to “Help with using Inkscape”