From 28915280733428e573e1eb4b7c9a818318c81784 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Thu, 28 Sep 2023 19:21:49 +0200 Subject: [PATCH 1/2] Bug fix in drawing of interior faces when the outer boundary is pinched --- GraphicsView/include/CGAL/Buffer_for_vao.h | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/GraphicsView/include/CGAL/Buffer_for_vao.h b/GraphicsView/include/CGAL/Buffer_for_vao.h index fddd4a663ff..8fda1987993 100644 --- a/GraphicsView/include/CGAL/Buffer_for_vao.h +++ b/GraphicsView/include/CGAL/Buffer_for_vao.h @@ -746,17 +746,24 @@ protected: fit->info().is_process = false; } // (2.2) We check if the facet is external or internal - std::queue face_queue; + std::queue face_queue, faces_internal; typename CDT::Face_handle face_internal = 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 "<info().is_process) { - fh->info().is_process = true; + fh->info().is_process=true; for(int i=0; i<3; ++i) { if(!cdt.is_constrained(std::make_pair(fh, i))) @@ -764,21 +771,16 @@ protected: if (fh->neighbor(i)!=nullptr) { face_queue.push(fh->neighbor(i)); } } - else if (face_internal==nullptr) - { - face_internal = fh->neighbor(i); - } + else + { faces_internal.push(fh->neighbor(i)); } } } } - if ( face_internal!=nullptr ) - { face_queue.push(face_internal); } - - while(!face_queue.empty()) + while(!faces_internal.empty()) { - typename CDT::Face_handle fh = face_queue.front(); - face_queue.pop(); + typename CDT::Face_handle fh=faces_internal.front(); + faces_internal.pop(); if(!fh->info().is_process) { fh->info().is_process = true; @@ -788,7 +790,7 @@ protected: if(!cdt.is_constrained(std::make_pair(fh, i))) { if (fh->neighbor(i)!=nullptr) - { face_queue.push(fh->neighbor(i)); } + { faces_internal.push(fh->neighbor(i)); } } } } From a5447a846b1734678c634fa4ed90617c06c5da46 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 4 Oct 2023 07:59:01 +0200 Subject: [PATCH 2/2] Remove warning --- GraphicsView/include/CGAL/Buffer_for_vao.h | 1 - 1 file changed, 1 deletion(-) diff --git a/GraphicsView/include/CGAL/Buffer_for_vao.h b/GraphicsView/include/CGAL/Buffer_for_vao.h index 8fda1987993..dde60abb832 100644 --- a/GraphicsView/include/CGAL/Buffer_for_vao.h +++ b/GraphicsView/include/CGAL/Buffer_for_vao.h @@ -747,7 +747,6 @@ protected: } // (2.2) We check if the facet is external or internal std::queue face_queue, faces_internal; - typename CDT::Face_handle face_internal = nullptr; if (cdt.infinite_vertex()->face()!=nullptr) { typename CDT::Face_circulator