From dc9fc58500cc9f1be70e0d34a24cb634d4fc6c34 Mon Sep 17 00:00:00 2001 From: ROUVREAU Vincent Date: Fri, 19 Jun 2020 20:29:46 +0200 Subject: When 3d points are on a 2d plane case - Fixes also default_filtration_value=True in 3d --- src/Alpha_complex/include/gudhi/Alpha_complex_3d.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Alpha_complex/include/gudhi') diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h index c19ebb79..c29905f4 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex_3d.h @@ -471,6 +471,10 @@ Weighted_alpha_complex_3d::Weighted_point_3 wp0(Weighted_alpha_complex_3d::Bare_ #ifdef DEBUG_TRACES std::clog << "filtration_with_alpha_values returns : " << objects.size() << " objects" << std::endl; #endif // DEBUG_TRACES + if (objects.size() == 0) { + std::cerr << "Alpha_complex_3d create_complex - no triangulation as points are on a 2d plane\n"; + return false; // ----- >> + } using Alpha_value_iterator = typename std::vector::const_iterator; Alpha_value_iterator alpha_value_iterator = alpha_values.begin(); -- cgit v1.2.3