diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/remove_degeneracies_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/remove_degeneracies_example.cpp index 59b5de345f2..c90c08cd88f 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/remove_degeneracies_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/remove_degeneracies_example.cpp @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) std::size_t nb = CGAL::Polygon_mesh_processing::remove_degenerate_faces(mesh); - std::cout << "There were " << nb << " degenerate faces in this mesh" << std::endl; + std::cerr << "There were " << nb << " degenerate faces in this mesh" << std::endl; mesh.collect_garbage(); std::cout << mesh << std::endl; return 0; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h index f275a591ac4..7176ffdc4ee 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/named_function_params.h @@ -161,7 +161,7 @@ namespace Polygon_mesh_processing{ namespace parameters{ pmp_bgl_named_params - all_default() + inline all_default() { typedef pmp_bgl_named_params Params; return Params(); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h index a5f4d83bec3..6b330af8921 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h @@ -281,9 +281,9 @@ std::size_t remove_degenerate_faces(TriangleMesh& tmesh, typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GetVertexPointMap::type VertexPointMap; - VertexPointMap vpmap = choose_const_pmap(get_param(np, boost::vertex_point), - tmesh, - boost::vertex_point); + VertexPointMap vpmap = choose_pmap(get_param(np, boost::vertex_point), + tmesh, + boost::vertex_point); typedef typename GetGeomTraits::type Traits; Traits traits = choose_param(get_param(np, geom_traits), Traits()); @@ -604,9 +604,9 @@ std::size_t remove_degenerate_faces(TriangleMesh& tmesh, typename Traits::Compare_distance_3 compare_distance = traits.compare_distance_3_object(); halfedge_descriptor edge_to_flip; - if (!compare_distance(p1,p2, p1,p3)) // p1p2 > p1p3 + if (compare_distance(p1,p2, p1,p3) != CGAL::SMALLER) // p1p2 > p1p3 { - if (!compare_distance(p1,p2, p2,p3)) // p1p2 > p2p3 + if (compare_distance(p1,p2, p2,p3) != CGAL::SMALLER) // p1p2 > p2p3 // flip p1p2 edge_to_flip = next( halfedge(fd, tmesh), tmesh ); else @@ -614,7 +614,7 @@ std::size_t remove_degenerate_faces(TriangleMesh& tmesh, edge_to_flip = prev( halfedge(fd, tmesh), tmesh ); } else - if (!compare_distance(p1,p3, p2,p3)) // p1p3>p2p3 + if (compare_distance(p1,p3, p2,p3) != CGAL::SMALLER) // p1p3>p2p3 //flip p3p1 edge_to_flip = halfedge(fd, tmesh); else