I have an image with 7 paths (attached) When I place a rectangle over this and do an intersection, the results are unexpected-everything disappears!
I tried grouping the paths into one object but this does not help. If I select only one path, then intersection works. Am I overloading inkscape with too many paths to intersect?
BTW, clip works fine.
Stef
PS Sorry I had to compress the file with 7zip since it's >250K.
misbehaving intersection
misbehaving intersection
- Attachments
-
- birdtest.7z
- (80.48 KiB) Downloaded 164 times
Re: misbehaving intersection
Intersection only works on two paths at a time (later edit: in fact, it does do more than two paths!
Lots more! Hundreds even! Wrong again, Dru! still making incorrect pronouncements - when will I learn?
To get more of the story, just read on). You can do them two at a time and get the same results as you might expect from doing all eight at once (edit: bla bla bla - just do them all at once and get it over with). Or you can combine or union the seven paths into one and then run intersection with the rectangle.
In either case the final output of intersection - or any boolean -is going to be a single path, so if you are looking for a trimming effect this is not the route (edit: at least I got this right - amazing really).


In either case the final output of intersection - or any boolean -is going to be a single path, so if you are looking for a trimming effect this is not the route (edit: at least I got this right - amazing really).
Last edited by druban on Sun Apr 17, 2011 5:46 pm, edited 1 time in total.
Your mind is what you think it is.
Re: misbehaving intersection
druban wrote:...
In either case the final output of intersection - or any boolean -is going to be a single path, so if you are looking for a trimming effect this is not the route.
the nuance of that statement has escaped me.
i understand it to mean that any paths remaining after the boolean operation are all merged as if a 'union' was done to them. why would inkscape throw in a 'free' union?
what's the difference and why should i care if i have one or many paths?
why is it not a good idea to do this for trimming (cropping)?
tnx.
stefan
Re: misbehaving intersection
I mean that the result , being a single path, can only have a single style (fill/stroke color).what's the difference and why should i care if i have one or many paths?
why is it not a good idea to do this for trimming (cropping)?
If you have a drawing with several shapes and colours and you want to crop it to fit inside a rectangle, clipping will HIDE everything outside the rectangle, but it will still be there in your file. Some people want to discard all that stuff - TRIM it away - but there is no easy way to do this at present. Trying to do this with union and intersection will 'paint' everything one color. (The style of the bottommost object).
All of the booleans (except for union) only work on two paths*. The process is two (any number for union) paths in, one path out (any number for cut path)*. I guess the 'free' union is just the definition of boolean operation.why would inkscape throw in a 'free' union?
Sorry if my explanation is convoluted! It may be that the things I mention have no bearing at all on your question.
*Edit: Oops! Actually, only difference, division and cut path require two paths. Union, intersection, and exclusion operate on multiple paths. Thanks to Brynn for pointing this out. The bit about the single path result is still true.
Last edited by druban on Sun Apr 17, 2011 8:35 am, edited 1 time in total.
Your mind is what you think it is.
Re: misbehaving intersection
Ummm, actually Intersection can be done on multiple paths. I had no trouble doing an intersection on parts of the file you provided, but not all of them together. And I can't figure out what the problem is. It would help if you could tell us which part of the file you want to do the intersection on.
So here's what I don't understand -- I can draw like 4 or 5 or presumably any number of shapes, convert to paths (many paths) and successfully intersection them all at once. Your file is constructed differently though. It appears that each color is a single combined path. And maybe it's the combined paths that present the problem, I'm not sure. But if I select any one combined path (and the rectangle) the intersection works. But if I select more than one of them (and the rectangle) it doesn't work, and in fact, the paths and rectangle all disappear.
I know that if the rectangle was not on top, sometimes that might cause everything to disappear. But I've made sure that it IS on top. So now, I'm perplexed
I'm gonna read the Guide for clues....brb Edit -- no clues
I'm stumped.
What are you trying to accomplish? If we can't figure out this problem, maybe there will be another way to accomplish your goal?
So here's what I don't understand -- I can draw like 4 or 5 or presumably any number of shapes, convert to paths (many paths) and successfully intersection them all at once. Your file is constructed differently though. It appears that each color is a single combined path. And maybe it's the combined paths that present the problem, I'm not sure. But if I select any one combined path (and the rectangle) the intersection works. But if I select more than one of them (and the rectangle) it doesn't work, and in fact, the paths and rectangle all disappear.
I know that if the rectangle was not on top, sometimes that might cause everything to disappear. But I've made sure that it IS on top. So now, I'm perplexed

I'm gonna read the Guide for clues....brb Edit -- no clues

I'm stumped.
What are you trying to accomplish? If we can't figure out this problem, maybe there will be another way to accomplish your goal?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: misbehaving intersection
I am sorry if my explanation is very difficult to understand (maybe because it was wrong..)
, let me take a different tack and address your birdtest file specifically!
In the simplest terms, Boolean intersection finds areas that are common to every element that you are subjecting to 'boolean analysis'. Because there is no part of the canvas that is covered by all seven of your paths, the intersection operation returns a zero, and your canvas is therefore empty. Some paths overlap, true, but intersection looks for anyplace where ALL the paths overlap. The rectangle that you are placing over everything won't make a difference, because once the operation returns a zero all further iterations of the same operation will return a zero.
If you select your seven paths, do a union, and then lay a rectangle path over the resulting path and do an intersection, you will get a path describing the area covered by both the bird path and the rectangle. BUT it won't look the same because your original had strokes of different colours, which are now after the union all one colour. If that doesn't matter to you - or it's what you want, then this is the way to go.

In the simplest terms, Boolean intersection finds areas that are common to every element that you are subjecting to 'boolean analysis'. Because there is no part of the canvas that is covered by all seven of your paths, the intersection operation returns a zero, and your canvas is therefore empty. Some paths overlap, true, but intersection looks for anyplace where ALL the paths overlap. The rectangle that you are placing over everything won't make a difference, because once the operation returns a zero all further iterations of the same operation will return a zero.
If you select your seven paths, do a union, and then lay a rectangle path over the resulting path and do an intersection, you will get a path describing the area covered by both the bird path and the rectangle. BUT it won't look the same because your original had strokes of different colours, which are now after the union all one colour. If that doesn't matter to you - or it's what you want, then this is the way to go.
Your mind is what you think it is.
Re: misbehaving intersection
aha! thank you dr. uban. i get it! i am trying to isolate a basic tesselation unit. As you might be able to recognize, these birds are the outline of an escher drawing. I need the file size to be <200k because it's going to be sent to a drawing robot with a small memory. So my plan is to get the basic tesselation unit and clone it many times. That gives a much smaller drawing than tracing the whole thing or duplicating the tesselation unit with copy-paste. I will have to figure out the color thing-probably make it a different layer and clone it there.
Re: misbehaving intersection
In the simplest terms, Boolean intersection finds areas that are common to every element that you are subjecting to 'boolean analysis'. Because there is no part of the canvas that is covered by all seven of your paths, the intersection operation returns a zero, and your canvas is therefore empty. Some paths overlap, true, but intersection looks for anyplace where ALL the paths overlap. The rectangle that you are placing over everything won't make a difference, because once the operation returns a zero all further iterations of the same operation will return a zero.
AAaaaahhh......!
Thank you Dr. Uban!!

Oh yes, bwana, I like to play around with tesselations too, and I knew those birds looked familiar! I'd be interested to see your final product, if you would consider sharing. I haven't searched for tesselated images for a few years, so I should do that, to see what's new out there lately

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design