mirror of https://github.com/CGAL/cgal
warn about the fact that the mesh should be a single CC
This commit is contained in:
parent
0fb70f5cd5
commit
509e794235
|
|
@ -1,5 +1,6 @@
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h>
|
#include <CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h>
|
||||||
|
#include <CGAL/Polygon_mesh_processing/connected_components.h>
|
||||||
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
|
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
|
||||||
#include <CGAL/Surface_mesh.h>
|
#include <CGAL/Surface_mesh.h>
|
||||||
|
|
||||||
|
|
@ -34,6 +35,16 @@ int main(int argc, char* argv[])
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///// make sure the input is a single connected component,
|
||||||
|
///// otherwise the input must be decomposed
|
||||||
|
auto fcm = smesh.add_property_map<Mesh::Face_index, std::size_t>("fcm", 0).first;
|
||||||
|
std::size_t nbcc = PMP::connected_components(smesh, fcm);
|
||||||
|
if (nbcc!=1)
|
||||||
|
{
|
||||||
|
std::cerr << "The input is not a single connected component mesh." << std::endl;
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
///// Uniform Isotropic ACVD
|
///// Uniform Isotropic ACVD
|
||||||
std::cout << "Uniform Isotropic ACVD ...." << std::endl;
|
std::cout << "Uniform Isotropic ACVD ...." << std::endl;
|
||||||
Mesh acvd_mesh = smesh;
|
Mesh acvd_mesh = smesh;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue