diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt index 56d96a57c23..ce38b689dc8 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt @@ -21,7 +21,7 @@ if ( CGAL_FOUND ) if(CGAL_Qt5_FOUND ) target_link_libraries(vd_2_point_location PUBLIC CGAL::CGAL_Qt5) - endif() + endif() endforeach() diff --git a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h index 238a09d2583..df922fb048e 100644 --- a/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h +++ b/Voronoi_diagram_2/include/CGAL/draw_voronoi_diagram_2.h @@ -83,11 +83,12 @@ protected: // face_end(); // } -// void compute_edge(Halfedge_const_handle he) -// { -// add_segment(he->source()->point(), -// he->target()->point()); -// } + void compute_edge(Halfedge_const_handle he) + { + if(he->is_segment()) + add_segment(he->source()->point(), + he->target()->point()); + } void compute_vertex(Vertex_const_handle vh) { add_point(vh->point()); } @@ -103,9 +104,9 @@ protected: // { compute_face(it); } // } -// for (typename V2::Halfedge_iterator it=v2.halfedges_begin(); -// it!=v2.halfedges_end(); ++it) -// { compute_edge(it); } + for (typename V2::Halfedge_iterator it=v2.halfedges_begin(); + it!=v2.halfedges_end(); ++it) + { compute_edge(it); } for (typename V2::Vertex_iterator it=v2.vertices_begin(); it!=v2.vertices_end(); ++it)