From 4ccd4e43cedde83aa2e679ccdc5f83c068530660 Mon Sep 17 00:00:00 2001 From: Barend Gehrels Date: Wed, 5 Jul 2017 13:06:15 +0200 Subject: [PATCH] [is_valid] add extra info to turn to determine validity Including unit test adaptions. Results are verified visually with SVG --- .../detail/overlay/get_turn_info.hpp | 14 + .../algorithms/detail/overlay/turn_info.hpp | 2 + test/algorithms/overlay/get_turn_info.cpp | 260 +++++++++--------- 3 files changed, 149 insertions(+), 127 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index 08bc34218..895952c8f 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -190,6 +190,7 @@ struct touch_interior : public base_turn_handler // Q turns left on the right side of P (test "MR3") // Both directions for "intersection" both(ti, operation_intersection); + ti.touch_only = true; } else if (side_qi_p == 1 && side_qk_p == 1 && side_qk_q == -1) { @@ -197,6 +198,7 @@ struct touch_interior : public base_turn_handler // Union: take both operation // Intersection: skip both(ti, operation_union); + ti.touch_only = true; } else if (side_qi_p == side_qk_p && side_qi_p == side_qk_q) { @@ -207,6 +209,7 @@ struct touch_interior : public base_turn_handler unsigned int index = side_qk_q == 1 ? index_q : index_p; ti.operations[index].operation = operation_union; ti.operations[1 - index].operation = operation_intersection; + ti.touch_only = true; } else if (side_qk_p == 0) { @@ -346,6 +349,7 @@ struct touch : public base_turn_handler if (side_pk_q2 == -side_qk_q) { ui_else_iu(! q_turns_left, ti); + ti.touch_only = true; return; } @@ -358,6 +362,10 @@ struct touch : public base_turn_handler { ti.operations[1].operation = operation_blocked; } + else + { + ti.touch_only = true; + } //block_second(block_q, ti); return; } @@ -373,6 +381,10 @@ struct touch : public base_turn_handler : side_qi_p1 == 1 || side_qk_p1 == 1 ? operation_union : operation_intersection; + if (! block_q) + { + ti.touch_only = true; + } return; } @@ -400,6 +412,7 @@ struct touch : public base_turn_handler if (side_pk_q1 == side_qk_p1) { uu_else_ii(right_to_left, ti); + ti.touch_only = true; return; } } @@ -418,6 +431,7 @@ struct touch : public base_turn_handler if (side_pk_q2 == side_qk_p1) { ui_else_iu(right_to_left, ti); + ti.touch_only = true; return; } } diff --git a/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp index 06bf1a293..3a4c2e94a 100644 --- a/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp @@ -89,6 +89,7 @@ struct turn_info Point point; method_type method; + bool touch_only; // True in case of method touch(interior) and lines do not cross signed_size_type cluster_id; // For multiple turns on same location, >= 0. Else -1 bool discarded; @@ -101,6 +102,7 @@ struct turn_info inline turn_info() : method(method_none) + , touch_only(false) , cluster_id(-1) , discarded(false) , colocated_ii(false) diff --git a/test/algorithms/overlay/get_turn_info.cpp b/test/algorithms/overlay/get_turn_info.cpp index 24fc5ac74..6310e248e 100644 --- a/test/algorithms/overlay/get_turn_info.cpp +++ b/test/algorithms/overlay/get_turn_info.cpp @@ -36,6 +36,7 @@ void test_with_point(std::string const& caseid, T pi_x, T pi_y, T pj_x, T pj_y, T pk_x, T pk_y, T qi_x, T qi_y, T qj_x, T qj_y, T qk_x, T qk_y, bg::detail::overlay::method_type expected_method, + bool expected_touch_only, T ip_x, T ip_y, std::string const& expected, T ip_x2, T ip_y2) @@ -100,6 +101,10 @@ void test_with_point(std::string const& caseid, if (! info.empty()) { BOOST_CHECK_EQUAL(info[0].method, expected_method); + BOOST_CHECK_MESSAGE(info[0].touch_only == expected_touch_only, + caseid + << " detected: " << info[0].touch_only + << " expected: " << expected_touch_only); BOOST_CHECK_CLOSE(bg::get<0>(info[0].point), ip_x, 0.001); BOOST_CHECK_CLOSE(bg::get<1>(info[0].point), ip_y, 0.001); @@ -164,6 +169,8 @@ void test_with_point(std::string const& caseid, op.clear(); op += bg::method_char(it->method); + op += ' '; + op += (it->touch_only ? 'o' : '*'); if (info.size() != 1) { op += ch; @@ -183,6 +190,7 @@ void test_both(std::string const& caseid, T qi_x, T qi_y, T qj_x, T qj_y, T qk_x, T qk_y, bg::detail::overlay::method_type method = bg::detail::overlay::method_none, + bool expected_touch_only = false, T ip_x = -1, T ip_y = -1, std::string const& expected = "", T ip_x2 = -1, T ip_y2 = -1) @@ -190,9 +198,7 @@ void test_both(std::string const& caseid, test_with_point(caseid, pi_x, pi_y, pj_x, pj_y, pk_x, pk_y, qi_x, qi_y, qj_x, qj_y, qk_x, qk_y, - method, ip_x, ip_y, expected, ip_x2, ip_y2); - - //return; + method, expected_touch_only, ip_x, ip_y, expected, ip_x2, ip_y2); std::string reversed(expected.rbegin(), expected.rend()); @@ -205,7 +211,7 @@ void test_both(std::string const& caseid, test_with_point(caseid + "_r", qi_x, qi_y, qj_x, qj_y, qk_x, qk_y, // q pi_x, pi_y, pj_x, pj_y, pk_x, pk_y, // p - method, ip_x, ip_y, reversed, ip_x2, ip_y2); + method, expected_touch_only, ip_x, ip_y, reversed, ip_x2, ip_y2); } @@ -223,27 +229,27 @@ void test_all() test_both("il1", 5, 1, 5, 6, 7, 8, // p 3, 3, 7, 5, 8, 3, // q - method_crosses, 5, 4, "ui"); + method_crosses, false, 5, 4, "ui"); test_both("il2", 5, 1, 5, 6, 7, 8, // p 3, 5, 7, 5, 3, 3, // q - method_crosses, 5, 5, "ui"); + method_crosses, false, 5, 5, "ui"); test_both("il3", 5, 1, 5, 6, 7, 8, // p 3, 3, 7, 5, 3, 5, // q - method_crosses, 5, 4, "ui"); + method_crosses, false, 5, 4, "ui"); test_both("il4", 5, 1, 5, 6, 7, 8, // p 3, 3, 7, 5, 4, 8, // q - method_crosses, 5, 4, "ui"); + method_crosses, false, 5, 4, "ui"); test_both("ir1", 5, 1, 5, 6, 7, 8, // p 7, 5, 3, 3, 2, 5, // q - method_crosses, 5, 4, "iu"); + method_crosses, false, 5, 4, "iu"); // ------------------------------------------------------------------------ @@ -252,52 +258,52 @@ void test_all() test_both("ml1", 5, 1, 5, 6, 7, 8, // p 3, 3, 5, 4, 7, 3, // q - method_touch_interior, 5, 4, "ui"); + method_touch_interior, false, 5, 4, "ui"); test_both("ml2", 5, 1, 5, 6, 7, 8, // p 3, 3, 5, 4, 3, 6, // q - method_touch_interior, 5, 4, "iu"); + method_touch_interior, true, 5, 4, "iu"); test_both("ml3", 5, 1, 5, 6, 7, 8, // p 3, 6, 5, 4, 3, 3, // q - method_touch_interior, 5, 4, "uu"); + method_touch_interior, true, 5, 4, "uu"); test_both("mr1", 5, 1, 5, 6, 7, 8, // p 7, 3, 5, 4, 3, 3, // q - method_touch_interior, 5, 4, "iu"); + method_touch_interior, false, 5, 4, "iu"); test_both("mr2", 5, 1, 5, 6, 7, 8, // p 7, 3, 5, 4, 7, 6, // q - method_touch_interior, 5, 4, "ui"); + method_touch_interior, true, 5, 4, "ui"); test_both("mr3", 5, 1, 5, 6, 7, 8, // p 7, 6, 5, 4, 7, 3, // q - method_touch_interior, 5, 4, "ii"); + method_touch_interior, true, 5, 4, "ii"); test_both("mcl", 5, 1, 5, 6, 7, 8, // p 3, 2, 5, 3, 5, 5, // q - method_touch_interior, 5, 3, "cc"); + method_touch_interior, false, 5, 3, "cc"); test_both("mcr", 5, 1, 5, 6, 7, 8, // p 7, 2, 5, 3, 5, 5, // q - method_touch_interior, 5, 3, "cc"); + method_touch_interior, false, 5, 3, "cc"); test_both("mclo", 5, 1, 5, 6, 7, 8, // p 3, 4, 5, 5, 5, 3, // q - method_touch_interior, 5, 5, "ux"); + method_touch_interior, false, 5, 5, "ux"); test_both("mcro", 5, 1, 5, 6, 7, 8, // p 7, 4, 5, 5, 5, 3, // q - method_touch_interior, 5, 5, "ix"); + method_touch_interior, false, 5, 5, "ix"); // ------------------------------------------------------------------------ // COLLINEAR @@ -305,53 +311,53 @@ void test_all() test_both("cll1", 5, 1, 5, 6, 3, 8, // p 5, 5, 5, 7, 3, 8, // q - method_collinear, 5, 6, "ui"); + method_collinear, false, 5, 6, "ui"); test_both("cll2", 5, 1, 5, 6, 3, 8, // p 5, 3, 5, 5, 3, 6, // q - method_collinear, 5, 5, "iu"); + method_collinear, false, 5, 5, "iu"); test_both("clr1", 5, 1, 5, 6, 3, 8, // p 5, 5, 5, 7, 6, 8, // q - method_collinear, 5, 6, "ui"); + method_collinear, false, 5, 6, "ui"); test_both("clr2", 5, 1, 5, 6, 3, 8, // p 5, 3, 5, 5, 6, 6, // q - method_collinear, 5, 5, "ui"); + method_collinear, false, 5, 5, "ui"); test_both("crl1", 5, 1, 5, 6, 7, 8, // p 5, 5, 5, 7, 3, 8, // q - method_collinear, 5, 6, "iu"); + method_collinear, false, 5, 6, "iu"); test_both("crl2", 5, 1, 5, 6, 7, 8, // p 5, 3, 5, 5, 3, 6, // q - method_collinear, 5, 5, "iu"); + method_collinear, false, 5, 5, "iu"); test_both("crr1", 5, 1, 5, 6, 7, 8, // p 5, 5, 5, 7, 6, 8, // q - method_collinear, 5, 6, "iu"); + method_collinear, false, 5, 6, "iu"); test_both("crr2", 5, 1, 5, 6, 7, 8, // p 5, 3, 5, 5, 6, 6, // q - method_collinear, 5, 5, "ui"); + method_collinear, false, 5, 5, "ui"); // The next two cases are changed (BSG 2013-09-24), they contain turn info (#buffer_rt_g) // In new approach they are changed back (BSG 2013-10-20) test_both("ccx1", 5, 1, 5, 6, 5, 8, // p 5, 5, 5, 7, 3, 8, // q - method_collinear, 5, 6, "cc"); // "iu"); + method_collinear, false, 5, 6, "cc"); // "iu"); test_both("cxc1", 5, 1, 5, 6, 7, 8, // p 5, 3, 5, 5, 5, 7, // q - method_collinear, 5, 5, "cc"); // "iu"); + method_collinear, false, 5, 5, "cc"); // "iu"); // Bug in case #54 of "overlay_cases.hpp" test_both("c_bug1", 5, 0, 2, 0, 2, 2, // p 4, 0, 1, 0, 1, 2, // q - method_collinear, 2, 0, "iu"); + method_collinear, false, 2, 0, "iu"); // ------------------------------------------------------------------------ @@ -361,66 +367,66 @@ void test_all() test_both("clo1", 5, 2, 5, 6, 3, 8, // p 5, 7, 5, 5, 3, 3, // q - method_collinear, 5, 6, "ixxu", 5, 5); + method_collinear, false, 5, 6, "ixxu", 5, 5); test_both("clo2", 5, 2, 5, 6, 3, 8, // p 5, 7, 5, 5, 5, 2, // q - method_collinear, 5, 6, "ix"); + method_collinear, false, 5, 6, "ix"); // actually "xxix", xx is skipped everywhere test_both("clo3", 5, 2, 5, 6, 3, 8, // p 5, 7, 5, 5, 7, 3, // q - method_collinear, 5, 6, "ixxi", 5, 5); + method_collinear, false, 5, 6, "ixxi", 5, 5); test_both("cco1", 5, 2, 5, 6, 5, 8, // p 5, 7, 5, 5, 3, 3, // q - method_collinear, 5, 5, "xu"); // "xuxx" + method_collinear, false, 5, 5, "xu"); // "xuxx" test_both("cco2", 5, 2, 5, 6, 5, 8, // p 5, 7, 5, 5, 5, 2); // q "xxxx" test_both("cco3", 5, 2, 5, 6, 5, 8, // p 5, 7, 5, 5, 7, 3, // q - method_collinear, 5, 5, "xi"); // "xixx" + method_collinear, false, 5, 5, "xi"); // "xixx" test_both("cro1", 5, 2, 5, 6, 7, 8, // p 5, 7, 5, 5, 3, 3, // q - method_collinear, 5, 6, "uxxu", 5, 5); + method_collinear, false, 5, 6, "uxxu", 5, 5); test_both("cro2", 5, 2, 5, 6, 7, 8, // p 5, 7, 5, 5, 5, 2, // q - method_collinear, 5, 6, "ux"); // "xxux" + method_collinear, false, 5, 6, "ux"); // "xxux" test_both("cro3", 5, 2, 5, 6, 7, 8, // p 5, 7, 5, 5, 7, 3, // q - method_collinear, 5, 6, "uxxi", 5, 5); + method_collinear, false, 5, 6, "uxxi", 5, 5); test_both("cxo1", 5, 2, 5, 6, 3, 8, // p 5, 5, 5, 3, 3, 1, // q - method_collinear, 5, 3, "xu"); + method_collinear, false, 5, 3, "xu"); test_both("cxo2", 5, 2, 5, 6, 3, 8, // p 5, 5, 5, 3, 5, 0); // q "xx" test_both("cxo3", 5, 2, 5, 6, 3, 8, // p 5, 5, 5, 3, 7, 1, // q - method_collinear, 5, 3, "xi"); + method_collinear, false, 5, 3, "xi"); test_both("cxo4", 5, 2, 5, 6, 3, 8, // p 5, 7, 5, 1, 3, 0, // q - method_collinear, 5, 6, "ix"); + method_collinear, false, 5, 6, "ix"); test_both("cxo5", 5, 2, 5, 6, 5, 8, // p 5, 7, 5, 1, 3, 0); // q "xx" test_both("cxo6", 5, 2, 5, 6, 7, 8, // p 5, 7, 5, 1, 3, 0, // q - method_collinear, 5, 6, "ux"); + method_collinear, false, 5, 6, "ux"); // Verify @@ -441,61 +447,61 @@ void test_all() test_both("blr1", 5, 1, 5, 6, 4, 4, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "ui"); + method_touch, true, 5, 6, "ui"); test_both("blr2", 5, 1, 5, 6, 1, 4, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("blr3", 5, 1, 5, 6, 3, 6, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "iu"); + method_touch, false, 5, 6, "iu"); test_both("blr4", 5, 1, 5, 6, 1, 8, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "xu"); + method_touch, false, 5, 6, "xu"); test_both("blr5", 5, 1, 5, 6, 4, 8, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); test_both("blr6", 5, 1, 5, 6, 6, 4, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); test_both("blr7", 5, 1, 5, 6, 3, 6, // p 3, 7, 5, 6, 5, 3, // q - method_touch, 5, 6, "ix"); + method_touch, false, 5, 6, "ix"); test_both("blr8", 5, 1, 5, 6, 3, 6, // p 3, 6, 5, 6, 5, 3, // q - method_touch, 5, 6, "xx"); + method_touch, false, 5, 6, "xx"); test_both("blr9", 5, 1, 5, 6, 3, 6, // p 3, 5, 5, 6, 5, 3, // q - method_touch, 5, 6, "ux"); + method_touch, false, 5, 6, "ux"); // Variants test_both("blr7-a", 5, 1, 5, 6, 3, 6, // p 5, 8, 5, 6, 5, 3, // q - method_touch, 5, 6, "ix"); + method_touch, false, 5, 6, "ix"); test_both("blr7-b", // in fact NOT "both-left" 5, 1, 5, 6, 3, 6, // p 6, 8, 5, 6, 5, 3, // q - method_touch, 5, 6, "ix"); + method_touch, false, 5, 6, "ix"); // To check if "collinear-check" on other side // does not apply to this side test_both("blr6-c1", 5, 1, 5, 6, 7, 5, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); test_both("blr6-c2", 5, 1, 5, 6, 7, 7, // p 3, 7, 5, 6, 3, 5, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); @@ -503,75 +509,75 @@ void test_all() test_both("brr1", 5, 1, 5, 6, 6, 4, // p 7, 5, 5, 6, 7, 7, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); test_both("brr2", 5, 1, 5, 6, 9, 4, // p 7, 5, 5, 6, 7, 7, // q - method_touch, 5, 6, "xu"); + method_touch, false, 5, 6, "xu"); test_both("brr3", 5, 1, 5, 6, 7, 6, // p 7, 5, 5, 6, 7, 7, // q - method_touch, 5, 6, "iu"); + method_touch, false, 5, 6, "iu"); test_both("brr4", 5, 1, 5, 6, 9, 8, // p 7, 5, 5, 6, 7, 7, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("brr5", 5, 1, 5, 6, 6, 8, // p 7, 5, 5, 6, 7, 7, // q - method_touch, 5, 6, "ui"); + method_touch, true, 5, 6, "ui"); test_both("brr6", 5, 1, 5, 6, 4, 4, // p 7, 5, 5, 6, 7, 7, // q - method_touch, 5, 6, "ui"); + method_touch, true, 5, 6, "ui"); // Both right, Q turns left test_both("brl1", 5, 1, 5, 6, 6, 4, // p 7, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "iu"); + method_touch, true, 5, 6, "iu"); test_both("brl2", 5, 1, 5, 6, 9, 4, // p 7, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("brl3", 5, 1, 5, 6, 7, 6, // p 7, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("brl4", 5, 1, 5, 6, 9, 8, // p 7, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "xi"); + method_touch, false, 5, 6, "xi"); test_both("brl5", 5, 1, 5, 6, 6, 8, // p 7, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "ii"); + method_touch, true, 5, 6, "ii"); test_both("brl6", 5, 1, 5, 6, 4, 4, // p 7, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "ii"); + method_touch, true, 5, 6, "ii"); test_both("brl7", 5, 1, 5, 6, 7, 6, // p 7, 7, 5, 6, 5, 3, // q - method_touch, 5, 6, "ux"); + method_touch, false, 5, 6, "ux"); test_both("brl8", 5, 1, 5, 6, 7, 6, // p 7, 6, 5, 6, 5, 3, // q - method_touch, 5, 6, "xx"); + method_touch, false, 5, 6, "xx"); test_both("brl9", 5, 1, 5, 6, 7, 6, // p 7, 5, 5, 6, 5, 3, // q - method_touch, 5, 6, "ix"); + method_touch, false, 5, 6, "ix"); // Variants test_both("brl7-a", 5, 1, 5, 6, 7, 6, // p 5, 8, 5, 6, 5, 3, // q - method_touch, 5, 6, "ux"); + method_touch, false, 5, 6, "ux"); test_both("brl7-b", // in fact NOT "both right" 5, 1, 5, 6, 7, 6, // p 4, 8, 5, 6, 5, 3, // q - method_touch, 5, 6, "ux"); + method_touch, false, 5, 6, "ux"); @@ -579,251 +585,251 @@ void test_all() test_both("bll1", 5, 1, 5, 6, 4, 4, // p 3, 5, 5, 6, 3, 7, // q - method_touch, 5, 6, "ii"); + method_touch, true, 5, 6, "ii"); test_both("bll2", 5, 1, 5, 6, 1, 4, // p 3, 5, 5, 6, 3, 7, // q - method_touch, 5, 6, "xi"); + method_touch, false, 5, 6, "xi"); test_both("bll3", 5, 1, 5, 6, 3, 6, // p 3, 5, 5, 6, 3, 7, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("bll4", 5, 1, 5, 6, 1, 8, // p 3, 5, 5, 6, 3, 7, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("bll5", 5, 1, 5, 6, 4, 8, // p 3, 5, 5, 6, 3, 7, // q - method_touch, 5, 6, "iu"); + method_touch, true, 5, 6, "iu"); test_both("bll6", 5, 1, 5, 6, 6, 4, // p 3, 5, 5, 6, 3, 7, // q - method_touch, 5, 6, "iu"); + method_touch, true, 5, 6, "iu"); // TOUCH - COLLINEAR + one side // Collinear/left, Q turns right test_both("t-clr1", 5, 1, 5, 6, 4, 4, // p 5, 8, 5, 6, 3, 5, // q - method_touch, 5, 6, "ui"); + method_touch, true, 5, 6, "ui"); test_both("t-clr2", 5, 1, 5, 6, 1, 4, // p 5, 8, 5, 6, 3, 5, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("t-clr3", 5, 1, 5, 6, 3, 6, // p 5, 8, 5, 6, 3, 5, // q - method_touch, 5, 6, "iu"); + method_touch, false, 5, 6, "iu"); test_both("t-clr4", 5, 1, 5, 6, 5, 8, // p 5, 8, 5, 6, 3, 5, // q - method_touch, 5, 6, "xu"); + method_touch, false, 5, 6, "xu"); // 5 n.a. test_both("t-clr6", 5, 1, 5, 6, 6, 4, // p 5, 8, 5, 6, 3, 5, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); // Collinear/right, Q turns right test_both("t-crr1", 5, 1, 5, 6, 6, 4, // p 7, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); test_both("t-crr2", 5, 1, 5, 6, 9, 4, // p 7, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "xu"); + method_touch, false, 5, 6, "xu"); test_both("t-crr3", 5, 1, 5, 6, 7, 6, // p 7, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "iu"); + method_touch, false, 5, 6, "iu"); test_both("t-crr4", 5, 1, 5, 6, 5, 9, // p 7, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); // 5 n.a. test_both("t-crr6", 5, 1, 5, 6, 4, 4, // p 7, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "ui"); + method_touch, true, 5, 6, "ui"); // Collinear/right, Q turns left test_both("t-crl1", 5, 1, 5, 6, 6, 4, // p 5, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "iu"); + method_touch, true, 5, 6, "iu"); test_both("t-crl2", 5, 1, 5, 6, 9, 4, // p 5, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("t-crl3", 5, 1, 5, 6, 7, 6, // p 5, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("t-crl4", 5, 1, 5, 6, 5, 8, // p 5, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "xi"); + method_touch, false, 5, 6, "xi"); // 5 n.a. test_both("t-crl6", 5, 1, 5, 6, 4, 4, // p 5, 7, 5, 6, 7, 5, // q - method_touch, 5, 6, "ii"); + method_touch, true, 5, 6, "ii"); // Collinear/left, Q turns left test_both("t-cll1", 5, 1, 5, 6, 4, 4, // p 3, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "ii"); + method_touch, true, 5, 6, "ii"); test_both("t-cll2", 5, 1, 5, 6, 1, 4, // p 3, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "xi"); + method_touch, false, 5, 6, "xi"); test_both("t-cll3", 5, 1, 5, 6, 3, 6, // p 3, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("t-cll4", 5, 1, 5, 6, 5, 9, // p 3, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); // 5 n.a. test_both("t-cll6", 5, 1, 5, 6, 6, 4, // p 3, 5, 5, 6, 5, 8, // q - method_touch, 5, 6, "iu"); + method_touch, true, 5, 6, "iu"); // Left to right test_both("lr1", 5, 1, 5, 6, 3, 3, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ii"); + method_touch, true, 5, 6, "ii"); test_both("lr2", 5, 1, 5, 6, 1, 5, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "xi"); + method_touch, false, 5, 6, "xi"); test_both("lr3", 5, 1, 5, 6, 4, 8, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("lr4", 5, 1, 5, 6, 9, 5, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("lr5", 5, 1, 5, 6, 7, 3, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "iu"); + method_touch, true, 5, 6, "iu"); // otherwise case more thoroughly test_both("lr3a", 5, 1, 5, 6, 1, 6, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("lr3b", 5, 1, 5, 6, 5, 10, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("lr3c", 5, 1, 5, 6, 8, 9, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("lr3d", 5, 1, 5, 6, 9, 7, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); test_both("lr3e", 5, 1, 5, 6, 9, 6, // p 1, 5, 5, 6, 9, 5, // q - method_touch, 5, 6, "ui"); + method_touch, false, 5, 6, "ui"); // Right to left test_both("rl1", 5, 1, 5, 6, 3, 3, // p 9, 5, 5, 6, 1, 5, // q - method_touch, 5, 6, "ui"); + method_touch, true, 5, 6, "ui"); test_both("rl2", 5, 1, 5, 6, 1, 5, // p 9, 5, 5, 6, 1, 5, // q - method_touch, 5, 6, "cc"); + method_touch, false, 5, 6, "cc"); test_both("rl3", 5, 1, 5, 6, 4, 8, // p 9, 5, 5, 6, 1, 5, // q - method_touch, 5, 6, "iu"); + method_touch, false, 5, 6, "iu"); test_both("rl4", 5, 1, 5, 6, 9, 5, // p 9, 5, 5, 6, 1, 5, // q - method_touch, 5, 6, "xu"); + method_touch, false, 5, 6, "xu"); test_both("rl5", 5, 1, 5, 6, 7, 3, // p 9, 5, 5, 6, 1, 5, // q - method_touch, 5, 6, "uu"); + method_touch, true, 5, 6, "uu"); // Equal (p1/q1 are equal) test_both("ebl1", 5, 1, 5, 6, 3, 4, // p 5, 1, 5, 6, 3, 8, // q - method_equal, 5, 6, "ui"); + method_equal, false, 5, 6, "ui"); test_both("ebl2", 5, 1, 5, 6, 3, 8, // p 5, 1, 5, 6, 3, 4, // q - method_equal, 5, 6, "iu"); + method_equal, false, 5, 6, "iu"); test_both("ebl3", 5, 1, 5, 6, 3, 8, // p 5, 1, 5, 6, 3, 8, // q - method_equal, 5, 6, "cc"); + method_equal, false, 5, 6, "cc"); test_both("ebl3-c1", 5, 1, 5, 6, 10, 1, // p 5, 1, 5, 6, 3, 8, // q - method_equal, 5, 6, "iu"); + method_equal, false, 5, 6, "iu"); test_both("ebr1", 5, 1, 5, 6, 7, 4, // p 5, 1, 5, 6, 7, 8, // q - method_equal, 5, 6, "iu"); + method_equal, false, 5, 6, "iu"); test_both("ebr2", 5, 1, 5, 6, 7, 8, // p 5, 1, 5, 6, 7, 4, // q - method_equal, 5, 6, "ui"); + method_equal, false, 5, 6, "ui"); test_both("ebr3", 5, 1, 5, 6, 7, 8, // p 5, 1, 5, 6, 7, 8, // q - method_equal, 5, 6, "cc"); + method_equal, false, 5, 6, "cc"); test_both("ebr3-c1", 5, 1, 5, 6, 0, 1, // p 5, 1, 5, 6, 7, 8, // q - method_equal, 5, 6, "ui"); + method_equal, false, 5, 6, "ui"); test_both("elr1", 5, 1, 5, 6, 7, 8, // p 5, 1, 5, 6, 3, 8, // q - method_equal, 5, 6, "iu"); + method_equal, false, 5, 6, "iu"); test_both("elr2", 5, 1, 5, 6, 3, 8, // p 5, 1, 5, 6, 7, 8, // q - method_equal, 5, 6, "ui"); + method_equal, false, 5, 6, "ui"); test_both("ec1", 5, 1, 5, 6, 5, 8, // p 5, 1, 5, 6, 5, 8, // q - method_equal, 5, 6, "cc"); + method_equal, false, 5, 6, "cc"); test_both("ec2", 5, 1, 5, 6, 5, 8, // p 5, 1, 5, 6, 5, 7, // q - method_equal, 5, 6, "cc"); + method_equal, false, 5, 6, "cc"); test_both("snl-1", 0, 3, 2, 3, 4, 3, // p 4, 3, 2, 3, 0, 3, // q - method_touch, 2, 3, "xx"); + method_touch, false, 2, 3, "xx"); // BSG 2012-05-26 to be decided what's the problem here and what it tests... // Anyway, test results are not filled out. //test_both("issue_buffer_mill", // 5.1983614873206241 , 6.7259025813913107 , 5.0499999999999998 , 6.4291796067500622 , 5.1983614873206241 , 6.7259025813913107, // p // 5.0499999999999998 , 6.4291796067500622 , 5.0499999999999998 , 6.4291796067500622 , 5.1983614873206241 , 6.7259025813913107, // q - // method_collinear, 2, 0, "tt"); + // method_collinear, false, 2, 0, "tt"); }