Fill bounded area not doing a good job

Post questions on how to use or achieve an effect in Inkscape.
seans_potato_biz
Posts: 138
Joined: Mon Apr 07, 2008 6:01 am

Fill bounded area not doing a good job

Postby seans_potato_biz » Thu Oct 05, 2017 9:32 am

The "fill bounded area" tool is a great idea but does a pretty poor job in practice. Is there any way to make it perform better? If I was doing this myself, I'd convert the objects and strokes to paths and then do Boolean difference and changes the colours of the resulting sections. Why can't Inkscape simply do this?

In the image below you can see it overlaps the black lines which should be forming a boundary and other areas it doesn't quite cover.

Image
Win 7/10, Inkscape 0.92.2

We don't inherit the Earth from our parents; we borrow it from our children.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Fill bounded area not doing a good job

Postby tylerdurden » Thu Oct 05, 2017 9:52 am

Check the settings in the controls and zoom in for better response to edges.

http://tavmjong.free.fr/INKSCAPE/MANUAL ... elity.html
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

seans_potato_biz
Posts: 138
Joined: Mon Apr 07, 2008 6:01 am

Re: Fill bounded area not doing a good job

Postby seans_potato_biz » Thu Oct 05, 2017 10:37 am

Thanks, I did read that elsewhere but I don't see why it can't "zoom in" internally; the program is doing mathematics under the hood so it seems pretty silly that I have to manually zoom in to help it somehow. Even when I do zoom in, that only reduces the problem and doesn't eliminate it like it would if Inkscape converted to paths and did Boolean difference to generate perfect shapes.
Win 7/10, Inkscape 0.92.2

We don't inherit the Earth from our parents; we borrow it from our children.

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

Re: Fill bounded area not doing a good job

Postby brynn » Fri Oct 06, 2017 2:32 am

I could be wrong about this, but I don't think Inkscape is doing any math for the Paint Bucket tool (unless maybe you use a Grow/Shrink value). I think it looks at the color of pixels. Well, you know, it doesn't really "look" with eyes...maybe it scans the pixels or something.

Using the basic fill is almost always better, in my opinion, even though it almost always requires a lot more work.

Actually the Paint Bucket tool does generate paths. It just can't do it with very much precision. Sometimes if it's just a couple of objects, I find it's faster to use Paint Bucket, then switch to the Node tool to make the path fit perfectly. But as my skills grow, I use it less and less.

seans_potato_biz
Posts: 138
Joined: Mon Apr 07, 2008 6:01 am

Re: Fill bounded area not doing a good job

Postby seans_potato_biz » Fri Oct 06, 2017 4:04 pm

Literally everything that a computer program does is maths!
Win 7/10, Inkscape 0.92.2

We don't inherit the Earth from our parents; we borrow it from our children.

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

Re: Fill bounded area not doing a good job

Postby brynn » Sun Oct 08, 2017 10:05 am

Well I did warn that I could be wrong. Actually I thought computers worked in ones and zeroes.

All I know is that the Paint Bucket tool is not capable of precisely filling closed spaces. Someone else will have to explain technically how it works, if that's what you're asking. Or you could search the forum, since this has been discussed many times before.

If you want a boolean operation, then use one (or more, as would be needed in most cases). Not that I know much about programming, but it seems like it would be pretty hard to create a tool which can decide which booleans are needed for the objects which create any given enclosed space.

It's my observation, as well as my own experience, that as users' Inkscape skills improve, they use this tool less and less. That's why, even though the tool creates entirely vector paths, I tend not to think of it as a traditional vector tool.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Fill bounded area not doing a good job

Postby Xav » Sun Oct 08, 2017 7:00 pm

It seems a little rude to dismiss Brynn's reply with "Literally everything that a computer program does is maths!". By that argument I want to know why I can't calculate the trajectory of the Voyager 1 probe by playing Pacman. After all, it's all maths, right?

The point I think she was trying to make is that the algorithm used for the Fill tool is largely bitmap based, not vector based. Still maths, but a different subset of the field. The Fill tool essentially performs the same job as the bucket fill in a bitmap editor, but then converts the resultant collection of pixels to a vector. It's a bit like exporting your image as a PNG, loading it into a bitmap editor, filling a region, importing it back into Inkscape then running Trace Bitmap on the filled area.

It's not a mathematically precise tool, but it is computationally cheap. And because it works on the pixels of a bitmap representation of your image, the end result depends on the resolution of that bitmap - which is why zooming has an effect. In my opinion it's only really of any use for filling the outline artwork of comic strips and similar - and even then (as I know from experience) it can still require a lot of manual cleaning up to get the desired result.

For most vector work it's best avoided. If you want mathematically accurate (or, at least, more accurate) shapes then you should be using boolean operations to create your path instead.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Fill bounded area not doing a good job

Postby v1nce » Mon Oct 09, 2017 10:01 am

I think a lot of people would rather wait for 3s and get precise filling thant get an instant imprecise unusable result.
Boolean cutting algorithm should be the default and we should swap to bitmap algorithm only if there are "too many" intersecting objects


Return to “Help with using Inkscape”