Boost logo

Geometry :

Subject: [ggl] Polygon difference
From: Simonson, Lucanus J (lucanus.j.simonson)
Date: 2011-01-10 12:19:35


Barend Gehrels wrote:
> hi Vishnu,
>
>
> On 10-1-2011 3:34, Vish wrote:
>>
>> I get an empty polygon list from a polygon difference calculation 'a
>> NOT b'. Neither polygon 'a' nor 'b' has a hole and 'b' is completely
>> inside 'a'. Polygons 'a' and 'b' are passed into an
>> intersection_inserter after reversing the boundary of 'b'.
>>
>> I read the posting of Feb 28, 2010 titled "XOR and/or DIFFERENCE
>> boolean polygon combination". In that posting, a problematic case was
>> described, when rings of 'b' do not intersect rings of 'a'. It was
>> mentioned that some additional work needed to be done to assemble
>> the rings.
>>
>> Does this problematic case remain unresolved, and if so, is there a
>> workaround?
>
> This is solved last December, but you have to use the "difference"
> algorithm now. So reversing beforehand is not necessary anymore. So
> difference and sym_difference now work for all combinations. There is
> still an issue with self-tangencies, but in "normal" cases it should
> always work.

What is a self-tangency? There are three types of self-touch configurations, edge touching edge, vertex touching edge and vertex touching vertex. I'm guessing self-tangency is vertex touching edge. Do you have a plan for how to solve it?

Thanks,
Luke


Geometry list run by mateusz at loskot.net