Skip to content

Commit

Permalink
CDT2d: deactivated some checks after each insertion in debug mode (de…
Browse files Browse the repository at this point in the history
…bug build takes too much time)
  • Loading branch information
BrunoLevy committed Oct 18, 2023
1 parent d09b9bd commit 384359d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions src/lib/geogram/delaunay/CDT_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ namespace GEO {
Delaunayize_vertex_neighbors(v,S);
}

debug_check_consistency();
#ifdef CDT_DEBUG
debug_check_consistency();
#endif
return v;
}

Expand Down Expand Up @@ -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);
}
Expand All @@ -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;
Expand All @@ -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);
}
Expand All @@ -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
Expand All @@ -307,7 +316,9 @@ namespace GEO {
Delaunayize_vertex_neighbors(i);
}
} else {
#ifdef CDT_DEBUG
debug_check_consistency();
#endif
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/geogram/mesh/mesh_surface_intersection.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
*/

#ifdef GEOGRAM_WITH_GEOGRAMPLUS
#define INTERSECTIONS_USE_EXACT_NT
//#define INTERSECTIONS_USE_EXACT_NT
#endif

namespace GEO {
Expand Down

0 comments on commit 384359d

Please sign in to comment.