Boost logo

Geometry :

Subject: Re: [geometry] Problems with strategy::within::winding
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-05-15 08:01:01


Hi,

Visvardis Marios wrote:
> Hi all,
>
> I have some, robustness-related, problems with the within() function
> for some test cases.
>
> Source code for a reproducible example:
>
> https://gist.github.com/mariosv/9c8f4fa106c0546f95cf
>
> The invalid result is produced only when using the
> strategy::within::winding strategy.
>
> I traced the source of the problem to floating number comparisons in
> point_in_poly_winding.hpp:check_segment() function.
>
> I tried a workaround that passes this specific test case but I am not
> sure it
> fits the general case:
>
> https://github.com/mariosv/geometry/commit/8acd206f6dec606c72e6eb7588be7256861286d0
>

Thanks for catching this!

Regarding the fix, yes, it require more thought and comments from the
others.

But a quick look revealed that in the winding<> strategy the result is
always calculated WRT Dimension=1.
Shouldn't a "better" Dimension be choosen somehow and then the result
calculated?
Could it fix this issue?

Regards,
Adam


Geometry list run by mateusz at loskot.net