Boost logo

Geometry :

Subject: [ggl] Difference / xor for multi polygons
From: Simonson, Lucanus J (lucanus.j.simonson)
Date: 2011-03-03 13:36:38


Barend Gehrels wrote:
> Hi Javier,
>
> On 27-2-2011 19:57, Javier Gonzalez wrote:
>> Ok thanks, that worked.
>>
>> However now I'm facing another problem with the difference
>> combination.
>>
>> (...)
>> Isn't this obviously wrong?
>
> Fixed now in the trunk version. I refactored the assemble phase, that
> was planned at some point anyway. This case and similar cases are
> included in the unit tests now.
>
> Thanks for the report. I'm curious to your test results.

Barend,

Randomized testing of manhattan data validated against Polygon's result would have caught this problem. The fact that the bug is now fixed does not ensure that similar problems do not still exist. The testing I'm suggesting is a form of pseudo-exhaustive verification. All possible cases can't, of course, be tested, but with randomized testing you can quickly and easily test a huge number of cases, enough to conclude that there are no latent bugs. From my point of view, performing this kind of verification before release of the library is the responsible thing to do. Any bugs found after the release will reflect upon the entire boost community. The worst thing that can happen is that after a few hours work you find no issues and can congratulate yourself on a job well done. Wouldn't you rather know for sure that you code is correct?

Kindest regards,
Luke


Geometry list run by mateusz at loskot.net