Boost C++ Libraries: Ticket #8183: boost::geometry::intersection on two polygons returns incorrect empty intersection https://svn.boost.org/trac10/ticket/8183 <p> Hi </p> <p> The code snippet intersects 2 2D polygons resulting in an empty intersection. I'm including an image of the two polygons and they are overlapping. There may be a problem because the polygons share an overlapping edge? </p> <p> Thanks </p> <p> Matthew Danielsen </p> <pre class="wiki"> polygon_2d triangle2D; { const double triangle2Dcoor[] = {{0.891747, 2.28756}, {0.490911, -1.52549}, {-1.72945, -1.52549}, {0.891747, 2.28756}}; assign(triangle2D, triangle2Dcoor); } polygon_2d box2D; { const double box2Dcoor[] = {{-1.6744, -1.52549}, {-1.70498, -1.52549}, {-1.70052, -1.49155}, {-1.67049, -1.49579}, {-1.6744, -1.52549}}; assign(box2D, box2Dcoor); } boost::geometry::model::multi_polygon&lt; boost::geometry::model::polygon&lt;boost::geometry::model::d2::point_xy&lt;T&gt; &gt; &gt; intersectionPolygons; boost::geometry::intersection(triangle2D, box2D, intersectionPolygons); assert(intersectionPolygons.size() != 0); // Assert fails </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8183 Trac 1.4.3 matthewd@… Tue, 26 Feb 2013 09:25:51 GMT attachment set https://svn.boost.org/trac10/ticket/8183 https://svn.boost.org/trac10/ticket/8183 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">OverlappingImage.jpg</span> </li> </ul> <p> Image of polygons </p> Ticket Barend Gehrels Sun, 17 Mar 2013 17:47:02 GMT status changed https://svn.boost.org/trac10/ticket/8183#comment:1 https://svn.boost.org/trac10/ticket/8183#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Can you be more specific? What is T for example? I cannot reproduce it. That means, I get a non-empty intersection looking like the expected result. </p> <p> Please specify: </p> <ul><li>T (double, float, extended, etc) </li><li>compiler </li><li>operating system </li></ul> Ticket