mirror of https://github.com/CGAL/cgal
Bug fix in drawing of interior faces when the outer boundary is pinched
This commit is contained in:
parent
8a4b492f1c
commit
2891528073
|
|
@ -746,17 +746,24 @@ protected:
|
||||||
fit->info().is_process = false;
|
fit->info().is_process = false;
|
||||||
}
|
}
|
||||||
// (2.2) We check if the facet is external or internal
|
// (2.2) We check if the facet is external or internal
|
||||||
std::queue<typename CDT::Face_handle> face_queue;
|
std::queue<typename CDT::Face_handle> face_queue, faces_internal;
|
||||||
typename CDT::Face_handle face_internal = nullptr;
|
typename CDT::Face_handle face_internal = nullptr;
|
||||||
if (cdt.infinite_vertex()->face()!=nullptr)
|
if (cdt.infinite_vertex()->face()!=nullptr)
|
||||||
{ face_queue.push(cdt.infinite_vertex()->face()); }
|
{
|
||||||
|
typename CDT::Face_circulator
|
||||||
|
incident_faces(cdt.infinite_vertex()), end_incident_faces(incident_faces);
|
||||||
|
do
|
||||||
|
{ face_queue.push(incident_faces); }
|
||||||
|
while(++incident_faces!=end_incident_faces);
|
||||||
|
}
|
||||||
|
// std::cout<<"# faces PUSHED "<<face_queue.size()<<std::endl;
|
||||||
while(!face_queue.empty())
|
while(!face_queue.empty())
|
||||||
{
|
{
|
||||||
typename CDT::Face_handle fh = face_queue.front();
|
typename CDT::Face_handle fh=face_queue.front();
|
||||||
face_queue.pop();
|
face_queue.pop();
|
||||||
if(!fh->info().is_process)
|
if(!fh->info().is_process)
|
||||||
{
|
{
|
||||||
fh->info().is_process = true;
|
fh->info().is_process=true;
|
||||||
for(int i=0; i<3; ++i)
|
for(int i=0; i<3; ++i)
|
||||||
{
|
{
|
||||||
if(!cdt.is_constrained(std::make_pair(fh, i)))
|
if(!cdt.is_constrained(std::make_pair(fh, i)))
|
||||||
|
|
@ -764,21 +771,16 @@ protected:
|
||||||
if (fh->neighbor(i)!=nullptr)
|
if (fh->neighbor(i)!=nullptr)
|
||||||
{ face_queue.push(fh->neighbor(i)); }
|
{ face_queue.push(fh->neighbor(i)); }
|
||||||
}
|
}
|
||||||
else if (face_internal==nullptr)
|
else
|
||||||
{
|
{ faces_internal.push(fh->neighbor(i)); }
|
||||||
face_internal = fh->neighbor(i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( face_internal!=nullptr )
|
while(!faces_internal.empty())
|
||||||
{ face_queue.push(face_internal); }
|
|
||||||
|
|
||||||
while(!face_queue.empty())
|
|
||||||
{
|
{
|
||||||
typename CDT::Face_handle fh = face_queue.front();
|
typename CDT::Face_handle fh=faces_internal.front();
|
||||||
face_queue.pop();
|
faces_internal.pop();
|
||||||
if(!fh->info().is_process)
|
if(!fh->info().is_process)
|
||||||
{
|
{
|
||||||
fh->info().is_process = true;
|
fh->info().is_process = true;
|
||||||
|
|
@ -788,7 +790,7 @@ protected:
|
||||||
if(!cdt.is_constrained(std::make_pair(fh, i)))
|
if(!cdt.is_constrained(std::make_pair(fh, i)))
|
||||||
{
|
{
|
||||||
if (fh->neighbor(i)!=nullptr)
|
if (fh->neighbor(i)!=nullptr)
|
||||||
{ face_queue.push(fh->neighbor(i)); }
|
{ faces_internal.push(fh->neighbor(i)); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue