diff --git a/Combinatorial_map/include/CGAL/Creation_of_test_cases_for_paths.h b/Combinatorial_map/include/CGAL/Creation_of_test_cases_for_paths.h index 34baa5203d4..5bad7be39d3 100644 --- a/Combinatorial_map/include/CGAL/Creation_of_test_cases_for_paths.h +++ b/Combinatorial_map/include/CGAL/Creation_of_test_cases_for_paths.h @@ -201,6 +201,14 @@ void generate_l_shape_case7(Path& p) extend_straight_negative(p, 3); } +template +void generate_l_shape_case8(Path& p) +{ // (-2^l): here (-2^20) + p.clear(); + p.push_back(p.get_map().darts().iterator_to(p.get_map().darts()[4])); + extend_straight_negative(p, 19); +} + } // namespace CGAL #endif // CGAL_CREATION_OF_TEST_CASES_FOR_PATHS_H // diff --git a/Combinatorial_map/include/CGAL/Path_on_surface.h b/Combinatorial_map/include/CGAL/Path_on_surface.h index f826722d584..b50b1d6b8d9 100644 --- a/Combinatorial_map/include/CGAL/Path_on_surface.h +++ b/Combinatorial_map/include/CGAL/Path_on_surface.h @@ -437,17 +437,21 @@ public: void push_l_shape(std::size_t begin, std::size_t middle, std::size_t end, - Self& new_path) + Self& new_path, + bool case_seven) { Dart_const_handle d1; - // TODO SPECIAL CASE 7: do not push this dart - d1=m_map.template beta<2,1>(get_ith_dart(begin)); + if (!case_seven) + { d1=m_map.template beta<2,1>(get_ith_dart(begin)); } + else + { d1=m_map.template beta<2,1,2,0>(get_ith_dart(begin)); } new_path.push_back(d1); if (begin!=middle) { - CGAL::extend_uturn_positive(new_path, 1); + if (!case_seven) + { CGAL::extend_uturn_positive(new_path, 1); } d1=m_map.template beta<2,1,1>(get_ith_dart(middle)); CGAL::extend_straight_positive_until(new_path, d1); @@ -463,8 +467,10 @@ public: d1=m_map.template beta<2,0,2,1>(get_ith_dart(end)); CGAL::extend_straight_positive_until(new_path, d1); - if (begin!=end) // TODO CHECK THIS TEST : CASE 7 + if (!case_seven) { CGAL::extend_uturn_positive(new_path, 1); } + else + { CGAL::extend_straight_positive(new_path, 1); } } } @@ -474,6 +480,7 @@ public: m_map.template beta<2,1,1>(get_ith_dart(0)); clear(); push_back(d1); + CGAL::extend_straight_positive(*this, 1); CGAL::extend_straight_positive_until(*this, d1); } @@ -481,8 +488,8 @@ public: { std::size_t begin, middle, end; std::size_t lastturn=m_path.size()-(is_closed()?0:1); - - std::size_t next_turn, next_next_turn; + std::size_t next_turn; + std::size_t val_x; // value of turn before the beginning of a l-shape bool prev2=false; for (middle=0; middle