diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/data/test-4-rnd-polygons-4-6.off b/Kinetic_space_partition/examples/Kinetic_space_partition/data/test-4-rnd-polygons-4-6.off new file mode 100644 index 00000000000..eb5def17d8c --- /dev/null +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/data/test-4-rnd-polygons-4-6.off @@ -0,0 +1,31 @@ +OFF +25 4 0 +0.42368054211531858133 0.18253980947404854773 0.43361217636176885293 +0.022479024642939653134 0.54906919604958193126 0.18056913227494222896 +0.2811647526241494166 0.52705548769951282573 0.022668645874355360104 +0.56065427807169632146 0.47592798567162025725 -0.10696848363655320213 +0.97118185417342761667 0.3697089496003267417 -0.25076552479989255851 +0.53714992649207637943 0.15247177832828684441 0.39492925062101502665 +0.47254430936410363184 -0.4706882612609787353 -0.2428207513377572957 +0.072755785530830729968 -0.01774935447864991328 -0.65160096675580014836 +-0.13624087681667856886 -0.19828919510256182157 -1 +0.050171309138895309188 -1 -1 +0.42195670307475763305 -1 -0.48389499638253974378 +0.49191328462142458466 -0.78271514577943301916 -0.31664816804310136344 +0.49305113818899937161 -0.56550106370623254293 -0.24495695687290242049 +-1 0.038516275072130623514 0.26001089527408571822 +-0.0052646635725682039419 0.32175247304120269121 -1 +0.79946300115531654384 1 -1 +-0.24605339821785221499 1 1 +-0.9554579135068776985 0.40209355388461098801 1 +-1 0.32023017788244112491 0.89940428108662362483 +0.71260765954572424796 -1 0.060430338155497906327 +0.93155151560319460202 -0.69967629334922809559 0.098656503647987087158 +1 -0.4563157020167216138 0.27001739515231759636 +1 0.14422055985065576622 0.91048995874330840294 +0.94048661719673254389 0.15625792052012871247 1 +-0.016691632221610047671 -1 1 +6 0 1 2 3 4 5 +7 6 7 8 9 10 11 12 +6 13 14 15 16 17 18 +6 19 20 21 22 23 24 diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp b/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp index 7771a321e99..05f8e4fc679 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp @@ -1,32 +1,23 @@ -#include #include #include #include -#include #include #include -using SCF = CGAL::Simple_cartesian; -using SCD = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; using Kernel = EPICK; using FT = typename Kernel::FT; -using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; -using Segment_3 = typename Kernel::Segment_3; -using Triangle_2 = typename Kernel::Triangle_2; using Surface_mesh = CGAL::Surface_mesh; using KSP = CGAL::Kinetic_space_partition_3; using Timer = CGAL::Real_timer; int main(const int argc, const char** argv) { - // Reading polygons from file - const auto kernel_name = boost::typeindex::type_id().pretty_name(); - std::string input_filename = (argc > 1 ? argv[1] : "../data/test-4-rnd-polygons-4-6.off"); + std::string input_filename = (argc > 1 ? argv[1] : "data/test-4-rnd-polygons-4-6.off"); std::ifstream input_file(input_filename); std::vector input_vertices; @@ -66,7 +57,7 @@ int main(const int argc, const char** argv) { const FT time = static_cast(timer.time()); // Access the kinetic partition via linear cell complex. - typedef CGAL::Linear_cell_complex_traits<3, CGAL::Exact_predicates_exact_constructions_kernel> LCC_Traits; + typedef CGAL::Linear_cell_complex_traits<3, EPECK> LCC_Traits; CGAL::Linear_cell_complex_for_combinatorial_map<3, 3, LCC_Traits, typename KSP::Linear_cell_complex_min_items> lcc; ksp.get_linear_cell_complex(lcc); @@ -76,5 +67,6 @@ int main(const int argc, const char** argv) { std::cout << "For k = " << k << ":\n" << " vertices: " << count[0] << "\n faces: " << count[2] << "\n volumes: " << count[3] << std::endl; std::cout << "\n3D kinetic partition created in " << time << " seconds!" << std::endl; + return EXIT_SUCCESS; }