Boost C++ Libraries: Ticket #6079: bug in polygonset::resize() https://svn.boost.org/trac10/ticket/6079 <p> Hi, </p> <blockquote> <p> I found two bug in polygonset::resize() as follows, </p> </blockquote> <pre class="wiki"> //bug1 std::vector&lt;Point&gt; pts; Polygon poly; PolygonSet polySet, polySetResult; pts.clear(); pts.push_back(Point( 6300, 0)); pts.push_back(Point( 0, 0)); pts.push_back(Point( 0, 4750)); pts.push_back(Point( 1250, 6000)); pts.push_back(Point( 1250, 7500)); pts.push_back(Point( 2850, 7500)); pts.push_back(Point( 2850, 5950)); pts.push_back(Point( 5950, 5950)); pts.push_back(Point( 5950, 5750)); pts.push_back(Point( 6300, 5400)); boost::polygon::set_points(poly, pts.begin(), pts.end()); polySet += poly; polySetResult += polySet-1000; //bug2 std::vector&lt;Point&gt; pts2; Polygon poly2; PolygonSet polySet2, polySetResult2; pts2.clear(); pts2.push_back(Point(2100, 2575)); pts2.push_back(Point(1700, 2575)); pts2.push_back(Point(1700, 2365)); pts2.push_back(Point(1800, 2265)); pts2.push_back(Point(1835, 2265)); pts2.push_back(Point(1835, 1945)); pts2.push_back(Point(1645, 1945)); pts2.push_back(Point(1645, 2305)); pts2.push_back(Point(1440, 2305)); pts2.push_back(Point(1440, 2790)); pts2.push_back(Point(1145, 2790)); pts2.push_back(Point(1145, 1805)); pts2.push_back(Point(2100, 1805)); boost::polygon::set_points(poly2, pts2.begin(), pts2.end()); polySet2 += poly2; polySetResult2 += polySet2+100; </pre><blockquote> <p> For bug one, </p> <blockquote> <p> current result : { 1000 4336, 1000 1000, 5300 1000, 5300 4986, 4950 5336, 4950 4950, 1850 4950, 1850 5186} correct result : { 1000 4336, 1000 1000, 5300 1000, 5300 4950, 1850 4950, 1850 5186} </p> </blockquote> </blockquote> <blockquote> <p> For bug two, the result is a polygon with hole. However, I think there shall be no hole in the result. </p> </blockquote> <blockquote> <p> Please check and thanks for your help. </p> </blockquote> <p> Regards, Jay Huang </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6079 Trac 1.4.3 Jay Huang <yhuangza@…> Tue, 01 Nov 2011 10:27:00 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6079#comment:1 https://svn.boost.org/trac10/ticket/6079#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> Ticket