From f012ff930db8fdc4daeb270a412282be83fb87d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 26 Feb 2024 16:17:21 +0100 Subject: [PATCH] Fix creating isolated vertices in MC --- .../internal/topologically_correct_marching_cubes_functors.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/topologically_correct_marching_cubes_functors.h b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/topologically_correct_marching_cubes_functors.h index 111e7c2e01d..9eda15ae769 100644 --- a/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/topologically_correct_marching_cubes_functors.h +++ b/Isosurfacing_3/include/CGAL/Isosurfacing_3/internal/topologically_correct_marching_cubes_functors.h @@ -242,26 +242,29 @@ private: Point_index add_point(const Point_3& p, const Edge_index& e) { - const Point_index i = m_point_counter++; #ifdef CGAL_LINKED_WITH_TBB typename Edge_point_map::accessor acc; if (!m_edges.insert(acc, e)) return acc->second; + const Point_index i = m_point_counter++; acc->second = i; acc.release(); m_points.grow_to_at_least(i + 1); #else + const Point_index i = m_point_counter; auto res = m_edges.insert({e, i}); if (!res.second) return res.first->second; + ++m_point_counter; m_points.resize(i + 1); #endif m_points[i] = p; + return i; }