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 cb7d9c0c4b9..c471cd9df21 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 @@ -14,7 +14,7 @@ typedef boost::associative_property_map Facet_proxy_pmap; int main() { - // create polyhedral surface and read input surface triangle mesh + // read input surface triangle mesh Polyhedron input; std::ifstream file("data/mask.off"); if (!file || !(file >> input) || input.empty()) { @@ -32,7 +32,7 @@ int main() fidx_map[f] = 0; Facet_proxy_pmap fpxmap(fidx_map); - // output plane proxies; + // output planar proxies std::vector proxies; // free function interface with named parameters 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 57bf476923e..aff1c81d3d2 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 @@ -10,7 +10,7 @@ typedef CGAL::Polyhedron_3 Polyhedron; int main() { - // create polyhedral surface and read input surface triangle mesh + // read input surface triangle mesh Polyhedron input; std::ifstream file("data/mask.off"); if (!file || !(file >> input) || input.empty()) { @@ -18,7 +18,7 @@ int main() return EXIT_FAILURE; } - // output polyhedral surface and indexed triangle mesh + // output polyhedral surface and indexed face set Polyhedron output; std::vector points; std::vector > triangles; // triplets of indices @@ -31,13 +31,13 @@ int main() max_nb_proxies(200). // seeding with maximum number of proxies nb_of_iterations(30). // number of clustering iterations after seeding // output to polyhedron - output_mesh(&output)); // valid only if the indexed triangles construct a 2-manifold and oriented surface + output_mesh(&output)); // valid when the indexed face set represents a 2-manifold, oriented surface std::cout << "#anchor points: " << points.size() << std::endl; std::cout << "#triangles: " << triangles.size() << std::endl; if (valid_polyhedron) - std::cout << "oriented 2-manifold output." << std::endl; + std::cout << "oriented, 2-manifold output." << std::endl; return EXIT_SUCCESS; } diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp index e1fe1be8fa7..86c257f2b71 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/vsa_class_interface_example.cpp @@ -18,7 +18,7 @@ typedef Mesh_approximation::Proxy_fitting Proxy_fitting; int main() { - // create polyhedral surface and read input mesh + // read input surface triangle mesh Polyhedron input; std::ifstream file("data/mask.off"); if (!file || !(file >> input) || input.empty()) { @@ -26,7 +26,7 @@ int main() return EXIT_FAILURE; } - // create VSA approximation algorithm instance + // create VSA algorithm instance Mesh_approximation approx(input, get(boost::vertex_point, const_cast(input))); 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 66b5ee41d96..fb75a39228e 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 @@ -24,16 +24,19 @@ int main() Facet_index_map fidx_map; BOOST_FOREACH(face_descriptor f, faces(input)) fidx_map[f] = 0; + // facet proxy index property map Facet_proxy_pmap fpxmap(fidx_map); // free function interface with named parameters CGAL::VSA::mesh_segmentation(input, - fpxmap, // output indexed face set + fpxmap, // output segmentation CGAL::VSA::parameters::seeding_method(CGAL::VSA::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 + max_nb_proxies(200). // first stop criterion + min_error_drop(0.05). // second stop criterion nb_of_iterations(30)); // number of iterations after seeding + // TODO: retrieve segments of the segmentation + return EXIT_SUCCESS; } 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 c095f1492f7..71e5884283d 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 @@ -10,12 +10,11 @@ typedef CGAL::Polyhedron_3 Polyhedron; int main() { - // create polyhedral surface and read input surface triangle mesh + // read input surface triangle mesh Polyhedron input; std::ifstream file("data/mask.off"); file >> input; - // The output will be an indexed triangle mesh std::vector points; std::vector > triangles;