mirror of https://github.com/CGAL/cgal
fix the edge - facet - vertex case
This commit is contained in:
parent
f7e0c9121b
commit
c7fcdc1d08
|
|
@ -652,7 +652,12 @@ public:
|
||||||
else if (ltnext == Locate_type::FACET)
|
else if (ltnext == Locate_type::FACET)
|
||||||
_curr_simplex = chnext->neighbor(linext);//chnext will be met after the facet
|
_curr_simplex = chnext->neighbor(linext);//chnext will be met after the facet
|
||||||
else if (ltnext == Locate_type::VERTEX)
|
else if (ltnext == Locate_type::VERTEX)
|
||||||
_curr_simplex = shared_cell(get_edge(), chnext->vertex(linext));
|
{
|
||||||
|
if (edge_has_vertex(get_edge(), chnext->vertex(linext)))
|
||||||
|
_curr_simplex = chnext->vertex(linext);
|
||||||
|
else
|
||||||
|
_curr_simplex = shared_facet(get_edge(), chnext->vertex(linext));
|
||||||
|
}
|
||||||
else //CELL
|
else //CELL
|
||||||
CGAL_assertion(false);
|
CGAL_assertion(false);
|
||||||
break;
|
break;
|
||||||
|
|
@ -916,6 +921,23 @@ private:
|
||||||
return Facet(Cell_handle(), 0);
|
return Facet(Cell_handle(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Facet shared_facet(const Edge& e, const Vertex_handle v) const
|
||||||
|
{
|
||||||
|
typename Tr::Facet_circulator circ
|
||||||
|
= _cell_iterator.triangulation().incident_facets(e);
|
||||||
|
typename Tr::Facet_circulator end = circ;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
Facet f = *circ;
|
||||||
|
if (facet_has_vertex(f, v))
|
||||||
|
return f;
|
||||||
|
} while (++circ != end);
|
||||||
|
|
||||||
|
std::cerr << "There is no facet shared by e and v" << std::endl;
|
||||||
|
CGAL_assertion(false);
|
||||||
|
return Facet(Cell_handle(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const
|
Cell_handle shared_cell(const Edge& e, const Vertex_handle v) const
|
||||||
{
|
{
|
||||||
typename Tr::Cell_circulator circ
|
typename Tr::Cell_circulator circ
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue