Intersection not doing a correct intersection

Post questions on how to use or achieve an effect in Inkscape.
martin36
Posts: 1
Joined: Tue Apr 25, 2017 5:59 am

Intersection not doing a correct intersection

Postby martin36 » Tue Apr 25, 2017 6:15 am

I have a problem with intersecting a bezier curve and another shape. The problem is that when I do the intersect the the left side of the intersection works fine but the right side does not. It takes the corners of the bezier curve and thinks that those belong to the other object. Here are some images to demonstrate:

Intersection2.png
Intersection2.png (5.39 KiB) Viewed 1269 times

Intersection2.png
Intersection2.png (5.39 KiB) Viewed 1269 times

Why is it acting like this?

Thanks for answers!
Attachments
Intersection1.png
Intersection1.png (18.78 KiB) Viewed 1269 times

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

Re: Intersection not doing a correct intersection

Postby tylerdurden » Tue Apr 25, 2017 7:52 am

Please attach the original svg file, or a link to it, so we can better assist.
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/

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

Re: Intersection not doing a correct intersection

Postby Polygon » Tue Apr 25, 2017 5:09 pm

Not sure what you´re doing - but masking and division work as expected.
Can we see a node-view of the ring please?
Ring.png
Ring.png (63.7 KiB) Viewed 1217 times


Cheers
P.

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Intersection not doing a correct intersection

Postby theozh » Tue Apr 25, 2017 8:55 pm

In which order do you select the objects before intersecting?
First the ring and then the polygon or the other way round?
Try it both ways. If you see a difference it has probably something to do with the fill-rule.
Check here: (Section Fill Rule)
http://tavmjong.free.fr/INKSCAPE/MANUAL ... troke.html
Win7/64, Inkscape 0.92.2

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Intersection not doing a correct intersection

Postby theozh » Wed Apr 26, 2017 4:17 pm

Based on your question, I was interested in how intersection behaves...
Your ring shape is an object with a hole, i.e. the path actually consists out of two combined subpaths. Whether the circle appears filled or with a hole is determined by the fill rule (see the symbols in the fill dialog (Shift+Ctrl+F)), it's either even-odd (EO) or non-zero (NZ).
Furthermore, a path has a direction, let's call it here clockwise (CW) and counterclockwise (CCW).
So you end up with several options:
1. Outer circle path: CW or CCW
2. Inner circle path: CW or CCW
3. Circle ring fill: EO or NZ
4. Rectangle: CW or CCW
5. Rectangle fill: EO or NZ
6. Order of selection: Rectangle 1st or Rectangle 2nd

This gives you 2^6 = 64 possibilities which are realized in the following graph.
Blue are the original objects, green are the intersected results.
Most of the combinations result in the pattern you would expect.
Some "surprises" are the combinations: a1, a3, b2, b4, g1, g3, h2 and h4. (edit: some mistake in column g now corrected).

Certainly, there is an explanation for it. If not, it's a bug or a feature ;-).
I guess in your case you're having one of the cases a1, a3, g1 or g3.

It is assumed that the rectangle is always on top of the circle, otherwise you will have a 7th option and 128 possibilities. Maybe there is even an influence on the order of the subpaths of the circle ring, which would be an 8th option and 256 combinations? Haven't checked yet.

IntersectionFillRule.png
IntersectionFillRule.png (70.07 KiB) Viewed 1136 times
Win7/64, Inkscape 0.92.2


Return to “Help with using Inkscape”