From afb4ac68b3e00013abdbc8010b31e407bee18210 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Fri, 14 Apr 2023 09:52:28 +0200 Subject: [PATCH] Do not draw shalfloop to avoid segfault(TODO draw something?) --- Nef_3/include/CGAL/draw_nef_3.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Nef_3/include/CGAL/draw_nef_3.h b/Nef_3/include/CGAL/draw_nef_3.h index e654ea9aae7..e561b3fef70 100644 --- a/Nef_3/include/CGAL/draw_nef_3.h +++ b/Nef_3/include/CGAL/draw_nef_3.h @@ -131,21 +131,23 @@ protected: ++fc; while(fc!=f->facet_cycles_end()) { - se = SHalfedge_const_handle(fc); - hc_start=se; - hc_end=hc_start; - CGAL_For_all(hc_start, hc_end) { - Vertex_const_handle vh=hc_start->source()->center_vertex(); - viewer.add_point_in_face(vh->point(), - viewer.get_vertex_normal(vh)); + if(fc.is_shalfedge()) + { + se = SHalfedge_const_handle(fc); + hc_start=se; + hc_end=hc_start; + CGAL_For_all(hc_start, hc_end) { + Vertex_const_handle vh=hc_start->source()->center_vertex(); + viewer.add_point_in_face(vh->point(), + viewer.get_vertex_normal(vh)); + } + viewer.add_point_in_face(hc_start->source()->center_vertex()->point(), + viewer.get_vertex_normal(hc_start->source()->center_vertex())); + viewer.add_point_in_face(lastvh->point(), + viewer.get_vertex_normal(lastvh)); } - viewer.add_point_in_face(hc_start->source()->center_vertex()->point(), - viewer.get_vertex_normal(hc_start->source()->center_vertex())); - viewer.add_point_in_face(lastvh->point(), - viewer.get_vertex_normal(lastvh)); ++fc; } - viewer.face_end(); facets_done[f]=true; n_faces++;