diff --git a/Surface_mesh_approximation/include/CGAL/internal/Surface_mesh_approximation/named_params_helper.h b/Surface_mesh_approximation/include/CGAL/internal/Surface_mesh_approximation/named_params_helper.h index e37245fd9a5..0aa512f1f1f 100644 --- a/Surface_mesh_approximation/include/CGAL/internal/Surface_mesh_approximation/named_params_helper.h +++ b/Surface_mesh_approximation/include/CGAL/internal/Surface_mesh_approximation/named_params_helper.h @@ -138,7 +138,7 @@ void get_proxy_map(const Approximation &approx, FacetProxyMap fproxymap) { } template -void get_proxy_map(const Approximation &approx, internal_np::vsa_no_output_t) {} +void get_proxy_map(const Approximation &, internal_np::vsa_no_output_t) {} template void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) { @@ -146,7 +146,7 @@ void get_anchor_vertices(const Approximation &approx, OutputIterator out_itr) { } template -void get_anchor_vertices(const Approximation &approx, internal_np::vsa_no_output_t) {} +void get_anchor_vertices(const Approximation &, internal_np::vsa_no_output_t) {} template void get_anchor_points(const Approximation &approx, OutputIterator out_itr) { @@ -154,7 +154,7 @@ void get_anchor_points(const Approximation &approx, OutputIterator out_itr) { } template -void get_anchor_points(const Approximation &approx, internal_np::vsa_no_output_t) {} +void get_anchor_points(const Approximation &, internal_np::vsa_no_output_t) {} template void get_indexed_triangles(const Approximation &approx, OutputIterator out_itr) { @@ -162,7 +162,7 @@ void get_indexed_triangles(const Approximation &approx, OutputIterator out_itr) } template -void get_indexed_triangles(const Approximation &approx, internal_np::vsa_no_output_t) {} +void get_indexed_triangles(const Approximation &, internal_np::vsa_no_output_t) {} template void get_proxies(const Approximation &approx, OutputIterator out_itr) { @@ -170,7 +170,7 @@ void get_proxies(const Approximation &approx, OutputIterator out_itr) { } template -void get_proxies(const Approximation &approx, internal_np::vsa_no_output_t) {} +void get_proxies(const Approximation &, internal_np::vsa_no_output_t) {} } //end of namespace CGAL diff --git a/Surface_mesh_approximation/include/CGAL/vsa_mesh_approximation.h b/Surface_mesh_approximation/include/CGAL/vsa_mesh_approximation.h index dd949c4df11..187d81f5bd9 100644 --- a/Surface_mesh_approximation/include/CGAL/vsa_mesh_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/vsa_mesh_approximation.h @@ -70,14 +70,11 @@ bool vsa_mesh_approximation(const TriangleMesh &tm_in, PolyhedronSurface &tm_out, const NamedParameters &np) { - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - using boost::get_param; using boost::choose_param; typedef typename GetGeomTraits::type GeomTraits; typedef typename GeomTraits::FT FT; - typedef typename GeomTraits::Point_3 Point_3; typedef typename GetVertexPointMap::type VPMap; VPMap point_pmap = choose_param(get_param(np, internal_np::vertex_point), diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp index 66a359e4efc..7ca5867352f 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp @@ -43,6 +43,15 @@ bool test_shape(const char *file_name, const std::size_t target_num_proxies) vsa_l21.seeding_by_error(L21VSA::Incremental, drop, inner_iterations); for (std::size_t i = 0; i < num_iterations; ++i) vsa_l21.run_one_step(); + + // eliminate redundant area (local minima) by merging + std::size_t px0 = 0, px1 = 0; + while (vsa_l21.find_best_merge(px0, px1, true)) { + vsa_l21.merge(px0, px1); + for (std::size_t i = 0; i < num_iterations; ++i) + vsa_l21.run_one_step(); + } + if (vsa_l21.get_proxies_size() != target_num_proxies) { std::cout << "#targeted - #result " << target_num_proxies << ' '