diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h index f8ade3bed27..040b7447ac2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h @@ -334,8 +334,17 @@ void detect_vertex_incident_patches(const PolygonMesh& pmesh, for(vertex_descriptor vit :vertices(pmesh)) { // Look only at feature vertices - if(!get(edge_is_feature_map, edge(halfedge(vit, pmesh), pmesh))) - continue; + bool skip=true; + for(halfedge_descriptor he : halfedges_around_target(vit, pmesh)) + { + if(get(edge_is_feature_map, edge(he, pmesh))) + { + skip=false; + break; + } + } + + if (skip) continue; // Loop on incident facets of vit typename VertexIncidentPatchesMap::value_type& id_set = vertex_incident_patches_map[vit];