diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 9e82555bbd9..847f4aa8e6a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -841,13 +841,14 @@ namespace internal { std::array r1 = PMP::internal::is_badly_shaped( face(he, mesh_), - mesh_, vpmap_, ecmap_, gt_, + mesh_, vpmap_, vcmap_, ecmap_, gt_, cap_threshold, // bound on the angle: above 160 deg => cap 4, // bound on shortest/longest edge above 4 => needle 0);// collapse length threshold : not needed here std::array r2 = PMP::internal::is_badly_shaped( face(opposite(he, mesh_), mesh_), - mesh_, vpmap_, ecmap_, gt_, cap_threshold, 4, 0); + mesh_, vpmap_, vcmap_, ecmap_, gt_, cap_threshold, 4, 0); + const bool badly_shaped = (r1[0] != boost::graph_traits::null_halfedge()//needle || r1[1] != boost::graph_traits::null_halfedge()//cap || r2[0] != boost::graph_traits::null_halfedge()//needle diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp index 90bbd45564e..80c8a810e22 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remeshing_test.cpp @@ -152,7 +152,7 @@ public: -Main(int argc, char* argv[]) +Main(int argc, const char* argv[]) { #ifdef CGAL_PMP_REMESHING_DEBUG std::cout.precision(17); @@ -248,17 +248,16 @@ Main(int argc, char* argv[]) } else if (sharp_angle > 0) { - typedef boost::property_map::type EIFMap; - typedef boost::property_map >::type PIMap; - typedef boost::property_map >::type VIMap; + typedef typename boost::property_map::type EIFMap; + typedef typename boost::property_map >::type PIMap; + typedef typename boost::property_map >::type VIMap; EIFMap eif = get(CGAL::edge_is_feature, m); PIMap pid = get(CGAL::face_patch_id_t(), m); VIMap vip = get(CGAL::vertex_incident_patches_t(), m); - std::size_t number_of_patches; if (sharp_angle > 0) - number_of_patches = PMP::sharp_edges_segmentation(m, sharp_angle, eif, pid, + PMP::sharp_edges_segmentation(m, sharp_angle, eif, pid, PMP::parameters::vertex_incident_patches_map(vip)); std::vector sharp_edges; @@ -310,20 +309,22 @@ Main(int argc, char* argv[]) } }; -int main(int argc, char* argv[]) +int main(int argc, const char* argv[]) { Main m(argc,argv); - char* param[6] = { "remesh",//command - "data_remeshing/cheese_transformed-facets.off",//input - "0.0015", //target edge length - "3", //#iterations - "0", //selection file - "60." }; //sharp angle bound + const char* param[6] = { "remesh",//command + "data_remeshing/cheese_transformed-facets.off",//input + "0.0015", //target edge length + "3", //#iterations + "0", //selection file + "60." }; //sharp angle bound Main sharp1(6, param); - param[1] = "data_remeshing/cheese_transformed-facets-2.off"; - Main sharp2(6, param); + const char* param_bis[6] = { param[0], + "data_remeshing/cheese_transformed-facets-2.off", + param[2], param[3], param[4], param[5] }; + Main sharp2(6, param_bis); return 0; }