mirror of https://github.com/CGAL/cgal
add warning message for the case when initialization has failed
This commit is contained in:
parent
bca05c8d67
commit
6d42c1ddf2
|
|
@ -45,6 +45,7 @@
|
|||
#include <CGAL/Mesher_level_visitors.h>
|
||||
#include <CGAL/Kernel_traits.h>
|
||||
#include <CGAL/point_generators_3.h>
|
||||
#include <CGAL/assertions_impl.h>
|
||||
|
||||
#ifdef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE
|
||||
#include <CGAL/Surface_mesher/Surface_mesher_visitor.h>
|
||||
|
|
@ -719,6 +720,20 @@ initialize()
|
|||
else
|
||||
#endif // CGAL_LINKED_WITH_TBB
|
||||
{
|
||||
|
||||
if (r_c3t3_.number_of_facets() == 0)
|
||||
{
|
||||
CGAL::warning_fail("c3t3.number_of_facets() == 0",
|
||||
"CGAL/Mesh_3/Mesher_3.h",
|
||||
725,
|
||||
"Warning : The mesh refinement process can't start.\n"
|
||||
"When calling refine_mesh_3(), the input `c3t3` should have been initialized and have "
|
||||
"at least one facet in the complex. Try to solve this issue using :\n"
|
||||
"\t- The automatic initialization provided by make_mesh_3()\n"
|
||||
"\t- Adding more and better chosen points on the input surface\n"
|
||||
"\t- defining the compilation macro CGAL_SEQUENTIAL_MESH_3_ADD_OUTSIDE_POINTS_ON_A_FAR_SPHERE\n");
|
||||
}
|
||||
|
||||
if (r_c3t3_.number_of_far_points() == 0 &&
|
||||
r_c3t3_.number_of_facets() == 0 &&
|
||||
(r_c3t3_.triangulation().dimension() < 3
|
||||
|
|
|
|||
Loading…
Reference in New Issue