[geos-devel] Geometry/Rectangle Intersection: winding order

Sandro Santilli strk at keybit.net
Tue Sep 16 02:57:32 PDT 2014


On Tue, Sep 16, 2014 at 12:32:16PM +0300, Mika Heiskanen wrote:

> So, if no winding rule is enforced, and we process the
> rings in the actual order of the vertices, then in the reconnecting
> phase
> 
>    CW shell  connects from the start point
>    CCW shell connects from the end point
>    CCW hole  connects from the start point
>    CW hole   connects from the end point
> 
> and all connecting would be done by going clockwise around the
> rectangle looking for the next vertex. The next vertex may be
> the start point of the ring that is being built.

I pushed code to check winding for ring that had any intersection
with the rectangle and reverse the clipping lines if the ring was
not in the expected order (CW for shells, CCW for holes).
Fully outside or inside rings are not checked again.

No failing test in the RectangleIntersectionTest so far.
I'm back to analyze the failures I get when enabling transparent use
of RectangleIntersection from Geometry::intersection.

--strk;

 ()  ASCII ribbon campaign  --  Keep it simple !
 /\  http://strk.keybit.net/rants/ascii_mails.txt  


More information about the geos-devel mailing list