diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index de889e42acf..2ba606c5de3 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -45,6 +45,7 @@ #include #include #include +#include #ifdef CGAL_MESH_3_USE_OLD_SURFACE_RESTRICTED_DELAUNAY_UPDATE #include @@ -765,6 +766,18 @@ initialize() facets_mesher_.scan_triangulation(); refinement_stage = REFINE_FACETS; } + + if (r_c3t3_.number_of_facets() == 0) + { + CGAL::warning_fail("r_c3t3_.number_of_facets() == 0", + __FILE__, + __LINE__, + "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"); + } } diff --git a/STL_Extension/include/CGAL/assertions_impl.h b/STL_Extension/include/CGAL/assertions_impl.h index cfe4a27cf00..8701e67ccf7 100644 --- a/STL_Extension/include/CGAL/assertions_impl.h +++ b/STL_Extension/include/CGAL/assertions_impl.h @@ -14,6 +14,9 @@ // // Author(s) : Geert-Jan Giezeman and Sven Schönherr +#ifndef CGAL_ASSERTIONS_IMPL_H +#define CGAL_ASSERTIONS_IMPL_H + #ifdef CGAL_HEADER_ONLY #define CGAL_INLINE_FUNCTION inline #else @@ -280,3 +283,5 @@ set_warning_behaviour(Failure_behaviour eb) } } //namespace CGAL + +#endif //CGAL_ASSERTIONS_IMPL_H