From 95bb6372abc9771bc0b186b55f5abffdaaef2470 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Sat, 18 Jan 2014 18:14:51 +0100 Subject: [PATCH] [geometry] Added testcase for ticket #9563 which was already fixed in this branch Rescaling to robust type already fixed this. --- doc/release_notes.qbk | 3 +++ test/algorithms/difference.cpp | 4 ++++ test/algorithms/intersection.cpp | 3 +++ test/algorithms/overlay/overlay_cases.hpp | 8 ++++++++ test/algorithms/union.cpp | 3 +++ 5 files changed, 21 insertions(+) diff --git a/doc/release_notes.qbk b/doc/release_notes.qbk index 249510236..8bc81c9fc 100644 --- a/doc/release_notes.qbk +++ b/doc/release_notes.qbk @@ -32,6 +32,9 @@ * intersects(polygon) could return a self-intersection-point for its closing point, fixed +[*Solved tickets] + +* [@https://svn.boost.org/trac/boost/ticket/9563 9563] (Sym)difference not successful, fixed by rescaling to robust type [/=================] [heading Boost 1.55] diff --git a/test/algorithms/difference.cpp b/test/algorithms/difference.cpp index 982930440..3cfe4575f 100644 --- a/test/algorithms/difference.cpp +++ b/test/algorithms/difference.cpp @@ -348,6 +348,10 @@ void test_all() 2, 12, 0.0451236449624935, 0, 0, 0); + test_one("ticket_9563", + ticket_9563[0], ticket_9563[1], + 0, 0, 0, + 6, 24, 20.096189); // Other combi's { diff --git a/test/algorithms/intersection.cpp b/test/algorithms/intersection.cpp index 21bbb6787..df5a3c807 100644 --- a/test/algorithms/intersection.cpp +++ b/test/algorithms/intersection.cpp @@ -217,6 +217,9 @@ void test_areal() ticket_9081_15[0], ticket_9081_15[1], 1, 4, 0.0068895780745301394); + test_one("ticket_9563", ticket_9563[0], ticket_9563[1], + 1, 8, 129.90381); + test_one("buffer_mp1", buffer_mp1[0], buffer_mp1[1], 1, 31, 2.271707796); diff --git a/test/algorithms/overlay/overlay_cases.hpp b/test/algorithms/overlay/overlay_cases.hpp index c5ca3c0d3..286754224 100644 --- a/test/algorithms/overlay/overlay_cases.hpp +++ b/test/algorithms/overlay/overlay_cases.hpp @@ -769,4 +769,12 @@ static std::string ticket_9081_6690[2] = "POLYGON((0.3984249865018206 0.4526335964808558,0.3621206996557855 0.4602288471829723,0.4183516736935784 0.4730187483833363,0.4099611282054451 0.4644351568071601,0.3984249865018206 0.4526335964808558))" }; +static std::string ticket_9563[2] = + { + "POLYGON((16.4030230586813990 21.4147098480789640, 17.3451877762964380 14.8677773110138890, 11.9421647176150360 6.4530674629349205, 5.5969769413186015 4.5852901519210345, 4.6548122237035621 11.1322226889861170, 10.0578352823849610 19.5469325370650790, 16.4030230586813990 21.4147098480789640, 16.4030230586813990 21.4147098480789640))", + "POLYGON((16.4030230586814020 21.414709848078967, 17.7828326880709360 18.936596729241124, 17.3451877762964410 14.867777311013885, 15.2073549240394820 10.298488470659295, 11.9421647176150340 6.4530674629349125, 8.4245222359685457 4.3618917414181650, 5.5969769413185944 4.5852901519210292, 4.2171673119290620 7.0634032707588670, 4.6548122237035567 11.132222688986115, 6.7926450759605128 15.701511529340699, 10.0578352823849570 19.546932537065082, 13.5754777640314510 21.638108258581831, 16.4030230586814020 21.414709848078967))" + }; + + + #endif // BOOST_GEOMETRY_TEST_OVERLAY_CASES_HPP diff --git a/test/algorithms/union.cpp b/test/algorithms/union.cpp index 86ed7a3bb..59d66fce1 100644 --- a/test/algorithms/union.cpp +++ b/test/algorithms/union.cpp @@ -270,6 +270,9 @@ void test_areal() ticket_9081_15[0], ticket_9081_15[1], 1, 0, 7, 0.0403425433); + test_one("ticket_9563", ticket_9563[0], ticket_9563[1], + 1, 0, 13, 150.0); + test_one("buffer_rt_a", buffer_rt_a[0], buffer_rt_a[1], 1, 0, 265, 19.280667);