Boost logo

Geometry :

Subject: [geometry] intersection of two rings
From: Ollmann, Tobias (Tobias.Ollmann_at_[hidden])
Date: 2016-04-06 04:53:01


Hello,

First of all, thank you for developing this great library. I found it last week and it solved some of my problems at once :)

But now I have a problem when calculating the intersection points of two linear rings.
The rings share a common line which yields two intersection points while it should only give one (in my opinion)

The two rings are:
0,10 - 0,30 - 30,30 - 30,10 ( - 0,10)
10,10 - 10,20 - 40,20 - 40,0 - 20,0 - 20,10 ( - 10,10)

The found intersections are:
30,20
20,10
10,10

Is this a bug or expected behavior?
I would expect that the number of intersections of two closed rings is always even, as one ring has to 'enter' the other as often as it 'leaves' it.

Thank you in advance for any help!

Regards,
Tobias Ollmann


Geometry list run by mateusz at loskot.net