Boost C++ Libraries: Ticket #9081: boost geometry booleans create self-intersecting polygons from non-self-intersecting polygons https://svn.boost.org/trac10/ticket/9081 <p> The attached program mimics aspects of the way in which I am trying to use the boost geometry polygon boolean operations. It repeatedly selects two polygons from a list, computes the booleans, and adds the results to the list. It also checks the results for self-intersection and reports the input and operation that lead to the failure before exiting. When I run it as is I get this result: </p> <p> FAILED TO SUBTRACT MULTIPOLYGON(((0.2654871893371946 0.2880663823207319,0.349204346823061 0.3819520178855695,0.4615617830267027 0.4487295340751242,0.2851297065819251 0.2894032238012155,0.2654871893371946 0.2880663823207319))) MULTIPOLYGON(((0.4615617830267023 0.4487295340751238,0.4809248136210044 0.4662152446243423,0.4861159661340977 0.46332284819279,0.4615617830267023 0.4487295340751238))) MULTIPOLYGON(((0.4615617830267027 0.4487295340751242,0.4615617830267023 0.4487295340751238,0.2851297065819251 0.2894032238012155,0.2654871893371946 0.2880663823207319,0.349204346823061 0.3819520178855695,0.4615617830267023 0.4487295340751238,0.4615617830267027 0.4487295340751242))) </p> <p> Expected result: the program completes without finding a self-intersection. </p> <p> Boost SVN revision: 85565. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9081 Trac 1.4.3 snubdodecahedron@… Wed, 04 Sep 2013 23:26:26 GMT attachment set https://svn.boost.org/trac10/ticket/9081 https://svn.boost.org/trac10/ticket/9081 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">bo-rand.cpp</span> </li> </ul> <p> program that tends to cause degeneracies that break boost boolean operators </p> Ticket Barend Gehrels Wed, 18 Sep 2013 13:48:43 GMT status changed https://svn.boost.org/trac10/ticket/9081#comment:1 https://svn.boost.org/trac10/ticket/9081#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Thanks for your report and complete program. </p> <p> The reported issue is fixed (not yet committed), on continue there is (at least) one issue more, I'm currently looking into that. </p> Ticket Barend Gehrels Sun, 20 Oct 2013 17:44:56 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/9081#comment:2 https://svn.boost.org/trac10/ticket/9081#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> <p> The new version (will be released in 1.56) handles the whole program correctly. Thanks again for the report and program. The program itself is (adapted) included in libs/geometry/test/algorithms/overlay/robustness Commit 86368. </p> <p> There are no self-intersections detected or (as far as known) generated. A follow-up is still needed and will be done, but I now close this ticket. Follow-up consists of checking if intersections/unions really deliver the expected results... </p> Ticket snubdodecahedron@… Tue, 22 Oct 2013 02:42:03 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/9081#comment:3 https://svn.boost.org/trac10/ticket/9081#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> Thanks for the time you have put in working on the robustness of the booleans. Unfortunately, the robustness problems I am seeing have not gone away entirely. If I increase num_rounds, more errors occur. I encounter another failure at j=20873, just beyond the limit of 20000. </p> <p> FAILED TO SUBTRACT MULTIPOLYGON(((0.7509300609729007 0.8324722592358975,0.8042829718252699 0.8481560887351229,0.7181553883226776 0.6956169841898348,0.6576278983598247 0.6540915246843938,0.6555644714177575 0.6659856895021095,0.6855025369140797 0.7285736700187314,0.6508925849594112 0.6929157379629282,0.650469437358133 0.6953548780212527,0.6469179553689026 0.7158266045776277,0.7509300609729007 0.8324722592358975)),((0.511504900593046 0.5538424538852912,0.5105372544083628 0.5628807906849378,0.5501918096233597 0.6073518791834868,0.5445123657939808 0.5833143541745091,0.5246796698528305 0.5628811294974216,0.511504900593046 0.5538424538852912))) MULTIPOLYGON(((0.6704462887352797 0.4110835792097198,0.6250869964715136 0.4027148156722666,0.6024038490759296 0.3985297879223852,0.52342126908305 0.4425371508249375,0.511504900593046 0.5538424538852911,0.5246796698528302 0.5628811294974214,0.5695140188658651 0.593640160568034,0.5869867771194113 0.6056275123606045,0.6142447919437877 0.5779925880842203,0.6598645622107746 0.5930492965993388,0.631771022000775 0.6363521690156905,0.6729706290597066 0.6646175508383255,0.6815434463447968 0.6704990135792724,0.7277038215460447 0.7021677775136729,0.8728228821986608 0.8017280877181142,0.8314998368182932 0.7219628318828109,0.7915526399468964 0.6448533558260428,0.7822765383665221 0.6269478358213545,0.6704462887352797 0.4110835792097199),(0.6690841332842773 0.5788384172674677,0.6322785133517944 0.5597095058883004,0.6381969058066019 0.5537092770242282,0.6715985349232937 0.5735609032668809,0.6712665681356453 0.5754744518426989,0.6690841332842773 0.5788384172674677))) MULTIPOLYGON(((0.7181553883226776 0.6956169841898348,0.6815434463447968 0.6704990135792724,0.6729706290597066 0.6646175508383255,0.6576278983598247 0.6540915246843938,0.6555644714177575 0.6659856895021095,0.6855025369140797 0.7285736700187314,0.6508925849594112 0.6929157379629282,0.650469437358133 0.6953548780212527,0.6469179553689026 0.7158266045776277,0.7509300609729007 0.8324722592358975,0.8042829718252699 0.8481560887351229,0.7181553883226776 0.6956169841898348)),((0.5246796698528305 0.5628811294974216,0.5246796698528302 0.5628811294974214,0.511504900593046 0.5538424538852912,0.5105372544083628 0.5628807906849378,0.5501918096233597 0.6073518791834868,0.5445123657939808 0.5833143541745091,0.5246796698528305 0.5628811294974216))) </p> Ticket