diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_functionalities.h b/Combinatorial_map/include/CGAL/Combinatorial_map_functionalities.h index 9a789d658e6..1f5c4190176 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_functionalities.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_functionalities.h @@ -399,8 +399,8 @@ namespace CGAL { } else { - // update_length_two_paths_before_edge_removals_v1(toremove); - update_length_two_paths_before_edge_removals_v2(toremove, copy_to_origin); + update_length_two_paths_before_edge_removals_v1(toremove); + // update_length_two_paths_before_edge_removals_v2(toremove, copy_to_origin); // We remove all the edges to remove. for (typename Map::Dart_range::iterator it=m_map.darts().begin(), @@ -519,7 +519,7 @@ namespace CGAL { { // std::cout<<"************************************************"<& p=itp->second; @@ -529,6 +529,7 @@ namespace CGAL { if (!m_map.is_marked(p.first, toremove)) { // Here p.first belongs to the "border" of the face Dart_handle initdart=m_map.darts().iterator_to(const_cast(*(p.first))); + Dart_handle initdart2=m_map.template beta<2>(initdart); // 1) We update the dart associated with p.second p.second=m_map.template beta<1>(initdart); @@ -545,10 +546,25 @@ namespace CGAL { else { paths[d2].second=p.second; } initdart=m_map.template beta<2, 1>(initdart); } - } - }*/ - for (auto it=m_original_map.darts().begin(); it!=m_original_map.darts().end(); ++it) + // 3) We do the same loop but starting from initdart2 + initdart2=m_map.template beta<1>(initdart2); + Dart_handle enddart2=initdart2; + while (m_map.is_marked(enddart2, toremove)) + { enddart2=m_map.template beta<2, 1>(enddart2); } + + while (m_map.is_marked(initdart2, toremove)) + { + Dart_const_handle d1=copy_to_origin.find(initdart2)->second; + Dart_const_handle d2=m_original_map.template beta<2>(d1); + if (d1(initdart2); + } + } + } + + /* for (auto it=m_original_map.darts().begin(); it!=m_original_map.darts().end(); ++it) { if (!m_original_map.is_marked(it, m_mark_T) && !m_original_map.is_marked(it, m_mark_L)) @@ -574,7 +590,7 @@ namespace CGAL { initdart=m_map.template beta<2, 1>(initdart); } } - } + } */ } /// @return true iff the edge containing adart is associated with a path. /// (used for debug purpose because we are suppose to be able to