diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt index f374a88c7ae..eeb4e06818e 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt @@ -26,7 +26,7 @@ See below a sample call of a function that uses the optional BGL named parameter // anchors: output anchor points // triangles: output triplets of indexed triangles -CGAL::mesh_approximation(tm, +CGAL::approximate_mesh(tm, CGAL::Surface_mesh_approximation::parameters::seeding_method(method). max_nb_proxies(nb_proxies). nb_of_iterations(nb_iterations). diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt index 431588d82ee..979072edfe2 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/PackageDescription.txt @@ -35,7 +35,7 @@ and provides the list of parameters used in this package. - `ErrorMetricProxy` ## Main Functions ## -- `CGAL::mesh_approximation()` +- `CGAL::approximate_mesh()` ## Classes ## - `CGAL::VSA::L21_metric_vector_proxy` diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt index c10173dc4bf..1543d0a4fbf 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/surface_mesh_approximation.txt @@ -17,7 +17,7 @@ The approximation error is one-sided, defined between the clusters and their ass Variational shape approximation on two models with the \f$ \mathcal{L}^{2,1} \f$ error metric and planar proxies. From left to right: partition of the input surface triangle mesh, anchor vertices and edges, and output triangle mesh. The partition is optimized via discrete clustering of the input triangles, so as to minimize the approximation error from the clusters to the planar proxies (not shown). \cgalFigureEnd -This package offers both the approximation and mesh construction functionalities, through the free function `CGAL::mesh_approximation()` which runs a fully automated version of the algorithm: +This package offers both the approximation and mesh construction functionalities, through the free function `CGAL::approximate_mesh()` which runs a fully automated version of the algorithm: \cgalExample{Surface_mesh_approximation/vsa_simple_approximation_example.cpp} A class interface is also provided for advanced users, in which a series of pliant operators offer interactive capabilities during clustering and customization in terms of error and proxies. @@ -161,7 +161,7 @@ As there is no guarantee that the output mesh is 2-manifold and oriented, the ma This package can be used with any class model of the concept `FaceListGraph` described in \ref PkgBGL "CGAL and the Boost Graph Library". Free function with \ref namedparameters options. -- `CGAL::mesh_approximation()`: given a triangle mesh, approximate the geometry with default \f$ \mathcal{L}^{2,1} \f$ metric. +- `CGAL::approximate_mesh()`: given a triangle mesh, approximate the geometry with default \f$ \mathcal{L}^{2,1} \f$ metric. Class interface: - `CGAL::Variational_shape_approximation`: allowing more customization of the proxy, metric and approximation process. @@ -174,7 +174,7 @@ The input of the algorithm is expected to be: \subsection sma_example1 Free Function Approximation -The following example calls the free function `CGAL::mesh_approximation()` on the input triangle mesh with default `CGAL::VSA::L21_metric_vector_proxy`. +The following example calls the free function `CGAL::approximate_mesh()` on the input triangle mesh with default `CGAL::VSA::L21_metric_vector_proxy`. \cgalExample{Surface_mesh_approximation/vsa_approximation_example.cpp} @@ -208,7 +208,7 @@ The following example defines a point-wise proxy to yield an isotropic approxima \section sma_perf Performances -We provide some performance comparisons with the free function API `CGAL::mesh_approximation`. +We provide some performance comparisons with the free function API `CGAL::approximate_mesh`. Timings are recorded on a PC running Windows10 X64 with an Intel Xeon E5-1620 clocked at 3.70 GHz with 32GB of RAM. The program has been optimized with the O2 option with Visual Studio 2015. By default the kernel used is `Exact_predicates_inexact_constructions_kernel` (`EPICK`). diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_2_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_2_example.cpp index 3d9a00d984f..26de61d67ed 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_2_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_2_example.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; @@ -32,7 +32,7 @@ int main() std::vector proxies; // free function interface with named parameters - CGAL::mesh_approximation(input, + CGAL::approximate_mesh(input, CGAL::Surface_mesh_approximation::parameters::min_error_drop(0.05). // seeding with minimum error drop nb_of_iterations(40). // set number of clustering iterations after seeding subdivision_ratio(0.3). // set chord subdivision ratio threshold when meshing diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp index c463fb1b9b4..ab6143f0969 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_approximation_example.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; @@ -20,7 +20,7 @@ int main() std::vector > triangles; // triplets of indices // free function interface with named parameters - bool is_manifold = CGAL::mesh_approximation(input, + bool is_manifold = CGAL::approximate_mesh(input, CGAL::Surface_mesh_approximation::parameters::seeding_method(CGAL::Hierarchical). // hierarchical seeding max_nb_proxies(200). // seeding with maximum number of proxies nb_of_iterations(30). // number of clustering iterations after seeding diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp index 47d7ca431b7..4a6990f1e0b 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_segmentation_example.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; @@ -26,7 +26,7 @@ int main() Facet_proxy_pmap fpxmap(fidx_map); // free function interface with named parameters - CGAL::mesh_approximation(input, + CGAL::approximate_mesh(input, CGAL::Surface_mesh_approximation::parameters::max_nb_proxies(200). // first stop criterion min_error_drop(0.05). // second stop criterion nb_of_iterations(30). // number of relaxation iterations after seeding diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp index 59cf9af012d..8c4eb9d49a7 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_simple_approximation_example.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; @@ -20,7 +20,7 @@ int main() std::vector > triangles; // free function interface with named parameters - CGAL::mesh_approximation(input, + CGAL::approximate_mesh(input, CGAL::Surface_mesh_approximation::parameters::max_nb_proxies(200). anchors(std::back_inserter(anchors)). // anchor points triangles(std::back_inserter(triangles))); // indexed triangles diff --git a/Surface_mesh_approximation/include/CGAL/mesh_approximation.h b/Surface_mesh_approximation/include/CGAL/approximate_mesh.h similarity index 99% rename from Surface_mesh_approximation/include/CGAL/mesh_approximation.h rename to Surface_mesh_approximation/include/CGAL/approximate_mesh.h index 6a4956dc9a5..bb88f44e0f8 100644 --- a/Surface_mesh_approximation/include/CGAL/mesh_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/approximate_mesh.h @@ -100,7 +100,7 @@ unspecified_type all_default(); * \cgalNamedParamsEnd */ template -bool mesh_approximation(const TriangleMesh &tm, const NamedParameters &np) +bool approximate_mesh(const TriangleMesh &tm, const NamedParameters &np) { using boost::get_param; using boost::choose_param; diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_kernel_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_kernel_test.cpp index c3f8f0a820c..d079c2f0c81 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_kernel_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_kernel_test.cpp @@ -10,7 +10,7 @@ #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; typedef CGAL::Simple_cartesian Sckernel; @@ -29,7 +29,7 @@ int test() { std::vector points; std::vector > triangles; - CGAL::mesh_approximation(tm, + CGAL::approximate_mesh(tm, CGAL::Surface_mesh_approximation::parameters::max_nb_proxies(6). nb_of_iterations(30). nb_of_relaxations(5). diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_approximation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_approximation_test.cpp index 1642d3a92cd..cf35e52d64b 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_approximation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_approximation_test.cpp @@ -5,13 +5,13 @@ #include #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; /** - * This file tests the free function CGAL::mesh_approximation. + * This file tests the free function CGAL::approximate_mesh. */ int main() { @@ -29,7 +29,7 @@ int main() std::vector points; std::vector > triangles; - CGAL::mesh_approximation(mesh, + CGAL::approximate_mesh(mesh, CGAL::Surface_mesh_approximation::parameters::seeding_method(CGAL::Incremental). max_nb_proxies(6). nb_of_iterations(30). diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_segmentation_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_segmentation_test.cpp index 3c525a7aebc..ebafce1c49b 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_segmentation_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_mesh_segmentation_test.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Polyhedron_3 Polyhedron; @@ -12,7 +12,7 @@ typedef boost::unordered_map Facet_index_map; typedef boost::associative_property_map Facet_proxy_pmap; /** - * This file tests the free function CGAL::mesh_approximation. + * This file tests the free function CGAL::approximate_mesh. */ int main() { @@ -31,7 +31,7 @@ int main() std::vector proxies; // free function interface with named parameters - CGAL::mesh_approximation(input, + CGAL::approximate_mesh(input, CGAL::Surface_mesh_approximation::parameters::seeding_method(CGAL::Hierarchical). // hierarchical seeding max_nb_proxies(200). // both maximum number of proxies stop criterion, min_error_drop(0.05). // and minimum error drop stop criterion are specified