diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 7c9509b9185..c103a4e4c41 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -92,6 +92,9 @@ struct Wrapping_default_visitor template void on_flood_fill_begin(const AlphaWrapper&) { } + template + constexpr bool go_further(const Wrapper& wrapper) { return true; } + template void before_facet_treatment(const AlphaWrapper&, const Gate&) { } @@ -1212,7 +1215,7 @@ private: } template - void alpha_flood_fill(Visitor& visitor) + bool alpha_flood_fill(Visitor& visitor) { #ifdef CGAL_AW3_DEBUG std::cout << "> Flood fill..." << std::endl; @@ -1251,10 +1254,6 @@ private: std::cout << "Permissiveness: " << gate.is_permissive_facet() << std::endl; #endif - visitor.before_facet_treatment(*this, gate); - - m_queue.pop(); - #ifdef CGAL_AW3_DEBUG_DUMP_EVERY_STEP static int i = 0; std::string step_name = "results/steps/step_" + std::to_string(static_cast(i)) + ".off"; @@ -1269,6 +1268,13 @@ private: face_out.close(); #endif + if(!visitor.go_further(*this)) + return false; + + visitor.before_facet_treatment(*this, gate); + + m_queue.pop(); + if(m_tr.is_infinite(neighbor)) { neighbor->is_outside() = true; @@ -1384,6 +1390,8 @@ private: CGAL_postcondition_code( if(!fit->first->is_outside()) f = m_tr.mirror_facet(f);) CGAL_postcondition( facet_status(f) == IRRELEVANT); CGAL_postcondition_code(}) + + return true; } private: