diff --git a/BGL/include/CGAL/boost/graph/helpers.h b/BGL/include/CGAL/boost/graph/helpers.h index df01fc634ac..630e7a974c8 100644 --- a/BGL/include/CGAL/boost/graph/helpers.h +++ b/BGL/include/CGAL/boost/graph/helpers.h @@ -777,29 +777,6 @@ void clear(FaceGraph& g) CGAL_postcondition(num_faces(g) == 0); } -/** - * \ingroup PkgBGLHelperFct - * - * returns the degree of the face with halfedge `hd` - * - * @tparam FaceGraph model of `FaceGraph` - * - * @param hd a halfedge of the face of interest - * @param g the graph containing `hd` - * - **/ -template -typename boost::graph_traits::degree_size_type -face_degree(typename boost::graph_traits::halfedge_descriptor hd, const FaceGraph& g) -{ - typename boost::graph_traits::degree_size_type res = 0; - typename boost::graph_traits::halfedge_descriptor done = hd; - do { - ++res; - hd = next(hd,g); - }while(! (hd == done)); - return res; -} } // namespace CGAL diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h b/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h index 8161a167afe..86168d363e0 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h @@ -154,7 +154,8 @@ public Q_SLOTS: if(active_handle_type == Active_handle::VERTEX || active_handle_type == Active_handle::PATH) { #ifdef USE_SURFACE_MESH - std::size_t h = reinterpret_cast(void_ptr); + typedef boost::graph_traits::vertices_size_type size_type; + size_type h = reinterpret_cast(void_ptr); process_selection( static_cast(h) ); #else process_selection( static_cast(void_ptr)->halfedge()->vertex() ); @@ -169,7 +170,8 @@ public Q_SLOTS: || active_handle_type == Active_handle::CONNECTED_COMPONENT) { #ifdef USE_SURFACE_MESH - std::size_t h = reinterpret_cast(void_ptr); + typedef boost::graph_traits::faces_size_type size_type; + size_type h = reinterpret_cast(void_ptr); process_selection( static_cast(h) ); #else process_selection( static_cast(void_ptr)->halfedge()->facet() ); @@ -183,7 +185,8 @@ public Q_SLOTS: if(active_handle_type == Active_handle::EDGE) { #ifdef USE_SURFACE_MESH - std::size_t h = reinterpret_cast(void_ptr); + typedef boost::graph_traits::edges_size_type size_type; + size_type h = reinterpret_cast(void_ptr); process_selection( static_cast(h) ); #else process_selection( edge(static_cast(void_ptr)->opposite()->opposite(), *poly_item->polyhedron()) ); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h index 82d238fc6f7..d3f729ede83 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_item_k_ring_selection.h @@ -191,7 +191,8 @@ public Q_SLOTS: // slots are called by signals of surface_mesh_item void sm_vertex_has_been_selected(void* v) { - std::size_t h = reinterpret_cast(v); + typedef boost::graph_traits::vertices_size_type size_type; + size_type h = reinterpret_cast(v); is_active=true; if(active_handle_type == Active_handle::VERTEX || active_handle_type == Active_handle::PATH) process_selection( sm_vertex_descriptor(h) ); @@ -199,7 +200,8 @@ public Q_SLOTS: } void sm_facet_has_been_selected(void* v) { - std::size_t h = reinterpret_cast(v); + typedef boost::graph_traits::vertices_size_type size_type; + size_type h = reinterpret_cast(v); is_active=true; if (active_handle_type == Active_handle::FACET || active_handle_type == Active_handle::CONNECTED_COMPONENT) @@ -208,7 +210,8 @@ public Q_SLOTS: } void sm_edge_has_been_selected(void* v) { - std::size_t h = reinterpret_cast(v); + typedef boost::graph_traits::edges_size_type size_type; + size_type h = reinterpret_cast(v); is_active=true; if(active_handle_type == Active_handle::EDGE) process_selection(sm_edge_descriptor(h) ); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 5d44a3ca477..5831550c040 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -1176,9 +1177,9 @@ bool Scene_polyhedron_selection_item:: treat_selection(const std::settempInstructions("Edge not selected: the incident facets must have a degree of at least 4.", "Select the edge with extremities you want to join."); @@ -1258,7 +1259,9 @@ bool Scene_polyhedron_selection_item:: treat_selection(const std::setinvalidateOpenGLBuffers();