From 384359dd72814181f7cd314dfb59110950785817 Mon Sep 17 00:00:00 2001 From: Bruno Levy Date: Wed, 18 Oct 2023 19:43:21 +0200 Subject: [PATCH] CDT2d: deactivated some checks after each insertion in debug mode (debug build takes too much time) --- src/lib/geogram/delaunay/CDT_2d.cpp | 15 +++++++++++++-- src/lib/geogram/mesh/mesh_surface_intersection.h | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lib/geogram/delaunay/CDT_2d.cpp b/src/lib/geogram/delaunay/CDT_2d.cpp index 627594fc9762..cd6a482c07a8 100644 --- a/src/lib/geogram/delaunay/CDT_2d.cpp +++ b/src/lib/geogram/delaunay/CDT_2d.cpp @@ -218,7 +218,9 @@ namespace GEO { Delaunayize_vertex_neighbors(v,S); } - debug_check_consistency(); +#ifdef CDT_DEBUG + debug_check_consistency(); +#endif return v; } @@ -255,7 +257,9 @@ namespace GEO { geo_debug_assert(insert(k) == k); Q.clear(); Delaunayize_vertex_neighbors(k); +#ifdef CDT_DEBUG debug_check_geometry(); +#endif index_t new_k = find_intersected_edges(i,j,Q); geo_assert(new_k == k); } @@ -266,7 +270,9 @@ namespace GEO { // Step 3: restore Delaunay condition if(delaunay_) { Delaunayize_new_edges(N); +#ifdef CDT_DEBUG debug_check_geometry(); +#endif } i = k; @@ -286,7 +292,9 @@ namespace GEO { geo_debug_assert(insert(k) == k); Q.clear(); Delaunayize_vertex_neighbors(k); +#ifdef CDT_DEBUG debug_check_geometry(); +#endif index_t new_k = find_intersected_edges(i,j,Q); geo_assert(new_k == k); } @@ -295,10 +303,11 @@ namespace GEO { debug_check_combinatorics(); if(delaunay_) { Delaunayize_new_edges_naive(N); +#ifdef CDT_DEBUG debug_check_geometry(); +#endif } debug_check_combinatorics(); - i = k; } #endif @@ -307,7 +316,9 @@ namespace GEO { Delaunayize_vertex_neighbors(i); } } else { +#ifdef CDT_DEBUG debug_check_consistency(); +#endif } } diff --git a/src/lib/geogram/mesh/mesh_surface_intersection.h b/src/lib/geogram/mesh/mesh_surface_intersection.h index e2535fc2f13d..12fb2b0c8bb0 100644 --- a/src/lib/geogram/mesh/mesh_surface_intersection.h +++ b/src/lib/geogram/mesh/mesh_surface_intersection.h @@ -58,7 +58,7 @@ */ #ifdef GEOGRAM_WITH_GEOGRAMPLUS -#define INTERSECTIONS_USE_EXACT_NT +//#define INTERSECTIONS_USE_EXACT_NT #endif namespace GEO {