Subject: [ggl] Re: Problems with the difference between two polygons
From: Angus Johnson (awj1958)
Date: 2011-08-08 11:35:41
On 8/08/2011 4:47 AM, Barend Gehrels wrote:
> The coordinates (which I got that time and played with later) really
> show very small segments, near the corners of the hexagons, which
> cause the extra intersection.
I'm surprised. Given that both edges of the inner black trapezoid
intersecting the hexagon seem to run inside and parallel to the hexagon
edges, it doesn't seem possible that the intersection could include any
part of a hexagon corner. Perhaps I'm missing something.
> I don't know how you cope with such small distances in integer scaled
> algorithms, but I think they should be included.
Distances of less than one unit are treated as insignificant. It is
simply up to the library user to upscale fractional coordinate values to
the desired precision. For example, if 8 decimal places of precision is
required then all polygon coordinates should be multiplied by 10^8
before passing them to Clipper (which accepts all coordinates as 64bit
Geometry list run by mateusz at loskot.net