mirror of https://github.com/CGAL/cgal
bugfix in triangulation hierarchy: put the down pointers right if the triangulation
in the upper level is in 27-cover and the next lower one in 1-cover
This commit is contained in:
parent
de5cf96067
commit
5b8efd2fdb
|
|
@ -297,6 +297,20 @@ public:
|
|||
}
|
||||
|
||||
const Covering_sheets & number_of_sheets() const { return _cover; }
|
||||
const std::pair<Vertex_handle, Offset> original_vertex(
|
||||
const Vertex_handle v) const {
|
||||
return (virtual_vertices.find(v) == virtual_vertices.end()) ?
|
||||
std::make_pair(v,Offset()) : virtual_vertices.find(v)->second;
|
||||
}
|
||||
const std::vector<Vertex_handle>& periodic_copies(
|
||||
const Vertex_handle v) const {
|
||||
CGAL_triangulation_precondition(number_of_sheets() != make_array(1,1,1) );
|
||||
CGAL_triangulation_precondition(
|
||||
virtual_vertices.find(v) == virtual_vertices.end());
|
||||
CGAL_triangulation_assertion(
|
||||
virtual_vertices_reverse.find(v) != virtual_vertices_reverse.end());
|
||||
return virtual_vertices_reverse.find(v)->second;
|
||||
}
|
||||
|
||||
bool is_extensible_triangulation_in_1_sheet_h1() const;
|
||||
bool is_extensible_triangulation_in_1_sheet_h2() const;
|
||||
|
|
|
|||
|
|
@ -135,6 +135,12 @@ public:
|
|||
hints[level] = v->cell();
|
||||
|
||||
v->set_down (prev);
|
||||
if (hierarchy[level]->number_of_sheets()[0] != 1) {
|
||||
std::vector<Vertex_handle> vtc
|
||||
= hierarchy[level]->periodic_copies(v);
|
||||
for (int i=0 ; i<vtc.size() ; i++) vtc[i]->set_down(prev);
|
||||
}
|
||||
|
||||
prev->set_up (v);
|
||||
prev = v;
|
||||
}
|
||||
|
|
@ -327,6 +333,11 @@ insert(const Point &p, Cell_handle start)
|
|||
positions[level].li,
|
||||
positions[level].lj);
|
||||
vertex->set_down(previous);// link with level above
|
||||
if (hierarchy[level]->number_of_sheets()[0] != 1) {
|
||||
std::vector<Vertex_handle> vtc
|
||||
= hierarchy[level]->periodic_copies(vertex);
|
||||
for (int i=0 ; i<vtc.size() ; i++) vtc[i]->set_down(previous);
|
||||
}
|
||||
previous->set_up(vertex);
|
||||
previous=vertex;
|
||||
level++;
|
||||
|
|
@ -363,6 +374,11 @@ insert(const Point &p, Locate_type lt, Cell_handle loc, int li, int lj)
|
|||
positions[level].li,
|
||||
positions[level].lj);
|
||||
vertex->set_down(previous);// link with level above
|
||||
if (hierarchy[level]->number_of_sheets()[0] != 1) {
|
||||
std::vector<Vertex_handle> vtc
|
||||
= hierarchy[level]->periodic_copies(vertex);
|
||||
for (int i=0 ; i<vtc.size() ; i++) vtc[i]->set_down(previous);
|
||||
}
|
||||
previous->set_up(vertex);
|
||||
previous=vertex;
|
||||
level++;
|
||||
|
|
@ -405,6 +421,10 @@ move_point(Vertex_handle v, const Point & p)
|
|||
else {
|
||||
old->set_up(w);
|
||||
w->set_down(old);
|
||||
if (hierarchy[l]->number_of_sheets()[0] != 1) {
|
||||
std::vector<Vertex_handle> vtc = hierarchy[l]->periodic_copies(w);
|
||||
for (int i=0 ; i<vtc.size() ; i++) vtc[i]->set_down(old);
|
||||
}
|
||||
}
|
||||
if (u == Vertex_handle())
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue