cleanup of cdt_3_from_off.cpp, and move ITT code to CDT_3

This commit is contained in:
Laurent Rineau 2025-10-24 14:11:17 +02:00
parent b85035ff87
commit b068e62ffb
5 changed files with 161 additions and 121 deletions

View File

@ -17,6 +17,7 @@
#include <CGAL/Constrained_triangulation_3/internal/config.h> #include <CGAL/Constrained_triangulation_3/internal/config.h>
#include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_data_3.h>
#include <CGAL/Real_timer.h>
#include <CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h> #include <CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h>
#include <CGAL/Triangulation_segment_traverser_3.h> #include <CGAL/Triangulation_segment_traverser_3.h>
#include <CGAL/unordered_flat_set.h> #include <CGAL/unordered_flat_set.h>
@ -34,8 +35,112 @@
#ifndef DOXYGEN_RUNNING #ifndef DOXYGEN_RUNNING
#if CGAL_USE_ITT
# include <ittnotify.h>
#endif
namespace CGAL { namespace CGAL {
namespace CDT_3::internal {
auto& tasks_manager() {
struct Tasks_manager {
enum {
READ_INPUT = 0,
MERGE_FACETS,
INSERT_VERTICES,
COMPUTE_DISTANCES,
CONFORMING,
CDT,
OUTPUT,
VALIDATION,
NB_TASKS
};
#if CGAL_USE_ITT
__itt_domain* cdt_3_domain = __itt_domain_create("org.cgal.CDT_3");
const std::array<__itt_string_handle*, NB_TASKS> task_handles = {
__itt_string_handle_create("CDT_3: read input file"),
__itt_string_handle_create("CDT_3: merge facets"),
__itt_string_handle_create("CDT_3: insert vertices"),
__itt_string_handle_create("CDT_3: compute distances"),
__itt_string_handle_create("CDT_3: conforming"),
__itt_string_handle_create("CDT_3: cdt"),
__itt_string_handle_create("CDT_3: outputs"),
__itt_string_handle_create("CDT_3: validation")
};
#endif
std::array<CGAL::Real_timer, NB_TASKS> timers{};
struct Scope_guard {
Tasks_manager *instance = nullptr;
int task_id;
Scope_guard(Tasks_manager *instance, int task_id) : instance(instance), task_id(task_id) {
instance->timers[task_id].start();
#if CGAL_USE_ITT
__itt_task_begin(instance->cdt_3_domain, __itt_null, __itt_null, instance->task_handles[task_id]);
#endif
}
~Scope_guard() {
instance->timers[task_id].stop();
#if CGAL_USE_ITT
__itt_task_end(instance->cdt_3_domain);
#endif
}
};
Scope_guard make_task_scope_guard(int task_id) {
return Scope_guard(this, task_id);
}
Scope_guard READ_INPUT_TASK_guard() { return make_task_scope_guard(READ_INPUT); }
Scope_guard MERGE_FACETS_TASK_guard() { return make_task_scope_guard(MERGE_FACETS); }
Scope_guard INSERT_VERTICES_TASK_guard() { return make_task_scope_guard(INSERT_VERTICES); }
Scope_guard COMPUTE_DISTANCES_TASK_guard() { return make_task_scope_guard(COMPUTE_DISTANCES); }
Scope_guard CONFORMING_TASK_guard() { return make_task_scope_guard(CONFORMING); }
Scope_guard CDT_TASK_guard() { return make_task_scope_guard(CDT); }
Scope_guard OUTPUT_TASK_guard() { return make_task_scope_guard(OUTPUT); }
Scope_guard VALIDATION_TASK_guard() { return make_task_scope_guard(VALIDATION); }
}; // end struct Intel_OneAPI_ITT_API
static Tasks_manager instance;
return instance;
} // end auto& tasks_manager()
} // end namespace CDT_3::internal
inline auto CDT_3_READ_INPUT_TASK_guard() {
return CDT_3::internal::tasks_manager().READ_INPUT_TASK_guard();
}
inline auto CDT_3_MERGE_FACETS_TASK_guard() {
return CDT_3::internal::tasks_manager().MERGE_FACETS_TASK_guard();
}
inline auto CDT_3_INSERT_VERTICES_TASK_guard() {
return CDT_3::internal::tasks_manager().INSERT_VERTICES_TASK_guard();
}
inline auto CDT_3_COMPUTE_DISTANCES_TASK_guard() {
return CDT_3::internal::tasks_manager().COMPUTE_DISTANCES_TASK_guard();
}
inline auto CDT_3_CONFORMING_TASK_guard() {
return CDT_3::internal::tasks_manager().CONFORMING_TASK_guard();
}
inline auto CDT_3_CDT_TASK_guard() {
return CDT_3::internal::tasks_manager().CDT_TASK_guard();
}
inline auto CDT_3_OUTPUT_TASK_guard() {
return CDT_3::internal::tasks_manager().OUTPUT_TASK_guard();
}
inline auto CDT_3_VALIDATION_TASK_guard() {
return CDT_3::internal::tasks_manager().VALIDATION_TASK_guard();
}
template <typename T_3> template <typename T_3>
class Conforming_Delaunay_triangulation_3 : public T_3 { class Conforming_Delaunay_triangulation_3 : public T_3 {
public: public:

View File

@ -29,13 +29,6 @@ create_single_source_cgal_program( "cdt_3_from_off_with_Epeck.cpp")
target_link_libraries(cdt_3_from_off_with_Epeck PRIVATE CDT_3_dependencies) target_link_libraries(cdt_3_from_off_with_Epeck PRIVATE CDT_3_dependencies)
create_single_source_cgal_program( "snap_and_cdt3.cpp") create_single_source_cgal_program( "snap_and_cdt3.cpp")
if(cxx_std_20 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
add_executable(cdt_3_from_off_CGAL_DEBUG_CDT_3 cdt_3_from_off)
target_compile_definitions(cdt_3_from_off_CGAL_DEBUG_CDT_3 PRIVATE CGAL_DEBUG_CDT_3=255)
target_link_libraries(cdt_3_from_off_CGAL_DEBUG_CDT_3 PRIVATE CDT_3_dependencies)
cgal_add_test(cdt_3_from_off_CGAL_DEBUG_CDT_3)
endif()
add_executable(test_CDT_3_insert_constrained_edge_from_EDG_file cdt_test_insert_constrained_edge_from_EDG_file.cpp) add_executable(test_CDT_3_insert_constrained_edge_from_EDG_file cdt_test_insert_constrained_edge_from_EDG_file.cpp)
target_link_libraries(test_CDT_3_insert_constrained_edge_from_EDG_file PRIVATE CDT_3_dependencies) target_link_libraries(test_CDT_3_insert_constrained_edge_from_EDG_file PRIVATE CDT_3_dependencies)
target_compile_definitions(test_CDT_3_insert_constrained_edge_from_EDG_file PUBLIC CGAL_TEST_CDT_3_USE_CDT) target_compile_definitions(test_CDT_3_insert_constrained_edge_from_EDG_file PUBLIC CGAL_TEST_CDT_3_USE_CDT)
@ -143,12 +136,6 @@ if (CGAL_CDT_TEST_USE_THINGI)
include(./Thingi10k-CDT.cmake) include(./Thingi10k-CDT.cmake)
endif() endif()
if(cxx_std_20 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
add_test(NAME "execution of cdt_3_from_off_CGAL_DEBUG_CDT_3 3torus" COMMAND cdt_3_from_off_CGAL_DEBUG_CDT_3 ${CGAL_DATA_DIR}/meshes/3torus.off)
cgal_add_compilation_test(cdt_3_from_off_CGAL_DEBUG_CDT_3)
cgal_setup_test_properties("execution of cdt_3_from_off_CGAL_DEBUG_CDT_3 3torus" cdt_3_from_off_CGAL_DEBUG_CDT_3)
endif()
get_directory_property(all_tests TESTS) get_directory_property(all_tests TESTS)
foreach(test ${all_tests}) foreach(test ${all_tests})
if(test MATCHES cdt|CDT) if(test MATCHES cdt|CDT)

View File

@ -2,13 +2,7 @@
#pragma warning(disable: 4455) #pragma warning(disable: 4455)
#endif #endif
#if defined(CGAL_DEBUG_CDT_3) && !__has_include(<format>)
#undef CGAL_DEBUG_CDT_3
#endif
// #define CGAL_CDT_2_DEBUG_INTERSECTIONS 1 // #define CGAL_CDT_2_DEBUG_INTERSECTIONS 1
#define NO_TRY_CATCH 1
// #define CGAL_DEBUG_CDT_3 1
#include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_3.h>
#include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_base_3.h> #include <CGAL/Conforming_constrained_Delaunay_triangulation_vertex_base_3.h>
#include <CGAL/Constrained_triangulation_3/internal/read_polygon_mesh_for_cdt_3.h> #include <CGAL/Constrained_triangulation_3/internal/read_polygon_mesh_for_cdt_3.h>
@ -275,34 +269,6 @@ CDT_options::CDT_options(int argc, char* argv[]) {
# define CDT_3_throw_exception_again throw # define CDT_3_throw_exception_again throw
#endif #endif
#if CGAL_USE_ITT
# include <ittnotify.h>
# define CGAL_CDT_3_TASK_BEGIN(task_handle) \
std::cerr << "START " << #task_handle << '\n'; \
__itt_task_begin(cdt_3_domain, __itt_null, __itt_null, task_handle);
# define CGAL_CDT_3_TASK_END(task_handle) \
std::cerr << "-STOP " << #task_handle << '\n'; \
__itt_task_end(cdt_3_domain);
# define CGAL_CDT_3_TASK_SCOPE(task_handle) \
CGAL_CDT_3_TASK_BEGIN(task_handle) \
auto scope_exit = CGAL::make_scope_exit([&]() { CGAL_CDT_3_TASK_END(task_handle); });
auto cdt_3_domain = __itt_domain_create("org.cgal.CDT_3");
auto read_input_task_handle = __itt_string_handle_create("CDT_3: read input file");
auto merge_facets_task_handle = __itt_string_handle_create("CDT_3: merge facets");
auto insert_vertices_task_handle = __itt_string_handle_create("CDT_3: insert vertices");
auto compute_distances_task_handle = __itt_string_handle_create("CDT_3: compute distances");
auto conforming_task_handle = __itt_string_handle_create("CDT_3: conforming");
auto cdt_task_handle = __itt_string_handle_create("CDT_3: cdt");
auto output_task_handle = __itt_string_handle_create("CDT_3: outputs");
auto validation_task_handle = __itt_string_handle_create("CDT_3: validation");
#else // no ITT
# define CGAL_CDT_3_TASK_BEGIN(task_handle)
# define CGAL_CDT_3_TASK_END(task_handle)
# define CGAL_CDT_3_TASK_SCOPE(task_handle)
#endif // no ITT
void configure_cdt_debug_options(CDT& cdt, const CDT_options& options) { void configure_cdt_debug_options(CDT& cdt, const CDT_options& options) {
cdt.debug_Steiner_points(options.verbose_level > 0); cdt.debug_Steiner_points(options.verbose_level > 0);
cdt.debug_input_faces(options.debug_input_faces); cdt.debug_input_faces(options.debug_input_faces);
@ -343,7 +309,7 @@ auto compute_bounding_box(const Mesh& mesh, const CDT_options& options) {
std::function<void()> create_output_finalizer(const CDT& cdt, const CDT_options& options) { std::function<void()> create_output_finalizer(const CDT& cdt, const CDT_options& options) {
return [&cdt, &options]() { return [&cdt, &options]() {
CGAL_CDT_3_TASK_SCOPE(output_task_handle); auto _ = CGAL::CDT_3_OUTPUT_TASK_guard();
{ {
auto dump_tets_to_medit = [](std::string fname, auto dump_tets_to_medit = [](std::string fname,
const std::vector<K::Point_3> &points, const std::vector<K::Point_3> &points,
@ -725,8 +691,8 @@ Borders_of_patches maybe_merge_facets(
if(!options.merge_facets) return patch_edges; if(!options.merge_facets) return patch_edges;
CGAL_CDT_3_TASK_BEGIN(merge_facets_task_handle);
{ {
auto _ = CGAL::CDT_3_MERGE_FACETS_TASK_guard();
auto start_time = std::chrono::high_resolution_clock::now(); auto start_time = std::chrono::high_resolution_clock::now();
if(options.merge_facets_old_method) { if(options.merge_facets_old_method) {
@ -743,16 +709,14 @@ Borders_of_patches maybe_merge_facets(
<< std::chrono::duration_cast<std::chrono::milliseconds>(timing).count() << " ms\n"; << std::chrono::duration_cast<std::chrono::milliseconds>(timing).count() << " ms\n";
} }
} }
CGAL_CDT_3_TASK_END(merge_facets_task_handle);
if(options.dump_patches_after_merge_filename.empty()) return patch_edges; if(options.dump_patches_after_merge_filename.empty()) return patch_edges;
CGAL_CDT_3_TASK_BEGIN(output_task_handle);
{ {
auto _ = CGAL::CDT_3_OUTPUT_TASK_guard();
std::ofstream out(options.dump_patches_after_merge_filename); std::ofstream out(options.dump_patches_after_merge_filename);
CGAL::IO::write_PLY(out, mesh, CGAL::parameters::stream_precision(17)); CGAL::IO::write_PLY(out, mesh, CGAL::parameters::stream_precision(17));
} }
CGAL_CDT_3_TASK_END(output_task_handle);
return patch_edges; return patch_edges;
} }
@ -813,15 +777,14 @@ int go(Mesh mesh, CDT_options options) {
auto patch_edges = maybe_merge_facets(mesh, options, pmaps, bbox_max_span); auto patch_edges = maybe_merge_facets(mesh, options, pmaps, bbox_max_span);
if(!options.dump_patches_borders_prefix.empty()) { if(!options.dump_patches_borders_prefix.empty()) {
CGAL_CDT_3_TASK_BEGIN(output_task_handle); auto _ = CGAL::CDT_3_OUTPUT_TASK_guard();
dump_patches_borders(patch_edges, pmaps, options.dump_patches_borders_prefix); dump_patches_borders(patch_edges, pmaps, options.dump_patches_borders_prefix);
CGAL_CDT_3_TASK_END(output_task_handle);
} }
auto mesh_descriptor_to_vertex_handle_pmap = get(CGAL::dynamic_vertex_property_t<CDT::Vertex_handle>(), mesh); auto mesh_descriptor_to_vertex_handle_pmap = get(CGAL::dynamic_vertex_property_t<CDT::Vertex_handle>(), mesh);
CGAL_CDT_3_TASK_BEGIN(insert_vertices_task_handle);
{ {
auto _ = CGAL::CDT_3_INSERT_VERTICES_TASK_guard();
auto start_time = std::chrono::high_resolution_clock::now(); auto start_time = std::chrono::high_resolution_clock::now();
if(options.merge_facets) { if(options.merge_facets) {
cdt.insert_vertices_range(vertices(mesh), pmaps.mesh_vertex_point_map, mesh_descriptor_to_vertex_handle_pmap, cdt.insert_vertices_range(vertices(mesh), pmaps.mesh_vertex_point_map, mesh_descriptor_to_vertex_handle_pmap,
@ -844,10 +807,9 @@ int go(Mesh mesh, CDT_options options) {
} }
cdt.add_bbox_points_if_not_dimension_3(); cdt.add_bbox_points_if_not_dimension_3();
} }
CGAL_CDT_3_TASK_END(insert_vertices_task_handle);
CGAL_CDT_3_TASK_BEGIN(compute_distances_task_handle);
{ {
auto _ = CGAL::CDT_3_COMPUTE_DISTANCES_TASK_guard();
auto start_time = std::chrono::high_resolution_clock::now(); auto start_time = std::chrono::high_resolution_clock::now();
auto exit_code = validate_minimum_vertex_distances(cdt, options.vertex_vertex_epsilon * bbox_max_span, options); auto exit_code = validate_minimum_vertex_distances(cdt, options.vertex_vertex_epsilon * bbox_max_span, options);
@ -863,10 +825,9 @@ int go(Mesh mesh, CDT_options options) {
<< std::chrono::duration_cast<std::chrono::milliseconds>(timing).count() << " ms\n"; << std::chrono::duration_cast<std::chrono::milliseconds>(timing).count() << " ms\n";
} }
} }
CGAL_CDT_3_TASK_END(compute_distances_task_handle);
CGAL_CDT_3_TASK_BEGIN(conforming_task_handle);
{ {
auto _ = CGAL::CDT_3_CONFORMING_TASK_guard();
int poly_id = 0; int poly_id = 0;
auto output_on_exit_scope_guard = CGAL::make_scope_exit(create_output_finalizer(cdt, options)); auto output_on_exit_scope_guard = CGAL::make_scope_exit(create_output_finalizer(cdt, options));
auto start_time = std::chrono::high_resolution_clock::now(); auto start_time = std::chrono::high_resolution_clock::now();
@ -904,10 +865,9 @@ int go(Mesh mesh, CDT_options options) {
std::chrono::high_resolution_clock::now() - start_time).count() << " ms\n"; std::chrono::high_resolution_clock::now() - start_time).count() << " ms\n";
} }
} }
CGAL_CDT_3_TASK_END(conforming_task_handle);
if(!options.dump_after_conforming_filename.empty()) { if(!options.dump_after_conforming_filename.empty()) {
CGAL_CDT_3_TASK_BEGIN(output_task_handle); auto _ = CGAL::CDT_3_OUTPUT_TASK_guard();
using Vertex_index = Mesh::Vertex_index; using Vertex_index = Mesh::Vertex_index;
[[maybe_unused]] std::size_t time_stamp_counter = 0u; [[maybe_unused]] std::size_t time_stamp_counter = 0u;
for(auto v: cdt.finite_vertex_handles()) { for(auto v: cdt.finite_vertex_handles()) {
@ -929,23 +889,21 @@ int go(Mesh mesh, CDT_options options) {
out_mesh.precision(17); out_mesh.precision(17);
out_mesh << mesh; out_mesh << mesh;
out_mesh.close(); out_mesh.close();
CGAL_CDT_3_TASK_END(output_task_handle);
} }
if(!options.quiet) { if(!options.quiet) {
std::cout << "Number of vertices after conforming: " << cdt.number_of_vertices() << "\n\n"; std::cout << "Number of vertices after conforming: " << cdt.number_of_vertices() << "\n\n";
} }
CGAL_CDT_3_TASK_BEGIN(validation_task_handle);
{ {
auto _ = CGAL::CDT_3_VALIDATION_TASK_guard();
CGAL_assertion(!options.call_is_valid || cdt.Base_triantulation::is_valid(true)); CGAL_assertion(!options.call_is_valid || cdt.Base_triantulation::is_valid(true));
CGAL_assertion(!options.call_is_valid || cdt.is_valid(true)); CGAL_assertion(!options.call_is_valid || cdt.is_valid(true));
CGAL_assertion(!options.call_is_valid || cdt.is_conforming()); CGAL_assertion(!options.call_is_valid || cdt.is_conforming());
} }
CGAL_CDT_3_TASK_END(validation_task_handle);
CGAL_CDT_3_TASK_BEGIN(cdt_task_handle);
{ {
auto _ = CGAL::CDT_3_CDT_TASK_guard();
auto start_time = std::chrono::high_resolution_clock::now(); auto start_time = std::chrono::high_resolution_clock::now();
cdt.restore_constrained_Delaunay(); cdt.restore_constrained_Delaunay();
if(!options.quiet) { if(!options.quiet) {
@ -954,14 +912,12 @@ int go(Mesh mesh, CDT_options options) {
std::cout << "Number of vertices after CDT: " << cdt.number_of_vertices() << "\n\n"; std::cout << "Number of vertices after CDT: " << cdt.number_of_vertices() << "\n\n";
} }
} }
CGAL_CDT_3_TASK_END(cdt_task_handle);
CGAL_CDT_3_TASK_BEGIN(validation_task_handle);
{ {
auto _ = CGAL::CDT_3_VALIDATION_TASK_guard();
CGAL_assertion(!options.call_is_valid || cdt.is_conforming()); CGAL_assertion(!options.call_is_valid || cdt.is_conforming());
CGAL_assertion(!options.call_is_valid || cdt.is_valid(true)); CGAL_assertion(!options.call_is_valid || cdt.is_valid(true));
} }
CGAL_CDT_3_TASK_END(validation_task_handle);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
@ -1064,23 +1020,22 @@ int main(int argc, char* argv[]) {
return 0; return 0;
} }
CGAL_CDT_3_TASK_BEGIN(read_input_task_handle);
auto start_time = std::chrono::high_resolution_clock::now();
CGAL::CDT_3_read_polygon_mesh_output<Mesh> read_mesh_result; CGAL::CDT_3_read_polygon_mesh_output<Mesh> read_mesh_result;
auto start_time = std::chrono::high_resolution_clock::now();
{
auto _ = CGAL::CDT_3_READ_INPUT_TASK_guard();
if(options.read_mesh_with_operator) { if(options.read_mesh_with_operator) {
std::ifstream in(options.input_filename); std::ifstream in(options.input_filename);
if(!in) { if(!in) {
std::cerr << "Cannot open file: " << options.input_filename << std::endl; std::cerr << "Cannot open file: " << options.input_filename << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
Mesh mesh; in >> *read_mesh_result.polygon_mesh;
in >> mesh;
if(!in) { if(!in) {
std::cerr << "Error reading mesh with operator>>" << std::endl; std::cerr << "Error reading mesh with operator>>" << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
read_mesh_result.polygon_mesh = std::move(mesh);
} else { } else {
auto read_options = CGAL::parameters::repair_polygon_soup(options.repair_mesh).verbose(options.verbose_level); auto read_options = CGAL::parameters::repair_polygon_soup(options.repair_mesh).verbose(options.verbose_level);
read_mesh_result = CGAL::read_polygon_mesh_for_cdt_3<Mesh>(options.input_filename, read_options); read_mesh_result = CGAL::read_polygon_mesh_for_cdt_3<Mesh>(options.input_filename, read_options);
@ -1092,13 +1047,12 @@ int main(int argc, char* argv[]) {
std::cerr << "Details:\n" << read_mesh_result.polygon_mesh.error() << std::endl; std::cerr << "Details:\n" << read_mesh_result.polygon_mesh.error() << std::endl;
return EXIT_FAILURE; return EXIT_FAILURE;
} }
Mesh mesh = std::move(*read_mesh_result.polygon_mesh);
if(!options.quiet) { if(!options.quiet) {
std::cout << "[timings] read mesh in " << std::chrono::duration_cast<std::chrono::milliseconds>( std::cout << "[timings] read mesh in " << std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start_time).count() << " ms\n"; std::chrono::high_resolution_clock::now() - start_time).count() << " ms\n";
std::cout << "Number of vertices: " << mesh.number_of_vertices() << '\n'; std::cout << "Number of vertices: " << read_mesh_result.polygon_mesh->number_of_vertices() << '\n';
std::cout << "Number of edges: " << mesh.number_of_edges() << '\n'; std::cout << "Number of edges: " << read_mesh_result.polygon_mesh->number_of_edges() << '\n';
std::cout << "Number of faces: " << mesh.number_of_faces() << "\n\n"; std::cout << "Number of faces: " << read_mesh_result.polygon_mesh->number_of_faces() << "\n\n";
if(!options.read_mesh_with_operator) { if(!options.read_mesh_with_operator) {
std::cout << "Processing was successful.\n"; std::cout << "Processing was successful.\n";
@ -1113,7 +1067,7 @@ int main(int argc, char* argv[]) {
std::cout << std::endl; std::cout << std::endl;
} }
} }
CGAL_CDT_3_TASK_END(read_input_task_handle); }
if(options.reject_self_intersections && read_mesh_result.polygon_soup_self_intersects) { if(options.reject_self_intersections && read_mesh_result.polygon_soup_self_intersects) {
std::cerr << "ERROR: input mesh self-intersects\n"; std::cerr << "ERROR: input mesh self-intersects\n";
@ -1121,10 +1075,10 @@ int main(int argc, char* argv[]) {
} }
if(!options.failure_assertion_expression.empty()) { if(!options.failure_assertion_expression.empty()) {
return bisect_errors(std::move(mesh), options); return bisect_errors(std::move(*read_mesh_result.polygon_mesh), options);
} }
auto exit_code = go(std::move(mesh), options); auto exit_code = go(std::move(*read_mesh_result.polygon_mesh), options);
if(!options.quiet) { if(!options.quiet) {
std::cout << "[timings] total time: " << std::chrono::duration_cast<std::chrono::milliseconds>( std::cout << "[timings] total time: " << std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start_time).count() << " ms\n"; std::chrono::high_resolution_clock::now() - start_time).count() << " ms\n";

View File

@ -1,6 +1,3 @@
#if __has_include(<format>)
#define CGAL_DEBUG_CDT_3 1
#endif
#define CGAL_TRIANGULATION_CHECK_EXPENSIVE 1 #define CGAL_TRIANGULATION_CHECK_EXPENSIVE 1
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/Delaunay_triangulation_3.h>

View File

@ -1,6 +1,3 @@
#if __has_include(<format>)
#define CGAL_DEBUG_CDT_3 1
#endif
#define CGAL_TRIANGULATION_CHECK_EXPENSIVE 1 #define CGAL_TRIANGULATION_CHECK_EXPENSIVE 1
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h> #include <CGAL/Delaunay_triangulation_3.h>