Boost logo

Geometry :

Subject: [geometry] Using intersection on negative polarity polygons
From: sergei benkovich (sergei1503_at_[hidden])
Date: 2016-09-01 07:17:08


Hey,
i have 2 polygons.
with negative outer rings. and positive inner rings.
the inner rings intersect.
but when i run the bg::intersection i get an empty result,
although i would expect to get the shared positive region.
is this the way it should be?

those are the polygons i used

   outer1{ { 40, 40 }, { 60, 40 }, { 60, 60 }, { 40, 60 }, { 40, 40 } };
   inner1{ { 42, 42 }, { 42, 48 }, { 48, 48 }, { 48, 42 }, { 42, 42 } };

   outer2{ { 20, 20 }, { 20, 80 }, { 80, 80 }, { 80, 20 }, { 20, 20 } };
   inner2{ { 44, 44 }, { 44, 46 }, { 46, 46 }, { 46, 44 }, { 44, 44 } };

thanks,
Sergei



Geometry list run by mateusz at loskot.net