diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h index 88dc0c830e9..1c23b587093 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/distance.h @@ -1697,10 +1697,6 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, CGAL_assertion(sub_triangle_bounds.tm2_lface != boost::graph_traits::null_face()); CGAL_assertion(sub_triangle_bounds.tm2_uface != boost::graph_traits::null_face()); - // Add the subtriangle to the candidate list if it is meaningful - if(sub_triangle_bounds.upper < global_bounds.lower) - continue; - // The global lower bound is the max of the per-face lower bounds if(sub_triangle_bounds.lower > global_bounds.lower) { @@ -1717,16 +1713,13 @@ bounded_error_squared_Hausdorff_distance_impl(const TriangleMesh1& tm1, candidate_triangles.emplace(sub_triangles[i], sub_triangle_bounds, triangle_and_bounds.tm1_face); } - // In case all subdividing triangles of the last queue entry are useless - if(candidate_triangles.empty()) - break; - // Update global upper Hausdorff bound after subdivision. const Candidate& top_candidate = candidate_triangles.top(); const FT current_upmost = top_candidate.bounds.upper; #ifdef CGAL_HAUSDORFF_DEBUG_PP - std::cout << "current upper bound = " << current_upmost << std::endl; std::cout << "global_bounds.lower = " << global_bounds.lower << std::endl; + std::cout << "global_bounds.upper = " << global_bounds.upper << std::endl; + std::cout << "current upper bound = " << current_upmost << std::endl; #endif CGAL_assertion(is_positive(current_upmost));