From 9e0f52546ea44b2c77d03ae079fbcab1e692cbcd Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 29 Nov 2016 17:54:35 +0100 Subject: [PATCH] cell_iterator may circulate around the edge we want before actually moving to the next cell crossed by the query segment --- .../CGAL/Triangulation_segment_traverser_3.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 6fa59f8c1f8..45e05fda551 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -676,6 +676,7 @@ public: ++_cell_iterator; Cell_handle chnext = Cell_handle(_cell_iterator); //_cell_iterator is one step forward _curr_simplex + CGAL_assertion(ch != chnext); Locate_type lt; int li, lj; @@ -686,6 +687,18 @@ public: switch (lt) { case Locate_type::VERTEX: + while (index_v == index_vnext)//another cell with same vertex has been found + { + ch = chnext; + index_v = ch->index(get_vertex()); + + ++_cell_iterator; + chnext = Cell_handle(_cell_iterator); + CGAL_assertion(ch != chnext); + _cell_iterator.entry(lt, li, lj); + CGAL_assertion(lt == Locate_type::VERTEX); + index_vnext = ch->index(chnext->vertex(li)); + } _curr_simplex = Edge(ch, index_v, index_vnext); break; case Locate_type::EDGE: @@ -775,6 +788,11 @@ public: return false; } + int simplex_dimension() const + { + return _curr_simplex.which(); + } + private: bool cell_iterator_is_ahead() const {