From 14150ef95c2d653e3bb6d29f4d499c8a5dd7ebbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 14 Jan 2019 11:15:28 +0100 Subject: [PATCH 001/271] Revert commit b307771 ("bug fix for natural_neighbor_coordinates_2... ... using a small feature in the conflict zone functions of Delaunay_triangulation_2") See concerns raised in the (not-actually-approved) small feature: https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/DT2_strict_and_weak_conflict_zone --- .../CGAL/natural_neighbor_coordinates_2.h | 2 +- .../include/CGAL/Delaunay_triangulation_2.h | 55 ++++++++----------- 2 files changed, 23 insertions(+), 34 deletions(-) diff --git a/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h b/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h index 4b94385549f..0a18eb7d1a6 100644 --- a/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h +++ b/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h @@ -124,7 +124,7 @@ natural_neighbors_2(const Dt& dt, } std::list hole; - dt.get_boundary_of_conflicts(p, std::back_inserter(hole), fh, false); + dt.get_boundary_of_conflicts(p, std::back_inserter(hole), fh); return natural_neighbors_2(dt, p, out, hole.begin(), hole.end()); } diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index 4e127cfc2ba..0ea93fcdd0f 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -114,7 +114,7 @@ public: nearest_vertex(const Point& p, Face_handle f= Face_handle()) const; bool does_conflict(const Point &p, Face_handle fh) const;// deprecated - bool test_conflict(const Point &p, Face_handle fh, bool strict = true) const; + bool test_conflict(const Point &p, Face_handle fh) const; bool find_conflicts(const Point &p, //deprecated std::list& conflicts, Face_handle start= Face_handle()) const; @@ -411,8 +411,7 @@ public: get_conflicts_and_boundary(const Point &p, OutputItFaces fit, OutputItBoundaryEdges eit, - Face_handle start = Face_handle(), - bool strict = true) const + Face_handle start = Face_handle()) const { CGAL_triangulation_precondition(this->dimension() == 2); int li; @@ -427,9 +426,9 @@ public: case Triangulation::OUTSIDE_CONVEX_HULL: *fit++ = fh; //put fh in OutputItFaces std::pair pit = std::make_pair(fit,eit); - pit = propagate_conflicts(p,fh,0,pit, strict); - pit = propagate_conflicts(p,fh,1,pit, strict); - pit = propagate_conflicts(p,fh,2,pit, strict); + pit = propagate_conflicts(p,fh,0,pit); + pit = propagate_conflicts(p,fh,1,pit); + pit = propagate_conflicts(p,fh,2,pit); return pit; } CGAL_triangulation_assertion(false); @@ -440,11 +439,10 @@ public: OutputItFaces get_conflicts (const Point &p, OutputItFaces fit, - Face_handle start= Face_handle(), - bool strict = true) const + Face_handle start= Face_handle()) const { std::pair pp = - get_conflicts_and_boundary(p, fit, Emptyset_iterator(), start, strict); + get_conflicts_and_boundary(p, fit, Emptyset_iterator(), start); return pp.first; } @@ -452,11 +450,10 @@ public: OutputItBoundaryEdges get_boundary_of_conflicts(const Point &p, OutputItBoundaryEdges eit, - Face_handle start= Face_handle(), - bool strict = true) const + Face_handle start= Face_handle()) const { std::pair pp = - get_conflicts_and_boundary(p, Emptyset_iterator(), eit, start, strict); + get_conflicts_and_boundary(p, Emptyset_iterator(), eit, start); return pp.second; } @@ -467,18 +464,16 @@ private: propagate_conflicts (const Point &p, const Face_handle fh, const int i, - std::pair - pit, - bool strict = true) const + std::pair pit) const { Face_handle fn = fh->neighbor(i); - if(! test_conflict(p,fn,strict)) { + if(! test_conflict(p,fn)) { *(pit.second)++ = Edge(fn, fn->index(fh)); } else { *(pit.first)++ = fn; int j = fn->index(fh); - pit = propagate_conflicts(p,fn,ccw(j),pit,strict); - pit = propagate_conflicts(p,fn,cw(j), pit,strict); + pit = propagate_conflicts(p,fn,ccw(j),pit); + pit = propagate_conflicts(p,fn,cw(j), pit); } return pit; } @@ -488,8 +483,7 @@ private: non_recursive_propagate_conflicts(const Point &p, const Face_handle fh, const int i, - std::pair pit, - bool strict = true) const + std::pair pit) const { std::stack > stack; stack.push(std::make_pair(fh,i)); @@ -499,7 +493,8 @@ private: const int i=stack.top().second; stack.pop(); Face_handle fn = fh->neighbor(i); - if(! test_conflict(p,fn,strict)) { + if(! test_conflict(p,fn)) + { *(pit.second)++ = Edge(fn, fn->index(fh)); } else { *(pit.first)++ = fn; @@ -516,22 +511,20 @@ private: propagate_conflicts (const Point &p, const Face_handle fh, const int i, - std::pair - pit, - bool strict = true, + std::pair pit, int depth=0) const { if(depth == 100) - return non_recursive_propagate_conflicts(p, fh, i, pit, strict); + return non_recursive_propagate_conflicts(p, fh, i, pit); Face_handle fn = fh->neighbor(i); - if(! test_conflict(p,fn,strict)) { + if(! test_conflict(p,fn)) { *(pit.second)++ = Edge(fn, fn->index(fh)); } else { *(pit.first)++ = fn; int j = fn->index(fh); - pit = propagate_conflicts(p,fn,ccw(j),pit, strict, depth+1); - pit = propagate_conflicts(p,fn,cw(j), pit, strict, depth+1); + pit = propagate_conflicts(p,fn,ccw(j),pit, depth+1); + pit = propagate_conflicts(p,fn,cw(j), pit, depth+1); } return pit; } @@ -636,12 +629,8 @@ protected: template < class Gt, class Tds > inline bool Delaunay_triangulation_2:: -test_conflict(const Point &p, Face_handle fh, bool strict) const +test_conflict(const Point &p, Face_handle fh) const { - if(! strict) { - Oriented_side os = side_of_oriented_circle(fh,p,false); - return os == ON_POSITIVE_SIDE; - } // return true if P is inside the circumcircle of fh // if fh is infinite, return true when p is in the positive // halfspace or on the boundary and in the finite edge of fh From 48185ac1533f327ffbd87ac8d3ccfc51610d763b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 14 Jan 2019 11:20:16 +0100 Subject: [PATCH 002/271] Filter out irrelevant (<= 0) natural and regular neighbor coordinates - coord == 0 is possible in theory, but not interesting to output - coord < 0 is not possible in theory, but since we do construction and use signed (polygon_area_2()) area computations, we could in theory get negative coordinates in output --- .../CGAL/natural_neighbor_coordinates_2.h | 34 +++++++++++++------ .../CGAL/regular_neighbor_coordinates_2.h | 14 +++++--- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h b/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h index 0a18eb7d1a6..d2df19d72f0 100644 --- a/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h +++ b/Interpolation/include/CGAL/natural_neighbor_coordinates_2.h @@ -99,21 +99,28 @@ natural_neighbors_2(const Dt& dt, Point_2 p1(v1->point()), p2(v2->point()); Coord_type coef1(0); - Coord_type coef2(0); Equal_x_2 equal_x_2; if(!equal_x_2(p1,p2)) - { coef1 = (p.x() - p2.x()) / (p1.x() - p2.x()); - coef2 = 1 - coef1; - *out++ = std::make_pair(v1,coef1); - *out++ = std::make_pair(v2,coef2); - } else { + else coef1 = (p.y() - p2.y()) / (p1.y() - p2.y()); - coef2 = 1 - coef1; - *out++ = std::make_pair(v1,coef1); - *out++ = std::make_pair(v2,coef2); + + if(coef1 == 0) + { + *out++ = std::make_pair(v2, Coord_type(1)); + return make_triple(out, Coord_type(1), true); } + Coord_type coef2 = 1 - coef1; + if(coef2 == 0) + { + *out++ = std::make_pair(v1, Coord_type(1)); + return make_triple(out, Coord_type(1), true); + } + + *out++ = std::make_pair(v1,coef1); + *out++ = std::make_pair(v2,coef2); + return make_triple(out, coef1+coef2, true); } @@ -142,6 +149,7 @@ natural_neighbors_2(const Dt& dt, EdgeIterator hole_begin, EdgeIterator hole_end) { CGAL_precondition(dt.dimension() == 2); + typedef typename Dt::Geom_traits Traits; typedef typename Traits::FT Coord_type; typedef typename Traits::Point_2 Point_2; @@ -187,8 +195,12 @@ natural_neighbors_2(const Dt& dt, p); area += polygon_area_2(vor.begin(), vor.end(), dt.geom_traits()); - *out++ = std::make_pair(current,area); - area_sum += area; + + if(area > 0) + { + *out++ = std::make_pair(current,area); + area_sum += area; + } //update prev and hit: prev = current; diff --git a/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h b/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h index bbb03227e5c..5a83dd079c1 100644 --- a/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h +++ b/Interpolation/include/CGAL/regular_neighbor_coordinates_2.h @@ -131,9 +131,12 @@ regular_neighbor_coordinates_vertex_2(const Rt& rt, *vor_vertices++ = vor[2]; area += polygon_area_2(vor.begin(), vor.end(), rt.geom_traits()); - *out++= std::make_pair(current, area); - area_sum += area; + if(area > 0) + { + *out++= std::make_pair(current, area); + area_sum += area; + } //update prev and hit: prev = current; @@ -163,8 +166,11 @@ regular_neighbor_coordinates_vertex_2(const Rt& rt, ++fc; } - *out++ = std::make_pair((*hidden_vertices_begin), area); - area_sum += area; + if(area > 0) + { + *out++ = std::make_pair((*hidden_vertices_begin), area); + area_sum += area; + } } return make_triple(out, area_sum, true); From a52f7198d23c828e24e0f970e8d12f7189181ed0 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 20 Feb 2019 16:46:28 +0100 Subject: [PATCH 003/271] WIP SSH --- .../cmake/modules/CGAL_add_test.cmake | 47 +++++++++++++++---- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index adf2430ff66..44d54b5133c 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -43,6 +43,11 @@ if(ANDROID) set(ANDROID_DIR_PREFIX /data/local/tmp/) find_program(adb_executable adb) endif() +if(SSH) + set(SSH_DIR_PREFIX /home/pi/CGAL/) + find_program(ssh_executable ssh) + find_program(scp_executable scp) +endif() # Process a list, and replace items contains a file pattern (like # `*.off`) by the sublist that corresponds to the globbing of the @@ -128,6 +133,13 @@ function(cgal_setup_test_properties test_name) APPEND PROPERTY DEPENDS ${PROJECT_NAME}_SetupFixture) set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR PROPERTY FIXTURES_SETUP ${PROJECT_NAME}) + elseif(SSH) + add_test(NAME ${PROJECT_NAME}_SetupFixture + COMMAND + ${scp_executable} -r + ${CMAKE_CURRENT_SOURCE_DIR} + ${SSH_HOST}:${SSH_DIR_PREFIX}${PROJECT_NAME} + ) else() add_test(NAME ${PROJECT_NAME}_SetupFixture COMMAND @@ -145,6 +157,12 @@ function(cgal_setup_test_properties test_name) ${adb_executable} shell rm -rf ${ANDROID_DIR_PREFIX}${PROJECT_NAME} ) + elseif(SSH) + add_test(NAME ${PROJECT_NAME}_CleanupFixture + COMMAND + ${ssh_executable} ${SSH_HOST} rm -rf + ${SSH_DIR_PREFIX}${PROJECT_NAME} + ) else() add_test(NAME ${PROJECT_NAME}_CleanupFixture COMMAND @@ -159,11 +177,12 @@ function(cgal_setup_test_properties test_name) ${PROJECT_NAME}_CleanupFixture ${PROJECT_NAME}_SetupFixture APPEND PROPERTY LABELS "${PROJECT_NAME}") endif() - if(NOT ANDROID) + if(NOT ANDROID AND NOT SSH) set_property(TEST "${test_name}" PROPERTY WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir) endif() + set_property(TEST "${test_name}" APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") if(exe_name) @@ -171,13 +190,22 @@ function(cgal_setup_test_properties test_name) APPEND PROPERTY FIXTURES_REQUIRED "${exe_name}") set_property(TEST "compilation_of__${exe_name}" PROPERTY FIXTURES_SETUP "${exe_name}") - if(ANDROID) - add_test(NAME "push_of__${exe_name}" - COMMAND ${adb_executable} push $ ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY FIXTURES_SETUP "${exe_name}") - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + if(NOT TEST push_of__${exe_name}) + if(ANDROID) + add_test(NAME "push_of__${exe_name}" + COMMAND ${adb_executable} push $ ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_SETUP "${exe_name}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + elseif(SSH) + add_test(NAME "push_of__${exe_name}" + COMMAND ${scp_executable} $ ${SSH_HOST}:${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_SETUP "${exe_name}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + endif() endif() endif() endif() # end CMake 3.7 or later @@ -209,6 +237,7 @@ function(cgal_add_test exe_name) -DCMD:STRING=$ -DCIN:STRING=${cin_file} -DANDROID_DIR_PREFIX=${ANDROID_DIR_PREFIX} + -DSSH_DIR_PREFIX=${SSH_DIR_PREFIX} -DPROJECT_NAME=${PROJECT_NAME} -P "${CGAL_MODULES_DIR}/run_test_with_cin.cmake") set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -242,6 +271,8 @@ function(cgal_add_test exe_name) # message(STATUS "add test: ${exe_name} ${ARGS}") if(ANDROID) add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${adb_executable} shell cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${ANDROID_DIR_PREFIX}${PROJECT_NAME} ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) + elseif(SSH) + add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${SSH_DIR_PREFIX}/lib ${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) else() add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} $ ${ARGS}) endif() From a144940b6d8f5f20aafdb10667bfcfd9a3c1a76a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 21 Feb 2019 12:24:17 +0100 Subject: [PATCH 004/271] Use cgal_add_test for every tests of Arrangement_on_surface_2 --- .../test/Arrangement_on_surface_2/cgal_test.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake index fc61895ed77..3a8d2f331c4 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake @@ -194,10 +194,10 @@ function(run_test_alt name datafile) endif() cgal_debug_message(STATUS "# run_test_alt(${ARGN})") cgal_debug_message(STATUS "# -> ./${name} ${datafile} ${ARGN}") - set(command ${name} ${datafile} ${ARGN}) string(MAKE_C_IDENTIFIER "${name} ${ARGV4} ${ARGV5}" test_name) - add_test(NAME ${test_name} COMMAND ${command} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + cgal_add_test(${name} + TEST_NAME ${test_name} + ARGUMENTS ${datafile} ${ARGN}) set_property(TEST "${test_name}" APPEND PROPERTY DEPENDS "compilation_of__${name}") if(POLICY CMP0066) # CMake 3.7 or later From c01eddb62aa0c486d6e0046edd3cbfdf527b465e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 21 Feb 2019 15:47:12 +0100 Subject: [PATCH 005/271] Remove unused LD_LIBRARY_PATH --- Installation/cmake/modules/CGAL_add_test.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 44d54b5133c..d8694e478e5 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -272,7 +272,7 @@ function(cgal_add_test exe_name) if(ANDROID) add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${adb_executable} shell cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${ANDROID_DIR_PREFIX}${PROJECT_NAME} ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) elseif(SSH) - add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${SSH_DIR_PREFIX}/lib ${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) + add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && ${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) else() add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} $ ${ARGS}) endif() From 1e17519384d447b18e2a635c3bab670946e4dfaa Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 21 Feb 2019 15:49:48 +0100 Subject: [PATCH 006/271] Fixes - The dependencies of push_of__ tests were not correct. - Fix the handling of tests with .cin, when ssh/scp are used. --- .../cmake/modules/CGAL_add_test.cmake | 25 +++++++++++-------- .../cmake/modules/run_test_with_cin.cmake | 9 +++++-- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index d8694e478e5..ac81fa2e2d6 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -194,19 +194,17 @@ function(cgal_setup_test_properties test_name) if(ANDROID) add_test(NAME "push_of__${exe_name}" COMMAND ${adb_executable} push $ ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY FIXTURES_SETUP "${exe_name}") - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") elseif(SSH) add_test(NAME "push_of__${exe_name}" - COMMAND ${scp_executable} $ ${SSH_HOST}:${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY FIXTURES_SETUP "${exe_name}") - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + COMMAND ${scp_executable} $ ${SSH_HOST}:${SSH_DIR_PREFIX}${PROJECT_NAME}/) endif() + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") endif() + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_SETUP "${exe_name}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") endif() endif() # end CMake 3.7 or later endfunction(cgal_setup_test_properties) @@ -232,11 +230,18 @@ function(cgal_add_test exe_name) # message("Add test ${test_name}") set(cin_file "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin") if(NOT ARGS AND EXISTS ${cin_file}) + if(ANDROID OR SSH) + set(cmd ${exe_name}) + else() + set(cmd $) + endif() add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${CMAKE_COMMAND} - -DCMD:STRING=$ + -DCMD:STRING=${cmd} -DCIN:STRING=${cin_file} -DANDROID_DIR_PREFIX=${ANDROID_DIR_PREFIX} + -DSSH=${SSH} + -DSSH_HOST=${SSH_HOST} -DSSH_DIR_PREFIX=${SSH_DIR_PREFIX} -DPROJECT_NAME=${PROJECT_NAME} -P "${CGAL_MODULES_DIR}/run_test_with_cin.cmake") diff --git a/Installation/cmake/modules/run_test_with_cin.cmake b/Installation/cmake/modules/run_test_with_cin.cmake index 1877beb096d..65615d61c51 100644 --- a/Installation/cmake/modules/run_test_with_cin.cmake +++ b/Installation/cmake/modules/run_test_with_cin.cmake @@ -1,4 +1,4 @@ -if(NOT CMD OR NOT EXISTS ${CMD}) +if(NOT CMD OR (NOT ANDROID AND NOT SSH AND NOT EXISTS ${CMD})) message(FATAL_ERROR "The variable `CMD` should be defined to the test program to run!") endif() @@ -10,7 +10,12 @@ endif() if(ANDROID) execute_process( - COMMAND adb shell "cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && ${ANDROID_DIR_PREFIX}${CMD}" + COMMAND adb shell "cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${CMD}" + INPUT_FILE ${CIN} + RESULT_VARIABLE error_result) +elseif(SSH) + execute_process( + COMMAND ssh ${SSH_HOST} "cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${SSH_DIR_PREFIX}/lib ${SSH_DIR_PREFIX}${PROJECT_NAME}/${CMD}" INPUT_FILE ${CIN} RESULT_VARIABLE error_result) else() From 2ddee24f1a8e597552dfb8a8770d0ff911ef14ae Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 21 Feb 2019 16:09:42 +0100 Subject: [PATCH 007/271] Fix the dependencies --- Installation/cmake/modules/CGAL_add_test.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index ac81fa2e2d6..df720a50497 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -200,11 +200,11 @@ function(cgal_setup_test_properties test_name) endif() set_property(TEST "push_of__${exe_name}" APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") endif() set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY FIXTURES_SETUP "${exe_name}") - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") + APPEND PROPERTY FIXTURES_SETUP "${test_name}") endif() endif() # end CMake 3.7 or later endfunction(cgal_setup_test_properties) From 13e7f7633c01a4fd935c463d71a16402cb187632 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 21 Feb 2019 16:56:34 +0100 Subject: [PATCH 008/271] Fix push__of_ in arrangement --- Installation/cmake/modules/CGAL_add_test.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index df720a50497..aa92d40169b 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -203,8 +203,8 @@ function(cgal_setup_test_properties test_name) set_property(TEST "push_of__${exe_name}" APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") endif() - set_property(TEST "push_of__${exe_name}" - APPEND PROPERTY FIXTURES_SETUP "${test_name}") + set_property(TEST "${test_name}" + APPEND PROPERTY DEPENDS "push_of__${exe_name}") endif() endif() # end CMake 3.7 or later endfunction(cgal_setup_test_properties) From 5376673151bd1b5b452fa52cc2b511af14f0c224 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 21 Feb 2019 17:00:53 +0100 Subject: [PATCH 009/271] Fix the testsuite of Arrangement_on_surface_2 --- .../Arrangement_on_surface_2/cgal_test.cmake | 14 ---------- .../cmake/modules/CGAL_add_test.cmake | 28 ++----------------- 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake index 3a8d2f331c4..4753352d565 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake @@ -198,20 +198,6 @@ function(run_test_alt name datafile) cgal_add_test(${name} TEST_NAME ${test_name} ARGUMENTS ${datafile} ${ARGN}) - set_property(TEST "${test_name}" - APPEND PROPERTY DEPENDS "compilation_of__${name}") - if(POLICY CMP0066) # CMake 3.7 or later - set_tests_properties("${test_name}" - PROPERTIES - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir - FIXTURES_REQUIRED ${PROJECT_NAME}) - endif() - cgal_debug_message(STATUS "# .. depends on compilation_of__${name}") - -# message(" successful execution of ${name} ${ARGV4} ${ARGV5}") - set_property(TEST "${test_name}" - APPEND PROPERTY LABELS "${PROJECT_NAME}") - cgal_debug_message(STATUS "add test \"${test_name}\": ${name} ${datafile} ${ARGN}") endfunction() function(run_trapped_test name datafile) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index aa92d40169b..4aef6c31b75 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -190,7 +190,7 @@ function(cgal_setup_test_properties test_name) APPEND PROPERTY FIXTURES_REQUIRED "${exe_name}") set_property(TEST "compilation_of__${exe_name}" PROPERTY FIXTURES_SETUP "${exe_name}") - if(NOT TEST push_of__${exe_name}) + if((ANDROID OR SSH) AND NOT TEST push_of__${exe_name}) if(ANDROID) add_test(NAME "push_of__${exe_name}" COMMAND ${adb_executable} push $ ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) @@ -200,11 +200,11 @@ function(cgal_setup_test_properties test_name) endif() set_property(TEST "push_of__${exe_name}" APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY FIXTURES_SETUP "${exe_name}") set_property(TEST "push_of__${exe_name}" APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") endif() - set_property(TEST "${test_name}" - APPEND PROPERTY DEPENDS "push_of__${exe_name}") endif() endif() # end CMake 3.7 or later endfunction(cgal_setup_test_properties) @@ -283,28 +283,6 @@ function(cgal_add_test exe_name) endif() endif() cgal_setup_test_properties(${test_name} ${exe_name}) - return() - - if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin") - set(ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin") - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV2}.cmd") - file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV2}.cmd" - ARGS LIMIT_COUNT 1) - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV1}.cmd") - file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV1}.cmd" - ARGS LIMIT_COUNT 1) - elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cmd") - file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cmd" - ARGS LIMIT_COUNT 1) - # TODO: handle multi-lines .cmd files - # see https://github.com/CGAL/cgal/pull/1295/files/c65d3abe17bb3e677b8077996cdaf8672f9c4c6f#r71705451 - endif() - string(REPLACE ";" " " args_str "${ARGS}") - add_test(NAME ${test_name} - COMMAND ${TIME_COMMAND} $ ${ARGS} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - set_property(TEST "${test_name}" - APPEND PROPERTY LABELS "${PROJECT_NAME}") endfunction() function(CGAL_add_compilation_tests_for_all_targets) From 42f3928de3d7e9162581638b136f5483e997a260 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 22 Feb 2019 16:00:53 +0100 Subject: [PATCH 010/271] Fix CGAL_DISABLE_GMP --- Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 9171c8a813d..776e34aac53 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -84,7 +84,9 @@ function(CGAL_setup_CGAL_dependencies target) else() set(keyword PUBLIC) endif() - if(NOT CGAL_DISABLE_GMP) + if(CGAL_DISABLE_GMP) + target_compile_definitions(${target} ${keyword} CGAL_DISABLE_GMP=1) + else() use_CGAL_GMP_support(${target} ${keyword}) set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") From a85c1f0ac4292754abb73c66e24c6a3dd80be03f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Feb 2019 15:07:31 +0100 Subject: [PATCH 011/271] update python script --- Testsuite/test/parse-ctest-dashboard-xml.py | 31 ++++++--------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index 2d3e8a9eab2..fabf7702c55 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -4,9 +4,9 @@ import xml.etree.ElementTree as ET import os import errno import re +import sys result_file_name='{dir}/results_{tester}_{platform}.txt' -result_info_file_name='{dir}/results_{tester}_{platform}.info' test_report_filename='{dir}/TestReport_{tester}_{platform}' xml = open("Test.xml", 'rb').read(); @@ -31,6 +31,8 @@ for t in testlist: tests = {} labels = set() +tester_name=sys.argv[1] +platform_name=sys.argv[2] for t in testing.findall('Test'): tests[tests_ids[t.find('FullName').text]] = \ { \ @@ -40,23 +42,6 @@ for t in testing.findall('Test'): "Labels": [l.text for l in t.find('Labels').findall('Label')] if t.find('Labels') is not None else ['UNKNOWN_LABEL'], \ } -print(""" -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -""", file=open(result_info_file_name.format(dir=os.getcwd(), - tester="me", - platform="Mon Linux"), 'w')) - tests_per_label = defaultdict(list) for t_id in range(0, len(tests)): t = tests[t_id] @@ -65,8 +50,8 @@ for t_id in range(0, len(tests)): tests_per_label[label].append(t) with open_file_create_dir(result_file_name.format(dir=os.getcwd(), - tester="me", - platform="Mon Linux"), 'w') as results: + tester=tester_name, + platform=platform_name), 'a+') as results: for label, tests in tests_per_label.items(): result_for_label='y' with open_file_create_dir("{}/error.txt".format(label), 'w') as error: @@ -86,15 +71,15 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), for label, tests in tests_per_label.items(): with open_file_create_dir(test_report_filename.format(dir=label, - tester="me", - platform="Mon Linux"), 'w') as label_report: + tester=tester_name, + platform=platform_name), 'w') as label_report: print(""" ------------------------------------------------------------------ - Error output from platform {platform} ------------------------------------------------------------------ {error_txt} -""" .format(platform="Mon Linux", +""" .format(platform=platform_name, error_txt=open("{}/error.txt".format(label), 'r').read()), file=label_report) for t in tests: filename="{}/ProgramOutput.{}".format(label, t['Name']) From 8852f65bc36abe22596b98b49f8c89a6a8abf1ba Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Feb 2019 15:11:33 +0100 Subject: [PATCH 012/271] WIP: handle the gzip compression and base64 encoding --- Testsuite/test/parse-ctest-dashboard-xml.py | 28 +++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index fabf7702c55..0f1bacff715 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -5,20 +5,27 @@ import os import errno import re import sys +import base64 +import zlib +import gzip result_file_name='{dir}/results_{tester}_{platform}.txt' -test_report_filename='{dir}/TestReport_{tester}_{platform}' +result_info_file_name='{dir}/results_{tester}_{platform}.info' +test_report_filename='{dir}/TestReport_{tester}_{platform}.gz' -xml = open("Test.xml", 'rb').read(); +xml = open("Test.xml", 'rb').read() -def open_file_create_dir(filename, mode): +def open_file_create_dir(filename, mode, *args, **kwargs): if not os.path.exists(os.path.dirname(filename)): try: os.makedirs(os.path.dirname(filename)) except OSError as exc: # Guard against race condition if exc.errno != errno.EEXIST: raise - return open(filename, mode) + if kwargs.get('gzip', None) == True: + return gzip.open(filename, mode) + else: + return open(filename, mode) root=ET.fromstring(xml) testing = root.find('Testing') @@ -34,11 +41,18 @@ labels = set() tester_name=sys.argv[1] platform_name=sys.argv[2] for t in testing.findall('Test'): + t_output = t.find('Results').find('Measurement').find('Value') + t_output_value = t_output.text + if t_output_value != None: + if 'encoding' in t_output.attrib and t_output.attrib['encoding'] == 'base64': + t_output_value = base64.standard_b64decode(t_output_value) + if 'compression' in t_output.attrib and t_output.attrib['compression'] == 'gzip': + t_output_value = zlib.decompress(t_output_value).decode("utf-8") tests[tests_ids[t.find('FullName').text]] = \ { \ "Name": t.find('Name').text, \ "Status": t.attrib['Status'], \ - "Output": t.find('Results').find('Measurement').find('Value').text, \ + "Output": t_output_value, \ "Labels": [l.text for l in t.find('Labels').findall('Label')] if t.find('Labels') is not None else ['UNKNOWN_LABEL'], \ } @@ -59,8 +73,8 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), print(" {} {}".format("successful " if (t['Status'] == 'passed') else "ERROR: ", t['Name']), file=error) if t['Status'] != 'passed': result_for_label='n' - elif t['Output'] != None and re.match(r'(^|[^a-zA-Z_,:-])warning', t['Output']): - result_for_label='y' + elif t['Output'] != None and re.search(r'(^|[^a-zA-Z_,:-])warning', t['Output'], flags=re.IGNORECASE): + result_for_label='w' with open("{}/ProgramOutput.{}".format(label, t['Name']), 'w') as f: f.write(t['Output'] if t['Output'] != None else "") From 783d4a7188e592687da1655ed71b35fa99df6560 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Feb 2019 16:04:12 +0100 Subject: [PATCH 013/271] Fix python script --- Testsuite/test/parse-ctest-dashboard-xml.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index 0f1bacff715..12eb5ecfa31 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -11,7 +11,7 @@ import gzip result_file_name='{dir}/results_{tester}_{platform}.txt' result_info_file_name='{dir}/results_{tester}_{platform}.info' -test_report_filename='{dir}/TestReport_{tester}_{platform}.gz' +test_report_filename='{dir}/TestReport_{tester}_{platform}' xml = open("Test.xml", 'rb').read() @@ -59,7 +59,8 @@ for t in testing.findall('Test'): tests_per_label = defaultdict(list) for t_id in range(0, len(tests)): t = tests[t_id] - for label in t['Labels']: + for l in t['Labels']: + label = l.replace("_Tests","") labels.add(label) tests_per_label[label].append(t) From 902070d4d112d82890fadd001737de4f18a290cd Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Feb 2019 16:32:01 +0100 Subject: [PATCH 014/271] Add a label for push__oh_ --- Installation/cmake/modules/CGAL_add_test.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 4aef6c31b75..ac4019e49ea 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -204,6 +204,8 @@ function(cgal_setup_test_properties test_name) APPEND PROPERTY FIXTURES_SETUP "${exe_name}") set_property(TEST "push_of__${exe_name}" APPEND PROPERTY FIXTURES_REQUIRED "${PROJECT_NAME}") + set_property(TEST "push_of__${exe_name}" + APPEND PROPERTY LABELS "${PROJECT_NAME}") endif() endif() endif() # end CMake 3.7 or later From b90115d3f291ea954c1e16470e2bc3607c873ccd Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 28 Feb 2019 18:18:01 +0100 Subject: [PATCH 015/271] Invalid (X)HTMLsequence In packages.html we get: `Element style is not declared in p list of possible children` as the `style` tag is only allowed in the `head` part of a file. The specific changes are only needed for this one file, so it has been implemented using the post processing facility of te CGAL documentation generation. --- Documentation/doc/Documentation/packages.txt | 9 --------- Documentation/doc/scripts/html_output_post_processing.py | 5 +++++ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Documentation/doc/Documentation/packages.txt b/Documentation/doc/Documentation/packages.txt index d1f549f4ab0..0fbb61b043a 100644 --- a/Documentation/doc/Documentation/packages.txt +++ b/Documentation/doc/Documentation/packages.txt @@ -2,15 +2,6 @@ \page packages Package Overview -\htmlonly - -\endhtmlonly - \section PartAlgebraicFoundations Arithmetic and Algebra \package_listing{Algebraic_foundations} diff --git a/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index e89c7e7b61a..8ee4d3c35a6 100755 --- a/Documentation/doc/scripts/html_output_post_processing.py +++ b/Documentation/doc/scripts/html_output_post_processing.py @@ -328,6 +328,11 @@ removes some unneeded files, and performs minor repair on some glitches.''') re_replace_in_file('\[external\]', '', os.path.join('Manual','annotated.html')) + # replace h1 tag with some special style properties + + re_replace_in_file("

", "

", + os.path.join('Manual','packages.html') ) + # fix class/concept mismatch in generated pages relationship_pages=list(package_glob('./*/hasModels.html')) relationship_pages.extend(package_glob('./*/generalizes.html')) From 2f3aeb7b9ba4fbe71cb1f24b79e46ead20b8d68e Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 28 Feb 2019 19:29:49 +0100 Subject: [PATCH 016/271] Invalid (X)HTML sequence Based on the discussion an updated implementation dropping the post processing step in favor of a `
\1Classified Reference Pages

\endhtmlonly" \ "cgalCRPSection{1}=

\1

" \ "cgalCRPSubsection{1}=

\1

" \ - "cgalCite{1}=\cite \1" + "cgalCite{1}=\cite \1" \ + "cgalPackagesSection{2}=\htmlonly[block]
\endhtmlonly \section \1 \2 ^^ \htmlonly[block]
\endhtmlonly" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" diff --git a/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index 8ee4d3c35a6..e89c7e7b61a 100755 --- a/Documentation/doc/scripts/html_output_post_processing.py +++ b/Documentation/doc/scripts/html_output_post_processing.py @@ -328,11 +328,6 @@ removes some unneeded files, and performs minor repair on some glitches.''') re_replace_in_file('\[external\]', '', os.path.join('Manual','annotated.html')) - # replace h1 tag with some special style properties - - re_replace_in_file("

", "

", - os.path.join('Manual','packages.html') ) - # fix class/concept mismatch in generated pages relationship_pages=list(package_glob('./*/hasModels.html')) relationship_pages.extend(package_glob('./*/generalizes.html')) From 17079b0d53904555cf3b45b16af37de7f9b54179 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 1 Mar 2019 15:43:58 +0100 Subject: [PATCH 017/271] Kill remote process if ssh is killed (ctrl+c or timeout) --- Installation/cmake/modules/CGAL_add_test.cmake | 3 ++- Testsuite/test/parse-ctest-dashboard-xml.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index ac4019e49ea..a86003363f9 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -279,7 +279,8 @@ function(cgal_add_test exe_name) if(ANDROID) add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${adb_executable} shell cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${ANDROID_DIR_PREFIX}${PROJECT_NAME} ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) elseif(SSH) - add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && ${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) + STRING(REPLACE ";" " " arg_str "${ARGS}") + add_test(NAME ${test_name} COMMAND bash -c "${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} \"cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && ${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${arg_str} 3< <(cat; kill -INT 0)\" <&1") else() add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} $ ${ARGS}) endif() diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index 12eb5ecfa31..5e4354345de 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -2,6 +2,7 @@ from __future__ import print_function from collections import defaultdict import xml.etree.ElementTree as ET import os +import io import errno import re import sys @@ -77,7 +78,8 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), elif t['Output'] != None and re.search(r'(^|[^a-zA-Z_,:-])warning', t['Output'], flags=re.IGNORECASE): result_for_label='w' - with open("{}/ProgramOutput.{}".format(label, t['Name']), 'w') as f: + with io.open("{}/ProgramOutput.{}".format(label, t['Name']), mode="w", encoding="utf-8") as f: + print("{}/ProgramOutput.{}".format(label, t['Name'])) f.write(t['Output'] if t['Output'] != None else "") From f058854904efd056a6afd1bb24ade14369712c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 4 Mar 2019 08:53:08 +0100 Subject: [PATCH 018/271] rename macro + apply to all version config files --- Documentation/doc/Documentation/packages.txt | 34 +++++++++---------- .../doc/resources/1.8.13/BaseDoxyfile.in | 3 +- .../doc/resources/1.8.14/BaseDoxyfile.in | 2 +- .../doc/resources/1.8.4/BaseDoxyfile.in | 2 ++ 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Documentation/doc/Documentation/packages.txt b/Documentation/doc/Documentation/packages.txt index df1794addd8..e2e220acf10 100644 --- a/Documentation/doc/Documentation/packages.txt +++ b/Documentation/doc/Documentation/packages.txt @@ -2,7 +2,7 @@ \page packages Package Overview -\cgalPackagesSection{PartAlgebraicFoundations,Arithmetic and Algebra} +\cgalPackageSection{PartAlgebraicFoundations,Arithmetic and Algebra} \package_listing{Algebraic_foundations} \package_listing{Number_types} @@ -10,25 +10,25 @@ \package_listing{Polynomial} \package_listing{Algebraic_kernel_d} -\cgalPackagesSection{PartCombinatorialAlgorithms,Combinatorial Algorithms} +\cgalPackageSection{PartCombinatorialAlgorithms,Combinatorial Algorithms} \package_listing{Matrix_search} \package_listing{QP_solver} -\cgalPackagesSection{PartKernels,Geometry Kernels} +\cgalPackageSection{PartKernels,Geometry Kernels} \package_listing{Kernel_23} \package_listing{Kernel_d} \package_listing{Circular_kernel_2} \package_listing{Circular_kernel_3} -\cgalPackagesSection{PartConvexHullAlgorithms,Convex Hull Algorithms} +\cgalPackageSection{PartConvexHullAlgorithms,Convex Hull Algorithms} \package_listing{Convex_hull_2} \package_listing{Convex_hull_3} \package_listing{Convex_hull_d} -\cgalPackagesSection{PartPolygons,Polygons} +\cgalPackageSection{PartPolygons,Polygons} \package_listing{Polygon} \package_listing{Boolean_set_operations_2} @@ -42,7 +42,7 @@ \package_listing{Set_movable_separability_2} -\cgalPackagesSection{PartPolyhedra,Cell Complexes and Polyhedra} +\cgalPackageSection{PartPolyhedra,Cell Complexes and Polyhedra} \package_listing{Polyhedron} \package_listing{HalfedgeDS} @@ -55,7 +55,7 @@ \package_listing{Minkowski_sum_3} -\cgalPackagesSection{PartArrangements,Arrangements} +\cgalPackageSection{PartArrangements,Arrangements} \package_listing{Arrangement_on_surface_2} \package_listing{Surface_sweep_2} @@ -63,7 +63,7 @@ \package_listing{Envelope_2} \package_listing{Envelope_3} -\cgalPackagesSection{PartTriangulationsAndDelaunayTriangulations,Triangulations and Delaunay Triangulations} +\cgalPackageSection{PartTriangulationsAndDelaunayTriangulations,Triangulations and Delaunay Triangulations} \package_listing{Triangulation_2} \package_listing{TDS_2} @@ -77,14 +77,14 @@ \package_listing{Alpha_shapes_2} \package_listing{Alpha_shapes_3} -\cgalPackagesSection{PartVoronoiDiagrams,Voronoi Diagrams} +\cgalPackageSection{PartVoronoiDiagrams,Voronoi Diagrams} \package_listing{Segment_Delaunay_graph_2} \package_listing{Segment_Delaunay_graph_Linf_2} \package_listing{Apollonius_graph_2} \package_listing{Voronoi_diagram_2} -\cgalPackagesSection{PartMeshing,Mesh Generation} +\cgalPackageSection{PartMeshing,Mesh Generation} \package_listing{Mesh_2} \package_listing{Surface_mesher} @@ -92,14 +92,14 @@ \package_listing{Mesh_3} \package_listing{Periodic_3_mesh_3} -\cgalPackagesSection{PartReconstruction,Shape Reconstruction} +\cgalPackageSection{PartReconstruction,Shape Reconstruction} \package_listing{Poisson_surface_reconstruction_3} \package_listing{Scale_space_reconstruction_3} \package_listing{Advancing_front_surface_reconstruction} \package_listing{Optimal_transportation_reconstruction_2} -\cgalPackagesSection{PartGeometryProcessing,Geometry Processing} +\cgalPackageSection{PartGeometryProcessing,Geometry Processing} \package_listing{Polygon_mesh_processing} \package_listing{Subdivision_method_3} @@ -119,7 +119,7 @@ \package_listing{Classification} \package_listing{Heat_method_3} -\cgalPackagesSection{PartSearchStructures,Spatial Searching and Sorting} +\cgalPackageSection{PartSearchStructures,Spatial Searching and Sorting} \package_listing{Point_set_2} \package_listing{Interval_skip_list} @@ -129,19 +129,19 @@ \package_listing{AABB_tree} \package_listing{Spatial_sorting} -\cgalPackagesSection{PartGeometricOptimization,Geometric Optimization} +\cgalPackageSection{PartGeometricOptimization,Geometric Optimization} \package_listing{Bounding_volumes} \package_listing{Inscribed_areas} \package_listing{Polytope_distance_d} \package_listing{Principal_component_analysis} -\cgalPackagesSection{PartInterpolation,Interpolation} +\cgalPackageSection{PartInterpolation,Interpolation} \package_listing{Interpolation} \package_listing{Barycentric_coordinates_2} -\cgalPackagesSection{PartSupportLibrary,Support Library} +\cgalPackageSection{PartSupportLibrary,Support Library} \package_listing{STL_Extension} \package_listing{BGL} @@ -153,7 +153,7 @@ \package_listing{Miscellany} \package_listing{Stream_support} -\cgalPackagesSection{PartVisualization,Visualization} +\cgalPackageSection{PartVisualization,Visualization} \package_listing{Geomview} \package_listing{GraphicsView} diff --git a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in index 1f83c704b62..962c285d937 100644 --- a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in @@ -293,7 +293,8 @@ ALIASES = "sc{1}=\1Classified Reference Pages

\endhtmlonly" \ "cgalCRPSection{1}=

\1

" \ "cgalCRPSubsection{1}=

\1

" \ - "cgalCite{1}=\cite \1" + "cgalCite{1}=\cite \1" \ + "cgalPackageSection{2}=\htmlonly[block]
\endhtmlonly \section \1 \2 \n \htmlonly[block]
\endhtmlonly" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" diff --git a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in index d0c143fbf79..5986de6eec5 100644 --- a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in @@ -295,7 +295,7 @@ ALIASES = "sc{1}=\1\1" \ "cgalCRPSubsection{1}=

\1

" \ "cgalCite{1}=\cite \1" \ - "cgalPackagesSection{2}=\htmlonly[block]
\endhtmlonly \section \1 \2 ^^ \htmlonly[block]
\endhtmlonly" + "cgalPackageSection{2}=\htmlonly[block]
\endhtmlonly \section \1 \2 ^^ \htmlonly[block]
\endhtmlonly" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" diff --git a/Documentation/doc/resources/1.8.4/BaseDoxyfile.in b/Documentation/doc/resources/1.8.4/BaseDoxyfile.in index 374652e092c..048171a2781 100644 --- a/Documentation/doc/resources/1.8.4/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.4/BaseDoxyfile.in @@ -298,6 +298,8 @@ ALIASES+= "cgalCRPSubsection{1}=

\1

" ALIASES+= "cgalCite{1}=\cite \1" +ALIASES+= "cgalPackageSection{2}=\htmlonly
\endhtmlonly \section \1 \2 \n \htmlonly
\endhtmlonly" + # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the From c41b73fd2a234f302d8eb9f89812dc680543254f Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 4 Mar 2019 09:26:34 +0100 Subject: [PATCH 019/271] Fix bbox precision and add assertion test --- .../include/CGAL/Classification/classify.h | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Classification/include/CGAL/Classification/classify.h b/Classification/include/CGAL/Classification/classify.h index 2f08bbad185..ea1491288e1 100644 --- a/Classification/include/CGAL/Classification/classify.h +++ b/Classification/include/CGAL/Classification/classify.h @@ -480,11 +480,11 @@ namespace internal { (boost::make_transform_iterator (input.begin(), CGAL::Property_map_to_unary_function(item_map)), boost::make_transform_iterator (input.end(), CGAL::Property_map_to_unary_function(item_map))); - float Dx = float(bbox.xmax() - bbox.xmin()); - float Dy = float(bbox.ymax() - bbox.ymin()); - float A = Dx * Dy; - float a = A / min_number_of_subdivisions; - float l = std::sqrt(a); + double Dx = double(bbox.xmax() - bbox.xmin()); + double Dy = double(bbox.ymax() - bbox.ymin()); + double A = Dx * Dy; + double a = A / min_number_of_subdivisions; + double l = std::sqrt(a); std::size_t nb_x = std::size_t(Dx / l) + 1; std::size_t nb_y = std::size_t((A / nb_x) / a) + 1; std::size_t nb = nb_x * nb_y; @@ -495,11 +495,11 @@ namespace internal { for (std::size_t y = 0; y < nb_y; ++ y) { bboxes.push_back - (CGAL::Bbox_3 (bbox.xmin() + Dx * (x / float(nb_x)), - bbox.ymin() + Dy * (y / float(nb_y)), + (CGAL::Bbox_3 (bbox.xmin() + Dx * (x / double(nb_x)), + bbox.ymin() + Dy * (y / double(nb_y)), bbox.zmin(), - bbox.xmin() + Dx * ((x+1) / float(nb_x)), - bbox.ymin() + Dy * ((y+1) / float(nb_y)), + bbox.xmin() + Dx * ((x+1) / double(nb_x)), + bbox.ymin() + Dy * ((y+1) / double(nb_y)), bbox.zmax())); } @@ -514,14 +514,16 @@ namespace internal { for (std::size_t s = 0; s < input.size(); ++ s) { CGAL::Bbox_3 b = get(item_map, *(input.begin() + s)).bbox(); - - for (std::size_t i = 0; i < bboxes.size(); ++ i) + + std::size_t i = 0; + for (; i < bboxes.size(); ++ i) if (CGAL::do_overlap (b, bboxes[i])) { input_to_indices[s] = std::make_pair (i, indices[i].size()); indices[i].push_back (s); break; } + CGAL_assertion_msg (i != bboxes.size(), "Point was not assigned to any subdivision."); } internal::Classify_functor_graphcut From b0f16ee41d5a8cdfee8d08847292b14656bd3f8a Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 4 Mar 2019 10:17:52 +0100 Subject: [PATCH 020/271] Handle border case where xmax and ymax exact values should be used --- Classification/include/CGAL/Classification/classify.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classification/include/CGAL/Classification/classify.h b/Classification/include/CGAL/Classification/classify.h index ea1491288e1..d6bb4329fc8 100644 --- a/Classification/include/CGAL/Classification/classify.h +++ b/Classification/include/CGAL/Classification/classify.h @@ -498,8 +498,8 @@ namespace internal { (CGAL::Bbox_3 (bbox.xmin() + Dx * (x / double(nb_x)), bbox.ymin() + Dy * (y / double(nb_y)), bbox.zmin(), - bbox.xmin() + Dx * ((x+1) / double(nb_x)), - bbox.ymin() + Dy * ((y+1) / double(nb_y)), + (x == nb_x - 1 ? bbox.xmax() : bbox.xmin() + Dx * ((x+1) / double(nb_x))), + (y == nb_y - 1 ? bbox.ymax() : bbox.ymin() + Dy * ((y+1) / double(nb_y))), bbox.zmax())); } From 6f836b5827601f6ee27293d105b4c834668aa9d0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 4 Mar 2019 11:03:44 +0100 Subject: [PATCH 021/271] T2,T3,Mesh_2: backticks, lowercase, capitalize --- Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h | 8 ++++---- .../Concepts/ConstrainedTriangulationFaceBase_2.h | 2 +- .../Concepts/TriangulationVertexBaseWithInfo_2.h | 4 ++-- .../Concepts/RegularTriangulationCellBase_3.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h b/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h index 4eea047e120..7522cdad541 100644 --- a/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h +++ b/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h @@ -32,7 +32,7 @@ typedef std::pair Edge; /// @{ /*! -returns true if this face is in the domain to be refined. +returns `true` if this face is in the domain to be refined. */ bool is_in_domain() const; /*! @@ -42,7 +42,7 @@ void set_in_domain(const bool b); /*! -return true if this face has its circumcenter hidden +returns `true` if this face has its circumcenter hidden by a constrained edge. It does not "see" it, following the Constrained Delaunay triangulation visibility criterion. */ @@ -56,13 +56,13 @@ void set_blind(const bool b); If this face is blind, this function returns the first constrained edge that prevents it from "seeing" its circumcenter. -\pre is_blind() returns true +\pre is_blind() returns `true` */ Edge blinding_constraint() const; /*! sets the edge that makes this face blind. -\pre is_blind() returns true +\pre is_blind() returns `true` \pre e is a constrained edge */ void set_blinding_constraint(const Egde& e); diff --git a/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationFaceBase_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationFaceBase_2.h index bb4dbff8886..91a8c4d76a3 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationFaceBase_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/ConstrainedTriangulationFaceBase_2.h @@ -34,7 +34,7 @@ public: /// @{ /*! -returns true if the edge between the face and its neighbor +returns `true` if the edge between the face and its neighbor `neighbor(i)` is constrained. \pre \f$ 0\leq i \leq2\f$. */ diff --git a/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationVertexBaseWithInfo_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationVertexBaseWithInfo_2.h index 26b4e3976b4..350076d5bc5 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationVertexBaseWithInfo_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/TriangulationVertexBaseWithInfo_2.h @@ -29,13 +29,13 @@ typedef unspecified_type Info; /// @{ /*! -Returns a const reference to the object of type `Info` stored in the +returns a const reference to the object of type `Info` stored in the vertex. */ const Info& info() const; /*! -Returns a reference to the object of type `Info` stored in the vertex. +returns a reference to the object of type `Info` stored in the vertex. */ Info& info(); diff --git a/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationCellBase_3.h b/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationCellBase_3.h index 2826558a689..96ffaec568a 100644 --- a/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationCellBase_3.h +++ b/Triangulation_3/doc/Triangulation_3/Concepts/RegularTriangulationCellBase_3.h @@ -54,7 +54,7 @@ defined by the geometric traits class of the triangulation. typedef unspecified_type Point; /*! -Iterator of value type Point +Iterator of value type `Point` */ typedef unspecified_type Point_iterator; @@ -86,7 +86,7 @@ void hide_point(const Point & p); /// @} -/// \name Access functions +/// \name Access Functions /// @{ /*! Returns the weighted circumcenter of the cell, with no weight. From e08d85f3e38cba6c8d296ed9928f36c10994ba29 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 4 Mar 2019 15:50:18 +0100 Subject: [PATCH 022/271] Set precision of the ostream when writing a point set or face graph. Add a \note in the manual --- BGL/examples/BGL_surface_mesh/surface_mesh_partition.cpp | 2 ++ Point_set_3/examples/Point_set_3/point_set_read_ply.cpp | 1 + Point_set_3/examples/Point_set_3/point_set_read_xyz.cpp | 1 + .../bilateral_smooth_point_set_example.cpp | 3 ++- .../edge_aware_upsample_point_set_example.cpp | 2 +- .../hierarchy_simplification_example.cpp | 1 + .../examples/Point_set_processing_3/normal_estimation.cpp | 1 + .../Point_set_processing_3/random_simplification_example.cpp | 1 + .../read_write_xyz_point_set_example.cpp | 1 + .../examples/Point_set_processing_3/structuring_example.cpp | 1 + .../wlop_simplify_and_regularize_point_set_example.cpp | 1 + .../Point_set_processing_3/write_ply_points_example.cpp | 2 +- Point_set_processing_3/include/CGAL/IO/write_off_points.h | 5 ++++- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 3 +++ .../edge_collapse_all_short_edges.cpp | 4 +++- .../edge_collapse_bounded_normal_change.cpp | 4 +++- .../edge_collapse_constrained_border_polyhedron.cpp | 4 +++- .../edge_collapse_constrained_border_surface_mesh.cpp | 4 +++- .../edge_collapse_enriched_polyhedron.cpp | 4 +++- .../Surface_mesh_simplification/edge_collapse_polyhedron.cpp | 4 +++- .../edge_collapse_surface_mesh.cpp | 4 +++- 21 files changed, 42 insertions(+), 11 deletions(-) diff --git a/BGL/examples/BGL_surface_mesh/surface_mesh_partition.cpp b/BGL/examples/BGL_surface_mesh/surface_mesh_partition.cpp index 314d95a7944..a1771262a5d 100644 --- a/BGL/examples/BGL_surface_mesh/surface_mesh_partition.cpp +++ b/BGL/examples/BGL_surface_mesh/surface_mesh_partition.cpp @@ -44,10 +44,12 @@ int main(int argc, char** argv) // Output the mesh extracted from subpart n°0 std::ofstream out("sm_part_0.off"); + out.precision(17); CGAL::write_off(out, part_sm); // Output all the vertices that are in the part n°0 std::ofstream outxyz("out.xyz"); + outxyz.precision(17); boost::graph_traits::vertex_iterator vit, ve; boost::tie(vit, ve) = vertices(sm); for(; vit!=ve; ++vit) diff --git a/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp b/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp index 6ad2e807250..b115781847f 100644 --- a/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_read_ply.cpp @@ -42,6 +42,7 @@ int main (int argc, char** argv) } std::ofstream out ("out.ply"); + out.precision(17); CGAL::write_ply_point_set (out, point_set); return 0; diff --git a/Point_set_3/examples/Point_set_3/point_set_read_xyz.cpp b/Point_set_3/examples/Point_set_3/point_set_read_xyz.cpp index d206bfc88c9..1569971f152 100644 --- a/Point_set_3/examples/Point_set_3/point_set_read_xyz.cpp +++ b/Point_set_3/examples/Point_set_3/point_set_read_xyz.cpp @@ -38,6 +38,7 @@ int main (int argc, char** argv) // Writing result in OFF format std::ofstream out("normalized_normals.off"); + out.precision(17); if (!out || !CGAL::write_off_point_set (out, point_set)) { return EXIT_FAILURE; diff --git a/Point_set_processing_3/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp index d9603d57c72..956f89cfe80 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/bilateral_smooth_point_set_example.cpp @@ -61,7 +61,8 @@ int main(int argc, char*argv[]) } //// Save point set. - std::ofstream out(output_filename); + std::ofstream out(output_filename); + out.precision(17); if (!out || !CGAL::write_xyz_points( out, points, diff --git a/Point_set_processing_3/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp index 31b20db9626..7ca76b9a055 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/edge_aware_upsample_point_set_example.cpp @@ -61,7 +61,7 @@ int main(int argc, char* argv[]) // Saves point set. std::ofstream out(output_filename); - + out.precision(17); if (!out || !CGAL::write_xyz_points( out, points, diff --git a/Point_set_processing_3/examples/Point_set_processing_3/hierarchy_simplification_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/hierarchy_simplification_example.cpp index c4f4275e85d..126661a8c95 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/hierarchy_simplification_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/hierarchy_simplification_example.cpp @@ -41,6 +41,7 @@ int main(int argc, char*argv[]) << (memory>>20) << " Mib allocated." << std::endl; std::ofstream f ("out.xyz"); + f.precision(17); CGAL::write_xyz_points (f, points); return EXIT_SUCCESS; diff --git a/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp b/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp index a830553df81..befba2133f5 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/normal_estimation.cpp @@ -324,6 +324,7 @@ int main(int argc, char * argv[]) extension == ".pwn" || extension == ".PWN") { std::ofstream stream(output_filename.c_str()); + stream.precision(17); if (!stream || !CGAL::write_xyz_points(stream, points, diff --git a/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp index 80d633e862c..4b516fd454a 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/random_simplification_example.cpp @@ -34,6 +34,7 @@ int main(int argc, char*argv[]) // Saves point set. std::ofstream out((argc>2)?argv[2]:"Three_lady_copy.xyz"); + out.precision(17); if (!out || !CGAL::write_xyz_points( out, points)) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp index e3c63296134..834a6a4608e 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/read_write_xyz_point_set_example.cpp @@ -39,6 +39,7 @@ int main(int argc, char*argv[]) // Note: write_xyz_points() requires property maps to access each // point position and normal. std::ofstream out("oni_copy.xyz"); + out.precision(17); if (!out || !CGAL::write_xyz_points( out, points, diff --git a/Point_set_processing_3/examples/Point_set_processing_3/structuring_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/structuring_example.cpp index d85224980d3..ff5c6805a57 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/structuring_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/structuring_example.cpp @@ -68,6 +68,7 @@ int main (int argc, char** argv) << " structured point(s) generated." << std::endl; std::ofstream out ("out.pwn"); + out.precision(17); CGAL::write_xyz_points (out, structured_pts, CGAL::parameters::point_map(Point_map()).normal_map(Normal_map())); out.close(); diff --git a/Point_set_processing_3/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp index ffd6de43b8f..e8485c3e5f8 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/wlop_simplify_and_regularize_point_set_example.cpp @@ -46,6 +46,7 @@ int main(int argc, char** argv) neighbor_radius (neighbor_radius)); std::ofstream out(output_filename); + out.precision(17); if (!out || !CGAL::write_xyz_points( out, output)) { diff --git a/Point_set_processing_3/examples/Point_set_processing_3/write_ply_points_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/write_ply_points_example.cpp index da5d0ba26d0..5dbe3d719ec 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/write_ply_points_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/write_ply_points_example.cpp @@ -51,7 +51,7 @@ int main(int, char**) (unsigned char)(64 / (i + 1))), i)); - std::ofstream f("out.ply"); + std::ofstream f("out.ply", std::ios::binary); CGAL::set_binary_mode(f); // The PLY file will be written in the binary format CGAL::write_ply_points_with_properties diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index d7bf4c8d6f5..a945db1c004 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -41,6 +41,9 @@ namespace CGAL { The function writes for each point a line with the x y z position followed by the nx ny nz normal (if available). + \note The `precision()` + of the output stream might not be sufficient depending on the data to be written. + \tparam PointRange is a model of `ConstRange`. The value type of its iterator is the key type of the named parameter `point_map`. @@ -57,7 +60,7 @@ namespace CGAL { \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd \cgalNamedParamsEnd - \return true on success. + \return `true` on success. */ template `precision()` + /// of the output stream might not be sufficient depending on the data to be written. + template bool write_off(std::ostream& os, const Surface_mesh

& sm, const NamedParameters& np) { typedef Surface_mesh

Mesh; diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_all_short_edges.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_all_short_edges.cpp index c23de320bb5..7f51f4db768 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_all_short_edges.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_all_short_edges.cpp @@ -48,7 +48,9 @@ int main( int argc, char** argv ) std::cout << "\nFinished...\n" << r << " edges removed.\n" << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ; - std::ofstream os( argc > 3 ? argv[3] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 3 ? argv[3] : "out.off" ) ; + os.precision(17); + os << surface_mesh ; return EXIT_SUCCESS ; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp index f46b2bfb847..fada9dd5bf7 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp @@ -44,7 +44,9 @@ typedef SMS::Bounded_normal_change_placement 2 ? argv[2] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + os.precision(17); + os << surface_mesh ; return 0 ; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp index 7260add1524..c8de61eb2c0 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp @@ -107,7 +107,9 @@ int main( int argc, char** argv ) std::cout << "\nFinished...\n" << r << " edges removed.\n" << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + os.precision(17) ; + os << surface_mesh ; // now check! for (Surface_mesh::Halfedge_iterator hit=surface_mesh.halfedges_begin(), diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp index 6b69d52a847..47e509fcf73 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp @@ -102,7 +102,9 @@ int main( int argc, char** argv ) std::cout << "\nFinished...\n" << r << " edges removed.\n" << surface_mesh.number_of_edges() << " final edges.\n" ; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + os.precision(17); + os << surface_mesh ; // now check! BOOST_FOREACH(halfedge_descriptor hd, halfedges(surface_mesh)){ diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp index 32e30c3f9f3..2701d40f16e 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp @@ -180,7 +180,9 @@ int main( int argc, char** argv ) std::cout << "\nFinished...\n" << r << " edges removed.\n" << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + os.precision(17) ; + os << surface_mesh ; return EXIT_SUCCESS ; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp index d01b4d56dac..0b71dc88768 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp @@ -49,7 +49,9 @@ int main( int argc, char** argv ) std::cout << "\nFinished...\n" << r << " edges removed.\n" << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + os.precision(17) ; + os << surface_mesh ; return EXIT_SUCCESS ; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp index 48b7af1e0af..2cb9a496c9a 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp @@ -153,7 +153,9 @@ int main( int argc, char** argv ) std::cout << "\nFinished...\n" << r << " edges removed.\n" << surface_mesh.number_of_edges() << " final edges.\n"; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + os.precision(17) ; + os << surface_mesh ; return EXIT_SUCCESS ; } From bd8b39d1628fdc4d01345de92b721228c2bb749f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 4 Mar 2019 17:21:51 +0100 Subject: [PATCH 023/271] Add stats to the selection_item --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 13 +- .../Scene_polyhedron_selection_item.cpp | 297 +++++++++++++++++- .../Scene_polyhedron_selection_item.h | 38 +++ .../Polyhedron/Scene_surface_mesh_item.cpp | 2 + .../include/CGAL/statistics_helpers.h | 95 +++++- 5 files changed, 428 insertions(+), 17 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index ee2414849d6..358d6a1ac93 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -2435,7 +2435,10 @@ QString MainWindow::get_item_stats() QList classnames; Q_FOREACH(int id, scene->selectionIndices()) { - QString classname = scene->item(id)->metaObject()->className(); + Scene_item* item = scene->item(id); + QString classname = item->property("classname").toString(); + if(classname.isEmpty()) + classname = item->metaObject()->className(); if(!classnames.contains(classname)) classnames << classname; } @@ -2446,11 +2449,17 @@ QString MainWindow::get_item_stats() { Scene_item* s_item = scene->item(id); for(int i=0; imetaObject()->className())) + { + Scene_item* item = scene->item(id); + QString classname = item->property("classname").toString(); + if(classname.isEmpty()) + classname = item->metaObject()->className(); + if(classnames.at(i).contains(classname)) { items[i] << s_item; break; } + } } //last step :: making tables for each type of item QString str; diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 0216c02db64..b0b4de4f500 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -21,6 +22,9 @@ #include #include "triangulate_primitive.h" +#include +#include +#include typedef Scene_surface_mesh_item Scene_face_graph_item; @@ -50,7 +54,8 @@ struct Scene_polyhedron_selection_item_priv{ Scene_polyhedron_selection_item_priv(Scene_polyhedron_selection_item* parent): item(parent) { - + filtered_graph = nullptr; + item->setProperty("classname", QString("surface_mesh")); } void initializeBuffers(CGAL::Three::Viewer_interface *viewer) const; @@ -162,6 +167,7 @@ struct Scene_polyhedron_selection_item_priv{ mutable QOpenGLShaderProgram *program; mutable bool are_HL_buffers_filled; Scene_polyhedron_selection_item* item; + CGAL::Face_filtered_graph *filtered_graph; }; @@ -1970,6 +1976,11 @@ void Scene_polyhedron_selection_item::invalidateOpenGLBuffers() { d->are_temp_buffers_filled = false; d->poly = polyhedron(); compute_bbox(); + if(d->filtered_graph) + { + delete d->filtered_graph; + d->filtered_graph = nullptr; + } } void Scene_polyhedron_selection_item::add_to_selection() @@ -2317,3 +2328,287 @@ Scene_polyhedron_selection_item::toolTip() const .arg(this->renderingModeName()) .arg(this->color().name()); } + +QString Scene_polyhedron_selection_item::computeStats(int type) +{ + if(!d->filtered_graph) + { + d->filtered_graph = new CGAL::Face_filtered_graph(*d->poly, selected_facets); + } + double minl, maxl, meanl, midl; + unsigned int number_of_null_length_edges; + switch (type) + { + case MIN_LENGTH: + case MAX_LENGTH: + case MID_LENGTH: + case MEAN_LENGTH: + case NB_NULL_LENGTH: + if(selected_edges.size() == 0) + return QString("n/a"); + else + edges_length(d->poly, selected_edges, minl, maxl, meanl, midl, number_of_null_length_edges); + } + + double mini, maxi, ave; + switch (type) + { + case MIN_ANGLE: + case MAX_ANGLE: + case MEAN_ANGLE: + if(selected_facets.size() == 0) + return QString("n/a"); + else + angles(d->poly, selected_facets, mini, maxi, ave); + } + double min_area, max_area, med_area, mean_area; + switch (type) + { + case MIN_AREA: + case MAX_AREA: + case MEAN_AREA: + case MED_AREA: + if(selected_facets.size() == 0) + return QString("n/a"); + else{ + if(!is_triangle_mesh(*d->poly)) + { + return QString("n/a"); + } + faces_area(d->poly, selected_facets, min_area, max_area, mean_area, med_area); + } + } + double min_altitude, min_ar, max_ar, mean_ar; + switch (type) + { + case MIN_ALTITUDE: + case MIN_ASPECT_RATIO: + case MAX_ASPECT_RATIO: + case MEAN_ASPECT_RATIO: + if(selected_facets.size() == 0) + return QString("n/a"); + else + { + if(!is_triangle_mesh(*d->poly)) + { + return QString("n/a"); + } + faces_aspect_ratio(d->poly, selected_facets,min_altitude, min_ar, max_ar, mean_ar); + } + } + + switch(type) + { + case NB_VERTICES: + { + std::set total_vertices; + for(auto v : selected_vertices) + { + total_vertices.insert(v); + } + for(auto e : selected_edges) + { + total_vertices.insert(target(e, *d->poly)); + total_vertices.insert(source(e, *d->poly)); + } + for(auto f : selected_facets) + { + for (auto v : CGAL::vertices_around_face(halfedge(f, *d->poly), *d->poly)) + { + total_vertices.insert(v); + } + } + return QString::number(total_vertices.size()); + } + case NB_FACETS: + return QString::number(selected_facets.size()); + + case NB_CONNECTED_COMPOS: + { + // Extract the part n°0 of the partition into a new, independent mesh + if(selected_facets.size() == 0) + return QString("n/a"); + boost::vector_property_map::type> + fccmap(get(boost::face_index, *d->filtered_graph)); + + return QString::number(CGAL::Polygon_mesh_processing::connected_components(*d->filtered_graph, fccmap)); + } + + case NB_BORDER_EDGES: + { + int i=0; + BOOST_FOREACH(halfedge_descriptor hd, halfedges(*d->poly)) + { + if(is_border(hd, *d->poly) + && selected_edges.find(edge(hd, *d->poly)) != selected_edges.end()) + ++i; + } + return QString::number(i); + } + + case NB_EDGES:{ + std::set total_edges; + for(auto e : selected_edges) + { + total_edges.insert(e); + } + for(auto f : selected_facets) + { + for (auto e : CGAL::edges_around_face(halfedge(f, *d->poly), *d->poly)) + { + total_edges.insert(e); + } + } + return QString::number(total_edges.size()); + } + + case VOLUME: + return QString("n/a"); + break; + + case GENUS: + return QString("n/a"); + break; + case NB_DEGENERATED_FACES: + { + if(is_triangle_mesh(*d->poly)) + { + if(selected_facets.size() == 0) + return QString("n/a"); + return QString::number(nb_degenerate_faces(d->filtered_graph)); + } + else + return QString("n/a"); + } + case AREA: + { + if(is_triangle_mesh(*d->poly)) + { + if(selected_facets.size() == 0) + return QString("n/a"); + return QString::number(CGAL::Polygon_mesh_processing::area(*d->filtered_graph)); + } + else + return QString("n/a"); + } + + case SELFINTER: + { + if(selected_facets.size() == 0) + return QString("n/a"); + if(is_triangle_mesh(*d->poly)){ + bool self_intersect + = CGAL::Polygon_mesh_processing::does_self_intersect(*(d->poly)); + if (self_intersect) + return QString("Yes"); + else + return QString("No"); + } + return QString("n/a"); + } + case MIN_LENGTH: + return QString::number(minl); + case MAX_LENGTH: + return QString::number(maxl); + case MID_LENGTH: + return QString::number(midl); + case MEAN_LENGTH: + return QString::number(meanl); + case NB_NULL_LENGTH: + return QString::number(number_of_null_length_edges); + + case MIN_ANGLE: + return QString::number(mini); + case MAX_ANGLE: + return QString::number(maxi); + case MEAN_ANGLE: + return QString::number(ave); + case HOLES: + { + return QString("n/a"); + } + + case MIN_AREA: + return QString::number(min_area); + case MAX_AREA: + return QString::number(max_area); + case MED_AREA: + return QString::number(med_area); + case MEAN_AREA: + return QString::number(mean_area); + case MIN_ALTITUDE: + return QString::number(min_altitude); + case MIN_ASPECT_RATIO: + return QString::number(min_ar); + case MAX_ASPECT_RATIO: + return QString::number(max_ar); + case MEAN_ASPECT_RATIO: + return QString::number(mean_ar); + case IS_PURE_TRIANGLE: + if(selected_facets.size() == 0) + return QString("n/a"); + else + { + if(is_triangle_mesh(*d->poly)) + return QString("yes"); + else + return QString("no"); + } + case IS_PURE_QUAD: + { + if(selected_facets.size() == 0) + return QString("n/a"); + if (is_quad_mesh(*d->filtered_graph)) + return QString("yes"); + else + return QString("no"); + } + + }//end switch + return QString(); +} + +CGAL::Three::Scene_item::Header_data Scene_polyhedron_selection_item::header() const +{ + CGAL::Three::Scene_item::Header_data data; + //categories + + data.categories.append(std::pair(QString("Properties"),10)); + data.categories.append(std::pair(QString("Faces"),10)); + data.categories.append(std::pair(QString("Edges"),7)); + data.categories.append(std::pair(QString("Angles"),2)); + + + //titles + data.titles.append(QString("#Vertices")); + data.titles.append(QString("#Connected Components")); + data.titles.append(QString("#Border Edges")); + data.titles.append(QString("Pure Triangle")); + data.titles.append(QString("Pure Quad")); + data.titles.append(QString("#Degenerate Faces")); + data.titles.append(QString("Connected Components of the Boundary")); + data.titles.append(QString("Area")); + data.titles.append(QString("Volume")); + data.titles.append(QString("Self-Intersecting")); + data.titles.append(QString("#Faces")); + data.titles.append(QString("Min Area")); + data.titles.append(QString("Max Area")); + data.titles.append(QString("Median Area")); + data.titles.append(QString("Mean Area")); + data.titles.append(QString("Min Altitude")); + data.titles.append(QString("Min Aspect-Ratio")); + data.titles.append(QString("Max Aspect-Ratio")); + data.titles.append(QString("Mean Aspect-Ratio")); + data.titles.append(QString("Genus")); + data.titles.append(QString("#Edges")); + data.titles.append(QString("Minimum Length")); + data.titles.append(QString("Maximum Length")); + data.titles.append(QString("Median Length")); + data.titles.append(QString("Mean Length")); + data.titles.append(QString("#Degenerate Edges")); + data.titles.append(QString("Minimum")); + data.titles.append(QString("Maximum")); + data.titles.append(QString("Average")); + return data; +} diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index bafac0bc5d1..e42a92ae669 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -996,6 +996,44 @@ public: protected : friend struct Scene_polyhedron_selection_item_priv; Scene_polyhedron_selection_item_priv *d; + +public: + //statistics + enum STATS { + NB_VERTICES = 0, + NB_CONNECTED_COMPOS, + NB_BORDER_EDGES, + IS_PURE_TRIANGLE, + IS_PURE_QUAD, + NB_DEGENERATED_FACES, + HOLES, + AREA, + VOLUME, + SELFINTER, + NB_FACETS, + MIN_AREA, + MAX_AREA, + MED_AREA, + MEAN_AREA, + MIN_ALTITUDE, + MIN_ASPECT_RATIO, + MAX_ASPECT_RATIO, + MEAN_ASPECT_RATIO, + GENUS, + NB_EDGES, + MIN_LENGTH, + MAX_LENGTH, + MID_LENGTH, + MEAN_LENGTH, + NB_NULL_LENGTH, + MIN_ANGLE, + MAX_ANGLE, + MEAN_ANGLE + }; + + bool has_stats()const Q_DECL_OVERRIDE{return true;} + QString computeStats(int type)Q_DECL_OVERRIDE; + CGAL::Three::Scene_item::Header_data header() const Q_DECL_OVERRIDE; }; #endif diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp index 3043d169ddd..39d1cdb9c31 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp @@ -125,6 +125,7 @@ struct Scene_surface_mesh_item_priv{ alphaSlider = NULL; has_vcolors = false; has_fcolors = false; + item->setProperty("classname", QString("surface_mesh")); } Scene_surface_mesh_item_priv(SMesh* sm, Scene_surface_mesh_item *parent): @@ -151,6 +152,7 @@ struct Scene_surface_mesh_item_priv{ alphaSlider = NULL; has_vcolors = false; has_fcolors = false; + item->setProperty("classname", QString("surface_mesh")); } ~Scene_surface_mesh_item_priv() diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h index d0449e819b5..4fa11428707 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h @@ -18,11 +18,35 @@ #include #include -template -void angles(Mesh* poly, double& mini, double& maxi, double& ave) +template +struct Angles_test_with_set +{ + const Set& set; + typedef typename Set::value_type value_type; + Angles_test_with_set(const Set& set):set(set) {} + + bool operator()(const value_type& f) + { + return (set.find(f) == set.end()); + } +}; + +struct Angles_test +{ + Angles_test() {} + template + bool operator()(const T&) + { + return false; + } +}; + +template +void compute_angles(Mesh* poly,Tester tester , double& mini, double& maxi, double& ave) { using namespace boost::accumulators; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::property_map::type VPMap; typedef typename CGAL::Kernel_traits< typename boost::property_traits::value_type >::Kernel Traits; double rad_to_deg = 180. / CGAL_PI; @@ -33,7 +57,9 @@ void angles(Mesh* poly, double& mini, double& maxi, double& ave) VPMap vpmap = get(CGAL::vertex_point, *poly); BOOST_FOREACH(halfedge_descriptor h, halfedges(*poly)) { - if (face(h, *poly) == boost::graph_traits::null_face()) + face_descriptor f = face(h, *poly); + if (f == boost::graph_traits::null_face() + || tester(f)) continue; typename Traits::Point_3 a = get(vpmap, source(h, *poly)); @@ -54,7 +80,22 @@ void angles(Mesh* poly, double& mini, double& maxi, double& ave) } template -void edges_length(Mesh* poly, +void angles(Mesh* poly, double& mini, double& maxi, double& ave) +{ + compute_angles(poly, Angles_test(), mini, maxi, ave); +} + +template +void angles(Mesh* poly, const Face_set& faces, double& mini, double& maxi, double& ave) +{ + Angles_test_with_set tester(faces); + compute_angles(poly, tester, mini, maxi, ave); +} + + + +template +void edges_length(Mesh* poly, const Edge_range& range, double& mini, double& maxi, double& mean, double& mid, unsigned int& nb_degen) { @@ -69,7 +110,7 @@ void edges_length(Mesh* poly, VPMap vpmap = get(CGAL::vertex_point, *poly); nb_degen = 0; - BOOST_FOREACH(edge_descriptor e, edges(*poly)) + BOOST_FOREACH(edge_descriptor e, range) { halfedge_descriptor h = halfedge(e, *poly); Point a = get(vpmap, source(h, *poly)); @@ -85,6 +126,13 @@ void edges_length(Mesh* poly, mid = extract_result< tag::median >(acc); } +template +void edges_length(Mesh* poly, + double& mini, double& maxi, double& mean, double& mid, + unsigned int& nb_degen) +{ + edges_length(poly, edges(*poly), mini, maxi, mean, mid, nb_degen); +} template unsigned int nb_degenerate_faces(Mesh* poly) { @@ -96,11 +144,9 @@ unsigned int nb_degenerate_faces(Mesh* poly) return static_cast(degenerate_faces.size()); } -template -unsigned int nb_holes(Mesh* poly) +template +unsigned int nb_holes(Mesh* poly, IDMap idmap) { - typedef typename boost::property_map::type IDMap; - IDMap idmap = get(boost::halfedge_index, *poly); //gets the number of holes //if is_closed is false, then there are borders (= holes) @@ -138,9 +184,15 @@ unsigned int nb_holes(Mesh* poly) //} return n; } - template -void faces_area(Mesh* poly, +unsigned int nb_holes(Mesh* poly) +{ + typedef typename boost::property_map::type IDMap; + IDMap idmap = get(boost::halfedge_index, *poly); + return nb_holes(poly, idmap); +} +template +void faces_area(Mesh* poly, const Face_range& range, double& mini, double& maxi, double& mean, double& mid) { using namespace boost::accumulators; @@ -153,7 +205,7 @@ void faces_area(Mesh* poly, features< tag::min, tag::max, tag::mean , tag::median> > acc; VPMap vpmap = get(CGAL::vertex_point, *poly); - BOOST_FOREACH(face_descriptor f, faces(*poly)) + BOOST_FOREACH(face_descriptor f, range) { halfedge_descriptor h = halfedge(f, *poly); Point a = get(vpmap, target(h, *poly)); @@ -169,7 +221,14 @@ void faces_area(Mesh* poly, } template -void faces_aspect_ratio(Mesh* poly, +void faces_area(Mesh* poly, + double& mini, double& maxi, double& mean, double& mid) +{ + faces_area(poly, faces(*poly), mini, maxi, mean, mid); +} + +template +void faces_aspect_ratio(Mesh* poly, const Face_range& range, double& min_altitude, double& mini, double& maxi, double& mean) { using namespace boost::accumulators; @@ -185,7 +244,7 @@ void faces_aspect_ratio(Mesh* poly, min_altitude = std::numeric_limits::infinity(); typename boost::property_map::type vpmap = get(CGAL::vertex_point, *poly); - BOOST_FOREACH(face_descriptor f, faces(*poly)) + BOOST_FOREACH(face_descriptor f, range) { halfedge_descriptor h = halfedge(f, *poly); typename Traits::Point_3 points[3]; @@ -212,5 +271,13 @@ void faces_aspect_ratio(Mesh* poly, maxi = extract_result< tag::max >(acc); mean = extract_result< tag::mean >(acc); } + + +template +void faces_aspect_ratio(Mesh* poly, + double& min_altitude, double& mini, double& maxi, double& mean) +{ + faces_aspect_ratio(poly, faces(*poly), min_altitude, mini, maxi, mean); +} #endif // POLYHEDRON_DEMO_STATISTICS_HELPERS_H From 3887a214299472247ba0b1805490b3b90da230ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 5 Mar 2019 08:01:17 +0100 Subject: [PATCH 024/271] add missing text for brief of advanced class/type/function/concept --- .../doc/resources/1.8.13/BaseDoxyfile.in | 2 ++ .../doc/resources/1.8.14/BaseDoxyfile.in | 2 ++ .../doc/resources/1.8.4/BaseDoxyfile.in | 2 ++ .../Concepts/ExtremalPolygonTraits_2.h | 1 + .../Periodic_2_Delaunay_triangulation_2.h | 2 ++ .../CGAL/Periodic_2_triangulation_2.h | 22 +++++++++++++++---- Point_set_3/include/CGAL/Point_set_3.h | 16 +++++++++----- .../doc/Spatial_searching/Concepts/Splitter.h | 1 + .../Mean_curvature_flow_skeletonization.h | 4 +++- .../Concepts/TriangulationDataStructure_3.h | 2 ++ .../doc/Triangulation/CGAL/Triangulation.h | 1 + .../CGAL/Triangulation_data_structure.h | 2 ++ .../CGAL/Triangulation_ds_full_cell.h | 3 ++- .../CGAL/Triangulation_ds_vertex.h | 1 + .../Concepts/TriangulationDataStructure.h | 1 + .../CGAL/Constrained_triangulation_plus_2.h | 7 +++++- 16 files changed, 57 insertions(+), 12 deletions(-) diff --git a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in index e3f372bcf3d..2aef4eda2d7 100644 --- a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in @@ -266,6 +266,8 @@ ALIASES = "sc{1}=\1 \endhtmlonly" \ "cgalAdvancedFunction=This is an advanced function." \ "cgalAdvancedClass=This is an advanced class." \ + "cgalAdvancedType=This is an advanced type." \ + "cgalAdvancedConcept=This is an advanced concept." \ "cgalRequiresCPP11=\warning This function requires a C++11 compiler." \ "cgalPkgPicture{1}=

\n \image html \1 \n
" \ "cgalPkgSummaryBegin=
" \ diff --git a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in index a9141040bc6..cec57978eb7 100644 --- a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in @@ -267,6 +267,8 @@ ALIASES = "sc{1}=\1 \endhtmlonly" \ "cgalAdvancedFunction=This is an advanced function." \ "cgalAdvancedClass=This is an advanced class." \ + "cgalAdvancedType=This is an advanced type." \ + "cgalAdvancedConcept=This is an advanced concept." \ "cgalRequiresCPP11=\warning This function requires a C++11 compiler." \ "cgalPkgPicture{1}=
^^ \image html \1 ^^
" \ "cgalPkgSummaryBegin=
" \ diff --git a/Documentation/doc/resources/1.8.4/BaseDoxyfile.in b/Documentation/doc/resources/1.8.4/BaseDoxyfile.in index 4a3fea1307b..7977a0a2928 100644 --- a/Documentation/doc/resources/1.8.4/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.4/BaseDoxyfile.in @@ -251,6 +251,8 @@ ALIASES += "cgalAdvancedBegin=\htmlonly
Advanc ALIASES += "cgalAdvancedEnd=\htmlonly
\endhtmlonly" ALIASES += "cgalAdvancedFunction=This is an advanced function." ALIASES += "cgalAdvancedClass=This is an advanced class." +ALIASES += "cgalAdvancedType=This is an advanced type." +ALIASES += "cgalAdvancedConcept=This is an advanced concept." ALIASES += "cgalRequiresCPP11=\warning This function requires a C++11 compiler." diff --git a/Inscribed_areas/doc/Inscribed_areas/Concepts/ExtremalPolygonTraits_2.h b/Inscribed_areas/doc/Inscribed_areas/Concepts/ExtremalPolygonTraits_2.h index 1b00927f86c..b1be56d11bb 100644 --- a/Inscribed_areas/doc/Inscribed_areas/Concepts/ExtremalPolygonTraits_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/Concepts/ExtremalPolygonTraits_2.h @@ -3,6 +3,7 @@ \ingroup PkgInscribedAreasConcepts \cgalConcept +\cgalAdvancedConcept \cgalAdvancedBegin The concept `ExtremalPolygonTraits_2` provides the types and operations needed to compute a maximal \f$ k\f$-gon that can be diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h index ec9a0f14115..07ef62e2f6f 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -305,6 +305,7 @@ public: /// @{ /*! + \cgalAdvancedFunction \cgalAdvancedBegin Checks the combinatorial validity of the triangulation and the validity of its geometric embedding (see @@ -319,6 +320,7 @@ public: is_valid(bool verbose = false) const; /*! + \cgalAdvancedFunction \cgalAdvancedBegin Checks the combinatorial and geometric validity of the cell (see Section \ref P2Triangulation2secintro). Also checks that the diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index d56a4e6301f..7efd97aab28 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -438,6 +438,7 @@ public: /// @{ /*! + \cgalAdvancedFunction \cgalAdvancedBegin Returns a reference to the triangulation data structure. \cgalAdvancedEnd @@ -473,6 +474,7 @@ public: /// @{ /*! + \cgalAdvancedFunction \cgalAdvancedBegin The current triangulation remains a triangulation in the 1-sheeted covering space even after adding points if this method returns @@ -486,6 +488,7 @@ public: bool is_extensible_triangulation_in_1_sheet_h1() const; /*! + \cgalAdvancedFunction \cgalAdvancedBegin The same as `is_extensible_triangulation_in_1_sheet_h1()` but with a more precise heuristic, i.e. it might answer `true` in cases in which @@ -498,6 +501,7 @@ public: bool is_extensible_triangulation_in_1_sheet_h2() const; /*! + \cgalAdvancedFunction \cgalAdvancedBegin Returns `true` if the current triangulation would still be a triangulation in the 1-sheeted covering space, returns `false` otherwise. @@ -506,6 +510,7 @@ public: bool is_triangulation_in_1_sheet() const; /*! + \cgalAdvancedFunction \cgalAdvancedBegin Converts the current triangulation into the same periodic triangulation in the 1-sheeted covering space. @@ -515,6 +520,7 @@ public: void convert_to_1_sheeted_covering(); /*! + \cgalAdvancedFunction \cgalAdvancedBegin Converts the current triangulation into the same periodic triangulation in the 9-sheeted covering space. @@ -971,6 +977,7 @@ public: /// @{ /*! + \cgalAdvancedFunction \cgalAdvancedBegin Inserts the first vertex. \cgalAdvancedEnd @@ -978,6 +985,7 @@ public: Vertex_handle insert_first(const Point& p); /*! + \cgalAdvancedFunction \cgalAdvancedBegin Inserts vertex `v` in face `f`. Face `f` is modified, @@ -988,6 +996,7 @@ public: Vertex_handle insert_in_face(const Point& p, Face_handle f); /*! + \cgalAdvancedFunction \cgalAdvancedBegin Removes a vertex of degree three. Two of the incident faces are destroyed, the third one is modified. \pre Vertex `v` is a vertex with degree three. @@ -996,6 +1005,7 @@ public: void remove_degree_3(Vertex_handle v); /*! + \cgalAdvancedFunction \cgalAdvancedBegin Removes the unique vertex in the triangulation. @@ -1006,10 +1016,11 @@ public: /*! - \cgalAdvancedBegin - creates a new vertex `v` and use it to star the hole - whose boundary is described by the sequence of edges - `[edge_begin, edge_end]`. Returns a handle to the new vertex. + \cgalAdvancedFunction + \cgalAdvancedBegin + creates a new vertex `v` and use it to star the hole + whose boundary is described by the sequence of edges + `[edge_begin, edge_end]`. Returns a handle to the new vertex. \pre The triangulation is a triangulation of 1 sheet \cgalAdvancedEnd @@ -1020,6 +1031,7 @@ public: EdgeIt edge_end); /*! + \cgalAdvancedFunction \cgalAdvancedBegin same as above, except that the algorithm first recycles faces in the sequence `[face_begin, face_end]` @@ -1036,6 +1048,7 @@ public: FaceIt face_end); /*! + \cgalAdvancedFunction \cgalAdvancedBegin Changes the domain. Note that this function calls `clear()`, i.e., it erases the existing triangulation. @@ -1084,6 +1097,7 @@ public: /// @{ /*! + \cgalAdvancedFunction \cgalAdvancedBegin Checks the combinatorial validity of the triangulation and also the validity of its geometric embedding. diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index c5f3cba43e9..e93d857a58b 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -939,6 +939,7 @@ public: #ifdef DOXYGEN_RUNNING + /// \cgalAdvancedType /// \cgalAdvancedBegin /// Model of `OutputIterator` used to insert elements by defining /// the value of the property `Property`. @@ -946,6 +947,7 @@ public: template using Property_back_inserter = unspecified_type; + /// \cgalAdvancedType /// \cgalAdvancedBegin /// Model of `WritablePropertyMap` based on `Property` and that /// is allowed to push new items to the point set if needed. @@ -1025,26 +1027,30 @@ public: }; /// \endcond + /// \cgalAdvancedType /// \cgalAdvancedBegin /// Back inserter on indices /// \cgalAdvancedEnd typedef Property_back_inserter Index_back_inserter; + /// \cgalAdvancedType /// \cgalAdvancedBegin /// Back inserter on points /// \cgalAdvancedEnd typedef Property_back_inserter Point_back_inserter; + /// \cgalAdvancedType /// \cgalAdvancedBegin /// Property map for pushing new points /// \cgalAdvancedEnd typedef Push_property_map Point_push_map; + /// \cgalAdvancedType /// \cgalAdvancedBegin /// Property map for pushing new vectors /// \cgalAdvancedEnd typedef Push_property_map Vector_push_map; /*! - \cgalAdvancedBegin \cgalAdvancedFunction + \cgalAdvancedBegin \brief Returns the push property map of the given property. \tparam T type of the property. @@ -1063,8 +1069,8 @@ public: return Push_property_map > (this, &prop, size()); } /*! - \cgalAdvancedBegin \cgalAdvancedFunction + \cgalAdvancedBegin \brief Returns the push property map of the point property. \cgalAdvancedEnd */ @@ -1073,8 +1079,8 @@ public: return Point_push_map (this, &m_points, size()); } /*! - \cgalAdvancedBegin \cgalAdvancedFunction + \cgalAdvancedBegin \brief Returns the push property map of the normal property. \note The normal property must have been added to the point set @@ -1086,8 +1092,8 @@ public: return Vector_push_map (this, &m_normals, size()); } /*! - \cgalAdvancedBegin \cgalAdvancedFunction + \cgalAdvancedBegin \brief Returns the back inserter on the index property. \cgalAdvancedEnd */ @@ -1096,8 +1102,8 @@ public: return Index_back_inserter (this, &m_indices, size()); } /*! - \cgalAdvancedBegin \cgalAdvancedFunction + \cgalAdvancedBegin \brief Returns the back inserter on the point property. \cgalAdvancedEnd */ diff --git a/Spatial_searching/doc/Spatial_searching/Concepts/Splitter.h b/Spatial_searching/doc/Spatial_searching/Concepts/Splitter.h index 234bf5bfa34..f992348ba99 100644 --- a/Spatial_searching/doc/Spatial_searching/Concepts/Splitter.h +++ b/Spatial_searching/doc/Spatial_searching/Concepts/Splitter.h @@ -2,6 +2,7 @@ \ingroup PkgSpatialSearchingDConcepts \cgalConcept +\cgalAdvancedConcept \cgalAdvancedBegin The concept `Splitter` defines the requirements for a function object class implementing a splitting rule. \cgalAdvancedEnd diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index 9e1da64c8f3..97317bca685 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -461,6 +461,7 @@ public: /// \name Vertex Motion Parameters /// @{ + /// \cgalAdvancedFunction /// \cgalAdvancedBegin /// Controls the velocity of movement and approximation quality: /// decreasing this value makes the mean curvature flow based contraction converge @@ -480,7 +481,8 @@ public: { return m_is_medially_centered; } - + + /// \cgalAdvancedFunction /// \cgalAdvancedBegin /// Controls the smoothness of the medial approximation: /// increasing this value results in a (less smooth) skeleton closer diff --git a/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h b/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h index c24fa7463de..ee82122c9d9 100644 --- a/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h +++ b/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h @@ -118,6 +118,7 @@ Can be `CGAL::Sequential_tag` or `CGAL::Parallel_tag`. If it is typedef unspecified_type Concurrency_tag; /*! +\cgalAdvancedType \cgalAdvancedBegin This template class allows to get the type of a triangulation data structure that only changes the vertex type. It has to define a type @@ -130,6 +131,7 @@ template using Rebind_vertex = unspecified_type; /*! +\cgalAdvancedType \cgalAdvancedBegin This template class allows to get the type of a triangulation data structure that only changes the cell type. It has to define a type diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation.h b/Triangulation/doc/Triangulation/CGAL/Triangulation.h index bf01cfdce74..44bf5a43713 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation.h @@ -254,6 +254,7 @@ Returns a const reference to the underlying triangulation data structure. const Triangulation_ds & tds() const; /*! +\cgalAdvancedFunction \cgalAdvancedBegin Returns a non-const reference to the underlying triangulation data structure. diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h index bc2459e2dbf..0542353ebb1 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h @@ -74,6 +74,7 @@ bool is_valid(bool verbose = true) const; /// @{ /*! +\cgalAdvancedType \cgalAdvancedBegin This template class allows to get the type of a triangulation data structure that only changes the vertex type. It has to define a type @@ -103,6 +104,7 @@ using Rebind_full_cell = unspecified_type; /// @{ /*! +\cgalAdvancedFunction \cgalAdvancedBegin A set `C` of full cells satisfying the same condition as in method `Triangulation_data_structure::insert_in_hole()` is assumed to be marked. This diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_full_cell.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_full_cell.h index fccb180dfe4..fc1b15a3ab7 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_full_cell.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_full_cell.h @@ -60,7 +60,8 @@ public: /// \name Validity Check /// @{ -/*! +/*! +\cgalAdvancedFunction \cgalAdvancedBegin Implements the validity checks required by the concept `TriangulationDSFullCell`. diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_vertex.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_vertex.h index 6053146b13b..787afe5ff16 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_vertex.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_ds_vertex.h @@ -41,6 +41,7 @@ public: /// @{ /*! +\cgalAdvancedFunction \cgalAdvancedBegin Implements the validity checks required by the concept `TriangulationDSVertex`. Does not implement additional checks. diff --git a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h index 3b1b98c991c..d5559c99a14 100644 --- a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h +++ b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h @@ -432,6 +432,7 @@ Inserts a vertex in the triangulation data structure by subdividing the Vertex_handle insert_in_facet(const Facet & ft); /*! +\cgalAdvancedFunction \cgalAdvancedBegin Removes the full cells in the range \f$ C=\f$`[s, e)`, inserts a vertex at position `p` and fills the hole by connecting diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h index 7394806f275..fc74ede4668 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h @@ -406,7 +406,7 @@ The simplification algorithm uses the following types and functions. /*! \cgalAdvancedBegin -An iterator on the points of the of the original constraint +An iterator on the points of the original constraint before simplification steps are applied. The value type of this iterator is `Point`. A \link Constrained_triangulation_plus_2::Vertices_in_constraint_iterator `Vertices_in_constraint_iterator`\endlink can be converted into a `Points_in_constraint_iterator`, but not the other way around. @@ -416,6 +416,7 @@ typedef unspecified_type Points_in_constraint_iterator; /*! +\cgalAdvancedFunction \cgalAdvancedBegin Returns an iterator to the first point on the constraint before any simplification step. \cgalAdvancedEnd @@ -423,6 +424,7 @@ Returns an iterator to the first point on the constraint before any simplificati Points_in_constraint_iterator points_in_constraint_begin(Constraint_id cid) const; /*! +\cgalAdvancedFunction \cgalAdvancedBegin Returns an iterator past the last point on the constraint before any simplification step. \cgalAdvancedEnd @@ -430,6 +432,7 @@ Returns an iterator past the last point on the constraint before any simplificat Points_in_constraint_iterator points_in_constraint_end(Constraint_id cid) const ; /*! +\cgalAdvancedFunction \cgalAdvancedBegin Removes the vertex at `vicq` from the constraint and the triangulation. The point of that vertex remains stored in the sequence of original points @@ -452,6 +455,7 @@ void simplify(Vertices_in_constraint_iterator vicq); /*! +\cgalAdvancedFunction \cgalAdvancedBegin Removes the original points that correspond to vertices in the constraint `cid` which have been removed by the `simplify()` function. @@ -462,6 +466,7 @@ remove_points_without_corresponding_vertex(Constraint_id cid); /*! +\cgalAdvancedFunction \cgalAdvancedBegin Removes all original points that correspond to vertices in the constraints which have been removed by the `simplify()` function. From b820b11625358e2ec95abc51cba020f1cae70ca8 Mon Sep 17 00:00:00 2001 From: goran-w <44604769+goran-w@users.noreply.github.com> Date: Mon, 4 Mar 2019 17:48:43 +0100 Subject: [PATCH 025/271] More work on consistent facet orientation in medit output --- Mesh_3/include/CGAL/IO/File_medit.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Mesh_3/include/CGAL/IO/File_medit.h b/Mesh_3/include/CGAL/IO/File_medit.h index 656a6b5db98..9337f8f1287 100644 --- a/Mesh_3/include/CGAL/IO/File_medit.h +++ b/Mesh_3/include/CGAL/IO/File_medit.h @@ -818,8 +818,12 @@ output_to_medit(std::ostream& os, typename C3T3::Facet f = (*fit); // Apply priority among subdomains, to get consistent facet orientation per subdomain-pair interface. - if (f.first->subdomain_index() < f.first->neighbor(f.second)->subdomain_index()) - f = tr.mirror_facet(f); + if ( print_each_facet_twice ) + { + // NOTE: We mirror a facet when needed to make it consistent with No_patch_facet_pmap_first/second. + if (f.first->subdomain_index() > f.first->neighbor(f.second)->subdomain_index()) + f = tr.mirror_facet(f); + } // Get facet vertices in CCW order. Vertex_handle vh1 = f.first->vertex((f.second + 1) % 4); @@ -833,10 +837,10 @@ output_to_medit(std::ostream& os, os << V[vh1] << ' ' << V[vh2] << ' ' << V[vh3] << ' '; os << get(facet_pmap, *fit) << '\n'; - // Print triangle again if needed + // Print triangle again if needed, with opposite orientation if ( print_each_facet_twice ) { - os << V[vh1] << ' ' << V[vh2] << ' ' << V[vh3] << ' '; + os << V[vh3] << ' ' << V[vh2] << ' ' << V[vh1] << ' '; os << get(facet_twice_pmap, *fit) << '\n'; } } From 3430223a9a8b0f859b7fb3d385d48946958e7074 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 5 Mar 2019 16:42:43 +0100 Subject: [PATCH 026/271] WIP --- .../run_testsuite_with_cmake | 350 ++++++++++++++++++ 1 file changed, 350 insertions(+) create mode 100644 Scripts/developer_scripts/run_testsuite_with_cmake diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake new file mode 100644 index 00000000000..67bb9c339e2 --- /dev/null +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -0,0 +1,350 @@ +#!/bin/bash +#usage : script [-c -l -n -s -k] testsuite_dir + +########################## +#### LAUNCH CTEST #### +########################## + + +# ---------------------------------------------------------------------------------------- +# function to print the value of variable $1 +# ---------------------------------------------------------------------------------------- +value_of() +{ + _value=`eval "printf '$'${1}"` + eval "printf \"${_value}\"" +} + +# ---------------------------------------------------------------------------------------- +# produce a string containing the actual date/time +# (used to identify files) +# ---------------------------------------------------------------------------------------- +datestr() +{ + date +%d%m%Y%H%M +} + + +# ---------------------------------------------------------------------------------------- +# Return 0 if $1 exists in the list $2, otherwise returns non-zero. +# ---------------------------------------------------------------------------------------- +is_in_list() +{ + ELEMENT=${1} + LIST=${2} + + for E in ${LIST} ; do + if [ "${E}" = "${ELEMENT}" ] ; then + return 0 + fi + done + + return 1 +} + + +# ---------------------------------------------------------------------------------------- +# Uniquely adds $1 to the global, space-separated list $PLATFORMS +# (if it is not in the list already) +# ---------------------------------------------------------------------------------------- +add_to_platforms() +{ + if ! is_in_list "${1}" "${PLATFORMS}" ; then + PLATFORMS="${PLATFORMS} ${1}" + fi +} + +# ---------------------------------------------------------------------------------------- +# Uniquely adds to the global, space-separated list $PLATFORMS all the directories found +# under ${REFERENCE_PLATFORMS_DIR} +# ---------------------------------------------------------------------------------------- +collect_all_reference_platforms() +{ + log "${ACTUAL_LOGFILE}" "Indicated to build on ALL platform folders" + if [ -d "${REFERENCE_PLATFORMS_DIR}" ]; then + cd "${REFERENCE_PLATFORMS_DIR}" + for PLATFORM in * ; do + if [ -d "${PLATFORM}" ]; then + add_to_platforms "${PLATFORM}" + fi + done + else + log "${ACTUAL_LOGFILE}" "WARNING: Invalid reference platforms directory: ${REFERENCE_PLATFORMS_DIR}" + fi +} + +# ---------------------------------------------------------------------------------------- +# Uniquely adds to the global, space-separated list $PLATFORMS all the directories found +# under $1 +# ---------------------------------------------------------------------------------------- +collect_all_current_platforms() +{ + PLATFORMS="" + cd "${1}" + for PLATFORM in * ; do + if [ -d "${PLATFORM}" ]; then + PLATFORMS="${PLATFORMS} ${PLATFORM}" + fi + done +} + +# ---------------------------------------------------------------------------------------- +# Uniquely adds to the global, space-separated list $PLATFORMS all the directory names +# listed in the space-separated list $1 +# NOTE: If any such name is "all", it's NOT added as a platform and the flag +# USE_REFERENCE_PLATFORMS is set instead. +# ---------------------------------------------------------------------------------------- +build_platforms_list() +{ + for LOCAL_PLATFORM in $1; do + if [ "${LOCAL_PLATFORM}" = "all" ] ; then + USE_REFERENCE_PLATFORMS='y' + else + add_to_platforms "${LOCAL_PLATFORM}" + fi + done +} + + +# ---------------------------------------------------------------------------------------- +# Sets up the variables indicating the directories to use. +# Crates all platform directories under the current release binary folder. +# ---------------------------------------------------------------------------------------- +setup_dirs() +{ + # dir for the actual release + CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` + + CGAL_TEST_DIR=${CGAL_DIR}/test + + if [ ! -d "${CGAL_DIR}/cmake" ]; then + mkdir "${CGAL_DIR}/cmake" + log "${ACTUAL_LOGFILE}" "Creating ${CGAL_DIR}/cmake" + fi + + if [ ! -d "${CGAL_DIR}/cmake/platforms" ]; then + mkdir "${CGAL_DIR}/cmake/platforms" + log "${ACTUAL_LOGFILE}" "Creating ${CGAL_DIR}/cmake/platforms" + fi + + CGAL_RELEASE_DIR="${CGAL_DIR}" + + CGAL_RELEASE_ID=`basename "${CGAL_RELEASE_DIR}"` + + #todo : too complicated for nothing. Take a simpler outsource build dir + CGAL_BINARY_DIR_BASE=${CGAL_RELEASE_DIR}/cmake/platforms + + log "${ACTUAL_LOGFILE}" "Release to test ${CGAL_RELEASE_DIR}" + log "${ACTUAL_LOGFILE}" "CGAL_RELEASE_ID=${CGAL_RELEASE_ID}" + + if [ ! -r "${LOGS_DIR}" ]; then + mkdir "$LOGS_DIR" + fi + + # + # Collects the list of platform directories to build and test on + # + # The global variable PLATFORMS contains all the platform directories for all hosts + # as indicated in .autocgalrc. + # If .autocgalrc says "all" in any entry for BUILD_ON_* or COMPILERS_*, the platform + # directories existing in the reference release are added to $PLATFORMS + # + PLATFORMS="" + + for HOST in ${BUILD_HOSTS}; do + + build_platforms_list "`value_of BUILD_ON_${HOST}`" + build_platforms_list "`value_of COMPILERS_${HOST}`" + + done + + if [ -n "${USE_REFERENCE_PLATFORMS}" ]; then + collect_all_reference_platforms + fi + + #todo + PLATFORMS="raspberry" + for PLATFORM in ${PLATFORMS}; do + + CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} + + if [ ! -d "${CGAL_BINARY_DIR}" ]; then + log "${ACTUAL_LOGFILE}" "Creating platform directory ${CGAL_BINARY_DIR}" + mkdir "${CGAL_BINARY_DIR}" + fi + + done +} + + +# ---------------------------------------------------------------------------------------- +# function to put result files on the web +# $1 = source filename (full path) +# $2 = target filename (basename only) +# ---------------------------------------------------------------------------------------- +put_on_web() +{ + log "${ACTUAL_LOGFILE}" "Uploading results ${1} to $UPLOAD_RESULT_DESTINATION/$2" + + "$SCP" "${1}" "$UPLOAD_RESULT_DESTINATION/$2" >> "${ACTUAL_LOGFILE}" +} + + + +publish_results() +{ + HOST=${1} + PLATFORM=${2} + # + # collect results and put them on the web + # + cd "${CGAL_TEST_DIR}" + + log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "COLLECTING RESULTS ${PLATFORM}-${HOST}" + + # If this file does not exist results collection failed. Fake a results so this fact is itself reported + if [ ! -f "results_${CGAL_TESTER}_${PLATFORM}.txt" ]; then + log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Results collection for tester ${CGAL_TESTER} and platform ${PLATFORM} failed!" + echo "Results collection failed!" >> "results_${CGAL_TESTER}_${PLATFORM}.txt" + ${TAR} cf "results_${CGAL_TESTER}_${PLATFORM}.tar" "results_${CGAL_TESTER}_${PLATFORM}.txt" + ${COMPRESSOR} -9f "results_${CGAL_TESTER}_${PLATFORM}.tar" + fi + + ${TAR} cf "test_results-${HOST}_${PLATFORM}.tar" "results_${CGAL_TESTER}_${PLATFORM}.tar.gz" "results_${CGAL_TESTER}_${PLATFORM}.txt" + ${COMPRESSOR} -9f "test_results-${HOST}_${PLATFORM}.tar" + COMPILER=`printf "%s" "$2" | tr -c '[A-Za-z0-9]./[=-=]*_\'\''\":?() ' 'x'` + FILENAME="${CGAL_RELEASE_ID}_${CGAL_TESTER}-test`datestr`-${COMPILER}-cmake.tar.gz" + LOGFILENAME="${CGAL_RELEASE_ID}-log`datestr`-${HOST}.gz" + ${COMPRESSOR} -9f "${ACTUAL_LOGFILE}.test.${PLATFORM}" + mv "${ACTUAL_LOGFILE}.test.${PLATFORM}.gz" "${LOGS_DIR}/${LOGFILENAME}" + + log_done "${ACTUAL_LOGFILE}.test.${PLATFORM}" + + log "${ACTUAL_LOGFILE}" "Test results: ${CGAL_TEST_DIR}/test_results-${HOST}_${PLATFORM}.tar.gz" + + if [ -z "${DO_NOT_UPLOAD}" ]; then + log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "PUTTING RESULTS ON THE WEB" + put_on_web "test_results-${HOST}_${PLATFORM}.tar.gz" "${FILENAME}" + if [ -e "demos_${CGAL_TESTER}_${PLATFORM}.tar.gz" ]; then + put_on_web "demos_${CGAL_TESTER}_${PLATFORM}.tar.gz" "demos-${FILENAME}" + fi + log_done "${ACTUAL_LOGFILE}" + fi + +} +run_test_on_host_and_platform() +{ + HOST=${1} + PLATFORM=${2} + + NUMBER_OF_PROCESSORS="`value_of PROCESSORS_${HOST}`" + CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} + if [ -d "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}" ] ; then + if [ -f "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/init.cmake" ]; then + INIT_FILE="${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/init.cmake" + fi + fi + cd "${CGAL_BINARY_DIR}" + log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Testing on host ${HOST} and platform ${PLATFORM}" + #todo : check if that still works + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR + LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" + LIST_TEST_PACKAGES=$(source ${LIST_TEST_FILE}) + TO_TEST="" + INIT="" + for pkg in $LIST_TEST_PACKAGES; do + if [ -z "$INIT" ]; then + TO_TEST=$pkg + INIT="y" + else + TO_TEST="${TO_TEST}|$pkg" + fi + done + NUMBER_OF_PROCESSORS="`value_of PROCESSORS_localhost`" + + CTEST_OPTS="-T Start -T Test -j${NUMBER_OF_PROCESSORS} ${DO_NOT_TEST:+-E execution___of__} --timeout 1200" + if [ -z "${SHOW_PROGRESS}" ]; then + ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST} } ${KEEP_TESTS:+-FC .}> tmp.txt + else + ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST}} ${KEEP_TESTS:+-FC .}|tee tmp.txt + fi + ##################### + ## GET RESULTS ## + ##################### + TAG_DIR=$(awk '/^Create new tag: /{print $4F}' tmp.txt) + cd Testing/${TAG_DIR} + #python $CGAL_DIR/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM + RESULT_FILE=./"results_${CGAL_TESTER}_${PLATFORM}.txt" + rm -f "$RESULT_FILE" + touch "$RESULT_FILE" + sed -n '/CGAL_VERSION /s/#define //p' < "$CGAL_DIR/include/CGAL/version.h" >> "$RESULT_FILE" + echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" + echo "TESTER_NAME ${CGAL_TESTER_NAME}" >> "$RESULT_FILE" + echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" + echo "CGAL_TEST_PLATFORM ${PLATFORM}" >> "$RESULT_FILE" + #echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE" + #echo "Host-specific installation log file: ../installation.log" >> "$RESULT_FILE" + grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE + echo "------------" >> "$RESULT_FILE" + python3 /home/gimeno/CGAL/Testsuite/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM + + for file in $(ls|grep _Tests); do + mv $file "$(echo "$file" | sed 's/_Tests//g')" + done + OUTPUT_FILE=results_${CGAL_TESTER}_${PLATFORM}.tar + TEST_REPORT="TestReport_${CGAL_TESTER}_${PLATFORM}" + rm -f $OUTPUT_FILE $OUTPUT_FILE.gz + tar cf $OUTPUT_FILE results_${CGAL_TESTER}_${PLATFORM}.txt */"$TEST_REPORT" + echo + gzip -9f $OUTPUT_FILE + cp "${OUTPUT_FILE}.gz" "results_${CGAL_TESTER}_${PLATFORM}.txt" "${CGAL_TEST_DIR}" +} +# ---------------------------------------------------------------------------------------- +# Runs the test on the host $1 +# ---------------------------------------------------------------------------------------- +run_test_on_host() +{ + HOST=${1} + + #todo + PLATFORMS=`value_of COMPILERS_${HOST}` + PLATFORMS="raspberry" + if [ "${PLATFORMS}" = "all" ]; then + collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}" + fi + + for PLATFORM in ${PLATFORMS}; do + run_test_on_host_and_platform "${HOST}" "${PLATFORM}" + publish_results "${HOST}" "${PLATFORM}" + done +} + + +#setup dir +setup_dirs + + +# Setup cmake +if uname | grep -q "CYGWIN"; then + JOM="`which jom`" + if [ -e "$JOM" ]; then + CMAKE_GENERATOR='-GNMake Makefiles JOM' + MAKE_CMD='jom' + else + CMAKE_GENERATOR='-GNMake Makefiles' + MAKE_CMD='nmake' + fi + IS_CYGWIN='y' +else + MAKE_CMD='make' +fi + +log "${ACTUAL_LOGFILE}" "running the testsuites" +if [ -n "${CONSOLE_OUTPUT}" ]; then + printf "\n-------------------------------------------------------\n" +fi + +for HOST in ${BUILD_HOSTS}; do + run_test_on_host ${HOST} & +done From f924d51c6f85fd74ff1b97a477e962255e6221bc Mon Sep 17 00:00:00 2001 From: Raphael Grimm Date: Fri, 2 Nov 2018 16:04:34 +0100 Subject: [PATCH 027/271] Add export package to cmake This will add CGAL to the local cmake package cache and enable find_package to find it without manually providing the build dir. (See: https://cmake.org/cmake/help/latest/command/export.html) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 216f1c2829f..cc901cea606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Top level CMakeLists.txt for CGAL-branchbuild message( "== CMake setup ==" ) project(CGAL CXX C) - +export(PACKAGE CGAL) # Minimal version of CMake: cmake_minimum_required(VERSION 3.1) From aa76cd02b6d79fd0386310ae38719214eaab4fc4 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 6 Mar 2019 14:17:48 +0100 Subject: [PATCH 028/271] Use a single script for testsuite with or without docker --- .../CGAL_SetupCGAL_Qt5Dependencies.cmake | 2 +- .../developer_scripts/global_run_testsuite.sh | 261 ++++++++++++++++++ Scripts/developer_scripts/log.sh | 25 ++ .../run_testsuite_with_cmake | 43 +-- 4 files changed, 310 insertions(+), 21 deletions(-) create mode 100644 Scripts/developer_scripts/global_run_testsuite.sh create mode 100644 Scripts/developer_scripts/log.sh diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 804fff7b519..dae96c444e6 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -52,7 +52,7 @@ if(NOT CGAL_Qt5_MISSING_DEPS) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Qt5_moc_and_resource_files.cmake) - if(CGAL_HEADER_ONLY AND (WITH_demos OR WITH_examples OR NOT CGAL_BUILDING_LIBS) AND NOT TARGET CGAL_Qt5_moc_and_resources) + if(CGAL_HEADER_ONLY AND (WITH_demos OR WITH_examples OR WITH_tests OR NOT CGAL_BUILDING_LIBS) AND NOT TARGET CGAL_Qt5_moc_and_resources) add_library(CGAL_Qt5_moc_and_resources STATIC ${_CGAL_Qt5_MOC_FILES_private} ${CGAL_GRAPHICSVIEW_PACKAGE_DIR}/include/CGAL/Qt/GraphicsViewNavigation.h diff --git a/Scripts/developer_scripts/global_run_testsuite.sh b/Scripts/developer_scripts/global_run_testsuite.sh new file mode 100644 index 00000000000..f945a0a107a --- /dev/null +++ b/Scripts/developer_scripts/global_run_testsuite.sh @@ -0,0 +1,261 @@ +#!/bin/bash + +#!/bin/bash +#usage : script [-c -l -n -s -k] testsuite_dir + +########################## +#### LAUNCH CTEST #### +########################## + +export SHOW_PROGRESS="" +export KEEP_TESTS="" +export DO_NOT_UPLOAD="" +export DO_NOT_TEST="" +export SCP="scp" +export WGET="wget" +export WGET_OPTS="--no-check-certificate --no-verbose" +export CURL="curl" +export CURL_OPTS="-k --remote-name --silent --location-trusted" +export CGAL_URL="https://cgal.geometryfactory.com/CGAL/Members/Releases" +export UPLOAD_RESULT_DESTINATION="cgaltest@cgaltest.geometryfactory.com:incoming" +export LATEST_LOCATION="${CGAL_URL}/LATEST" +export TAR="tar" +export GZIP="gzip" +export GUNZIP="gunzip" +export COMPRESSOR="${GZIP}" +export CONSOLE_OUTPUT="y" +export CGAL_ROOT=`pwd` +export USE_TARGZ="n" +export USE_TARBZ="n" +export CGAL_RELEASE="" +export LOGS_DIR="" +export LOCK_FILE="" +export LIST_TEST_PACKAGES="" +export ACTUAL_LOGFILE="" +export CGAL_DIR="" +USE_LATEST_UNZIPPED="" +WITH_DOCKER="n" + +# ---------------------------------------------------------------------------------------- +# Downloads the file "LATEST" whose contents indicates which release to test +# ---------------------------------------------------------------------------------------- +download_latest() +{ + if [ -r "LATEST" ]; then + rm -rf LATEST + fi + log "${ACTUAL_LOGFILE}" "getting LATEST" + if [ -n "${USE_CURL}" ]; then + ${CURL} ${CURL_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1 + else + ${WGET} ${WGET_OPTS} "${LATEST_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1 + fi + if [ ! -f "LATEST" ]; then + error "COULD NOT DOWNLOAD LATEST!" + fi +} + +# ---------------------------------------------------------------------------------------- +# Exits the testsuite if the latest release has been already tested. +# This is tested by comparing files LATEST and RELEASE_NR, where +# RELEASE_NR is a copy of the previous LATEST. +# ---------------------------------------------------------------------------------------- +abort_if_latest_already_tested() +{ + if [ -r "RELEASE_NR" ]; then + cmp LATEST RELEASE_NR >> "${ACTUAL_LOGFILE}" + if [ ! ${?} != 0 ]; then + log "${ACTUAL_LOGFILE}" "This release has already been tested." + rm -f "$LOCK_FILE"; + exit 1; + fi + fi +} + + + +# ---------------------------------------------------------------------------------------- +# get CGAL +# ---------------------------------------------------------------------------------------- +get_cgal() +{ + if [ -z "$CGAL_LOCATION" ]; then + for i in `cat LATEST` + do + CGAL_LOCATION="${CGAL_URL}/${i}"; + CGAL_ZIPFILE="${i}"; + done + else + CGAL_ZIPFILE=`echo "$CGAL_LOCATION" | sed 's|.*/||'` + fi + + CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"` + if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then + USE_TARGZ="y" + else + CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.bz2//"` + if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then + USE_TARBZ="y" + fi + fi + + log "${ACTUAL_LOGFILE}" "CGAL_ZIPFILE = ${CGAL_ZIPFILE}" + log "${ACTUAL_LOGFILE}" "CGAL_RELEASE_ID = ${CGAL_RELEASE_ID}" + + log "${ACTUAL_LOGFILE}" "getting CGAL" + rm -f "${CGAL_ZIPFILE}" + if [ -n "${USE_CURL}" ]; then + ${CURL} ${CURL_OPTS} "${CGAL_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1 + else + ${WGET} ${WGET_OPTS} "${CGAL_LOCATION}" >> "${ACTUAL_LOGFILE}" 2>&1 + fi + if [ ${?} != 0 ]; then + error "Could not get CGAL" + fi + log_done "${ACTUAL_LOGFILE}" +} + + +# ---------------------------------------------------------------------------------------- +# Unzips and untars the downloaded CGAL release +# ---------------------------------------------------------------------------------------- +unzip_cgal() +{ + cd "${CGAL_ROOT}" + + log "${ACTUAL_LOGFILE}" "unzipping CGAL" + if [ "${USE_TARGZ}" = "y" ]; then + DECOMPRESSOR="${GUNZIP}" + log_done "${ACTUAL_LOGFILE}" + fi + + if [ "${USE_TARBZ}" = "y" ]; then + DECOMPRESSOR="bunzip2" + fi + + log "${ACTUAL_LOGFILE}" "untarring CGAL" + ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" | ${TAR} xf - >> "${ACTUAL_LOGFILE}" 2>&1 + if [ ${?} != 0 ]; then + error "Could not untar CGAL" + fi + + # check, if CGAL_DIR exists + if [ -d "${CGAL_ROOT}/${CGAL_RELEASE_ID}" ]; then + # Reset CGAL-I symlink + log "${ACTUAL_LOGFILE}" "Resetting CGAL-I symlink to ${CGAL_ROOT}/${CGAL_RELEASE_ID}" + rm -f CGAL-I + ln -s "${CGAL_ROOT}/${CGAL_RELEASE_ID}" CGAL-I + # Reset CGAL-3.x-I symlink + CGAL_RELEASE=`echo "${CGAL_RELEASE_ID}" | sed 's/I\([^-]*\)-.*/I\1/'` + log "${ACTUAL_LOGFILE}" "Resetting ${CGAL_RELEASE} symlink to ${CGAL_ROOT}/${CGAL_RELEASE_ID}" + rm -f "${CGAL_RELEASE}" + ln -s "${CGAL_ROOT}/${CGAL_RELEASE_ID}" "${CGAL_RELEASE}" + else + error "directory ${CGAL_ROOT}/${CGAL_RELEASE_ID} does not exist" + fi + + log_done "${ACTUAL_LOGFILE}" +} + + + +# Parse command line arguments +for arg in "$@" +do + case "$arg" in + "-c") + echo "Using latest unzipped release instead of getting a new one from the server" + USE_LATEST_UNZIPPED="y" + ;; + "-l") + echo "Not uploading results to dashboard" + DO_NOT_UPLOAD="y" + ;; + "-n") + echo "No testsuite will be launched. Installation only." + DO_NOT_TEST="y" + ;; + "-s") + echo "Showing progress." + SHOW_PROGRESS="y" + ;; + "-k") + echo "Compiled test/ directory will be kept." + KEEP_TESTS="y" + ;; + "-d") + echo "The testsuite will be launched through docker" + WITH_DOCKER="y" + ;; + *) + CGAL_LOCATION=$arg + esac +done + +# Load settings +if [ -f "$CGAL_ROOT/.autocgalrc" ]; then + . "$CGAL_ROOT/.autocgalrc" +else + echo "CONFIGURATION FILE .autocgalrc NOT FOUND" >&2; + exit 1 +fi + + +CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` +source "${CGAL_DIR}/developer_scripts/log.sh" +LOGS_DIR="${CGAL_ROOT}/AUTOTEST_LOGS" +LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock" +LIST_TEST_PACKAGES="${CGAL_ROOT}/list_test_packages" + +# Setup logfile +ACTUAL_LOGFILE="${CGAL_ROOT}/`basename ${0}`.log" +rm -f "${ACTUAL_LOGFILE}" + +echo "Running `basename ${0}` "'$Revision$' >> "${ACTUAL_LOGFILE}" + +cd "$CGAL_ROOT" + +# Starts the process + +if [ -z "${USE_LATEST_UNZIPPED}" ]; then + if [ -z "$CGAL_LOCATION" ]; then + download_latest + abort_if_latest_already_tested + fi + get_cgal + unzip_cgal +fi + +if [ "${WITH_DOCKER}" = "y" ]; then + #launch docker container + echo "export SHOW_PROGRESS=$SHOW_PROGRESS"> env.sh + echo "export KEEP_TESTS=$KEEP_TESTS">> env.sh + echo "export DO_NOT_UPLOAD=$DO_NOT_UPLOAD">> env.sh + echo "export DO_NOT_TEST=$DO_NOT_TEST">> env.sh + echo "export SCP=$SCP">> env.sh + echo "export WGET=$WGET">> env.sh + echo "export WGET_OPTS=\"$WGET_OPTS\"">> env.sh + echo "export CURL=$CURL">> env.sh + echo "export CURL_OPTS=\"$CURL_OPTS\"">> env.sh + echo "export CGAL_URL=$CGAL_URL">> env.sh + echo "export UPLOAD_RESULT_DESTINATION=$UPLOAD_RESULT_DESTINATION">> env.sh + echo "export LATEST_LOCATION=$LATEST_LOCATION">> env.sh + echo "export TAR=$TAR">> env.sh + echo "export GZIP=$GZIP">> env.sh + echo "export GUNZIP=$GUNZIP">> env.sh + echo "export COMPRESSOR=$COMPRESSOR">> env.sh + echo "export CONSOLE_OUTPUT=$CONSOLE_OUTPUT">> env.sh + echo "export CGAL_ROOT=/cgal_root">> env.sh + echo "export USE_TARGZ=$USE_TARGZ">> env.sh + echo "export USE_TARBZ=$USE_TARBZ">> env.sh + echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh + echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh + echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh + echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh + echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh + echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh + docker build -t debian:cross-compilation ${DOCKER_DIR_PATH} + docker run --rm -t -e CGAL_LAST=CGAL-4.14-Ic-140 -v ~/foutoir/ssh_testsuite/ssh:/tmp_ssh -v ~/3rdPartyLibs/RPi_libs:/deps -v ${CGAL_ROOT}/:/cgal_root debian:cross-compilation +else + bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake +fi diff --git a/Scripts/developer_scripts/log.sh b/Scripts/developer_scripts/log.sh new file mode 100644 index 00000000000..05ebc8eab64 --- /dev/null +++ b/Scripts/developer_scripts/log.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +log() +{ + LOGFILE=${1} + shift + if [ -n "${CONSOLE_OUTPUT}" ]; then + printf "${*} ...\n" + fi + printf "\n-------------------------------------------------------\n" >> "${LOGFILE}" + printf " ${*} ...\n" >> "${LOGFILE}" + printf "\n-------------------------------------------------------\n" >> "${LOGFILE}" +} + +log_done() +{ + if [ -n "${CONSOLE_OUTPUT}" ]; then + printf \ + " done\n-------------------------------------------------------\n" + fi + printf "\n-------------------------------------------------------\n" >> "${1}" + printf " **DONE**\n" >> "${1}" + printf "\n-------------------------------------------------------\n" >> "${1}" +} + diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 67bb9c339e2..2be3b2884d6 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -5,6 +5,15 @@ #### LAUNCH CTEST #### ########################## +source "${CGAL_DIR}/developer_scripts/log.sh" +# Load settings +echo "CGAL_ROOT is $CGAL_ROOT" +if [ -f "$CGAL_ROOT/.autocgalrc" ]; then + . "$CGAL_ROOT/.autocgalrc" +else + echo "CONFIGURATION FILE .autocgalrc NOT FOUND" >&2; + exit 1 +fi # ---------------------------------------------------------------------------------------- # function to print the value of variable $1 @@ -113,8 +122,7 @@ build_platforms_list() setup_dirs() { # dir for the actual release - CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` - + CGAL_TEST_DIR=${CGAL_DIR}/test if [ ! -d "${CGAL_DIR}/cmake" ]; then @@ -162,8 +170,6 @@ setup_dirs() collect_all_reference_platforms fi - #todo - PLATFORMS="raspberry" for PLATFORM in ${PLATFORMS}; do CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} @@ -239,16 +245,15 @@ run_test_on_host_and_platform() NUMBER_OF_PROCESSORS="`value_of PROCESSORS_${HOST}`" CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} - if [ -d "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}" ] ; then - if [ -f "${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/init.cmake" ]; then - INIT_FILE="${REFERENCE_PLATFORMS_DIR}/${PLATFORM}/init.cmake" - fi - fi cd "${CGAL_BINARY_DIR}" log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Testing on host ${HOST} and platform ${PLATFORM}" - #todo : check if that still works - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log 2>&1 + rm CMakeCache.txt + if [ -z "${SHOW_PROGRESS}" ]; then + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR >/dev/null 2>&1 + else + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR + fi LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" LIST_TEST_PACKAGES=$(source ${LIST_TEST_FILE}) TO_TEST="" @@ -261,8 +266,7 @@ run_test_on_host_and_platform() TO_TEST="${TO_TEST}|$pkg" fi done - NUMBER_OF_PROCESSORS="`value_of PROCESSORS_localhost`" - + CTEST_OPTS="-T Start -T Test -j${NUMBER_OF_PROCESSORS} ${DO_NOT_TEST:+-E execution___of__} --timeout 1200" if [ -z "${SHOW_PROGRESS}" ]; then ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST} } ${KEEP_TESTS:+-FC .}> tmp.txt @@ -273,6 +277,7 @@ run_test_on_host_and_platform() ## GET RESULTS ## ##################### TAG_DIR=$(awk '/^Create new tag: /{print $4F}' tmp.txt) + rm tmp.txt cd Testing/${TAG_DIR} #python $CGAL_DIR/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM RESULT_FILE=./"results_${CGAL_TESTER}_${PLATFORM}.txt" @@ -287,13 +292,14 @@ run_test_on_host_and_platform() #echo "Host-specific installation log file: ../installation.log" >> "$RESULT_FILE" grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE echo "------------" >> "$RESULT_FILE" - python3 /home/gimeno/CGAL/Testsuite/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM + python3 ${CGAL_DIR}/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM for file in $(ls|grep _Tests); do mv $file "$(echo "$file" | sed 's/_Tests//g')" done OUTPUT_FILE=results_${CGAL_TESTER}_${PLATFORM}.tar TEST_REPORT="TestReport_${CGAL_TESTER}_${PLATFORM}" + rm -f $OUTPUT_FILE $OUTPUT_FILE.gz tar cf $OUTPUT_FILE results_${CGAL_TESTER}_${PLATFORM}.txt */"$TEST_REPORT" echo @@ -306,10 +312,7 @@ run_test_on_host_and_platform() run_test_on_host() { HOST=${1} - - #todo PLATFORMS=`value_of COMPILERS_${HOST}` - PLATFORMS="raspberry" if [ "${PLATFORMS}" = "all" ]; then collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}" fi @@ -344,7 +347,7 @@ log "${ACTUAL_LOGFILE}" "running the testsuites" if [ -n "${CONSOLE_OUTPUT}" ]; then printf "\n-------------------------------------------------------\n" fi - for HOST in ${BUILD_HOSTS}; do - run_test_on_host ${HOST} & + run_test_on_host ${HOST} done + From ae5a828dc7a92040a36135cdb69d6aab7fda8545 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 6 Mar 2019 14:22:18 +0100 Subject: [PATCH 029/271] Fix point set selection speed --- .../Point_set/Point_set_selection_plugin.cpp | 70 ++++--------------- 1 file changed, 13 insertions(+), 57 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp index 88bddf1721c..f7623c9baba 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp @@ -118,7 +118,7 @@ public: selected[idx] = now_selected; else { - bool already_selected = point_set->is_selected (idx); + bool already_selected = point_set->is_selected (point_set->begin() + i); if (ui_widget.union_selection->isChecked()) selected[idx] = (already_selected || now_selected); else if (ui_widget.intersection->isChecked()) @@ -187,14 +187,10 @@ public: selected_bitmap[nit->first] = true; } - Point_set::iterator it = points_item->point_set()->begin (); - while (it != points_item->point_set()->first_selected()) - { - if (selected_bitmap[*it]) - points_item->point_set()->select(*it); - else - ++ it; - } + points_item->point_set()->set_first_selected + (std::partition (points_item->point_set()->begin(), points_item->point_set()->end(), + [&] (const Point_set::Index& idx) -> bool + { return !selected_bitmap[idx]; })); points_item->invalidateOpenGLBuffers(); points_item->itemChanged(); @@ -205,36 +201,10 @@ public: if (points_item->point_set()->nb_selected_points() == 0) return; - Distance tr_dist(points_item->point_set()->point_map()); + points_item->invertSelection(); + expand(); + points_item->invertSelection(); - std::set selection; - for (Point_set::iterator it = points_item->point_set()->first_selected(); - it != points_item->point_set()->end(); ++ it) - selection.insert (*it); - - std::vector selected_bitmap (points_item->point_set()->size(), true); - - for (Point_set::iterator it = points_item->point_set()->first_selected(); - it != points_item->point_set()->end(); ++ it) - { - Neighbor_search search(*tree, points_item->point_set()->point(*it), 6, 0, true, tr_dist); - for (Neighbor_search::iterator nit = search.begin(); nit != search.end(); ++ nit) - if (selection.find(nit->first) == selection.end()) - { - selected_bitmap[*it] = false; - break; - } - } - - Point_set::iterator it = points_item->point_set()->first_selected (); - while (it != points_item->point_set()->end()) - { - if (!selected_bitmap[*it]) - points_item->point_set()->unselect(*it); - - ++ it; - } - points_item->invalidateOpenGLBuffers(); points_item->itemChanged(); } @@ -629,25 +599,11 @@ protected Q_SLOTS: selection_test.apply(i); #endif - Point_set::iterator it = points->begin (); - Point_set::iterator first_selected = points->first_selected (); - while (it != points->first_selected()) - { - if (selected_bitmap[*it]) - points->select(*it); - else - ++ it; - } - - it = first_selected; - while (it != points->end()) - { - if (!selected_bitmap[*it]) - points->unselect(*it); - - ++ it; - } - + points->set_first_selected + (std::partition (points->begin(), points->end(), + [&] (const Point_set::Index& idx) -> bool + { return !selected_bitmap[idx]; })); + point_set_item->invalidateOpenGLBuffers(); point_set_item->itemChanged(); } From dbb25126029ccc07417530937ed0787147cbc0cf Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 6 Mar 2019 14:57:14 +0100 Subject: [PATCH 030/271] un-hard code the variables for docker and pull instead of building. --- Scripts/developer_scripts/global_run_testsuite.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/global_run_testsuite.sh b/Scripts/developer_scripts/global_run_testsuite.sh index f945a0a107a..85e6e595fb9 100644 --- a/Scripts/developer_scripts/global_run_testsuite.sh +++ b/Scripts/developer_scripts/global_run_testsuite.sh @@ -254,8 +254,8 @@ if [ "${WITH_DOCKER}" = "y" ]; then echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh - docker build -t debian:cross-compilation ${DOCKER_DIR_PATH} - docker run --rm -t -e CGAL_LAST=CGAL-4.14-Ic-140 -v ~/foutoir/ssh_testsuite/ssh:/tmp_ssh -v ~/3rdPartyLibs/RPi_libs:/deps -v ${CGAL_ROOT}/:/cgal_root debian:cross-compilation + docker pull cgal/testsuite-docker:debian-for-arm + docker run --rm -t -e CGAL_LAST=${CGAL_RELEASE_ID} -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}/:/cgal_root cgal/testsuite-docker:debian-for-arm else bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake fi From 8d6c35f1b5778368c7d7b08dff059a2e45c9f098 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 6 Mar 2019 15:53:06 +0100 Subject: [PATCH 031/271] Fix warning --- .../demo/Polyhedron/Scene_polyhedron_selection_item.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index e42a92ae669..e4eaa3b00c5 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -1031,9 +1031,9 @@ public: MEAN_ANGLE }; - bool has_stats()const Q_DECL_OVERRIDE{return true;} - QString computeStats(int type)Q_DECL_OVERRIDE; - CGAL::Three::Scene_item::Header_data header() const Q_DECL_OVERRIDE; + bool has_stats()const {return true;} + QString computeStats(int type); + CGAL::Three::Scene_item::Header_data header() const ; }; #endif From 2a5ebb20892ddf0b86ceec82abe532e0e50caf18 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 7 Mar 2019 09:22:11 +0100 Subject: [PATCH 032/271] Fix the use of resources The key issue was that the `CMakeLists.txt` was not using `CGAL_Qt5_RESOURCE_FILES`, and instead the author decided to copy the resources and qrc files. --- .../Hyperbolic_triangulation_2/CMakeLists.txt | 4 ++-- .../resources/Delaunay_triangulation_2.png | Bin 4042 -> 0 bytes .../resources/Delaunay_triangulation_2.qrc | 2 +- .../resources/File.qrc | 7 ------- .../resources/Input.qrc | 7 ------- .../resources/Voronoi_diagram_2.png | Bin 3093 -> 0 bytes .../resources/fileNew.png | Bin 768 -> 0 bytes .../resources/fileOpen.png | Bin 1662 -> 0 bytes .../resources/fileSave.png | Bin 1205 -> 0 bytes .../resources/fit-page-32.png | Bin 1330 -> 0 bytes .../icons/constrained_triangulation.pdf | Bin 1857 -> 0 bytes .../icons/constrained_triangulation.png | Bin 6800 -> 0 bytes ...onstrained_triangulation_show_constraints.pdf | Bin 2182 -> 0 bytes ...onstrained_triangulation_show_constraints.png | Bin 8076 -> 0 bytes .../constrained_triangulation_show_in_domain.pdf | Bin 1915 -> 0 bytes .../constrained_triangulation_show_in_domain.png | Bin 6988 -> 0 bytes .../resources/inputPoint.png | Bin 1145 -> 0 bytes .../resources/inputPolyline.png | Bin 2021 -> 0 bytes .../resources/zoom-best-fit.png | Bin 3231 -> 0 bytes 19 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Delaunay_triangulation_2.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/File.qrc delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Input.qrc delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Voronoi_diagram_2.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileNew.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileOpen.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileSave.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fit-page-32.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation.pdf delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation_show_constraints.pdf delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation_show_constraints.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation_show_in_domain.pdf delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation_show_in_domain.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/inputPoint.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/inputPolyline.png delete mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/zoom-best-fit.png diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 25aa6cddced..71ed78e33fb 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -19,10 +19,10 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND) qt5_wrap_ui( UIS HDT2.ui ) # qrc files (resources files, that contain icons, at least) - qt5_add_resources ( RESOURCE_FILES resources/File.qrc resources/Input.qrc resources/Delaunay_triangulation_2.qrc ) + qt5_add_resources ( RESOURCE_FILES resources/Delaunay_triangulation_2.qrc ) # cpp files - add_executable ( HDT2_demo HDT2.cpp ${RESOURCE_FILES} ${UIS}) + add_executable ( HDT2_demo HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS}) target_link_libraries ( HDT2_demo CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets) else() message(STATUS "NOTICE: This demo requires CGAL, Boost and Qt5 and will not be compiled.") diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Delaunay_triangulation_2.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Delaunay_triangulation_2.png deleted file mode 100644 index 36b51cf599eb8b49e801e4d6fbd2b2134e78d276..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4042 zcmXY!2{=@38^>)iLzpqhi!zp%3gOMZ4o1i>yB14jkgSD>jA4edMP$kn$r7@cvV{H&u?f)O}x zivQ>VE{skFy4Yg~xXsQu@C5FqXX{Ht!`2KQw9mxZ_`rwvy)<2bEA)FBeadn>4Gp`c zK33BrVD$I3KvSa?0d)mi4%@QCO3m#uJ~`(}cRf*NXLnJqmSp%vMl+Jx_Cxm2c*nA4 zT$4?^x$HRw|ic?Y!4(0@i+hd5n$Wm2>OQLz+$2J^Z`< z+n~R~weOA53l5_U^@sbL3)mb8tXqfub+dc4PrkgnQ6F-+{|q@dQ5&@L=ZA3P-xcWY zbPowBeCY{~W(7FR*!%Jwk35NFB~)?(h#*YTzUt0MSq^%6yxMoJD-AF0(C~F#__wr<=RV+{OY zmxjQXQ8RM{5zKzZYNS1ILYmvU$ga|D;Jj;=;Y&sDpUqKNFg~+vMzbFu?=1}$y*;kJ z{Or7CfkhOqkpM@D8af#7f>R&tISX4=3nNVURUo$O!$IiHY(RK=HlQ~&-lWcoOoPTo zVYMSq{`22WSb}kG--4gKk>ww_hz`F1#P)t?>P45Xm#({54R9^{a&bTkjgW)g zwO@`FXfu-;$w1W1P{uyL3Hm{-LYoG4_cADe^61GZds#M5S4FPY6?AW{?5kwG_ockb{ zw@8%hR6`g&6I=hpp9y80q)OBm7{h7FRai<|B1f*`AzCcz6?GF^`=Usa^c!XzlFvujv}NsThCqdT;nw5dy6GYccGf}SPuTcUc(+( zk!;<2(mT@|!=Dc?HhrZP!OXQOhVgLXiAKw>@NYC@a&H~(ZvmzBT|IQMKmSUu@iSq% za~=f&F;}ceg2bAyS^*d4#_o)N@cz{jvm69Y(Vvg%S(&U4Jw7T@Pbj>^KkY4DN-7Aj z_dF}~E=yi!y4y7I-w0}&namPJjmWaDjdh{R!==uxvH78sPd$U7ed&pHg}}B|v?G~} zexFrB`${~+G%b0>Qhv1|J4QfK=eyEW{Qr!bg`#u7af!HZUjj{q%v7|Cb{fGYyiwQr zAXcWd#@^l zLhOmvxZa)4?;QIflucTG~wnin80S+2bQx0j4hAQMTPdGk=IIaPD-qF(0}PB#eY( zz|I;iL*h8*vKMAKdh;sqeDZgOOC0yrnO;sTgWTDIGc==O z?=xR_7UH+EGd6f3ajrSM56s4Cm9nK4hypz{OtkpD5U<*UO+e;s>DcjXXH)}Lr#_Dg zBI1HYPmzKX%|*ZTiW;z?I6#KC5&{S&?)T{QDP(ACWorm3cuv#=ZoFB?lMT@5#vAG} z(m>__ktM7549eS@!}dObvS+U#%06pwkpZ6>y!AonF}I{$h3Qe$m1s=EE=YjYkCs4c zEn75goO4T+P*SB1^IWwp(e@*yYhFqOGLi*%p`2`*95{oj?<}Zqqyme4^PJ0E_m8Nt zCFenkZnLlK28O(~mpsWOZdGVgs-?|9w@npuL(|RG^IRuvqA{34a^CgY2V08+Tkpbq zS;*s*mjxbW(}?x;KqWs(TqK4^QN6RZ>b#v8VigDikUOXI0z=x}Q;^KPUeWd#DZAB? zEIBI37T5hG-XFBIQ&NM7ut$kvCh4ky|DiYuTG#cL80ds}rUYPTG$o2q^P`pSfOhr0 zN32qkKE{rWeY!IWxgH+9&sp*XKeYnl`DdiapXB%sO?soh@9RVk_Ye=SAdaqY5N$NO z7n&bF9X^a&U_BxAniI8mA{3)oWH*GdX>+*~1plwWAX&n;>}J#++1izJ=Ze$1P(T0> zAyAr~DOY4Pk&Fsptu#d%PJw~Hwf?^Alu-$9PGOvmuQxeUN*SQaqthV=eOw)cVO=~3 zf)%Of_A?BK7jVqNH$?XUDZG=i&CKa-Ry$$=BRQob{NqnhD<;AzE-;EG5#gJ3p_&s7k9 z_xQwKi!%_|7f{(<>;Zd2jKs0S^AmzFO+Pq-gD|u3d!v4 z1IamIMaI}dV4(zll2>`hBguQcy#c!}e#>$FWZFDcAk*flPAaqrbqI&A<+u!SH$g;t zsJ`a9A7J=G-UCSc@(b(;0k`UrSMPTkJ2IVv=yh?%vK{`-4*r|S5x!t*yaVgmBuZm}4cvv)Xx zr?&Ip(TmGyoT>uE_QU=^NyWxZH@B#fE4&USCaJZ+9gET*(aeiQ{wH1euM!yfltR%F4Xz#UEa%Rzlk-E zlU~ZKMto-@sG3NhNZ*lw@p6w-kiF2$YW`RxV3PSb+g)=pSGdp^jlQu=kGF|}=w)bJ zjDvb0<)nvfIT1A=s!Jw3>88tNwAHsepUXJ6oLuSNUu1!9~oxnlx z3s3&Zrlq6Z<5WRN=BkEGSu~FPO0!nV?XlaX_F41qw(9*BdUFg?`cv3pH;5~Nt!0v% zI*vN))DAO8kWTZ;stHZTe0UW89bqUTzM~VQzpI(Xy7+3f&&*{}DZ59dee;L=mKOx`<%Oi0Qe+{$?BZYg8WWLy z(2K*hK@IxZs#GyUE?G7c{%=TFSMjS)&({kqmPqD|h9~}PPz}xUNWFWk*5Nb$1Pk|k zoIB7z1MXaS9OT}TwMfr`^+r`$$6|&pXa{~%yB(rswPdAlZFQTw-SpdO@*b z?i%KLvBCsqc~AWs4K}K=x9j5~fr1R=#4*=BU`qk5uhV1?JoqFNWXNtQm;vjP&xP?#0T0**FFgV|sM~RTwsuBiU`lhB4T|nLI z%8#`Wvrb=2N`n-fv=Tmp%^HyEC}Y42)~EFc;Uq(u`k$vN&mnXQBDm!g42u4q-(a9K z2D+u**ZM7hw;?FIU^6*UYfu56gLcYr2*T`!wGYY4T0KE5VihS@ubVZ9u&1n%X+D(~ zND3f2f_;2JY(u*nBUpg$T@P&UHNzPf-nZ~Zr$dZZPyV-2KA9Cgw9s6`7#bz&{FMbi$k;ws8jB^nm6%%~nvX;@5k_T{IWD;*G|91k)PGNdIC@f^n^L}-_Q)%G z;3*45wrXE{&El@MUjhzGZQE<>d{6d8I%u62F61t_@F*YVl9GWiI3@n=U*>hS;bzVr zt}K)BQ^}~$sYATp?ZD1(U+sZ&xY+$0J^JgmFoHPGH7mxEYFnLb$Y*xsO-FkT68&KY zVLNRDQ9IQHTsiW~CA5&!p`bsglX3BxF9J&psG!z{91@|rAlo-Sd&9I5k9g|$kI z!yiHUB9=zLje&ofVL2Ubty6PPyRUYwOF89c%B1p)tsS%dxM6A0!oDl()WWNh>zE@} z^_PpGRR1ahJK1&#?HlK#jV5gUY*f-jggOJOV#$k_hI*aZ5mNT1*icons/circumcenter.png - ../resources/about_CGAL.html + about_CGAL.html about_Hyperbolic_Delaunay_triangulation_2.html diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/File.qrc b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/File.qrc deleted file mode 100644 index 61d8ef4f390..00000000000 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/File.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - fileNew.png - fileOpen.png - fileSave.png - - diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Input.qrc b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Input.qrc deleted file mode 100644 index 8a49bd278b3..00000000000 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Input.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - inputPoint.png - fit-page-32.png - inputPolyline.png - - diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Voronoi_diagram_2.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/Voronoi_diagram_2.png deleted file mode 100644 index 62437e6bfc9600f5cb7d68d911ac76502edb2221..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3093 zcmXZe2{=^U8vyV-Mhud%j_lL&eIz7FVZtR+NJzGru_TdQjD0WZ`=}`Uk`}U;>@n1* zvZSmfq%>p85@X-~_gw$qGxy$S?sM-sbIzRiJ#U<`ksddv2qy$V-1=v9OpvP?a+u=T zkn@GD4OQgAW`9mkXB)*~u{?;};qW|T=>tJ~-hu;@EW1Y(+`Qqb<&0d>_aT1k)i4O+ z%F)-+G7A`(zHEKwq835I!*aN*%%rEQf<~yLPBEhP3A*qKaGIpuzRG(+iftf@5NM1S z9P2HHUS}k#cjBry1?j&7C_BaUfa~d znPG!bU;O+56_3I`$-_F5%vD_zt!>_@3(pBn< zmBMflleo_WI+kcGPJBc?h1a_GFTROS636p=zfRd(b~s0sg>;~_VSFAqs(BjNrD+9- z&^FhXXTLY{%ps?+?X6Ub^)17C^3VxcfGY;_M0@dI5iV30VB~7w+#{~aO7;LcTm3x& z2*(9D!1T?G$M!$87NZB7OhNz>QSwyq%G?hu(FgT={VQMz2L=HgE?0q(&7{Xs`24I- zJ#Uq=56Ybi+uB%NaQ34-w+{ufHec6h;>^wmpztrQf2%}3yhl$0`tK7YH9|L5h#}Mp zm%pQrPp56WcRw{uKYo4Ruel#@Zt_Sn{@;3{8n=Qvkdc@I2*YCHKq~pqT5}8+LEc8{ z*Ur={<^7N!&LnG7T>y@pdO%D{84w&9ejT(tGlZp$G+WTy#19kw{Q%4$dbi75!jB@Jp z2Fd}&@OXlPZGFJq#9rVc9J;x-IMuHJ8)d5cP4>vZ@|SCUC%O)XPXI1Ni>Rh=F;i_F zDCpP;vSHDo(dFwX$W@LIQwe%oUw-MmG&5A^KWiKQ8*qcHQA?zM)-a!5&WDCRZ5ibL z^swL^%NZl!3jDS~+SaZicy*rM=1O2)?1A(WBuIfwY5w6XQqa=xuh=81Kx^yj%Ae79 z36dBX)ng~dEb^5Pn_fy)^HCueyA|c%KqHEGvP5Yt?p%hDIx{uE;7%iJR z`79OqS<0ol#GTjE_}vAe&SyT`SbN0sE?Q!y!QsWF!)W-u^Zk(C#ZMeAuOCW}*Vn#iEa4e=N(ct;S3%3YEi{Uw;I%__3} zoj?NBwqiLfNGaEQCpfvou)o+E%F*aocKb8%K+d|-?JJC%cID+m_mYYmJhv0%4+1fX zNWwufUgAM{hgg!lecjHiuE^QHc~D*r2=|-tz9<7|mGilIBGFoQ2zO#V%mDv&b9zFR9G`dG9W!`>MVxSAKap}%A z+(7?#`S6DdAXvM6XU_2>sZd@wmq7;#fio9h7^st_CNt5xhN{+r?UwO}J+kwzB zH>}eBh;HLH>vy`X_9kE&z3HvVvX^?MACIO(C!VyeQ$^xyL}}?>Gd9X?6O+A#NJQ_V zQABEfQ^CG5*7^0PdIfvBcW}fONOH4wtG|E#H^^G0^qHKwQ};8FjJr&diu6U|PM zwa?!At$;9CUn*wOWix9;bB^iq#41TiCn4dAWHxiv&Y0B#cT|y>!Av#sB(kV_oz441 zk)ag~4g(*bjvH%M>!&m{;f6%?LQX0j9qQ*F0eRz8NY|!+2WZ!~C6$<=Z7!JfwD*Cq zBMB)Anxfbt-^t`njS`V3riqNIs(Lddt7%)#L{pe+~9B&nO%t1v_0snhmj(;drwH zLJ~i+l~o1uOQ73e2cHjBL&emoTq8dsXZ4Pd&@q`9@u%T&ACUg2^S?MGYRS4mEp5B+ z^XGRNz0OIGE1%jKnpMV-%-(=H&k)O*O|4goS0YEdZA!6|E%x^{riHsZ#;+N{d&Ew7 zj?ggh`0hJ@)P+ALcT3%Jx;HAZdhCtO+PvbKqUS(!v^c{)YJ-xnwwVO9D@uhcGR%Y1TW zO1b8{AFgISD^0VrxT?&U)HpmSwU!eI&oqn$-bCsYp)W@XZDP?36Yzm6wblEJKc!BR-sN82lA zQ26HYox1=pJZ^R1GrO`7Qu;;iRAiYP_vIJy%}HEvj+N9}RxpwE`L0K^9|+*9y0jfG z;u^%*#lh1`*q5%4-3b9nc>KYD+XXRF|II4DDR%o5eZ3LS`;KGVxbf(1sOADOELP}Q R9a1_&`lpR_N?>y2{{SxM_d@^x diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileNew.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileNew.png deleted file mode 100644 index af5d1221412881e8727fe26930e5d0b5b0633aae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 768 zcmV+b1ONPqP)R27cmB`+Wkx8a_@65j^u^siVQp>_ zPwn8;)Y0kK7)l|lBE%wFmC-v$eL~)Yfy# z^Ob>gz1owlwa4nuL@ZOXxYpY|_=&3meg}r2l-hGYxpQ6xt+akF&AwE-Rj{%5WonE%=bMnbMjE6fFxi8F4En`*+~J=7Qars`&=Io zhuwOigX}AaoB2WbpNI;Z{V^LaLk(JDtl#%qy z0f>Sm3j{{aCY8&CEXN`MM|ZE8%R+uhohP>-UnM8m)ey5NDv83-9qxc}B#Vq3KoHKA zr9$dh3?K|tQxUGnzF?FXfupNPBJcqpK@|`Kj_Uz9$Li`v=>Q=x&=v?xE!YNlY%Pp2 z`(c97k@x;0y2r zSkx79I6z~aP_V?vz+;97?mOd?a$#bTcUmw3OasdW&9Ju0FEPu=Z0000NkluMLp6h%0z3=<;A2g_#%st8T@8|R6`^WPY zN+~|cy!}H_Tu~a@KD%tm_m%7DBeBj`kG8vQU){vgw8h}2SJgOx_Wy$a@FNi_DPZfe z`nBJwsC#Z*QE@GJoQ`tuDa(UlIM}E5i50 zBA$rOU%pfGhYOm1CieM!Vph$nt*?~TY^loi`LXV`5}%pm#t@`))-rF!=crz=2waH* z;&%?&t(Tk+00|(JQV1c$vDa8QD>{33#j+hQ&7QY9D6ARciDBIrh-i^WiBC;mWoDv} z!6`vsx{B(RFHl;wgmA7OUDr{{iz~czzq@99`0t%p{lXW}qVfl#^_OC$#}{5(QTOzo zk_Fo%L2DS5x`{{AAP_~_I{M52cSceSW=aW^ZDx7>212EvwFb$?inmyRDnA3U(o1R+5=&d7U!}&E2ZTB0{=@8pPcNL+3uBftDi44tm{OIN(koEl8E)va^lqVyXUj5-2)s2 zuHBC#0hkYqo2M57N?UsXwh`2YX_07*qo IM6N<$f-Pt`I{*Lx diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileSave.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fileSave.png deleted file mode 100644 index 8feec99bee8685290ec292e7baeb2e23ba4bdf0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1205 zcmV;m1WNmfP)NMq!WhGU zDb0?ir%%5E<_$1MjY0D7B#lW{;<)?El`Cg|1R~9@%$x6h^uLpO_>ug@xmmgJ*No_P znnEHG0)+hmDMa6YiFRG4o_LlgUp&G194;$ z#|Q7e%Hu~Tky2s+BT^*7)&c<-q*B=0DRAb}Cf_b=^dCQH;0Q1UG+z@p-S0s>z(fLJdaXofa#Y{a{XE!DHR|93_w4?hG<8kq+lom3=aj}y`daH}yY*TMGX*PU}a?k^Z$mMe=dBBKr3MP(B@#**TcTpzBa|A=h93v%QS-kjptJB{4u^z@&y0LCI4T6TSa45CS|$;yRAqEsIM__GKF%A16&yfb3{?Ev3O= zWp`NK(`0awX_vDHsHDgM8ZYP2344@ECC0|a7#$t8fc=zn6g_`~Gzu^#jRElxKudw6 z9$4;tmaREZLZad}%d_8@%6e3-*Khp}bb(|KKnidjfs}wT93TtVTG{6kY+YmJ^6l=8 z>lZ#>U;q0&umyDY?jo%iDv^z46gTJE4_y{w-(;l(uB)>!J7T{u)|M^Y%M$(Q0;0yWQjJ)lC|WuBldAVWm>@ zYqi>@@7LCS|K4h~T3%gTynM%)v;o`!%0SCx>I0b8{Dmvcx$`r{^6IAfuzWTu7V=>n zht*cAvEloba;37qRxV#(t5)yUfG*GhflRd$wsDcfR`M{f{>xbi>|uW%=st z#`gB=U1QP^==3?TwFS`Yb4+F%ysJLI!or#FfIoo|Kmay)=NJKTf0)V094!6;(N7PE TmU#bB00000NkvXXu0mjf&~!wG diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fit-page-32.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/fit-page-32.png deleted file mode 100644 index 98bc12d3ed62cb77729ba88caff73e6a356cc540..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1330 zcmV-21IF@x9@EKIX4D0x-=2@ zTo3R(kC-Hc6mzbeQ+xEi+S$PQz#8!42V=*tfXIR(26*lHK|D_SVtksFU$(Pr0{^AVAuPxx} zbOQ0jF81<84cM!QyR@Fht#}ew=-k(r@8a`|ckt2PR%i!r5kXwSyq822Z|JU#IYEaf&4s>R;fS6D3PBU>VQry z4PkA6B?ZLFP;U!#GUSFz)&~RQ!3ad?a91M$nWW_va8(GT<fI|6#5JwVt7}N(%nr`BzW$V|1t!g`$faa~mx6ayz@c zjpS|)2Rj?^=BWYp5_rvLAER0l>cApcLNK2?wjW0iw(>Z>wu_R>i%29NA(JbR+hcfX zv{!n^ReeMn=Yq%8OEC*I2~Q0%GSJR$E|fg%WbzC~Lv%DpaDej0G$2c{;=tY23lVRw z+6NAHH6Z<{0Gr$#BE;sHhgdiQK!67zYLLQc`6c=8ncOFlq8ML=ODplOq;-FM=v9yt)CX^CqeE=F_xVMRny8x5fGglGk; zgI2|g2q*{+h*Ho33ROfADGCUPQf~o8@TwPRH?&qpI@A8MGyCQp|Gf9j|9#IvED+9y zX)K5Z7(gXk20T0_L)m{=Ueh<~gUM+Io4N{#{^4^rb8Dvg7**OJq# zlt!@e#<#1XUd!`0ZL>rPp*wbM%KkQYal%jod)jPXN2`x^FkwQwC&&Dahb})p=l7g1 zIBh;5sjaDx^({3HcaN+ZT9SP{X~Dfp%{RR6x7u-mHKh@St=@XI$;4)V%2pqzB}v`k z;R_S=>09+J(A2_hQPuO6_15Iv(Ds>Ns?>k{7~acA`06uZA)9Y@nTG4XyIf*2=cU8A zqUXNUNy6m7FAsa1O0;_5bsnC}m)9OGXtQ6Wf9RNf+vfCQnso)4$1j#F97r}hTtEHp z4I?0bMMOLLs`BN{ORNTn!AEOCY)gRjV{uB&s%m z4~Q&G6&ZlyU@2h=gaCvRP6Bee2$jc3JylvFFq>ic*jzSnLztn&m6$4iID)v*5H^Pc zm<%qB2{QrALTGFjU~&-}i^C=|`56BH62(%CXc91od*tyx3F+1QL0td) z$+YgipzLIrru6F|&zDWty{-JG#L*Ly!=Q87ady|h1!Z$yzc|c`%WpoUFbVHA+oe+I zipu9dY`UsheYqt#+gR$z-_qD|py$|KGSAsh+<7wY)+xJJT2966Ui5h3ou|~-gX_#> zU)M{VH{Pf61JgghIOEli=6rNLnViude5^ae8oF@(<<(zwTIcDO52Egs?^#-bMYmcd zgb&6Cd+vNd?Mr_sj&nJBy{%7SQ|Df;Th^=Vj`gn?eAr}F78d8@KF`UKeH!_BugzTY zDw_=~T~BzAW!j7Fp_6L=sJs~17JDu9S(R0wb%511#ZojNednD6GW||WO)moHN>z|6<%ZKLpmWj5{%GZEo5s63b8&j2M z=~95Kr^-a!0>$@{$`hWcBtPzgd#TI~l!Kcn8%U86+atv0)Qm`BTCvw;>r=Mp)>gNX zl4y2?T{|z5hn$O3)+J9^5ReiOQJ`4sZO^{r=HqOmx1c&m=grF6`W%O*^-bRvM0#(_ zq6l>xUPK4)@4g?|IA!0*fu=hkx~+8lXQkZ!Bl!b5b`hV+IDB9 zp5zcD8YnW(vC9*9-nO^QU&J}ztfe~6%RIbk+8$H-GWm={o6Xmg#@dJmPOK2L^yAF& z_!2p(HY7Btv3OT*M6|6(J&uLU! z)t)2S4_3IT-;2xFR8;I8GOA%LuNkcf1~PpR*^i2#Hb{bo;2I3kePiTmg5L(|kPyWG z$UF9^QZFekja5ZK!>XblMO4=j1zv<$<0=d|5nKhXGzN&r&=oQ0O2BlZ5cQZ!u8AZ> z{@=sH#W5tH({6#|OPc^d0)Bpeg diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation.png deleted file mode 100644 index 3a49172fa17b5d09511f331faf39f6c6ab637ed5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6800 zcmV;B8gJ!^P)+jvyU3KbI)#>W0vx;+$*I@OAA>AgR(;y-n0Pg_iIp^-^Ha-0T26dZ& zPJxIF6_GChvwl8R{{|kFCtd~_fw1k0QLnYi^xeLvPzCi7OYa8 z6_IsCA=araP#=r zz_!2ybI&gM!+@^3-X1O6%^r;EtYW~lB*;G7%K7jQW66yUt;K46ci%v-%@hXOOr z{|}{3l%M21+ttIjTLz9#01Ldb&j9c0_V}#wOaOc!`o{Z{|0m#W z1?nH_)q6{z%=6~?oh@)}0^AUwTg%q3GfDZbKu&*! zLiu$53fQ>Y<2WFh09X(B4(UzbQs7)*-3mDE31VqZ*#}M8nI+md2$<#3{4e0xZjb4J zVFGm1_oZmy{2lmJ!1y+BTcOV{bIKmD65uxWrp^9B?bJX}2f1Uo!#lK~#L} zFRAwcyS9n@B#)ssDNtvTsdH_GHuokixm*MsPo%BwuU9uFe@|4q=TH68i^)~kE9n%I4 zyO2DYIA95I3NX0aliqPAKzGvLLsho^pqvA&Q*(QhOdAVI)_u~{ozf;9LxD3%Z+0I9 zcI@`VcZ3O0b?%o*OWJzT<5lgOrf4~~OYwOn>wngxvuz;|us!f+Zw!_JXW{8NRv9Kh z4LLpx%m^&~lYpHYWIU@USV0A?pZDfoToYY`(NoZ3Z#@^MDI9n)rqhF zq2|qUBTN9SfgX1jdL8HmehR$4qn$|W3BJ%KzHfMYi^eu^z|p8~#E#=^3Lb4c&IHj? zb~LI>_c{1Z0;<{$F@e<+R1)-f_=b}_W&CHu^lt$CGBBpU0M_p}On{0-9|#coC~#0W zCg0Fz^#s4D3Fn^-&gVMRk3)cGz44t7e7LJj0K5^nF);aa(G5;lC1Ajb-sfnen(*%L z^>>F3^=Dn+$AR(w4KTK&Ob{(mKOkw0>3~;ILC2cioP0y4)e}5YGj4n2yt%{uI)Jo- zZ6WZf#+d-!^!*3vBg{(RCrxo<#esT@M`Nv@CE#L%yQd5N8wGrqq|r;f|0=BRF3bez zrtcWwAAzOlcHm9jp7g*VO)@n8s{#D$kvw&Lu1o#g9o>8REAoltn8Ovh#5sqEj0S!W z>_8HhM2$a+?g3^;OfmzQ?wos>E`f-QK=t*5qg&@X=f2WFJ5zw|qJO73=eDf7je>Lx z2Tn(i<~F#<{lIa~xkoGGj+o$NR1aPj;?Kk~lwn>*KO+m!UF|$n@G=W^`onBW`08TF7^ z2zt>C=TdZ8TZA&s3#h1h4t=Z6)4Gy1O=T^VC0*cH`zgATS0 z-SRwY1d$lfD7?$-QQyGLP+9mGU?WtgFdAi?HBmkPP`VQ+s~24^m!dk2m*`t{=Ao<3 zvnb;{4b1SDR1w)6m}YJr=A65samouoG!MrE|Ba4y3{Rq~!XI;SL`*OS9SG2~Xb(D> zF)Ri4be==b(zS zS@dm^=XRLJ1c=BRQ03D*%xwq!5ID8fCO&3@!Dxr$o%UL&-g{?LwigvtTvjLXMIibH zjz<~i98^94I#KtbtIj&;xq1X@%04)SsCj66)oB+*LxC+(y~tG3f-`$9AuY}8)U_gFnitSh)MV7O{W?_Ad3wYMzGKfE;Qfg{ zo6cWn3Vzrdm;*^$&CaBPdsv$j)R>;Yw6Q@nh`#TD-+za(mqb^XJyBKrsc6i^Yk<4Z zct|tQH~SUzbmPBRoxUC*vXii#zsM9gIWRbz1-NPvux*DJ;LTp!b?XUY>u6tRvK%#; zpC1^=JKAh>Br2sn81=n42e=%#1znk+h~C^6BPOhS)%k#PE^%a=ZGNXhy*lS+h{!nL zAzIKeha206F zpP&WaozU;7|AtHk4m9OXG0(0g`9`Kz&Hi+urgB*;$ac;pKL`7ohkq)7{4CPnwd)${ zNZbAd9=i8-1Llh1JY%PjrhuK9Mo`@uz%{&jeeQ?HC$P#@|3q zZFiCa?O21>$|sX(MLC0XRI(oQbC9x*Mr99nQ#cllOJM77*6m66Xg-;=G0;jhh(`SX z-LIDSIvW>QMnQLKV8_6qz5u+TrVjaWhf3QuplAP&kPax}P$$_;0}bFkrtB1R|0Q$3 zv@3fqbR`imeWA1$`#RL%&`^FWv)k8NUzA;JBjvfB`;D+W(^$74F4l?lR9_jj`k-nqmsQwImUPP{S0Th{`?y zwBb*H?wmtr+|L0Yqo73&@R+IlPIG@FkG79=Y4X=19PeQs#tSQ&AG>Ko!C{GBOO z$@u}5Quze^xFW7=430wn1ks?JjUMGJ4U5su?5Gm$Z))4e1j3A-+l^OSuIv@Z=cqtG zdx6UXWw*62LgJZM@G?{IvuzOfDbmN1`-;AO29Nb8xGJaYAmEdz8Js^TKc|9MRD>_a zb6Z9~Z95%_XNcN#+~xJtp~Ad9GwOWYl)Ir76P#rVp4BFydj`1lIbef=_5HX*nR^sq zKU6g956XSC;ri{ZL_v9g$EdZqvggqBK2-GV_x0DUUNVxF(_d}H1U5*+Wi=2yhGfK0 z7j+;vbUZ4-jOzsB4xx&kkYmgoli&#&T4gK_u3f({5H_nMHsXTPv@=BRa}gF09Go%nV}S$oP@VD1kA zzCb$I^-6R zd@AUpSH{mza9(u(Ad<(m_?kq?<7`1%Z9khdfq;NnG8v}x}@OIkOv5Y_uP893rF)80b`>-@pg zspQIz+7`?SF#LmLB=snWcbdVqOA#ipe);<}IM8d74g>2?xc}_pytlF@+AcBeo?Woc z-X6WBT-ni$uK)Hg2R`3sU)J+hlhn%-s$|c`M|WVrZ)q{{@pT)pebclUnygFsJ|*he zBjqgx>uf&OKkE?JU^U{QgU*K!^#RHNQKO zQQSFqD*74nVHxTc-${6<`8~-wx2#0nuc2=oz%UUxK2%6V#)`<3=&8ca!PCIz&bhP8 z5S#-8g9#$Lxm^N}b_8a3IK92~;JK|#Md#c?R1+J+Nq(8g1AHdBIgX(h)$ecaoO`BB zn+3o!!JmUA0^g9g)AtRzzeC?(o2asvWE??<%I6!;M~EKvth%*yczRS^ZD}7H-CrO0 zJLzx#Y+&n#`m>p7X8{>v^iahKreZL8R0G6XiQ6OS3gsulT8X++HA%-_roEYM;IT1` zuS6YLLIxi{Y`8xkH0`Cdpsko-xT%<%9jpdIcku@2AoJ`;fj6hIfdl@_wDY4j@YuMD zAxq!qX+X*upyPbg<~Iv7K~&i~TGS?w&uGgESyFL_P`7J;Apg(=bCR?ouAJfywQ33- zb$fxIH9h$mW1AUZJgc(R%{LjE-cLt&ZbrGiNoO;kMU6%r=r=p2Wd#*o>`;x}-2nzz zNCBJ18v8Stq}@Sgs=h1)H=D|bG)U-$rkxeQ@D^pqk&XfUG8Lnl2k?K$;H{(yMBT|k z1|O~}Q?=2bH<`9u8t7()oaxjt@mTZw9_Pg+vf!MHUFYo)Y!vXIh;C1 z=67NFfQameii;2O9^Hz5lVj*~u&dq7@1T(ARmfOMj-ziWxxAs}%KH9S@h3Qqw8G`4 zinMHJa4eueyk_(Tx|;N|znCbsA4y{l2khR#&w-Um?A@|#1_G;exV-@a$9WTYLPb0W zlXkaylJZ6uUo`c9RiJ#9!N>3Ywn^?|?(Pr+jG|8?8^?Go%>+9b!XImZNShS9Wgg=K zxV9#3f42Y)xl*0Q*e;f6BNp0ToV6zfw%R_g5@vto@E()OreCq2WijhM$Gn1dzR*0IZ7); zlMJF-Z0XUsh;}d_UhT;5-r1LPJA7B&ntOxymk0qHiIliXRMwU0=X9ic>$+}v! zV;zY8Sfoy?Al0=Bj6`H4>Yo_HrS0Nu1!CJ8zh}#ey<@S$F_m1735kHrJw~zS%-!1*TA7R*hAZKhf1_Nn6&@?O4Q@n zdPRjyy=PIuu%rbo*1CFXL;bbk1wK@$P77p57-ZMiK%Dg_xVsY!;I)5gV3PgMMSLY9 zeAGz8=e#y*&3TAA4_S-nLV1!}A+#dTzqCo*VcsCuqWP;p#|h*|5}ns1eI#Whl?_)i zaBpdF&o5f9)t;bbaLbbLO^eq#_qR6jRRZVSg=ng|6`{wdo@Aqj>AS=Hu0#82p}5k> zKr1GggT6HY8%N>rOG9KSyp6e4CD&3dAR=o3UnQJ;V+kr0Y8vbYaUBskFtcQND8DI$ z?9V~8yx7gsxQa_uZF+(>m&$`khuZV66~GZ4pv78K-&Z4Ey8(W89iIcJ=a_h~`Q7o9 zF_FQ?jcA(sQRdMi)Jy1Eb8j$kP2?HWB>b=Wy=$~WwFM$F3=IMvLv1U84Fyx$4V+*e6&7;kKlu3;o4nr+30if~$K?DSG~a}fW~ATAw`kYwDU zT$N_c1O4;B#J&O?no<6Jq-_%(qlVBo8SPo`?>RN#v&YX;n%TV1LFE&Ii0tImIjv0n zsvsgei^xCG7=JdE&F|53dGM3uock@XJ?eoJ!`8sFBI1X@uLDjuzc&_<9oxiL*rqTA zIox$DecV;bUY?A&Lk++Emk>7iDC}ZS*fybu0ujP0&}*}@7jk89fy;*S*`rk59K;70 z#D$}ala4!dei@=F48XRe{TE&IMr0a%k*bsKTC%dE;dNr>UrxzSSRQg4 zo-Jr_kx|c&JJgt-01Z*^t9+LM|6T*`kZr;hHPY^9WiMo;62P;+!SQhE`Z>tgHppKt zK~&><0@UMnMqrXAQ)5UQ)HcCqvInTiR*+;A_h}Vz{D;ADNv%u}HL%Dukh`>!wxW4U z0}OBmX`_+K1|J35+l92UX)g7IlR4VMJGKIj>rMSnG{FRR!;zc$jAXd{T3y@Gv~!_Y zhEGvZqFJKt4N0q;7X!Q1fZH-yX@^ykCVSg8!31}h23qcrN#`dxvBpW5NI0cS+k%!7 zGz=k~Kw~BF@iy^V!_dN?-Kg$3Q}@-pMs+j66{eAomFP?@dIEIwGZiXs34ml9k;2a>zJt*%xhGt?E;P1-TrS{l&eKg031m;rOQvc zJ?R>EYNvv6e$gP*mA+{P$8ge8Iu{LaDKTgl z7-0nPs7Lqmvg1H<6P{}xMvJ^gbu)pr&7Yf5W|Aqhu)-j|hp@rNwKNpdDUOc4r1i8zYsXI6@aPe|lyTYbJjPMQGNFPix zT~JGX4K4B-)yf1>V>Ywsrrt9@k8vU81=$84xB84W&@SL`(lU)g>4Q;Si2bCrN^X^z z*Qg05u(oTvd(Z4dPAZ7+%D~%FDy2(*zff29MP46Y0LJIk^HTC#ZKre@s2A!4>yO9%1fr#p%*vi} zWhW=EQ7O6#62FgWa8h*7hMB$ED?gsF!AC7AT?X<6>_LI_!KmumZk~@Z&vNq`HNgbd z(Qz7m%9D6!I>wa!8exNv%IDZs?Lq}`^Sm)yj2B0mWLEa6=6-Hoqb8VOq(`ik8%&AH zWEp%+CnF-*>U^OIHXbJZve-A?W^I2pD?7<#oELS338IF5B}sf8O18nrIo%%Y{(g}R z3lv}HndkPidr5TfrqE}i6HG8UKr|Ne!xW>)DG0a1P(PN+YOj2BI}9BsH#CNR%dX|J%yU^ zJ!NjM4ZP0$ZzHR=?VM|-D~8TE0^H1tKgh_8Q4lh zZb3g0KG=Dvg$bnSY9b>0qV{Y95ghuxt-@HfGNyAb4gr)4B61GN@HRed;+&gX6kldL zWj-k)atykYU5=g%)H;e$$2?=uAfWzAJl8q5NgV{0VuI4hMTU^g zAg!3EXqlqVhBem7?!jZuxozt}RAx_58k}=0P|km)$#(J}%EepG$s;1p=~SX~ z$vN_VyXi`ia=BhbDR~unq|_N9dl$9b2m$il`a@g3cxFQ&*ZYagNDQA?w*RwH?2^{Jl)}0bg9t1 zLOLE3C(G^rw8umk8v9eCIa963$}D5uuDcsC1=}=82T1J~;;q21G9L9f&qvJ^VMxug z?^_OQH_vyD1?g3sITY+acs$yMwr+5#Ry4V&K1MTPw48nLIA1Y*{zF8ZsZLVHWp-JP zN{xDW*ND|(!^Q%~*vT~Ql#gYNso^H?Tijlpr0;oHG;;@2>xF#tE+j#`LDW+7Thpaw zXrg-esm8g&@HY#-GlyS==GAOIr}|1fp0n)n^DK6&!Z878i!G5lp-{lutLwCmle_yv zWv8u9bz6hB2dmzCv!_twq8s2Y^{Ti*1+fbbRC_Rz3C)%b(oG%(A*7v;`(w!k`t9^wZkhMb`}#<9VT^0|1rmcH=uml!$u=IP zke!8xs-#kNQ|{$^wl;pf-n>@VI&S{F7QTCv>iptde(jWlX*??|E1@f;_@$h_`OK&8 z@deD~{`&FY2=Ip%+`HtzA56>{>(%1)Evdh_5={<~ny?9!RyVfwv$H;^ezdDyW+EgQ z^H4dg$4Ea`6j_zpD$nu5(yamD&!aSh> zlr$|9z%yY162#}g0!jCR=qWzJafXH95p-+G06}*YM0*x*4|{T1=7T5j5!NJS6M*LQAI?$9(EsP$)2mIqUTABqI07)AZSS+eIBoIAhs1aQ4ZrxS_JB>i zCpltA4-2~4lWea|$HwI8Q-Pze)%v#;Ssdy5Xyxo3uNIvuv)91;Tz1RFFi|dK=Ks1f zW+8T9u>W0UZc1Bma!bYV)CNYJD$Xu%Yg&cO0ecVKgaJ2OnGV@dkxz|x(=R6u`)CNn zML|mwE(SgiAN3%lTPH`_^S_;}nHwyR)_LUCqt%t!bMSaoNpBm}V0bIS_ieR7dl>TK${XluiCJ3Tb+udMvic-0uEspi+54=JRwzkD#{fetP#2Czz#? zmB7xYcg5Wkw?9)7WHW`oVzY5wO;=-B7eL>sjY)f&+o}@!2g<^9;>{A-I3oTcXF8h*Nwwz{S zq}5q7n^K=76>`ltWLJ?%qEw_Nx#Yc9d_qSeX;zHmLgQ1iLzO#|hV$V~i~0 z)Hiu@L(iev*eE&hL2H3h`N6xH4dN||wxwwU?(z%^`}pYlHa?EWct7NPaNU2#$XT9B zQuXL;wbWI_$|y=hX#;`cxZIa-*uYrvKNZg3yj}X&V{L2e{=63>R_CZv2bi46DvM;QQoR*}+S3 z;|6N2(?`>4aQ`^kb^2rd=U|VWvxsRmb$O`JAZ0m2kncA;mvfUluPbYA>h-Mh#DCU$+&X;C)cWigix!K z>UUKTNMs=habJNL+ITrF5amLK8`tSF0M4OuB)I9Q+)Pl)hA zZIrJdMGpc4`0zTi#DuCdV}eTa(tB7PAc_5vV~3PAr|;K~m40#`8_4K0vlfxK0WKqa7={}DsK=xZGf8ih$pQs9KwATDI4+Q!9Zn z<^td|U@+K~;5K!({`$HxrbE3Dww;xoa!p{2`6Vz8X9O_V6=99{cM%|LGX%T@^bwII zxu$b_DLd6jV2nA$81oqL9(5JqvvXkbTfoUcBcLhpJ77A{5cFBWxxi<}m_EjspuuD3 zD8+wSS|1X@FQLKM)=4V_{*?KM7RL|2trT)6PD?Q%)P3fzd$2eD}lmQVD>c08a)8 ze>QM-viAnSL|@QfLZVm=>%Cy4|LiO0nQHe!V42hAr@*iB-6!80B>-Atw|iBNAeI8% zfr3=;KMxhYpl^lQ?(>hK)_*<_CMThx1u!LG>KO+#$#);^v`PRp1g-$qIGw){7==CS zPl=-ooK@`!xE!P-{M@Z`BYf;D!85Qi4NZRlzH;c95BxUY{k7960ni3m;BLS z6P(w;OTJ*=g_=}#2f$>%?kuQ{K=*FIjaXB(ru#AA2l?*T9YP6!y}Y4ybHEo>l5WwL z3f@pBf+OKysp_5yMGMt7vM-E?$j5QO42OpmK)ZYkc)L{s?+dyLSnG7$24FU^BH$XJ(&1?;uz$VAU9Y}lFFGC)WVB5p2bwJO23p?*h0Gy6JdUfah7lEVWYNtIMzTOjN z4M=zRbJ%zP1y#QCjDpv);MD;Aypc`w`Wo<)d<(tal>qoD@N9taX8^y8yFJHFP#NXj ztKkLz-8Y~*2Hp?G9%pO5%Yi}Jtao-8B>?sY?haTve*<*Jb7+Yh96Q1NQQrL%v|ORK zmEECJOnp(pwufHt0zb>Q0^~#qus$0@fij2b^}sNoajuvd0C)QW{1OtQGx*x>gXL;H zu_VTR`62MM(hZ-I{j=Kbe^BkO~aE{>g`YZi;m_n^jCgsb84*gGBe1Rf07A&t%D zNSPBQ!20UH5Fq>yfivrq5p5@UG>M%cER2SCGF@Co?7y=EM$UP_>D#>$U>z)-&!`ap$ za~&`QXjGrV_u(3N(N}Y!sAfp;~WQbb1n$@HSk5iPU@U`R|4P|Zwq%eo@o^8 zn%)Ii9I)t{K%R{y+DUJn6uyYiQ?2Hg+XZ2ZxNy%^XAT2kTz&BboPf2U>i%91w8@zgV7GT~cq>%h za3VnX?*qTdxA1*%;t9Tq6Zcs7+{gVSl+`C+ScBAXwvDBDmJID0>6GBy0AULt2Bam( z39#lwxV5e0&Ye$i?F2nzcIapizt!8$E_oRFusg7~9l5Lpy2aIo5fO|rV?3=ZB%n0K zI`;Xc66=(|1`=x_Q3jjKVABRD-w5lZy9pL;f_c?2yCHlsIp+BP8;$vBxE(tA zKiJetq;Z`10bVku@?1Mta|66LLgeJQ+elZ8F$F+>tOH9^_2^Zgmxz3o4SqjoQ3b(4 zyMWgNsx$@;uuy=7BA^NO5ahrh90_2JF{}Yu1BrD|QwE#YL&XNzP!4M4gicXf5UDAw~PpdSQntr zY%6jL445o(xBvViV-9Wx$2EeZn!uq=;D9Eu&+gE2ci4RoXxsuCw1lFTV158*_l#6E zTB*XC?ACy+g<5aasakKRtM%oux&pqdgl{Tgeg%A11~Xq0Ss#RNk}*sA!u|kLU`02P zed~dZl*JgcANIiReD&`t;CkRz5vd7$F$kAZf`(X&)>T-af0{$(E715Pukw0e43v%& z>5?h&9gS&O2*)*spErWT8pDB2VZWxZXEWHNIW%bwyS0F#y`W%EFfFK`82U0`wN)Hn zc{ZMCyUOz+#MPgFUO+NBw&icHuZ96b_euW6UYo zp#|WnUNC(qO#HDoLev6d;p1yW(&Yh)t&B0IXfYgH1jpg6zUG3XUO;^pKVM{356U?4q zn%4sl3G9Tf7Rj~i>~vMR5jJe}7RlwXWD_i?fX~;%%&8*FQsFhmoP+h%)Qj`A*f6?; z2Sr#<=<`M7JqT8UBJA8!04x%b9|N>CX3t_+bTMq1*8c<555RGcipb)by-ZgX)ZLn|gX;Bm zYrfIjny=abD?f$97Qyk~f+-J1Rg3j$I8sD52Ied>#w-K&!^Q(N(sSN;W9AKn!~NCc zT#&KQVT#D(aWb5&ylzbO8Q#`*6ufes$RFdxZ;UwuxE=5OL6?cZrQYx3VZk7g!vMw@ zQ}7KOT?EH?qs}2s;73hi?`F`V88mC|O;;_T(4VfF#7THSIUc(>NU>n)C?bz0Q-TkG z6TLt85s{Vp`8CEoHxkbGnOFr}2jlM&xgrMIla}tr^m)Lph*=I?11+bhxhqTL-oN)&VJZx7rIQuvmFF<%tTc=>3Mt!{87jE3&H^3~P*MFo5WzQG%hAU=4?G+#e$(5iA_;D&F z7^W)sPSs$0IQS)~)Qa#TR2IWQaWZy2e5mkOWT^mWVY7|sPN~HvqS()=`wLa)^>%Rl zCXbFvkaloPzJ=~X8)$qx%&YR~+X!+L)(GhEDZqd&JSOR+&g!M>(luTTh4;b|tq3!r zwllPfi@{ITFgytE%~1G9VUtz5U&Zuf)1LD|3=cvRz zT9?E4Rf?E$Y_iB~7=2E~6NF77;qlP`8}j8ETh;+rk|qlo)(O-Pn_r0+%u)=6U#XF) zk2gZpH*|wG+ODyYPdBP3V}5t_;-^uG>jCYwYgPhe9DJDxqn+UQzGKG* zkoFp2?@OOrvO@qzu5Y;-O!=#QUD1|j41a~Yp`q!QJ|4GEyKddXb|9)5f ztOU-FBa}TVl)xYVt)iy|WHrdJWJ7&j59Yuquv8tO^YLVqG@>&!Emb~%0`fN0bbyn? zyzj;n^h{yP#~MfOr*1+i0p^h50@WEwwn;Scno{y?LfON@NO*Ov>JI^V1*$qFN$G=4 z|L6OOE=tO0iVk>Hb->}-5Pu8ItWkt7ghUVTpduCMyhCp$2^GgWK3&7Mu@I|(%YdQ` z72wC|ro>??-XV@q_GHirPJPkYhL?eihBwmiaF*iX$xM{sA%)<~Y#A9053W~CtOFSY z52kwOO||H`23`uFu`RI35&mZE*?(59=Rj|TGtk|<1GLnO;2!oYK2`-73eV_pc>$RY z)g{&nn2v`Liif08S*Z}*q!7fyTp#GCSJgEjHzrx__fmO>yy)QOind>2?_1?G7JfO%O)w+ui7Yl>lFviZFo9GEE>j4G#Kl}!IQ3oU zP~$;ZeV()K&})f1;cJhk1F)-IHy+|+V$3RvwNkG0a95HdQn)uL;7Taf zb{WB@;p+w^5&7^#;A>K?>rx>&Uv=_badohW&;fqnYWb_M`4VsS-U*KIw?EY&t!TNK$IAUgXY^ofe zhm^S*QXx4}A$dB^PWItWn4eG#&w)f&Xm>Nr@c;LWHFPX>gkOpE!Ecrex;%yR+Zvp% z{tfV+Pj9B7?3cq`da4xcX=E>T#vhS~V#ULKnJU443dy^<=xh;TI84`2l&qFmx*9Zx@+QWVizzY2_RD(=_MS2~S0S|vsJoLy^ z2@2SH)*jn}CkQTsQQtaqpn!Z*SNQJ%r{>udBXGY3WRd$PY!YA;)(B^?-9`JH81|f*2d4UvG&ofQwb zLjgRV?^isx5BuI|D44Il>VYsms9s;V>J#VdUjT`I@Rt~QI7adC-?a79Ak!(=ei;XW zsbGS#6KMDlYCFJL^`r!T4xt1Qzsfscu21vdVZDCV8JgY!^EWHL5?JHYC2&a0JoHd< zORHSzklm$_U69MpZv)Nsx?lnoUIZJQOMGs^=AXa;AOvq-uChi^@Ur$QysSvWH3CFLnRoX z_`Nw39IwD8pWa*GgR$_5R%QWt0?ImO7(5!151r-Y;B1wkW44_V7POsUm~v$43>WJ; zv=(G6e37Hh)2?S{W`biFJmu3`;|TvdkgHP|a$@44iQ3&P5A{wOglDQwDa{q(yrKI`4N;JI{qK(8_iASO+p3{x8?USA1Nl z_y~30kPcxJg)k?%{My5jzMY^3q;s0QL)XCv)vA-{L!tyOjiK{yQM~q#`u+%b&2{(? zkToDBIZQtnz=ys-G}MkN3{u}ob3-nOzDd~$UJQBeemOj#JA5t30Qg&$ou||E9TE1u z&TyLR@Ua%V_xJxE5#S4vLnZi1@sal0pRh`xgETTe%T5NL*A43myrDD*x6U0(}$P!{Lv?IxYMPkelJtGm|*84uDa9-ETm8<@kmZtXsV=tI)fq zFo^po#KYqv_-^>x@1Tc6#1n*p!SL)xC8QM~m%{C7_&Zkd_jXX7%VFXo=j(qTYD>}t z>xu}UsN>?RB82p1s06D$J~jip#i;~33TILr#JYBZo-in`j_3&^mMGj+Aj4DSO#rS| z{EgPn+QR`;U}eI=Hx3q@71EdRR+#C(I~B@vr~rp4K0b)_ZV2SZE96t-AXwW8-iqmd z0u3FY)kluOW+E&N8n&q$U$Mn$r61hV zPa*f+EmwQE?Z)?o#0#Q#uLO1XF}24uv9C;N7gr? zmB(8v)p1Yvg<+pLU;kW4^oESg8b2ZbzXFKeMBQ=&yevBrb!y<81#fSm5J-G^X8< zl8;WQ^J?VxLpJhM(Bdg7Xgk5wEb|U!0-d4b94Bu=m7@Tqu8dV%cs+g<|+0_o!JwmROn|&Sl%LDKqnEm=>cF z{7uOxvKwI7yogKH@B4>*r%oAU%soeXNwVjH+#%986Fk`zV~qJ3+<$Dq4KGU}vD*6P z<*fV%{^kFEmUaG!tDK~Me?RiuAvLWXTQw~s*Jy1gNEV5lOXvWtUJ1zXp92{$GU3c5ucZ zcvR<2SPyb#1PfeL(4p*;VQCCXpgp28iWv>t&`(rDX@ePD&~}0_d57YH_V8=>z-TSV z2xmU-0fWAB@+RC2vvWaHAL!?|^BviTvI9evY%)qA5VoO4s-Xo@8gT6dnMT=0g{$D% z<<8gts^{>LL}5;U$5}9z!kRWYhOy#e|MZkrora8Q`cUvZe{-`Y|2sz{ILC6GQ40rN@KH> z#)WpAd@D`fp*Ue6lrC|;{x_32e5ByhjE9BVayZxKO^7WYQ5QJ0TunV)lVl$YLF@iX zCXw?^W}*Zys|G`T8QM3Kn2Lq41-v&f=7Kk zA4Rx81Dmqnmq+L=a8^p-HSGK2CC%^OWm`Kz#D!~HPaHF6)+D?$^We~;C@D}*g&G1nQYcI)?;W(ik z9P=ONPKT#pL(~jplVGv`{uEddLJp1C>i4-STRx&H!GBX}UqC!Td@1X1(< z1LivTz`fGtDcG<*T|1WyZiHFxoetfhU)cBmtB%))r&)Ldmq*#I$E^gnrCN+Qc7hkf z;_U?Iz2*$7%R#QnVUns`z#u5qscOn1j9??-RsX$dX+qh7N28wJ#;F8@RO46aX90GC zP$t+BFwM>IF%>G?!zuX|Y9`PF1}r4poemn>!+z`3BC~sn=xE?eC5KR#dc~;(ZB*lR zjybiR;4b(o1k;Dn;1^G;xIDr7^o`E)*mHY^+nqZdKKJf)NLF88Kz>Dlc^DX_ zWDrX4$kyCGTSCaRonSzcgPbeiv1QKJ|2kB6Ns}35XMiE_e7WL#B}l&{c@xro zP{4~y2|{l}V^ac;h~*vun}GstCkP6*Yy(F;svIbUEf+d{9QHz|odNp5NPRL`1u`-q zZ$d{nwo=vU-L99i=40jU8w0AgTMWb2%VwT z4Cfg99$4aj3_2;+Ez0ZJnT}(N-N-}HI!(sJMpr363ErxJ_;WPgysAhWP1gr5dn=+qZR z<-4P|cjyn}-Mk4`!?RuBTtAe(45YQa=g`l>zJVC;f{dyFgYbeM3$PhJ3PEmHOw@u* zhHo!Qa!va#*cQ4%yU!ipgxg@=zf=J2kh=Z@)8lMEiUORh&Isy&0eOcl7di!AF1-s< zLwh*dHKHw1it)zQ$YTM<#@V*<1e~@QV{TE}*DcFljcLUxLkym2Hze@>r amH!9i;pMz`AROBO0000(Vb?sxuk{_ni+`+VPf`QGO>ac4Q2lPo9@ z1;7CH+YD@MAfhWG3c>_{LZ$$sqc9jl#P~m$k0C6?9}Pf&ogE~>#0WnG3h%zUw$e?7 zr19+4yfcL2x`qh@H`_ky(ya#t`Q7^{`YoLawl?2J(`7qnX>YUA z+IW|H;^@(2uNCvUl9W7aZ|Y~=R=uE-tKBMztB+fqvCQ2$qg()@Tr>6e*v{W?Xs=8# zwr#IIo{}QlN|Zfs{jfY{p3$+|B;OzN$(!r5jkmS=hidllz?+O=)e!Drurx23*SPc1|2uW``Y&|%?YRfan%IK>$4N~i?=<|>ue=v&NM8DAAVK`ph z^}d){trRaXVMB;0;IC`~e213+qJCD2wGp8RAiDE|5Qyl2iZDckNr0kO9uUz3k)Tqs zKO#{S4d7N{)Sri7z#HGP90Bmbg?Oom93()@}!S;c2hx-rUm63ipTWv zsnMy7|9)!nb+<%4u=drluhn`TBr7~w%+jj^3nB@6Nf+Y;F~*gg>MDl_%||Mn!&&Cr z@|*@557U!}LRzg#r9PXe(sWb%4Cg!fk}yGqS$TXiG^agG@gFs!KUIK>fund|rSD>kn( zVff*a_>}Bn_Cz9YASZXLc1coR=aDfVX;WeE`%dpQ2%m9o6-l1Gh1D+;Y)NGD2oDzSOp98%q!8p0b;-)#7V&$D03 zwvHZ2^ILV$(cPt(;3Rk5+NkNZhqRM0Sd_gc5H6TYLSVjznXZP*u2qu8qT%gDHML`W z4efV!d4swxL%j0r*0T@f+Uo?XsR%>WRj%Qy>)fR0K%vzt#E4sKKC+UZHbx1;zFtf6+oQ%DAbd7r3$D z+WI%U4XUj(+;_=U`sURLiU=w040X+?w>4iII%qnvR=2fSgSXOZ^d(+v~D+S!WwW-m$Cc&I@%#EI;76+%C&il=aq<-AYgcH9I zNIIwH9!Y=jbYw=xI?t@)Djj(gzdq^GsN4SjwwW>(+;-vnx(Gv^Mr>17Uz%U@P<4g> zg!SEq51Inm@Hc_-^6`nrlO??mk9HLPdcjytxv@B8=%{Nhttuz&qIbEMCvArlLs@eE zzKTi0?7{Lxzw7G8f5;?JEwDkqMfGb`4cBd6r>=CW%U=Q^+`;g9c2~F<~l&PWa6Ka4`}H z!GI3Ie=jh(1A$;lW=W!dl!>Nf_$7>g%5WHSnv4qLIa4g~2}^^gpGTwNiJ7v)#C%~e zB8C*>k|&HraQBEFD2f3^wsCHD76qa}kw_0b5`0?n#n@yVBugd}GBH`jb%g!|U9{(Y diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation_show_in_domain.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/icons/constrained_triangulation_show_in_domain.png deleted file mode 100644 index cd4be89b1abfef93500bd95864a76997716c1792..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6988 zcmV-S8?)qzP)Bq2gVdbzpl{juictl2Yj&di*dbM6hS z&u4$`xifpOz4qR}*=?=8wi6LPqfa+=YqbE)Cg?62rPTs7i=1=a zopYxElYyIn2c2^-IOo=Ev1l!)PX!2^b0dIpz!gA`%41*~V4QRA+s--HD*0MXZh4*) zIOnzlehqvfMfAsjZ;8l+a;55cv|RQC&bf7+bGHJ|k`4d>djPLG=SDi`mdkocqUEZv z&ba~3xr>1}fWy%)A7BaaL_)H~KwI#;4{#~)v~zBwGG*;Zv|NB7nDm_rj0esHdYadF z0viECtB;1-t2r39f(AvQwQK6;B7#>@C>k15NE6KySoL} zv2n+s%jF*d3q3yn0=8~-IZLg>RtwNT}G8PoXVfkVBxqpR=x3y8qQHqBC?Ul8~6 zz|$VjHsF^)uU41)GZ1Ja4FztCY5b3Y(}5md{60Y=2k}M*AXqBU&8EM^r0D{j3e5HL zcoW#A)phWx1pzP+UG6RN8fFnXnH!jp?$T=9E&}rd5QxAREuR@NY1acD^73m3t_D_U zb)9@_K!8r%MgkwjeEqipL+hlURgJ%!0e}cR=kwb>fyeQ{OfT-cz*kybKg&G`fJ1^Y z-fyg@fE`k#|9UvxOCAVBU=_>vks7=P1NX$pay>Ap)pfPpfdJSkW^yLzD&U|Dd|s`l z9TEco5jey0UjlTg!}CyJx+mAPEOK?U&~gF13SJ+$Bc}2H6HL^)XW+F)Fn$L-E=vHx z++eP-EU!^1c&~&ip?o?20<7NZdhC=S00sfSAv)<>2wV&d$idUBAbKVMpc1yWc}~iZ z$G*V(p3ENu$F{moI}HfXN#7Yk#rZSvTY+^O;B7X24yyx#zxrQv&B>;h&x*jc;a&#; z9st&Ebpv;35CDe(6Jom5CxGo5Y0yXQClo4|;I@-SWWrYQg*0>@Zc7UaygcQAal#Q=MFs~fxJAOJQ%l{tRn&j7wp zhDl$Yd^|nDy(vL3)tBq&24vWl(8@%C1)K$RZFQqJ9R%o1`f^ld>sQJ}K>vdC8(qy~ zKuQ2q!Z0h}zZ;aJJ8(YH$?h0nvsO2JQ$T>Kb4L-~X=_K9SA|cSg6`OK#b;y$!8N{| z4Q~Pgn*h&wb+8z?5Kqss+<*WzNm*w@NEvtao)Ky4Xq9!mr8_UY6h z0EPp1$29(j!1sV|O#r|F;k;kY34&MsGVE2boDMh<_{7U+Jn+R%2LfPa;7X#CzWKn< zffbupkkD*=t(*X;gu%8fPnRU`5a7O;59jw3JXtOU1VArzxiiZvKs#^)uvSwG5z!M| z(I5!Uvt?>4a{>n(h3ZCZo|A$7IwS~!uIwmOm+m9@5n#(^HolR|=m~l?2mldSC_1rR zR<@s(EdMIN|HjnmEx^hh1_bD~=nFA|z6R{uipDpx89l)f1%N;VcCuysph@L80GQ&{ z?+oCGmVyBI9Prne#-A2Ua9X+p2Ao!v$q7s=2m}xN<=wPNMdVrLMsDf=4@a@t;fKK|(A-aTF3jC=o zH0G?REyFV2S1<@pvgKdYg7WnRE+b?uy=?xKTHT!*1n8viXyCn=uIM3P^Hw){OeKx3 z$~drK0EoaxqC?EGdiY+8%DH1O_wsw>)2L$(mnJw7!8tb&cpTW2Ff9l&e=V2;Ob$RY z5g0Ebb7>Jd=X#_1`mXw96!5DOa@qvl-38zs5gArOCUwa<*Aw_Lx-_@WMV^G>y}l4u|z9W&|ZE5Iz^a_ z_WaY)UC@~*aOR>T#S*G+0Gdf%PRiJCpMTAp#ZTzA?V@J-hK)? z=bV9#2D4D$%%}R%O9A<2A&1VrdZNJT7s$E{#8Xkl+51!{$!8Y~FPX;z z{1!O7)+D|Hg05(d2QzI}KwEvAYSb>kAJAiY&89YVUO53c8+bW*-VI$n%|yX95AAgp zqrGC&sXfSiA&TPJROdR=QSeNmT9}D>CUUjNId>ev0bTR>UEo9!`DbjJU>%BcZZg_0 z0&E~62dK$ltEd->S5O0{TWZ9eiFV}^(T~>ebv{Aoq?KN$Vwu)dvU8pJ zXg4?uJ&Q4eDsXJCGqV;$=iKV(ZtsEKtLuT0k@RLm!rH;@YMzfIa~zf78qhy~I1h*38frfaW7~ta=qSZNCe+2HjJ*n&`ovslb6rJBD|e zh#{>Nus0E_*>wbFHW>s%O#Vgd2`b@3(e2`pDp@?+!yvq1(oGe3Qs5?mUkIEcaERy! zv$?>!0xJvj5p|B?V)!*Ryg*%o894oMoz;*(|1y&Da>LDfcI){izX!~)p`5kff zDk2k|b3=d^ferQPTy!7dc3^~`q+l9peh);?f)+)0q7KY_KbHHV&QTVi&QL)&jur&J zA4f;ZyiVZyp!*yCZhb8hs!Q`p!S7m2^O}=nb>n8f^lwl_$nA9$8ut=HloR+#iM_yl z33ty~&l4ntF#@~9d?A|%JZR!wWZoU@eUTTJSneXic~YYX+1MWr_AoD>N}<`hkjR8_ zL`el1Y4XT>p1_7FqTQ}PF0Ueb0Hw`~Z+#nGC$NqAf1M7{&`D(+p49k)E{nSOAQ)~U zOiHQZJcP*M%Z&12nt{{6}=v6#44k4?gmX%(GucKoB&jH6dRugVDo4BE~2^1RgD* zV4E18dCn6&B|6jgD`qQ!$5W*Lfk|_^d48OE-n#<;;CBMu{c^SgSD1Es)Vw<=2?YN( zk+w<;f*@@dbh>PWaMIWrfGH9lx3ln?DC(iaZ~Vame-d?OnTF4XChY^}`7}?q8(Y-) zvjw(~DJRo`Exh)bZQiey1cHB>NVyI_pu1F_KqurZ;30-b+Vcdn1BtSk0>xCvc>|dpRok4~Ea)G4FrxXr2PO3 z)RUS3fO|!^o+ALblNv^+s6L?*_uN__ILSo3t`QIf{MJCt#f-3hL^o;b6?RRNCdu#6 zTLSyXRLI%_w}`F^@>X`6s0DL{=h%dJ`j^O9Z|a*Z6aQy;HQsizdxpwLq|+ ziTKY(K@jllff@i9!MjTBiPRXcpnvn;e=KmCL}$bO1TK{5*qtXlYxoYX5$`omhKEZ4 zz#|gXX&|VZyt;>FQT==6!O#1)nG3z3z&h;64d2*D7H*ffoy`_)6H>C%4@AEHF(h2-k+QzuF}$`-1A?bag5ApiL6A>B zB5q*)2KV2cB4N6 zSPP>eG4Bf{5&0^5(^w2`i28PV5Iq>$40;DO>ILnrcFK_UNb@_*vAFY5A0Y49hf9GU ziO9wx@?nO|lW05h`}w#CaUhstemCVtaS=Hi9fmyWf!eq>ldNg}?o{vBPD4MVdU$Iw zsz!;UDX3=mr+CNtCIIV;$j>umT8}yh2!f+j+eY7vMLVM@(O0F>gXZ^_5@W^F0Kz@i zZ(`zHf*yH$+dgbZ_516K$h#Rctw$CF&&9@w8AEoVI)*%3_M9Nd^UP|VPCP$?qWkkt zG+{2VSi;64Z|2}}izoZ!;Q0*E?eECgKN;Atqn*;*mv1>EY zow6Oh%IYF|Af!wXJZ|z^rvW~_4WFX|xnm7Jep_F`hq0uCW$Tyl8>W3YeRYM7{DN)|r9Ht7#a5kJY`W7n9xL-Ux& zngoEpRF4NPrH&u!Bqp00!Cx;yNOLK6y?c!7h1Vr&e>Xr>JC~NnmrdH=)rlKt@X=G? zhJ^U1*|QEclahH z#2YKoGYyFDEzGLHe~u5Dvzq_{vklK5bAcdWWUp^qp+Eu8sPc89ZeAJ%K_&QRXin<; z4|veTAD$3rq~DMM$gWB$*OoSI&E;A_b!=@yzS9T@tVvQ~3JyYgg0%M-X9;J-e62^N zjDL#vF3I3yW69<;%RgCNj@h26V|zW(7Iov-U^Ln=+Or_xwh328+Ix(%h8rYms|aS5%nx) z$9e=-mGJQMfqBbpy8aP^Cld0}W zs>RTrUwghm;YNfjxhTzF)^NGh_awS%$?}CfqyDa75DYWCXQWP7gW+0+;gkl2GkSs{ zEdoF#JR&iky#jC?*M$7PYV(~{FbJ$K%G6i*)tVSirD_kodf*N}Gdbth1U_GVGAa+7 zf@mRnk9XYV8@++kn;=7Ig4o|VSENmS_DLZm_XGj5rcy=Lkeui&P*2cExKE<~3;obl z;EpE960)X#rof)yS;KdqhKGZI=@`Rw`<#LqJ;7luX#6D-@6CkS=nY!8ho3vqjiNGT z3f;=S6zEj|0D2I*Gn$o(0)f3FIki&+lm7H@^;Xyac)%InO2HH(~!0 zYuP4a5ACY^ZH>e?ru+L^u$Z?GqL-SFC}$l+iw!}!q*0`(zup5XKXD=sdKlj!+H zB={owXQ>cVhKItuoTzWbBIPdTR(7C2)j7=)pm&iV_`DJF%?v_aR!vv7o?w*39Q9fZ ze7BJ=D=5b$QD7ZYpzM)b*(3ghQp&lf;qg-D^mUl8XqeBcfD0tXzfl`- zR#A=bm1$eT=60g?hDBV-cavX^HFL;!w@H6|86dC|j*U{pH}3L_))P#XcwdIRP0k(7 z3>Cd9;T=>_E#$KWlq;mo%zR*#kjb9jYg9A{9yS@&^r4ITGB%qozbOy^mr25vE)8$A zWT@vX+RvRX`@0NkonZP77oS=yG(Do`;44>(~e9Wk{S)b7(0A(oUv|v}|;Yyc3wYt$0%Dpa;>w{MiJ>;6D+)Krq^IV!D@5FnJiUxtzPQ92AXRB}}+?}KG z7YghZ_w|2F#%<6R0HHVVT3GIGIqG3gTkg8%Vbr+SsAv!jHW^Jzh%>qxr+*Fr+%E|R zA9ql)6?i2;#-i$P9&U6F4BQ z@n@6bN|%lpfD35o`ruV;J=E0KP~%>sLO~E@_P)t%ZSUQs)puPbz5ac)Bp7@=-~+9* z1>hhewh3vk4<2RfqNWQ$YTRp71_-R}+K%2kqbJxcB>;|+7?p3PD_uHzKz%&S372t@ zsC&Cwb>rXs62BEroqLVS0D-+|`C#+h(-YLYhGvYw%5h(R<||z~LqMG!zZ))V4^gxC zTJ>c8De`Ut@0#}-WeI6Eiy--2qA`ydf-Vx0=)0&M=0En~V)ROvT}33(?N?_d5t)T9 zAs??kU5suoTu~$CPwYQyJLlGqiPZQeQ9!vt;G7!_Y+QYuWV8QzkmOph8*DnBttKKj zq?Dmkk|^y?$nU+NM?I4cC#yP@GT;?3ENA&x3uGIokfnaQ|DfzOmd|Zes`1M=-`>LaX-{6z(h$f_$cH`m(Co} zGw>;{51#H%o{u&>>fUQq1_)7Qjpc`=0!*$eK)Uk#I zg1wc!dX$|M_ZpP}f<7kG`GocjDp$rQ8hnfg)@gOcceDU>2VM%-RaXhS!n3!w(+&&@ z(w=9YU)dB81Q~xE)4-zpcF*k&`p<{EPw;k$<53E}vANPC%`dR8*P~R-Ox^9g}P;k z>uNkdfEc4f=iE|sKVebK-?(R`yc3bd8OqsG5|O#UaOd3L(ILVo+YW_*z@_a?oO64i z_H3Pz1RZbl0IN`7ib&{6)LP`6y9hX|MwG!KGA%8?#C)<0DbBg0(V6TLR886oy^f@( z`ECDZ8E!r;)J8V&tbsZK^?TxJA~Ki)C=&=WGk2~V$pEPZp0sh&zRPmqac7~|MP#EQ z7-g9gWF`@5Ly>ekJxPP^GR?hDv6^ZT;uU3Tk#9S`vr5R8dmzI3JZ z2j!EAl21196h*LE>NLwtbL2a%(4IQsu+a&kgxi{8V>V|t_m5tSit{fL z*9s_VYM6E`xFUA)+l$1v4E5b7){5Dg%;dc+u{1V++RU=us%-~~o-Po3`F+poI8Mbq z0u$S(-d(Z(oY&@iroYxLKTy&mwfS)T$KN`u^R@3TUlpa}W!|~@p47(MvJ3k)w#rnzS(!?*Wal5cv}`8IV)x3+U--pb21 zh_HRxEPo_&qt4>e%)iUCt%9Ym8MYZ5>gX*!DI@mfbbFERvSkhZ*Gra}ttqvO&v-Wf z>BgqZWoIRsq_n5kZ~u4K_C!eanOiGk>M#Gk+P9{hM?O-+?sRhO(({+USJ{=ljfl

LQG!4D3T)BC)qx5E}{N$IF z+x=(S+&5*Pcco-mS&FTC*-^=hKl?0-r(O(E`+e%O%^|OX*j2xIKdf119ICAS^vrwV z%Uab(YC>LS$OZm(4UE1zr^@2-98esAF4L3TbyYxt-bi`Usa{uTWd2X{Slt%uGnIH;QbfvpOSxb(melZ zu8>XI_GMm&&5HM~w`&jIKA`y^$Vz;l?b<&QJ8mxd>a%%wvFwgR+w&vtFz0ohnBz7p z>wW?A4W%@Twb6I5=l)B}@NG?#e*UI?is#mpNAo;Op2c(RKX1p%2gOH@ z+|5jy<$Axg!n>xWlF8`AUPA~9Zw5DlWM-L+hu$W-*boFyt=akR{ E0M>H=ssI20 diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/inputPolyline.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/inputPolyline.png deleted file mode 100644 index 63d0a08cca3eb3e8de9de52831d5bdb3c8594a31..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2021 zcmXBV3p7+|902f(!g!@vkD?ln(x8wigKC!;92x5|RGOw*wI+!QO=gT(iWOEvSQ*=d z%(ljClTMRSo+~n~Ew37F%A|-CHjnK5KfiPC{m%K${eS0v|L_05_hNv*m$t@g4GhDy zN!}iTiqThbx$3Ga?#wU6QpKQ3^Y!vrL~xXu=ZYCzjCWWZhUqlHrF6wwXAMlAjoBTk z7*RZ?QtuvyVQMiXkKI8D{bRolSf4*&)OxMc<8{LBx}3O8_-K#v{PO)T_w4ZW(TSg5 ze(QOTX1-=Dp()LRY_X|g4W8^zejMAeDP0~f7?j^R7b#1OY#F`ZvsUQtJUCtICVbYx zbnOafB+YEVo0+9F)(8OGXf4orIRwl};yKIzoHvV!RNHDK<067pA!3H5U3%lPkVvp` zK!&LHz5r*gm%KN5>t3@osk?Cl@H^0GVj7G9eH|Ae{C(>VC&@c&NMPtKY1L-M3XL$j& zahYbFmq@S_RIBw`4${4a-wh3QJqDDj)2G00S9jp#7E$SR^Iq0bSM@Cfpd1qqobNx} zT<|T4U;~!rv{JC8{fH$$>opQOh;!P!~|$yK%vxcjJ>!p94k9 z_n_hK%f_~AModK*NOmbEcGW~#zY8%rNR+Zx2CV=f$OVT z;8H$p%6+6vMn+S+I)D|cT!K=hYmS65P`3=V-;vXOlsqNY+9w>>iT~gOY;+u`q$1dn zqhQluskq6UbQ_^d>a@6mtFSAW#v+ znGX)f|6%EqSL0Nj)h|@_H8>n0G(L19WY67BjdYZ)WBn^~(9$ZpMxbq6XBegH{A8Tc zC?Z|aTpcP=d#d8Q#Zqddh&H|*c>Q<9QUreIbk#6V8j@+hCG~cgWqvl5VcQ}Oq7<`k z6dkqsQtzJp3B+N2G_9OG@NllH&Gk5PdWZ5ZQIFL2tC%5Auv$x*4$n%&^E)+u3-Sr- zr*-(I-R^S=zOPR>VLzN!<79n-#y)y$nF|3O{3T6Y@JBwXGS-+NM+TN75;<4sSXf~D zxZ{WJUf>;7*3R0yy7RsmU~MZnzX@!TdYo9_?+3=1nj&j>GrB^=+kg^ zzMYni^DQHfO!D zGC0hBY$q3<3d$4&BvtkqjwW3a1js{#JSiF0p*kc~EY2C~gC-Mh?PAME6Rxs*;Sv5I z&E8<5*`kJ7+)Qamm+*4G#&T6uQ1X)qq9w_HorrHViiAPjO6L>aqC-Z%KvN>>?i;L diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/zoom-best-fit.png b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/zoom-best-fit.png deleted file mode 100644 index 0df9f01776c4257f231f0129f13ca4782d972ff3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3231 zcmV;Q3}Ew#P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L02{9W02{9XUK)`c00007bV*G`2iOMz z4kkBA*o3wK01O{VL_t(|+U;FkNL$$!{&ut)wWV{fIK420&WF<)(c z&rbIMwzjt5^ZDq~(h}Cz*53I6fL^bE=T}-g?IG=O)8l`J3C7a1_O0Eor*CZ0G5}R;dDA-Fc|3U>?~FD;;czUhgMcrsLf`h z4Gj%=^ypFA7Pv=`9-*P30XCbBuB@z3HG&|!CmaX_sL^P|+}xaM%+0yEIT(#b1OfpH zm61lynJ_XkLThSj5RFDvXY)s+QPkAbU}R*3s!0lX7h%>8?C$Qu?RL|_!NH_Dk(ZYT ztJMmN#ey?u&Ooo%@Bd2xU~O%UuCA_PZEX#!tE*U8Sit=JJa%?=l6qf9M+f@*`$<+- zR@xWkLje%O{4c-!l1@xah-Eyf$w^F1OyK$R z=c4L!9EY*7v9yCAc@1#8-J+OZP*8wt*RJ8|)2GDa@eq#VL^B@%^7He-aUAh@Jml%q zr{vnTYY^iVPfSd}?RKYqO*l{jSZDvp$O!%FtFM^KW@TlewY3%Be)}zSIvq*HV4~3| z?dj=($K%27?k-cEpMLrYSFT(k>5_t^B_I$8P?yWaR93IoBM=B+czBqkiunMb)9J|Y z@GuDk0?_OAOm$o?S6ZzjO)|58Wo3mnH8tVIix+}rD=RAz3WZ=a8i`VaG8&B}6bhlT zvQn_@ix)4@)YJqPKOq%XQBo3c_3Bk7Q`6~m;=zLlq`0`4C_S@^i;KyF2M>tT>0~ld zuU@^H7SmKCw(;57S<2#MIh{_7j*b$oR-3j3POH^obaa#ngt@snB(rUys02_-(bd(( zq;_uHxIqBG@AuQHswzqd;r)H~*=IBy4!^?ysr3Qi#*G_h5~JRYj3 z3Sv<|)z#H>VPS#S!+rAP2~uh2vrsr3rtR(RICbh2u3x_nv)N4EcGf=q^iynYZ5`T% z#bUw3hYuA|LrfA7i^W2Izh7{JE8WZofXkOJBNzi7Fqb0WoY zoSSMYRzV3^T3X_LZnav$x1Z0VlhZ-@`T4L~t&+yB2mnH!qs3xDrjk(Kg~qN5 z0M48_ld%8@^*tj1U_JOyBMJ5WSOStDv)TOW|3X_B?~4QwH32X%Fo4?HS{RK+jE;^< z>bnvEWaB*}v)N4M=jSt~zk(9LpeJdjf+f^t*s?# z2cV#!0CjbByk#aQCuPyeN|I1ScU@f_q~1Yh0)XXU+2L>q4rX(6^H814cSf5I+T7ga zoir?C1{6G$x7+Pujpp#8&!0cXz`y{NqLUTguAqDuIy4#$>~?!t6`n8v6crU!yzWpP zM1zBah(@ETUkjqqsNhv9v)K%(x9&v&z#>X5EiJsyx3;#>)6*l^juNq;eALs^BY4&; zG*-FP4SqKCIZ$!rtLJnn8Dq=z3ejlau)$?F5NKGaa@9mkh zXV2pCiM947%{ugI|`SN9& zY%U-L*6B!;JW-7b3wg!{Q1eeQ2Q|YWlqfzQ|xv0rxVm?rBYiq+7 zUwk2Ht&#$Q1?cGLKxbzskt?Elb8`~|0|Rt$a4@NW+P~vl!Eqce zUcC694?q0ypULzinT7etChOqa2QryVu-on6I1XiHWh9j#9LaPwV#w`wqpznk}r7%bb<>uz1t*s5;fB(IxdM=j>LqkJ^Z$~&;5Hxb4dF9F#a{vB)CKFX@ z(&==#fB!zd`|dlEmzO81?(pz1T3TA@%a<=@Uzlaj8D}z?NH7=#i?gN_)z#G@7!1N> zGLiiSS1jGRa|ay9Q88+d1q6+p;`F+o;PraR%*+gg_Ks3X<>lp=nVEst>m{$-`9jx| z`1nv?Ur#qSHe>_gNG5Lm^Upv3U0huJk7Tp={tc|?RLKWTRLRcc@Ggg_LzCIF(P&tByi;9Zy_ga^fBoL|J z5zFKcICOP&(f{K|b2p*g$=KJ*KCp zMQ7!e#SfUCp3YbxhK7d7rAwD2x3jae1CHZx=gu8bYXV8drwlVqExmmC5*)`-St8vu z8Vn5$!R2x>siTy9M=aB%;lzm(7#kZSa$Gv!+uK81TO0cO`)S%FKrIq6Jv}Yz-5VPl zsHv%;a((l_=kuYariP>)042dVNczOQGZu@5s;jFFkw`>xUoKv}h^eV5bpenHFj!Qc zn0GyU_Ka3lRpHsQXOjB$$tRy+X=zEl0H_)8NF+k5tE&-<#gcwsc6K%ri3IP5gfuup zB*r)>D=Q;2Gc!1S`m`i3S?DWHM+yM3Ae5JvlY95>LF@s}K7IcA=jky+-zN|(77H00 z8^ehcCq%!8#jHJ&0Eh+Q!i5Xu=bwLum^0yzKmHgU9UbHt0GU9zbm)*GCG|OV`F3BIF2dI{m26#76iB3O{S)%U@#bvo&Enr1I5L~ z`1 Date: Thu, 7 Mar 2019 10:22:00 +0100 Subject: [PATCH 033/271] Fix the notice --- .../demo/Hyperbolic_triangulation_2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 71ed78e33fb..9b6a302a29a 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -25,5 +25,5 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND) add_executable ( HDT2_demo HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS}) target_link_libraries ( HDT2_demo CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets) else() - message(STATUS "NOTICE: This demo requires CGAL, Boost and Qt5 and will not be compiled.") + message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core, and Qt5 and will not be compiled.") endif() From 664de7e32e5b540234ac8b95a4aa3b95a26012e8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 7 Mar 2019 11:22:41 +0100 Subject: [PATCH 034/271] use the new API of `PMP::remove_degenerate_faces()` If there is no degenerate faces to deal with, i.e. if the function has nothing to do, it now returns `true`, and not `0` anymore. This change was introduced by commit e4ad5d96a7afd1f2cca3fbc7cb2661a1c1be7659 --- .../internal/Isotropic_remeshing/remesh_impl.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 33d3b231cf0..10a44051298 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -817,9 +817,9 @@ namespace internal { CGAL_expensive_assertion(is_triangle_mesh(mesh_)); debug_status_map(); debug_self_intersections(); - CGAL_assertion(0 == PMP::remove_degenerate_faces(mesh_, - parameters::vertex_point_map(vpmap_) - .geom_traits(gt_))); + CGAL_assertion(PMP::remove_degenerate_faces(mesh_, + parameters::vertex_point_map(vpmap_) + .geom_traits(gt_))); #endif } @@ -922,9 +922,9 @@ namespace internal { #ifdef CGAL_PMP_REMESHING_DEBUG debug_status_map(); - CGAL_assertion(0 == PMP::remove_degenerate_faces(mesh_ - , PMP::parameters::vertex_point_map(vpmap_) - .geom_traits(gt_))); + CGAL_assertion(PMP::remove_degenerate_faces(mesh_, + PMP::parameters::vertex_point_map(vpmap_) + .geom_traits(gt_))); debug_self_intersections(); #endif From d7baf67a434c7743569da3b1735a885c980d7c5e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 7 Mar 2019 12:54:12 +0100 Subject: [PATCH 035/271] Add initialization --- Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp index 39d1cdb9c31..a83fc03437d 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.cpp @@ -1512,7 +1512,7 @@ QString Scene_surface_mesh_item::computeStats(int type) edges_length(d->smesh_, minl, maxl, meanl, midl, d->number_of_null_length_edges); } - double mini, maxi, ave; + double mini(0), maxi(0), ave(0); switch (type) { case MIN_ANGLE: From 7a14df8cae3af7ab16f1d75f41d5683a698c1feb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 7 Mar 2019 17:29:14 +0100 Subject: [PATCH 036/271] Range and Segment Trees: Sync code and doc --- .../CGAL/Range_segment_tree_traits.h | 36 +++++++++---------- .../SearchStructures/PackageDescription.txt | 12 +++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h b/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h index 9f1e6414b86..638b764c33a 100644 --- a/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h +++ b/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h @@ -4,13 +4,13 @@ namespace CGAL { /*! \ingroup PkgSearchStructuresTraitsClasses -The class `Range_segment_tree_traits_set_2` is a range and segment tree traits class for the +The class `Range_segment_tree_set_traits_2` is a range and segment tree traits class for the 2-dimensional point class from the \cgal kernel. The class is parameterized with a representation class `R`. */ template< typename R > -class Range_segment_tree_traits_set_2 { +class Range_segment_tree_set_traits_2 { public: /// \name Types @@ -28,7 +28,7 @@ std::pair Interval; /// @} -}; /* end Range_segment_tree_traits_set_2 */ +}; /* end Range_segment_tree_set_traits_2 */ } /* end namespace CGAL */ namespace CGAL { @@ -36,13 +36,13 @@ namespace CGAL { /*! \ingroup PkgSearchStructuresTraitsClasses -The class `Range_segment_tree_traits_set_3` is a range and segment tree traits class for the 3-dimensional +The class `Range_segment_tree_set_traits_3` is a range and segment tree traits class for the 3-dimensional point class from the \cgal kernel. The class is parameterized with a representation class `R`. */ template< typename R > -class Range_segment_tree_traits_set_3 { +class Range_segment_tree_set_traits_3 { public: /// \name Types @@ -60,7 +60,7 @@ std::pair Interval; /// @} -}; /* end Range_segment_tree_traits_set_3 */ +}; /* end Range_segment_tree_set_traits_3 */ } /* end namespace CGAL */ namespace CGAL { @@ -68,7 +68,7 @@ namespace CGAL { /*! \ingroup PkgSearchStructuresTraitsClasses -The class `Range_tree_traits_map_2` is a range tree traits class for the +The class `Range_tree_map_traits_2` is a range tree traits class for the 2-dimensional point class from the \cgal kernel, where data of type `T` is associated to each key. The class is parameterized with a representation class `R` and the type of @@ -76,7 +76,7 @@ the associated data `T`. */ template< typename R, typename T > -class Range_tree_traits_map_2 { +class Range_tree_map_traits_2 { public: /// \name Types @@ -94,7 +94,7 @@ std::pair Interval; /// @} -}; /* end Range_tree_traits_map_2 */ +}; /* end Range_tree_map_traits_2 */ } /* end namespace CGAL */ namespace CGAL { @@ -102,7 +102,7 @@ namespace CGAL { /*! \ingroup PkgSearchStructuresTraitsClasses -The class `Range_tree_traits_map_3` is a range and segment tree traits class for the 3-dimensional +The class `Range_tree_map_traits_3` is a range and segment tree traits class for the 3-dimensional point class from the \cgal kernel, where data of type `T` is associated to each key. The class is parameterized with a representation class `R` and the type of @@ -110,7 +110,7 @@ the associated data `T`. */ template< typename R, typename T > -class Range_tree_traits_map_3 { +class Range_tree_map_traits_3 { public: /// \name Types @@ -128,7 +128,7 @@ std::pair Interval; /// @} -}; /* end Range_tree_traits_map_3 */ +}; /* end Range_tree_map_traits_3 */ } /* end namespace CGAL */ namespace CGAL { @@ -136,7 +136,7 @@ namespace CGAL { /*! \ingroup PkgSearchStructuresTraitsClasses -The class `Segment_tree_traits_map_2` is a segment tree traits class for the +The class `Segment_tree_map_traits_2` is a segment tree traits class for the 2-dimensional point class from the \cgal kernel, where data of type `T` is associated to each interval. The class is parameterized with a representation class `R` and the type of @@ -144,7 +144,7 @@ the associated data `T`. */ template< typename R, typename T > -class Segment_tree_traits_map_2 { +class Segment_tree_map_traits_2 { public: /// \name Types @@ -162,7 +162,7 @@ std::pair,T> Interval; /// @} -}; /* end Segment_tree_traits_map_2 */ +}; /* end Segment_tree_map_traits_2 */ } /* end namespace CGAL */ namespace CGAL { @@ -170,7 +170,7 @@ namespace CGAL { /*! \ingroup PkgSearchStructuresTraitsClasses -The class `Segment_tree_traits_map_3` is a segment tree traits class for the 3-dimensional +The class `Segment_tree_map_traits_3` is a segment tree traits class for the 3-dimensional point class from the \cgal kernel, where data of type `T` is associated to each interval. The class is parameterized with a representation class `R` and the type of @@ -178,7 +178,7 @@ the associated data `T`. */ template< typename R, typename T > -class Segment_tree_traits_map_3 { +class Segment_tree_map_traits_3 { public: /// \name Types @@ -196,5 +196,5 @@ std::pair,T> Interval; /// @} -}; /* end Segment_tree_traits_map_3 */ +}; /* end Segment_tree_map_traits_3 */ } /* end namespace CGAL */ diff --git a/SearchStructures/doc/SearchStructures/PackageDescription.txt b/SearchStructures/doc/SearchStructures/PackageDescription.txt index 812e4c10b37..a2f35335bfc 100644 --- a/SearchStructures/doc/SearchStructures/PackageDescription.txt +++ b/SearchStructures/doc/SearchStructures/PackageDescription.txt @@ -42,12 +42,12 @@ and segment trees in the same data structure. \cgalCRPSection{Traits Classes} -- `CGAL::Range_segment_tree_traits_set_2` -- `CGAL::Range_segment_tree_traits_set_3` -- `CGAL::Range_tree_traits_map_2` -- `CGAL::Range_tree_traits_map_3` -- `CGAL::Segment_tree_traits_map_2` -- `CGAL::Segment_tree_traits_map_3` +- `CGAL::Range_segment_tree_set_traits_2` +- `CGAL::Range_segment_tree_set_traits_3` +- `CGAL::Range_tree_map_traits_2` +- `CGAL::Range_tree_map_traits_3` +- `CGAL::Segment_tree_map_traits_2` +- `CGAL::Segment_tree_map_traits_3` - `CGAL::tree_interval_traits` - `CGAL::tree_point_traits` From d0d5251cb6f49dc107a6433ab202a7ec725f954d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 8 Mar 2019 09:29:28 +0100 Subject: [PATCH 037/271] Add \cgalHHasModel and \cgalModels and backtick (even in Triangulation_3) --- .../CGAL/Range_segment_tree_traits.h | 36 ++++++++++++------- .../Concepts/RangeSegmentTreeTraits_k.h | 10 +++++- .../DelaunayTriangulationCellBase_3.h | 6 ++-- .../Concepts/DelaunayTriangulationTraits_3.h | 10 +++--- ...lationCellBaseWithWeightedCircumcenter_3.h | 2 +- .../Concepts/RegularTriangulationCellBase_3.h | 4 +-- .../RegularTriangulationVertexBase_3.h | 2 +- .../TriangulationCellBaseWithInfo_3.h | 2 +- .../Concepts/TriangulationCellBase_3.h | 6 ++-- .../TriangulationVertexBaseWithInfo_3.h | 2 +- .../Concepts/TriangulationVertexBase_3.h | 4 +-- 11 files changed, 52 insertions(+), 32 deletions(-) diff --git a/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h b/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h index 638b764c33a..52350d1c803 100644 --- a/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h +++ b/SearchStructures/doc/SearchStructures/CGAL/Range_segment_tree_traits.h @@ -8,6 +8,8 @@ The class `Range_segment_tree_set_traits_2` is a range and segment tree traits c 2-dimensional point class from the \cgal kernel. The class is parameterized with a representation class `R`. +\cgalModels `RangeSegmentTreeTraits_k` + */ template< typename R > class Range_segment_tree_set_traits_2 { @@ -19,12 +21,12 @@ public: /*! */ -Point_2 Key; + typedef R::Point_2 Key; /*! */ -std::pair Interval; +typedef std::pair Interval; /// @} @@ -40,6 +42,8 @@ The class `Range_segment_tree_set_traits_3` is a range and segment tree traits c point class from the \cgal kernel. The class is parameterized with a representation class `R`. +\cgalModels `RangeSegmentTreeTraits_k` + */ template< typename R > class Range_segment_tree_set_traits_3 { @@ -51,12 +55,12 @@ public: /*! */ -Point_3 Key; + typedef R::Point_3 Key; /*! */ -std::pair Interval; +typedef std::pair Interval; /// @} @@ -74,6 +78,8 @@ type `T` is associated to each key. The class is parameterized with a representation class `R` and the type of the associated data `T`. +\cgalModels `RangeSegmentTreeTraits_k` + */ template< typename R, typename T > class Range_tree_map_traits_2 { @@ -85,12 +91,12 @@ public: /*! */ -std::pair Key; +typedef std::pair Key; /*! */ -std::pair Interval; +typedef std::pair Interval; /// @} @@ -108,6 +114,8 @@ type `T` is associated to each key. The class is parameterized with a representation class `R` and the type of the associated data `T`. +\cgalModels `RangeSegmentTreeTraits_k` + */ template< typename R, typename T > class Range_tree_map_traits_3 { @@ -119,12 +127,12 @@ public: /*! */ -std::pair Key; +typedef std::pair Key; /*! */ -std::pair Interval; +typedef std::pair Interval; /// @} @@ -142,6 +150,8 @@ type `T` is associated to each interval. The class is parameterized with a representation class `R` and the type of the associated data `T`. +\cgalModels `RangeSegmentTreeTraits_k` + */ template< typename R, typename T > class Segment_tree_map_traits_2 { @@ -153,12 +163,12 @@ public: /*! */ -R::Point_2 Key; +typedef R::Point_2 Key; /*! */ -std::pair,T> Interval; +typedef std::pair,T> Interval; /// @} @@ -176,6 +186,8 @@ type `T` is associated to each interval. The class is parameterized with a representation class `R` and the type of the associated data `T`. +\cgalModels `RangeSegmentTreeTraits_k` + */ template< typename R, typename T > class Segment_tree_map_traits_3 { @@ -187,12 +199,12 @@ public: /*! */ -std::pair Key; +typedef std::pair Key; /*! */ -std::pair,T> Interval; +typedef std::pair,T> Interval; /// @} diff --git a/SearchStructures/doc/SearchStructures/Concepts/RangeSegmentTreeTraits_k.h b/SearchStructures/doc/SearchStructures/Concepts/RangeSegmentTreeTraits_k.h index 3e172861b92..fc658b1fbaa 100644 --- a/SearchStructures/doc/SearchStructures/Concepts/RangeSegmentTreeTraits_k.h +++ b/SearchStructures/doc/SearchStructures/Concepts/RangeSegmentTreeTraits_k.h @@ -8,6 +8,14 @@ type information of the keys and intervals. Further more, they define function o the keys and intervals, and provide comparison functions that are needed for window queries. + +\cgalHasModel `CGAL::Range_segment_tree_set_traits_2` +\cgalHasModel `CGAL::Range_segment_tree_set_traits_3` +\cgalHasModel `CGAL::Range_tree_map_traits_2` +\cgalHasModel `CGAL::Range_tree_map_traits_3` +\cgalHasModel `CGAL::Segment_tree_map_traits_2` +\cgalHasModel `CGAL::Segment_tree_map_traits_3` + \cgalHeading{Example} The following piece of code gives an example of how a traits class @@ -122,7 +130,7 @@ typedef unspecified_type high_i; /*! function object providing an `operator()` that takes two arguments argument \f$ a\f$, \f$ b\f$ of type `Key_i` and returns -true if \f$ a Date: Fri, 8 Mar 2019 09:57:57 +0100 Subject: [PATCH 038/271] Periodic and Hyperbolic triangulations: backtick --- .../CGAL/Hyperbolic_Delaunay_triangulation_2.h | 6 +++--- .../Hyperbolic_Delaunay_triangulation_traits_2.h | 4 ++-- .../CGAL/Hyperbolic_triangulation_face_base_2.h | 2 +- .../HyperbolicDelaunayTriangulationTraits_2.h | 4 ++-- .../Concepts/HyperbolicTriangulationFaceBase_2.h | 4 ++-- .../Periodic_2_Delaunay_triangulation_traits_2.h | 2 +- .../CGAL/Periodic_2_triangulation_2.h | 7 ++----- .../CGAL/Periodic_2_triangulation_face_base_2.h | 2 +- .../CGAL/Periodic_2_triangulation_traits_2.h | 3 +-- .../Periodic_2DelaunayTriangulationTraits_2.h | 14 +++++++------- .../Concepts/Periodic_2Offset_2.h | 2 +- .../Concepts/Periodic_2TriangulationFaceBase_2.h | 4 ++-- .../Concepts/Periodic_2TriangulationTraits_2.h | 6 +++--- .../Concepts/Periodic_2TriangulationVertexBase_2.h | 2 +- .../Periodic_3_Delaunay_triangulation_traits_3.h | 2 +- .../Periodic_3_regular_triangulation_traits_3.h | 2 +- .../CGAL/Periodic_3_triangulation_hierarchy_3.h | 2 -- .../CGAL/Periodic_3_triangulation_traits_3.h | 2 +- .../Periodic_3DelaunayTriangulationTraits_3.h | 6 +++--- .../Concepts/Periodic_3Offset_3.h | 2 +- .../Periodic_3RegularTriangulationDSCellBase_3.h | 8 ++++---- .../Periodic_3RegularTriangulationDSVertexBase_3.h | 4 ++-- .../Periodic_3RegularTriangulationTraits_3.h | 6 +++--- .../Concepts/Periodic_3TriangulationDSCellBase_3.h | 2 +- .../Periodic_3TriangulationDSVertexBase_3.h | 2 +- .../Concepts/Periodic_3TriangulationTraits_3.h | 10 +++++----- .../CGAL/Hyperbolic_octagon_translation.h | 2 +- .../CGAL/Periodic_4_hyperbolic_triangulation_2.h | 4 ++-- ...riodic_4_hyperbolic_triangulation_face_base_2.h | 6 +++--- ...odic_4_hyperbolic_triangulation_vertex_base_2.h | 8 ++++---- ...odic_4HyperbolicDelaunayTriangulationTraits_2.h | 4 ++-- .../Periodic_4HyperbolicTriangulationFaceBase_2.h | 6 +++--- .../Periodic_4HyperbolicTriangulationTraits_2.h | 2 +- ...Periodic_4HyperbolicTriangulationVertexBase_2.h | 2 +- 34 files changed, 69 insertions(+), 75 deletions(-) diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h index 17dfdba7db5..4018623cda9 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_2.h @@ -15,9 +15,9 @@ The hyperbolic plane is represented in the Poincaré disk model. \tparam Tds must be a model of `TriangulationDataStructure_2`. By default, this parameter is instantiated with `Triangulation_data_structure_2< Triangulation_vertex_base_2, Hyperbolic_triangulation_face_base_2 >` -\sa HyperbolicDelaunayTriangulationTraits_2 -\sa TriangulationDataStructure_2 -\sa Delaunay_triangulation_2 +\sa `HyperbolicDelaunayTriangulationTraits_2` +\sa `TriangulationDataStructure_2` +\sa `Delaunay_triangulation_2` */ diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h index 76b285babfa..5f76f81f6ad 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h @@ -18,9 +18,9 @@ provides exact constructions and predicates. The default value for `K` is constructions of Delaunay triangulations and dual objects for input points with algebraic coordinates. -\sa Hyperbolic_Delaunay_triangulation_CK_traits_2 +\sa `Hyperbolic_Delaunay_triangulation_CK_traits_2` -\cgalModels HyperbolicDelaunayTriangulationTraits_2 +\cgalModels `HyperbolicDelaunayTriangulationTraits_2` */ template< class K > diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_triangulation_face_base_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_triangulation_face_base_2.h index 60c6d7c56b4..7419008b2e4 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_triangulation_face_base_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/CGAL/Hyperbolic_triangulation_face_base_2.h @@ -14,7 +14,7 @@ offered by %CGAL. \tparam Fb must be a model of `TriangulationFaceBase_2`. %Defaults to `Triangulation_face_base_2`. -\cgalModels HyperbolicTriangulationFaceBase_2 +\cgalModels `HyperbolicTriangulationFaceBase_2` */ diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicDelaunayTriangulationTraits_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicDelaunayTriangulationTraits_2.h index b313c51cbc3..9d3fcc0ad37 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicDelaunayTriangulationTraits_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicDelaunayTriangulationTraits_2.h @@ -16,8 +16,8 @@ constructions on these objects. This concept refines `DelaunayTriangulationTraits_2` because the class `CGAL::Hyperbolic_Delaunay_triangulation_2` internally relies on the class `CGAL::Delaunay_triangulation_2`. -\cgalHasModel CGAL::Hyperbolic_Delaunay_triangulation_traits_2 -\cgalHasModel CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2 +\cgalHasModel `CGAL::Hyperbolic_Delaunay_triangulation_traits_2` +\cgalHasModel `CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2` */ diff --git a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicTriangulationFaceBase_2.h b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicTriangulationFaceBase_2.h index 01cf82eb4b0..633c43c65d0 100644 --- a/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicTriangulationFaceBase_2.h +++ b/Hyperbolic_triangulation_2/doc/Hyperbolic_triangulation_2/Concepts/HyperbolicTriangulationFaceBase_2.h @@ -14,7 +14,7 @@ This concept provides an interface for the functionality needed in faces to comp Delaunay triangulations in the hyperbolic plane. The function `tds_data()` is used internally by the triangulation class during the insertion of points in the triangulation. -\cgalHasModel CGAL::Hyperbolic_triangulation_face_base_2 +\cgalHasModel `CGAL::Hyperbolic_triangulation_face_base_2` \sa `TriangulationDataStructure_2` @@ -25,7 +25,7 @@ class HyperbolicTriangulationFaceBase_2 { public: - /// \name Internal access functions + /// \name Internal Access Functions /// \cgalAdvancedBegin /// These functions are used internally by the hyperbolic Delaunay triangulation. /// The user is not encouraged to use them directly as they may change in the future. diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h index b3349d760a0..0f72f4c2b15 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_Delaunay_triangulation_traits_2.h @@ -21,7 +21,7 @@ predicates. This holds implicitly for `CGAL::Exact_predicates_inexact_constructions_kernel`, as it is an instantiation of `CGAL::Filtered_kernel`. -\cgalModels ::Periodic_2DelaunayTriangulationTraits_2 +\cgalModels `::Periodic_2DelaunayTriangulationTraits_2` */ template< typename Traits, typename Periodic_2Offset_2 > class Periodic_2_Delaunay_triangulation_traits_2 diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index d56a4e6301f..605e6c00d82 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -10,14 +10,11 @@ namespace CGAL The class `Periodic_2_triangulation_2` represents a 2-dimensional triangulation of a point set in \f$ \mathbb T_c^2\f$. -\cgalHeading{Parameters} - -The class `Periodic_2_triangulation_2` has two template -parameters. The first one \tparam Traits is the geometric traits, it +\tparam Traits is the geometric traits, it is to be instantiated by a model of the concept `Periodic_2TriangulationTraits_2`. -The second parameter \tparam TDS is the triangulation data structure, +\tparam TDS is the triangulation data structure, it has to be instantiated by a model of the concept `TriangulationDataStructure_2` with some additional functionality in faces. diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_face_base_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_face_base_2.h index 399284bb82d..6bb72ea1d75 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_face_base_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_face_base_2.h @@ -29,7 +29,7 @@ the offset corresponding to vertex \f$ i\f$. The implementation of `has_zero_offsets()` results in checking whether all offsets are zero. -\cgalModels ::Periodic_2TriangulationFaceBase_2 +\cgalModels `::Periodic_2TriangulationFaceBase_2` \sa `CGAL::Triangulation_face_base_2` \sa `CGAL::Triangulation_face_base_with_info_2` diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h index 1ebccb160e5..726d2f5af83 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_traits_2.h @@ -11,8 +11,7 @@ The class `Periodic_2_triangulation_traits_2` is designed as a default traits class for the class `Periodic_2_triangulation_2`. -The argument \tparam Traits must be a model of the -`TriangulationTraits_2` concept. The argument +\tparam Traits must be a model of the `TriangulationTraits_2` concept. \tparam Periodic_2Offset_2 must be a model of the concept `Periodic_2Offset_2` and defaults to `Periodic_2_offset_2`. diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h index 418a31eded5..6bc1a42ce38 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2DelaunayTriangulationTraits_2.h @@ -14,18 +14,18 @@ predicates from `DelaunayTriangulationTraits_2` can be used directly. For efficiency reasons we maintain for each functor the version without offsets. -\cgalRefines ::DelaunayTriangulationTraits_2 and ::Periodic_2TriangulationTraits_2 +\cgalRefines `DelaunayTriangulationTraits_2` and `Periodic_2TriangulationTraits_2` In addition to the requirements of the concepts `Periodic_2TriangulationTraits_2` and `DelaunayTriangulationTraits_2`, -the concept ::Periodic_2DelaunayTriangulationTraits_2 provides a predicate to check the empty circle property. The -corresponding predicate type is called type ::Periodic_2DelaunayTriangulationTraits_2::Side_of_oriented_circle_2. +the concept `::Periodic_2DelaunayTriangulationTraits_2` provides a predicate to check the empty circle property. The +corresponding predicate type is called type `::Periodic_2DelaunayTriangulationTraits_2::Side_of_oriented_circle_2`. -The additional constructor object ::Periodic_2DelaunayTriangulationTraits_2::Construct_circumcenter_2 is +The additional constructor object `::Periodic_2DelaunayTriangulationTraits_2::Construct_circumcenter_2` is used to build the dual Voronoi diagram and are required only if the dual functions are called. The additional predicate type -::Periodic_2DelaunayTriangulationTraits_2::Compare_distance_2 is required if calls to -nearest_vertex(..) are issued. +`::Periodic_2DelaunayTriangulationTraits_2::Compare_distance_2` is required if calls to +`nearest_vertex(..)` are issued. \cgalHasModel `CGAL::Periodic_2_Delaunay_triangulation_traits_2` @@ -99,7 +99,7 @@ public: /// @} -/// \name Predicate functions +/// \name Predicate Functions /// @{ /*! diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h index ec62e3bd3ae..c3d9e3b3c7b 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2Offset_2.h @@ -7,7 +7,7 @@ The concept `Periodic_2Offset_2` describes a two-/dimensional integer vector with some specialized access functions and operations. -\cgalHasModel CGAL::Periodic_2_offset_2 +\cgalHasModel `CGAL::Periodic_2_offset_2` \sa `Periodic_2TriangulationTraits_2` \sa `Periodic_2DelaunayTriangulationTraits_2` diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationFaceBase_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationFaceBase_2.h index 27763d3edde..d6f3e40edbf 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationFaceBase_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationFaceBase_2.h @@ -11,9 +11,9 @@ its four vertices and to its four neighbor faces. The vertices and neighbors are indexed 0, 1 and 2. Neighbor \f$ i\f$ lies opposite to vertex \f$ i\f$. -\cgalRefines ::TriangulationFaceBase_2 +\cgalRefines `TriangulationFaceBase_2` -\cgalHasModel CGAL::Periodic_2_triangulation_face_base_2 +\cgalHasModel `CGAL::Periodic_2_triangulation_face_base_2` \sa `TriangulationDataStructure_2` \sa `TriangulationFaceBase_2` diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h index 781ffd7b85d..f5161d682ed 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationTraits_2.h @@ -18,13 +18,13 @@ predicates from `TriangulationTraits_2` can be used directly. For efficiency reasons we maintain for each functor the version without offsets. -\cgalRefines ::TriangulationTraits_2 +\cgalRefines `TriangulationTraits_2` In addition to the requirements described for the traits class -::TriangulationTraits_2, the geometric traits class of a +`TriangulationTraits_2`, the geometric traits class of a Periodic triangulation must fulfill the following requirements: -\cgalHasModel CGAL::Periodic_2_triangulation_traits_2 +\cgalHasModel `CGAL::Periodic_2_triangulation_traits_2` \sa `TriangulationTraits_2` \sa `CGAL::Periodic_2_triangulation_2` diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationVertexBase_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationVertexBase_2.h index 8722dfa277e..0ed7a18153a 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationVertexBase_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Concepts/Periodic_2TriangulationVertexBase_2.h @@ -16,7 +16,7 @@ The storage of the offset is only needed when a triangulation is copied. \cgalRefines `TriangulationVertexBase_2` -\cgalHasModel CGAL::Periodic_2_triangulation_vertex_base_2 +\cgalHasModel` CGAL::Periodic_2_triangulation_vertex_base_2` \sa `TriangulationDataStructure_2` \sa `TriangulationVertexBase_2` diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h index 9ce89508170..770ac8e656c 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_Delaunay_triangulation_traits_3.h @@ -16,7 +16,7 @@ will be used if the flag `Traits::Has_static_filters` exists and is `true`. By default, this holds for `CGAL::Exact_predicates_inexact_constructions_kernel` and `CGAL::Exact_predicates_exact_constructions_kernel`. -\cgalModels Periodic_3DelaunayTriangulationTraits_3 +\cgalModels `Periodic_3DelaunayTriangulationTraits_3` */ template< typename Traits, typename Offset > class Periodic_3_Delaunay_triangulation_traits_3 diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_regular_triangulation_traits_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_regular_triangulation_traits_3.h index e6ba3731ff8..8a4ec39a0cf 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_regular_triangulation_traits_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_regular_triangulation_traits_3.h @@ -15,7 +15,7 @@ and is `true`), this class automatically provides filtered predicates. By default, this holds for `CGAL::Exact_predicates_inexact_constructions_kernel` and `CGAL::Exact_predicates_exact_constructions_kernel`. -\cgalModels Periodic_3RegularTriangulationTraits_3 +\cgalModels `Periodic_3RegularTriangulationTraits_3` */ template< typename Traits, typename Offset > class Periodic_3_regular_triangulation_traits_3 : diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_hierarchy_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_hierarchy_3.h index a9fac021ee0..1af91f472cd 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_hierarchy_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_hierarchy_3.h @@ -8,8 +8,6 @@ The class `Periodic_3_triangulation_hierarchy_3` implements a triangulation augmented with a data structure which allows fast point location queries. -\cgalHeading{Template Parameters} - \tparam PTr must be one of the \cgal periodic triangulation classes. In the current implementation, only `Periodic_3_Delaunay_triangulation_3` is supported for. diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_traits_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_traits_3.h index bdf39faa352..815940b5911 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_traits_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/CGAL/Periodic_3_triangulation_traits_3.h @@ -16,7 +16,7 @@ will be used if the flag `Traits::Has_static_filters` exists and is `true`. By default, this holds for `CGAL::Exact_predicates_inexact_constructions_kernel` and `CGAL::Exact_predicates_exact_constructions_kernel`. -\cgalModels Periodic_3TriangulationTraits_3 +\cgalModels `Periodic_3TriangulationTraits_3` */ template< typename Traits, typename Offset > class Periodic_3_triangulation_traits_3 : public Traits { diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3DelaunayTriangulationTraits_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3DelaunayTriangulationTraits_3.h index 12b9c3b9704..a21917ec41e 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3DelaunayTriangulationTraits_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3DelaunayTriangulationTraits_3.h @@ -13,10 +13,10 @@ work with point-offset pairs. In most cases the offsets will be can be used directly. For efficiency reasons we maintain for each functor the version without offsets. -\cgalRefines Periodic_3TriangulationTraits_3 -\cgalRefines DelaunayTriangulationTraits_3 +\cgalRefines `Periodic_3TriangulationTraits_3` +\cgalRefines `DelaunayTriangulationTraits_3` -\cgalHasModel CGAL::Periodic_3_Delaunay_triangulation_traits_3 +\cgalHasModel `CGAL::Periodic_3_Delaunay_triangulation_traits_3` In addition to the requirements described by the concepts `Periodic_3TriangulationTraits_3` and `DelaunayTriangulationTraits_3`, diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3Offset_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3Offset_3.h index 5e6cbbdf526..1896b2291dc 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3Offset_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3Offset_3.h @@ -6,7 +6,7 @@ The concept `Periodic_3Offset_3` describes a three-dimensional integer vector with some specialized access functions and operations. -\cgalHasModel CGAL::Periodic_3_offset_3 +\cgalHasModel `CGAL::Periodic_3_offset_3` \sa `Periodic_3TriangulationTraits_3` \sa `Periodic_3DelaunayTriangulationTraits_3` diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSCellBase_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSCellBase_3.h index 1a511ee7ac7..98b07f6d6b7 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSCellBase_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSCellBase_3.h @@ -6,10 +6,10 @@ \cgalRefines `RegularTriangulationCellBase_3` \cgalRefines `Periodic_3TriangulationDSCellBase_3` -\cgalHasModel CGAL::Regular_triangulation_cell_base_3 > -\cgalHasModel CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3 > +\cgalHasModel `CGAL::Regular_triangulation_cell_base_3 >` +\cgalHasModel `CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3 >` The template parameter `Periodic_3RegularTriangulationTraits_3` is expected to be the same as the traits class used in `CGAL::Periodic_3_regular_triangulation_3`. diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSVertexBase_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSVertexBase_3.h index 462101711f6..1d2a7bec41c 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSVertexBase_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationDSVertexBase_3.h @@ -6,8 +6,8 @@ \cgalRefines `RegularTriangulationVertexBase_3` \cgalRefines `Periodic_3TriangulationDSVertexBase_3` -\cgalHasModel CGAL::Regular_triangulation_vertex_base_3 > +\cgalHasModel `CGAL::Regular_triangulation_vertex_base_3 >` The template parameter `Periodic_3RegularTriangulationTraits_3` is expected to be the same as the traits class used in `CGAL::Periodic_3_regular_triangulation_3`. diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationTraits_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationTraits_3.h index 9f7ffb809eb..b3b645b972e 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationTraits_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3RegularTriangulationTraits_3.h @@ -13,10 +13,10 @@ work with point-offset pairs. In most cases the offsets will be can be used directly. For efficiency reasons we maintain for each functor the version without offsets. -\cgalRefines Periodic_3TriangulationTraits_3 -\cgalRefines RegularTriangulationTraits_3 +\cgalRefines `Periodic_3TriangulationTraits_3` +\cgalRefines `RegularTriangulationTraits_3` -\cgalHasModel CGAL::Periodic_3_regular_triangulation_traits_3 +\cgalHasModel `CGAL::Periodic_3_regular_triangulation_traits_3` In addition to the requirements described for the traits class RegularTriangulationTraits_3, the geometric traits class of a diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSCellBase_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSCellBase_3.h index 4a7eebecefd..ccbb25caee0 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSCellBase_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSCellBase_3.h @@ -18,7 +18,7 @@ does not contain any information. \cgalRefines `TriangulationDSCellBase_3` -\cgalHasModel CGAL::Periodic_3_triangulation_ds_cell_base_3 +\cgalHasModel `CGAL::Periodic_3_triangulation_ds_cell_base_3` \sa `TriangulationDataStructure_3` \sa `TriangulationDSCellBase_3` diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSVertexBase_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSVertexBase_3.h index 1cf7e9ab938..fc9c47c0f9b 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSVertexBase_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationDSVertexBase_3.h @@ -12,7 +12,7 @@ a vertex provides access to one of its incident cells through a handle. \cgalRefines `TriangulationDSVertexBase_3` -\cgalHasModel CGAL::Periodic_3_triangulation_ds_vertex_base_3 +\cgalHasModel `CGAL::Periodic_3_triangulation_ds_vertex_base_3` \sa `TriangulationDataStructure_3` \sa `TriangulationDSVertexBase_3` diff --git a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationTraits_3.h b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationTraits_3.h index ff7448b2e32..be1990d1f14 100644 --- a/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationTraits_3.h +++ b/Periodic_3_triangulation_3/doc/Periodic_3_triangulation_3/Concepts/Periodic_3TriangulationTraits_3.h @@ -12,15 +12,15 @@ work with point-offset pairs. In most cases the offsets will be can be used directly. For efficiency reasons we maintain for each functor the version without offsets. -\cgalRefines TriangulationTraits_3 +\cgalRefines `TriangulationTraits_3` -\cgalHasModel CGAL::Periodic_3_triangulation_traits_3 +\cgalHasModel `CGAL::Periodic_3_triangulation_traits_3` -\sa Periodic_3DelaunayTriangulationTraits_3 -\sa Periodic_3RegularTriangulationTraits_3 +\sa `Periodic_3DelaunayTriangulationTraits_3` +\sa `Periodic_3RegularTriangulationTraits_3` In addition to the requirements described for the traits class -TriangulationTraits_3, the geometric traits class of a +`TriangulationTraits_3`, the geometric traits class of a Periodic triangulation must fulfill the following requirements. */ diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h index 0c852bb81c4..7673f99b941 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h @@ -11,7 +11,7 @@ The class `Hyperbolic_octagon_translation` defines an object to represent a hype translation of the fundamental group of the Bolza surface \f$\mathcal M\f$. It accepts one template parameter: -\tparam FT %Field number Type. Must provide exact computations with algebraic numbers, +\tparam FT %Field number type. Must provide exact computations with algebraic numbers, notably with nested square roots. The default value for this parameter is `CORE::Expr`. diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_2.h index 925820bd10d..246a031e603 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_2.h @@ -13,10 +13,10 @@ modification of the triangulation (insertion or removal). The class expects two template parameters. -\tparam GT Geometric Traits parameter. Must be a model of the concept +\tparam GT Geometric traits parameter. Must be a model of the concept `Periodic_4HyperbolicTriangulationTraits_2`. This parameter has no default value. -\tparam TDS %Triangulation Data Structure parameter. Must be a model of the concept +\tparam TDS %Triangulation data structure parameter. Must be a model of the concept `TriangulationDataStructure_2` with some additional functionality in the vertices and faces, following the concepts `Periodic_4HyperbolicTriangulationVertexBase_2` and `Periodic_4HyperbolicTriangulationFaceBase_2`, respectively. The default value for diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h index 4cd8600fe05..cdc502886ae 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_face_base_2.h @@ -10,18 +10,18 @@ namespace CGAL { The class `Periodic_4_hyperbolic_triangulation_face_base_2` is the default model for the concept `Periodic_4HyperbolicTriangulationFaceBase_2`. It accepts two template parameters: -\tparam GT Geometric Traits type. This should be the same model of the concept +\tparam GT Geometric traits type. This should be the same model of the concept `Periodic_4HyperbolicDelaunayTriangulationTraits_2` that is used in the class `Periodic_4_hyperbolic_Delaunay_triangulation_2`. This template parameter has no default value. -\tparam FB Face Base type. Should be a model of the concept `TriangulationFaceBase_2`. +\tparam FB Face base type. Should be a model of the concept `TriangulationFaceBase_2`. The default value for this template parameter is `Triangulation_face_base_2` `Periodic_4_hyperbolic_triangulation_face_base_2` can be simply plugged in the triangulation data structure of a periodic hyperbolic triangulation, or used as a base class to derive other base vertex classes tuned for specific applications. -\cgalModels Periodic_4HyperbolicTriangulationFaceBase_2 +\cgalModels `Periodic_4HyperbolicTriangulationFaceBase_2` \sa `Periodic_4_hyperbolic_triangulation_vertex_base_2` */ diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h index b8902beb9f0..9086b49465f 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Periodic_4_hyperbolic_triangulation_vertex_base_2.h @@ -10,18 +10,18 @@ namespace CGAL { The class `Periodic_4_hyperbolic_triangulation_vertex_base_2` is the default model for the concept `Periodic_4HyperbolicTriangulationVertexBase_2`. It accepts two template parameters: -\tparam GT Geometric Traits type. This should be the same model of the concept +\tparam GT Geometric traits type. This should be the same model of the concept `Periodic_4HyperbolicDelaunayTriangulationTraits_2` that is used in the class `Periodic_4_hyperbolic_Delaunay_triangulation_2`. This template parameter has no default value. -\tparam Vb Vertex Base type. Should be a model of the concept `TriangulationVertexBase_2`. +\tparam Vb Vertex base type. Should be a model of the concept `TriangulationVertexBase_2`. The default value for this template parameter is `CGAL::Triangulation_vertex_base_2` `Periodic_4_hyperbolic_triangulation_vertex_base_2` can be simply plugged in the triangulation data structure of a periodic hyperbolic triangulation, or used as a base class to derive other base vertex classes tuned for specific applications. -\cgalModels Periodic_4HyperbolicTriangulationVertexBase_2 +\cgalModels `Periodic_4HyperbolicTriangulationVertexBase_2` \sa `Periodic_4_hyperbolic_triangulation_face_base_2` */ @@ -32,4 +32,4 @@ class Periodic_4_hyperbolic_triangulation_vertex_base_2 : public Vb { }; -} // namespace CGAL \ No newline at end of file +} // namespace CGAL diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h index a951f75f504..19056add9e6 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicDelaunayTriangulationTraits_2.h @@ -5,14 +5,14 @@ \ingroup PkgPeriodic4HyperbolicTriangulation2Concepts \cgalConcept -\cgalRefines Periodic_4HyperbolicTriangulationTraits_2 +\cgalRefines `Periodic_4HyperbolicTriangulationTraits_2` The concept `Periodic_4HyperbolicDelaunayTriangulationTraits_2` adds a requirement to `Periodic_4HyperbolicTriangulationTraits_2` that needs to be fulfilled by any class used to instantiate the first template parameter of the class `CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_2`. -\cgalHasModel CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2 +\cgalHasModel `CGAL::Periodic_4_hyperbolic_Delaunay_triangulation_traits_2` */ diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h index cc170293a15..5db3c3efde0 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationFaceBase_2.h @@ -5,7 +5,7 @@ \ingroup PkgPeriodic4HyperbolicTriangulation2Concepts \cgalConcept -\cgalRefines TriangulationFaceBase_2 +\cgalRefines `TriangulationFaceBase_2` A refinement of the concept `TriangulationFaceBase_2` that adds an interface for hyperbolic translations. @@ -20,7 +20,7 @@ corresponding vertex produces the canonical representative of the face in the hy Hyperbolic translations are represented by a nested type which is provided by the concept `Periodic_4HyperbolicDelaunayTriangulationTraits_2`. -\cgalHasModel CGAL::Periodic_4_hyperbolic_triangulation_face_base_2 +\cgalHasModel `CGAL::Periodic_4_hyperbolic_triangulation_face_base_2` \sa `TriangulationDataStructure_2` \sa `Periodic_4HyperbolicTriangulationVertexBase_2` @@ -91,4 +91,4 @@ public: /// @} -}; \ No newline at end of file +}; diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h index 59ff4b0da84..40a4420ecae 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationTraits_2.h @@ -5,7 +5,7 @@ \ingroup PkgPeriodic4HyperbolicTriangulation2Concepts \cgalConcept -\cgalRefines HyperbolicDelaunayTriangulationTraits_2 +\cgalRefines `HyperbolicDelaunayTriangulationTraits_2` The concept `Periodic_4HyperbolicTriangulationTraits_2` describes the set of requirements to be fulfilled by any class used to instantiate the first template parameter of the class diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationVertexBase_2.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationVertexBase_2.h index a0c70d31eaf..203364f5537 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationVertexBase_2.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/Concepts/Periodic_4HyperbolicTriangulationVertexBase_2.h @@ -5,7 +5,7 @@ \ingroup PkgPeriodic4HyperbolicTriangulation2Concepts \cgalConcept -\cgalRefines TriangulationVertexBase_2 +\cgalRefines `TriangulationVertexBase_2` A refinement of the concept `TriangulationVertexBase_2` that adds an interface for hyperbolic translations. From 93d665e01f69e9b8c1612f24a7854174feec9760 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 8 Mar 2019 11:04:46 +0100 Subject: [PATCH 039/271] Fix clipping box plugin --- .../Plugins/PCA/Clipping_box_plugin.cpp | 5 ++-- .../Plugins/PCA/Clipping_box_widget.ui | 26 ++++++++++++++++++- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp index 500e94cf320..9c8483e50db 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp @@ -189,6 +189,7 @@ void Clipping_box_plugin::tab_change() { CGAL::Three::Viewer_interface* viewer = static_cast( *CGAL::QGLViewer::QGLViewerPool().begin()); + QAction* action = mw->findChild("actionSwitchProjection"); if(dock_widget->tabWidget->currentIndex() == 1) { if(item) @@ -196,11 +197,11 @@ void Clipping_box_plugin::tab_change() scene->erase(scene->item_id(item)); item = NULL; } - viewer->SetOrthoProjection(true); + action->setChecked(true); } else { - viewer->SetOrthoProjection(false); + action->setChecked(false); clipbox(); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui index 24524649170..d3eb437bf52 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui @@ -18,7 +18,7 @@ - 0 + 1 @@ -125,6 +125,30 @@ + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Info: SHIFT+Click to clip. + + + + + From 5c433eab019a9b8478af6afa388de5a9936011d5 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 8 Mar 2019 11:32:50 +0100 Subject: [PATCH 040/271] Fix show/hide --- Polyhedron/demo/Polyhedron/Scene.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene.h b/Polyhedron/demo/Polyhedron/Scene.h index d993765b96a..d0d026202e2 100644 --- a/Polyhedron/demo/Polyhedron/Scene.h +++ b/Polyhedron/demo/Polyhedron/Scene.h @@ -141,8 +141,8 @@ public: CGAL::Three::Viewer_interface*) Q_DECL_OVERRIDE; void setUpdatesEnabled(bool b) Q_DECL_OVERRIDE { - dont_emit_changes = b; - if(b) + dont_emit_changes = !b; + if(!b) allItemsChanged(); } From 6e02c33fde6987fad5de50e0c6995eaa8289aab6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 8 Mar 2019 16:01:07 +0100 Subject: [PATCH 041/271] Add calls to `time` to display timings --- .travis.yml | 10 +++++----- .travis/build_package.sh | 22 +++++++++++----------- .travis/template.txt | 10 +++++----- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82227701898..807a09a7fc6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - bash .travis/install.sh + - time bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build -- cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- make -- sudo make install &>/dev/null +- time cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. +- time make +- time sudo make install &>/dev/null - cd .. script: - cd ./.travis -- bash ./build_package.sh $PACKAGE +- time bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/build_package.sh b/.travis/build_package.sh index adfc3bda083..f5497b60e31 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -7,8 +7,8 @@ CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0" function build_examples { mkdir -p build-travis cd build-travis - cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. - make -j2 + time cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. + time make -j2 } function build_tests { @@ -24,8 +24,8 @@ function build_demo { EXTRA_CXX_FLAGS="-Werror=inconsistent-missing-override" ;; esac - cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. - make -j2 + time cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. + time make -j2 } old_IFS=$IFS IFS=$' ' @@ -42,20 +42,20 @@ cd $ROOT [ "$ARG" = Polygon_mesh_processing ] || [ "$ARG" = Property_map ] ||\ [ "$ARG" = Surface_mesh_deformation ] || [ "$ARG" = Surface_mesh_shortest_path ] ||\ [ "$ARG" = Surface_mesh_simplification ]; then - sudo bash .travis/install_openmesh.sh + time sudo bash .travis/install_openmesh.sh fi if [ "$ARG" = "CHECK" ] then cd .travis - ./generate_travis.sh --check + time ./generate_travis.sh --check cd .. IFS=$old_IFS - zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD + time zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD #test dependencies cd $ROOT - bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen + time bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen cd .travis #parse current matrix and check that no package has been forgotten @@ -92,8 +92,8 @@ cd $ROOT cd $ROOT mkdir build_test cd build_test - cmake -DCMAKE_INSTALL_PREFIX=install/ .. - make install + time cmake -DCMAKE_INSTALL_PREFIX=install/ .. + time make install # test install with minimal downstream example mkdir installtest cd installtest @@ -106,7 +106,7 @@ cd $ROOT echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt echo '#include "CGAL/remove_outliers.h"' >> main.cpp cd build - cmake -DCMAKE_INSTALL_PREFIX=../../install .. + time cmake -DCMAKE_INSTALL_PREFIX=../../install .. cd .. exit 0 fi diff --git a/.travis/template.txt b/.travis/template.txt index 97662bb5b89..a373d233241 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - bash .travis/install.sh + - time bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build -- cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- make -- sudo make install &>/dev/null +- time cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. +- time make +- time sudo make install &>/dev/null - cd .. script: - cd ./.travis -- bash ./build_package.sh $PACKAGE +- time bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always From 60ce59aeaa7e294a5d7396415c7dc3dc2074ca3a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 8 Mar 2019 16:04:13 +0100 Subject: [PATCH 042/271] the assertion is subject to precision of double's so we can release the test by 1e-15 --- Mesh_3/test/Mesh_3/test_meshing_utilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/test/Mesh_3/test_meshing_utilities.h b/Mesh_3/test/Mesh_3/test_meshing_utilities.h index 40b1eb85f46..f8e953a39c3 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_utilities.h +++ b/Mesh_3/test/Mesh_3/test_meshing_utilities.h @@ -247,7 +247,7 @@ struct Tester std::cout << "\tQuality before optimization: " << original << " - Quality after optimization: " << modified << std::endl; - assert(original <= modified); + assert(original <= modified + 1e-15/*precision of double*/); } template From 0c1696133766551bd7b35ee027515e8a67aa4183 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 8 Mar 2019 16:13:05 +0100 Subject: [PATCH 043/271] Update Mesh_3/test/Mesh_3/test_meshing_utilities.h fix precision test Co-Authored-By: janetournois --- Mesh_3/test/Mesh_3/test_meshing_utilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/test/Mesh_3/test_meshing_utilities.h b/Mesh_3/test/Mesh_3/test_meshing_utilities.h index f8e953a39c3..c94a0484139 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_utilities.h +++ b/Mesh_3/test/Mesh_3/test_meshing_utilities.h @@ -247,7 +247,7 @@ struct Tester std::cout << "\tQuality before optimization: " << original << " - Quality after optimization: " << modified << std::endl; - assert(original <= modified + 1e-15/*precision of double*/); + assert(original <= modified * (1. + 1e-15) /*precision of double*/ ); } template From 6f12a4ab6fe64f891214a46ab5479e84ad069d0b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 5 Mar 2019 16:50:30 +0100 Subject: [PATCH 044/271] fix the test ``collapse_does_not_invert_face()` Testing orientation of normals per patch (identified by their Id) is not a good solution, because it can happen that we are trying to collapse an edge that is sharp but which has both of its incident faces on the same surface patch (wrt ids). The new test is a lot simpler : for each non-degenerate face of the link of the edge to be collapsed, simply check if its own normal has changed orientation or not. The adjacent faces do not need to be taken into account --- .../Isotropic_remeshing/remesh_impl.h | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 0e0596fc1fb..946c1bd0a63 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -1421,19 +1422,46 @@ private: { vertex_descriptor vs = source(h, mesh_); vertex_descriptor vt = target(h, mesh_); - + + //collect normals to faces around vs AND vt + boost::unordered_map normals_before_collapse; + + BOOST_FOREACH(halfedge_descriptor hd, + boost::range::join(halfedges_around_target(h, mesh_), + halfedges_around_target(opposite(h, mesh_), mesh_))) + { + normals_before_collapse[hd] = compute_normal(face(hd, mesh_)); + //note `compute_normal()` returns CGAL::NULL_VECTOR for degenerate faces + } + //backup source point Point ps = get(vpmap_, vs); //move source at target put(vpmap_, vs, get(vpmap_, vt)); - //collect normals to faces around vs AND vt - //vertices are at the same location, but connectivity is still be same, + //now vertices are at the same location, but connectivity is still the same, //with plenty of degenerate triangles (which are common to both stars) - bool res = check_normals( - boost::range::join( - halfedges_around_target(h, mesh_), - halfedges_around_target(opposite(h, mesh_), mesh_))); + //check that normals to non-degenerate faces have not been inverted + //(i.e. they are still pointing in the same direction) + bool res = true; + BOOST_FOREACH(halfedge_descriptor hd, + boost::range::join( + halfedges_around_target(h, mesh_), + halfedges_around_target(opposite(h, mesh_), mesh_))) + { + face_descriptor fd = face(hd, mesh_); + if ( fd == boost::graph_traits::null_face() + || is_degenerate_triangle_face(fd, mesh_, vpmap_, GeomTraits())) + continue; + + Vector_3 n_after = compute_normal(face(hd, mesh_)); //deals with degenerate faces + Vector_3 n_before = normals_before_collapse[hd]; + if (n_after * n_before <= 0) + { + res = false; + break; + } + } //restore position put(vpmap_, vs, ps); From 9cbb6f3785fda9041c812bb7080b9185e6136468 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 8 Mar 2019 15:02:39 +0100 Subject: [PATCH 045/271] test inversion only on faces that really need to be tested and rename function collapse_does_not_invert_face(he) to collapse_would_invert_face(he) for clarity --- .../Isotropic_remeshing/remesh_impl.h | 71 +++++++------------ 1 file changed, 27 insertions(+), 44 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 946c1bd0a63..f32b96fb55b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -721,11 +720,11 @@ namespace internal { can_swap=false; } - if(!collapse_does_not_invert_face(he)) + if(collapse_would_invert_face(he)) { if (can_swap//if swap allowed (no constrained vertices) && (!is_vb_on_constrained_polyline || is_va_on_constrained_polyline) - && collapse_does_not_invert_face(opposite(he, mesh_))) + && !collapse_would_invert_face(opposite(he, mesh_))) { he = opposite(he, mesh_); e=edge(he, mesh_); @@ -734,7 +733,7 @@ namespace internal { else continue;//both directions invert a face } - CGAL_assertion(collapse_does_not_invert_face(he)); + CGAL_assertion(!collapse_would_invert_face(he)); CGAL_assertion(is_collapse_allowed(e, collapse_constraints)); if (!CGAL::Euler::does_satisfy_link_condition(e, mesh_))//necessary to collapse @@ -1418,54 +1417,38 @@ private: return end; } - bool collapse_does_not_invert_face(const halfedge_descriptor& h) const + bool collapse_would_invert_face(const halfedge_descriptor& h) const { - vertex_descriptor vs = source(h, mesh_); - vertex_descriptor vt = target(h, mesh_); + const Point& src = get(vpmap_, source(h, mesh_)); + const Point& tgt = get(vpmap_, target(h, mesh_)); - //collect normals to faces around vs AND vt - boost::unordered_map normals_before_collapse; + typename GeomTraits::Construct_normal_3 normal + = GeomTraits().construct_normal_3_object(); + //check if collapsing the edge [src; tgt] towards tgt + //would inverse the normal to the considered face + //src and tgt are the endpoints of the edge to be collapsed + //p and q are the vertices that form the face to be tested + //along with src before collapse, and with tgt after collapse BOOST_FOREACH(halfedge_descriptor hd, - boost::range::join(halfedges_around_target(h, mesh_), - halfedges_around_target(opposite(h, mesh_), mesh_))) + halfedges_around_target(opposite(h, mesh_), mesh_)) { - normals_before_collapse[hd] = compute_normal(face(hd, mesh_)); - //note `compute_normal()` returns CGAL::NULL_VECTOR for degenerate faces - } - - //backup source point - Point ps = get(vpmap_, vs); - //move source at target - put(vpmap_, vs, get(vpmap_, vt)); - - //now vertices are at the same location, but connectivity is still the same, - //with plenty of degenerate triangles (which are common to both stars) - //check that normals to non-degenerate faces have not been inverted - //(i.e. they are still pointing in the same direction) - bool res = true; - BOOST_FOREACH(halfedge_descriptor hd, - boost::range::join( - halfedges_around_target(h, mesh_), - halfedges_around_target(opposite(h, mesh_), mesh_))) - { - face_descriptor fd = face(hd, mesh_); - if ( fd == boost::graph_traits::null_face() - || is_degenerate_triangle_face(fd, mesh_, vpmap_, GeomTraits())) + if (face(hd, mesh_) == boost::graph_traits::null_face()) continue; - Vector_3 n_after = compute_normal(face(hd, mesh_)); //deals with degenerate faces - Vector_3 n_before = normals_before_collapse[hd]; - if (n_after * n_before <= 0) - { - res = false; - break; - } - } + const Point& p = get(vpmap_, target(next(hd, mesh_), mesh_)); + const Point& q = get(vpmap_, target(next(next(hd, mesh_), mesh_), mesh_)); - //restore position - put(vpmap_, vs, ps); - return res; + if (Triangle_3(tgt, p, q).is_degenerate()) + continue; + + Vector_3 normal_before_collapse = normal(src, p, q); + Vector_3 normal_after_collapse = normal(tgt, p, q); + + if (normal_before_collapse * normal_after_collapse <= 0) + return true; + } + return false; } bool is_constrained(const vertex_descriptor& v) const From 961c90070bbf8dc879ac024d329a2b5ee14e1a25 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 10 Mar 2019 13:19:55 +0100 Subject: [PATCH 046/271] Multiple definition of incident_cells The function has been defined twice, removed second definition. --- .../Surface_mesher/Concepts/SurfaceMeshTriangulation_3.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Surface_mesher/doc/Surface_mesher/Concepts/SurfaceMeshTriangulation_3.h b/Surface_mesher/doc/Surface_mesher/Concepts/SurfaceMeshTriangulation_3.h index b489a09d628..16cc947d83f 100644 --- a/Surface_mesher/doc/Surface_mesher/Concepts/SurfaceMeshTriangulation_3.h +++ b/Surface_mesher/doc/Surface_mesher/Concepts/SurfaceMeshTriangulation_3.h @@ -238,15 +238,6 @@ template OutputIterator incident_cells(Vertex_handle v, OutputIterator cells) const; -/*! -Copies the `Cell_handle`s of all cells incident to `v` to the output -iterator `cells`. If `t.dimension() < 3`, then do nothing. -Returns the resulting output iterator. -*/ -template -OutputIterator -incident_cells(Vertex_handle v, OutputIterator cells) const; - /*! Tests whether `p` is a vertex of `t` by locating `p` in the triangulation. If `p` is found, the associated vertex `v` From 8b7f0bcb1ec7db7d0ca8ab2ff15c57b28c7055a9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 10 Mar 2019 16:00:52 +0100 Subject: [PATCH 047/271] Correction of (X)HTML warnings in case of Advanced topics Based on #3713 a number of problems were solved, but also some new issues introduced. - BaseDoxyfile.h see to it that the CGALAdvancedBegin is in a detailed part, so be sure to terminate the brief part by an extra carriage return - commands like \pre, \note read till the beginning of the next section but a \htmlonly is not seen as a section separator, so insert an extra carriage return - some places missed an "Advanced" indicator, used the cgalAdvancedType here. ##Note in Periodic_2_triangulation_2.h there appear to be a number of images that are a bit in thin air (Captions: "Insertion of a point on an edge." and "Insertion in a face."). Also just above these images theer are a number of functions that have documentation, but this is non-doxygen documentation and as such not seen by doxygen --- Documentation/doc/resources/1.8.14/BaseDoxyfile.in | 2 +- .../CGAL/Periodic_2_triangulation_2.h | 5 +++++ Point_set_3/include/CGAL/Point_set_3.h | 2 ++ TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h | 2 ++ .../doc/Triangulation/CGAL/Triangulation_data_structure.h | 4 ++++ .../doc/Triangulation/Concepts/TriangulationDataStructure.h | 2 ++ .../Triangulation_2/CGAL/Constrained_triangulation_plus_2.h | 2 ++ 7 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in index 6818d719cbc..418c2e49c58 100644 --- a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in @@ -263,7 +263,7 @@ ALIASES = "sc{1}=\1

Debugging Support
\endhtmlonly ^^" \ "cgalDebugEnd=\htmlonly[block]
\endhtmlonly" \ "cgalDebugFunction=This is a function for debugging purpose." \ - "cgalAdvancedBegin=\htmlonly[block]
Advanced
\endhtmlonly ^^" \ + "cgalAdvancedBegin=^^ \htmlonly[block]
Advanced
\endhtmlonly ^^" \ "cgalAdvancedEnd=\htmlonly[block]
\endhtmlonly" \ "cgalAdvancedFunction=This is an advanced function." \ "cgalAdvancedClass=This is an advanced class." \ diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index 7efd97aab28..adfe27b875e 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -515,6 +515,7 @@ public: Converts the current triangulation into the same periodic triangulation in the 1-sheeted covering space. \pre `is_triangulation_in_1_sheet()` + \cgalAdvancedEnd */ void convert_to_1_sheeted_covering(); @@ -991,6 +992,7 @@ public: `f`. Face `f` is modified, two new faces are created. If the triangulation contains periodic copies, a point is inserted in all periodic copies. \pre The point in vertex `v` lies inside face `f`. + \cgalAdvancedEnd */ Vertex_handle insert_in_face(const Point& p, Face_handle f); @@ -1000,6 +1002,7 @@ public: \cgalAdvancedBegin Removes a vertex of degree three. Two of the incident faces are destroyed, the third one is modified. \pre Vertex `v` is a vertex with degree three. + \cgalAdvancedEnd */ void remove_degree_3(Vertex_handle v); @@ -1023,6 +1026,7 @@ public: `[edge_begin, edge_end]`. Returns a handle to the new vertex. \pre The triangulation is a triangulation of 1 sheet + \cgalAdvancedEnd */ template @@ -1038,6 +1042,7 @@ public: and create new ones only when the sequence is exhausted. \pre The triangulation is a triangulation of 1 sheet + \cgalAdvancedEnd */ template diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index df0ea714daf..752fbabaf98 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1164,6 +1164,7 @@ public: \return Returns a pair containing: the specified property map and a Boolean set to `true` or an empty property map and a Boolean set to `false` (if the property was not found). + \cgalAdvancedEnd */ template @@ -1189,6 +1190,7 @@ public: \note The normal property must have been added to the point set before calling this method (see `add_normal_map()`). + \cgalAdvancedEnd */ Vector_push_map normal_push_map () diff --git a/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h b/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h index ee82122c9d9..00f59edabd0 100644 --- a/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h +++ b/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h @@ -125,6 +125,7 @@ data structure that only changes the vertex type. It has to define a type `Rebind_vertex::%Other` which is a rebound triangulation data structure, that is, the one whose `TriangulationDSVertexBase_3` will be `Vb2`. \note It can be implemented using a nested template class. + \cgalAdvancedEnd */ template @@ -138,6 +139,7 @@ data structure that only changes the cell type. It has to define a type `Rebind_cell::%Other` which is a rebound triangulation data structure, that is, the one whose `TriangulationDSCellBase_3` will be `Cb2`. \note It can be implemented using a nested template class. + \cgalAdvancedEnd */ template diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h index 0542353ebb1..515b96f3259 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h @@ -81,18 +81,21 @@ data structure that only changes the vertex type. It has to define a type `Other` which is a rebound triangulation data structure with `Vb2` as vertex type. \note It can be implemented using a nested template class. + \cgalAdvancedEnd */ template using Rebind_vertex = unspecified_type; /*! +\cgalAdvancedType \cgalAdvancedBegin This template class allows to get the type of a triangulation data structure that only changes the full cell type. It has to define a type `Other` which is a rebound triangulation data structure with `Fcb2` as full cell type. \note It can be implemented using a nested template class. + \cgalAdvancedEnd */ template @@ -113,6 +116,7 @@ The boundary is recognized by checking the mark of the full cells. This method is used by `Triangulation_data_structure::insert_in_hole()`. s \pre same as `TriangulationDataStructure::insert_in_hole()` + \cgalAdvancedEnd */ diff --git a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h index 28b718fe432..61eff5931f6 100644 --- a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h +++ b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h @@ -450,6 +450,8 @@ All vertices of cells of \f$ C\f$ are on \f$ \partial H\f$. \cgalFigureBegin{triangulationfiginserthole,insert-in-hole.png} Insertion in a hole, \f$ d=2\f$ \cgalFigureEnd + +\cgalAdvancedEnd */ template< class ForwardIterator > Vertex_handle insert_in_hole(ForwardIterator start, ForwardIterator end, Facet f); diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h index fc74ede4668..44bd8eae2dc 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h @@ -405,6 +405,7 @@ The simplification algorithm uses the following types and functions. /// @{ /*! +\cgalAdvancedType \cgalAdvancedBegin An iterator on the points of the original constraint before simplification steps are applied. The value type of this iterator is `Point`. @@ -449,6 +450,7 @@ constraints based on a cost and stop function. \pre The vertex referred by vicq is not contained in any other constraint. \pre Let `vip` and `vir` be defined as `vip = std::prev(vicq)` and `vir = std::next(vicr)`. \pre The line segment between `*vicp->point()` and `*vicr->point()` must not intersect any constraint. + \cgalAdvancedEnd */ void From 57a532dbc7899652922d97b81ed1866bcdd3656b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 11 Mar 2019 12:07:04 +0100 Subject: [PATCH 048/271] update script --- Scripts/developer_scripts/global_run_testsuite.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Scripts/developer_scripts/global_run_testsuite.sh b/Scripts/developer_scripts/global_run_testsuite.sh index 85e6e595fb9..0eec3a6d7ca 100644 --- a/Scripts/developer_scripts/global_run_testsuite.sh +++ b/Scripts/developer_scripts/global_run_testsuite.sh @@ -90,6 +90,7 @@ get_cgal() fi CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"` + echo ${CGAL_RELEASE_ID} > last_release_id if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then USE_TARGZ="y" else @@ -225,7 +226,7 @@ if [ -z "${USE_LATEST_UNZIPPED}" ]; then get_cgal unzip_cgal fi - +CGAL_RELEASE_ID=$(cat last_release_id) if [ "${WITH_DOCKER}" = "y" ]; then #launch docker container echo "export SHOW_PROGRESS=$SHOW_PROGRESS"> env.sh @@ -254,8 +255,11 @@ if [ "${WITH_DOCKER}" = "y" ]; then echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh - docker pull cgal/testsuite-docker:debian-for-arm - docker run --rm -t -e CGAL_LAST=${CGAL_RELEASE_ID} -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}/:/cgal_root cgal/testsuite-docker:debian-for-arm + + echo "CGAL_DIR is ${CGAL_RELEASE_ID}" + + docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm else bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake fi From c64bfb8e86900160abe47b9796d8e35f39f19ac6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 11 Mar 2019 15:18:01 +0100 Subject: [PATCH 049/271] do not construct normals to make the test --- .../Isotropic_remeshing/remesh_impl.h | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index f32b96fb55b..05db00f9c15 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -1419,11 +1419,10 @@ private: bool collapse_would_invert_face(const halfedge_descriptor& h) const { - const Point& src = get(vpmap_, source(h, mesh_)); - const Point& tgt = get(vpmap_, target(h, mesh_)); - - typename GeomTraits::Construct_normal_3 normal - = GeomTraits().construct_normal_3_object(); + typename boost::property_traits::reference + s = get(vpmap_, source(h, mesh_)); //s for source + typename boost::property_traits::reference + t = get(vpmap_, target(h, mesh_)); //t for target //check if collapsing the edge [src; tgt] towards tgt //would inverse the normal to the considered face @@ -1436,16 +1435,17 @@ private: if (face(hd, mesh_) == boost::graph_traits::null_face()) continue; - const Point& p = get(vpmap_, target(next(hd, mesh_), mesh_)); - const Point& q = get(vpmap_, target(next(next(hd, mesh_), mesh_), mesh_)); + typename boost::property_traits::reference + p = get(vpmap_, target(next(hd, mesh_), mesh_)); + typename boost::property_traits::reference + q = get(vpmap_, target(next(next(hd, mesh_), mesh_), mesh_)); - if (Triangle_3(tgt, p, q).is_degenerate()) + if (GeomTraits().collinear_3_object()(t, p, q)) continue; - Vector_3 normal_before_collapse = normal(src, p, q); - Vector_3 normal_after_collapse = normal(tgt, p, q); - - if (normal_before_collapse * normal_after_collapse <= 0) + if(CGAL::sign(CGAL::cross_product(Vector_3(s, p), Vector_3(s, q)) + * CGAL::cross_product(Vector_3(t, p), Vector_3(t, q))) + != CGAL::POSITIVE) return true; } return false; From 7c0d23b18f9430b9c42f3e665931b6c7a88f6eff Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Mar 2019 10:13:07 +0100 Subject: [PATCH 050/271] Fix CGAL_DIR and change names in CGAL_add_tests --- .../cmake/modules/CGAL_add_test.cmake | 42 +++++++++---------- .../developer_scripts/global_run_testsuite.sh | 2 + .../run_testsuite_with_cmake | 5 ++- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index a86003363f9..e7d6ee42564 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -40,11 +40,11 @@ if(CGAL_CTEST_DISPLAY_MEM_AND_TIME) endif() if(ANDROID) - set(ANDROID_DIR_PREFIX /data/local/tmp/) + set(CGAL_REMOTE_TEST_DIR_PREFIX /data/local/tmp/ CACHE PATH "Path to the directory where the tests will be executed in a remote testsuite.") find_program(adb_executable adb) endif() -if(SSH) - set(SSH_DIR_PREFIX /home/pi/CGAL/) +if(CGAL_RUN_TESTS_THROUGH_SSH) + set(CGAL_REMOTE_TEST_DIR_PREFIX /home/pi/CGAL/ CACHE PATH "Path to the directory where the tests will be executed in a remote testsuite.")) find_program(ssh_executable ssh) find_program(scp_executable scp) endif() @@ -121,24 +121,24 @@ function(cgal_setup_test_properties test_name) COMMAND ${adb_executable} push ${CMAKE_CURRENT_SOURCE_DIR} - ${ANDROID_DIR_PREFIX}${PROJECT_NAME} + ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) add_test(NAME ${PROJECT_NAME}_copy_GMP_MPFR COMMAND ${adb_executable} push ${GMP_LIBRARIES} ${MPFR_LIBRARIES} - ${ANDROID_DIR_PREFIX}${PROJECT_NAME} + ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR APPEND PROPERTY DEPENDS ${PROJECT_NAME}_SetupFixture) set_property(TEST ${PROJECT_NAME}_copy_GMP_MPFR PROPERTY FIXTURES_SETUP ${PROJECT_NAME}) - elseif(SSH) + elseif(CGAL_RUN_TESTS_THROUGH_SSH) add_test(NAME ${PROJECT_NAME}_SetupFixture COMMAND ${scp_executable} -r ${CMAKE_CURRENT_SOURCE_DIR} - ${SSH_HOST}:${SSH_DIR_PREFIX}${PROJECT_NAME} + ${SSH_HOST}:${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) else() add_test(NAME ${PROJECT_NAME}_SetupFixture @@ -155,13 +155,13 @@ function(cgal_setup_test_properties test_name) add_test(NAME ${PROJECT_NAME}_CleanupFixture COMMAND ${adb_executable} shell rm -rf - ${ANDROID_DIR_PREFIX}${PROJECT_NAME} + ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) - elseif(SSH) + elseif(CGAL_RUN_TESTS_THROUGH_SSH) add_test(NAME ${PROJECT_NAME}_CleanupFixture COMMAND ${ssh_executable} ${SSH_HOST} rm -rf - ${SSH_DIR_PREFIX}${PROJECT_NAME} + ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ) else() add_test(NAME ${PROJECT_NAME}_CleanupFixture @@ -177,7 +177,7 @@ function(cgal_setup_test_properties test_name) ${PROJECT_NAME}_CleanupFixture ${PROJECT_NAME}_SetupFixture APPEND PROPERTY LABELS "${PROJECT_NAME}") endif() - if(NOT ANDROID AND NOT SSH) + if(NOT ANDROID AND NOT CGAL_RUN_TESTS_THROUGH_SSH) set_property(TEST "${test_name}" PROPERTY WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__exec_test_dir) @@ -190,13 +190,13 @@ function(cgal_setup_test_properties test_name) APPEND PROPERTY FIXTURES_REQUIRED "${exe_name}") set_property(TEST "compilation_of__${exe_name}" PROPERTY FIXTURES_SETUP "${exe_name}") - if((ANDROID OR SSH) AND NOT TEST push_of__${exe_name}) + if((ANDROID OR CGAL_RUN_TESTS_THROUGH_SSH) AND NOT TEST push_of__${exe_name}) if(ANDROID) add_test(NAME "push_of__${exe_name}" - COMMAND ${adb_executable} push $ ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) - elseif(SSH) + COMMAND ${adb_executable} push $ ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${exe_name}) + elseif(CGAL_RUN_TESTS_THROUGH_SSH) add_test(NAME "push_of__${exe_name}" - COMMAND ${scp_executable} $ ${SSH_HOST}:${SSH_DIR_PREFIX}${PROJECT_NAME}/) + COMMAND ${scp_executable} $ ${SSH_HOST}:${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/) endif() set_property(TEST "push_of__${exe_name}" APPEND PROPERTY DEPENDS "compilation_of__${exe_name}") @@ -232,7 +232,7 @@ function(cgal_add_test exe_name) # message("Add test ${test_name}") set(cin_file "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin") if(NOT ARGS AND EXISTS ${cin_file}) - if(ANDROID OR SSH) + if(ANDROID OR CGAL_RUN_TESTS_THROUGH_SSH) set(cmd ${exe_name}) else() set(cmd $) @@ -241,10 +241,10 @@ function(cgal_add_test exe_name) COMMAND ${TIME_COMMAND} ${CMAKE_COMMAND} -DCMD:STRING=${cmd} -DCIN:STRING=${cin_file} - -DANDROID_DIR_PREFIX=${ANDROID_DIR_PREFIX} + -DCGAL_REMOTE_TEST_DIR_PREFIX=${CGAL_REMOTE_TEST_DIR_PREFIX} -DSSH=${SSH} -DSSH_HOST=${SSH_HOST} - -DSSH_DIR_PREFIX=${SSH_DIR_PREFIX} + -DCGAL_REMOTE_TEST_DIR_PREFIX=${CGAL_REMOTE_TEST_DIR_PREFIX} -DPROJECT_NAME=${PROJECT_NAME} -P "${CGAL_MODULES_DIR}/run_test_with_cin.cmake") set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -277,10 +277,10 @@ function(cgal_add_test exe_name) endif() # message(STATUS "add test: ${exe_name} ${ARGS}") if(ANDROID) - add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${adb_executable} shell cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${ANDROID_DIR_PREFIX}${PROJECT_NAME} ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) - elseif(SSH) + add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} ${adb_executable} shell cd ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${ARGS}) + elseif(CGAL_RUN_TESTS_THROUGH_SSH) STRING(REPLACE ";" " " arg_str "${ARGS}") - add_test(NAME ${test_name} COMMAND bash -c "${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} \"cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && ${SSH_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${arg_str} 3< <(cat; kill -INT 0)\" <&1") + add_test(NAME ${test_name} COMMAND bash -c "${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} \"cd ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} && ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${exe_name} ${arg_str} 3< <(cat; kill -INT 0)\" <&1") else() add_test(NAME ${test_name} COMMAND ${TIME_COMMAND} $ ${ARGS}) endif() diff --git a/Scripts/developer_scripts/global_run_testsuite.sh b/Scripts/developer_scripts/global_run_testsuite.sh index 0eec3a6d7ca..d6ca2e3be76 100644 --- a/Scripts/developer_scripts/global_run_testsuite.sh +++ b/Scripts/developer_scripts/global_run_testsuite.sh @@ -226,6 +226,8 @@ if [ -z "${USE_LATEST_UNZIPPED}" ]; then get_cgal unzip_cgal fi +#reset CGAL-DIR with the updated CGAL-I +CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` CGAL_RELEASE_ID=$(cat last_release_id) if [ "${WITH_DOCKER}" = "y" ]; then #launch docker container diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 2be3b2884d6..4e27d221a18 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -7,7 +7,6 @@ source "${CGAL_DIR}/developer_scripts/log.sh" # Load settings -echo "CGAL_ROOT is $CGAL_ROOT" if [ -f "$CGAL_ROOT/.autocgalrc" ]; then . "$CGAL_ROOT/.autocgalrc" else @@ -255,7 +254,9 @@ run_test_on_host_and_platform() cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR fi LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" - LIST_TEST_PACKAGES=$(source ${LIST_TEST_FILE}) + if [ -f ${LIST_TEST_FILE} ]; then + LIST_TEST_PACKAGES=$(source ${LIST_TEST_FILE}) + fi TO_TEST="" INIT="" for pkg in $LIST_TEST_PACKAGES; do From 0de369dd02896dcfb018c0b4d6f1191ebea91e6f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 12 Mar 2019 12:17:11 +0100 Subject: [PATCH 051/271] add debug code --- .../internal/Isotropic_remeshing/remesh_impl.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 05db00f9c15..a7850fc3c30 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -1440,9 +1440,26 @@ private: typename boost::property_traits::reference q = get(vpmap_, target(next(next(hd, mesh_), mesh_), mesh_)); +#ifdef CGAL_PMP_REMESHING_DEBUG + CGAL_assertion((Triangle_3(t, p, q).is_degenerate()) + == GeomTraits().collinear_3_object()(t, p, q)); +#endif + if (GeomTraits().collinear_3_object()(t, p, q)) continue; +#ifdef CGAL_PMP_REMESHING_DEBUG + typename GeomTraits::Construct_normal_3 normal + = GeomTraits().construct_normal_3_object(); + Vector_3 normal_before_collapse = normal(s, p, q); + Vector_3 normal_after_collapse = normal(t, p, q); + + CGAL::Sign s1 = CGAL::sign(normal_before_collapse * normal_after_collapse); + CGAL::Sign s2 = CGAL::sign(CGAL::cross_product(Vector_3(s, p), Vector_3(s, q)) + * CGAL::cross_product(Vector_3(t, p), Vector_3(t, q))); + CGAL_assertion(s1 == s2); +#endif + if(CGAL::sign(CGAL::cross_product(Vector_3(s, p), Vector_3(s, q)) * CGAL::cross_product(Vector_3(t, p), Vector_3(t, q))) != CGAL::POSITIVE) From d137b20acd55d693a09007da94c2ed763c616ab1 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 12 Mar 2019 14:04:36 +0100 Subject: [PATCH 052/271] add checking if (s, p, q) is degenerate --- .../internal/Isotropic_remeshing/remesh_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index a7850fc3c30..212bf6e6191 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -1445,7 +1445,8 @@ private: == GeomTraits().collinear_3_object()(t, p, q)); #endif - if (GeomTraits().collinear_3_object()(t, p, q)) + if ( GeomTraits().collinear_3_object()(s, p, q) + || GeomTraits().collinear_3_object()(t, p, q)) continue; #ifdef CGAL_PMP_REMESHING_DEBUG From 64cfc19d681e1c546c840ec50cb930ef08235fa1 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Mar 2019 14:51:55 +0100 Subject: [PATCH 053/271] Remove -d option. Any HOST declared as not localhost will be considered as a remote host and launch the cross compilation. --- .../cmake/modules/CGAL_add_test.cmake | 2 +- ..._testsuite.sh => autotest_cgal_with_ctest} | 83 +++++++++---------- .../run_testsuite_with_cmake | 32 +++---- 3 files changed, 55 insertions(+), 62 deletions(-) rename Scripts/developer_scripts/{global_run_testsuite.sh => autotest_cgal_with_ctest} (75%) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index e7d6ee42564..561dc6b0c64 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -44,7 +44,7 @@ if(ANDROID) find_program(adb_executable adb) endif() if(CGAL_RUN_TESTS_THROUGH_SSH) - set(CGAL_REMOTE_TEST_DIR_PREFIX /home/pi/CGAL/ CACHE PATH "Path to the directory where the tests will be executed in a remote testsuite.")) + set(CGAL_REMOTE_TEST_DIR_PREFIX /home/pi/CGAL/ CACHE PATH "Path to the directory where the tests will be executed in a remote testsuite.") find_program(ssh_executable ssh) find_program(scp_executable scp) endif() diff --git a/Scripts/developer_scripts/global_run_testsuite.sh b/Scripts/developer_scripts/autotest_cgal_with_ctest similarity index 75% rename from Scripts/developer_scripts/global_run_testsuite.sh rename to Scripts/developer_scripts/autotest_cgal_with_ctest index d6ca2e3be76..f4b6604cd86 100644 --- a/Scripts/developer_scripts/global_run_testsuite.sh +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -20,9 +20,8 @@ export CGAL_URL="https://cgal.geometryfactory.com/CGAL/Members/Releases" export UPLOAD_RESULT_DESTINATION="cgaltest@cgaltest.geometryfactory.com:incoming" export LATEST_LOCATION="${CGAL_URL}/LATEST" export TAR="tar" -export GZIP="gzip" export GUNZIP="gunzip" -export COMPRESSOR="${GZIP}" +export COMPRESSOR="gzip" export CONSOLE_OUTPUT="y" export CGAL_ROOT=`pwd` export USE_TARGZ="n" @@ -34,7 +33,6 @@ export LIST_TEST_PACKAGES="" export ACTUAL_LOGFILE="" export CGAL_DIR="" USE_LATEST_UNZIPPED="" -WITH_DOCKER="n" # ---------------------------------------------------------------------------------------- # Downloads the file "LATEST" whose contents indicates which release to test @@ -135,6 +133,7 @@ unzip_cgal() fi log "${ACTUAL_LOGFILE}" "untarring CGAL" + ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" > /dev/null ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" | ${TAR} xf - >> "${ACTUAL_LOGFILE}" 2>&1 if [ ${?} != 0 ]; then error "Could not untar CGAL" @@ -184,10 +183,6 @@ do echo "Compiled test/ directory will be kept." KEEP_TESTS="y" ;; - "-d") - echo "The testsuite will be launched through docker" - WITH_DOCKER="y" - ;; *) CGAL_LOCATION=$arg esac @@ -229,39 +224,43 @@ fi #reset CGAL-DIR with the updated CGAL-I CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` CGAL_RELEASE_ID=$(cat last_release_id) -if [ "${WITH_DOCKER}" = "y" ]; then - #launch docker container - echo "export SHOW_PROGRESS=$SHOW_PROGRESS"> env.sh - echo "export KEEP_TESTS=$KEEP_TESTS">> env.sh - echo "export DO_NOT_UPLOAD=$DO_NOT_UPLOAD">> env.sh - echo "export DO_NOT_TEST=$DO_NOT_TEST">> env.sh - echo "export SCP=$SCP">> env.sh - echo "export WGET=$WGET">> env.sh - echo "export WGET_OPTS=\"$WGET_OPTS\"">> env.sh - echo "export CURL=$CURL">> env.sh - echo "export CURL_OPTS=\"$CURL_OPTS\"">> env.sh - echo "export CGAL_URL=$CGAL_URL">> env.sh - echo "export UPLOAD_RESULT_DESTINATION=$UPLOAD_RESULT_DESTINATION">> env.sh - echo "export LATEST_LOCATION=$LATEST_LOCATION">> env.sh - echo "export TAR=$TAR">> env.sh - echo "export GZIP=$GZIP">> env.sh - echo "export GUNZIP=$GUNZIP">> env.sh - echo "export COMPRESSOR=$COMPRESSOR">> env.sh - echo "export CONSOLE_OUTPUT=$CONSOLE_OUTPUT">> env.sh - echo "export CGAL_ROOT=/cgal_root">> env.sh - echo "export USE_TARGZ=$USE_TARGZ">> env.sh - echo "export USE_TARBZ=$USE_TARBZ">> env.sh - echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh - echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh - echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh - echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh - echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh - echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh - echo "CGAL_DIR is ${CGAL_RELEASE_ID}" - - docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm - docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm -else - bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake -fi +PLATFORMS=`value_of COMPILERS_${HOST}` +#setup dir +setup_dirs +for HOST in ${BUILD_HOSTS}; do + if [ "$HOST" != "localhost" ]; then + #launch docker container + echo "export SHOW_PROGRESS=$SHOW_PROGRESS"> env.sh + echo "export KEEP_TESTS=$KEEP_TESTS">> env.sh + echo "export DO_NOT_UPLOAD=$DO_NOT_UPLOAD">> env.sh + echo "export DO_NOT_TEST=$DO_NOT_TEST">> env.sh + echo "export SCP=$SCP">> env.sh + echo "export WGET=$WGET">> env.sh + echo "export WGET_OPTS=\"$WGET_OPTS\"">> env.sh + echo "export CURL=$CURL">> env.sh + echo "export CURL_OPTS=\"$CURL_OPTS\"">> env.sh + echo "export CGAL_URL=$CGAL_URL">> env.sh + echo "export UPLOAD_RESULT_DESTINATION=$UPLOAD_RESULT_DESTINATION">> env.sh + echo "export LATEST_LOCATION=$LATEST_LOCATION">> env.sh + echo "export TAR=$TAR">> env.sh + echo "export GUNZIP=$GUNZIP">> env.sh + echo "export COMPRESSOR=$COMPRESSOR">> env.sh + echo "export CONSOLE_OUTPUT=$CONSOLE_OUTPUT">> env.sh + echo "export CGAL_ROOT=/cgal_root">> env.sh + echo "export USE_TARGZ=$USE_TARGZ">> env.sh + echo "export USE_TARBZ=$USE_TARBZ">> env.sh + echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh + echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh + echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh + echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh + echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh + echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh + echo "export REFERENCE_PLATFORMS_DIR=$REFERENCE_PLATFORMS_DIR">>env.sh + + docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + else + HOST=$HOST bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake + fi +done diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 4e27d221a18..eefea70e264 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -157,13 +157,8 @@ setup_dirs() # directories existing in the reference release are added to $PLATFORMS # PLATFORMS="" - - for HOST in ${BUILD_HOSTS}; do - - build_platforms_list "`value_of BUILD_ON_${HOST}`" - build_platforms_list "`value_of COMPILERS_${HOST}`" - - done + build_platforms_list "`value_of BUILD_ON_${HOST}`" + build_platforms_list "`value_of COMPILERS_${HOST}`" if [ -n "${USE_REFERENCE_PLATFORMS}" ]; then collect_all_reference_platforms @@ -198,8 +193,7 @@ put_on_web() publish_results() { - HOST=${1} - PLATFORM=${2} + PLATFORM=${1} # # collect results and put them on the web # @@ -237,15 +231,19 @@ publish_results() fi } -run_test_on_host_and_platform() +run_test_on_platform() { - HOST=${1} - PLATFORM=${2} + PLATFORM=${1} NUMBER_OF_PROCESSORS="`value_of PROCESSORS_${HOST}`" CGAL_BINARY_DIR=${CGAL_BINARY_DIR_BASE}/${PLATFORM} cd "${CGAL_BINARY_DIR}" log "${ACTUAL_LOGFILE}.test.${PLATFORM}" "Testing on host ${HOST} and platform ${PLATFORM}" + INIT_FILE="${CGAL_ROOT}/${REFERENCE_PLATFORMS_DIR}/${PLATFORM}.cmake" + if [ ! -f "${INIT_FILE}" ]; then + echo "error NEED A INIT FILE !" + fi + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log 2>&1 rm CMakeCache.txt if [ -z "${SHOW_PROGRESS}" ]; then @@ -312,15 +310,14 @@ run_test_on_host_and_platform() # ---------------------------------------------------------------------------------------- run_test_on_host() { - HOST=${1} PLATFORMS=`value_of COMPILERS_${HOST}` if [ "${PLATFORMS}" = "all" ]; then collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}" fi for PLATFORM in ${PLATFORMS}; do - run_test_on_host_and_platform "${HOST}" "${PLATFORM}" - publish_results "${HOST}" "${PLATFORM}" + run_test_on_platform "${PLATFORM}" + publish_results "${PLATFORM}" done } @@ -348,7 +345,4 @@ log "${ACTUAL_LOGFILE}" "running the testsuites" if [ -n "${CONSOLE_OUTPUT}" ]; then printf "\n-------------------------------------------------------\n" fi -for HOST in ${BUILD_HOSTS}; do - run_test_on_host ${HOST} -done - +run_test_on_host From 324f4e9b4a5bef85237471a52acbe1b8c66f5419 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Mar 2019 15:00:41 +0100 Subject: [PATCH 054/271] Fix warning --- Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp index 9c8483e50db..49a7bd3e090 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp @@ -187,8 +187,6 @@ void Clipping_box_plugin::clip(bool b) void Clipping_box_plugin::tab_change() { - CGAL::Three::Viewer_interface* viewer = static_cast( - *CGAL::QGLViewer::QGLViewerPool().begin()); QAction* action = mw->findChild("actionSwitchProjection"); if(dock_widget->tabWidget->currentIndex() == 1) { From be07aa12675ec789d5ea1c45dd978e4ac28f256b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 12 Mar 2019 15:07:49 +0100 Subject: [PATCH 055/271] Write CGAL_NR at the end of the testsuite --- Scripts/developer_scripts/autotest_cgal_with_ctest | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index f4b6604cd86..81163bac119 100644 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -264,3 +264,8 @@ for HOST in ${BUILD_HOSTS}; do HOST=$HOST bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake fi done + +cd "${CGAL_ROOT}" +if [ -e "LATEST" ]; then + mv LATEST RELEASE_NR +fi From 3c0cc16c685e73d53d04b7d5bd66fae06ec9a69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 12 Mar 2019 17:59:28 +0100 Subject: [PATCH 056/271] take the max coordinate instead of the non-zero one --- .../internal/AABB_tree/AABB_ray_intersection.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h index c5c388d4304..c05a0a34ef5 100644 --- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h +++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_ray_intersection.h @@ -180,7 +180,14 @@ private: struct as_ray_param_visitor { typedef FT result_type; - as_ray_param_visitor(const Ray* ray) : ray(ray) {} + as_ray_param_visitor(const Ray* ray) + : ray(ray), max_i(0) + { + typename AABB_traits::Geom_traits::Vector_3 v = ray->to_vector(); + for (int i=1; i<3; ++i) + if( CGAL::abs(v[i]) > CGAL::abs(v[max_i]) ) + max_i = i; + } template FT operator()(const T& s) @@ -196,16 +203,11 @@ private: typename AABB_traits::Geom_traits::Vector_3 x(ray->source(), point); typename AABB_traits::Geom_traits::Vector_3 v = ray->to_vector(); - for(int i = 0; i < 3; ++i) { - if(v[i] != FT(0.)) { - return x[i] / v[i]; - } - } - CGAL_assertion(false); // should never end-up here - return FT(0.); + return x[max_i] / v[max_i]; } const Ray* ray; + int max_i; }; }; From 7c862f759e9ce05aadf26f7c2568db507fe17e47 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 13 Mar 2019 09:26:55 +0100 Subject: [PATCH 057/271] Fix ctest call and clean autotest_cgal_with_ctest --- Scripts/developer_scripts/autotest_cgal_with_ctest | 3 --- Scripts/developer_scripts/run_testsuite_with_cmake | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index 81163bac119..c4ff24438a3 100644 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -225,9 +225,6 @@ fi CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` CGAL_RELEASE_ID=$(cat last_release_id) -PLATFORMS=`value_of COMPILERS_${HOST}` -#setup dir -setup_dirs for HOST in ${BUILD_HOSTS}; do if [ "$HOST" != "localhost" ]; then #launch docker container diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index eefea70e264..234347b24e2 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -255,7 +255,6 @@ run_test_on_platform() if [ -f ${LIST_TEST_FILE} ]; then LIST_TEST_PACKAGES=$(source ${LIST_TEST_FILE}) fi - TO_TEST="" INIT="" for pkg in $LIST_TEST_PACKAGES; do if [ -z "$INIT" ]; then @@ -268,9 +267,9 @@ run_test_on_platform() CTEST_OPTS="-T Start -T Test -j${NUMBER_OF_PROCESSORS} ${DO_NOT_TEST:+-E execution___of__} --timeout 1200" if [ -z "${SHOW_PROGRESS}" ]; then - ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST} } ${KEEP_TESTS:+-FC .}> tmp.txt + ctest ${CTEST_OPTS} ${TO_TEST:+"-L ${TO_TEST}" } ${KEEP_TESTS:+-FC .}> tmp.txt else - ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST}} ${KEEP_TESTS:+-FC .}|tee tmp.txt + ctest ${CTEST_OPTS} ${TO_TEST:+"-L ${TO_TEST}" } ${KEEP_TESTS:+-FC .}|tee tmp.txt fi ##################### ## GET RESULTS ## From 53a60823a3cd6313b25e8add9844a192305b28ac Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 13 Mar 2019 12:44:24 +0100 Subject: [PATCH 058/271] Remove remaining debugging code --- Scripts/developer_scripts/autotest_cgal_with_ctest | 1 - 1 file changed, 1 deletion(-) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index c4ff24438a3..470d12fc751 100644 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -133,7 +133,6 @@ unzip_cgal() fi log "${ACTUAL_LOGFILE}" "untarring CGAL" - ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" > /dev/null ${DECOMPRESSOR} -c "${CGAL_ZIPFILE}" | ${TAR} xf - >> "${ACTUAL_LOGFILE}" 2>&1 if [ ${?} != 0 ]; then error "Could not untar CGAL" From 988b0a78cdf418755bf08d03ec0c1913bdb1a9ec Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 13 Mar 2019 13:05:52 +0100 Subject: [PATCH 059/271] Add -DRUNNING_CGAL_AUTO_TEST=TRUE to the cmake calls --- Scripts/developer_scripts/run_testsuite_with_cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 234347b24e2..7b6b9d896e9 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -247,9 +247,9 @@ run_test_on_platform() cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log 2>&1 rm CMakeCache.txt if [ -z "${SHOW_PROGRESS}" ]; then - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR >/dev/null 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE VERBOSE=1 $CGAL_DIR >/dev/null 2>&1 else - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' VERBOSE=1 $CGAL_DIR + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE VERBOSE=1 $CGAL_DIR fi LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" if [ -f ${LIST_TEST_FILE} ]; then From 11fe55cdb114f4dbd9d433096daec90a8cf0b137 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:05:40 +0100 Subject: [PATCH 060/271] Use /usr/bin/time with a special format --- .travis.yml | 10 +++++----- .travis/build_package.sh | 4 ++++ .travis/template.txt | 10 +++++----- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 807a09a7fc6..9c4fce1f649 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - time bash .travis/install.sh + - /usr/bin/time -f "Spend time of %C: %E real" bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build -- time cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- time make -- time sudo make install &>/dev/null +- /usr/bin/time -f "Spend time of %C: %E real" cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. +- /usr/bin/time -f "Spend time of %C: %E real" make +- /usr/bin/time -f "Spend time of %C: %E real" sudo make install &>/dev/null - cd .. script: - cd ./.travis -- time bash ./build_package.sh $PACKAGE +- /usr/bin/time -f "Spend time of %C: %E real" bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/build_package.sh b/.travis/build_package.sh index f5497b60e31..e1208d758a7 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -4,6 +4,10 @@ set -e CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0" +function time { + /usr/bin/time -f "Spend time of %C: %E real" "$@" +} + function build_examples { mkdir -p build-travis cd build-travis diff --git a/.travis/template.txt b/.travis/template.txt index a373d233241..de8db781cdf 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - time bash .travis/install.sh + - /usr/bin/time -f "Spend time of %C: %E real" bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build -- time cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- time make -- time sudo make install &>/dev/null +- /usr/bin/time -f "Spend time of %C: %E real" cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. +- /usr/bin/time -f "Spend time of %C: %E real" make +- /usr/bin/time -f "Spend time of %C: %E real" sudo make install &>/dev/null - cd .. script: - cd ./.travis -- time bash ./build_package.sh $PACKAGE +- /usr/bin/time -f "Spend time of %C: %E real" bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always From 438dc911397f6d7499b8697cf9c40704a13bfea7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:12:32 +0100 Subject: [PATCH 061/271] Try with simple quotes --- .travis.yml | 10 +++++----- .travis/template.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9c4fce1f649..1e394b64b36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f "Spend time of %C: %E real" bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %C: %E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build -- /usr/bin/time -f "Spend time of %C: %E real" cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- /usr/bin/time -f "Spend time of %C: %E real" make -- /usr/bin/time -f "Spend time of %C: %E real" sudo make install &>/dev/null +- /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. +- /usr/bin/time -f 'Spend time of %C: %E real' make +- /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null - cd .. script: - cd ./.travis -- /usr/bin/time -f "Spend time of %C: %E real" bash ./build_package.sh $PACKAGE +- /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/template.txt b/.travis/template.txt index de8db781cdf..9a5000d3566 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f "Spend time of %C: %E real" bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %C: %E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build -- /usr/bin/time -f "Spend time of %C: %E real" cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- /usr/bin/time -f "Spend time of %C: %E real" make -- /usr/bin/time -f "Spend time of %C: %E real" sudo make install &>/dev/null +- /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. +- /usr/bin/time -f 'Spend time of %C: %E real' make +- /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null - cd .. script: - cd ./.travis -- /usr/bin/time -f "Spend time of %C: %E real" bash ./build_package.sh $PACKAGE +- /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always From c90335d8b06a0feb1867cdf3821411af3a3397c1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:14:53 +0100 Subject: [PATCH 062/271] Another attempt: I do not know why Travis cannot parse that file! --- .travis.yml | 22 +++++++++++----------- .travis/template.txt | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e394b64b36..4c69a07cf99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,18 +59,18 @@ install: - /usr/bin/time -f 'Spend time of %C: %E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: -- wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe -- sudo mv doxygen_exe /usr/bin/doxygen -- sudo chmod +x /usr/bin/doxygen -- mkdir -p build -- cd build -- /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- /usr/bin/time -f 'Spend time of %C: %E real' make -- /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null -- cd .. + - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe + - sudo mv doxygen_exe /usr/bin/doxygen + - sudo chmod +x /usr/bin/doxygen + - mkdir -p build + - cd build + - /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %C: %E real' make + - /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null + - cd .. script: -- cd ./.travis -- /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE + - cd ./.travis + - /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/template.txt b/.travis/template.txt index 9a5000d3566..3825429ee08 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -14,18 +14,18 @@ install: - /usr/bin/time -f 'Spend time of %C: %E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: -- wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe -- sudo mv doxygen_exe /usr/bin/doxygen -- sudo chmod +x /usr/bin/doxygen -- mkdir -p build -- cd build -- /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. -- /usr/bin/time -f 'Spend time of %C: %E real' make -- /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null -- cd .. + - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe + - sudo mv doxygen_exe /usr/bin/doxygen + - sudo chmod +x /usr/bin/doxygen + - mkdir -p build + - cd build + - /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %C: %E real' make + - /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null + - cd .. script: -- cd ./.travis -- /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE + - cd ./.travis + - /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always From f070e4345de66602d41da7a71407edb74ffaacac Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 13 Mar 2019 16:20:14 +0100 Subject: [PATCH 063/271] WIP from git branch --- .../autotest_cgal_with_ctest | 24 ++++++++++++++++--- .../run_testsuite_with_cmake | 5 ++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index 470d12fc751..4d5cb79ab1d 100644 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -32,6 +32,8 @@ export LOCK_FILE="" export LIST_TEST_PACKAGES="" export ACTUAL_LOGFILE="" export CGAL_DIR="" +export INSTALLATION_DIR="" +export TESTSUITE_DIR="" USE_LATEST_UNZIPPED="" # ---------------------------------------------------------------------------------------- @@ -182,6 +184,10 @@ do echo "Compiled test/ directory will be kept." KEEP_TESTS="y" ;; + "-g") + echo "Run testsuite from GIT branch" + INSTALLATION_DIR="Installation/" + TESTSUITE_DIR="Testsuite/" *) CGAL_LOCATION=$arg esac @@ -247,15 +253,27 @@ for HOST in ${BUILD_HOSTS}; do echo "export USE_TARGZ=$USE_TARGZ">> env.sh echo "export USE_TARBZ=$USE_TARBZ">> env.sh echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh - echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh echo "export REFERENCE_PLATFORMS_DIR=$REFERENCE_PLATFORMS_DIR">>env.sh - + echo "export INSTALLATION_DIR=$INSTALLATION_DIR">>env.sh + echo "export TESTSUITE_DIR=$TESTSUITE_DIR">>env.sh + docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm - docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + if [ -z "${CGAL_RELEASE_ID}" ]; then #if not frmom branch + echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh + docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + else + #read number from file and increase + if [ ! -r last_dev_id \; then + echo "0" > last_dev_id + fi + DEV_ID=$(cat last_dev_id) + echo "export CGAL_DIR=/cgal_root/CGAL-0.${DEV_ID}-dev">>env.sh + docker run --rm -t -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root -v${CGAL_DIR}:/cgal_root/CGAL-0.${DEV_ID}-dev cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + fi else HOST=$HOST bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake fi diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 7b6b9d896e9..e8528e385e1 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -277,11 +277,10 @@ run_test_on_platform() TAG_DIR=$(awk '/^Create new tag: /{print $4F}' tmp.txt) rm tmp.txt cd Testing/${TAG_DIR} - #python $CGAL_DIR/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM RESULT_FILE=./"results_${CGAL_TESTER}_${PLATFORM}.txt" rm -f "$RESULT_FILE" touch "$RESULT_FILE" - sed -n '/CGAL_VERSION /s/#define //p' < "$CGAL_DIR/include/CGAL/version.h" >> "$RESULT_FILE" + sed -n '/CGAL_VERSION /s/#define //p' < "$CGAL_DIR/${INSTALLATION_DIR}include/CGAL/version.h" >> "$RESULT_FILE" echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_NAME ${CGAL_TESTER_NAME}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" @@ -290,7 +289,7 @@ run_test_on_platform() #echo "Host-specific installation log file: ../installation.log" >> "$RESULT_FILE" grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE echo "------------" >> "$RESULT_FILE" - python3 ${CGAL_DIR}/test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM + python3 ${CGAL_DIR}/${TESTSUITE_DIR}test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM for file in $(ls|grep _Tests); do mv $file "$(echo "$file" | sed 's/_Tests//g')" From 4858aee676c105c9071dd938b708e69186a0ad16 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:23:12 +0100 Subject: [PATCH 064/271] Quote % --- .travis.yml | 10 +++++----- .travis/template.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c69a07cf99..9f40d025bd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of %C: %E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %%C: %%E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of %C: %E real' make - - /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of %%C: %%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %%C: %%E real' make + - /usr/bin/time -f 'Spend time of %%C: %%E real' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of %%C: %%E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/template.txt b/.travis/template.txt index 3825429ee08..08858778c68 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of %C: %E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %%C: %%E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of %C: %E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of %C: %E real' make - - /usr/bin/time -f 'Spend time of %C: %E real' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of %%C: %%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %%C: %%E real' make + - /usr/bin/time -f 'Spend time of %%C: %%E real' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of %C: %E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of %%C: %%E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always From 95b1f47076ff97f43d977792afdae92305244df1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:25:50 +0100 Subject: [PATCH 065/271] Escape % with a backslash --- .travis.yml | 10 +++++----- .travis/template.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9f40d025bd2..7a12e299ade 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of %%C: %%E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of \%C: \%E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of %%C: %%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of %%C: %%E real' make - - /usr/bin/time -f 'Spend time of %%C: %%E real' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of \%C: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of \%C: \%E real' make + - /usr/bin/time -f 'Spend time of \%C: \%E real' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of %%C: %%E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of \%C: \%E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always diff --git a/.travis/template.txt b/.travis/template.txt index 08858778c68..70cd5f00c9c 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of %%C: %%E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of \%C: \%E real' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of %%C: %%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of %%C: %%E real' make - - /usr/bin/time -f 'Spend time of %%C: %%E real' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of \%C: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of \%C: \%E real' make + - /usr/bin/time -f 'Spend time of \%C: \%E real' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of %%C: %%E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of \%C: \%E real' bash ./build_package.sh $PACKAGE notifications: email: on_success: change # default: always From 9bd51b2fdfb0d809787aad99b155bffee1b57092 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:49:05 +0100 Subject: [PATCH 066/271] Run yamllint - Quote `:` - Remove trailing white-space - Fix indentation --- .travis.yml | 133 +++++++++++++++++++------------------ .travis/generate_travis.sh | 9 ++- .travis/template.txt | 39 +++++------ 3 files changed, 91 insertions(+), 90 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a12e299ade..82fd42ee4c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,78 +1,79 @@ -language: cpp -dist: xenial -sudo: required -git: - depth: 3 +language: cpp +dist: xenial +sudo: required +git: + depth: 3 env: - matrix: - - PACKAGE='CHECK' - - PACKAGE='AABB_tree Advancing_front_surface_reconstruction Algebraic_foundations ' - - PACKAGE='Algebraic_kernel_d Algebraic_kernel_for_circles Algebraic_kernel_for_spheres ' - - PACKAGE='Alpha_shapes_2 Alpha_shapes_3 Apollonius_graph_2 ' - - PACKAGE='Arithmetic_kernel Arrangement_on_surface_2 Barycentric_coordinates_2 ' - - PACKAGE='BGL Boolean_set_operations_2 Bounding_volumes ' - - PACKAGE='Box_intersection_d Cartesian_kernel CGAL_Core ' - - PACKAGE='CGAL_ImageIO CGAL_ipelets Circular_kernel_2 ' - - PACKAGE='Circular_kernel_3 Circulator Classification ' - - PACKAGE='Combinatorial_map Cone_spanners_2 Convex_decomposition_3 ' - - PACKAGE='Convex_hull_2 Convex_hull_3 Convex_hull_d ' - - PACKAGE='Distance_2 Distance_3 Envelope_2 ' - - PACKAGE='Envelope_3 Filtered_kernel Generalized_map ' - - PACKAGE='Generator Geomview GraphicsView ' - - PACKAGE='HalfedgeDS Hash_map Heat_method_3 ' - - PACKAGE='Homogeneous_kernel Hyperbolic_triangulation_2 Inscribed_areas ' - - PACKAGE='Installation Interpolation Intersections_2 ' - - PACKAGE='Intersections_3 Interval_skip_list Interval_support ' - - PACKAGE='Inventor Jet_fitting_3 Kernel_23 ' - - PACKAGE='Kernel_d LEDA Linear_cell_complex ' - - PACKAGE='MacOSX Maintenance Matrix_search ' - - PACKAGE='Mesh_2 Mesh_3 Mesher_level ' - - PACKAGE='Minkowski_sum_2 Minkowski_sum_3 Modifier ' - - PACKAGE='Modular_arithmetic Nef_2 Nef_3 ' - - PACKAGE='Nef_S2 NewKernel_d Number_types ' - - PACKAGE='OpenNL Optimal_transportation_reconstruction_2 Optimisation_basic ' - - PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 ' - - PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 ' - - PACKAGE='Point_set_3 Point_set_processing_3 Point_set_shape_detection_3 ' - - PACKAGE='Poisson_surface_reconstruction_3 Polygon Polygon_mesh_processing ' - - PACKAGE='Polyhedron Polyhedron_IO Polyline_simplification_2 ' - - PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis ' - - PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map ' - - PACKAGE='QP_solver Random_numbers Ridges_3 ' - - PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures ' - - PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 ' - - PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface ' - - PACKAGE='Spatial_searching Spatial_sorting STL_Extension ' - - PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support ' - - PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_approximation ' - - PACKAGE='Surface_mesh_deformation Surface_mesher Surface_mesh_parameterization ' - - PACKAGE='Surface_mesh_segmentation Surface_mesh_shortest_path Surface_mesh_simplification ' - - PACKAGE='Surface_mesh_skeletonization Surface_sweep_2 TDS_2 ' - - PACKAGE='TDS_3 Testsuite Three ' - - PACKAGE='Triangulation Triangulation_2 Triangulation_3 ' - - PACKAGE='Union_find Visibility_2 Voronoi_diagram_2 ' - - PACKAGE='wininst ' + matrix: + - PACKAGE='CHECK' + - PACKAGE='AABB_tree Advancing_front_surface_reconstruction Algebraic_foundations ' + - PACKAGE='Algebraic_kernel_d Algebraic_kernel_for_circles Algebraic_kernel_for_spheres ' + - PACKAGE='Alpha_shapes_2 Alpha_shapes_3 Apollonius_graph_2 ' + - PACKAGE='Arithmetic_kernel Arrangement_on_surface_2 Barycentric_coordinates_2 ' + - PACKAGE='BGL Boolean_set_operations_2 Bounding_volumes ' + - PACKAGE='Box_intersection_d Cartesian_kernel CGAL_Core ' + - PACKAGE='CGAL_ImageIO CGAL_ipelets Circular_kernel_2 ' + - PACKAGE='Circular_kernel_3 Circulator Classification ' + - PACKAGE='Combinatorial_map Cone_spanners_2 Convex_decomposition_3 ' + - PACKAGE='Convex_hull_2 Convex_hull_3 Convex_hull_d ' + - PACKAGE='Distance_2 Distance_3 Envelope_2 ' + - PACKAGE='Envelope_3 Filtered_kernel Generalized_map ' + - PACKAGE='Generator Geomview GraphicsView ' + - PACKAGE='HalfedgeDS Hash_map Heat_method_3 ' + - PACKAGE='Homogeneous_kernel Hyperbolic_triangulation_2 Inscribed_areas ' + - PACKAGE='Installation Interpolation Intersections_2 ' + - PACKAGE='Intersections_3 Interval_skip_list Interval_support ' + - PACKAGE='Inventor Jet_fitting_3 Kernel_23 ' + - PACKAGE='Kernel_d LEDA Linear_cell_complex ' + - PACKAGE='MacOSX Maintenance Matrix_search ' + - PACKAGE='Mesh_2 Mesh_3 Mesher_level ' + - PACKAGE='Minkowski_sum_2 Minkowski_sum_3 Modifier ' + - PACKAGE='Modular_arithmetic Nef_2 Nef_3 ' + - PACKAGE='Nef_S2 NewKernel_d Number_types ' + - PACKAGE='OpenNL Optimal_transportation_reconstruction_2 Optimisation_basic ' + - PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 ' + - PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 ' + - PACKAGE='Point_set_3 Point_set_processing_3 Point_set_shape_detection_3 ' + - PACKAGE='Poisson_surface_reconstruction_3 Polygon Polygon_mesh_processing ' + - PACKAGE='Polyhedron Polyhedron_IO Polyline_simplification_2 ' + - PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis ' + - PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map ' + - PACKAGE='QP_solver Random_numbers Ridges_3 ' + - PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures ' + - PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 ' + - PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface ' + - PACKAGE='Spatial_searching Spatial_sorting STL_Extension ' + - PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support ' + - PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_approximation ' + - PACKAGE='Surface_mesh_deformation Surface_mesher Surface_mesh_parameterization ' + - PACKAGE='Surface_mesh_segmentation Surface_mesh_shortest_path Surface_mesh_simplification ' + - PACKAGE='Surface_mesh_skeletonization Surface_sweep_2 TDS_2 ' + - PACKAGE='TDS_3 Testsuite Three ' + - PACKAGE='Triangulation Triangulation_2 Triangulation_3 ' + - PACKAGE='Union_find Visibility_2 Voronoi_diagram_2 ' + - PACKAGE='wininst ' compiler: clang -install: +install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C: \%E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash .travis/install.sh - export CXX=clang++ CC=clang; -before_script: +before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe - sudo mv doxygen_exe /usr/bin/doxygen - sudo chmod +x /usr/bin/doxygen - - mkdir -p build - - cd build - - /usr/bin/time -f 'Spend time of \%C: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C: \%E real' make - - /usr/bin/time -f 'Spend time of \%C: \%E real' sudo make install &>/dev/null + - mkdir -p build + - cd build + - /usr/bin/time -f 'Spend time of \%C\: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of \%C\: \%E real' make + - /usr/bin/time -f 'Spend time of \%C\: \%E real' sudo make install &>/dev/null - cd .. -script: +script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C: \%E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash ./build_package.sh $PACKAGE notifications: email: - on_success: change # default: always - on_failure: always # default: always - + on_success: change + # default: always + on_failure: always + # default: always diff --git a/.travis/generate_travis.sh b/.travis/generate_travis.sh index 63a5e1f3705..6f70a2d0eb6 100755 --- a/.travis/generate_travis.sh +++ b/.travis/generate_travis.sh @@ -41,19 +41,19 @@ old_IFS=$IFS IFS=$'\n' for LINE in $(cat "$PWD/.travis/template.txt") do - if [ "$LINE" != " matrix:" ] + if [ "$LINE" != " matrix:" ] then echo "$LINE" >> .travis.yml else break fi done -echo " matrix: " >> .travis.yml +echo " matrix:" >> .travis.yml #writes the matrix -echo " - PACKAGE='CHECK' " >> .travis.yml +echo " - PACKAGE='CHECK'" >> .travis.yml for package in ${PACKAGES[@]} do -echo " - PACKAGE='$package' " >> .travis.yml +echo " - PACKAGE='$package'" >> .travis.yml done #writes the end of the file @@ -69,7 +69,6 @@ do echo "$LINE" >> .travis.yml fi done -echo "" >> .travis.yml IFS=$' ' #check if there are differences between the files if ! cmp -s ./.travis.yml ./.travis.old; diff --git a/.travis/template.txt b/.travis/template.txt index 70cd5f00c9c..ade479d86cc 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -1,33 +1,34 @@ -language: cpp -dist: xenial -sudo: required -git: - depth: 3 +language: cpp +dist: xenial +sudo: required +git: + depth: 3 env: - matrix: + matrix: PACKAGES_MATRIX compiler: clang -install: +install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C: \%E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash .travis/install.sh - export CXX=clang++ CC=clang; -before_script: +before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe - sudo mv doxygen_exe /usr/bin/doxygen - sudo chmod +x /usr/bin/doxygen - - mkdir -p build - - cd build - - /usr/bin/time -f 'Spend time of \%C: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C: \%E real' make - - /usr/bin/time -f 'Spend time of \%C: \%E real' sudo make install &>/dev/null + - mkdir -p build + - cd build + - /usr/bin/time -f 'Spend time of \%C\: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of \%C\: \%E real' make + - /usr/bin/time -f 'Spend time of \%C\: \%E real' sudo make install &>/dev/null - cd .. -script: +script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C: \%E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash ./build_package.sh $PACKAGE notifications: email: - on_success: change # default: always - on_failure: always # default: always - + on_success: change + # default: always + on_failure: always + # default: always From cdf90303cefb291917fa61e09a952e3b6c1441f3 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 16:57:38 +0100 Subject: [PATCH 067/271] Parse error again! --- .travis.yml | 10 +++++----- .travis/build_package.sh | 2 +- .travis/template.txt | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82fd42ee4c8..74d237ade0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of \%C\: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C\: \%E real' make - - /usr/bin/time -f 'Spend time of \%C\: \%E real' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' make + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash ./build_package.sh $PACKAGE notifications: email: on_success: change diff --git a/.travis/build_package.sh b/.travis/build_package.sh index e1208d758a7..809d6629220 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -5,7 +5,7 @@ set -e CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0" function time { - /usr/bin/time -f "Spend time of %C: %E real" "$@" + /usr/bin/time -f "Spend time of %C: %E (real)" "$@" } function build_examples { diff --git a/.travis/template.txt b/.travis/template.txt index ade479d86cc..64fa386792e 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of \%C\: \%E real' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C\: \%E real' make - - /usr/bin/time -f 'Spend time of \%C\: \%E real' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' make + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C\: \%E real' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash ./build_package.sh $PACKAGE notifications: email: on_success: change From 43d194839621fb796ff582834135a126b254ea59 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 17:15:45 +0100 Subject: [PATCH 068/271] master now targets a possible CGAL-4.14-beta3 --- Installation/include/CGAL/version.h | 6 +++--- Maintenance/release_building/public_release_name | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index ba90e64d873..fa2f8d2cbb9 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -25,11 +25,11 @@ #ifndef CGAL_VERSION_H #define CGAL_VERSION_H -#define CGAL_VERSION 4.14-beta2 -#define CGAL_VERSION_NR 1041400920 +#define CGAL_VERSION 4.14-beta3 +#define CGAL_VERSION_NR 1041400930 #define CGAL_SVN_REVISION 99999 #define CGAL_GIT_HASH abcdef -#define CGAL_RELEASE_DATE 20190301 +#define CGAL_RELEASE_DATE 20190313 #include diff --git a/Maintenance/release_building/public_release_name b/Maintenance/release_building/public_release_name index 1d77adb67be..30b65d9d225 100644 --- a/Maintenance/release_building/public_release_name +++ b/Maintenance/release_building/public_release_name @@ -1 +1 @@ -CGAL-4.14-beta2 +CGAL-4.14-beta3 From 53709a4bcea9bcd7b45d41165ef11bb7ccc91b9e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 13 Mar 2019 17:27:42 +0100 Subject: [PATCH 069/271] Try not to quote % And rename the `time` function in `build_package.sh`. --- .travis.yml | 10 +++++----- .travis/build_package.sh | 24 ++++++++++++------------ .travis/template.txt | 10 +++++----- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 74d237ade0c..2a75418a55f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -64,13 +64,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' make - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %C -- %E (real)' make + - /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE notifications: email: on_success: change diff --git a/.travis/build_package.sh b/.travis/build_package.sh index 809d6629220..e7bf90935a1 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -4,15 +4,15 @@ set -e CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0" -function time { +function mytime { /usr/bin/time -f "Spend time of %C: %E (real)" "$@" } function build_examples { mkdir -p build-travis cd build-travis - time cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. - time make -j2 + mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" .. + mytime make -j2 } function build_tests { @@ -28,8 +28,8 @@ function build_demo { EXTRA_CXX_FLAGS="-Werror=inconsistent-missing-override" ;; esac - time cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. - time make -j2 + mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" .. + mytime make -j2 } old_IFS=$IFS IFS=$' ' @@ -46,20 +46,20 @@ cd $ROOT [ "$ARG" = Polygon_mesh_processing ] || [ "$ARG" = Property_map ] ||\ [ "$ARG" = Surface_mesh_deformation ] || [ "$ARG" = Surface_mesh_shortest_path ] ||\ [ "$ARG" = Surface_mesh_simplification ]; then - time sudo bash .travis/install_openmesh.sh + mytime sudo bash .travis/install_openmesh.sh fi if [ "$ARG" = "CHECK" ] then cd .travis - time ./generate_travis.sh --check + mytime ./generate_travis.sh --check cd .. IFS=$old_IFS - time zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD + mytime zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD #test dependencies cd $ROOT - time bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen + mytime bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen cd .travis #parse current matrix and check that no package has been forgotten @@ -96,8 +96,8 @@ cd $ROOT cd $ROOT mkdir build_test cd build_test - time cmake -DCMAKE_INSTALL_PREFIX=install/ .. - time make install + mytime cmake -DCMAKE_INSTALL_PREFIX=install/ .. + mytime make install # test install with minimal downstream example mkdir installtest cd installtest @@ -110,7 +110,7 @@ cd $ROOT echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt echo '#include "CGAL/remove_outliers.h"' >> main.cpp cd build - time cmake -DCMAKE_INSTALL_PREFIX=../../install .. + mytime cmake -DCMAKE_INSTALL_PREFIX=../../install .. cd .. exit 0 fi diff --git a/.travis/template.txt b/.travis/template.txt index 64fa386792e..0958db78412 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -11,7 +11,7 @@ compiler: clang install: - echo "$PWD" - if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash .travis/install.sh + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh - export CXX=clang++ CC=clang; before_script: - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe @@ -19,13 +19,13 @@ before_script: - sudo chmod +x /usr/bin/doxygen - mkdir -p build - cd build - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' make - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' sudo make install &>/dev/null + - /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++11" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON .. + - /usr/bin/time -f 'Spend time of %C -- %E (real)' make + - /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null - cd .. script: - cd ./.travis - - /usr/bin/time -f 'Spend time of \%C -- \%E (real)' bash ./build_package.sh $PACKAGE + - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE notifications: email: on_success: change From 1a6ef3301063e05da22714dcb9e4740c7c0c6eb4 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 14 Mar 2019 16:36:11 +0100 Subject: [PATCH 070/271] WIP from git and upload to private page --- .../modules/CGAL_SetupCGALDependencies.cmake | 2 +- .../autotest_cgal_with_ctest | 50 ++++++++++------ .../run_testsuite_with_cmake | 59 ++++++++++++------- 3 files changed, 69 insertions(+), 42 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 776e34aac53..ddfd3299009 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -99,7 +99,7 @@ function(CGAL_setup_CGAL_dependencies target) if (CGAL_HEADER_ONLY) target_compile_definitions(${target} ${keyword} CGAL_HEADER_ONLY=1) endif() - if (RUNNING_CGAL_AUTO_TEST) + if (RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) target_compile_definitions(${target} ${keyword} CGAL_TEST_SUITE=1) endif() diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index 4d5cb79ab1d..c957fb7c959 100644 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -29,7 +29,6 @@ export USE_TARBZ="n" export CGAL_RELEASE="" export LOGS_DIR="" export LOCK_FILE="" -export LIST_TEST_PACKAGES="" export ACTUAL_LOGFILE="" export CGAL_DIR="" export INSTALLATION_DIR="" @@ -90,7 +89,7 @@ get_cgal() fi CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"` - echo ${CGAL_RELEASE_ID} > last_release_id + echo ${CGAL_RELEASE_ID} |tee last_release_id if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then USE_TARGZ="y" else @@ -186,8 +185,11 @@ do ;; "-g") echo "Run testsuite from GIT branch" - INSTALLATION_DIR="Installation/" - TESTSUITE_DIR="Testsuite/" + export INSTALLATION_DIR="Installation/" + export TESTSUITE_DIR="Testsuite/" + export SCRIPTS_DIR="Scripts/" + UPLOAD_RESULT_DESTINATION="mgimeno@cgal.geometryfactory.com:incoming" + ;; *) CGAL_LOCATION=$arg esac @@ -202,11 +204,15 @@ else fi -CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` -source "${CGAL_DIR}/developer_scripts/log.sh" +if [ -n "${SCRIPTS_DIR}" ]; then + CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-git"` +else + CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` +fi + +source "${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/log.sh" LOGS_DIR="${CGAL_ROOT}/AUTOTEST_LOGS" LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock" -LIST_TEST_PACKAGES="${CGAL_ROOT}/list_test_packages" # Setup logfile ACTUAL_LOGFILE="${CGAL_ROOT}/`basename ${0}`.log" @@ -218,7 +224,7 @@ cd "$CGAL_ROOT" # Starts the process -if [ -z "${USE_LATEST_UNZIPPED}" ]; then +if [ -z "${USE_LATEST_UNZIPPED}" -a -z "${SCRIPTS_DIR}" ]; then if [ -z "$CGAL_LOCATION" ]; then download_latest abort_if_latest_already_tested @@ -227,9 +233,13 @@ if [ -z "${USE_LATEST_UNZIPPED}" ]; then unzip_cgal fi #reset CGAL-DIR with the updated CGAL-I -CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` -CGAL_RELEASE_ID=$(cat last_release_id) +if [ -n "${SCRIPTS_DIR}" ]; then + CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-git"` +else + CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-I"` +fi +CGAL_RELEASE_ID=$(cat last_release_id) for HOST in ${BUILD_HOSTS}; do if [ "$HOST" != "localhost" ]; then #launch docker container @@ -253,29 +263,31 @@ for HOST in ${BUILD_HOSTS}; do echo "export USE_TARGZ=$USE_TARGZ">> env.sh echo "export USE_TARBZ=$USE_TARBZ">> env.sh echo "export CGAL_RELEASE=$CGAL_RELEASE">> env.sh - echo "export LIST_TEST_PACKAGES=/cgal_root/list_test_packages">> env.sh echo "export LOGS_DIR=/cgal_root/AUTOTEST_LOGS">> env.sh echo "export LOCK_FILE=/cgal_root/autotest_cgal_with_cmake.lock">> env.sh echo "export ACTUAL_LOGFILE=/cgal_root/\`basename \${0}\`.log">> env.sh echo "export REFERENCE_PLATFORMS_DIR=$REFERENCE_PLATFORMS_DIR">>env.sh echo "export INSTALLATION_DIR=$INSTALLATION_DIR">>env.sh echo "export TESTSUITE_DIR=$TESTSUITE_DIR">>env.sh + echo "export SCRIPTS_DIR=$SCRIPTS_DIR">>env.sh docker pull cgal/testsuite-docker:debian-stable-cross-compilation-for-arm - if [ -z "${CGAL_RELEASE_ID}" ]; then #if not frmom branch + if [ -z "${SCRIPTS_DIR}" ]; then #if not from branch echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm else #read number from file and increase - if [ ! -r last_dev_id \; then - echo "0" > last_dev_id - fi - DEV_ID=$(cat last_dev_id) - echo "export CGAL_DIR=/cgal_root/CGAL-0.${DEV_ID}-dev">>env.sh - docker run --rm -t -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root -v${CGAL_DIR}:/cgal_root/CGAL-0.${DEV_ID}-dev cgal/testsuite-docker:debian-stable-cross-compilation-for-arm + #if [ ! -r last_dev_id ]; then + # echo "0" > last_dev_id + #fi + #DEV_ID=$(cat last_dev_id) + #echo "$((${DEV_ID}+1))" > last_dev_id + #echo "export CGAL_DIR=/cgal_root/CGAL-0.${DEV_ID}-dev">>env.sh + echo "export CGAL_DIR=/cgal_root/CGAL-git">>env.sh + docker run --rm -t -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root -v${CGAL_DIR}:/cgal_root/CGAL-git cgal/testsuite-docker:debian-stable-cross-compilation-for-arm fi else - HOST=$HOST bash ${CGAL_DIR}/developer_scripts/run_testsuite_with_cmake + HOST=$HOST bash ${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/run_testsuite_with_cmake fi done diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index e8528e385e1..b1f1f304198 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -5,7 +5,7 @@ #### LAUNCH CTEST #### ########################## -source "${CGAL_DIR}/developer_scripts/log.sh" +source "${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/log.sh" # Load settings if [ -f "$CGAL_ROOT/.autocgalrc" ]; then . "$CGAL_ROOT/.autocgalrc" @@ -121,7 +121,9 @@ build_platforms_list() setup_dirs() { # dir for the actual release - + if [ ! -d ${CGAL_DIR}/test ]; then + mkdir ${CGAL_DIR}/test + fi CGAL_TEST_DIR=${CGAL_DIR}/test if [ ! -d "${CGAL_DIR}/cmake" ]; then @@ -135,8 +137,13 @@ setup_dirs() fi CGAL_RELEASE_DIR="${CGAL_DIR}" - - CGAL_RELEASE_ID=`basename "${CGAL_RELEASE_DIR}"` + if [ -z "$SCRIPTS_DIR" ]; then + CGAL_RELEASE_ID=`basename "${CGAL_RELEASE_DIR}"` + else + CGAL_GIT_VERSION=$(sed -n '/CGAL_VERSION /s/#define CGAL_VERSION //p'<"$CGAL_DIR/${INSTALLATION_DIR}include/CGAL/version.h" | sed -n 's/-\w*//p') + CGAL_GIT_VERSION="${CGAL_GIT_VERSION}-Ic-20190314" + CGAL_RELEASE_ID="CGAL-${CGAL_GIT_VERSION}" + fi #todo : too complicated for nothing. Take a simpler outsource build dir CGAL_BINARY_DIR_BASE=${CGAL_RELEASE_DIR}/cmake/platforms @@ -211,8 +218,10 @@ publish_results() ${TAR} cf "test_results-${HOST}_${PLATFORM}.tar" "results_${CGAL_TESTER}_${PLATFORM}.tar.gz" "results_${CGAL_TESTER}_${PLATFORM}.txt" ${COMPRESSOR} -9f "test_results-${HOST}_${PLATFORM}.tar" - COMPILER=`printf "%s" "$2" | tr -c '[A-Za-z0-9]./[=-=]*_\'\''\":?() ' 'x'` + COMPILER=`printf "%s" "$1" | tr -c '[A-Za-z0-9]./[=-=]*_\'\''\":?() ' 'x'` + FILENAME="${CGAL_RELEASE_ID}_${CGAL_TESTER}-test`datestr`-${COMPILER}-cmake.tar.gz" + LOGFILENAME="${CGAL_RELEASE_ID}-log`datestr`-${HOST}.gz" ${COMPRESSOR} -9f "${ACTUAL_LOGFILE}.test.${PLATFORM}" mv "${ACTUAL_LOGFILE}.test.${PLATFORM}.gz" "${LOGS_DIR}/${LOGFILENAME}" @@ -243,13 +252,16 @@ run_test_on_platform() if [ ! -f "${INIT_FILE}" ]; then echo "error NEED A INIT FILE !" fi - - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR > installation.log 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR>installation.log 2>&1 rm CMakeCache.txt + if [ -n "${SCRIPTS_DIR}" ]; then + CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON -DCGAL_TEST_SUITE=ON" + fi if [ -z "${SHOW_PROGRESS}" ]; then - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE VERBOSE=1 $CGAL_DIR >/dev/null 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1 else - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DRUNNING_CGAL_AUTO_TEST=TRUE VERBOSE=1 $CGAL_DIR + CMAKE_EXEC_CMD=$(echo "cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR") + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log fi LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" if [ -f ${LIST_TEST_FILE} ]; then @@ -257,19 +269,18 @@ run_test_on_platform() fi INIT="" for pkg in $LIST_TEST_PACKAGES; do - if [ -z "$INIT" ]; then - TO_TEST=$pkg - INIT="y" - else - TO_TEST="${TO_TEST}|$pkg" - fi + if [ -z "$INIT" ]; then + TO_TEST=$pkg + INIT="y" + else + TO_TEST="${TO_TEST}|$pkg" + fi done - - CTEST_OPTS="-T Start -T Test -j${NUMBER_OF_PROCESSORS} ${DO_NOT_TEST:+-E execution___of__} --timeout 1200" + CTEST_OPTS="-T Start -T Test -j${NUMBER_OF_PROCESSORS} ${DO_NOT_TEST:+-E execution___of__} --timeout 1200" if [ -z "${SHOW_PROGRESS}" ]; then - ctest ${CTEST_OPTS} ${TO_TEST:+"-L ${TO_TEST}" } ${KEEP_TESTS:+-FC .}> tmp.txt + ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} ${KEEP_TESTS:+-FC .}> tmp.txt else - ctest ${CTEST_OPTS} ${TO_TEST:+"-L ${TO_TEST}" } ${KEEP_TESTS:+-FC .}|tee tmp.txt + ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} ${KEEP_TESTS:+-FC .}|tee tmp.txt fi ##################### ## GET RESULTS ## @@ -280,13 +291,15 @@ run_test_on_platform() RESULT_FILE=./"results_${CGAL_TESTER}_${PLATFORM}.txt" rm -f "$RESULT_FILE" touch "$RESULT_FILE" - sed -n '/CGAL_VERSION /s/#define //p' < "$CGAL_DIR/${INSTALLATION_DIR}include/CGAL/version.h" >> "$RESULT_FILE" + if [ -z "${SCRIPTS_DIR}" ]; then + sed -n '/CGAL_VERSION /s/#define //p' < "$CGAL_DIR/${INSTALLATION_DIR}include/CGAL/version.h" >> "$RESULT_FILE" + else + echo "CGAL_VERSION ${CGAL_GIT_VERSION}">> "$RESULT_FILE" + fi echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_NAME ${CGAL_TESTER_NAME}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" echo "CGAL_TEST_PLATFORM ${PLATFORM}" >> "$RESULT_FILE" - #echo "General installation log file: ${GENERAL_BUILD_LOGFILE}" >> "$RESULT_FILE" - #echo "Host-specific installation log file: ../installation.log" >> "$RESULT_FILE" grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE echo "------------" >> "$RESULT_FILE" python3 ${CGAL_DIR}/${TESTSUITE_DIR}test/parse-ctest-dashboard-xml.py $CGAL_TESTER $PLATFORM @@ -296,6 +309,8 @@ run_test_on_platform() done OUTPUT_FILE=results_${CGAL_TESTER}_${PLATFORM}.tar TEST_REPORT="TestReport_${CGAL_TESTER}_${PLATFORM}" + mkdir -p Installation + cp "${CGAL_BINARY_DIR}/package_installation.log" "Installation/${TEST_REPORT}" rm -f $OUTPUT_FILE $OUTPUT_FILE.gz tar cf $OUTPUT_FILE results_${CGAL_TESTER}_${PLATFORM}.txt */"$TEST_REPORT" From e8d1e11cc81bea3f1ae4994f204a7255f4b9a000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 14 Mar 2019 16:56:46 +0100 Subject: [PATCH 071/271] fix formula --- .../CGAL/Periodic_2_triangulation_2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index 7efd97aab28..a3960a43c5d 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -889,13 +889,13 @@ public: /*! returns the vertex of the \f$ i^{th}\f$ neighbor of `f` that is opposite to `f`. - \pre $0 \\leqle i \\leqle 2$. + \pre \f$ 0 \leq i \leq 2\f$. */ Vertex_handle mirror_vertex(Face_handle f, int i) const; /*! returns the index of `f` in its \f$ i^{th}\f$ neighbor. - \pre $0 \\leqle i \\leqle 2$. + \pre \f$0 \leq i \leq 2\f$. */ int mirror_index(Face_handle f, int i) const; @@ -1062,12 +1062,12 @@ public: /// @{ /*! - Returns \f$ i+1\f$ modulo 3.\pre $0 \\leqle i \\leqle 2$. + Returns \f$ i+1\f$ modulo 3.\pre \f$0 \leq i \leq 2\f$. */ int ccw(int i) const; /*! - Returns \f$ i+2\f$ modulo 3.\pre $0 \\leqle i \\leqle 2$. + Returns \f$ i+2\f$ modulo 3.\pre \f$0 \leq i \leq 2\f$. */ int cw(int i) const; From 6a7c377b40a0fd2e8bfd85c3070683bf2db25a6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 15 Mar 2019 08:57:40 +0100 Subject: [PATCH 072/271] Use a generated version of deprecated.html --- .../Developer_manual/developer_manual.txt | 1 + .../doc/Documentation/deprecated.txt | 11 ++ .../doc/resources/1.8.13/deprecated.html | 146 ------------------ .../doc/resources/1.8.14/deprecated.html | 146 ------------------ .../doc/resources/1.8.4/deprecated.html | 146 ------------------ .../scripts/html_output_post_processing.py | 3 - 6 files changed, 12 insertions(+), 441 deletions(-) create mode 100644 Documentation/doc/Documentation/deprecated.txt delete mode 100644 Documentation/doc/resources/1.8.13/deprecated.html delete mode 100644 Documentation/doc/resources/1.8.14/deprecated.html delete mode 100644 Documentation/doc/resources/1.8.4/deprecated.html diff --git a/Documentation/doc/Documentation/Developer_manual/developer_manual.txt b/Documentation/doc/Documentation/Developer_manual/developer_manual.txt index a2d5ae21d41..7d96af6c9e6 100644 --- a/Documentation/doc/Documentation/Developer_manual/developer_manual.txt +++ b/Documentation/doc/Documentation/Developer_manual/developer_manual.txt @@ -19,5 +19,6 @@ - \subpage devman_testing - \subpage devman_submission - \subpage devman_info +- \subpage deprecated */ diff --git a/Documentation/doc/Documentation/deprecated.txt b/Documentation/doc/Documentation/deprecated.txt new file mode 100644 index 00000000000..74c64425716 --- /dev/null +++ b/Documentation/doc/Documentation/deprecated.txt @@ -0,0 +1,11 @@ +/*! + +\page deprecated Deprecation Notice + +In \cgal, we are trying as much as possible not to break the backward compatibility. If we have to do it, it will be announced in the release notes , +and a solution will always be provided. When possible, we keep the deprecated API for two releases before removing it. +If you reached this page after clicking on a link, it must probably mean that the documentation page you were trying to reach +is now deprecated. Have a look at the release notes for more information. + + +*/ diff --git a/Documentation/doc/resources/1.8.13/deprecated.html b/Documentation/doc/resources/1.8.13/deprecated.html deleted file mode 100644 index 4d8329a9fb2..00000000000 --- a/Documentation/doc/resources/1.8.13/deprecated.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -CGAL 4.3 - Manual: $title - - - - - - - - - - - - - - - -\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) -\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) -\( -\def\ccSum #1#2#3{ - \sum_{#1}^{#2}{#3} -} -\def\ccProd #1#2#3{ - \sum_{#1}^{#2}{#3} -}\) - -
- -
- - - - - - -
-
CGAL 4.3 - Manual -
-
-
- - - - - -
- -
- - -
-
- -
-
-
- -
- - - - -
- -
- -
-

The documentation page you are trying to reach has been removed from the documentation since CGAL 4.3 because it was deprecated

-
-
- - - - diff --git a/Documentation/doc/resources/1.8.14/deprecated.html b/Documentation/doc/resources/1.8.14/deprecated.html deleted file mode 100644 index 60d1c4e90bc..00000000000 --- a/Documentation/doc/resources/1.8.14/deprecated.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -CGAL 4.3 - Manual: $title - - - - - - - - - - - - - - - -\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) -\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) -\( -\def\ccSum #1#2#3{ - \sum_{#1}^{#2}{#3} -} -\def\ccProd #1#2#3{ - \sum_{#1}^{#2}{#3} -}\) - -
- -
- - - - - - -
-
CGAL 4.3 - Manual -
-
-
- - - - - -
- -
- - -
-
- -
-
-
- -
- - - - -
- -
- -
-

The documentation page you are trying to reach has been removed from the documentation since CGAL 4.3 because it was deprecated

-
-
- - - - diff --git a/Documentation/doc/resources/1.8.4/deprecated.html b/Documentation/doc/resources/1.8.4/deprecated.html deleted file mode 100644 index 4d8329a9fb2..00000000000 --- a/Documentation/doc/resources/1.8.4/deprecated.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -CGAL 4.3 - Manual: $title - - - - - - - - - - - - - - - -\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) -\( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) -\( -\def\ccSum #1#2#3{ - \sum_{#1}^{#2}{#3} -} -\def\ccProd #1#2#3{ - \sum_{#1}^{#2}{#3} -}\) - -
- -
- - - - - - -
-
CGAL 4.3 - Manual -
-
-
- - - - - -
- -
- - -
-
- -
-
-
- -
- - - - -
- -
- -
-

The documentation page you are trying to reach has been removed from the documentation since CGAL 4.3 because it was deprecated

-
-
- - - - diff --git a/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index c2a0b34941f..a6ba5edda43 100755 --- a/Documentation/doc/scripts/html_output_post_processing.py +++ b/Documentation/doc/scripts/html_output_post_processing.py @@ -386,8 +386,5 @@ removes some unneeded files, and performs minor repair on some glitches.''') canonical_link="\n" re_replace_first_in_file(r'', r'\n'+canonical_link+"\n", os.path.join("Manual","how_to_cite.html")) - #copy deprecated.html - shutil.copy(path.join(resources_absdir,"deprecated.html"),path.join("Manual/", "deprecated.html")) - if __name__ == "__main__": main() From d2c10d1fde051f08e1e05ad72e5a87d77ddc4126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 15 Mar 2019 09:31:34 +0100 Subject: [PATCH 073/271] remove macro defined twice --- .../CGAL/Arr_polycurve_traits_2.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index 5fb8b3fb479..b16ee23a142 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -1,12 +1,3 @@ -/// \ingroup PkgArrangement2Macros -/// @{ -/*! - * If the macro is set to one, then \f$x\f$-monotone curves are always - * directed from left-to-right. - */ -#define CGAL_ALWAYS_LEFT_TO_RIGHT -/// @} - namespace CGAL { /*! \ingroup PkgArrangement2TraitsClasses * From 28fdb2d42573f110019bd5b05eea1768652f1b9b Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 15 Mar 2019 11:33:48 +0100 Subject: [PATCH 074/271] Correction of (X)HTML warnings in case of Advanced topics Based on suggestion of @sloriot using `^^` also in cgalAdvancedEnd instead of adding a new line in the files --- Documentation/doc/resources/1.8.14/BaseDoxyfile.in | 2 +- .../CGAL/Periodic_2_triangulation_2.h | 5 ----- Point_set_3/include/CGAL/Point_set_3.h | 2 -- TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h | 2 -- .../doc/Triangulation/CGAL/Triangulation_data_structure.h | 3 --- .../doc/Triangulation/Concepts/TriangulationDataStructure.h | 1 - .../Triangulation_2/CGAL/Constrained_triangulation_plus_2.h | 1 - 7 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in index 418c2e49c58..aabe7dd3cd7 100644 --- a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in @@ -264,7 +264,7 @@ ALIASES = "sc{1}=\1 \endhtmlonly" \ "cgalDebugFunction=This is a function for debugging purpose." \ "cgalAdvancedBegin=^^ \htmlonly[block]
Advanced
\endhtmlonly ^^" \ - "cgalAdvancedEnd=\htmlonly[block]
\endhtmlonly" \ + "cgalAdvancedEnd=^^ \htmlonly[block]
\endhtmlonly" \ "cgalAdvancedFunction=This is an advanced function." \ "cgalAdvancedClass=This is an advanced class." \ "cgalAdvancedType=This is an advanced type." \ diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h index adfe27b875e..7efd97aab28 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/CGAL/Periodic_2_triangulation_2.h @@ -515,7 +515,6 @@ public: Converts the current triangulation into the same periodic triangulation in the 1-sheeted covering space. \pre `is_triangulation_in_1_sheet()` - \cgalAdvancedEnd */ void convert_to_1_sheeted_covering(); @@ -992,7 +991,6 @@ public: `f`. Face `f` is modified, two new faces are created. If the triangulation contains periodic copies, a point is inserted in all periodic copies. \pre The point in vertex `v` lies inside face `f`. - \cgalAdvancedEnd */ Vertex_handle insert_in_face(const Point& p, Face_handle f); @@ -1002,7 +1000,6 @@ public: \cgalAdvancedBegin Removes a vertex of degree three. Two of the incident faces are destroyed, the third one is modified. \pre Vertex `v` is a vertex with degree three. - \cgalAdvancedEnd */ void remove_degree_3(Vertex_handle v); @@ -1026,7 +1023,6 @@ public: `[edge_begin, edge_end]`. Returns a handle to the new vertex. \pre The triangulation is a triangulation of 1 sheet - \cgalAdvancedEnd */ template @@ -1042,7 +1038,6 @@ public: and create new ones only when the sequence is exhausted. \pre The triangulation is a triangulation of 1 sheet - \cgalAdvancedEnd */ template diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 752fbabaf98..df0ea714daf 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1164,7 +1164,6 @@ public: \return Returns a pair containing: the specified property map and a Boolean set to `true` or an empty property map and a Boolean set to `false` (if the property was not found). - \cgalAdvancedEnd */ template @@ -1190,7 +1189,6 @@ public: \note The normal property must have been added to the point set before calling this method (see `add_normal_map()`). - \cgalAdvancedEnd */ Vector_push_map normal_push_map () diff --git a/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h b/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h index 00f59edabd0..ee82122c9d9 100644 --- a/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h +++ b/TDS_3/doc/TDS_3/Concepts/TriangulationDataStructure_3.h @@ -125,7 +125,6 @@ data structure that only changes the vertex type. It has to define a type `Rebind_vertex::%Other` which is a rebound triangulation data structure, that is, the one whose `TriangulationDSVertexBase_3` will be `Vb2`. \note It can be implemented using a nested template class. - \cgalAdvancedEnd */ template @@ -139,7 +138,6 @@ data structure that only changes the cell type. It has to define a type `Rebind_cell::%Other` which is a rebound triangulation data structure, that is, the one whose `TriangulationDSCellBase_3` will be `Cb2`. \note It can be implemented using a nested template class. - \cgalAdvancedEnd */ template diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h index 515b96f3259..409fe016c17 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_data_structure.h @@ -81,7 +81,6 @@ data structure that only changes the vertex type. It has to define a type `Other` which is a rebound triangulation data structure with `Vb2` as vertex type. \note It can be implemented using a nested template class. - \cgalAdvancedEnd */ template @@ -95,7 +94,6 @@ data structure that only changes the full cell type. It has to define a type `Other` which is a rebound triangulation data structure with `Fcb2` as full cell type. \note It can be implemented using a nested template class. - \cgalAdvancedEnd */ template @@ -116,7 +114,6 @@ The boundary is recognized by checking the mark of the full cells. This method is used by `Triangulation_data_structure::insert_in_hole()`. s \pre same as `TriangulationDataStructure::insert_in_hole()` - \cgalAdvancedEnd */ diff --git a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h index 61eff5931f6..cbbe03db232 100644 --- a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h +++ b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h @@ -450,7 +450,6 @@ All vertices of cells of \f$ C\f$ are on \f$ \partial H\f$. \cgalFigureBegin{triangulationfiginserthole,insert-in-hole.png} Insertion in a hole, \f$ d=2\f$ \cgalFigureEnd - \cgalAdvancedEnd */ template< class ForwardIterator > Vertex_handle diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h index 44bd8eae2dc..9317ccc4d17 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Constrained_triangulation_plus_2.h @@ -450,7 +450,6 @@ constraints based on a cost and stop function. \pre The vertex referred by vicq is not contained in any other constraint. \pre Let `vip` and `vir` be defined as `vip = std::prev(vicq)` and `vir = std::next(vicr)`. \pre The line segment between `*vicp->point()` and `*vicr->point()` must not intersect any constraint. - \cgalAdvancedEnd */ void From 2b00f0dba09138ac887b314e01070a5b53c38c21 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 15 Mar 2019 13:05:36 +0100 Subject: [PATCH 075/271] FINISH autotest_cgal_with_ctest : from git, to another branch, full ctest testsuite. --- .../autotest_cgal_with_ctest | 9 -------- .../run_testsuite_with_cmake | 23 ++++++++++++++----- 2 files changed, 17 insertions(+), 15 deletions(-) mode change 100644 => 100755 Scripts/developer_scripts/autotest_cgal_with_ctest diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest old mode 100644 new mode 100755 index c957fb7c959..c089047069a --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -194,7 +194,6 @@ do CGAL_LOCATION=$arg esac done - # Load settings if [ -f "$CGAL_ROOT/.autocgalrc" ]; then . "$CGAL_ROOT/.autocgalrc" @@ -203,7 +202,6 @@ else exit 1 fi - if [ -n "${SCRIPTS_DIR}" ]; then CGAL_DIR=`readlink "${CGAL_ROOT}/CGAL-git"` else @@ -276,13 +274,6 @@ for HOST in ${BUILD_HOSTS}; do echo "export CGAL_DIR=/cgal_root/\${CGAL_LAST}">>env.sh docker run --rm -t -e CGAL_LAST="${CGAL_RELEASE_ID}" -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root cgal/testsuite-docker:debian-stable-cross-compilation-for-arm else - #read number from file and increase - #if [ ! -r last_dev_id ]; then - # echo "0" > last_dev_id - #fi - #DEV_ID=$(cat last_dev_id) - #echo "$((${DEV_ID}+1))" > last_dev_id - #echo "export CGAL_DIR=/cgal_root/CGAL-0.${DEV_ID}-dev">>env.sh echo "export CGAL_DIR=/cgal_root/CGAL-git">>env.sh docker run --rm -t -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root -v${CGAL_DIR}:/cgal_root/CGAL-git cgal/testsuite-docker:debian-stable-cross-compilation-for-arm fi diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index b1f1f304198..81232aab11d 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -123,16 +123,20 @@ setup_dirs() # dir for the actual release if [ ! -d ${CGAL_DIR}/test ]; then mkdir ${CGAL_DIR}/test + #give all rights so that, if it is first created by docker, it is still editable without root access by the local user. + chmod 777 ${CGAL_DIR}/test fi CGAL_TEST_DIR=${CGAL_DIR}/test if [ ! -d "${CGAL_DIR}/cmake" ]; then mkdir "${CGAL_DIR}/cmake" + chmod 777 "${CGAL_DIR}/cmake" log "${ACTUAL_LOGFILE}" "Creating ${CGAL_DIR}/cmake" fi if [ ! -d "${CGAL_DIR}/cmake/platforms" ]; then mkdir "${CGAL_DIR}/cmake/platforms" + chmod 777 "${CGAL_DIR}/cmake/platforms" log "${ACTUAL_LOGFILE}" "Creating ${CGAL_DIR}/cmake/platforms" fi @@ -141,7 +145,8 @@ setup_dirs() CGAL_RELEASE_ID=`basename "${CGAL_RELEASE_DIR}"` else CGAL_GIT_VERSION=$(sed -n '/CGAL_VERSION /s/#define CGAL_VERSION //p'<"$CGAL_DIR/${INSTALLATION_DIR}include/CGAL/version.h" | sed -n 's/-\w*//p') - CGAL_GIT_VERSION="${CGAL_GIT_VERSION}-Ic-20190314" + MINIMALIST_DATE=$(date +%y%m%d) + CGAL_GIT_VERSION="${CGAL_GIT_VERSION}-Ic-${MINIMALIST_DATE}" CGAL_RELEASE_ID="CGAL-${CGAL_GIT_VERSION}" fi @@ -153,6 +158,7 @@ setup_dirs() if [ ! -r "${LOGS_DIR}" ]; then mkdir "$LOGS_DIR" + chmod 777 "$LOGS_DIR" fi # @@ -178,6 +184,7 @@ setup_dirs() if [ ! -d "${CGAL_BINARY_DIR}" ]; then log "${ACTUAL_LOGFILE}" "Creating platform directory ${CGAL_BINARY_DIR}" mkdir "${CGAL_BINARY_DIR}" + chmod 777 "${CGAL_BINARY_DIR}" fi done @@ -258,10 +265,9 @@ run_test_on_platform() CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON -DCGAL_TEST_SUITE=ON" fi if [ -z "${SHOW_PROGRESS}" ]; then - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR >package_installation.log 2>&1 + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 >package_installation.log else - CMAKE_EXEC_CMD=$(echo "cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR") - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log fi LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" if [ -f ${LIST_TEST_FILE} ]; then @@ -280,7 +286,8 @@ run_test_on_platform() if [ -z "${SHOW_PROGRESS}" ]; then ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} ${KEEP_TESTS:+-FC .}> tmp.txt else - ctest ${TO_TEST:+-L ${TO_TEST} } ${CTEST_OPTS} ${KEEP_TESTS:+-FC .}|tee tmp.txt + echo "ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST}} ${KEEP_TESTS:+-FC .}|tee tmp.txt" + ctest ${CTEST_OPTS} ${TO_TEST:+-L ${TO_TEST}} ${KEEP_TESTS:+-FC .}|tee tmp.txt fi ##################### ## GET RESULTS ## @@ -310,6 +317,7 @@ run_test_on_platform() OUTPUT_FILE=results_${CGAL_TESTER}_${PLATFORM}.tar TEST_REPORT="TestReport_${CGAL_TESTER}_${PLATFORM}" mkdir -p Installation + chmod 777 Installation cp "${CGAL_BINARY_DIR}/package_installation.log" "Installation/${TEST_REPORT}" rm -f $OUTPUT_FILE $OUTPUT_FILE.gz @@ -328,9 +336,12 @@ run_test_on_host() collect_all_current_platforms "${CGAL_BINARY_DIR_BASE}" fi - for PLATFORM in ${PLATFORMS}; do + for PLATFORM in ${PLATFORMS}; do run_test_on_platform "${PLATFORM}" publish_results "${PLATFORM}" + if [ -z "${KEEP_TESTS}" ]; then + rm -rf $CGAL_DIR/cmake/platforms/${PLATFORM} + fi done } From 38c671f4b7ff1feb3220787a4d354a61a9e51bbf Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 15 Mar 2019 16:00:50 +0100 Subject: [PATCH 076/271] Don't forget the offset in the tooltip() --- Polyhedron/demo/Polyhedron/Scene_plane_item.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp b/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp index 630f559f485..349114f85b4 100644 --- a/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_plane_item.cpp @@ -1,5 +1,7 @@ #include "Scene_plane_item.h" #include +#include + using namespace CGAL::Three; @@ -186,7 +188,10 @@ Scene_plane_item* Scene_plane_item::clone() const { } QString Scene_plane_item::toolTip() const { - const CGAL::qglviewer::Vec& pos = frame->position(); + + const CGAL::qglviewer::Vec offset = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); + + const CGAL::qglviewer::Vec& pos = frame->position() - offset; const CGAL::qglviewer::Vec& n = frame->inverseTransformOf(CGAL::qglviewer::Vec(0.f, 0.f, 1.f)); return tr("

%1 (mode: %2, color: %3)
") From 3760964322e57dbac3481be82254f3a20f640bba Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 15 Mar 2019 16:05:39 +0100 Subject: [PATCH 077/271] Also fix the initial state of the clipping_box widget --- Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui index d3eb437bf52..220fa76978a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui @@ -18,7 +18,7 @@ - 1 + 0 From 6fc06efd70d4bcf55b133199fff696ac194541c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 15 Mar 2019 18:28:18 +0100 Subject: [PATCH 078/271] fix progation when no inner ccb is adjacent to a outer ccb to be updated --- .../Boolean_set_operations_2/Gps_on_surface_base_2.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h index 5da2a35fb2b..4d28d31d31d 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h @@ -1112,6 +1112,15 @@ protected: } } while(something_was_updated); + // last loop, if some tags are not set it means that they are the only ccb + // of the face and that they have to be the outer ccb + BOOST_FOREACH(Halfedge_handle h, halfedges_that_was_on_an_outer_ccb) + { + if (h->flag()!=NOT_VISITED) continue; + std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id(); + set_flag_of_halfedges_of_final_argt(h,ON_OUTER_CCB); + face_outer_ccb_set[face_master_id]=true; + } // at this position there might be some bits in face_outer_ccb_set not set // but they are corresponding to the unbounded face // End tagging ccbs From 6f13a63978b9c5193998d8c62d8dd841eae66bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 15 Mar 2019 20:24:50 +0100 Subject: [PATCH 079/271] Rephrase intersection doc for clarity --- .../CGAL/Polygon_mesh_processing/intersection.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index 916cb5a1377..fc33fc31414 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -1108,8 +1108,8 @@ bool is_mesh2_in_mesh1(const TriangleMesh& tm1, /** * \ingroup PMP_predicates_grp - * returns `true` if any segment of any polyline of `polylines1` intersects - * any segment of any polyline of `polylines2`, and `false` otherwise. + * returns `true` if there exists a segment of a polyline of `polylines1` + * and a segment of a polyline of `polylines2` which intersect, and `false` otherwise. * This function depends on the package \ref PkgBoxIntersectionD. * * \tparam PolylineRange a `RandomAccessRange` of `RandomAccessRange` of points. @@ -1151,7 +1151,8 @@ bool do_intersect(const PolylineRange& polylines1, /** * \ingroup PMP_predicates_grp - * returns `true` if any segment of `polyline1` intersects any segment of `polyline2`, and `false` otherwise. + * returns `true` if there exists a segment of `polyline1` and a segment of `polyline2` which intersect, + * and `false` otherwise. * This function depends on the package \ref PkgBoxIntersectionD. * * \tparam Polyline a `RandomAccessRange` of points. @@ -1196,7 +1197,7 @@ bool do_intersect(const Polyline& polyline1, /** * \ingroup PMP_predicates_grp - * returns `true` if any face of `tm1` intersects any face of `tm2`, and `false` otherwise. + * returns `true` if there exists a face of `tm1` and a face of `tm2` which intersect, and `false` otherwise. * If `do_overlap_test_of_bounded_sides` is set to `true`, the overlap of bounded sides are tested as well. In that case, the meshes must be closed. * This function depends on the package \ref PkgBoxIntersectionD. * @@ -1284,7 +1285,8 @@ bool do_intersect(const TriangleMesh& tm1, /** * \ingroup PMP_predicates_grp - * returns `true` if any face of `tm` and any segment of any polyline of `polylines` intersects, and `false` otherwise. + * returns `true` if there exists a face of `tm` and a segment of a polyline of `polylines` which intersect, + * and `false` otherwise. * This function depends on the package \ref PkgBoxIntersectionD. * @pre `CGAL::is_triangle_mesh(tm)` * @@ -1339,7 +1341,7 @@ bool do_intersect(const TriangleMesh& tm, /** * \ingroup PMP_predicates_grp - * returns `true` if any face of `tm` and any segment of `polyline` intersects, and `false` otherwise. + * returns `true` if there exists a face of `tm` and a segment of `polyline` which intersect, and `false` otherwise. * This function depends on the package \ref PkgBoxIntersectionD. * @pre `CGAL::is_triangle_mesh(tm)` * From a99016499380941b7b00ec7a171ed50ff168defe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 15 Mar 2019 20:50:24 +0100 Subject: [PATCH 080/271] Fixed missing backtick --- .../CGAL/Polygon_mesh_processing/extrude.h | 36 ++++++++++--------- .../Polygon_mesh_processing/intersection.h | 3 +- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h index aecf3c39b92..ae7dc759dba 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/extrude.h @@ -137,19 +137,21 @@ struct Identity_functor * @param np_in an optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below * * \cgalNamedParamsBegin - * \cgalParamBegin{vertex_point_map} - * the property map that contains the points associated to the vertices of `input`. - * If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` - * should be available for the vertices of `input` \cgalParamEnd + * \cgalParamBegin{vertex_point_map} + * the property map that contains the points associated to the vertices of `input`. + * If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * should be available for the vertices of `input` + * \cgalParamEnd * \cgalNamedParamsEnd * - * * @param np_out an optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + * @param np_out an optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below * * \cgalNamedParamsBegin - * \cgalParamBegin{vertex_point_map} - * the property map that will contain the points associated to the vertices of `output`. - * If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` - * should be available for the vertices of `output` \cgalParamEnd + * \cgalParamBegin{vertex_point_map} + * the property map that will contain the points associated to the vertices of `output`. + * If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` + * should be available for the vertices of `output` + * \cgalParamEnd * \cgalNamedParamsEnd */ template Date: Fri, 15 Mar 2019 20:53:41 +0100 Subject: [PATCH 081/271] Unlink some link that shouldn't have been a link --- Polygon/include/CGAL/Polygon_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index eda57abcbc9..eb75384d26e 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -489,7 +489,7 @@ class Polygon_2 { /// Test for equality: two polygons are equal iff there exists a /// cyclic permutation of the vertices of `p2` such that they are /// equal to the vertices of `p1`. Note that the template argument -/// `Container` of `p1` and `p2` may be different. +/// `%Container` of `p1` and `p2` may be different. /// \memberof Polygon_2 template bool operator==( const Polygon_2 &p1, From b4a0ee01449288e64ae7e5207d56c75da246067d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 15 Mar 2019 20:57:03 +0100 Subject: [PATCH 082/271] Fixed read-write mix up in Polygon_2 doc --- Polygon/include/CGAL/Polygon_2.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index eb75384d26e..7daadb643b8 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -516,18 +516,17 @@ transform(const Transformation& t, const Polygon_2& p); /// followed by the output of the coordinates of the vertices. /// @{ -/// Inserts the polygon `p` into the stream `os`. \pre The insert -/// operator must be defined for `Point_2`. +/// Reads a polygon from stream `is` and assigns it to `p`. +/// \pre The extract operator must be defined for `Point_2`. /// \memberof Polygon_2 template std::istream &operator>>(std::istream &is, Polygon_2& p); -/// Reads a polygon from stream `is` and assigns it -/// to `p`. \pre The extract operator must be defined for `Point_2`. +/// Inserts the polygon `p` into the stream `os`. +/// \pre The insert operator must be defined for `Point_2`. /// \memberof Polygon_2 template -std::ostream -&operator<<(std::ostream &os, const Polygon_2& p); +std::ostream &operator<<(std::ostream &os, const Polygon_2& p); /// @} // IO From a6af52755a16842d07e366cc8e3773fbffc3b5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 15 Mar 2019 21:00:44 +0100 Subject: [PATCH 083/271] Fixed bad alias usage --- .../Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt index 33891fb169b..a0a56502ead 100644 --- a/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt +++ b/Periodic_2_triangulation_2/doc/Periodic_2_triangulation_2/Periodic_2_triangulation_2.txt @@ -234,7 +234,7 @@ is also a model for the concept `TriangulationTraits_2`. The kernels `Cartesian`, `Homogeneous`, `Simple_cartesian`, `Simple_homogeneous` and -`Filtered_kernel` can all be used as \cgalModels for +`Filtered_kernel` can all be used as models for `Traits`. `Periodic_2_triangulation_traits_2` provides exact predicates and exact constructions if `Traits` does. It provides exact predicates but not exact constructions if From 61b0be45eb1c68d74a8231be58f0b8de5b87cd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 15 Mar 2019 21:14:17 +0100 Subject: [PATCH 084/271] Fix some bad links --- .../doc/Triangulation_2/CGAL/Regular_triangulation_2.h | 6 +++--- .../doc/Triangulation_3/CGAL/Regular_triangulation_3.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Regular_triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Regular_triangulation_2.h index 3f2245b101f..50aa04cd04e 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Regular_triangulation_2.h @@ -242,7 +242,7 @@ before the insertions (it may be negative due to hidden points). Note that this function is not guaranteed to insert the weighted points following the order of `InputIterator`, as `spatial_sort()` is used to improve efficiency. -\tparam InputIterator must be an input iterator with the value type `Weighted_point`. +\tparam InputIterator must be an input iterator with the value type \link Regular_triangulation_2::Weighted_point `Weighted_point` \endlink. */ template < class InputIterator > std::ptrdiff_t @@ -260,8 +260,8 @@ Given a pair `(p,i)`, the vertex `v` storing `p` also stores `i`, that is only one vertex is created, one of the objects of type `Vertex::Info` will be stored in the vertex. \pre `Vertex` must be model of the concept `TriangulationVertexBaseWithInfo_2`. -\tparam WeightedPointWithInfoInputIterator must be an input iterator with value type `std::pair`. - +\tparam WeightedPointWithInfoInputIterator must be an input iterator with value type +`std::pair<%Weighted_point,Vertex::Info>`. */ template < class WeightedPointWithInfoInputIterator > std::ptrdiff_t diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h index 23e710c72af..fe74964e03a 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_3.h @@ -103,7 +103,7 @@ Regular_triangulation_3(const Regular_triangulation_3 & rt1); Equivalent to constructing an empty triangulation with the optional traits class argument and calling `insert(first,last)`. If parallelism is enabled, the points will be inserted in parallel. -\tparam InputIterator must be an input iterator with value type `Weighted_point`. +\tparam InputIterator must be an input iterator with value type \link Regular_triangulation_3::Weighted_point `Weighted_point` \endlink. */ template < class InputIterator > Regular_triangulation_3 (InputIterator first, InputIterator last, @@ -176,7 +176,7 @@ following the order of `InputIterator`, as `spatial_sort()` is used to improve efficiency. If parallelism is enabled, the points will be inserted in parallel. -\tparam InputIterator must be an input iterator with value type `Weighted_point`. +\tparam InputIterator must be an input iterator with value type \link Regular_triangulation_3::Weighted_point `Weighted_point` \endlink. */ template < class InputIterator > std::ptrdiff_t From c787e40ca7a3069bbd9a3d2181f0effb51fc3626 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 18 Mar 2019 13:14:00 +0100 Subject: [PATCH 085/271] Use boost variant for attributes to be able to send `double`s, `uint_8`s and `std::size_t`s --- Mesh_3/include/CGAL/IO/output_to_vtu.h | 46 +++++++++++++++---- .../Polyhedron/Plugins/IO/VTK_io_plugin.cpp | 2 +- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/Mesh_3/include/CGAL/IO/output_to_vtu.h b/Mesh_3/include/CGAL/IO/output_to_vtu.h index 5c9583ba272..333f6f275d4 100644 --- a/Mesh_3/include/CGAL/IO/output_to_vtu.h +++ b/Mesh_3/include/CGAL/IO/output_to_vtu.h @@ -258,12 +258,20 @@ write_attributes(std::ostream& os, write_vector(os,att); } +enum VTU_ATTRIBUTE_TYPE{ + DOUBLE=0, + UNIT_8, + SIZE_TYPE +}; + template void output_to_vtu_with_attributes(std::ostream& os, const C3T3& c3t3, - std::vector*> >& attributes, + std::vector, std::vector, std::vector >*> >& attributes, + // std::vector& attribute_types, IO::Mode mode = IO::BINARY) { + //CGAL_assertion(attributes.size() == attribute_types.size()); typedef typename C3T3::Triangulation Tr; typedef typename Tr::Vertex_handle Vertex_handle; const Tr& tr = c3t3.triangulation(); @@ -296,7 +304,17 @@ void output_to_vtu_with_attributes(std::ostream& os, os << " \n"; for(std::size_t i = 0; i< attributes.size(); ++i) { - write_attribute_tag(os,attributes[i].first, *attributes[i].second, binary,offset); + switch(attributes[i].second->which()){ + case 0: + write_attribute_tag(os,attributes[i].first, *boost::get >(attributes[i].second), binary,offset); + break; + case 1: + write_attribute_tag(os,attributes[i].first, *boost::get >(attributes[i].second), binary,offset); + break; + default: + write_attribute_tag(os,attributes[i].first, *boost::get >(attributes[i].second), binary,offset); + break; + } } os << " \n"; os << " \n" @@ -306,7 +324,17 @@ void output_to_vtu_with_attributes(std::ostream& os, write_c3t3_points(os,tr,V); // fills V if the mode is BINARY write_cells(os,c3t3,V); for(std::size_t i = 0; i< attributes.size(); ++i) - write_attributes(os, *attributes[i].second); + switch(attributes[i].second->which()){ + case 0: + write_attributes(os, *boost::get >(attributes[i].second)); + break; + case 1: + write_attributes(os, *boost::get >(attributes[i].second)); + break; + default: + write_attributes(os, *boost::get >(attributes[i].second)); + break; + } } os << "\n"; } @@ -324,11 +352,13 @@ void output_to_vtu(std::ostream& os, for( Cell_iterator cit = c3t3.cells_in_complex_begin() ; cit != c3t3.cells_in_complex_end() ; ++cit ) - { - mids.push_back(cit->subdomain_index()); - } - std::vector* > > atts; - atts.push_back(std::make_pair("MeshDomain", &mids)); + { + double v = cit->subdomain_index(); + mids.push_back(v); + } + std::vector, std::vector, std::vector >* > > atts; + boost::variant, std::vector, std::vector > v = mids; + atts.push_back(std::make_pair("MeshDomain", &v)); output_to_vtu_with_attributes(os, c3t3, atts, mode); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp index 30855054d34..514834003fb 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp @@ -318,7 +318,7 @@ public: const Scene_facegraph_item* poly_item = qobject_cast(item); - + if (poly_item) { if (extension != "vtp") From 7c985da973753eccc1129a3bc580dcec09a1d0bc Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 19 Mar 2019 10:22:53 +0100 Subject: [PATCH 086/271] set -DCGAL_TEST_SUITE even if not usng git branch --- Scripts/developer_scripts/run_testsuite_with_cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 81232aab11d..705682d3538 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -261,8 +261,9 @@ run_test_on_platform() fi cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR>installation.log 2>&1 rm CMakeCache.txt + CMAKE_OPTS="-DCGAL_TEST_SUITE=ON" if [ -n "${SCRIPTS_DIR}" ]; then - CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON -DCGAL_TEST_SUITE=ON" + CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON" fi if [ -z "${SHOW_PROGRESS}" ]; then cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 >package_installation.log @@ -304,7 +305,7 @@ run_test_on_platform() echo "CGAL_VERSION ${CGAL_GIT_VERSION}">> "$RESULT_FILE" fi echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" - echo "TESTER_NAME ${CGAL_TESTER_NAME}" >> "$RESULT_FILE" + echo "TESTER_NAME ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" echo "CGAL_TEST_PLATFORM ${PLATFORM}" >> "$RESULT_FILE" grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE From b9762b9431848f27697960d4c0c0ad3934d41260 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 19 Mar 2019 10:47:01 +0100 Subject: [PATCH 087/271] Fix declared type in xml --- Mesh_3/include/CGAL/IO/output_to_vtu.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Mesh_3/include/CGAL/IO/output_to_vtu.h b/Mesh_3/include/CGAL/IO/output_to_vtu.h index 333f6f275d4..da0911a7e4a 100644 --- a/Mesh_3/include/CGAL/IO/output_to_vtu.h +++ b/Mesh_3/include/CGAL/IO/output_to_vtu.h @@ -231,7 +231,20 @@ write_attribute_tag(std::ostream& os, std::size_t& offset) { std::string format = binary ? "appended" : "ascii"; - std::string type = (sizeof(T) == 8) ? "Float64" : "Float32"; + std::string type = ""; + if(std::is_floating_point::value) + { + type = (sizeof(T) == 8) ? "Float64" : "Float32"; + } + else + { + if(sizeof(T) == 1) + type = "UInt8"; + else if(sizeof(T) == 4) + type = "UInt32"; + else + type = "UInt64"; + } os << " void output_to_vtu_with_attributes(std::ostream& os, const C3T3& c3t3, std::vector, std::vector, std::vector >*> >& attributes, - // std::vector& attribute_types, IO::Mode mode = IO::BINARY) { //CGAL_assertion(attributes.size() == attribute_types.size()); @@ -348,7 +360,8 @@ void output_to_vtu(std::ostream& os, IO::Mode mode = IO::BINARY) { typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; - std::vector mids; + std::vector mids; + std::size_t id = 0; for( Cell_iterator cit = c3t3.cells_in_complex_begin() ; cit != c3t3.cells_in_complex_end() ; ++cit ) @@ -356,6 +369,7 @@ void output_to_vtu(std::ostream& os, double v = cit->subdomain_index(); mids.push_back(v); } + std::vector, std::vector, std::vector >* > > atts; boost::variant, std::vector, std::vector > v = mids; atts.push_back(std::make_pair("MeshDomain", &v)); From 3b349c7b8fb9398f051a3e4fd0d8f0d2db2d3f22 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 19 Mar 2019 13:27:53 +0100 Subject: [PATCH 088/271] Add examples with Surface_mesh instead of Polyhedron --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 2 + ...esh_polyhedral_domain_with_features_sm.cpp | 70 +++++++++++++++++++ .../Mesh_3/remesh_polyhedral_surface_sm.cpp | 65 +++++++++++++++++ 3 files changed, 137 insertions(+) create mode 100644 Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp create mode 100644 Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 40112d910f1..1ecba32cce2 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -81,7 +81,9 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "mesh_polyhedral_domain_sm.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_domain_with_surface_inside.cpp" ) create_single_source_cgal_program( "remesh_polyhedral_surface.cpp" ) + create_single_source_cgal_program( "remesh_polyhedral_surface_sm.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_domain_with_features.cpp" ) + create_single_source_cgal_program( "mesh_polyhedral_domain_with_features_sm.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_domain_with_lipschitz_sizing.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_complex.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_complex_sm.cpp" ) diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp new file mode 100644 index 00000000000..5501fad4bfc --- /dev/null +++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sm.cpp @@ -0,0 +1,70 @@ +#include + +#include +#include +#include + +#include +#include +#include + +// Domain +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Surface_mesh Polyhedron; +typedef CGAL::Polyhedral_mesh_domain_with_features_3 Mesh_domain; + + +#ifdef CGAL_CONCURRENT_MESH_3 +typedef CGAL::Parallel_tag Concurrency_tag; +#else +typedef CGAL::Sequential_tag Concurrency_tag; +#endif + +// Triangulation +typedef CGAL::Mesh_triangulation_3::type Tr; + +typedef CGAL::Mesh_complex_3_in_triangulation_3< + Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_index> C3t3; + +// Criteria +typedef CGAL::Mesh_criteria_3 Mesh_criteria; + +// To avoid verbose function and named parameters call +using namespace CGAL::parameters; + +int main(int argc, char*argv[]) +{ + const char* fname = (argc>1)?argv[1]:"data/fandisk.off"; + std::ifstream input(fname); + Polyhedron polyhedron; + input >> polyhedron; + if(input.fail()){ + std::cerr << "Error: Cannot read file " << fname << std::endl; + return EXIT_FAILURE; + } + + if (!CGAL::is_triangle_mesh(polyhedron)){ + std::cerr << "Input geometry is not triangulated." << std::endl; + return EXIT_FAILURE; + } + + // Create domain + Mesh_domain domain(polyhedron); + + // Get sharp features + domain.detect_features(); + + // Mesh criteria + Mesh_criteria criteria(edge_size = 0.025, + facet_angle = 25, facet_size = 0.05, facet_distance = 0.005, + cell_radius_edge_ratio = 3, cell_size = 0.05); + + // Mesh generation + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria); + + // Output + std::ofstream medit_file("out.mesh"); + c3t3.output_to_medit(medit_file); + + return EXIT_SUCCESS; +} diff --git a/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp new file mode 100644 index 00000000000..0268d5e49b7 --- /dev/null +++ b/Mesh_3/examples/Mesh_3/remesh_polyhedral_surface_sm.cpp @@ -0,0 +1,65 @@ +#include + +#include +#include +#include + +#include +#include +#include + +// Domain +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Surface_mesh Polyhedron; +typedef CGAL::Polyhedral_mesh_domain_with_features_3 Mesh_domain; + +// Triangulation +typedef CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3< + Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_index> C3t3; + +// Criteria +typedef CGAL::Mesh_criteria_3 Mesh_criteria; + +// To avoid verbose function and named parameters call +using namespace CGAL::parameters; + +int main() +{ + // Load a polyhedron + Polyhedron poly; + std::ifstream input("data/lion-head.off"); + input >> poly; + + if (!CGAL::is_triangle_mesh(poly)){ + std::cerr << "Input geometry is not triangulated." << std::endl; + return EXIT_FAILURE; + } + + // Create a vector with only one element: the pointer to the polyhedron. + std::vector poly_ptrs_vector(1, &poly); + + // Create a polyhedral domain, with only one polyhedron, + // and no "bounding polyhedron", so the volumetric part of the domain will be + // empty. + Mesh_domain domain(poly_ptrs_vector.begin(), poly_ptrs_vector.end()); + + // Get sharp features + domain.detect_features(); //includes detection of borders + + // Mesh criteria + Mesh_criteria criteria(edge_size = 0.025, + facet_angle = 25, + facet_size = 0.1, + facet_distance = 0.001); + + // Mesh generation + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, no_perturb(), no_exude()); + + // Output the facets of the c3t3 to an OFF file. The facets will not be + // oriented. + std::ofstream off_file("out.off"); + c3t3.output_boundary_to_off(off_file); + + return off_file.fail() ? EXIT_FAILURE : EXIT_SUCCESS; +} From 15aca3ebf7a6012836d316a64b5786f2a7538e1a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 19 Mar 2019 16:08:28 +0100 Subject: [PATCH 089/271] Add a bool to decide if we want to export the complex or the cells not in complex. --- .../IO/Complex_3_in_triangulation_3_to_vtk.h | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h b/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h index 8370bab261f..cecf3aefea1 100644 --- a/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h +++ b/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h @@ -35,10 +35,12 @@ namespace CGAL { +//if export_complex is false, there must be no far point. template vtkUnstructuredGrid* output_c3t3_to_vtk_unstructured_grid(const C3T3& c3t3, - vtkUnstructuredGrid* grid = 0) + vtkUnstructuredGrid* grid = 0, + bool export_complex = true) { typedef typename C3T3::Triangulation Triangulation; typedef typename Triangulation::Vertex_handle Vertex_handle; @@ -52,7 +54,7 @@ output_c3t3_to_vtk_unstructured_grid(const C3T3& c3t3, vtk_points->Allocate(c3t3.triangulation().number_of_vertices()- c3t3.number_of_far_points()); vtk_facets->Allocate(c3t3.number_of_facets_in_complex()); - vtk_cells->Allocate(c3t3.number_of_cells_in_complex()); + vtk_cells->Allocate(export_complex ? c3t3.number_of_cells_in_complex() : tr.number_of_finite_cells()); boost::unordered_map V; vtkIdType inum = 0; @@ -86,18 +88,34 @@ output_c3t3_to_vtk_unstructured_grid(const C3T3& c3t3, CGAL_assertion(j==3); vtk_facets->InsertNextCell(3, cell); } - - for(typename C3T3::Cells_in_complex_iterator + if(export_complex) + { + for(typename C3T3::Cells_in_complex_iterator cit = c3t3.cells_in_complex_begin(), end = c3t3.cells_in_complex_end(); - cit != end; ++cit) - { - vtkIdType cell[4]; - for (int i = 0; i < 4; ++i) - cell[i] = V[cit->vertex(i)]; - vtk_cells->InsertNextCell(4, cell); + cit != end; ++cit) + { + vtkIdType cell[4]; + for (int i = 0; i < 4; ++i) + cell[i] = V[cit->vertex(i)]; + vtk_cells->InsertNextCell(4, cell); + } + } + else + { + for(auto cit = tr.finite_cells_begin(), + end = tr.finite_cells_end(); + cit != end; ++cit) + { + if(!c3t3.is_in_complex(cit)) + { + vtkIdType cell[4]; + for (int i = 0; i < 4; ++i) + cell[i] = V[cit->vertex(i)]; + vtk_cells->InsertNextCell(4, cell); + } + } } - if(!grid) { grid = vtkUnstructuredGrid::New(); } From 4782ea16656e0896dda83840397020c7d2b7d7b8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 19 Mar 2019 16:49:31 +0100 Subject: [PATCH 090/271] Fix the *installed* header-only CGALConfig.cmake The previous installed version of `CGALConfig.cmake`, when `CGAL_HEADER_ONLY` is true, was hard-coding a path `../../../`, relative to the location of itself. It might be that the CMake modules are not installed in a sub-directory with three components, relatively to the prefix. That way of doing it buggy. And that triggered issue with the cgal port in vcpkg: https://github.com/Microsoft/vcpkg/pull/5734 This patch is just another hack: it hardcodes that the relative path can be any of: - `../`, - `../../`, or - `../../../`. --- Installation/lib/cmake/CGAL/CGALConfig.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index 0cb7f0326bb..f3b6add50ce 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -19,6 +19,7 @@ function(cgal_detect_branch_build VAR_NAME) endif() endfunction() +set(CGAL_FOUND FALSE) cgal_detect_branch_build(BRANCH_BUILD) if(BRANCH_BUILD) set(CGAL_ROOT ${CGAL_CONFIG_DIR}) @@ -44,8 +45,12 @@ if(BRANCH_BUILD) else() set(CGAL_ROOT ${CGAL_CONFIG_DIR}) get_filename_component(CGAL_ROOT "${CGAL_ROOT}" DIRECTORY) - get_filename_component(CGAL_ROOT "${CGAL_ROOT}" DIRECTORY) - get_filename_component(CGAL_ROOT "${CGAL_ROOT}" DIRECTORY) + if(NOT EXISTS ${CGAL_ROOT}/include/CGAL/config.h) + get_filename_component(CGAL_ROOT "${CGAL_ROOT}" DIRECTORY) + endif() + if(NOT EXISTS ${CGAL_ROOT}/include/CGAL/config.h) + get_filename_component(CGAL_ROOT "${CGAL_ROOT}" DIRECTORY) + endif() # not BRANCH_BUILD: it can be an installed CGAL, or the tarball layout if(EXISTS ${CGAL_CONFIG_DIR}/CGAL_add_test.cmake) From 5d58bde7f215673df43adb17b1d35bda4665a21b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 19 Mar 2019 17:39:04 +0100 Subject: [PATCH 091/271] Polyhedron: Fix Issue #3108 --- .../doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h | 8 ++++---- .../test/Polyhedron_IO/test_polyhedron_io.cpp | 10 ++++++++++ Stream_support/include/CGAL/IO/File_header_OFF_impl.h | 8 +------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h b/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h index 8e8848d6150..bc522783a3b 100644 --- a/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h +++ b/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h @@ -9,10 +9,10 @@ with file extension .off, which is also understood by Geomview \cgalCite{cgal:p-gmgv16-96}, from the input stream `in` and appends it to the polyhedral surface \f$ P\f$. Only the point coordinates and facets from the input stream are used to build the polyhedral -surface. Neither normal vectors nor color attributes are evaluated. If -the stream `in` does not contain a permissible polyhedral surface -the `ios::badbit` of the input stream `in` is set and \f$ P\f$ remains -unchanged. +surface. Neither normal vectors nor color attributes are evaluated. + +\note Before \cgal 5.0 this function has set the `ios::badbit` of the input stream `in` +when the file contained 0 vertices. For OFF an ASCII and a binary format exist. The stream detects the format automatically and can read both. diff --git a/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp b/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp index 581a77019bd..1e16b6756b2 100644 --- a/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp +++ b/Polyhedron_IO/test/Polyhedron_IO/test_polyhedron_io.cpp @@ -64,6 +64,8 @@ const char* tetra = "OFF\n" "3 3 2 0\n" "3 2 3 1\n"; +const char* empty= "OFF\n" + "0 0 0\n"; void test_file_IO_OFF() { typedef Simple_cartesian Kernel; @@ -116,6 +118,14 @@ void test_file_IO_OFF() { filein >> P; assert( P.is_tetrahedron( P.halfedges_begin())); } + + { + Polyhedron P; + std::istringstream in( ::empty); + read_off(in, P); + assert(P.empty()); + assert(in); + } } void test_file_IO_wavefront() {} void test_file_IO_inventor() {} diff --git a/Stream_support/include/CGAL/IO/File_header_OFF_impl.h b/Stream_support/include/CGAL/IO/File_header_OFF_impl.h index 2d8ac9e6a3f..560dfa95aa8 100644 --- a/Stream_support/include/CGAL/IO/File_header_OFF_impl.h +++ b/Stream_support/include/CGAL/IO/File_header_OFF_impl.h @@ -377,13 +377,7 @@ std::istream& operator>>( std::istream& in, File_header_OFF& h) { } if ( n_h == 0) h.set_index_offset( 0); - if ( ! in || h.size_of_vertices() <= 0 ) { - in.clear( std::ios::badbit); - if ( h.verbose()) { - std::cerr << " " << std::endl; - std::cerr << "error: File_header_OFF(): File contains <= 0 vertices." - << std::endl; - } + if ( ! in ) { return in; } if ( h.size_of_halfedges() == 0) { From e254a770df4ade04e088f2df2ac62c6dd3b5f5a5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 19 Mar 2019 19:20:40 +0100 Subject: [PATCH 092/271] Some Fixes for #3457 --- .../Barycentric_coordinates_2.txt | 16 ++++++++-------- .../Chapter_memory_management.txt | 2 +- Documentation/doc/Documentation/Installation.txt | 16 ++++++++-------- Mesh_3/doc/Mesh_3/Mesh_3.txt | 4 ++-- .../doc/Minkowski_sum_2/Minkowski_sum_2.txt | 4 ++-- QP_solver/doc/QP_solver/Concepts/MPSFormat.h | 2 +- .../Surface_mesh_simplification.txt | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt b/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt index 5c9edab1683..9ec647a34eb 100644 --- a/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt +++ b/Barycentric_coordinates_2/doc/Barycentric_coordinates_2/Barycentric_coordinates_2.txt @@ -43,7 +43,7 @@ Example's point pattern. \cgalExample{Barycentric_coordinates_2/Segment_coordinates_example.cpp} \subsection tri_example Triangle Coordinates -In this example we show how to use the class `CGAL::Barycentric_coordinates::Triangle_coordinates_2` with the `Simple_cartesian` kernel for double type. We compute coordinates for three sets of points: interior (green), boundary (red), and exterior (blue). Note that some of the coordinate values for the exterior points are negative. We use a standard container of the type `std::vector` and `std::insert_iterator` to access and store the resulting coordinate values. +In this example we show how to use the class `CGAL::Barycentric_coordinates::Triangle_coordinates_2` with the `Simple_cartesian` kernel for double type. We compute coordinates for three sets of points: interior (green), boundary (red), and exterior (blue). Note that some of the coordinate values for the exterior points are negative. We use a standard container of the type `std::vector` and `std::insert_iterator` to access and store the resulting coordinate values. \anchor tri_coord_example \cgalFigureBegin{tri__example,triangle_coordinates_example.png} @@ -53,12 +53,12 @@ Example's point pattern. \cgalExample{Barycentric_coordinates_2/Triangle_coordinates_example.cpp} \subsection wp_example Wachspress Coordinates -In the following example we create 1000 random points, then we take the convex hull of this set of points as our polygon, and compute Wachspress coordinates at all the defined points. We use the `Simple_cartesian` kernel with double type as a traits class and store obtained coordinate values in a container of the type `std::vector`. The output iterator is `std::back_insert_iterator`. +In the following example we create 1000 random points, then we take the convex hull of this set of points as our polygon, and compute Wachspress coordinates at all the defined points. We use the `Simple_cartesian` kernel with double type as a traits class and store obtained coordinate values in a container of the type `std::vector`. The output iterator is `std::back_insert_iterator`. \cgalExample{Barycentric_coordinates_2/Wachspress_coordinates_example.cpp} \subsection dh_example Discrete Harmonic Coordinates -In this example we compute discrete harmonic coordinates for a set of green (interior), red (boundary), and blue (exterior) points with respect to a unit square. We also show how to specify the location of a query point using additional function parameters. The used kernel is exact, and we use an output container of the type `std::vector`. Since all the points are symmetric, it is easy to debug the correctness of the obtained coordinate values. The output iterator is `std::back_insert_iterator`. +In this example we compute discrete harmonic coordinates for a set of green (interior), red (boundary), and blue (exterior) points with respect to a unit square. We also show how to specify the location of a query point using additional function parameters. The used kernel is exact, and we use an output container of the type `std::vector`. Since all the points are symmetric, it is easy to debug the correctness of the obtained coordinate values. The output iterator is `std::back_insert_iterator`. \anchor dh_coord_example \cgalFigureBegin{dh__example,discrete_harmonic_coordinates_example.png} @@ -68,7 +68,7 @@ Example's point pattern. \cgalExample{Barycentric_coordinates_2/Discrete_harmonic_coordinates_example.cpp} \subsection mv_example Mean Value Coordinates -This is an example that shows how to compute mean value coordinates for a set of green points in a star-shaped polygon. We note that this type of coordinates is well-defined for such a concave polygon while Wachspress and discrete harmonic coordinates are not. However, it may give negative coordinate values for points outside the polygon's kernel (shown in red). We use an inexact data type, an output container of the type `std::vector`, and an output iterator of the type std::back_insert_iterator to compute, access, and store the resulting coordinate values. We also show how to choose different algorithms to compute generalized barycentric coordinates (one is more precise while the other is faster). +This is an example that shows how to compute mean value coordinates for a set of green points in a star-shaped polygon. We note that this type of coordinates is well-defined for such a concave polygon while Wachspress and discrete harmonic coordinates are not. However, it may give negative coordinate values for points outside the polygon's kernel (shown in red). We use an inexact data type, an output container of the type `std::vector`, and an output iterator of the type std::back_insert_iterator to compute, access, and store the resulting coordinate values. We also show how to choose different algorithms to compute generalized barycentric coordinates (one is more precise while the other is faster). \anchor mv_coord_example \cgalFigureBegin{mv__example,mean_value_coordinates_example.png} @@ -193,7 +193,7 @@ After the normalization of these weights as before

\f$b_i = \frac{w_i}{W^{mv}}\qquad\f$ with \f$\qquad W^{mv} = \sum_{j=1}^n w_j\f$
-we obtain the precise \f$O(n^2)\f$ algorithm. The fast O(n) algorithm computes the weights \f$w_i\f$ using the pseudocode from here. These weights +we obtain the precise \f$O(n^2)\f$ algorithm. The fast O(n) algorithm computes the weights \f$w_i\f$ using the pseudocode from here. These weights
\f$w_i = \frac{t_{i-1} + t_i}{r_i}\qquad\f$ with \f$\qquad t_i = \frac{\text{det}(d_i, d_{i+1})}{r_ir_{i+1} + d_id_{i+1}}\f$
@@ -231,7 +231,7 @@ The package is implemented in a way that later, if needed, other two-dimensional \section gbc_theory Theory of 2D Generalized Barycentric Coordinates -In 1827, the German mathematician and theoretical astronomer August Ferdinand Möbius (1790--1868) proposed a method \cite cgal:bc:m-dbc-27 to find coordinates of a point in the plane with respect to the vertices of a triangle. These coordinates are called triangle barycentric coordinates (sometimes area coordinates), and they are widely used in a variety of applications. Some of these applications are linear interpolation over a triangle and a triangle inclusion test. The first one is used for so-called shading, and the second one arises in the rasterization step when an image in vector graphics format needs to be converted into a raster image. +In 1827, the German mathematician and theoretical astronomer August Ferdinand Möbius (1790--1868) proposed a method \cite cgal:bc:m-dbc-27 to find coordinates of a point in the plane with respect to the vertices of a triangle. These coordinates are called triangle barycentric coordinates (sometimes area coordinates), and they are widely used in a variety of applications. Some of these applications are linear interpolation over a triangle and a triangle inclusion test. The first one is used for so-called shading, and the second one arises in the rasterization step when an image in vector graphics format needs to be converted into a raster image. Triangle barycentric coordinates have many important properties, including \em constant and linear precision, the Lagrange property, and positivity inside a triangle. These properties make these coordinates a unique tool in many scientific fields. If we restrict triangle coordinates to one of the edges of a triangle and its supporting line, we get barycentric coordinates with respect to a segment and call them \ref compute_seg_coord "segment coordinates". @@ -265,7 +265,7 @@ To plot discrete harmonic coordinates we take \ref wp_plot "the same polygon" as The discrete harmonic coordinate function with respect to the indicated vertex with values from zero to one as the colour bar indicates. \cgalFigureEnd -The last type of generalized barycentric coordinates that we discuss are mean value coordinates \cite cgal:f-mvc-03 proposed by M. Floater in 2003. Based on the mean value theorem, \ref gbc_deg_mean_value_coordinates "these coordinates", unlike Wachspress and discrete harmonic coordinates, are well-defined for arbitrary simple polygons, inherit all the properties of triangle coordinates for any convex polygon, and lack only the positivity property for general concave polygons. Hormann and Floater prove in \cite cgal:bc:hf-mvcapp-06 that these coordinates are positive inside the kernel of a star-shaped polygon. They are also positive in the closure of any quadrilateral. Like discrete harmonic weights, mean value weights are often used in the context of \ref PkgSurfaceMeshParameterization "triangle mesh parameterization." +The last type of generalized barycentric coordinates that we discuss are mean value coordinates \cite cgal:f-mvc-03 proposed by M. Floater in 2003. Based on the mean value theorem, \ref gbc_deg_mean_value_coordinates "these coordinates", unlike Wachspress and discrete harmonic coordinates, are well-defined for arbitrary simple polygons, inherit all the properties of triangle coordinates for any convex polygon, and lack only the positivity property for general concave polygons. Hormann and Floater prove in \cite cgal:bc:hf-mvcapp-06 that these coordinates are positive inside the kernel of a star-shaped polygon. They are also positive in the closure of any quadrilateral. Like discrete harmonic weights, mean value weights are often used in the context of \ref PkgSurfaceMeshParameterization "triangle mesh parameterization." In order to show the particular behaviour of mean value coordinates with an application to concave polygons, we take \ref fig__mv__example "a star-shaped polygon" with ten vertices \f$[v_0, \dots, v_9]\f$, sample its interior and boundary, and plot the coordinate function with respect to the fourth vertex \f$v_3\f$. As the colour bar indicates, the obtained function grows from a slightly negative value to one at the chosen vertex. It is also smooth inside the polygon and linear along all edges. @@ -276,7 +276,7 @@ Mean value coordinates with respect to \f$v_3\f$. The colour bar indicates the r Interesting fact: all the coordinates discussed in this section and implemented in the package come from one and the same family of generalized barycentric coordinates named 3-point family of coordinates \cite cgal:bc:fhk-gcbcocp-06. \section gbc_acknowledgments Acknowledgments -The authors wish to thank Teseo Schneider and Randolf Schaerfig for helpful comments and discussions. We also appreciate the great effort invested in this package by our reviewers Andreas Fabri and Sébastien Loriot. Finally, to create pictures for this manual, we used two programs: Geogebra and Matlab. +The authors wish to thank Teseo Schneider and Randolf Schaerfig for helpful comments and discussions. We also appreciate the great effort invested in this package by our reviewers Andreas Fabri and Sébastien Loriot. Finally, to create pictures for this manual, we used two programs: Geogebra and Matlab. */ diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_memory_management.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_memory_management.txt index b8ae562d361..a71f9e53725 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_memory_management.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_memory_management.txt @@ -20,7 +20,7 @@ We adopted the definition of the Standard \cpp allocator \cgalCite{cgal:ansi-is14882-98}. The `std::allocator` is the only predefined and required allocator imposed by [\cpp] on all \cpp compiler implementations. The exact specification can also be found at -http://en.wikipedia.org/wiki/Allocator_(C++). +https://en.wikipedia.org/wiki/Allocator_(C++). Objects of type `std::allocator` can be used to obtain small, typed chunks of memory to be used, for example, as static members of a class. diff --git a/Documentation/doc/Documentation/Installation.txt b/Documentation/doc/Documentation/Installation.txt index 067f5a4c10f..2f67abb0a78 100644 --- a/Documentation/doc/Documentation/Installation.txt +++ b/Documentation/doc/Documentation/Installation.txt @@ -136,7 +136,7 @@ contains the following subdirectories: The directories `include/CGAL/CORE` and `src/CGALCore` contain a -distribution of the \sc{Core} library\cgalFootnote{`http://www.cs.nyu.edu/exact/`} version 1.7 for +distribution of the \sc{Core} library\cgalFootnote{`https://www.cs.nyu.edu/exact/`} version 1.7 for dealing with algebraic numbers. \sc{Core} is not part of \cgal and has its own license. @@ -170,11 +170,11 @@ It may work for older versions of the above listed compilers. In order to configure, build, and install the \cgal libraries, examples and demos, you need CMake, a cross-platform "makefile generator". -If CMake is not installed already you can obtain it from `http://www.cmake.org/`. +If CMake is not installed already you can obtain it from `https://www.cmake.org/`. CMake version 3.1 or higher is required. This manual explains only those features of CMake which are needed in order to build \cgal. Please refer to the -CMake documentation at `http://www.cmake.org/` for further details. +CMake documentation at `https://www.cmake.org/` for further details. Before building \cgal you have to choose the compiler/linker, set compiler and linker flags, specify which @@ -405,8 +405,8 @@ not depend on the DLL's of those two libraries. In \cgal some demos and examples depend on `Boost.Program_options`. In case the \sc{Boost} libraries are not installed on your system already, you -can obtain them from `http://www.boost.org/`. For Visual C++ you can download precompiled libraries -from `http://sourceforge.net/projects/boost/files/boost-binaries/`. +can obtain them from `https://www.boost.org/`. For Visual C++ you can download precompiled libraries +from `https://sourceforge.net/projects/boost/files/boost-binaries/`. For Visual C++ versions prior to 2015 `Boost.Thread` is required, so make sure to either install the precompiled libraries for your compiler or build `libboost-thread` and `libboost-system`. @@ -428,7 +428,7 @@ solution, and we recommend to use them. Having \sc{Gmp} version 4.2 or higher and \sc{Mpfr} version 2.2.1 or higher installed is recommended. These libraries can be obtained from -`http://gmplib.org/` and `http://www.mpfr.org/`, respectively. +`https://gmplib.org/` and `https://www.mpfr.org/`, respectively. As Visual \cpp is not properly supported by the \sc{Gmp} and \sc{Mpfr} projects, we provide precompiled versions @@ -461,7 +461,7 @@ Qt is a cross-platform application and UI framework. The component libCGAL_Qt5 requires \sc{Qt}5 installed on your system. In case \sc{Qt} is not yet installed on your system, you can download -it from `http://qt-project.org/`. +it from `http://www.qt-project.org/`. The exhaustive list of \sc{Qt}5 components used in demos is: @@ -591,7 +591,7 @@ vision, computer graphics and machine learning. In \cgal, \sc{OpenCV} is used by the \ref PkgClassificationRef package. -The \sc{OpenCV} web site is `http://opencv.org/`. +The \sc{OpenCV} web site is `https://opencv.org/`. \subsection thirdpartyTensorFlow TensorFlow diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index ddc57960ea2..a6026076aed 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -542,9 +542,9 @@ cell base classes, the `MeshVertexBase_3` and `MeshCellBase_3` concepts impose additional requirements. Parallel algorithms require the executable to be linked against the -Intel TBB library. +Intel TBB library. To control the number of threads used, the user may use the tbb::task_scheduler_init class. -See the TBB documentation +See the TBB documentation for more details. \section Mesh_3_section_examples Examples diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt b/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt index 2962c11c312..6aa716ec4ec 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/Minkowski_sum_2.txt @@ -52,8 +52,8 @@ two input polygons are convex, their edges are already sorted by the angle they form with the \f$ x\f$-axis; see the figure above. The Minkowski sum can therefore be computed using an operation similar to the merge step of the merge-sort algorithm\cgalFootnote{See, for example, - -http://en.wikipedia.org/wiki/Merge_sort.} in \f$ O(m + n)\f$ time, + +https://en.wikipedia.org/wiki/Merge_sort.} in \f$ O(m + n)\f$ time, starting from the two bottommost vertices in \f$ P\f$ and in \f$ Q\f$ and merging the ordered list of edges. diff --git a/QP_solver/doc/QP_solver/Concepts/MPSFormat.h b/QP_solver/doc/QP_solver/Concepts/MPSFormat.h index 5bbf412a183..cc6515197bf 100644 --- a/QP_solver/doc/QP_solver/Concepts/MPSFormat.h +++ b/QP_solver/doc/QP_solver/Concepts/MPSFormat.h @@ -8,7 +8,7 @@ programs according to the concepts `QuadraticProgram`, `LinearProgram`, `NonnegativeQuadraticProgram`, and `NonnegativeLinearProgram`, see also -http://en.wikipedia.org/wiki/MPS_(format). +https://en.wikipedia.org/wiki/MPS_(format). \cgal supports a large subset of this format, but there are MPS files around that we cannot read (for diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index 98d94903647..4402035f5fd 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -31,8 +31,8 @@ is met, such as reaching the desired number of edges. The algorithm implemented here is generic in the sense that it does not require the surface mesh to be of a particular type but to be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. -The design is policy-based -(http://en.wikipedia.org/wiki/Policy-based_design), +The design is policy-based +(https://en.wikipedia.org/wiki/Policy-based_design), meaning that you can customize some aspects of the process by passing a set of policy objects. Each policy object specifies a particular aspect of the algorithm, such as how edges are selected and where the replacement vertex is placed. All policies have From 7c2674abc898308b866f3b0ebc6ccf2a3810d0ac Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Mar 2019 08:38:40 +0100 Subject: [PATCH 093/271] More links fixed --- .../doc/CGAL_ipelets/CGAL_ipelets.txt | 2 +- .../doc/Classification/Classification.txt | 4 +-- .../OpenCV/Random_forest_classifier.h | 2 +- .../doc/Documentation/Installation.txt | 6 ++--- .../doc/GraphicsView/GraphicsView.txt | 26 +++++++++---------- .../doc/GraphicsView/PackageDescription.txt | 4 +-- Mesh_3/doc/Mesh_3/Mesh_3.txt | 2 +- .../doc/STL_Extension/STL_Extension.txt | 2 +- .../doc/Solver_interface/Solver_interface.txt | 2 +- .../doc/Triangulation/Triangulation.txt | 2 +- .../doc/Triangulation_3/Triangulation_3.txt | 4 +-- 11 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt index 6d01a2c201e..60598a5bb48 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt +++ b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt @@ -9,7 +9,7 @@ namespace CGAL { \section CGAL_ipeletsIntroduction Introduction -The Ipe extensible drawing editor (http://tclab.kaist.ac.kr/ipe/) \cgalCite{schwarzkopf1995ede}, \cgalCite{ipe:man-09} +The Ipe extensible drawing editor (http://ipe.otfried.org) \cgalCite{schwarzkopf1995ede}, \cgalCite{ipe:man-09} is a tool used by computational geometry researchers to produce 2D figures for inclusion in articles or presentations. The extensible adjective sheds a light on an important feature: the possibility for users to write small extensions (called ipelets) diff --git a/Classification/doc/Classification/Classification.txt b/Classification/doc/Classification/Classification.txt index 2138985acd5..6e7ed342f7d 100644 --- a/Classification/doc/Classification/Classification.txt +++ b/Classification/doc/Classification/Classification.txt @@ -235,7 +235,7 @@ to README provided in the [ETH Zurich's code archive](https://www.ethz.ch/conten The second classifier is [OpenCV::Random_forest_classifier](@ref CGAL::Classification::OpenCV::Random_forest_classifier). It uses the \ref thirdpartyOpenCV library, more specifically the -[Random Trees](http://docs.opencv.org/2.4/modules/ml/doc/random_trees.html) +[Random Trees](https://docs.opencv.org/2.4/modules/ml/doc/random_trees.html) package. Note that this classifier usually produces results with a lower @@ -246,7 +246,7 @@ Forest instead. An [example](\ref Classification_example_opencv_random_forest) shows how to use this classifier. For more details about the algorithm, please refer -to [the official documentation](http://docs.opencv.org/2.4/modules/ml/doc/random_trees.html) +to [the official documentation](https://docs.opencv.org/2.4/modules/ml/doc/random_trees.html) of OpenCV. \subsection Classification_TensorFlow_neural_network TensorFlow Neural Network diff --git a/Classification/include/CGAL/Classification/OpenCV/Random_forest_classifier.h b/Classification/include/CGAL/Classification/OpenCV/Random_forest_classifier.h index 8b04c5d0b8d..b68173e1b14 100644 --- a/Classification/include/CGAL/Classification/OpenCV/Random_forest_classifier.h +++ b/Classification/include/CGAL/Classification/OpenCV/Random_forest_classifier.h @@ -72,7 +72,7 @@ public: /*! \brief Instantiates the classifier using the sets of `labels` and `features`. - Parameters documentation is copy-pasted from [the official documentation of OpenCV](http://docs.opencv.org/2.4/modules/ml/doc/random_trees.html). For more details on this method, please refer to it. + Parameters documentation is copy-pasted from [the official documentation of OpenCV](https://docs.opencv.org/2.4/modules/ml/doc/random_trees.html). For more details on this method, please refer to it. \param labels label set used. \param features feature set used. diff --git a/Documentation/doc/Documentation/Installation.txt b/Documentation/doc/Documentation/Installation.txt index 2f67abb0a78..ee55aa8dfd5 100644 --- a/Documentation/doc/Documentation/Installation.txt +++ b/Documentation/doc/Documentation/Installation.txt @@ -73,7 +73,7 @@ or if Qt5 are desired sudo port install cgal +qt5 +universal +demos -The setup is similar for homebrew . +The setup is similar for homebrew . \subsection sseccgaldebian CGAL on Linux @@ -159,7 +159,7 @@ In order to build the \cgal libraries, you need a \cpp compiler. | :------- | :--------------- | |\sc{Gnu} `g++` 4.1 or later\cgalFootnote{`http://gcc.gnu.org/`} | Linux / MacOS X | | | \sc{MS} Windows | -|\sc{MS} Visual `C++` 12.0, 14.0, 15.9 (\sc{Visual Studio} 2013, 2015, and 2017)\cgalFootnote{`http://msdn.microsoft.com/en-us/vstudio/`} | \sc{MS} Windows | +|\sc{MS} Visual `C++` 12.0, 14.0, 15.9 (\sc{Visual Studio} 2013, 2015, and 2017)\cgalFootnote{`https://visualstudio.microsoft.com/`} | \sc{MS} Windows | | `Clang` \cgalFootnote{`http://clang.llvm.org/`} compiler version 7.0.1 | Linux | | Apple `Clang` compiler version 7.0.2 | MacOS X | @@ -502,7 +502,7 @@ algorithms. Like \sc{Core}, \leda offers a real number data type. In \cgal this library is optional, and its number types can be used as an alternative to \sc{Gmp}, \sc{Mpfr}, and \sc{Core}. -Free and commercial editions of \leda are available from `http://www.algorithmic-solutions.com/leda/index.html`. +Free and commercial editions of \leda are available from `https://www.algorithmic-solutions.com/leda/index.html`. \subsection thirdpartyMPFI MPFI diff --git a/GraphicsView/doc/GraphicsView/GraphicsView.txt b/GraphicsView/doc/GraphicsView/GraphicsView.txt index 000358aea14..1a407b892ed 100644 --- a/GraphicsView/doc/GraphicsView/GraphicsView.txt +++ b/GraphicsView/doc/GraphicsView/GraphicsView.txt @@ -8,17 +8,17 @@ namespace CGAL { \cgalAutoToc \authors Andreas Fabri and Laurent Rineau -Qt is a Gui toolkit for +Qt is a Gui toolkit for cross-platform application development. \section GraphicsViewIntroduction Introduction This chapter describes classes that help to visualize two dimensional \cgal objects -with the Qt Graphics View Framework. +with the Qt Graphics View Framework. -This framework uses the model view paradigm. `QGraphicsItem`s are stored in a -`QGraphicsScene` -and are displayed in a `QGraphicsView`. The items +This framework uses the model view paradigm. `QGraphicsItem`s are stored in a +`QGraphicsScene` +and are displayed in a `QGraphicsView`. The items have a paint method which is called when an item is in the visible area of a view. The framework is also responsible for dispatching events from the view via the scene to the items. The framework is extensible in the sense @@ -50,14 +50,14 @@ classes that have to override member functions adhering to this naming scheme. \section GraphicsViewOverall Overall Design In \cgalFigureRef{graphicsviewuml} you see four classes depicted in grey, -that come from the %Qt Graphics View Framework. The `QGraphicsScene` -contains `QGraphicsItem`s, which get displayed in any number -of `QGraphicsView`s. The views are widgets, that is they take screen space +that come from the %Qt Graphics View Framework. The `QGraphicsScene` +contains `QGraphicsItem`s, which get displayed in any number +of `QGraphicsView`s. The views are widgets, that is they take screen space in an application. -The fourth class is the `QObject`. It plays an important role in %Qt for -event handling and memory management. First, it allows to add signals and -slots, and to connect them. Second, it allows to install event filters. +The fourth class is the `QObject`. It plays an important role in %Qt for +event handling and memory management. First, it allows to add signals and +slots, and to connect them. Second, it allows to install event filters. \cgalFigureBegin{graphicsviewuml,uml-design.png} UML Class Diagram with the %Qt classes (blue), \cgal classes for using the framework (yellow), \cgal data structures (red), and application classes (green). @@ -68,8 +68,8 @@ UML Class Diagram with the %Qt classes (blue), \cgal classes for using the frame In order to visualize for example a `CGAL::Delaunay_triangulation_2`, we provide the graphics item class `CGAL::Qt::TriangulationGraphicsItem`. It provides a `paint` method that draws the edges and vertices of a triangulation -using the drawing primitives of the `QPainter`. The color of vertices and edges, -can be chosen by setting a user defined `QPen`. +using the drawing primitives of the `QPainter`. The color of vertices and edges, +can be chosen by setting a user defined `QPen`. As this graphics item only stores a pointer to a triangulation, it must be notified about changes like the insertion of points coming from diff --git a/GraphicsView/doc/GraphicsView/PackageDescription.txt b/GraphicsView/doc/GraphicsView/PackageDescription.txt index ecd34c19264..fa86adc65a4 100644 --- a/GraphicsView/doc/GraphicsView/PackageDescription.txt +++ b/GraphicsView/doc/GraphicsView/PackageDescription.txt @@ -13,7 +13,7 @@ \cgalPkgPicture{detail.png} \cgalPkgSummaryBegin \cgalPkgAuthors{Andreas Fabri and Laurent Rineau} -\cgalPkgDesc{This package provides classes for displaying \cgal objects and data structures in the Qt 5 Graphics View Framework.} +\cgalPkgDesc{This package provides classes for displaying \cgal objects and data structures in the Qt 5 Graphics View Framework.} \cgalPkgManuals{Chapter_CGAL_and_the_Qt_Graphics_View_Framework,PkgGraphicsViewRef} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin @@ -26,7 +26,7 @@ This package provides some classes which allow to use \cgal classes in Qt applications which make use of the Qt Graphics +HREF="https://qt-project.org/doc/qt-5/graphicsview.html">Qt Graphics View Framework. \cgalClassifedRefPages diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index a6026076aed..269b5d18e28 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -1200,7 +1200,7 @@ vertices/second View of 3d image mesh generation result (size = 4). \cgalFigureEnd -We mesh image number 2 from the 3D-IRCADb-01 (available at http://www.ircad.fr/softwares/3Dircadb/3Dircadb1/index.php) public database. +We mesh image number 2 from the 3D-IRCADb-01 (available at https://www.ircad.fr/softwares/3Dircadb/3Dircadb1/index.php) public database. The size of this image is 512x512x172 voxels (about 45M voxels). The size of the voxels is 0.78mm x 0.78mm x 1.6mm. \cgalFigureRef{figuremesh_3_benchmark_3d_image} shows the mesh obtained for size set to 4. diff --git a/STL_Extension/doc/STL_Extension/STL_Extension.txt b/STL_Extension/doc/STL_Extension/STL_Extension.txt index ba2ddbd1e8d..55e68f926cd 100644 --- a/STL_Extension/doc/STL_Extension/STL_Extension.txt +++ b/STL_Extension/doc/STL_Extension/STL_Extension.txt @@ -98,7 +98,7 @@ The class `Concurrent_compact_container` provides the same features, but enables concurrency-safe `insert` and `erase` operations. Other operations are not concurrency-safe. It requires the program to be linked against -the Intel TBB library. +the Intel TBB library. \section stl_multi Multiset with Extended Functionality diff --git a/Solver_interface/doc/Solver_interface/Solver_interface.txt b/Solver_interface/doc/Solver_interface/Solver_interface.txt index d833f601a1b..7d2587af02a 100644 --- a/Solver_interface/doc/Solver_interface/Solver_interface.txt +++ b/Solver_interface/doc/Solver_interface/Solver_interface.txt @@ -17,7 +17,7 @@ library. Wrappers for the Eigen classes `Eigen_matrix` and It is straightforward to develop equivalent models for other solvers, for example those found in the Intel Math Kernel +href="https://software.intel.com/en-us/mkl">Intel Math Kernel Library (MKL). diff --git a/Triangulation/doc/Triangulation/Triangulation.txt b/Triangulation/doc/Triangulation/Triangulation.txt index f315bc65a13..cf539a32244 100644 --- a/Triangulation/doc/Triangulation/Triangulation.txt +++ b/Triangulation/doc/Triangulation/Triangulation.txt @@ -581,7 +581,7 @@ work by Samuel Hornus, Olivier Devillers and Clément Jamin. In 2017, Clément Jamin added the regular triangulations. Clément Jamin's work was supported by the -Advanced Grant of the European Research Council GUDHI +Advanced Grant of the European Research Council GUDHI (Geometric Understanding in Higher Dimensions). diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 8a71624c432..d3c7825fbcb 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -411,9 +411,9 @@ range of points will be performed in parallel, and the individual insert/remove operations will be optionally thread-safe. Parallel algorithms require the program to be linked against -the Intel TBB library. +the Intel TBB library. To control the number of threads used, the user may use the tbb::task_scheduler_init class. -See the TBB documentation +See the TBB documentation for more details. \section Triangulation3secexamples Examples From ab0544514c3ac129e4dd153d32ed4b774901336a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Mar 2019 08:43:07 +0100 Subject: [PATCH 094/271] Change ruu.nl to uu.nl although the links are often outdated --- Documentation/doc/biblio/cgal_manual.bib | 2 +- Documentation/doc/biblio/geom.bib | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index b5b872ffd46..2875322d843 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -953,7 +953,7 @@ Teillaud" Wieger Wesselink} ,title = {Getting Started with {CGAL}} ,year = 1998 - ,note = {{CGAL} {R}1.0. \url{http://www.cs.ruu.nl/CGAL}.} + ,note = {{CGAL} {R}1.0. \url{http://www.cs.uu.nl/CGAL}.} ,update = "98.01 schoenherr" } diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index b6602668758..5f43699b487 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -2306,7 +2306,7 @@ cell neighborhood in $O(m)$ time." , booktitle = "Proc. 10th Annu. ACM Sympos. Comput. Geom." , year = 1994 , pages = "76--84" -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-39.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-39.ps.gz" , precedes = "ams-cmfal-98" , cites = "a-pal2a-90, aegs-nemfl-92, bds-lric-94, c-talp-69, cegghss-rspug-91, cegss-cfals-93, cf-dvrsi-90, c-csfas-90, cegsw-ccbac-90, cs-arscg-89, e-acg-87, egs-ccmfa-90, ew-mnemf-86, gs-caa-93, hs-parss-93, hw-ensrq-87, m-mdscg-84, m-fppa-90, m-fppa2-91, st-epdg-83, ZZZ" , update = "98.07 mitchell, 98.03 bibrelex, 96.09 agarwal, 96.05 agarwal, 95.09 agarwal, 94.09 jones, 94.01 jones" @@ -2443,7 +2443,7 @@ cell neighborhood in $O(m)$ time." , booktitle = "Proc. 11th Annu. ACM Sympos. Comput. Geom." , year = 1995 , pages = "182--189" -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-40.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-40.ps.gz" , keywords = "curved surfaces" , cites = "as-erasg-95, ass-sulbl-89, a-sdcgp-85, bd-olrcu-93, cgppsw-ctct-94, cegs-sessr-89, cs-arscg-89, bds-lric-94, e-acg-87, egs-ueplf-89, es-mnwsn-90, gpw-gtt-93, gpw-bngpi-94, hs-nblet-94, hs-atubs-95, hs-ndssg-86, hrr-araga-91, s-atubl-94, sa-dsstg-95, ZZZ" , update = "98.03 bibrelex, 96.05 agarwal, 95.09 mitchell+schwarzkopf, 95.05 agarwal" @@ -6581,7 +6581,7 @@ cell neighborhood in $O(m)$ time." , booktitle = "Proc. 11th Annu. ACM Sympos. Comput. Geom." , year = 1995 , pages = "89--97" -, url = "http://www.cs.ruu.nl/~otfried/ps/as-vdco-95.ps.gz" +, url = "http://www.cs.uu.nl/~otfried/ps/as-vdco-95.ps.gz" , keywords = "randomized incremental algorithm" , cites = "a-vdsfg-91, bdsty-arsol-92, c-bvdcp-86, cs-arscg-89, k-avdta-88, k-cavd-89, kmm-ricav-93a, kw-vdbgm-88, ls-pptmc-87, mp-fitcp-78, m-fppa1-88, oy-rmpmd-85, obs-stcav-92, ps-cgi-85, s-barga-93, s-dg-69, y-oavds-87, ya-mpce-89, ZZZ" , update = "98.03 bibrelex, 95.09 mitchell+schwarzkopf" @@ -18626,7 +18626,7 @@ If, we are interested in computing a single face in the intersection of two simp , address = "Utrecht, Netherlands" , month = mar , year = 1994 -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-12.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-12.ps.gz" , keywords = "vertical decomposition, trapezoidal map, point location" , comments = "Full version of bds-lric-94" , update = "95.01 schwarzkopf+smid, 94.05 schwarzkopf" @@ -18759,7 +18759,7 @@ If, we are interested in computing a single face in the intersection of two simp , publisher = "Springer-Verlag" , year = 1993 , pages = "1--10" -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-09.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-09.ps.gz" , precedes = "bghosst-rgdu-95" , update = "98.07 bibrelex, 95.09 devillers, 94.05 devillers+schwarzkopf+sharir+smid, 93.09 milone+mitchell" } @@ -18771,7 +18771,7 @@ If, we are interested in computing a single face in the intersection of two simp , volume = 140 , year = 1995 , pages = "301--317" -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-09.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-09.ps.gz" , succeeds = "bghosst-rgdu-93" , update = "97.11 bibrelex, 95.09 devillers+schwarzkopf" } @@ -18904,7 +18904,7 @@ If, we are interested in computing a single face in the intersection of two simp , publisher = "Springer-Verlag" , year = 1993 , pages = "121--132" -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-02.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-02.ps.gz" , update = "94.05 schwarzkopf, 94.01 smid, 93.09 milone+mitchell" } @@ -19126,7 +19126,7 @@ $O(n^2)$ in the plane." , booktitle = "Proc. 25th Annu. ACM Sympos. Theory Comput." , year = 1993 , pages = "505--514" -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1993/1993-20.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1993/1993-20.ps.gz" , keywords = "configuration space, motion planning, convex, robotics" , precedes = "bms-plpco-95" , update = "96.09 agarwal, 95.09 aronov, 94.05 devillers+schwarzkopf, 93.09 milone+mitchell, 93.05 schwarzkopf" @@ -56436,7 +56436,7 @@ between all the vertices of the polygons." , publisher = "Springer-Verlag" , year = 1996 , pages = "191--202" -, url = "http://www.cs.ruu.nl/CGAL/Papers/wacg.ps.gz" +, url = "http://www.cs.uu.nl/CGAL/Papers/wacg.ps.gz" , update = "98.11 bibrelex, 97.03 tamassia" } @@ -114380,7 +114380,7 @@ small) triangulation of a convex polyhedron is NP-complete. Their 3SAT-reduction , month = may , year = 1996 , pages = "53--58" -, url = "http://www.cs.ruu.nl/CGAL/Papers/panel.ps.gz" +, url = "http://www.cs.uu.nl/CGAL/Papers/panel.ps.gz" , update = "00.03 vismara, 99.11 bibrelex, 98.11 bibrelex, 97.11 held" } @@ -120199,7 +120199,7 @@ Contains C code." , institution = "Utrecht university" , address = "Utrecht, Netherlands" , year = 1994 -, url = "ftp://ftp.cs.ruu.nl/pub/RUU/CS/techreps/CS-1994/1994-49.ps.gz" +, url = "ftp://ftp.cs.uu.nl/pub/RUU/CS/techreps/CS-1994/1994-49.ps.gz" , update = "98.03 bibrelex" } From a472c24185370928a13e1499b2d5a7cc33998825 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Mar 2019 08:59:22 +0100 Subject: [PATCH 095/271] http:/www.boost.org -> https://www.bost.org --- .../CGAL/Arr_circular_line_arc_traits_2.h | 2 +- BGL/doc/BGL/graph_traits.txt | 4 ++-- BGL/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp | 2 +- BGL/include/CGAL/boost/graph/named_function_params.h | 2 +- BGL/include/CGAL/boost/graph/named_params_helper.h | 2 +- CGAL_ipelets/doc/CGAL_ipelets/CGAL/CGAL_Ipelet_base.h | 4 ++-- Circulator/doc/Circulator/Concepts/ConstRange.h | 2 +- Circulator/doc/Circulator/Concepts/Range.h | 2 +- Classification/doc/Classification/Classification.txt | 4 ++-- Classification/doc/Classification/PackageDescription.txt | 4 ++-- Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h | 2 +- Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h | 2 +- .../doc/Documentation/Developer_manual/Chapter_checks.txt | 2 +- .../Documentation/Developer_manual/Chapter_code_format.txt | 2 +- Documentation/doc/Documentation/Installation.txt | 2 +- Installation/include/CGAL/auto_link/auto_link.h | 4 ++-- Kernel_23/doc/Kernel_23/CGAL/intersections.h | 6 +++--- Kernel_d/doc/Kernel_d/CGAL/intersections_d.h | 4 ++-- Mesh_2/include/CGAL/internal/container_fwd_fixed.hpp | 2 +- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- Point_set_processing_3/include/CGAL/structure_point_set.h | 2 +- Property_map/doc/Property_map/Property_map.txt | 2 +- STL_Extension/doc/STL_Extension/CGAL/result_of.h | 2 +- STL_Extension/doc/STL_Extension/Concepts/Hashable.h | 4 ++-- .../include/CGAL/internal/boost/array_binary_tree.hpp | 2 +- .../include/CGAL/internal/boost/function_property_map.hpp | 2 +- STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp | 2 +- STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp | 2 +- STL_Extension/include/CGAL/is_streamable.h | 2 +- STL_Extension/include/CGAL/result_of.h | 2 +- STL_Extension/include/CGAL/tags.h | 2 +- .../doc/Spatial_searching/Spatial_searching.txt | 2 +- Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt | 2 +- .../doc/Surface_mesh_approximation/NamedParameters.txt | 2 +- .../Surface_mesh_simplification.txt | 2 +- Triangulation_2/doc/Triangulation_2/Triangulation_2.txt | 4 ++-- Triangulation_2/include/CGAL/Trivial_iterator.h | 2 +- Triangulation_3/doc/Triangulation_3/Triangulation_3.txt | 4 ++-- 38 files changed, 49 insertions(+), 49 deletions(-) diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h index 6230d15e4c7..08c5e3efae8 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_circular_line_arc_traits_2.h @@ -10,7 +10,7 @@ of both types `CGAL::Line_arc_2` or `CGAL::Circular_arc_2`. -It uses the boost::variant. +It uses the boost::variant. \cgalModels `ArrangementTraits_2` diff --git a/BGL/doc/BGL/graph_traits.txt b/BGL/doc/BGL/graph_traits.txt index bbc9deabdd9..b16313ed534 100644 --- a/BGL/doc/BGL/graph_traits.txt +++ b/BGL/doc/BGL/graph_traits.txt @@ -4,7 +4,7 @@ \ingroup PkgBGLRef The \sc{Bgl} defines the class template -`boost::graph_traits` +`boost::graph_traits` as a uniform interface to the properties and types of %graph types. We provide specializations of this class template for several \cgal data structures. @@ -162,7 +162,7 @@ with the default property map of \sc{Bgl} algorithms (obtained with `get(t, boost::edge_weight)`) is the length of the edge, the edge weight is not well defined for infinite edges. For algorithms that make use of the edge weight, the user must therefore -define a `boost::filtered_graph` or pass a property map to the +define a `boost::filtered_graph` or pass a property map to the algorithm that returns "infinity" for infinite edges. | Member | Value | Description | diff --git a/BGL/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp b/BGL/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp index 0ae2eef517d..90a72cd0c00 100644 --- a/BGL/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp +++ b/BGL/include/CGAL/boost/graph/dijkstra_shortest_paths.hpp @@ -10,7 +10,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // // $URL$ diff --git a/BGL/include/CGAL/boost/graph/named_function_params.h b/BGL/include/CGAL/boost/graph/named_function_params.h index 205269a856d..9ec2365d134 100644 --- a/BGL/include/CGAL/boost/graph/named_function_params.h +++ b/BGL/include/CGAL/boost/graph/named_function_params.h @@ -6,7 +6,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // Copyright (c) 2007 GeometryFactory (France). All rights reserved. // diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index e585269eba0..90e8bdc08cd 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -6,7 +6,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // Copyright (c) 2007-2015 GeometryFactory (France). All rights reserved. // diff --git a/CGAL_ipelets/doc/CGAL_ipelets/CGAL/CGAL_Ipelet_base.h b/CGAL_ipelets/doc/CGAL_ipelets/CGAL/CGAL_Ipelet_base.h index 5152f1a50a2..bc587a1bf3a 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/CGAL/CGAL_Ipelet_base.h +++ b/CGAL_ipelets/doc/CGAL_ipelets/CGAL/CGAL_Ipelet_base.h @@ -198,7 +198,7 @@ The returned output iterator will accept assignments from objects of types `Polygon_2` or `Segment_2` or `Point_2`, it decomposes them in objects of type `Point_2` and assigns them to `it`. For more details on the returned output iterator refer to the Boost library -documentation. +documentation. */ template @@ -211,7 +211,7 @@ The returned output iterator will accept assignments from objects of types `Polygon_2` or `Segment_2`, it decomposes them in objects of type `Segment_2` and assigns them to `it`. For more details on the returned output iterator refer to the Boost library -documentation. +documentation. */ template diff --git a/Circulator/doc/Circulator/Concepts/ConstRange.h b/Circulator/doc/Circulator/Concepts/ConstRange.h index 661c257aa3d..e25c0ad2912 100644 --- a/Circulator/doc/Circulator/Concepts/ConstRange.h +++ b/Circulator/doc/Circulator/Concepts/ConstRange.h @@ -8,7 +8,7 @@ A constant iterator range. Refer to the `Range` concept for more details. \cgalRefines Boost's Range concept \cgalHasModel STL containers -\cgalHasModel `boost::iterator_range` +\cgalHasModel `boost::iterator_range` \sa `Range` diff --git a/Circulator/doc/Circulator/Concepts/Range.h b/Circulator/doc/Circulator/Concepts/Range.h index 7b60925b9cb..7e4ac32aa9f 100644 --- a/Circulator/doc/Circulator/Concepts/Range.h +++ b/Circulator/doc/Circulator/Concepts/Range.h @@ -22,7 +22,7 @@ documentation of any model of these concepts. For example, in the case of a vect and its value type is `Point`. Boost also offers the -Boost.Range library +Boost.Range library which provides good support for ranges. Finally, let us note that ranges, in general (especially in template context) diff --git a/Classification/doc/Classification/Classification.txt b/Classification/doc/Classification/Classification.txt index 6e7ed342f7d..fdb296567dc 100644 --- a/Classification/doc/Classification/Classification.txt +++ b/Classification/doc/Classification/Classification.txt @@ -9,8 +9,8 @@ namespace CGAL { This component implements the algorithm described in \cgalCite{cgal:lm-clscm-12} (section 2), generalized to handle different types of data, multiple features and multiple labels. It classifies a data set into a user-defined set of labels, such as _ground_, _vegetation_ and _buildings_. A flexible API is provided so that users can classify any type of data which they can index and for which they can compute relevant features, compute their own local features on the input data set and define their own labels. \note This component requires C++11 and depends on the Boost libraries -[Serialization](http://www.boost.org/libs/serialization) and -[IO Streams](http://www.boost.org/libs/iostreams) (compiled with the GZIP dependency). +[Serialization](https://www.boost.org/libs/serialization) and +[IO Streams](https://www.boost.org/libs/iostreams) (compiled with the GZIP dependency). \section Classification_Organization Package Organization diff --git a/Classification/doc/Classification/PackageDescription.txt b/Classification/doc/Classification/PackageDescription.txt index d82ffd8b503..3d78a28993a 100644 --- a/Classification/doc/Classification/PackageDescription.txt +++ b/Classification/doc/Classification/PackageDescription.txt @@ -77,8 +77,8 @@ Data structures specialized to classify clusters. \cgalPkgShortInfoBegin \cgalPkgSince{4.12} -\cgalPkgDependsOn{\ref PkgSolverInterface, \ref PkgSpatialSearchingD, [Boost Serialization](http://www.boost.org/libs/serialization) and -[Boost IO Streams](http://www.boost.org/libs/iostreams)} +\cgalPkgDependsOn{\ref PkgSolverInterface, \ref PkgSpatialSearchingD, [Boost Serialization](https://www.boost.org/libs/serialization) and +[Boost IO Streams](https://www.boost.org/libs/iostreams)} \cgalPkgBib{cgal:lm-clscm-12} \cgalPkgLicense{\ref licensesGPL "GPL"} \cgalPkgDemo{Operations on Polyhedra,polyhedron_3.zip} diff --git a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h index 8bca1174f6a..fa220690234 100644 --- a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h @@ -54,7 +54,7 @@ namespace CGAL { or `CGAL::Exact_predicates_inexact_constructions_kernel`. \tparam Graph_ The graph type to store the constructed cone based spanner. - It must be `boost::adjacency_list` + It must be `boost::adjacency_list` with `Traits_::Point_2` as `VertexProperties`. */ template diff --git a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h index 8efbc4d921a..60e3e93d66f 100644 --- a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h @@ -51,7 +51,7 @@ namespace CGAL { or `CGAL::Exact_predicates_inexact_constructions_kernel`. \tparam Graph_ The graph type to store the constructed cone based spanner. - It must be `boost::adjacency_list` + It must be `boost::adjacency_list` with `Traits_::Point_2` as `VertexProperties` */ template diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt index 882f2208078..8186f1bbce9 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt @@ -240,7 +240,7 @@ target exception safety, as much as possible. Good references on exception safety are: Appendix E of \cgalCite{cgal:s-cpl-97} (also available at http://www.research.att.com/~bs/3rd_safe0.html), and \cgalCite{cgal:a-esgc-98} (also available at -http://www.boost.org/more/generic_exception_safety.html). +https://www.boost.org/more/generic_exception_safety.html). Any destructor which might throw an exception, including a destructor which uses the `CGAL_destructor_assertion` macro, should be marked with the `CGAL_NOEXCEPT(false)` macro. This macro provides future compatibility with diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt index fab0b433239..8a8cc26b9ef 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_code_format.txt @@ -259,7 +259,7 @@ The first list of items are meant as rules, i.e., you should follow them. #endif // CGAL_THIS_IS_AN_EXAMPLE_H \endcode - Support the - result_of + result_of protocol whenever your functors have more than one return type otherwise provide a `result_type` member typedef. An example for this is a C++03 style `identity` functor: diff --git a/Documentation/doc/Documentation/Installation.txt b/Documentation/doc/Documentation/Installation.txt index ee55aa8dfd5..e14a78cb091 100644 --- a/Documentation/doc/Documentation/Installation.txt +++ b/Documentation/doc/Documentation/Installation.txt @@ -616,7 +616,7 @@ and designed to partition graphs and produce fill-reducing matrix orderings. \cgal offers wrappers around some of the methods of the \sc{METIS} library to allow the partitioning of graphs that are models of the concepts of the -Boost Graph Library, +Boost Graph Library, and, by extension, of surface meshes (see Section \ref BGLPartitioning of the package \ref PkgBGL). More information is available on the METIS library diff --git a/Installation/include/CGAL/auto_link/auto_link.h b/Installation/include/CGAL/auto_link/auto_link.h index 720c6692ed7..fdb428ec014 100644 --- a/Installation/include/CGAL/auto_link/auto_link.h +++ b/Installation/include/CGAL/auto_link/auto_link.h @@ -9,14 +9,14 @@ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) // // $URL$ // $Id$ // SPDX-License-Identifier: BSL-1.0 // /* - * LOCATION: see http://www.boost.org for most recent version. + * LOCATION: see https://www.boost.org for most recent version. * FILE auto_link.hpp * VERSION see * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. diff --git a/Kernel_23/doc/Kernel_23/CGAL/intersections.h b/Kernel_23/doc/Kernel_23/CGAL/intersections.h index 0678d09d11c..971d6bf1ce4 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/intersections.h +++ b/Kernel_23/doc/Kernel_23/CGAL/intersections.h @@ -337,11 +337,11 @@ The result type can be obtained with `CGAL::cpp11::result_of`. It looks simpler if you use a C++ compiler which supports `auto`, but you must anyways know that the result type is a `boost::optional >`, in order to unpack the point or segment. -`boost::optional` comes in -as there might be no intersection. `boost::variant` comes in +`boost::optional` comes in +as there might be no intersection. `boost::variant` comes in as, if there is an intersection, it is either a point or a segment. -As explained in the boost manual pages for `boost::variant`, there are two ways to access the variants. The first examples uses `boost::get`. +As explained in the boost manual pages for `boost::variant`, there are two ways to access the variants. The first examples uses `boost::get`. \cgalExample{Kernel_23/intersection_get.cpp} diff --git a/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h b/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h index ff81e25cf21..62a74161040 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/intersections_d.h @@ -159,8 +159,8 @@ void foo(Segment_d seg, Line_d lin) \sa `do_intersect` \sa `Kernel_d::Intersect_d` \sa CGAL_INTERSECTION_VERSION -\sa `boost::optional` -\sa `boost::variant` +\sa `boost::optional` +\sa `boost::variant` \sa `cpp11::result_of` */ diff --git a/Mesh_2/include/CGAL/internal/container_fwd_fixed.hpp b/Mesh_2/include/CGAL/internal/container_fwd_fixed.hpp index 7deb8f218bf..f35182f245d 100644 --- a/Mesh_2/include/CGAL/internal/container_fwd_fixed.hpp +++ b/Mesh_2/include/CGAL/internal/container_fwd_fixed.hpp @@ -5,7 +5,7 @@ // Copyright 2005-2008 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) // // $URL$ // $Id$ diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 13874b85ef2..b66026ac2ea 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -297,7 +297,7 @@ update_new_point( The type of the objects put in it is `std::pair`. Note that the user may use a - function_output_iterator + function_output_iterator to match specific needs. \param points input point range. diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 9f23fb9ba7c..cc83bdc5409 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -1516,7 +1516,7 @@ private: \tparam OutputIterator Type of the output iterator. The type of the objects put in it is `std::pair`. Note that the user may use a - function_output_iterator + function_output_iterator to match specific needs. \param points input point range. diff --git a/Property_map/doc/Property_map/Property_map.txt b/Property_map/doc/Property_map/Property_map.txt index 57803fd1965..e29a999cf10 100644 --- a/Property_map/doc/Property_map/Property_map.txt +++ b/Property_map/doc/Property_map/Property_map.txt @@ -19,7 +19,7 @@ The data themselves may be stored in the element, or they may be stored in an external data structure, or they may be computed on the fly. This is an "implementation detail" of the particular property map.
-Property maps in the Boost manuals: http://www.boost.org/libs/property_map/doc/property_map.html +Property maps in the Boost manuals: https://www.boost.org/libs/property_map/doc/property_map.html \section Property_mapCGAL CGAL and Boost Property Maps diff --git a/STL_Extension/doc/STL_Extension/CGAL/result_of.h b/STL_Extension/doc/STL_Extension/CGAL/result_of.h index 1276da97597..d1c77c000d0 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/result_of.h +++ b/STL_Extension/doc/STL_Extension/CGAL/result_of.h @@ -7,7 +7,7 @@ namespace cpp11 { When all compilers supported by %CGAL will have a Standard compliant implemention of the the \cpp11 `decltype` feature, it will become an alias to std::result_of. - \sa boost::result_of + \sa boost::result_of */ template struct result_of{ diff --git a/STL_Extension/doc/STL_Extension/Concepts/Hashable.h b/STL_Extension/doc/STL_Extension/Concepts/Hashable.h index eb8c8e47c40..2cc0858d048 100644 --- a/STL_Extension/doc/STL_Extension/Concepts/Hashable.h +++ b/STL_Extension/doc/STL_Extension/Concepts/Hashable.h @@ -14,8 +14,8 @@ They can be disables by defining the macro `CGAL_DISABLE_HASH_OPENMESH`. \sa `CGAL::Unique_hash_map` \sa `std::unordered_set` \sa `std::unordered_map` -\sa `boost::unordered_set` -\sa `boost::unordered_map` +\sa `boost::unordered_set` +\sa `boost::unordered_map` */ diff --git a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp index d016db28b46..3317ec72d74 100644 --- a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp +++ b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp @@ -5,7 +5,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // // $URL$ diff --git a/STL_Extension/include/CGAL/internal/boost/function_property_map.hpp b/STL_Extension/include/CGAL/internal/boost/function_property_map.hpp index f4b08dd8584..765c0bfd7ae 100644 --- a/STL_Extension/include/CGAL/internal/boost/function_property_map.hpp +++ b/STL_Extension/include/CGAL/internal/boost/function_property_map.hpp @@ -6,7 +6,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // // $URL$ diff --git a/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp b/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp index 81a7a3ccf6b..ffa640207e1 100644 --- a/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp +++ b/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp @@ -5,7 +5,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // // $URL$ diff --git a/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp b/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp index c4629659852..fed5efe2c31 100644 --- a/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp +++ b/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp @@ -5,7 +5,7 @@ // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) //======================================================================= // // $URL$ diff --git a/STL_Extension/include/CGAL/is_streamable.h b/STL_Extension/include/CGAL/is_streamable.h index 7f19e80e7f7..b19ff487c4e 100644 --- a/STL_Extension/include/CGAL/is_streamable.h +++ b/STL_Extension/include/CGAL/is_streamable.h @@ -2,7 +2,7 @@ // All rights reserved. // // Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt) // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. diff --git a/STL_Extension/include/CGAL/result_of.h b/STL_Extension/include/CGAL/result_of.h index 5d9382d5c4d..52f25c0f9e7 100644 --- a/STL_Extension/include/CGAL/result_of.h +++ b/STL_Extension/include/CGAL/result_of.h @@ -53,7 +53,7 @@ namespace cpp11{ template struct result_of { - // from boost 1.44 release note http://www.boost.org/users/history/version_1_44_0.html : + // from boost 1.44 release note https://www.boost.org/users/history/version_1_44_0.html : // New template boost::tr1_result_of that implements the TR1 ResultOf protocol even if boost::result_of uses the C++0x decltype-based implementation. #if BOOST_VERSION < 104400 typedef typename boost::result_of::type type; diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index 0000514404e..28dde6626ad 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -35,7 +35,7 @@ namespace CGAL { struct Void {}; // Boolean_tag is a model of the Boost Integral Constant concept. -// http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html +// https://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html template struct Boolean_tag { typedef boost::mpl::integral_c_tag tag; diff --git a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt index 24a45166d30..41854e29a79 100644 --- a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt +++ b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt @@ -352,7 +352,7 @@ wrapper for all our defined types. The searching itself works exactly as for \cg The following four example programs illustrate how to use the classes `Search_traits_adapter` and `Distance_adapter` to store in the kd-tree objects of an arbitrary key type. Points are -accessed through a point property map. +accessed through a point property map. This enables to associate information to a point or to reduce the size of the search structure. \subsubsection Spatial_searchingUsingaPointandanInteger Using a Point and an Integer as Key Type diff --git a/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt b/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt index 048b7559de5..e726f56299d 100644 --- a/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt +++ b/Spatial_sorting/doc/Spatial_sorting/Spatial_sorting.txt @@ -184,7 +184,7 @@ a sequence of tuples containing a point, or a sequence of indices in a vector of points, you need another level of indirection. We provide the spatial sorting traits class adapters which are templated by another spatial sorting traits class, and a -property map. +property map. which allows to obtain a point from whatever you want to sort. The following examples illustrate the usage of these traits class adapters. diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt b/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt index bb5dbbe22ca..f2205181f2b 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/NamedParameters.txt @@ -5,7 +5,7 @@ \cgalHeading{How to use BGL Optional Named Parameters} The notion of named parameters was introduced in the BGL. -Details can be found from: http://www.boost.org/libs/graph/doc/bgl_named_params.html. +Details can be found from: https://www.boost.org/libs/graph/doc/bgl_named_params.html. Named parameters enable the user to specify only those parameters which are really needed, by name, making the parameter ordering not required. See also \ref bgl_namedparameters. diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index 4402035f5fd..9d34af2ad49 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -214,7 +214,7 @@ returns `true` the algorithm terminates. \subsection Surface_mesh_simplificationOptionalNamed Optional Named Parameters -The notion of named parameters was also introduced in the Bgl. You can read about it in \cgalCite{cgal:sll-bgl-02} or the following site: http://www.boost.org/libs/graph/doc/bgl_named_params.html. Named parameters allow the user to specify only those parameters which are really needed, by name, making the parameter ordering unimportant. +The notion of named parameters was also introduced in the Bgl. You can read about it in \cgalCite{cgal:sll-bgl-02} or the following site: https://www.boost.org/libs/graph/doc/bgl_named_params.html. Named parameters allow the user to specify only those parameters which are really needed, by name, making the parameter ordering unimportant. Say there is a function `f()` that takes 3 parameters called `name`, `age` and `gender`, and you have variables `n,a and g` to pass as parameters to that function. Without named parameters, you would call it like this: `f(n,a,g)`, but with named parameters, you call it like this: `f(name(n).age(a).gender(g))`. diff --git a/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt b/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt index e9bcdeccf88..b6c1dfa5eea 100644 --- a/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt +++ b/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt @@ -1294,14 +1294,14 @@ the `insert` function of the triangulation with a range of such pairs. \subsection Triangulation_2UsingtheBoostZipIterator Using the Boost Zip Iterator Information and points are in separate containers. We use -`boost::zip_iterator` to provide an iterator gathering them. +`boost::zip_iterator` to provide an iterator gathering them. \cgalExample{Triangulation_2/info_insert_with_zip_iterator_2.cpp} \subsection Triangulation_2UsingtheBoostTransformIterator Using the Boost Transform Iterator We define a functor `Auto_count` used together with -`boost::transform_iterator` to set the order of each point +`boost::transform_iterator` to set the order of each point in the range. Note that this is correct because the iterator is dereferenced only once per point during the insertion. \cgalExample{Triangulation_2/info_insert_with_transform_iterator_2.cpp} diff --git a/Triangulation_2/include/CGAL/Trivial_iterator.h b/Triangulation_2/include/CGAL/Trivial_iterator.h index 923f1e6ab9a..a079e8a55ef 100644 --- a/Triangulation_2/include/CGAL/Trivial_iterator.h +++ b/Triangulation_2/include/CGAL/Trivial_iterator.h @@ -33,7 +33,7 @@ namespace CGAL { // TODO : // - comparison operators should be global, but it causes problems... // - Have a look at Boost's concept_checking and archetypes : -// http://www.boost.org/libs/concept_check/concept_check.htm +// https://www.boost.org/libs/concept_check/concept_check.htm class Trivial_iterator_tag{}; diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index d3c7825fbcb..51a12ffb135 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -474,14 +474,14 @@ with a range of such pairs. \subsubsection Triangulation_3UsingtheBoostZipIterator Using the Boost Zip Iterator Information and points are in separate containers. We use -`boost::zip_iterator` to provide an iterator gathering them. +`boost::zip_iterator` to provide an iterator gathering them. \cgalExample{Triangulation_3/info_insert_with_zip_iterator.cpp} \subsubsection Triangulation_3UsingtheBoostTransformIterator Using the Boost Transform Iterator We define a functor `Auto_count` used together with -`boost::transform_iterator` to set the order of each point +`boost::transform_iterator` to set the order of each point in the range. Note that this is correct because the iterator is dereferenced only once per point during the insertion. \cgalExample{Triangulation_3/info_insert_with_transform_iterator.cpp} From 6679bfa911705f1e4743766faba7279d58c299ce Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 20 Mar 2019 10:43:25 +0100 Subject: [PATCH 096/271] Fix the test results page There was the string `\n` in the HTML page, instead of a real newline. --- Maintenance/test_handling/create_testresult_page | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index a62061e261f..2fc447b2eba 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -103,7 +103,8 @@ sub write_select() print OUTPUTV '\n", $filename, $date; - printf OUTPUTV '%2$s: %1$s\n', $filename, $date; + printf OUTPUTV '%2$s: %1$s +', $filename, $date; } print OUTPUTV ""; } From b2b0d9d48629aafb9e47567d246ae0622b8ce89f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 20 Mar 2019 10:44:21 +0100 Subject: [PATCH 097/271] Push last version of my scripts --- .../cgal.geometryfactory.com/bin/cgal_diff_results | 2 +- Maintenance/public_release/scripts/prepare_release | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results index 3424eabc641..ba09b59b185 100755 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results @@ -23,4 +23,4 @@ if ! [ -e "./$to" ]; then exit 1 fi -for f in ${from}/results*txt; do diff -U0 ${1+"$@"} $f ${f/$from/$to}; done |& less +for f in ${from}/results*txt; do diff -U0 ${1+"$@"} $f ${f/$from/$to}; done |& less -p '^\+[^\+].* [^y]|CGAL-.*|diff' diff --git a/Maintenance/public_release/scripts/prepare_release b/Maintenance/public_release/scripts/prepare_release index afdb3f59ee3..2e3f23db0f0 100755 --- a/Maintenance/public_release/scripts/prepare_release +++ b/Maintenance/public_release/scripts/prepare_release @@ -1,5 +1,6 @@ #!/bin/zsh +set -e setopt -o glob setopt -o extended_glob From e9310c2597fca9e1e839023b4c7bb32aac259804 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 20 Mar 2019 11:21:30 +0100 Subject: [PATCH 098/271] Fix encoding in python script --- Testsuite/test/parse-ctest-dashboard-xml.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index 5e4354345de..827aabadeed 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -16,7 +16,7 @@ test_report_filename='{dir}/TestReport_{tester}_{platform}' xml = open("Test.xml", 'rb').read() -def open_file_create_dir(filename, mode, *args, **kwargs): +def open_file_create_dir(filename, mode_, *args, **kwargs): if not os.path.exists(os.path.dirname(filename)): try: os.makedirs(os.path.dirname(filename)) @@ -24,9 +24,9 @@ def open_file_create_dir(filename, mode, *args, **kwargs): if exc.errno != errno.EEXIST: raise if kwargs.get('gzip', None) == True: - return gzip.open(filename, mode) + return gzip.open(filename, mode=mode_, encoding="utf-8") else: - return open(filename, mode) + return io.open(filename, mode=mode_, encoding="utf-8") root=ET.fromstring(xml) testing = root.find('Testing') @@ -85,7 +85,6 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), print("{label} {result}".format(label=label, result=result_for_label), file=results) - for label, tests in tests_per_label.items(): with open_file_create_dir(test_report_filename.format(dir=label, tester=tester_name, @@ -94,13 +93,12 @@ for label, tests in tests_per_label.items(): ------------------------------------------------------------------ - Error output from platform {platform} ------------------------------------------------------------------ - {error_txt} """ .format(platform=platform_name, error_txt=open("{}/error.txt".format(label), 'r').read()), file=label_report) for t in tests: filename="{}/ProgramOutput.{}".format(label, t['Name']) - with open(filename, 'r') as f: + with io.open(filename, mode="r", encoding="utf-8") as f: print(""" ------------------------------------------------------------------ - {file} From a9c3f9bc6ce7b2f4b80170dc36db8f8891121d5c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Mar 2019 11:34:21 +0100 Subject: [PATCH 099/271] BGL: Seam_mesh::add_seams() requires .selection.txt --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index 8df36e3ff4c..e1ccd0a2ed3 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -1065,8 +1065,8 @@ public: /// \tparam VdContainer must be a model of SequenceContainer (that is, provide /// the functions: `operator[]` and `at()`). /// - /// \pre filename should be the name of a CGAL selection file: edges are - /// described by pairs of integers, on the third line of the file. + /// \pre filename should be the name of a \cgal selection file with the file extension "*.selection.txt": + /// edges are described by pairs of integers, on the third line of the file. template TM_halfedge_descriptor add_seams(const char* filename, const VdContainer& tm_vds) @@ -1075,7 +1075,7 @@ public: // Check the file type std::string str = filename; - if(str.substr(str.length() - 14) != ".selection.txt") { + if( (str.length()) < 14 || (str.substr(str.length() - 14) != ".selection.txt") ) { std::cerr << "Error: seams must be given by a *.selection.txt file" << std::endl; return tmhd; } @@ -1107,8 +1107,8 @@ public: /// /// \returns one of the halfedges of the seam mesh that is on a seam. /// - /// \pre filename should be the name of a CGAL selection file: edges are - /// described by pairs of integers, on the third line of the file. + /// \pre filename should be the name of a CGAL selection filee with the file extension "*.selection.txt": + /// edges are described by pairs of integers, on the third line of the file. TM_halfedge_descriptor add_seams(const char* filename) { std::vector tm_vds; From d31f685a0b52ae7abb4ba1d04c17d6eaa02cf477 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Mar 2019 11:42:06 +0100 Subject: [PATCH 100/271] polish --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index e1ccd0a2ed3..ce5459aeb95 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -1065,7 +1065,7 @@ public: /// \tparam VdContainer must be a model of SequenceContainer (that is, provide /// the functions: `operator[]` and `at()`). /// - /// \pre filename should be the name of a \cgal selection file with the file extension "*.selection.txt": + /// \pre filename should be the name of a \cgal selection file with file extension "*.selection.txt": /// edges are described by pairs of integers, on the third line of the file. template TM_halfedge_descriptor add_seams(const char* filename, @@ -1107,7 +1107,7 @@ public: /// /// \returns one of the halfedges of the seam mesh that is on a seam. /// - /// \pre filename should be the name of a CGAL selection filee with the file extension "*.selection.txt": + /// \pre filename should be the name of a \cgal selection filee with file extension "*.selection.txt": /// edges are described by pairs of integers, on the third line of the file. TM_halfedge_descriptor add_seams(const char* filename) { From f1dceb79eef9ef4bedf7679700e2d1c3694be521 Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 20 Mar 2019 11:43:33 +0100 Subject: [PATCH 101/271] fix typo --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index ce5459aeb95..22d5e9c8c51 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -1107,7 +1107,7 @@ public: /// /// \returns one of the halfedges of the seam mesh that is on a seam. /// - /// \pre filename should be the name of a \cgal selection filee with file extension "*.selection.txt": + /// \pre filename should be the name of a \cgal selection file with file extension "*.selection.txt": /// edges are described by pairs of integers, on the third line of the file. TM_halfedge_descriptor add_seams(const char* filename) { From 99a16d2c8f111d5f858e11852999b0cbcdaf5dd8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 20 Mar 2019 16:11:48 +0100 Subject: [PATCH 102/271] Fix example --- .../square_border_parameterizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp index 8cc315c599e..1cb769ced47 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/square_border_parameterizer.cpp @@ -41,7 +41,7 @@ bool read_vertices(const PolyMesh& mesh, Vd_array& fixed_vertices) { std::string str = filename; - if(str.substr(str.length() - 14) != ".selection.txt") { + if( (str.length()) < 14 || (str.substr(str.length() - 14) != ".selection.txt") ) { std::cerr << "Error: vertices must be given by a *.selection.txt file" << std::endl; return false; } From adfeee84d9104f00b086df58590b631de51e07e4 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 20 Mar 2019 16:25:09 +0100 Subject: [PATCH 103/271] typedef the attribute type --- Mesh_3/include/CGAL/IO/output_to_vtu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/IO/output_to_vtu.h b/Mesh_3/include/CGAL/IO/output_to_vtu.h index da0911a7e4a..383442353a2 100644 --- a/Mesh_3/include/CGAL/IO/output_to_vtu.h +++ b/Mesh_3/include/CGAL/IO/output_to_vtu.h @@ -277,10 +277,12 @@ enum VTU_ATTRIBUTE_TYPE{ SIZE_TYPE }; +typedef boost::variant, std::vector, std::vector > Vtu_attributes; + template void output_to_vtu_with_attributes(std::ostream& os, const C3T3& c3t3, - std::vector, std::vector, std::vector >*> >& attributes, + std::vector >&attributes, IO::Mode mode = IO::BINARY) { //CGAL_assertion(attributes.size() == attribute_types.size()); From 6eab4c014c571f04b4406ae5884f7983016c4333 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 21 Mar 2019 09:52:53 +0100 Subject: [PATCH 104/271] Update the handle of .cin files with CGAL_RUN_TESTS_THROUGH_SSH --- .../cmake/modules/CGAL_add_test.cmake | 37 +++++++++++-------- .../cmake/modules/run_test_with_cin.cmake | 6 +-- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 561dc6b0c64..877574d612c 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -232,24 +232,29 @@ function(cgal_add_test exe_name) # message("Add test ${test_name}") set(cin_file "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin") if(NOT ARGS AND EXISTS ${cin_file}) - if(ANDROID OR CGAL_RUN_TESTS_THROUGH_SSH) - set(cmd ${exe_name}) + if(CGAL_RUN_TESTS_THROUGH_SSH) + add_test(NAME ${test_name} COMMAND bash -c "${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} \"cd ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} && ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${exe_name} < ${exe_name}.cin 3< <(cat; kill -INT 0)\" <&1") else() - set(cmd $) + if(ANDROID) + set(cmd ${exe_name}) + else() + set(cmd $) + endif() + add_test(NAME ${test_name} + COMMAND ${TIME_COMMAND} ${CMAKE_COMMAND} + -DCMD:STRING=${cmd} + -DCIN:STRING=${cin_file} + -DCGAL_REMOTE_TEST_DIR_PREFIX=${CGAL_REMOTE_TEST_DIR_PREFIX} + -DCGAL_RUN_TESTS_THROUGH_SSH=${CGAL_RUN_TESTS_THROUGH_SSH} + -DSSH_HOST=${SSH_HOST} + -Dssh_executable=${ssh_executable} + -DCGAL_REMOTE_TEST_DIR_PREFIX=${CGAL_REMOTE_TEST_DIR_PREFIX} + -DPROJECT_NAME=${PROJECT_NAME} + -P "${CGAL_MODULES_DIR}/run_test_with_cin.cmake") + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${cin_file}) + # message(STATUS "add test: ${exe_name} < ${cin_file}") endif() - add_test(NAME ${test_name} - COMMAND ${TIME_COMMAND} ${CMAKE_COMMAND} - -DCMD:STRING=${cmd} - -DCIN:STRING=${cin_file} - -DCGAL_REMOTE_TEST_DIR_PREFIX=${CGAL_REMOTE_TEST_DIR_PREFIX} - -DSSH=${SSH} - -DSSH_HOST=${SSH_HOST} - -DCGAL_REMOTE_TEST_DIR_PREFIX=${CGAL_REMOTE_TEST_DIR_PREFIX} - -DPROJECT_NAME=${PROJECT_NAME} - -P "${CGAL_MODULES_DIR}/run_test_with_cin.cmake") - set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${cin_file}) - # message(STATUS "add test: ${exe_name} < ${cin_file}") else() if(NOT ARGS AND NOT cgal_add_test_TEST_NAME) if(ARGC GREATER 2 AND ARGV2) diff --git a/Installation/cmake/modules/run_test_with_cin.cmake b/Installation/cmake/modules/run_test_with_cin.cmake index 65615d61c51..617ad4c3e16 100644 --- a/Installation/cmake/modules/run_test_with_cin.cmake +++ b/Installation/cmake/modules/run_test_with_cin.cmake @@ -1,4 +1,4 @@ -if(NOT CMD OR (NOT ANDROID AND NOT SSH AND NOT EXISTS ${CMD})) +if(NOT CMD OR (NOT ANDROID AND NOT CGAL_RUN_TESTS_THROUGH_SSH AND NOT EXISTS ${CMD})) message(FATAL_ERROR "The variable `CMD` should be defined to the test program to run!") endif() @@ -13,9 +13,9 @@ if(ANDROID) COMMAND adb shell "cd ${ANDROID_DIR_PREFIX}${PROJECT_NAME} && ${ANDROID_DIR_PREFIX}${PROJECT_NAME}/${CMD}" INPUT_FILE ${CIN} RESULT_VARIABLE error_result) -elseif(SSH) +elseif(CGAL_RUN_TESTS_THROUGH_SSH) execute_process( - COMMAND ssh ${SSH_HOST} "cd ${SSH_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${SSH_DIR_PREFIX}/lib ${SSH_DIR_PREFIX}${PROJECT_NAME}/${CMD}" + COMMAND ${ssh_executable} ${SSH_HOST} "cd ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} && LD_LIBRARY_PATH=${CGAL_REMOTE_TEST_DIR_PREFIX}/lib ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${CMD}" INPUT_FILE ${CIN} RESULT_VARIABLE error_result) else() From 43167252faa1caabc6645c87d580a6624fe800fe Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 21 Mar 2019 11:37:39 +0100 Subject: [PATCH 105/271] Fix cin management in CGAL_add_tests --- Installation/cmake/modules/CGAL_add_test.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 877574d612c..1a2bc19f544 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -233,7 +233,7 @@ function(cgal_add_test exe_name) set(cin_file "${CMAKE_CURRENT_SOURCE_DIR}/${exe_name}.cin") if(NOT ARGS AND EXISTS ${cin_file}) if(CGAL_RUN_TESTS_THROUGH_SSH) - add_test(NAME ${test_name} COMMAND bash -c "${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} \"cd ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} && ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${exe_name} < ${exe_name}.cin 3< <(cat; kill -INT 0)\" <&1") + add_test(NAME ${test_name} COMMAND bash -c "${TIME_COMMAND} ${ssh_executable} ${SSH_HOST} \"cd ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME} && ${CGAL_REMOTE_TEST_DIR_PREFIX}${PROJECT_NAME}/${exe_name} 3< <(cat; kill -INT 0) < ${exe_name}.cin\" <&1") else() if(ANDROID) set(cmd ${exe_name}) From 742badf289052603d585445dc4443ceb989e33b0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 6 Nov 2018 11:08:37 +0100 Subject: [PATCH 106/271] Add centroid of a closed triangle mesh --- .../CGAL/Polygon_mesh_processing/measure.h | 97 ++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index e630333f6eb..6f327e28f21 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,7 @@ #include #include // needed for CGAL::exact(FT)/CGAL::exact(Lazy_exact_nt) +#include #include @@ -532,11 +534,104 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) CGAL::vertex_point_t>::type>::Kernel::FT volume(const TriangleMesh& tmesh) { - return volume(tmesh, CGAL::Polygon_mesh_processing::parameters::all_default()); } + namespace internal { + template + struct Face2Tet { + + const TriangleMesh& tmesh; + const Vpm& vpm; + + Face2Tet(const TriangleMesh& tmesh, const Vpm& vpm) + : tmesh(tmesh), vpm(vpm) + {} + + template + Tetrahedron operator()(Fd fd) const + { + Point origin(0,0,0), + p(get(vpm, target(halfedge(fd, tmesh), tmesh))), + q(get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh))), + r(get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh))); + return Construct_tetrahedron()(origin,p,q,r); + } + + }; + } // namespace internal + +/** + * \ingroup measure_grp + * computes the centroid of the domain bounded by + * a closed triangulated surface mesh. + * + * @tparam TriangleMesh a model of `HalfedgeGraph` + * @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" + * + * @param tmesh the closed triangulated surface mesh bounding the volume + * @param np optional sequence of \ref pmp_namedparameters "Named Parameters" among the ones listed below + * + * @pre `tmesh` is closed + * + * \cgalNamedParamsBegin + * \cgalParamBegin{vertex_point_map} the property map with the points associated to the vertices of `pmesh`. + * If this parameter is omitted, an internal property map for + * `CGAL::vertex_point_t` must be available in `TriangleMesh`\cgalParamEnd + * \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd + * \cgalNamedParamsEnd + * + * @return the centroid bounded by `tmesh`. + * The return type `FT` is a number type. It is + * either deduced from the `geom_traits` \ref pmp_namedparameters "Named Parameters" if provided, + * or the geometric traits class deduced from the point property map + * of `tmesh`. + */ + template +#ifdef DOXYGEN_RUNNING + Point_3 +#else + typename GetGeomTraits::type::Point_3 +#endif +centroid(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) + { + CGAL_assertion(is_triangle_mesh(tmesh)); + CGAL_assertion(is_closed(tmesh)); + + using boost::choose_param; + using boost::get_param; + + typedef typename GetVertexPointMap::const_type Vpm; + Vpm vpm = choose_param(get_param(np, internal_np::vertex_point), + get_const_property_map(CGAL::vertex_point, tmesh)); + typedef typename GetGeomTraits::type Kernel; + typedef typename Kernel::Point_3 Point_3; + typedef typename Kernel::Tetrahedron_3 Tetrahedron_3; + typedef typename Kernel::Construct_tetrahedron_3 Construct_tetrahedron_3; + + typedef typename boost::graph_traits::face_iterator face_iterator; + + internal::Face2Tet f2t(tmesh, vpm); + + std::pair range = faces(tmesh); + + return centroid(boost::make_transform_iterator(range.first, f2t), + boost::make_transform_iterator(range.second, f2t), + Kernel(),Dimension_tag<3>()); + +} + +template +typename CGAL::Kernel_traits::type>::Kernel::Point_3 +centroid(const TriangleMesh& tmesh) +{ + return centroid(tmesh, + CGAL::Polygon_mesh_processing::parameters::all_default()); +} + } } From 88fabe12fbe84edb02b71dfb9360f8069cccfd9b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 20 Nov 2018 19:16:04 +0100 Subject: [PATCH 107/271] Fix dependencies --- .../package_info/Polygon_mesh_processing/dependencies | 1 + 1 file changed, 1 insertion(+) diff --git a/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies b/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies index 560b9907715..e0691224967 100644 --- a/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies +++ b/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies @@ -21,6 +21,7 @@ Modular_arithmetic Number_types Polygon Polygon_mesh_processing +Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers From 75afd11975e935b25f21335c299833c4ae6828fb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 21 Nov 2018 18:12:01 +0100 Subject: [PATCH 108/271] Fix dependencies --- .../package_info/Surface_mesh_segmentation/dependencies | 1 + 1 file changed, 1 insertion(+) diff --git a/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies b/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies index 233d2d2991f..c256e4783e5 100644 --- a/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies +++ b/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies @@ -12,6 +12,7 @@ Kernel_23 Modular_arithmetic Number_types Point_set_processing_3 +Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers From 9aaa855ad0932c3916270e0219fe467fd297d6d2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 22 Nov 2018 15:56:16 +0100 Subject: [PATCH 109/271] Fix dependencies --- .../package_info/Surface_mesh_segmentation/dependencies | 1 - .../package_info/Surface_mesh_skeletonization/dependencies | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies b/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies index c256e4783e5..233d2d2991f 100644 --- a/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies +++ b/Surface_mesh_segmentation/package_info/Surface_mesh_segmentation/dependencies @@ -12,7 +12,6 @@ Kernel_23 Modular_arithmetic Number_types Point_set_processing_3 -Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers diff --git a/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies b/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies index 02ecfdb2dc9..707b9d7aa1c 100644 --- a/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies +++ b/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies @@ -25,6 +25,7 @@ Polygon Polygon_mesh_processing Polyhedron Polyhedron_IO +Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers From 8014920ae097685d0aa240b8b15db55de3beac80 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 29 Nov 2018 09:13:25 +0100 Subject: [PATCH 110/271] Fix CHANGES.md --- Installation/CHANGES.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 7bf8f7d7e16..f232f6e1b6e 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -70,7 +70,10 @@ Release date: March 2019 - Added the class `CGAL::Rigid_triangle_mesh_collision_detection` to detect intersections between meshes and volumes undergoing affine transformations. - + +- Added the function `CGAL::Polygon_mesh_processing::centroid()` which computes + the centroid of a closed triangle mesh. + ### Regularized Boolean Set Operations in 2D package - Fixed the validation of orientation of relative simple polygons. From 2f4cb13faff863249f8ef528e4d5d2a34b1ce0d4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 29 Nov 2018 10:21:10 +0100 Subject: [PATCH 111/271] Test centroid() --- .../test/Polygon_mesh_processing/measures_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index a63da169ce1..43f33b36c1b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -168,6 +168,14 @@ void test_closed_surface_mesh(const char* filename) typename K::FT vol = PMP::volume(sm); std::cout << "volume = " << vol << std::endl; assert(vol > 0); + + K::Point_3 p = PMP::centroid(sm); + + // compare with centroid of 1.000.000 points inside the mesh: + // 0.00772887 -0.134923 0.011703 + assert (p.x() > 0.007 && p.x() < 0.008); + assert (p.y() > -0.14 && p.y() < -0.13); + assert (p.z() > 0.01 && p.z() < 0.02); } int main(int argc, char* argv[]) From a38b7e7b3d2764f989db4ad0b453655eb5a05f9a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 29 Nov 2018 16:12:43 +0100 Subject: [PATCH 112/271] Add typename --- .../test/Polygon_mesh_processing/measures_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index 43f33b36c1b..93ee9de2949 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -169,7 +169,7 @@ void test_closed_surface_mesh(const char* filename) std::cout << "volume = " << vol << std::endl; assert(vol > 0); - K::Point_3 p = PMP::centroid(sm); + typename K::Point_3 p = PMP::centroid(sm); // compare with centroid of 1.000.000 points inside the mesh: // 0.00772887 -0.134923 0.011703 From 67a4448549579d66db8ce73e7f95d296c6358f29 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 30 Nov 2018 08:27:32 +0100 Subject: [PATCH 113/271] Add result_type --- .../include/CGAL/Polygon_mesh_processing/measure.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 6f327e28f21..e97bcabf1f5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -542,6 +542,7 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) template struct Face2Tet { + typedef Tetrahedron result_type; const TriangleMesh& tmesh; const Vpm& vpm; @@ -582,7 +583,7 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) * \cgalParamBegin{geom_traits} an instance of a geometric traits class, model of `Kernel`\cgalParamEnd * \cgalNamedParamsEnd * - * @return the centroid bounded by `tmesh`. + * @return the centroid of the domain bounded by `tmesh`. * The return type `FT` is a number type. It is * either deduced from the `geom_traits` \ref pmp_namedparameters "Named Parameters" if provided, * or the geometric traits class deduced from the point property map From f1f6e0dc521f9aa48fa904f614a959b61e51a57d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 4 Dec 2018 11:35:35 +0100 Subject: [PATCH 114/271] Do not test the centroid with Epec --- .../Polygon_mesh_processing/measures_test.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index 93ee9de2949..4e0cb1c8cba 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -169,6 +169,18 @@ void test_closed_surface_mesh(const char* filename) std::cout << "volume = " << vol << std::endl; assert(vol > 0); +} + + +template +void test_centroid(const char* filename) +{ + std::cout << "Test Surface_mesh " << filename + << " with Kernel " << typeid(K).name() << std::endl; + Surface_mesh sm; + std::ifstream input(filename); + input >> sm; + typename K::Point_3 p = PMP::centroid(sm); // compare with centroid of 1.000.000 points inside the mesh: @@ -190,6 +202,10 @@ int main(int argc, char* argv[]) test_closed_surface_mesh,Epic>(filename_surface_mesh); test_closed_surface_mesh,Epec>(filename_surface_mesh); + // It won't work with Epec for large meshes as it builds up a deep DAG + // leading to a stackoverflow when the destructor is called. + test_centroid,Epic>(filename_surface_mesh); + std::cerr << "All done." << std::endl; return 0; } From e758a7ddb0df75fb12654337e3e2700259ef80e5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 21 Mar 2019 12:46:05 +0100 Subject: [PATCH 115/271] Correct implementation of centroid of surface mesh --- .../CGAL/Polygon_mesh_processing/measure.h | 71 ++++++++++--------- .../Polygon_mesh_processing/measures_test.cpp | 16 ++++- 2 files changed, 53 insertions(+), 34 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index e97bcabf1f5..bead949aded 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -538,31 +538,6 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) CGAL::Polygon_mesh_processing::parameters::all_default()); } - namespace internal { - template - struct Face2Tet { - - typedef Tetrahedron result_type; - const TriangleMesh& tmesh; - const Vpm& vpm; - - Face2Tet(const TriangleMesh& tmesh, const Vpm& vpm) - : tmesh(tmesh), vpm(vpm) - {} - - template - Tetrahedron operator()(Fd fd) const - { - Point origin(0,0,0), - p(get(vpm, target(halfedge(fd, tmesh), tmesh))), - q(get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh))), - r(get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh))); - return Construct_tetrahedron()(origin,p,q,r); - } - - }; - } // namespace internal - /** * \ingroup measure_grp * computes the centroid of the domain bounded by @@ -597,7 +572,9 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) typename GetGeomTraits::type::Point_3 #endif centroid(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) - { +{ + // See: http://www2.imperial.ac.uk/~rn/centroid.pdf + CGAL_assertion(is_triangle_mesh(tmesh)); CGAL_assertion(is_closed(tmesh)); @@ -609,18 +586,46 @@ centroid(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) get_const_property_map(CGAL::vertex_point, tmesh)); typedef typename GetGeomTraits::type Kernel; typedef typename Kernel::Point_3 Point_3; + typedef typename Kernel::Vector_3 Vector_3; typedef typename Kernel::Tetrahedron_3 Tetrahedron_3; - typedef typename Kernel::Construct_tetrahedron_3 Construct_tetrahedron_3; + typedef typename Kernel::Construct_translated_point_3 Construct_translated_point_3; + typedef typename Kernel::Construct_vector_3 Construct_vector_3; + typedef typename Kernel::Compute_scalar_product_3 Scalar_product; + typedef typename Kernel::Construct_cross_product_vector_3 Cross_product; + typedef typename Kernel::Construct_scaled_vector_3 Scale; + typedef typename Kernel::Construct_sum_of_vectors_3 Sum; + typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename boost::graph_traits::face_iterator face_iterator; + typename Kernel::FT volume = 0.; - internal::Face2Tet f2t(tmesh, vpm); + Vector_3 centroid(NULL_VECTOR); - std::pair range = faces(tmesh); + Construct_translated_point_3 point; + Construct_vector_3 vector; + Scalar_product scalar_product; + Cross_product cross_product; + Scale scale; + Sum sum; - return centroid(boost::make_transform_iterator(range.first, f2t), - boost::make_transform_iterator(range.second, f2t), - Kernel(),Dimension_tag<3>()); + for(face_descriptor fd : faces(tmesh)){ + Vector_3 vp = vector(ORIGIN, get(vpm, target(halfedge(fd, tmesh), tmesh))), + vq = vector(ORIGIN, get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh))), + vr = vector(ORIGIN, get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh))); + Vector_3 n = cross_product((vq-vp),(vr-vp)); + volume += (scalar_product(n,vp))/6.; + n = scale(n, 1.0/24.0); + + Vector_3 v2 = sum(vp, vq); + Vector_3 v3 = Vector_3(square(v2.x()), square(v2.y()), square(v2.z())); + v2 = sum(vq, vr); + v3 = sum(v3, Vector_3(square(v2.x()), square(v2.y()), square(v2.z()))); + v2 = sum(vp, vr); + v3 = sum(v3, Vector_3(square(v2.x()), square(v2.y()), square(v2.z()))); + + centroid = sum(centroid, Vector_3(n.x() * v3.x(), n.y() * v3.y(), n.z() * v3.z())); + } + centroid = scale(centroid, 1./(2.*volume)); + return point(ORIGIN, centroid); } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp index 4e0cb1c8cba..1eaf14ee88a 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/measures_test.cpp @@ -182,12 +182,26 @@ void test_centroid(const char* filename) input >> sm; typename K::Point_3 p = PMP::centroid(sm); - + + // For data/elephant.off // compare with centroid of 1.000.000 points inside the mesh: // 0.00772887 -0.134923 0.011703 assert (p.x() > 0.007 && p.x() < 0.008); assert (p.y() > -0.14 && p.y() < -0.13); assert (p.z() > 0.01 && p.z() < 0.02); + + typename K::Vector_3 v(10,20,30); + for(typename boost::graph_traits::vertex_descriptor vd : vertices(sm)){ + sm.point(vd) = sm.point(vd) + v; + } + + p = PMP::centroid(sm); + p = p - v; + assert (p.x() > 0.007 && p.x() < 0.008); + assert (p.y() > -0.14 && p.y() < -0.13); + assert (p.z() > 0.01 && p.z() < 0.02); + + } int main(int argc, char* argv[]) From 33a92901c963f55c9cb61e9362bd671add1355ea Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 21 Mar 2019 14:05:54 +0100 Subject: [PATCH 116/271] Fix @returns and PackageDescription --- .../doc/Polygon_mesh_processing/PackageDescription.txt | 1 + .../include/CGAL/Polygon_mesh_processing/measure.h | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index 56cc359dd33..032167d48e0 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -173,6 +173,7 @@ and provides a list of the parameters that are used in this package. - \link measure_grp `CGAL::Polygon_mesh_processing::volume()` \endlink - \link measure_grp `CGAL::Polygon_mesh_processing::edge_length()` \endlink - \link measure_grp `CGAL::Polygon_mesh_processing::face_border_length()` \endlink +- \link measure_grp `CGAL::Polygon_mesh_processing::centroid()` \endlink \cgalCRPSection{Distance Functions} - `CGAL::Polygon_mesh_processing::approximate_Hausdorff_distance()` diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index bead949aded..23531823cea 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -559,10 +559,6 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) * \cgalNamedParamsEnd * * @return the centroid of the domain bounded by `tmesh`. - * The return type `FT` is a number type. It is - * either deduced from the `geom_traits` \ref pmp_namedparameters "Named Parameters" if provided, - * or the geometric traits class deduced from the point property map - * of `tmesh`. */ template From 27ceec33b5a5fe661bd250c20affeb402f99a194 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 21 Mar 2019 16:10:18 +0100 Subject: [PATCH 117/271] Replace Weighted point by Point --- Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h b/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h index cecf3aefea1..9d1a9a5d79f 100644 --- a/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h +++ b/Mesh_3/include/CGAL/IO/Complex_3_in_triangulation_3_to_vtk.h @@ -65,10 +65,10 @@ output_c3t3_to_vtk_unstructured_grid(const C3T3& c3t3, vit != end; ++vit) { - typedef typename Triangulation::Weighted_point Weighted_point; + typedef typename Triangulation::Point Point; if(vit->in_dimension() > -1) { - const Weighted_point& p = tr.point(vit); + const Point& p = tr.point(vit); vtk_points->InsertNextPoint(CGAL::to_double(p.x()), CGAL::to_double(p.y()), CGAL::to_double(p.z())); From 67774ef07b4085956bd71d86f13864142cee57e2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 21 Mar 2019 17:20:46 +0100 Subject: [PATCH 118/271] clean up --- .../include/CGAL/Polygon_mesh_processing/measure.h | 1 - .../package_info/Polygon_mesh_processing/dependencies | 1 - 2 files changed, 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 23531823cea..62f1285fdd8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -39,7 +39,6 @@ #include #include // needed for CGAL::exact(FT)/CGAL::exact(Lazy_exact_nt) -#include #include diff --git a/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies b/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies index e0691224967..560b9907715 100644 --- a/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies +++ b/Polygon_mesh_processing/package_info/Polygon_mesh_processing/dependencies @@ -21,7 +21,6 @@ Modular_arithmetic Number_types Polygon Polygon_mesh_processing -Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers From 60f54882f9596cd231e2494a654c5124c789a747 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 21 Mar 2019 19:40:08 +0100 Subject: [PATCH 119/271] Examples with Surface_mesh --- .../Surface_mesh_simplification.txt | 36 ++-- .../Surface_mesh_simplification/examples.txt | 1 + .../CMakeLists.txt | 1 + .../edge_collapse_bounded_normal_change.cpp | 26 ++- ...llapse_constrained_border_surface_mesh.cpp | 13 +- .../edge_collapse_enriched_polyhedron.cpp | 160 +++--------------- .../edge_collapse_polyhedron.cpp | 23 ++- .../edge_collapse_surface_mesh.cpp | 136 +-------------- .../edge_collapse_visitor_surface_mesh.cmd | 1 + .../edge_collapse_visitor_surface_mesh.cpp | 155 +++++++++++++++++ 10 files changed, 240 insertions(+), 312 deletions(-) create mode 100644 Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cmd create mode 100644 Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index 98d94903647..c1686edc80e 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -30,6 +30,7 @@ is met, such as reaching the desired number of edges. The algorithm implemented here is generic in the sense that it does not require the surface mesh to be of a particular type but to be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. +We give examples for `Surface_mesh`, `Polyhedron_3`, and OpenMesh. The design is policy-based (http://en.wikipedia.org/wiki/Policy-based_design), @@ -254,24 +255,31 @@ int r = edge_collapse(surface_mesh \subsection Surface_mesh_simplificationExamples Examples -\subsection Surface_mesh_simplificationExampleUsinga Example Using a Default Polyhedron +\subsubsection Surface_mesh_simplificationExampleUsingSurfaceMesh Example Using a Surface_mesh -The following example illustrates the simplest of the cases. It uses -an ordinary polyhedron and only one of the optional parameters. +The following example illustrates the simplification of a `Surface_mesh`. The unspecified cost strategy defaults to Lindstrom-Turk. + +\cgalExample{Surface_mesh_simplification/edge_collapse_surface_mesh.cpp} + + +\subsubsection Surface_mesh_simplificationExampleUsinga Example Using a Default Polyhedron + +The following example illustrates the simplification of a `Polyhedron_3` with default +vertices, halfedges, and faces. +The unspecified cost strategy defaults to Lindstrom-Turk. + \cgalExample{Surface_mesh_simplification/edge_collapse_polyhedron.cpp} -\subsection Surface_mesh_simplificationExampleUsingan Example Using an Enriched Polyhedron +\subsubsection Surface_mesh_simplificationExampleUsingan Example Using an Enriched Polyhedron The following example is equivalent to the previous example but using an enriched polyhedron whose halfedges support an `id` field to -store the edge index needed by the algorithm. It also shows how to -explicitly specify a cost strategy (other than the default) -and how to use a visitor object to track the simplification process. +store the edge index needed by the algorithm. \cgalExample{Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp} -\subsection Surface_mesh_simplificationExampleOpenMesh Example for Simplification of OpenMesh +\subsubsection Surface_mesh_simplificationExampleOpenMesh Example for Simplification of OpenMesh The following example shows how the mesh simplification package can be applied on a mesh data structure which is not part of \cgal, but a model of `FaceGraph`. @@ -282,17 +290,17 @@ What is particular in this example is the property map that allows to associate \cgalExample{Surface_mesh_simplification/edge_collapse_OpenMesh.cpp} -\subsection Surface_mesh_simplificationExamplewithedges Example with Edges Marked as Non-Removable +\subsubsection Surface_mesh_simplificationExamplewithedges Example with Edges Marked as Non-Removable The following example shows how to use the optional named parameter `edge_is_constrained_map` to prevent edges from being removed. Edges marked as constrained are guaranteed to be in the final surface mesh. However, the vertices of the constrained edges may change and the placement may change the points. The wrapper `CGAL::Surface_mesh_simplification::Constrained_placement` guarantees that these points are not changed. -\cgalExample{Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp} +\cgalExample{Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp} -\subsection Surface_mesh_simplificationExamplewithBoundedNormal Example with Bounded Change of Face Normals +\subsubsection Surface_mesh_simplificationExamplewithBoundedNormal Example with Bounded Change of Face Normals The surface mesh simplification does not guarantee that the resulting surface has no self intersections. Even the rather trivial mesh shown in \cgalFigureRef{SMS-selfintersection} @@ -310,6 +318,12 @@ rejects this placement by returning `boost::none`. \cgalExample{Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp} +\subsubsection Surface_mesh_simplificationExamplewithVisitor Example with Visitor + +The last example shows how to use a visitor with callbacks that are called at the different +steps of the simplification algorithm. + +\cgalExample{Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp} */ } /* namespace CGAL */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/examples.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/examples.txt index 1fccf678a18..bc5b234ca2b 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/examples.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/examples.txt @@ -8,4 +8,5 @@ \example Surface_mesh_simplification/edge_collapse_surface_mesh.cpp \example Surface_mesh_simplification/edge_collapse_all_short_edges.cpp \example Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +\example Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp */ diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index e6cdccf2eb9..1090de74ac5 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -54,6 +54,7 @@ create_single_source_cgal_program( "edge_collapse_linear_cell_complex.cpp" ) create_single_source_cgal_program( "edge_collapse_constrained_border_surface_mesh.cpp" ) create_single_source_cgal_program( "edge_collapse_all_short_edges.cpp" ) create_single_source_cgal_program( "edge_collapse_bounded_normal_change.cpp" ) +create_single_source_cgal_program( "edge_collapse_visitor_surface_mesh.cpp" ) if(OpenMesh_FOUND) create_single_source_cgal_program( "edge_collapse_OpenMesh.cpp" ) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp index fada9dd5bf7..4e3072c4103 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp @@ -1,12 +1,9 @@ #include #include #include -#include +#include -// Simplification function #include - -// Stop-condition policy #include #include #include @@ -14,22 +11,23 @@ typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Surface_mesh; +typedef CGAL::Surface_mesh Surface_mesh; -namespace SMS = CGAL::Surface_mesh_simplification ; +namespace SMS = CGAL::Surface_mesh_simplification; int main( int argc, char** argv ) { Surface_mesh surface_mesh; - std::ifstream is(argc > 1 ? argv[1] : "data/fold.off") ; is >> surface_mesh ; + std::ifstream is(argc > 1 ? argv[1] : "data/fold.off"); + is >> surface_mesh; // This is a stop predicate (defines when the algorithm terminates). // In this example, the simplification stops when the number of undirected edges // left in the surface mesh drops below the specified number (1000) SMS::Count_stop_predicate stop(num_halfedges(surface_mesh)/2 - 1); -typedef SMS::Bounded_normal_change_placement > Placement; + typedef SMS::Bounded_normal_change_placement > Placement; // This the actual call to the simplification algorithm. @@ -38,15 +36,13 @@ typedef SMS::Bounded_normal_change_placement()) - .get_placement(Placement()) + CGAL::parameters::get_cost (SMS::LindstromTurk_cost()) + .get_placement(Placement()) ); - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ); os.precision(17); - os << surface_mesh ; + os << surface_mesh; - return 0 ; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp index 47e509fcf73..9a111df2617 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include @@ -24,7 +23,7 @@ typedef CGAL::Surface_mesh Surface_mesh; typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef boost::graph_traits::edge_descriptor edge_descriptor; -namespace SMS = CGAL::Surface_mesh_simplification ; +namespace SMS = CGAL::Surface_mesh_simplification; // // BGL property map which indicates whether an edge is marked as non-removable @@ -66,7 +65,7 @@ int main( int argc, char** argv ) return EXIT_FAILURE; } - is >> surface_mesh ; + is >> surface_mesh ; if (!CGAL::is_triangle_mesh(surface_mesh)){ std::cerr << "Input geometry is not triangulated." << std::endl; return EXIT_FAILURE; @@ -100,11 +99,11 @@ int main( int argc, char** argv ) ); std::cout << "\nFinished...\n" << r << " edges removed.\n" - << surface_mesh.number_of_edges() << " final edges.\n" ; + << surface_mesh.number_of_edges() << " final edges.\n"; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ); os.precision(17); - os << surface_mesh ; + os << surface_mesh; // now check! BOOST_FOREACH(halfedge_descriptor hd, halfedges(surface_mesh)){ @@ -119,5 +118,5 @@ int main( int argc, char** argv ) } assert( nb_border_edges==0 ); - return EXIT_SUCCESS ; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp index 2701d40f16e..2479a2cadf5 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp @@ -3,123 +3,31 @@ #include #include - -// Simplification function -#include - -// Visitor base -#include - // Extended polyhedron items which include an id() field #include -// Stop-condition policy +#include #include -// Non-default cost and placement policies -#include typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point; -typedef Kernel::Point_3 Point ; - -// // Setup an enriched polyhedron type which stores an id() field in the items -// typedef CGAL::Polyhedron_3 Surface_mesh; -typedef Surface_mesh::Halfedge_handle Halfedge_handle ; -typedef Surface_mesh::Vertex_handle Vertex_handle ; +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -namespace SMS = CGAL::Surface_mesh_simplification ; - -typedef SMS::Edge_profile Profile ; - - -// The following is a Visitor that keeps track of the simplification process. -// In this example the progress is printed real-time and a few statistics are -// recorded (and printed in the end). -// -struct Stats -{ - Stats() - : collected(0) - , processed(0) - , collapsed(0) - , non_collapsable(0) - , cost_uncomputable(0) - , placement_uncomputable(0) - {} - - std::size_t collected ; - std::size_t processed ; - std::size_t collapsed ; - std::size_t non_collapsable ; - std::size_t cost_uncomputable ; - std::size_t placement_uncomputable ; -} ; - -struct My_visitor : SMS::Edge_collapse_visitor_base -{ - My_visitor( Stats* s) : stats(s){} - - // Called during the collecting phase for each edge collected. - void OnCollected( Profile const&, boost::optional const& ) - { - ++ stats->collected ; - std::cerr << "\rEdges collected: " << stats->collected << std::flush ; - } - - // Called during the processing phase for each edge selected. - // If cost is absent the edge won't be collapsed. - void OnSelected(Profile const& - ,boost::optional cost - ,std::size_t initial - ,std::size_t current - ) - { - ++ stats->processed ; - if ( !cost ) - ++ stats->cost_uncomputable ; - - if ( current == initial ) - std::cerr << "\n" << std::flush ; - std::cerr << "\r" << current << std::flush ; - } - - // Called during the processing phase for each edge being collapsed. - // If placement is absent the edge is left uncollapsed. - void OnCollapsing(Profile const& - ,boost::optional placement - ) - { - if ( !placement ) - ++ stats->placement_uncomputable ; - } - - // Called for each edge which failed the so called link-condition, - // that is, which cannot be collapsed because doing so would - // turn the surface mesh into a non-manifold. - void OnNonCollapsable( Profile const& ) - { - ++ stats->non_collapsable; - } - - // Called AFTER each edge has been collapsed - void OnCollapsed( Profile const&, Vertex_handle ) - { - ++ stats->collapsed; - } - - Stats* stats ; -} ; +namespace SMS = CGAL::Surface_mesh_simplification; int main( int argc, char** argv ) { Surface_mesh surface_mesh; - std::ifstream is(argv[1]) ; is >> surface_mesh ; + std::ifstream is(argv[1]); + is >> surface_mesh; if (!CGAL::is_triangle_mesh(surface_mesh)){ std::cerr << "Input geometry is not triangulated." << std::endl; return EXIT_FAILURE; @@ -130,60 +38,36 @@ int main( int argc, char** argv ) // need to get the index of a vertex/edge. // However, the Polyhedron_3 class doesn't assign any value to // this id(), so we must do it here: - int index = 0 ; + int index = 0; - for( Surface_mesh::Halfedge_iterator eb = surface_mesh.halfedges_begin() - , ee = surface_mesh.halfedges_end() - ; eb != ee - ; ++ eb - ) - eb->id() = index++; - - index = 0 ; - for( Surface_mesh::Vertex_iterator vb = surface_mesh.vertices_begin() - , ve = surface_mesh.vertices_end() - ; vb != ve - ; ++ vb - ) - vb->id() = index++; + BOOST_FOREACH(halfedge_descriptor hd , halfedges(surface_mesh)){ + hd->id() = index++; +} + index = 0; + + BOOST_FOREACH(vertex_descriptor vd , vertices(surface_mesh)){ + vd->id() = index++; +} // In this example, the simplification stops when the number of undirected edges // drops below 10% of the initial count SMS::Count_ratio_stop_predicate stop(0.1); - Stats stats ; - - My_visitor vis(&stats) ; // The index maps are not explicitelty passed as in the previous // example because the surface mesh items have a proper id() field. // On the other hand, we pass here explicit cost and placement // function which differ from the default policies, ommited in // the previous example. - int r = SMS::edge_collapse - (surface_mesh - ,stop - ,CGAL::parameters::get_cost (SMS::Edge_length_cost ()) - .get_placement(SMS::Midpoint_placement()) - .visitor (vis) - ); + int r = SMS::edge_collapse(surface_mesh, stop); - std::cout << "\nEdges collected: " << stats.collected - << "\nEdges proccessed: " << stats.processed - << "\nEdges collapsed: " << stats.collapsed - << std::endl - << "\nEdges not collapsed due to topological constraints: " << stats.non_collapsable - << "\nEdge not collapsed due to cost computation constraints: " << stats.cost_uncomputable - << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable - << std::endl ; - std::cout << "\nFinished...\n" << r << " edges removed.\n" - << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ; + << (surface_mesh.size_of_halfedges()/2) << " final edges.\n"; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; - os.precision(17) ; - os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ); + os.precision(17); + os << surface_mesh; - return EXIT_SUCCESS ; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp index 0b71dc88768..52085cd078c 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp @@ -9,20 +9,19 @@ // Stop-condition policy #include -#include -#include typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Polyhedron_3 Surface_mesh; -namespace SMS = CGAL::Surface_mesh_simplification ; +namespace SMS = CGAL::Surface_mesh_simplification; int main( int argc, char** argv ) { Surface_mesh surface_mesh; - std::ifstream is(argv[1]) ; is >> surface_mesh ; + std::ifstream is(argv[1]); + is >> surface_mesh; if (!CGAL::is_triangle_mesh(surface_mesh)){ std::cerr << "Input geometry is not triangulated." << std::endl; return EXIT_FAILURE; @@ -40,18 +39,16 @@ int main( int argc, char** argv ) int r = SMS::edge_collapse (surface_mesh ,stop - ,CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index,surface_mesh)) - .halfedge_index_map (get(CGAL::halfedge_external_index ,surface_mesh)) - .get_cost (SMS::Edge_length_cost ()) - .get_placement(SMS::Midpoint_placement()) + ,CGAL::parameters::vertex_index_map(get(CGAL::vertex_external_index, surface_mesh)) + .halfedge_index_map (get(CGAL::halfedge_external_index, surface_mesh)) ); std::cout << "\nFinished...\n" << r << " edges removed.\n" - << (surface_mesh.size_of_halfedges()/2) << " final edges.\n" ; + << (surface_mesh.size_of_halfedges()/2) << " final edges.\n"; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; - os.precision(17) ; - os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ); + os.precision(17); + os << surface_mesh; - return EXIT_SUCCESS ; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp index 2cb9a496c9a..7fa2a9edf42 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp @@ -3,118 +3,22 @@ #include #include - -// Simplification function #include - -// Visitor base -#include - -// Stop-condition policy #include -#include -#include typedef CGAL::Simple_cartesian Kernel; typedef Kernel::Point_3 Point_3; - -// -// Setup an enriched polyhedron type which stores an id() field in the items -// typedef CGAL::Surface_mesh Surface_mesh; -typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor ; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; - -namespace SMS = CGAL::Surface_mesh_simplification ; - -typedef SMS::Edge_profile Profile ; - - -// The following is a Visitor that keeps track of the simplification process. -// In this example the progress is printed real-time and a few statistics are -// recorded (and printed in the end). -// -struct Stats -{ - Stats() - : collected(0) - , processed(0) - , collapsed(0) - , non_collapsable(0) - , cost_uncomputable(0) - , placement_uncomputable(0) - {} - - std::size_t collected ; - std::size_t processed ; - std::size_t collapsed ; - std::size_t non_collapsable ; - std::size_t cost_uncomputable ; - std::size_t placement_uncomputable ; -} ; - -struct My_visitor : SMS::Edge_collapse_visitor_base -{ - My_visitor( Stats* s) : stats(s){} - - // Called during the collecting phase for each edge collected. - void OnCollected( Profile const&, boost::optional const& ) - { - ++ stats->collected ; - std::cerr << "\rEdges collected: " << stats->collected << std::flush ; - } - - // Called during the processing phase for each edge selected. - // If cost is absent the edge won't be collapsed. - void OnSelected(Profile const& - ,boost::optional cost - ,std::size_t initial - ,std::size_t current - ) - { - ++ stats->processed ; - if ( !cost ) - ++ stats->cost_uncomputable ; - - if ( current == initial ) - std::cerr << "\n" << std::flush ; - std::cerr << "\r" << current << std::flush ; - } - - // Called during the processing phase for each edge being collapsed. - // If placement is absent the edge is left uncollapsed. - void OnCollapsing(Profile const& - ,boost::optional placement - ) - { - if ( !placement ) - ++ stats->placement_uncomputable ; - } - - // Called for each edge which failed the so called link-condition, - // that is, which cannot be collapsed because doing so would - // turn the surface mesh into a non-manifold. - void OnNonCollapsable( Profile const& ) - { - ++ stats->non_collapsable; - } - - // Called AFTER each edge has been collapsed - void OnCollapsed( Profile const&, vertex_descriptor ) - { - ++ stats->collapsed; - } - - Stats* stats ; -} ; +namespace SMS = CGAL::Surface_mesh_simplification; int main( int argc, char** argv ) { Surface_mesh surface_mesh; - std::ifstream is(argv[1]) ; is >> surface_mesh ; + std::ifstream is(argv[1]); + is >> surface_mesh; if (!CGAL::is_triangle_mesh(surface_mesh)){ std::cerr << "Input geometry is not triangulated." << std::endl; return EXIT_FAILURE; @@ -124,38 +28,14 @@ int main( int argc, char** argv ) // drops below 10% of the initial count SMS::Count_ratio_stop_predicate stop(0.1); - Stats stats ; - - My_visitor vis(&stats) ; + int r = SMS::edge_collapse(surface_mesh, stop); - // The index maps are not explicitelty passed as in the previous - // example because the surface mesh items have a proper id() field. - // On the other hand, we pass here explicit cost and placement - // function which differ from the default policies, ommited in - // the previous example. - int r = SMS::edge_collapse - (surface_mesh - ,stop - ,CGAL::parameters::get_cost (SMS::Edge_length_cost ()) - .get_placement(SMS::Midpoint_placement()) - .visitor (vis) - ); - - std::cout << "\nEdges collected: " << stats.collected - << "\nEdges proccessed: " << stats.processed - << "\nEdges collapsed: " << stats.collapsed - << std::endl - << "\nEdges not collapsed due to topological constraints: " << stats.non_collapsable - << "\nEdge not collapsed due to cost computation constraints: " << stats.cost_uncomputable - << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable - << std::endl ; - std::cout << "\nFinished...\n" << r << " edges removed.\n" << surface_mesh.number_of_edges() << " final edges.\n"; - std::ofstream os( argc > 2 ? argv[2] : "out.off" ) ; - os.precision(17) ; - os << surface_mesh ; + std::ofstream os( argc > 2 ? argv[2] : "out.off" ); + os.precision(17); + os << surface_mesh; - return EXIT_SUCCESS ; + return EXIT_SUCCESS; } diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cmd b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cmd new file mode 100644 index 00000000000..5cea844d830 --- /dev/null +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cmd @@ -0,0 +1 @@ +cube.off diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp new file mode 100644 index 00000000000..9688a107e6d --- /dev/null +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp @@ -0,0 +1,155 @@ +#include +#include + +#include +#include + +// Simplification function +#include + +// Visitor base +#include + +// Stop-condition policy +#include + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::Point_3 Point_3; + +typedef CGAL::Surface_mesh Surface_mesh; + +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +namespace SMS = CGAL::Surface_mesh_simplification; + +typedef SMS::Edge_profile Profile; + + +// The following is a Visitor that keeps track of the simplification process. +// In this example the progress is printed real-time and a few statistics are +// recorded (and printed in the end). +// +struct Stats +{ + Stats() + : collected(0) + , processed(0) + , collapsed(0) + , non_collapsable(0) + , cost_uncomputable(0) + , placement_uncomputable(0) + {} + + std::size_t collected; + std::size_t processed; + std::size_t collapsed; + std::size_t non_collapsable; + std::size_t cost_uncomputable ; + std::size_t placement_uncomputable; +}; + +struct My_visitor : SMS::Edge_collapse_visitor_base +{ + My_visitor( Stats* s) : stats(s){} + + // Called during the collecting phase for each edge collected. + void OnCollected( Profile const&, boost::optional const& ) + { + ++ stats->collected; + std::cerr << "\rEdges collected: " << stats->collected << std::flush; + } + + // Called during the processing phase for each edge selected. + // If cost is absent the edge won't be collapsed. + void OnSelected(Profile const& + ,boost::optional cost + ,std::size_t initial + ,std::size_t current + ) + { + ++ stats->processed; + if ( !cost ) + ++ stats->cost_uncomputable; + + if ( current == initial ) + std::cerr << "\n" << std::flush; + std::cerr << "\r" << current << std::flush; + } + + // Called during the processing phase for each edge being collapsed. + // If placement is absent the edge is left uncollapsed. + void OnCollapsing(Profile const& + ,boost::optional placement + ) + { + if ( !placement ) + ++ stats->placement_uncomputable; + } + + // Called for each edge which failed the so called link-condition, + // that is, which cannot be collapsed because doing so would + // turn the surface mesh into a non-manifold. + void OnNonCollapsable( Profile const& ) + { + ++ stats->non_collapsable; + } + + // Called after each edge has been collapsed + void OnCollapsed( Profile const&, vertex_descriptor ) + { + ++ stats->collapsed; + } + + Stats* stats; +}; + + +int main( int argc, char** argv ) +{ + Surface_mesh surface_mesh; + + std::ifstream is(argv[1]); + is >> surface_mesh; + if (!CGAL::is_triangle_mesh(surface_mesh)){ + std::cerr << "Input geometry is not triangulated." << std::endl; + return EXIT_FAILURE; + } + + // In this example, the simplification stops when the number of undirected edges + // drops below 10% of the initial count + SMS::Count_ratio_stop_predicate stop(0.1); + + Stats stats; + + My_visitor vis(&stats); + + // The index maps are not explicitelty passed as in the previous + // example because the surface mesh items have a proper id() field. + // On the other hand, we pass here explicit cost and placement + // function which differ from the default policies, ommited in + // the previous example. + int r = SMS::edge_collapse + (surface_mesh + ,stop + ,CGAL::parameters::visitor(vis) + ); + + std::cout << "\nEdges collected: " << stats.collected + << "\nEdges proccessed: " << stats.processed + << "\nEdges collapsed: " << stats.collapsed + << std::endl + << "\nEdges not collapsed due to topological constraints: " << stats.non_collapsable + << "\nEdge not collapsed due to cost computation constraints: " << stats.cost_uncomputable + << "\nEdge not collapsed due to placement computation constraints: " << stats.placement_uncomputable + << std::endl; + + std::cout << "\nFinished...\n" << r << " edges removed.\n" + << surface_mesh.number_of_edges() << " final edges.\n"; + + std::ofstream os( argc > 2 ? argv[2] : "out.off" ); + os.precision(17); + os << surface_mesh; + + return EXIT_SUCCESS; +} From 596661526e40b1ec503315d5a8ec791ba06e3bbb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 22 Mar 2019 08:46:46 +0100 Subject: [PATCH 120/271] fix (sub)section --- .../Surface_mesh_simplification.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index c1686edc80e..e7d1b69296f 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -253,9 +253,9 @@ int r = edge_collapse(surface_mesh \endcode -\subsection Surface_mesh_simplificationExamples Examples +\section Surface_mesh_simplificationExamples Examples -\subsubsection Surface_mesh_simplificationExampleUsingSurfaceMesh Example Using a Surface_mesh +\subsection Surface_mesh_simplificationExampleUsingSurfaceMesh Example Using a Surface_mesh The following example illustrates the simplification of a `Surface_mesh`. The unspecified cost strategy defaults to Lindstrom-Turk. @@ -263,7 +263,7 @@ The unspecified cost strategy defaults to Lindstrom-Turk. \cgalExample{Surface_mesh_simplification/edge_collapse_surface_mesh.cpp} -\subsubsection Surface_mesh_simplificationExampleUsinga Example Using a Default Polyhedron +\subsection Surface_mesh_simplificationExampleUsinga Example Using a Default Polyhedron The following example illustrates the simplification of a `Polyhedron_3` with default vertices, halfedges, and faces. @@ -271,7 +271,7 @@ The unspecified cost strategy defaults to Lindstrom-Turk. \cgalExample{Surface_mesh_simplification/edge_collapse_polyhedron.cpp} -\subsubsection Surface_mesh_simplificationExampleUsingan Example Using an Enriched Polyhedron +\subsection Surface_mesh_simplificationExampleUsingan Example Using an Enriched Polyhedron The following example is equivalent to the previous example but using an enriched polyhedron whose halfedges support an `id` field to @@ -279,7 +279,7 @@ store the edge index needed by the algorithm. \cgalExample{Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp} -\subsubsection Surface_mesh_simplificationExampleOpenMesh Example for Simplification of OpenMesh +\subsection Surface_mesh_simplificationExampleOpenMesh Example for Simplification of OpenMesh The following example shows how the mesh simplification package can be applied on a mesh data structure which is not part of \cgal, but a model of `FaceGraph`. @@ -290,7 +290,7 @@ What is particular in this example is the property map that allows to associate \cgalExample{Surface_mesh_simplification/edge_collapse_OpenMesh.cpp} -\subsubsection Surface_mesh_simplificationExamplewithedges Example with Edges Marked as Non-Removable +\subsection Surface_mesh_simplificationExamplewithedges Example with Edges Marked as Non-Removable The following example shows how to use the optional named parameter `edge_is_constrained_map` to prevent edges from being removed. Edges marked as constrained are guaranteed to be in the final surface mesh. However, @@ -300,7 +300,7 @@ The wrapper `CGAL::Surface_mesh_simplification::Constrained_placement` guarantee \cgalExample{Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp} -\subsubsection Surface_mesh_simplificationExamplewithBoundedNormal Example with Bounded Change of Face Normals +\subsection Surface_mesh_simplificationExamplewithBoundedNormal Example with Bounded Change of Face Normals The surface mesh simplification does not guarantee that the resulting surface has no self intersections. Even the rather trivial mesh shown in \cgalFigureRef{SMS-selfintersection} @@ -318,7 +318,7 @@ rejects this placement by returning `boost::none`. \cgalExample{Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp} -\subsubsection Surface_mesh_simplificationExamplewithVisitor Example with Visitor +\subsection Surface_mesh_simplificationExamplewithVisitor Example with Visitor The last example shows how to use a visitor with callbacks that are called at the different steps of the simplification algorithm. From 2873493fb424da20e573f6f8123c618616f2c408 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 22 Mar 2019 09:41:03 +0100 Subject: [PATCH 121/271] PMP: Fix inclusion of .jpg --- Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in index bf7a9bf0c4f..5528e5ea9ff 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in @@ -27,3 +27,5 @@ EXPAND_AS_DEFINED = CGAL_PMP_NP_TEMPLATE_PARAMETERS \ CGAL_PMP_NP_CLASS EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polygon_mesh_processing/internal EXCLUDE_SYMBOLS += experimental + +HTML_EXTRA_FILES = ${CGAL_PACKAGE_DOC_DIR}/fig/selfintersections.jpg \ No newline at end of file From fc04ed7609729b246545c87905542ccced3ae3ab Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 21 Mar 2019 17:45:26 +0100 Subject: [PATCH 122/271] Fix intersection(Point_2,Point_2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems it was never tested, and never worked. PR #2792 introduced a compilation error in cgal-swig-bindings, by the addition of `do_intersect(Point_2,Circle_2)` and `intersection(Point_2,Circle_2)`: > /usr/include/CGAL/Kernel/function_objects.h:2954:63: error: call of overloaded ‘do_intersect(const CGAL::Point_2 > >&, const CGAL::Point_2 > >&, CGAL::Simple_cartesian >)’ is ambiguous > { return Intersections::internal::do_intersect(t1, t2, K()); } > ^ https://travis-ci.org/CGAL/cgal-swig-bindings/jobs/509442278#L4727 --- Intersections_2/include/CGAL/Intersection_traits_2.h | 5 +++++ .../include/CGAL/Intersections_2/Point_2_Point_2.h | 6 ++++-- .../test/Intersections_2/test_intersections_2.cpp | 10 +++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Intersections_2/include/CGAL/Intersection_traits_2.h b/Intersections_2/include/CGAL/Intersection_traits_2.h index 4519f5e3ae4..170636c22e2 100644 --- a/Intersections_2/include/CGAL/Intersection_traits_2.h +++ b/Intersections_2/include/CGAL/Intersection_traits_2.h @@ -97,6 +97,11 @@ struct Intersection_traits { typedef boost::optional result_type; }; +template +struct Intersection_traits { + typedef typename boost::variant variant_type; + typedef boost::optional result_type; +}; template struct Intersection_traits diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h index 0baa0f0a6a8..c3d77f4d20b 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h @@ -39,7 +39,8 @@ namespace internal { template inline bool do_intersect(const typename K::Point_2 &pt1, - const typename K::Point_2 &pt2) + const typename K::Point_2 &pt2, + const K&) { return pt1 == pt2; } @@ -48,7 +49,8 @@ template typename CGAL::Intersection_traits ::result_type intersection(const typename K::Point_2 &pt1, - const typename K::Point_2 &pt2) + const typename K::Point_2 &pt2, + const K&) { if (pt1 == pt2) { return intersection_return(pt1); diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index f3e46cc78d2..963beac1f15 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -15,7 +15,7 @@ #include #include #include - +#include #include #include @@ -292,6 +292,13 @@ check_no_intersection (L(p(0, 0), p(10,10)), L(p(8,7), p(1, 0))); check_intersection (S(p(-10, -10), p( 0, 10)), T(p( -9, 9), p( 14, 8), p(-2,-16))); } + void P_P() + { + std::cout << "Point - Point\n"; + check_no_intersection

(p( 8, 4), p(-4, 8)); + check_intersection

(p( 8, 4), p( 8, 4)); + } + void P_T() { std::cout << "Point - Triangle\n"; @@ -353,6 +360,7 @@ check_no_intersection (L(p(0, 0), p(10,10)), L(p(8,7), p(1, 0))); R_T(); S_T(); P_T(); + P_P(); L_Rec(); R_Rec(); S_Rec(); From c13db7254d200e28016afb94282e69250f0475db Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 22 Mar 2019 11:33:59 +0100 Subject: [PATCH 123/271] Add execution time and exit value to error.txt --- Testsuite/test/parse-ctest-dashboard-xml.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index 827aabadeed..b197db9997c 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -42,7 +42,15 @@ labels = set() tester_name=sys.argv[1] platform_name=sys.argv[2] for t in testing.findall('Test'): - t_output = t.find('Results').find('Measurement').find('Value') + nm = t.find('Results') + t_exit_value="" + ex_time = "" + for ec in nm.findall("*/[@name='Execution Time']"): + ex_time=ec.find('Value').text + for ec in nm.findall("*/[@name='Exit Code']"): + t_exit_value=ec.find('Value').text + #t_exit_value=nm.find("*/[@name='Exit Code']").find('Value').text + t_output = nm.find('Measurement').find('Value') t_output_value = t_output.text if t_output_value != None: if 'encoding' in t_output.attrib and t_output.attrib['encoding'] == 'base64': @@ -55,6 +63,8 @@ for t in testing.findall('Test'): "Status": t.attrib['Status'], \ "Output": t_output_value, \ "Labels": [l.text for l in t.find('Labels').findall('Label')] if t.find('Labels') is not None else ['UNKNOWN_LABEL'], \ + "ExitValue": t_exit_value, \ + "ExecutionTime": ex_time, \ } tests_per_label = defaultdict(list) @@ -72,7 +82,7 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), result_for_label='y' with open_file_create_dir("{}/error.txt".format(label), 'w') as error: for t in tests: - print(" {} {}".format("successful " if (t['Status'] == 'passed') else "ERROR: ", t['Name']), file=error) + print(" {result} {name} in {time} s : {value} ".format(result = "successful " if (t['Status'] == 'passed') else "ERROR: ", name = t['Name'], value = t['ExitValue'] if(t['ExitValue'] != "") else "SUCCESS" , time = t['ExecutionTime']), file=error) if t['Status'] != 'passed': result_for_label='n' elif t['Output'] != None and re.search(r'(^|[^a-zA-Z_,:-])warning', t['Output'], flags=re.IGNORECASE): From 92abe26251b8ebc3eb7893313ff612bb730fcb24 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 22 Mar 2019 11:51:59 +0100 Subject: [PATCH 124/271] cleanup --- .../include/CGAL/Polygon_mesh_processing/measure.h | 1 - .../package_info/Surface_mesh_skeletonization/dependencies | 1 - 2 files changed, 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 62f1285fdd8..8de3c3d647d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies b/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies index 707b9d7aa1c..02ecfdb2dc9 100644 --- a/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies +++ b/Surface_mesh_skeletonization/package_info/Surface_mesh_skeletonization/dependencies @@ -25,7 +25,6 @@ Polygon Polygon_mesh_processing Polyhedron Polyhedron_IO -Principal_component_analysis_LGPL Profiling_tools Property_map Random_numbers From 497d3154882afc0aed5bed39799d272b3f65bee4 Mon Sep 17 00:00:00 2001 From: Mael Date: Fri, 22 Mar 2019 17:11:19 +0100 Subject: [PATCH 125/271] And the end-of-line in Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in Co-Authored-By: lrineau --- Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in index 5528e5ea9ff..82bd44cdbf4 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in @@ -28,4 +28,4 @@ EXPAND_AS_DEFINED = CGAL_PMP_NP_TEMPLATE_PARAMETERS \ EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polygon_mesh_processing/internal EXCLUDE_SYMBOLS += experimental -HTML_EXTRA_FILES = ${CGAL_PACKAGE_DOC_DIR}/fig/selfintersections.jpg \ No newline at end of file +HTML_EXTRA_FILES = ${CGAL_PACKAGE_DOC_DIR}/fig/selfintersections.jpg From 9f9bd9b1fd4ecb295692c0201b6ebf39d62ce641 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Mar 2019 09:12:28 +0100 Subject: [PATCH 126/271] Set the initial transformation to Translation to get the maximum length and set the box horizontal policy to fixed. Also move a button to gain space. --- .../Plugins/PCA/Affine_transform_plugin.cpp | 2 ++ .../Plugins/PCA/Transformation_widget.ui | 35 ++++++++++++------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp index 33882b8d858..d55d517ddea 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Affine_transform_plugin.cpp @@ -239,6 +239,8 @@ public: this, &Polyhedron_demo_affine_transform_plugin::clear); connect(ui.undoButton, &QPushButton::clicked, this, &Polyhedron_demo_affine_transform_plugin::undo); + //initial state is Translation: no need for this one + ui.lineEditA->hide(); } void start(FaceGraph *facegraph, const QString name, const Scene_item::Bbox&); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Transformation_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/PCA/Transformation_widget.ui index 7b11ecfb571..44bc587d253 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Transformation_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Transformation_widget.ui @@ -6,7 +6,7 @@ 0 0 - 430 + 328 413 @@ -160,12 +160,21 @@ - + + + + 0 + 0 + + Angle, axis coordinates + + 1 + Rotation: @@ -234,20 +243,10 @@ - - - - Saves the current state and applies the transformation. - - - Apply - - - - + @@ -271,6 +270,16 @@ + + + + Saves the current state and applies the transformation. + + + Apply + + + From e2becb4e54ca15d082b0f7f56d2877d72e15dac0 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Mar 2019 10:24:33 +0100 Subject: [PATCH 127/271] Fix warning for CMP0071 --- .../demo/Hyperbolic_triangulation_2/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 9b6a302a29a..70337214193 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -8,6 +8,10 @@ set(CMAKE_AUTOMOC ON) cmake_minimum_required(VERSION 3.1...3.13) +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + find_package(CGAL QUIET COMPONENTS Core Qt5) find_package(Qt5 QUIET COMPONENTS Widgets) From 801eb23ca362506a8bc853c523eadee763446fc3 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Mar 2019 12:09:04 +0100 Subject: [PATCH 128/271] Fix uninit warning in PMP --- .../CGAL/Polygon_mesh_processing/repair_polygon_soup.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h index 7ac9ac2a1ba..87f22320451 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h @@ -641,7 +641,11 @@ Polygon construct_canonical_polygon(const PointRange& points, const Traits& traits = Traits()) { if(polygon.size() < 2) + { + reversed = false; return polygon; + } + #ifdef CGAL_PMP_REPAIR_POLYGON_SOUP_VERBOSE_PP std::cout << "Input polygon:"; From 43c29bdb17bfb5bd80f24638431193371e07992e Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:08:05 +0100 Subject: [PATCH 129/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 8de3c3d647d..c2e0ab3dc53 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -541,7 +541,7 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) * computes the centroid of the domain bounded by * a closed triangulated surface mesh. * - * @tparam TriangleMesh a model of `HalfedgeGraph` + * @tparam TriangleMesh a model of `FaceListGraph` * @tparam NamedParameters a sequence of \ref pmp_namedparameters "Named Parameters" * * @param tmesh the closed triangulated surface mesh bounding the volume From 69061e3c72aad25c814fd53eca36fe198fc09ebb Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:08:15 +0100 Subject: [PATCH 130/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index c2e0ab3dc53..3d75afa53e3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -538,7 +538,7 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) /** * \ingroup measure_grp - * computes the centroid of the domain bounded by + * computes the centroid of a volume bounded by * a closed triangulated surface mesh. * * @tparam TriangleMesh a model of `FaceListGraph` From 31a1e80c07670479a4b33d09579dee16bbf3f9f4 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:08:48 +0100 Subject: [PATCH 131/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 3d75afa53e3..100769afc25 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -589,7 +589,7 @@ centroid(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) typedef typename Kernel::Construct_scaled_vector_3 Scale; typedef typename Kernel::Construct_sum_of_vectors_3 Sum; typedef typename boost::graph_traits::face_descriptor face_descriptor; - +typedef typename Kernel::FT FT; typename Kernel::FT volume = 0.; Vector_3 centroid(NULL_VECTOR); From 544a23aeb33069b3a290f530b1cf93e665b7c5f0 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:08:59 +0100 Subject: [PATCH 132/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 100769afc25..bb232327364 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -590,7 +590,7 @@ centroid(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) typedef typename Kernel::Construct_sum_of_vectors_3 Sum; typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename Kernel::FT FT; - typename Kernel::FT volume = 0.; + FT volume = 0.; Vector_3 centroid(NULL_VECTOR); From 1fb5670bbda2b1f0496ecc4c513dc5f4b6fccee6 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:09:15 +0100 Subject: [PATCH 133/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index bb232327364..95b29e2f519 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -607,7 +607,7 @@ typedef typename Kernel::FT FT; vr = vector(ORIGIN, get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh))); Vector_3 n = cross_product((vq-vp),(vr-vp)); volume += (scalar_product(n,vp))/6.; - n = scale(n, 1.0/24.0); + n = scale(n, FT(1)/FT(24)); Vector_3 v2 = sum(vp, vq); Vector_3 v3 = Vector_3(square(v2.x()), square(v2.y()), square(v2.z())); From 15e87ed141674e2cacb65dcabb2ead5d09907729 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:09:31 +0100 Subject: [PATCH 134/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index 95b29e2f519..f36af928c83 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -606,7 +606,7 @@ typedef typename Kernel::FT FT; vq = vector(ORIGIN, get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh))), vr = vector(ORIGIN, get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh))); Vector_3 n = cross_product((vq-vp),(vr-vp)); - volume += (scalar_product(n,vp))/6.; + volume += (scalar_product(n,vp))/FT(6); n = scale(n, FT(1)/FT(24)); Vector_3 v2 = sum(vp, vq); From 225fdeac04dac5f230c495c4157de0814cbfa6ac Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 25 Mar 2019 14:09:42 +0100 Subject: [PATCH 135/271] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h Co-Authored-By: afabri --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index f36af928c83..a191f69b51e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -618,7 +618,7 @@ typedef typename Kernel::FT FT; centroid = sum(centroid, Vector_3(n.x() * v3.x(), n.y() * v3.y(), n.z() * v3.z())); } - centroid = scale(centroid, 1./(2.*volume)); + centroid = scale(centroid, FT(1)/(FT(2)*volume)); return point(ORIGIN, centroid); } From a98eb443ea962d67ce705653b6598bac08fda048 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 25 Mar 2019 14:32:34 +0100 Subject: [PATCH 136/271] Changes after Sebastien's review --- .../CGAL/Polygon_mesh_processing/measure.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index a191f69b51e..0873e5b2c0c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -584,8 +584,8 @@ centroid(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) typedef typename Kernel::Tetrahedron_3 Tetrahedron_3; typedef typename Kernel::Construct_translated_point_3 Construct_translated_point_3; typedef typename Kernel::Construct_vector_3 Construct_vector_3; + typedef typename Kernel::Construct_normal_3 Construct_normal_3; typedef typename Kernel::Compute_scalar_product_3 Scalar_product; - typedef typename Kernel::Construct_cross_product_vector_3 Cross_product; typedef typename Kernel::Construct_scaled_vector_3 Scale; typedef typename Kernel::Construct_sum_of_vectors_3 Sum; typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -596,16 +596,19 @@ typedef typename Kernel::FT FT; Construct_translated_point_3 point; Construct_vector_3 vector; + Construct_normal_3 normal; Scalar_product scalar_product; - Cross_product cross_product; Scale scale; Sum sum; for(face_descriptor fd : faces(tmesh)){ - Vector_3 vp = vector(ORIGIN, get(vpm, target(halfedge(fd, tmesh), tmesh))), - vq = vector(ORIGIN, get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh))), - vr = vector(ORIGIN, get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh))); - Vector_3 n = cross_product((vq-vp),(vr-vp)); + const Point_3& p = get(vpm, target(halfedge(fd, tmesh), tmesh)); + const Point_3& q = get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh)); + const Point_3& r = get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh)); + Vector_3 vp = vector(ORIGIN, p), + vq = vector(ORIGIN, q), + vr = vector(ORIGIN, r); + Vector_3 n = normal(p, q, r); volume += (scalar_product(n,vp))/FT(6); n = scale(n, FT(1)/FT(24)); From 24d5971372502b3304fcfe1aa39d21eafc7b432c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 25 Mar 2019 14:58:35 +0100 Subject: [PATCH 137/271] Test that norm != 0 in normalize() --- .../include/CGAL/Polygon_mesh_processing/compute_normal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 8a9d9847f7b..4e01c5490a7 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -49,7 +49,9 @@ namespace internal { { typename GT::FT norm = CGAL::approximate_sqrt( traits.compute_squared_length_3_object()(v)); - v = traits.construct_divided_vector_3_object()(v, norm); + //If the vector is small enough, approx_sqrt might return 0, and then we get nan values. + //To avoid that, we check the resulted norm. If it is 0, we don't normalize. + v = traits.construct_divided_vector_3_object()(v, norm == 0 ? 1 : norm); } template Date: Mon, 25 Mar 2019 16:06:20 +0100 Subject: [PATCH 138/271] Don't use ternary operator --- .../include/CGAL/Polygon_mesh_processing/compute_normal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 4e01c5490a7..e3d52c2bcef 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -51,7 +51,10 @@ namespace internal { traits.compute_squared_length_3_object()(v)); //If the vector is small enough, approx_sqrt might return 0, and then we get nan values. //To avoid that, we check the resulted norm. If it is 0, we don't normalize. - v = traits.construct_divided_vector_3_object()(v, norm == 0 ? 1 : norm); + if(norm != 0) + { + v = traits.construct_divided_vector_3_object()(v, norm ); + } } template Date: Mon, 25 Mar 2019 16:12:42 +0100 Subject: [PATCH 139/271] Add misisng header --- Mesh_3/include/CGAL/IO/output_to_vtu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Mesh_3/include/CGAL/IO/output_to_vtu.h b/Mesh_3/include/CGAL/IO/output_to_vtu.h index 383442353a2..b5cf023f6a4 100644 --- a/Mesh_3/include/CGAL/IO/output_to_vtu.h +++ b/Mesh_3/include/CGAL/IO/output_to_vtu.h @@ -32,6 +32,7 @@ #include #include #include +#include //todo try to factorize with functors namespace CGAL{ From eab794926fe56df476216f07dd5a39e804b1ace2 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Mar 2019 10:39:17 +0100 Subject: [PATCH 140/271] Set BUILD_TESTING, otherwise CTest does not see any test --- Scripts/developer_scripts/run_testsuite_with_cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index 705682d3538..dc23bc51c09 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -266,9 +266,9 @@ run_test_on_platform() CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON" fi if [ -z "${SHOW_PROGRESS}" ]; then - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 >package_installation.log + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 >package_installation.log else - cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log + cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=ON ${CMAKE_OPTS} $CGAL_DIR 2>&1 |tee package_installation.log fi LIST_TEST_FILE="${CGAL_ROOT}/list_test_packages" if [ -f ${LIST_TEST_FILE} ]; then From aa743e574b0364bed0bd2ca4afcf2a989da57a9c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Mar 2019 10:39:37 +0100 Subject: [PATCH 141/271] Set CMAKE_VERBOSE_MAKEFILE That will allow to see the compilation commands. --- Scripts/developer_scripts/run_testsuite_with_cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_cmake b/Scripts/developer_scripts/run_testsuite_with_cmake index dc23bc51c09..26cb5cc0593 100644 --- a/Scripts/developer_scripts/run_testsuite_with_cmake +++ b/Scripts/developer_scripts/run_testsuite_with_cmake @@ -261,7 +261,7 @@ run_test_on_platform() fi cmake ${INIT_FILE:+"-C${INIT_FILE}"} '${CMAKE_GENERATOR}' -DBUILD_TESTING=OFF -DWITH_tests=OFF -DWITH_CGAL_Qt5=OFF -DCGAL_HEADER_ONLY=ON $CGAL_DIR>installation.log 2>&1 rm CMakeCache.txt - CMAKE_OPTS="-DCGAL_TEST_SUITE=ON" + CMAKE_OPTS="-DCGAL_TEST_SUITE=ON -DCMAKE_VERBOSE_MAKEFILE=ON" if [ -n "${SCRIPTS_DIR}" ]; then CMAKE_OPTS="${CMAKE_OPTS} -DWITH_examples=ON -DWITH_demos=ON" fi From 5ef409f74eb9de9fbed7a8553f1fffd1be668c2c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Mar 2019 10:40:02 +0100 Subject: [PATCH 142/271] Propagate flags (like -x) to one bash to another --- Scripts/developer_scripts/autotest_cgal_with_ctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/autotest_cgal_with_ctest b/Scripts/developer_scripts/autotest_cgal_with_ctest index c089047069a..cd954740e7d 100755 --- a/Scripts/developer_scripts/autotest_cgal_with_ctest +++ b/Scripts/developer_scripts/autotest_cgal_with_ctest @@ -278,7 +278,7 @@ for HOST in ${BUILD_HOSTS}; do docker run --rm -t -e HOST="${HOST}" -v ${CGAL_ROOT}/ssh:/tmp_ssh -v ${DEPS_DIR}:/deps -v ${CGAL_ROOT}:/cgal_root -v${CGAL_DIR}:/cgal_root/CGAL-git cgal/testsuite-docker:debian-stable-cross-compilation-for-arm fi else - HOST=$HOST bash ${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/run_testsuite_with_cmake + HOST=$HOST bash -$- ${CGAL_DIR}/${SCRIPTS_DIR}developer_scripts/run_testsuite_with_cmake fi done From bc6954af018b6f7cdc22f5e8e5f0da4ad8ee6f46 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Mar 2019 10:49:00 +0100 Subject: [PATCH 143/271] Fix an error in Fedora RPM ``` CGAL-devel.x86_64: E: zero-length /usr/lib64/cmake/CGAL/config/support/test_syntaxonly.cpp ``` https://taskotron.fedoraproject.org/artifacts/all/bf72d02c-4aff-11e9-a48a-525400fc9f92/tests.yml/CGAL-4.14-0.1beta2.fc30.log --- Installation/cmake/modules/config/support/test_syntaxonly.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Installation/cmake/modules/config/support/test_syntaxonly.cpp b/Installation/cmake/modules/config/support/test_syntaxonly.cpp index e69de29bb2d..237c8ce1817 100644 --- a/Installation/cmake/modules/config/support/test_syntaxonly.cpp +++ b/Installation/cmake/modules/config/support/test_syntaxonly.cpp @@ -0,0 +1 @@ +int main() {} From 15d74af234a54b665d3f48e6406604cf6b6e8f5f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Mar 2019 10:49:31 +0100 Subject: [PATCH 144/271] Bump the SONAME of libCGAL_Qt5.so ``` ABI changes between build CGAL-4.14-0.1beta2.fc30 and its latest stable build ================================================================================ This file contains possible ABI changes which have occurred due to this package update against latest stable build available in koji for the given Fedora release. If you want to filter out these kind of ABI changes in the future, you can add a proper .abignore file to this package. To know more about how to write one, please look at the wiki page https://fedoraproject.org/wiki/Taskotron/Tasks/dist.abicheck#filtering . On armv7hl architecture ************************* * No ABI change between: CGAL-devel-4.13-3.fc30.armv7hl.rpm CGAL-devel-4.14-0.1beta2.fc30.armv7hl.rpm ABI comparison took 8.88 second(s). * ABI changes found between: CGAL-4.13-3.fc30.armv7hl.rpm CGAL-4.14-0.1beta2.fc30.armv7hl.rpm ABI comparison took 11.54 second(s). Please review them. ================ changes of 'libCGAL_Qt5.so.13.0.2'=============== Functions changes summary: 0 Removed, 1 Changed, 0 Added function Variables changes summary: 0 Removed, 0 Changed, 0 Added variable 1 function with some indirect sub-type change: [C]'method CGAL::Qt::DemosMainWindow::DemosMainWindow(QWidget*, Qt::WindowFlags)' at DemosMainWindow_impl.h:62:1 has some indirect sub-type changes: return type changed: in pointed to type 'class CGAL::Qt::DemosMainWindow' at DemosMainWindow.h:52:1: type size changed from 544 to 608 (in bits) 1 data member insertion: 'QSettings CGAL::Qt::DemosMainWindow::settings', at offset 544 (in bits) at DemosMainWindow.h:129:1 ================ end of changes of 'libCGAL_Qt5.so.13.0.2'=============== Removed binaries: /usr/lib/libCGAL_ImageIO.so.13.0.2, SONAME: libCGAL_ImageIO.so.13 Added binaries: /usr/lib/libCGAL_ImageIO.so.14.0.0, SONAME: libCGAL_ImageIO.so.14 * No ABI change between: CGAL-demos-source-4.13-3.fc30.armv7hl.rpm CGAL-demos-source-4.14-0.1beta2.fc30.armv7hl.rpm ABI comparison took 8.67 second(s). ``` https://taskotron.fedoraproject.org/artifacts/all/bfca5e3c-4aff-11e9-b891-525400fc9f92/tests.yml/CGAL-4.14-0.1beta2.fc30.log --- Installation/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 0a1e33d64ab..18133ff36fc 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -367,13 +367,16 @@ endif() # CGAL-4.11 : 13.0.1 (Nothing different in CGAL compiled libraries.) # CGAL-4.12 : 13.0.2 (Nothing different in CGAL compiled libraries.) # CGAL-4.14 : 14.0.0 , but only for CGAL_ImageIO (ABI broken in CGAL::Image_3.) -# CGAL-4.14 : 13.0.3 , for other libraries +# and for CGAL_Qt5 (ABI broken in DemoMainWindow) +# CGAL-4.14 : 13.0.3 , for other libraries # ¹) According to http://upstream-tracker.org/versions/cgal.html set( CGAL_SONAME_VERSION "13" ) set( CGAL_SOVERSION "13.0.3" ) set( CGAL_ImageIO_SONAME_VERSION "14" ) set( CGAL_ImageIO_SOVERSION "14.0.0" ) +set( CGAL_Qt5_SONAME_VERSION "14" ) +set( CGAL_Qt5_SOVERSION "14.0.0" ) message( STATUS "CGAL_SONAME_VERSION=${CGAL_SONAME_VERSION}" ) message( STATUS "CGAL_SOVERSION =${CGAL_SOVERSION}" ) From a43b0a3919269920f74b9d7a57a546bf518a5f00 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Mar 2019 11:18:05 +0100 Subject: [PATCH 145/271] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index fdb08e77281..0d5951affc4 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -23,9 +23,9 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --beta 2 --do-it || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --beta 3 --do-it || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --public --beta 2 --do-it || echo ERROR +0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --public --beta 3 --do-it || echo ERROR # from branch 4.13 #0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.13-branch && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.13-branch.git --public --do-it || echo ERROR # from branch 4.12 From ab534c5e6057e6f2d2488cd965105b0231ac2065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 26 Mar 2019 14:45:06 +0100 Subject: [PATCH 146/271] use relative path --- Documentation/doc/scripts/generate_how_to_cite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/scripts/generate_how_to_cite.py b/Documentation/doc/scripts/generate_how_to_cite.py index 1167b885ae0..75602d98a19 100644 --- a/Documentation/doc/scripts/generate_how_to_cite.py +++ b/Documentation/doc/scripts/generate_how_to_cite.py @@ -118,7 +118,7 @@ def gen_txt_entry(title, authors, bib, anchor,k): In %CGAL User and Reference Manual. %CGAL Editorial Board,\n\ ${CGAL_CREATED_VERSION_NUM} edition, ${CGAL_BUILD_YEAR4}.\n\ [ bib | \n\ -http ]\n\ +http ]\n\ \n\ \n\ \n\n\n" From 387843d94657fd0d352f67b49e791908e8ca3b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 26 Mar 2019 14:45:17 +0100 Subject: [PATCH 147/271] Ignore -Ic-XXX for the version in the doc --- Documentation/doc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index 0ecafab9f7c..1069aa996cb 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -256,7 +256,7 @@ if (NOT CGAL_CREATED_VERSION_NUM) #read version.h and get the line with CGAL_VERSION file(STRINGS "${CGAL_ROOT}/include/CGAL/version.h" CGAL_VERSION_LINE REGEX "CGAL_VERSION ") #extract release id - string(REGEX MATCH "[0-9]+\\.[0-9]+\\.?[0-9]*(-Ic-)?[0-9]*" CGAL_CREATED_VERSION_NUM "${CGAL_VERSION_LINE}") + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.?[0-9]*" CGAL_CREATED_VERSION_NUM "${CGAL_VERSION_LINE}") endif() endif() From 49a109fa363299753dab7816eb541f12baa7e00b Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Mar 2019 15:06:40 +0100 Subject: [PATCH 148/271] Add a button to enable clipping 2D to avoid conflict with selection --- .../Plugins/PCA/Clipping_box_plugin.cpp | 21 ++++++++++--- .../Plugins/PCA/Clipping_box_widget.ui | 31 ++++++++++++++++--- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp index 49a7bd3e090..0b51141785a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp @@ -70,16 +70,23 @@ void Clipping_box_plugin::init(QMainWindow* mainWindow, CGAL::Three::Scene_inter scene = scene_interface; mw = mainWindow; actionClipbox = new QAction(tr("Create Clipping Box"), mainWindow); - connect(actionClipbox, SIGNAL(triggered()), - this, SLOT(clipbox())); dock_widget = new ClipWidget("Clip box", mw); dock_widget->setVisible(false); // do not show at the beginning addDockWidget(dock_widget); + + + connect(actionClipbox, &QAction::triggered, + this, [this](){ + dock_widget->show(); + dock_widget->raise(); + tab_change(); + }); connect(dock_widget->pushButton, SIGNAL(toggled(bool)), this, SLOT(clip(bool))); CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); + viewer->installEventFilter(this); item = NULL; visualizer = NULL; @@ -95,8 +102,6 @@ void Clipping_box_plugin::clipbox() return; } QApplication::setOverrideCursor(Qt::WaitCursor); - dock_widget->show(); - dock_widget->raise(); if(!item) item = new Scene_edit_box_item(scene); connect(item, SIGNAL(destroyed()), @@ -121,6 +126,10 @@ void Clipping_box_plugin::clipbox() item->setRenderingMode(FlatPlusEdges); CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); viewer->installEventFilter(item); + connect(dock_widget->clipButton, &QPushButton::toggled, + dock_widget->clipButton, [viewer](){ + viewer->setFocus(); + }); scene->addItem(item); actionClipbox->setEnabled(false); @@ -207,7 +216,8 @@ void Clipping_box_plugin::tab_change() bool Clipping_box_plugin::eventFilter(QObject *, QEvent *event) { static QImage background; - if (dock_widget->isHidden() || !(dock_widget->isActiveWindow()) || dock_widget->tabWidget->currentIndex() != 1) + if (dock_widget->isHidden() || !(dock_widget->isActiveWindow()) || dock_widget->tabWidget->currentIndex() != 1 + || (dock_widget->tabWidget->currentIndex() == 1 && !dock_widget->clipButton->isChecked())) return false; if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) @@ -317,6 +327,7 @@ bool Clipping_box_plugin::eventFilter(QObject *, QEvent *event) { viewer->enableClippingBox(planes); dock_widget->unclipButton->setEnabled(true); + dock_widget->clipButton->setChecked(false); visualizer = NULL; QApplication::restoreOverrideCursor(); static_cast(viewer)->set2DSelectionMode(false); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui index 220fa76978a..7c79e142124 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_widget.ui @@ -100,6 +100,16 @@ + + + + Clip + + + true + + + @@ -141,11 +151,22 @@ - - - Info: SHIFT+Click to clip. - - + + + + + Info: SHIFT+Click to clip + + + + + + + While "Clip" is toggled. + + + + From 2a261c1d2f2862859c4e69b790c618f2a964b435 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Mar 2019 15:24:28 +0100 Subject: [PATCH 149/271] Fix event filter problems --- .../Plugins/PCA/Clipping_box_plugin.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp index 0b51141785a..b2cc16bce70 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp @@ -87,7 +87,6 @@ void Clipping_box_plugin::init(QMainWindow* mainWindow, CGAL::Three::Scene_inter CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); - viewer->installEventFilter(this); item = NULL; visualizer = NULL; shift_pressing = false; @@ -103,7 +102,10 @@ void Clipping_box_plugin::clipbox() } QApplication::setOverrideCursor(Qt::WaitCursor); if(!item) + { item = new Scene_edit_box_item(scene); + CGAL::QGLViewer::QGLViewerPool().first()->installEventFilter(item); + } connect(item, SIGNAL(destroyed()), this, SLOT(enableAction())); connect(item, &Scene_edit_box_item::aboutToBeDestroyed, @@ -116,7 +118,7 @@ void Clipping_box_plugin::clipbox() this, [this](){ dock_widget->unclipButton->setDisabled(true); CGAL::Three::Viewer_interface* viewer = static_cast( - *CGAL::QGLViewer::QGLViewerPool().begin()); + CGAL::QGLViewer::QGLViewerPool().first()); viewer->disableClippingBox(); viewer->update(); }); @@ -125,11 +127,6 @@ void Clipping_box_plugin::clipbox() item->setName("Clipping box"); item->setRenderingMode(FlatPlusEdges); CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); - viewer->installEventFilter(item); - connect(dock_widget->clipButton, &QPushButton::toggled, - dock_widget->clipButton, [viewer](){ - viewer->setFocus(); - }); scene->addItem(item); actionClipbox->setEnabled(false); @@ -205,6 +202,12 @@ void Clipping_box_plugin::tab_change() item = NULL; } action->setChecked(true); + CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); + connect(dock_widget->clipButton, &QPushButton::toggled, + this, [this, viewer](){ + viewer->setFocus(); + viewer->installEventFilter(this); + }); } else { From 1bd785ae44983dedee816e8ba1181260262fcb82 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 26 Mar 2019 15:30:34 +0100 Subject: [PATCH 150/271] Don't select clipped points --- .../Plugins/PCA/Clipping_box_plugin.cpp | 3 -- .../Point_set/Point_set_selection_plugin.cpp | 34 +++++++++++++++++++ Polyhedron/demo/Polyhedron/Viewer.cpp | 10 ++++++ Polyhedron/demo/Polyhedron/Viewer.h | 2 ++ Three/include/CGAL/Three/Viewer_interface.h | 2 ++ 5 files changed, 48 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp index b2cc16bce70..a7209a9ac8d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Clipping_box_plugin.cpp @@ -85,8 +85,6 @@ void Clipping_box_plugin::init(QMainWindow* mainWindow, CGAL::Three::Scene_inter connect(dock_widget->pushButton, SIGNAL(toggled(bool)), this, SLOT(clip(bool))); - CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); - item = NULL; visualizer = NULL; shift_pressing = false; @@ -126,7 +124,6 @@ void Clipping_box_plugin::clipbox() this, &Clipping_box_plugin::tab_change); item->setName("Clipping box"); item->setRenderingMode(FlatPlusEdges); - CGAL::QGLViewer* viewer = *CGAL::QGLViewer::QGLViewerPool().begin(); scene->addItem(item); actionClipbox->setEnabled(false); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp index f7623c9baba..5d6ac03f74f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp @@ -568,6 +568,31 @@ protected: } protected Q_SLOTS: + + bool is_inside(QVector4D* box, const Kernel::Point_3& p) + { + if(!static_cast(CGAL::QGLViewer::QGLViewerPool().first())->isClipping()){ + return true; + } + double x = p.x(), + y = p.y(), + z = p.z(); + + if(box[0][0]*x+box[0][1]*y+box[0][2]*z+box[0][3]>0) + return false; + if(box[1][0]*x+box[1][1]*y+box[1][2]*z+box[1][3]>0) + return false; + if(box[2][0]*x+box[2][1]*y+box[2][2]*z+box[2][3]>0) + return false; + if(box[3][0]*x+box[3][1]*y+box[3][2]*z+box[3][3]>0) + return false; + if(box[4][0]*x+box[4][1]*y+box[4][2]*z+box[4][3]>0) + return false; + if(box[5][0]*x+box[5][1]*y+box[5][2]*z+box[5][3]>0) + return false; + return true; + } + void select_points() { Scene_points_with_normal_item* point_set_item = getSelectedItem(); @@ -604,6 +629,15 @@ protected Q_SLOTS: [&] (const Point_set::Index& idx) -> bool { return !selected_bitmap[idx]; })); + QVector4D* clipbox = static_cast(viewer)->clipBox(); + for(Point_set::iterator it = points->first_selected(); + it != points->end(); + ++it) + { + if(!is_inside(clipbox, points->point(*it))) + points->unselect(*it); + } + point_set_item->invalidateOpenGLBuffers(); point_set_item->itemChanged(); } diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index 444e80d5dde..728464c6133 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -1683,5 +1683,15 @@ void Viewer::setGlPointSize(const GLfloat &p) { d->gl_point_size = p; } const GLfloat& Viewer::getGlPointSize() const { return d->gl_point_size; } +QVector4D* Viewer::clipBox() const +{ + return d->clipbox; +} + +bool Viewer::isClipping() const +{ + return d->clipping; +} + #include "Viewer.moc" diff --git a/Polyhedron/demo/Polyhedron/Viewer.h b/Polyhedron/demo/Polyhedron/Viewer.h index d86acdeb212..9e494475b05 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.h +++ b/Polyhedron/demo/Polyhedron/Viewer.h @@ -154,6 +154,8 @@ public: float total_pass()Q_DECL_OVERRIDE; const GLfloat& getGlPointSize()const Q_DECL_OVERRIDE; void setGlPointSize(const GLfloat& p) Q_DECL_OVERRIDE; + QVector4D* clipBox() const Q_DECL_OVERRIDE; + bool isClipping() const Q_DECL_OVERRIDE; }; // end class Viewer diff --git a/Three/include/CGAL/Three/Viewer_interface.h b/Three/include/CGAL/Three/Viewer_interface.h index 84a65fb7617..72c5e8cb20d 100644 --- a/Three/include/CGAL/Three/Viewer_interface.h +++ b/Three/include/CGAL/Three/Viewer_interface.h @@ -276,6 +276,8 @@ public: virtual int currentPass()const = 0; virtual bool isDepthWriting()const = 0; virtual QOpenGLFramebufferObject* depthPeelingFbo() = 0; + virtual QVector4D* clipBox() const =0; + virtual bool isClipping() const = 0; }; // end class Viewer_interface } } From 38709a737e1a09feb4662afe8657f8d1968fbdd2 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Mar 2019 09:49:46 +0100 Subject: [PATCH 151/271] Fix c3t3 reload --- Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index 949779060ef..4497dac2ceb 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -2151,6 +2151,11 @@ void Scene_c3t3_item::setAlpha(int alpha) redraw(); } -QSlider* Scene_c3t3_item::alphaSlider() { return d->alphaSlider; } +QSlider* Scene_c3t3_item::alphaSlider() { + if(!d->alphaSlider) + d->computeElements(); + return d->alphaSlider; +} + #include "Scene_c3t3_item.moc" From 71dc56756604d077e11044a39d1b440c29d18f86 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Wed, 27 Mar 2019 10:18:02 +0100 Subject: [PATCH 152/271] Integrate clipping test in selection functor --- .../Point_set/Point_set_selection_plugin.cpp | 65 +++++++++---------- 1 file changed, 30 insertions(+), 35 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp index 5d6ac03f74f..8b6f4f59a26 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Point_set_selection_plugin.cpp @@ -58,6 +58,7 @@ class Selection_test { const CGAL::qglviewer::Vec offset; Scene_edit_box_item* edit_box; Selection_visualizer* visualizer; + QVector4D* clipbox; const Ui::PointSetSelection& ui_widget; @@ -69,6 +70,7 @@ public: const CGAL::qglviewer::Vec offset, Scene_edit_box_item* edit_box, Selection_visualizer* visualizer, + QVector4D* clipbox, const Ui::PointSetSelection& ui_widget) : point_set (point_set) , selected (selected) @@ -76,6 +78,7 @@ public: , offset (offset) , edit_box (edit_box) , visualizer (visualizer) + , clipbox (clipbox) , ui_widget (ui_widget) { } @@ -91,8 +94,15 @@ public: void apply (std::size_t i) const { Point_set::Index idx = *(point_set->begin() + i); - const Kernel::Point_3& p = point_set->point (idx); + + // Points outside clipbox are not affected + if (!is_inside_clipbox (p)) + { + selected[idx] = point_set->is_selected (point_set->begin() + i); + return; + } + CGAL::qglviewer::Vec vp (p.x (), p.y (), p.z ()); bool now_selected = false; if(!ui_widget.box->isChecked()) @@ -127,6 +137,22 @@ public: selected[idx] = (already_selected && !now_selected); } } + + bool is_inside_clipbox (const Kernel::Point_3& p) const + { + if(!static_cast(CGAL::QGLViewer::QGLViewerPool().first())->isClipping()) + return true; + + double x = p.x(), y = p.y(), z = p.z(); + + return !(clipbox[0][0]*x+clipbox[0][1]*y+clipbox[0][2]*z+clipbox[0][3]>0 || + clipbox[1][0]*x+clipbox[1][1]*y+clipbox[1][2]*z+clipbox[1][3]>0 || + clipbox[2][0]*x+clipbox[2][1]*y+clipbox[2][2]*z+clipbox[2][3]>0 || + clipbox[3][0]*x+clipbox[3][1]*y+clipbox[3][2]*z+clipbox[3][3]>0 || + clipbox[4][0]*x+clipbox[4][1]*y+clipbox[4][2]*z+clipbox[4][3]>0 || + clipbox[5][0]*x+clipbox[5][1]*y+clipbox[5][2]*z+clipbox[5][3]>0); + } + }; @@ -569,30 +595,6 @@ protected: protected Q_SLOTS: - bool is_inside(QVector4D* box, const Kernel::Point_3& p) - { - if(!static_cast(CGAL::QGLViewer::QGLViewerPool().first())->isClipping()){ - return true; - } - double x = p.x(), - y = p.y(), - z = p.z(); - - if(box[0][0]*x+box[0][1]*y+box[0][2]*z+box[0][3]>0) - return false; - if(box[1][0]*x+box[1][1]*y+box[1][2]*z+box[1][3]>0) - return false; - if(box[2][0]*x+box[2][1]*y+box[2][2]*z+box[2][3]>0) - return false; - if(box[3][0]*x+box[3][1]*y+box[3][2]*z+box[3][3]>0) - return false; - if(box[4][0]*x+box[4][1]*y+box[4][2]*z+box[4][3]>0) - return false; - if(box[5][0]*x+box[5][1]*y+box[5][2]*z+box[5][3]>0) - return false; - return true; - } - void select_points() { Scene_points_with_normal_item* point_set_item = getSelectedItem(); @@ -615,7 +617,9 @@ protected Q_SLOTS: bool* selected_bitmap = new bool[points->size()]; // std::vector is not thread safe Selection_test selection_test (points, selected_bitmap, - camera, offset, edit_box, visualizer, ui_widget); + camera, offset, edit_box, visualizer, + static_cast(viewer)->clipBox(), + ui_widget); #ifdef CGAL_LINKED_WITH_TBB tbb::parallel_for(tbb::blocked_range(0, points->size()), selection_test); @@ -629,15 +633,6 @@ protected Q_SLOTS: [&] (const Point_set::Index& idx) -> bool { return !selected_bitmap[idx]; })); - QVector4D* clipbox = static_cast(viewer)->clipBox(); - for(Point_set::iterator it = points->first_selected(); - it != points->end(); - ++it) - { - if(!is_inside(clipbox, points->point(*it))) - points->unselect(*it); - } - point_set_item->invalidateOpenGLBuffers(); point_set_item->itemChanged(); } From 4353c9990059dca4a7946b4404980858aa21d045 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Mar 2019 10:32:48 +0100 Subject: [PATCH 153/271] WIP --- Number_types/include/CGAL/FPU.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index eb2ddcc9c09..c3ff1df1f4d 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -383,7 +383,8 @@ typedef unsigned int FPU_CW_t; #define CGAL_FE_TOWARDZERO _RC_CHOP #define CGAL_FE_UPWARD _RC_UP #define CGAL_FE_DOWNWARD _RC_DOWN - +# elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__ +//to do #else // This is a version following the ISO C99 standard, which aims at portability. // The drawbacks are speed on one hand, and also, on x86, it doesn't fix the From 0ed39cabcab9cb58397507acfbca7e6d27e7b793 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 27 Mar 2019 15:28:47 +0100 Subject: [PATCH 154/271] Add support for arm archs in FPU.h --- Number_types/include/CGAL/FPU.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index c3ff1df1f4d..e6d51192fab 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -383,8 +383,23 @@ typedef unsigned int FPU_CW_t; #define CGAL_FE_TOWARDZERO _RC_CHOP #define CGAL_FE_UPWARD _RC_UP #define CGAL_FE_DOWNWARD _RC_DOWN -# elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__ -//to do +# elif defined __arm__ +#define CGAL_IA_SETFPCW(CW) asm volatile ("VMSR FPSCR, %0" : :"r" (CW)) +#define CGAL_IA_GETFPCW(CW) asm volatile ("VMRS %0, FPSCR" : "=r" (CW)); CW &= CGAL_FE_TOWARDZERO +typedef unsigned int FPU_CW_t; +#define CGAL_FE_TONEAREST (0x0) +#define CGAL_FE_TOWARDZERO (0xC00000) +#define CGAL_FE_UPWARD (0x400000) +#define CGAL_FE_DOWNWARD (0x800000) +# elif defined __aarch64__ +#define CGAL_IA_SETFPCW(CW) asm volatile ("MSR FPCR, %0" : :"r" (CW)) +#define CGAL_IA_GETFPCW(CW) asm volatile ("MRS %0, FPCR" : "=r" (CW)) +typedef unsigned int FPU_CW_t; +#define CGAL_FE_TONEAREST (0x0) +#define CGAL_FE_TOWARDZERO (0xC00000) +#define CGAL_FE_UPWARD (0x400000) +#define CGAL_FE_DOWNWARD (0x800000) + #else // This is a version following the ISO C99 standard, which aims at portability. // The drawbacks are speed on one hand, and also, on x86, it doesn't fix the From 87f08a79ff873d739f56f17a6cc0e0661082009b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 27 Mar 2019 16:47:10 +0100 Subject: [PATCH 155/271] Add point/segment distance to the Projection_traits so that it can be used in Polyline_simplification_2 --- .../simplify_terrain.cin | 1 + .../simplify_terrain.cpp | 50 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cin create mode 100644 Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cpp diff --git a/Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cin b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cin new file mode 100644 index 00000000000..37ac2bedd1c --- /dev/null +++ b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cin @@ -0,0 +1 @@ +4 0 0 0 1 0 0 2 4 0 3 10 0 diff --git a/Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cpp b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cpp new file mode 100644 index 00000000000..4ba1a4d41d7 --- /dev/null +++ b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify_terrain.cpp @@ -0,0 +1,50 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +namespace PS = CGAL::Polyline_simplification_2; + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; +typedef CGAL::Projection_traits_xy_3 K; +typedef CGAL::Polygon_2 Polygon_2; + +typedef PS::Vertex_base_2 Vb; +typedef CGAL::Constrained_triangulation_face_base_2 Fb; +typedef CGAL::Triangulation_data_structure_2 TDS; +typedef CGAL::Constrained_Delaunay_triangulation_2 CDT; +typedef CGAL::Constrained_triangulation_plus_2 CT; +typedef CT::Point Point; +typedef CT::Constraint_iterator Constraint_iterator; +typedef CT::Vertices_in_constraint_iterator Vertices_in_constraint_iterator; +typedef CT::Points_in_constraint_iterator Points_in_constraint_iterator; +typedef PS::Stop_below_count_ratio_threshold Stop; +typedef PS::Squared_distance_cost Cost; + +int main() +{ + CT ct; + Polygon_2 P; + while(std::cin >> P){ + ct.insert_constraint(P); + } + PS::simplify(ct, Cost(), Stop(0.5)); + + for(Constraint_iterator cit = ct.constraints_begin(); + cit != ct.constraints_end(); + ++cit) { + std::cout << "simplified polyline" << std::endl; + for(Points_in_constraint_iterator vit = + ct.points_in_constraint_begin(*cit); + vit != ct.points_in_constraint_end(*cit); + ++vit) + std::cout << *vit << std::endl; + } + return 0; +} + + From 9cc37e137127dcce036b7dbd4f3a4a1937a4502c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 27 Mar 2019 16:52:34 +0100 Subject: [PATCH 156/271] Add a subsection in the User Manual --- Kernel_23/include/CGAL/internal/Projection_traits_3.h | 9 +++++++++ .../Polyline_simplification_2.txt | 6 ++++++ .../doc/Polyline_simplification_2/examples.txt | 1 + .../examples/Polyline_simplification_2/simplify.cpp | 4 +++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Kernel_23/include/CGAL/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/internal/Projection_traits_3.h index 67e2760cfe2..0f15a7e084f 100644 --- a/Kernel_23/include/CGAL/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/internal/Projection_traits_3.h @@ -248,6 +248,8 @@ public: typedef typename R::Point_2 Point_2; typedef typename R::Line_3 Line_3; typedef typename R::Line_2 Line_2; + typedef typename R::Segment_3 Segment_3; + typedef typename R::Segment_2 Segment_2; typedef typename R::FT RT; typename R::FT x(const Point_3 &p) const { return Projector::x(p); } typename R::FT y(const Point_3 &p) const { return Projector::y(p); } @@ -270,6 +272,13 @@ public: Line_2 l2(project(l.point(0)), project(l.point(1))); return squared_distance(p2, l2); } + + RT operator()(const Segment_3& s, const Point_3& p) const + { + Point_2 p2(project(p)); + Segment_2 s2(project(s.source()), project(s.target())); + return squared_distance(p2, s2); + } }; template diff --git a/Polyline_simplification_2/doc/Polyline_simplification_2/Polyline_simplification_2.txt b/Polyline_simplification_2/doc/Polyline_simplification_2/Polyline_simplification_2.txt index 04d89c86104..d094507e9e2 100644 --- a/Polyline_simplification_2/doc/Polyline_simplification_2/Polyline_simplification_2.txt +++ b/Polyline_simplification_2/doc/Polyline_simplification_2/Polyline_simplification_2.txt @@ -196,6 +196,12 @@ At the end we remove the points that were kept from the constraints. \cgalExample{Polyline_simplification_2/points_and_vertices.cpp} +\subsection Subsection_PolylineSimplification_Terrain Simplification of a Terrain + +It is possible to use the class `Projection_traits_xy_3` in order to simplify polylines in space. +Note that the segment length is computed in the xy-plane, and the polyline must not have any vertical segment. + +\cgalExample{Polyline_simplification_2/simplify_terrain.cpp} \section Section_PolylineSimplification_History Design and Implementation History diff --git a/Polyline_simplification_2/doc/Polyline_simplification_2/examples.txt b/Polyline_simplification_2/doc/Polyline_simplification_2/examples.txt index de187d52b28..a0713d4fd20 100644 --- a/Polyline_simplification_2/doc/Polyline_simplification_2/examples.txt +++ b/Polyline_simplification_2/doc/Polyline_simplification_2/examples.txt @@ -1,5 +1,6 @@ /*! \example Polyline_simplification_2/simplify_polygon.cpp \example Polyline_simplification_2/simplify.cpp +\example Polyline_simplification_2/simplify_terrain.cpp \example Polyline_simplification_2/points_and_vertices.cpp */ diff --git a/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp index 2e87701e7ba..4ba1a4d41d7 100644 --- a/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp +++ b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -8,7 +9,8 @@ namespace PS = CGAL::Polyline_simplification_2; -typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; +typedef CGAL::Projection_traits_xy_3 K; typedef CGAL::Polygon_2 Polygon_2; typedef PS::Vertex_base_2 Vb; From 1b94dd4189e3f4639533f7d7639225bc19232637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 27 Mar 2019 17:12:37 +0100 Subject: [PATCH 157/271] fix the last non-relative link --- Documentation/doc/scripts/generate_how_to_cite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/scripts/generate_how_to_cite.py b/Documentation/doc/scripts/generate_how_to_cite.py index 75602d98a19..a791dc3dcb9 100644 --- a/Documentation/doc/scripts/generate_how_to_cite.py +++ b/Documentation/doc/scripts/generate_how_to_cite.py @@ -66,7 +66,7 @@ The %CGAL Project. %CGAL User and Reference Manual. %CGAL Editorial Board, ${CGAL_CREATED_VERSION_NUM} edition, ${CGAL_BUILD_YEAR4}. [ bib | -http ] +http ] From a3f24a1f6eb6c2a740531bac1187111ae915e582 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 27 Mar 2019 17:22:47 +0100 Subject: [PATCH 158/271] Restore simplifiy.cpp --- .../examples/Polyline_simplification_2/simplify.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp index 4ba1a4d41d7..2e87701e7ba 100644 --- a/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp +++ b/Polyline_simplification_2/examples/Polyline_simplification_2/simplify.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -9,8 +8,7 @@ namespace PS = CGAL::Polyline_simplification_2; -typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; -typedef CGAL::Projection_traits_xy_3 K; +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Polygon_2 Polygon_2; typedef PS::Vertex_base_2 Vb; From 310ce89b9161d0f788e322c23b064884d6ce4b70 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Mar 2019 17:51:24 +0100 Subject: [PATCH 159/271] Fix the order of link when GMP is a static lib --- Installation/cmake/modules/CGAL_SetupGMP.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake index b41c2f59334..9e1824220b4 100644 --- a/Installation/cmake/modules/CGAL_SetupGMP.cmake +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -61,7 +61,6 @@ function(use_CGAL_GMP_support target) $ $) endif() - target_link_libraries(${target} ${keyword} ${GMP_LIBRARIES}) if(NOT MPFR_IN_CGAL_AUXILIARY) target_include_directories(${target} SYSTEM ${keyword} ${MPFR_INCLUDE_DIR}) else() @@ -69,7 +68,7 @@ function(use_CGAL_GMP_support target) $ $) endif() - target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES}) + target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) if(WITH_GMPXX OR CGAL_WITH_GMPXX) target_include_directories(${target} SYSTEM ${keyword} ${GMPXX_INCLUDE_DIR}) target_link_libraries(${target} ${keyword} ${GMPXX_LIBRARIES}) From e9f36ff5571a0dcb06f912737fa77f7f3521ebd0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Mar 2019 18:03:07 +0100 Subject: [PATCH 160/271] Prepare for CGAL-4.14-beta4 --- Installation/include/CGAL/version.h | 4 ++-- Maintenance/release_building/public_release_name | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index fa2f8d2cbb9..614c578d565 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -25,8 +25,8 @@ #ifndef CGAL_VERSION_H #define CGAL_VERSION_H -#define CGAL_VERSION 4.14-beta3 -#define CGAL_VERSION_NR 1041400930 +#define CGAL_VERSION 4.14-beta4 +#define CGAL_VERSION_NR 1041400940 #define CGAL_SVN_REVISION 99999 #define CGAL_GIT_HASH abcdef #define CGAL_RELEASE_DATE 20190313 diff --git a/Maintenance/release_building/public_release_name b/Maintenance/release_building/public_release_name index 30b65d9d225..7d4a40ab1f1 100644 --- a/Maintenance/release_building/public_release_name +++ b/Maintenance/release_building/public_release_name @@ -1 +1 @@ -CGAL-4.14-beta3 +CGAL-4.14-beta4 From 18a092fc68cddae2a7f232d8697f6a5c92e4958f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Mar 2019 18:03:55 +0100 Subject: [PATCH 161/271] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 0d5951affc4..fd9a2a321b7 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -23,9 +23,9 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --beta 3 --do-it || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --beta 4 --do-it || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --public --beta 3 --do-it || echo ERROR +0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --public --beta 4 --do-it || echo ERROR # from branch 4.13 #0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.13-branch && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.13-branch.git --public --do-it || echo ERROR # from branch 4.12 From 1aee92af751a7021c64082c69dfd2ca6c569c67c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Mar 2019 18:46:20 +0100 Subject: [PATCH 162/271] Fix the name of the macro Thanks Marc! --- Number_types/include/CGAL/FPU.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index e6d51192fab..9a6591d3259 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -383,7 +383,7 @@ typedef unsigned int FPU_CW_t; #define CGAL_FE_TOWARDZERO _RC_CHOP #define CGAL_FE_UPWARD _RC_UP #define CGAL_FE_DOWNWARD _RC_DOWN -# elif defined __arm__ +# elif defined __VFP_FP__ #define CGAL_IA_SETFPCW(CW) asm volatile ("VMSR FPSCR, %0" : :"r" (CW)) #define CGAL_IA_GETFPCW(CW) asm volatile ("VMRS %0, FPSCR" : "=r" (CW)); CW &= CGAL_FE_TOWARDZERO typedef unsigned int FPU_CW_t; From 42cbce9fbf9ad3becb5d1c20ee2eb106b1de7c61 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Mar 2019 08:55:49 +0100 Subject: [PATCH 163/271] Be aware of __SOFTFP__ --- Number_types/include/CGAL/FPU.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 9a6591d3259..929687eec74 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -383,7 +383,7 @@ typedef unsigned int FPU_CW_t; #define CGAL_FE_TOWARDZERO _RC_CHOP #define CGAL_FE_UPWARD _RC_UP #define CGAL_FE_DOWNWARD _RC_DOWN -# elif defined __VFP_FP__ +# elif defined __VFP_FP__ && !defined __SOFTFP__ #define CGAL_IA_SETFPCW(CW) asm volatile ("VMSR FPSCR, %0" : :"r" (CW)) #define CGAL_IA_GETFPCW(CW) asm volatile ("VMRS %0, FPSCR" : "=r" (CW)); CW &= CGAL_FE_TOWARDZERO typedef unsigned int FPU_CW_t; From 4b7cc4a896f1ed3f1047b96bb5f90646970aba4a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Mar 2019 09:04:03 +0100 Subject: [PATCH 164/271] Fix the order of link of GMPXX when GMP is a static library. --- Installation/cmake/modules/CGAL_SetupGMP.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake index 9e1824220b4..0cfe429e48e 100644 --- a/Installation/cmake/modules/CGAL_SetupGMP.cmake +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -68,10 +68,10 @@ function(use_CGAL_GMP_support target) $ $) endif() - target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) if(WITH_GMPXX OR CGAL_WITH_GMPXX) target_include_directories(${target} SYSTEM ${keyword} ${GMPXX_INCLUDE_DIR}) target_link_libraries(${target} ${keyword} ${GMPXX_LIBRARIES}) target_compile_definitions(${target} ${keyword} CGAL_USE_GMPXX=1) endif() + target_link_libraries(${target} ${keyword} ${MPFR_LIBRARIES} ${GMP_LIBRARIES}) endfunction() From fc5e966c209b7afe3a8d2cb4d821cd06f34b043d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Mar 2019 10:33:39 +0100 Subject: [PATCH 165/271] Simplify the AABB_primitive used in Polyhedral_mesh_donain_3 --- .../include/CGAL/Polyhedral_mesh_domain_3.h | 51 +++---------------- 1 file changed, 7 insertions(+), 44 deletions(-) diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 1e8ce9546e0..c34aa4a5413 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -211,59 +211,22 @@ public: BOOST_MPL_HAS_XXX_TRAIT_DEF(HalfedgeDS) - template - struct Primitive { - typedef typename boost::graph_traits

::face_descriptor face_descriptor_t; - - face_descriptor_t face_descriptor; - const P* graph; - - typedef Triangle_from_face_descriptor_map

Triangle_pmap; - typedef One_point_from_face_descriptor_map

Point_pmap; - - typedef typename Triangle_pmap::value_type Datum; - typedef typename Point_pmap::value_type Point; - typedef Primitive Id; - - Primitive() : face_descriptor(), graph() {} - - template - Primitive(IndexIterator it, const P& polyhedron) - : face_descriptor(*it), graph(&polyhedron) - {} - - bool operator==(const Primitive& other) const { - return other.face_descriptor == this->face_descriptor - && other.graph == this->graph; - } - - Datum datum() const { - return get(Triangle_pmap(graph), face_descriptor); - } - - Point reference_point() const { - return get(Point_pmap(graph), face_descriptor); - } - - Id id() const { - return *this; - } - }; // Primitive template, for face graphs - template ::value> struct Primitive_type { - typedef Primitive

type; + //setting OneFaceGraphPerTree to false transforms the id type into + //std::pair. + typedef AABB_face_graph_triangle_primitive::type, CGAL::Tag_false> type; static typename IGT_::Triangle_3 datum(const typename type::Id primitive_id) { - CGAL::Triangle_from_face_descriptor_map

pmap(primitive_id.graph); - return get(pmap, primitive_id.face_descriptor); + CGAL::Triangle_from_face_descriptor_map

pmap(primitive_id.second); + return get(pmap, primitive_id.first); } static Surface_patch_index get_index(const typename type::Id primitive_id) { return get(get(face_patch_id_t(), - *primitive_id.graph), - primitive_id.face_descriptor); + *primitive_id.second), + primitive_id.first); } }; // Primitive_type (for non-Polyhedron_3) From ec00f50eec73c91fda330be457cc796ce17ebd8f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 28 Mar 2019 11:28:02 +0100 Subject: [PATCH 166/271] Use the same primitive type for polyhedron_3 and other types --- .../include/CGAL/Polyhedral_mesh_domain_3.h | 38 +------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index c34aa4a5413..29c4d3d38ba 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -211,7 +211,7 @@ public: BOOST_MPL_HAS_XXX_TRAIT_DEF(HalfedgeDS) - template ::value> + template struct Primitive_type { //setting OneFaceGraphPerTree to false transforms the id type into //std::pair. @@ -230,41 +230,7 @@ public: } }; // Primitive_type (for non-Polyhedron_3) - template struct Primitive_type { - typedef AABB_face_graph_triangle_primitive

type; - - static - typename IGT_::Triangle_3 datum(const typename type::Id face_handle) { - typedef typename IGT_::Point_3 Point; - const Point& a = face_handle->halfedge()->vertex()->point(); - const Point& b = face_handle->halfedge()->next()->vertex()->point(); - const Point& c = face_handle->halfedge()->next()->next()->vertex()->point(); - return typename IGT_::Triangle_3(a,b,c); - } - - static Surface_patch_index get_index(const typename type::Id face_handle, - Tag_false) - { - typename boost::property_map >::type pmap; - return get(pmap, face_handle); - } - - static Surface_patch_index get_index(const typename type::Id, - Tag_true) - { - return Surface_patch_index(0,1); - } - - static Surface_patch_index get_index(const typename type::Id face_handle) - { - namespace m = boost::mpl; - return get_index(face_handle, - Boolean_tag, - boost::is_same - >::value>()); - } - }; // Primitive_type specialized for CGAL::Polyehdron_3 - + public: typedef typename Primitive_type::type Ins_fctor_primitive; typedef CGAL::AABB_traits Ins_fctor_traits; From cdd2231e8abde4f9474afb36b4798b95637fc479 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 28 Mar 2019 16:02:06 +0100 Subject: [PATCH 167/271] add two missing 's' (there was no link on these in the doc) --- .../Concepts/MeshComplexWithFeatures_3InTriangulation_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshComplexWithFeatures_3InTriangulation_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshComplexWithFeatures_3InTriangulation_3.h index e5d8ab489a2..c3b16a83d3f 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshComplexWithFeatures_3InTriangulation_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshComplexWithFeatures_3InTriangulation_3.h @@ -203,7 +203,7 @@ Edges_in_complex_iterator edges_in_complex_begin() const; Returns the past-the-end iterator for the above iterator. */ -Edge_in_complex_iterator edges_in_complex_end() const; +Edges_in_complex_iterator edges_in_complex_end() const; /*! @@ -216,7 +216,7 @@ Edges_in_complex_iterator edges_in_complex_begin(Curve_index index) const; Returns the past-the-end iterator for the above iterator. */ -Edge_in_complex_iterator edges_in_complex_end(Curve_index index) const; +Edges_in_complex_iterator edges_in_complex_end(Curve_index index) const; /*! From 99ca804f6dbe2ce8bcc3fb63c46ba97dbecf473f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Mar 2019 16:45:09 +0100 Subject: [PATCH 168/271] Maybe tonight's internal release will be CGAL-4.14 final --- Installation/include/CGAL/version.h | 6 +++--- Maintenance/release_building/public_release_name | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 614c578d565..d2af226f998 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -25,11 +25,11 @@ #ifndef CGAL_VERSION_H #define CGAL_VERSION_H -#define CGAL_VERSION 4.14-beta4 -#define CGAL_VERSION_NR 1041400940 +#define CGAL_VERSION 4.14 +#define CGAL_VERSION_NR 1041400950 #define CGAL_SVN_REVISION 99999 #define CGAL_GIT_HASH abcdef -#define CGAL_RELEASE_DATE 20190313 +#define CGAL_RELEASE_DATE 20190329 #include diff --git a/Maintenance/release_building/public_release_name b/Maintenance/release_building/public_release_name index 7d4a40ab1f1..cc65a091f7a 100644 --- a/Maintenance/release_building/public_release_name +++ b/Maintenance/release_building/public_release_name @@ -1 +1 @@ -CGAL-4.14-beta4 +CGAL-4.14 From 9aaa894219771c8337629d64732e6ac456e7e781 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 28 Mar 2019 16:46:46 +0100 Subject: [PATCH 169/271] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index fd9a2a321b7..9a4e7ccb95a 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -23,9 +23,9 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --beta 4 --do-it || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --do-it || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --public --beta 4 --do-it || echo ERROR +0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --public --do-it || echo ERROR # from branch 4.13 #0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.13-branch && /usr/bin/time $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.13-branch.git --public --do-it || echo ERROR # from branch 4.12 From 2a4d1abefa540052ad745e8164565fbc70bf5f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 28 Mar 2019 17:30:48 +0100 Subject: [PATCH 170/271] Fixed not reseting edge property when a new element reuses memory --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 39437aff178..f0cc9545228 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -879,6 +879,7 @@ public: --removed_edges_; eremoved_[Edge_index(Halfedge_index(idx))] = false; hprops_.reset(Halfedge_index(idx)); + eprops_.reset(Edge_index(Halfedge_index(idx))); return Halfedge_index(idx); } else { eprops_.push_back(); From 676983ad941700018032bfac4fb3b10159570300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 28 Mar 2019 18:16:08 +0100 Subject: [PATCH 171/271] also reset the property of the opposite halfedge --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index f0cc9545228..a8772b55086 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -879,6 +879,7 @@ public: --removed_edges_; eremoved_[Edge_index(Halfedge_index(idx))] = false; hprops_.reset(Halfedge_index(idx)); + hprops_.reset(opposite(Halfedge_index(idx))); eprops_.reset(Edge_index(Halfedge_index(idx))); return Halfedge_index(idx); } else { From affaa1932786e5b0ca7c15ed773dbaa672a48acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 12:10:44 +0100 Subject: [PATCH 172/271] remove workaround for non support of variadic template --- AABB_tree/include/CGAL/AABB_traits.h | 31 -- AABB_tree/include/CGAL/AABB_tree.h | 445 ------------------ .../internal/AABB_tree/AABB_search_tree.h | 2 - 3 files changed, 478 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index a3e20752516..562062a07bf 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -60,41 +60,10 @@ template struct AABB_traits_base{ typename Primitive::Shared_data m_primitive_data; - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void set_shared_data(T&& ... t){ m_primitive_data=Primitive::construct_shared_data(std::forward(t)...); } - #else - void set_shared_data(){ - m_primitive_data=Primitive::construct_shared_data(); - } - - template - void set_shared_data(T1& t1){ - m_primitive_data=Primitive::construct_shared_data(t1); - } - - template - void set_shared_data(T1& t1, T2& t2){ - m_primitive_data=Primitive::construct_shared_data(t1,t2); - } - - template - void set_shared_data(T1& t1,T2& t2,T3& t3){ - m_primitive_data=Primitive::construct_shared_data(t1,t2,t3); - } - - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){ - m_primitive_data=Primitive::construct_shared_data(t1,t2,t3,t4); - } - - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){ - m_primitive_data=Primitive::construct_shared_data(t1,t2,t3,t4,t5); - } - #endif const typename Primitive::Shared_data& shared_data() const {return m_primitive_data;} }; diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 50600ec6944..e362bfbd969 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -126,27 +126,10 @@ namespace CGAL { * @param beyond past-the-end iterator * * It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`. - * For compilers that do not support variadic templates, overloads up to - * 5 template arguments are provided. * The tree stays empty if the memory allocation is not successful. */ - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template AABB_tree(InputIterator first, InputIterator beyond,T&& ...); - #else - template - AABB_tree(InputIterator first, InputIterator beyond); - template - AABB_tree(InputIterator first, InputIterator beyond, T1&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&); - template - AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&); - #endif /// After one or more calls to `insert()` the internal data /// structure of the tree must be reconstructed. This procedure @@ -158,26 +141,10 @@ namespace CGAL { /// data structure. /// A call to `AABBTraits::set_shared_data(t...)` /// is made using the internally stored traits. - /// For compilers that do not support variadic templates, - /// overloads up to 5 template arguments are provided. -#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void build(T&& ...); #ifndef DOXYGEN_RUNNING void build(); -#endif -#else - void build(); - template - void build(T1& t1); - template - void build(T1& t1, T2& t2); - template - void build(T1& t1, T2& t2, T3& t3); - template - void build(T1& t1, T2& t2, T3& t3, T4& t4); - template - void build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5); #endif ///@} @@ -185,25 +152,8 @@ namespace CGAL { ///@{ /// Equivalent to calling `clear()` and then `insert(first,last,t...)`. - /// For compilers that do not support variadic templates, overloads up - /// to 5 template arguments are provided. - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T&& ...); - #else - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond, T1&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&); - template - void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&,T5&); - #endif /// Add a sequence of primitives to the set of primitives of the AABB tree. @@ -212,25 +162,8 @@ namespace CGAL { /// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept /// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)` /// is made using the internally stored traits. - /// For compilers that do not support variadic templates, - /// overloads up to 5 template arguments are provided. - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void insert(InputIterator first, InputIterator beyond,T&& ...); - #else - template - void insert(InputIterator first, InputIterator beyond); - template - void insert(InputIterator first, InputIterator beyond,T1&); - template - void insert(InputIterator first, InputIterator beyond,T1&, T2&); - template - void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&); - template - void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&); - template - void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&); - #endif /// Adds a primitive to the set of primitives of the tree. inline void insert(const Primitive& p); @@ -274,7 +207,6 @@ namespace CGAL { ///@} private: - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template void set_primitive_data_impl(CGAL::Boolean_tag,T ... ){} template @@ -285,64 +217,6 @@ namespace CGAL { void set_shared_data(T&& ...t){ set_primitive_data_impl(CGAL::Boolean_tag::value>(),std::forward(t)...); } - #else - void set_primitive_data_impl(CGAL::Boolean_tag){} - void set_primitive_data_impl(CGAL::Boolean_tag) - {m_traits.set_shared_data();} - void set_shared_data(){ - set_primitive_data_impl(CGAL::Boolean_tag::value>()); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1) - {m_traits.set_shared_data(t1);} - template - void set_shared_data(T1& t1){ - set_primitive_data_impl(Boolean_tag::value>(),t1); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2) - {m_traits.set_shared_data(t1,t2);} - template - void set_shared_data(const T1& t1,const T2& t2){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2,T3){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2,T3& t3) - {m_traits.set_shared_data(t1,t2,t3);} - template - void set_shared_data(T1& t1,T2& t2,T3& t3){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2,t3); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2,T3,T4){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2,T3& t3,T4& t4) - {m_traits.set_shared_data(t1,t2,t3,t4);} - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2,t3,t4); - } - - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1,T2,T3,T4,T5){} - template - void set_primitive_data_impl(CGAL::Boolean_tag,T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - {m_traits.set_shared_data(t1,t2,t3,t4,t5);} - template - void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){ - set_primitive_data_impl(Boolean_tag::value>(),t1,t2,t3,t4,t5); - } - #endif bool build_kd_tree() const; template @@ -744,7 +618,6 @@ public: , m_need_build(false) {} - #if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) template template AABB_tree::AABB_tree(ConstPrimitiveIterator first, @@ -800,324 +673,6 @@ public: set_shared_data(std::forward(t)...); build(); } - #else - //=============constructor====================== - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2,t3); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2,t3,t4); - } - - template - template - AABB_tree::AABB_tree(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - : m_traits() - , m_primitives() - , m_p_root_node(NULL) - , m_p_search_tree(NULL) - , m_search_tree_constructed(false) - , m_default_search_tree_constructed(false) - , m_need_build(false) - { - // Insert each primitive into tree - insert(first, beyond,t1,t2,t3,t4,t5); - } - //=============insert====================== - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond) - { - set_shared_data(); - while(first != beyond) - { - m_primitives.push_back(Primitive(first)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1) - { - set_shared_data(t1); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1, T2& t2) - { - set_shared_data(t1,t2); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3) - { - set_shared_data(t1,t2,t3); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2,t3)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4) - { - set_shared_data(t1,t2,t3,t4); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2,t3,t4)); - ++first; - } - m_need_build = true; - } - - template - template - void AABB_tree::insert(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - { - set_shared_data(t1,t2,t3,t4,t5); - while(first != beyond) - { - m_primitives.push_back(Primitive(first,t1,t2,t3,t4,t5)); - ++first; - } - m_need_build = true; - } - - //=============rebuild====================== - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1, T2& t2) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2,t3); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2,t3,t4); - - build(); - } - - template - template - void AABB_tree::rebuild(ConstPrimitiveIterator first, - ConstPrimitiveIterator beyond, - T1& t1,T2& t2,T3& t3,T4& t4,T5& t5) - { - // cleanup current tree and internal KD tree - clear(); - - // inserts primitives - insert(first, beyond,t1,t2,t3,t4,t5); - - build(); - } - //overloads calling set_shared_data() - template - template - void AABB_tree::build(T1& t1) - { - set_shared_data(t1); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2) - { - set_shared_data(t1, t2); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2, T3& t3) - { - set_shared_data(t1, t2, t3); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2, T3& t3, T4& t4) - { - set_shared_data(t1, t2, t3, t4); - build(); - } - template - template - void AABB_tree::build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) - { - set_shared_data(t1, t2, t3, t4, t5); - build(); - } -#endif template void AABB_tree::insert(const Primitive& p) diff --git a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h index b02bb264fb2..214a8d2644a 100644 --- a/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h +++ b/AABB_tree/include/CGAL/internal/AABB_tree/AABB_search_tree.h @@ -65,9 +65,7 @@ namespace CGAL m_id = rhs.m_id; } -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Decorated_point& operator=(const Decorated_point&)=default; -#endif private: Id m_id; From 3cfbccd44acb70f550b7a252cbd9414d4fdb1aff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 12:25:25 +0100 Subject: [PATCH 173/271] remove workaround c++11 features in STL_extension --- .../copy_n_benchmark/copy_n_benchmark.cpp | 2 - .../copy_n_use_case_benchmark.cpp | 2 - .../include/CGAL/Compact_container.h | 156 --- .../CGAL/Concurrent_compact_container.h | 106 -- STL_Extension/include/CGAL/Handle_for.h | 39 +- .../include/CGAL/Handle_for_virtual.h | 2 - STL_Extension/include/CGAL/Object.h | 15 - STL_Extension/include/CGAL/array.h | 103 -- STL_Extension/include/CGAL/iterator.h | 1109 ----------------- STL_Extension/include/CGAL/utility.h | 29 +- .../test/STL_Extension/test_Cache.cpp | 4 +- .../test/STL_Extension/test_In_place_list.cpp | 3 - 12 files changed, 3 insertions(+), 1567 deletions(-) diff --git a/STL_Extension/benchmark/copy_n_benchmark/copy_n_benchmark.cpp b/STL_Extension/benchmark/copy_n_benchmark/copy_n_benchmark.cpp index 0ee6ec41bcc..227c8dd8bf2 100644 --- a/STL_Extension/benchmark/copy_n_benchmark/copy_n_benchmark.cpp +++ b/STL_Extension/benchmark/copy_n_benchmark/copy_n_benchmark.cpp @@ -33,7 +33,6 @@ int format_output(const char* lib, const char* container, const char* to, int n, struct std_tag {}; struct cgal_tag {}; -#ifndef CGAL_CFG_NO_CPP0X_COPY_N template inline double test(ForwardIterator it, Size n, OutputIterator result, int repeats, std_tag) { boost::timer timer; @@ -41,7 +40,6 @@ inline double test(ForwardIterator it, Size n, OutputIterator result, int repeat for (int i = 0; i < repeats; ++i) { std::copy_n(it, n, result); } return (double)n*repeats/timer.elapsed()/1.0E6; } -#endif template inline double test(ForwardIterator it, Size n, OutputIterator result, int repeats, cgal_tag) { diff --git a/STL_Extension/benchmark/copy_n_benchmark/copy_n_use_case_benchmark.cpp b/STL_Extension/benchmark/copy_n_benchmark/copy_n_use_case_benchmark.cpp index 7c6a298ee2a..60135205bad 100644 --- a/STL_Extension/benchmark/copy_n_benchmark/copy_n_use_case_benchmark.cpp +++ b/STL_Extension/benchmark/copy_n_benchmark/copy_n_use_case_benchmark.cpp @@ -51,12 +51,10 @@ int main(int argc, char* argv[]) { format_output("CGAL", generator , n, time); std::cout << "|- \n"; -#ifndef CGAL_CFG_NO_CPP0X_COPY_N timer.restart(); for (int i = 0; i < repeats; ++i) { std::copy_n( g, n, points.begin()); } time = (double)n*repeats/timer.elapsed()/1.0E6; format_output("stdlib", generator, n, time); -#endif //wiki markup footer std::cout << "|}" << std::endl; diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 2396e370e89..a0e31f23595 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -403,7 +403,6 @@ public: // Special insert methods that construct the objects in place // (just forward the arguments to the constructor, to optimize a copy). -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template < typename... Args > iterator emplace(const Args&... args) @@ -419,157 +418,6 @@ public: time_stamper->set_time_stamp(ret); return iterator(ret, 0); } -#else - // inserts a default constructed item. - iterator emplace() - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1 > - iterator - emplace(const T1 &t1) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2 > - iterator - emplace(const T1 &t1, const T2 &t2) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2, typename T3 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2, t3); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2, typename T3, typename T4 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2, t3, t4); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2, typename T3, typename T4, typename T5 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2, t3, t4, t5); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2, t3, t4, t5, t6); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6, typename T7 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2, t3, t4, t5, t6, t7); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } - - template < typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6, typename T7, typename T8 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) - { - if (free_list == NULL) - allocate_new_block(); - - pointer ret = free_list; - free_list = clean_pointee(ret); - new (ret) value_type(t1, t2, t3, t4, t5, t6, t7, t8); - CGAL_assertion(type(ret) == USED); - ++size_; - time_stamper->set_time_stamp(ret); - return iterator(ret, 0); - } -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES iterator insert(const T &t) { @@ -578,11 +426,7 @@ public: pointer ret = free_list; free_list = clean_pointee(ret); -#ifdef CGAL_CXX11 std::allocator_traits::construct(alloc, ret, t); -#else - alloc.construct(ret, t); -#endif CGAL_assertion(type(ret) == USED); ++size_; time_stamper->set_time_stamp(ret); diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index deb229b675d..5fb5401c4f1 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -306,7 +306,6 @@ public: // Special insert methods that construct the objects in place // (just forward the arguments to the constructor, to optimize a copy). -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template < typename... Args > iterator emplace(const Args&... args) @@ -316,113 +315,12 @@ public: new (ret) value_type(args...); return finalize_insert(ret, fl); } -#else - // inserts a default constructed item. - iterator emplace() - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(); - return finalize_insert(ret, fl); - } - - template < typename T1 > - iterator - emplace(const T1 &t1) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2 > - iterator - emplace(const T1 &t1, const T2 &t2) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2, typename T3 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2, t3); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2, typename T3, typename T4 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2, t3, t4); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2, typename T3, typename T4, typename T5 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2, t3, t4, t5); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2, t3, t4, t5, t6); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6, typename T7 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2, t3, t4, t5, t6, t7); - return finalize_insert(ret, fl); - } - - template < typename T1, typename T2, typename T3, typename T4, - typename T5, typename T6, typename T7, typename T8 > - iterator - emplace(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) - { - FreeList * fl = get_free_list(); - pointer ret = init_insert(fl); - new (ret) value_type(t1, t2, t3, t4, t5, t6, t7, t8); - return finalize_insert(ret, fl); - } -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES iterator insert(const T &t) { FreeList * fl = get_free_list(); pointer ret = init_insert(fl); -#ifdef CGAL_CXX11 std::allocator_traits::construct(m_alloc, ret, t); -#else - m_alloc.construct(ret, t); -#endif return finalize_insert(ret, fl); } @@ -449,11 +347,7 @@ private: CGAL_precondition(type(x) == USED); EraseCounterStrategy::increment_erase_counter(*x); -#ifdef CGAL_CXX11 std::allocator_traits::destroy(m_alloc, &*x); -#else - m_alloc.destroy(&*x); -#endif /* WE DON'T DO THAT BECAUSE OF THE ERASE COUNTER #ifndef CGAL_NO_ASSERTIONS diff --git a/STL_Extension/include/CGAL/Handle_for.h b/STL_Extension/include/CGAL/Handle_for.h index bb0774c70eb..484a45dd87b 100644 --- a/STL_Extension/include/CGAL/Handle_for.h +++ b/STL_Extension/include/CGAL/Handle_for.h @@ -87,7 +87,6 @@ public: ptr_ = p; } -#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE Handle_for(element_type && t) { pointer p = allocator.allocate(1); @@ -95,7 +94,6 @@ public: p->count = 1; ptr_ = p; } -#endif /* I comment this one for now, since it's preventing the automatic conversions to take place. We'll see if it's a problem later. @@ -109,7 +107,6 @@ public: } */ -#if !defined CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES && !defined CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE template < typename T1, typename T2, typename... Args > Handle_for(T1 && t1, T2 && t2, Args && ... args) { @@ -118,34 +115,6 @@ public: p->count = 1; ptr_ = p; } -#else - template < typename T1, typename T2 > - Handle_for(const T1& t1, const T2& t2) - { - pointer p = allocator.allocate(1); - new (&(p->t)) element_type(t1, t2); - p->count = 1; - ptr_ = p; - } - - template < typename T1, typename T2, typename T3 > - Handle_for(const T1& t1, const T2& t2, const T3& t3) - { - pointer p = allocator.allocate(1); - new (&(p->t)) element_type(t1, t2, t3); - p->count = 1; - ptr_ = p; - } - - template < typename T1, typename T2, typename T3, typename T4 > - Handle_for(const T1& t1, const T2& t2, const T3& t3, const T4& t4) - { - pointer p = allocator.allocate(1); - new (&(p->t)) element_type(t1, t2, t3, t4); - p->count = 1; - ptr_ = p; - } -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES Handle_for(const Handle_for& h) : ptr_(h.ptr_) @@ -173,7 +142,6 @@ public: return *this; } -#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE // Note : I don't see a way to make a useful move constructor, apart // from e.g. using NULL as a ptr value, but this is drastic. @@ -194,17 +162,12 @@ public: return *this; } -#endif ~Handle_for() { if (--(ptr_->count) == 0) { -#ifdef CGAL_CXX11 Allocator_traits::destroy(allocator, ptr_); -#else - allocator.destroy( ptr_); -#endif - allocator.deallocate( ptr_, 1); + allocator.deallocate( ptr_, 1); } } diff --git a/STL_Extension/include/CGAL/Handle_for_virtual.h b/STL_Extension/include/CGAL/Handle_for_virtual.h index 7ae39a46377..6df81110a78 100644 --- a/STL_Extension/include/CGAL/Handle_for_virtual.h +++ b/STL_Extension/include/CGAL/Handle_for_virtual.h @@ -104,14 +104,12 @@ class Handle_for_virtual return *this; } -#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE Handle_for_virtual& operator=( Handle_for_virtual && h) { swap(h); return *this; } -#endif // protected: typedef RefCounted element_type; diff --git a/STL_Extension/include/CGAL/Object.h b/STL_Extension/include/CGAL/Object.h index 03d43bc582d..f04f5ec04ce 100644 --- a/STL_Extension/include/CGAL/Object.h +++ b/STL_Extension/include/CGAL/Object.h @@ -68,13 +68,8 @@ class Object Object() : obj() { } -#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE template Object(T && t, private_tag) : obj(new boost::any(std::forward(t))) { } -#else - template - Object(const T&t, private_tag) : obj(new boost::any(t)) { } -#endif // implicit constructor from optionals containing variants template @@ -155,7 +150,6 @@ class Object }; -#ifndef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE template inline Object @@ -163,15 +157,6 @@ make_object(T && t) { return Object(std::forward(t), Object::private_tag()); } -#else -template -inline -Object -make_object(const T& t) -{ - return Object(t, Object::private_tag()); -} -#endif template inline diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index 1a185d42e04..696783674cb 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -74,8 +74,6 @@ using cpp11::array; // It's also untrue that this is not documented... It is ! -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - template< typename T, typename... Args > inline cpp11::array< T, 1 + sizeof...(Args) > @@ -96,107 +94,6 @@ struct Construct_array } }; -#else // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - -template < typename T > inline -cpp11::array -make_array(const T& b1) -{ - cpp11::array a = { { b1 } }; - return a; -} - -template < typename T > inline -cpp11::array -make_array(const T& b1, const T& b2) -{ - cpp11::array a = { { b1, b2 } }; - return a; -} - -template < typename T > inline -cpp11::array -make_array(const T& b1, const T& b2, const T& b3) -{ - cpp11::array a = { { b1, b2, b3 } }; - return a; -} - -template < typename T > inline -cpp11::array -make_array(const T& b1, const T& b2, const T& b3, const T& b4) -{ - cpp11::array a = { { b1, b2, b3, b4 } }; - return a; -} - -template < typename T > inline -cpp11::array -make_array(const T& b1, const T& b2, const T& b3, const T& b4, const T& b5) -{ - cpp11::array a = { { b1, b2, b3, b4, b5 } }; - return a; -} - -template < typename T > inline -cpp11::array -make_array(const T& b1, const T& b2, const T& b3, const T& b4, const T& b5, - const T& b6) -{ - cpp11::array a = { { b1, b2, b3, b4, b5, b6 } }; - return a; -} - -// Functor version -struct Construct_array -{ - template < typename T > - cpp11::array - operator()(const T& b1) - { - return make_array (b1); - } - - template < typename T > - cpp11::array - operator()(const T& b1, const T& b2) - { - return make_array (b1, b2); - } - - template < typename T > - cpp11::array - operator()(const T& b1, const T& b2, const T& b3) - { - return make_array (b1, b2, b3); - } - - template < typename T > - cpp11::array - operator()(const T& b1, const T& b2, const T& b3, const T& b4) - { - return make_array (b1, b2, b3, b4); - } - - template < typename T > - cpp11::array - operator()(const T& b1, const T& b2, const T& b3, const T& b4, const T& b5) - { - return make_array (b1, b2, b3, b4, b5); - } - - template < typename T > - cpp11::array - operator()(const T& b1, const T& b2, const T& b3, const T& b4, const T& b5, - const T& b6) - { - return make_array (b1, b2, b3, b4, b5, b6); - } -}; - - -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - } //namespace CGAL #endif // CGAL_ARRAY_H diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 4b9331e88c0..221e0c849de 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1283,17 +1283,14 @@ struct Output_visitor : boost::static_visitor { } // internal -#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE) namespace internal { template < typename D, typename V = cpp11::tuple<>, typename O = cpp11::tuple<> > struct Derivator { -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS typedef Derivator Self; Self& operator=(const Self&) = delete; -#endif template void tuple_dispatch(const Tuple&) {} @@ -1306,9 +1303,7 @@ struct Derivator, cpp11::tuple > typedef Derivator, cpp11::tuple > Self; typedef Derivator, cpp11::tuple > Base; -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Self& operator=(const Self&) = delete; -#endif using Base::operator=; @@ -1372,9 +1367,7 @@ public: Dispatch_output_iterator(O... o) : cpp11::tuple(o...) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Dispatch_output_iterator(const Dispatch_output_iterator&)=default; -#endif Self& operator=(const Self& s) { @@ -1445,10 +1438,8 @@ public: Dispatch_or_drop_output_iterator(O... o) : Base(o...) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Dispatch_or_drop_output_iterator(const Dispatch_or_drop_output_iterator&)=default; Dispatch_or_drop_output_iterator& operator=(const Dispatch_or_drop_output_iterator&)=default; -#endif using Base::operator=; @@ -1469,1106 +1460,6 @@ dispatch_or_drop_output(O... o) return Dispatch_or_drop_output_iterator, cpp11::tuple >(o...); } -#else - -// Non-variadic version - -template < typename V, typename O > -class Dispatch_output_iterator; - -template < typename V, typename O > -class Dispatch_or_drop_output_iterator; - - -// Version with 1 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1):Iterator_tuple(out1){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1){ - return Dispatch_output_iterator,cpp11::tuple >(out1); -} - -//Version with DROP - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1):Base(out1){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1); -} - -// Version with 2 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1,O2 out2):Iterator_tuple(out1,out2){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - *cpp11::get<1>(static_cast(*this))++=cpp11::get<1>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1,O2 out2){ - return Dispatch_output_iterator,cpp11::tuple >(out1,out2); -} - -//Version with DROP - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1,O2 out2):Base(out1,out2){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1,O2 out2){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1,out2); -} - -//Version with 3 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1,O2 out2,O3 out3):Iterator_tuple(out1,out2,out3){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - *cpp11::get<1>(static_cast(*this))++=cpp11::get<1>(obj); - *cpp11::get<2>(static_cast(*this))++=cpp11::get<2>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1,O2 out2,O3 out3){ - return Dispatch_output_iterator,cpp11::tuple >(out1,out2,out3); -} - -//Version with DROP -template < typename V, typename O > -class Dispatch_or_drop_output_iterator; - - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3):Base(out1,out2,out3){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1,O2 out2,O3 out3){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1,out2,out3); -} - -//Version with 4 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4):Iterator_tuple(out1,out2,out3,out4){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - *cpp11::get<1>(static_cast(*this))++=cpp11::get<1>(obj); - *cpp11::get<2>(static_cast(*this))++=cpp11::get<2>(obj); - *cpp11::get<3>(static_cast(*this))++=cpp11::get<3>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4){ - return Dispatch_output_iterator,cpp11::tuple >(out1,out2,out3,out4); -} - -//Version with DROP -template < typename V, typename O > -class Dispatch_or_drop_output_iterator; - - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4):Base(out1,out2,out3,out4){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1,out2,out3,out4); -} - -//Version with 5 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5):Iterator_tuple(out1,out2,out3,out4,out5){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V5& obj){ - *cpp11::get<4>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - *cpp11::get<1>(static_cast(*this))++=cpp11::get<1>(obj); - *cpp11::get<2>(static_cast(*this))++=cpp11::get<2>(obj); - *cpp11::get<3>(static_cast(*this))++=cpp11::get<3>(obj); - *cpp11::get<4>(static_cast(*this))++=cpp11::get<4>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5){ - return Dispatch_output_iterator,cpp11::tuple >(out1,out2,out3,out4,out5); -} - -//Version with DROP -template < typename V, typename O > -class Dispatch_or_drop_output_iterator; - - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5):Base(out1,out2,out3,out4,out5){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V5& obj){ - *cpp11::get<4>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1,out2,out3,out4,out5); -} - -//Version with 6 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6):Iterator_tuple(out1,out2,out3,out4,out5,out6){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V5& obj){ - *cpp11::get<4>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V6& obj){ - *cpp11::get<5>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - *cpp11::get<1>(static_cast(*this))++=cpp11::get<1>(obj); - *cpp11::get<2>(static_cast(*this))++=cpp11::get<2>(obj); - *cpp11::get<3>(static_cast(*this))++=cpp11::get<3>(obj); - *cpp11::get<4>(static_cast(*this))++=cpp11::get<4>(obj); - *cpp11::get<5>(static_cast(*this))++=cpp11::get<5>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6){ - return Dispatch_output_iterator,cpp11::tuple >(out1,out2,out3,out4,out5,out6); -} - -//Version with DROP -template < typename V, typename O > -class Dispatch_or_drop_output_iterator; - - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6):Base(out1,out2,out3,out4,out5,out6){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V5& obj){ - *cpp11::get<4>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V6& obj){ - *cpp11::get<5>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1,out2,out3,out4,out5,out6); -} - -//Version with 7 parameters -template -class Dispatch_output_iterator,cpp11::tuple >:public cpp11::tuple{ - typedef Dispatch_output_iterator Self; - -public: - typedef cpp11::tuple Value_type_tuple; - typedef cpp11::tuple Iterator_tuple; - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7):Iterator_tuple(out1,out2,out3,out4,out5,out6,out7){} - - //Added because required by MSVC10 - Dispatch_output_iterator(const Self& other): - Iterator_tuple(static_cast(other)) - {} - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V5& obj){ - *cpp11::get<4>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V6& obj){ - *cpp11::get<5>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V7& obj){ - *cpp11::get<6>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const cpp11::tuple& obj){ - *cpp11::get<0>(static_cast(*this))++=cpp11::get<0>(obj); - *cpp11::get<1>(static_cast(*this))++=cpp11::get<1>(obj); - *cpp11::get<2>(static_cast(*this))++=cpp11::get<2>(obj); - *cpp11::get<3>(static_cast(*this))++=cpp11::get<3>(obj); - *cpp11::get<4>(static_cast(*this))++=cpp11::get<4>(obj); - *cpp11::get<5>(static_cast(*this))++=cpp11::get<5>(obj); - *cpp11::get<6>(static_cast(*this))++=cpp11::get<6>(obj); - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - template - Self& operator=(const boost::variant& t) { - internal::Output_visitor visitor(this); - boost::apply_visitor(visitor, t); - return *this; - } - - template - Self& operator=(const boost::optional< boost::variant >& t) { - internal::Output_visitor visitor(this); - if(t) boost::apply_visitor(visitor, *t); - return *this; - } - - const Iterator_tuple& get_iterator_tuple() const - { return *this; } - -}; - - -template -inline -Dispatch_output_iterator,cpp11::tuple > -dispatch_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7){ - return Dispatch_output_iterator,cpp11::tuple >(out1,out2,out3,out4,out5,out6,out7); -} - -//Version with DROP -template < typename V, typename O > -class Dispatch_or_drop_output_iterator; - - -template -class Dispatch_or_drop_output_iterator,cpp11::tuple >: - public Dispatch_output_iterator,cpp11::tuple > -{ - typedef Dispatch_or_drop_output_iterator Self; - typedef Dispatch_output_iterator,cpp11::tuple > Base; - -public: - - Self& operator*(){ return *this; } - Self& operator++(){ return *this; } - Self& operator++(int){ return *this; } - - Dispatch_or_drop_output_iterator(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7):Base(out1,out2,out3,out4,out5,out6,out7){} - - #if defined(__EDG__) - typedef cpp11::tuple Iterator_tuple; - - Self& operator=(const V1& obj){ - *cpp11::get<0>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V2& obj){ - *cpp11::get<1>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V3& obj){ - *cpp11::get<2>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V4& obj){ - *cpp11::get<3>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V5& obj){ - *cpp11::get<4>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V6& obj){ - *cpp11::get<5>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const V7& obj){ - *cpp11::get<6>(static_cast(*this))++=obj; - return *this; - } - - Self& operator=(const Self& s){ - static_cast< Iterator_tuple& >(*this) = static_cast< const Iterator_tuple& >(s); - return *this; - } - - Self& operator=(const cpp11::tuple& t){ - static_cast< Base& >(*this) = t; - return *this; - } - #else - using Base::operator=; - #endif //defined(__EDG__) - - - template - Self& operator=(const T&){ - return *this; - } -}; - -template -inline -Dispatch_or_drop_output_iterator,cpp11::tuple > -dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7){ - return Dispatch_or_drop_output_iterator,cpp11::tuple >(out1,out2,out3,out4,out5,out6,out7); -} - -#endif - } //namespace CGAL #include diff --git a/STL_Extension/include/CGAL/utility.h b/STL_Extension/include/CGAL/utility.h index 06c70f4e90a..44d9cae2724 100644 --- a/STL_Extension/include/CGAL/utility.h +++ b/STL_Extension/include/CGAL/utility.h @@ -31,6 +31,7 @@ #include #include #include +#include #include // The Triple and Quadruple classes are NOT RECOMMENDED anymore. @@ -290,33 +291,6 @@ operator<(const Quadruple& x, (!(y.third < x.third) && x.fourth < y.fourth)) ) ) ) ); } -#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) || \ - defined(CGAL_CFG_NO_CPP0X_DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATES) || \ - BOOST_VERSION < 105000 || \ - defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -template -inline -std::pair< T, T > -make_sorted_pair(const T& t1, const T& t2, Compare comp) -{ - return comp(t1, t2) ? std::make_pair(t1,t2) : std::make_pair(t2,t1); -} - -template -inline -std::pair -make_sorted_pair(const T& t1, const T& t2) -{ - return make_sorted_pair(t1,t2, std::less()); -} -#else - -} //end of namespace CGAL - -#include - -namespace CGAL { - struct Default_using_type { template @@ -357,7 +331,6 @@ inline P make_sorted_pair(T1&& t1, T2&& t2, Compare comp = Compare()) return comp(t1, t2) ? P(std::forward(t1), std::forward(t2)) : P(std::forward(t2), std::forward(t1)); } -#endif } //namespace CGAL diff --git a/STL_Extension/test/STL_Extension/test_Cache.cpp b/STL_Extension/test/STL_Extension/test_Cache.cpp index 188830a95e4..94b9af54d0b 100644 --- a/STL_Extension/test/STL_Extension/test_Cache.cpp +++ b/STL_Extension/test/STL_Extension/test_Cache.cpp @@ -40,9 +40,7 @@ struct Int_t : public CGAL::Handle_with_policy< Int_rep, Unify > { // This is needed to prevent VC7.1 and VC8 to call // the explicit templated constructor in Base instead of its copy-ctor. Int_t( Int_t const& rhs ) : Base( static_cast(rhs) ) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - Int_t& operator=(Int_t const&)=default; -#endif + Int_t& operator=(Int_t const&)=default; int value() const { return this->ptr()->val; } void set_value( int i) { this->copy_on_write(); diff --git a/STL_Extension/test/STL_Extension/test_In_place_list.cpp b/STL_Extension/test/STL_Extension/test_In_place_list.cpp index 34a01dfb356..c8a5e7105d6 100644 --- a/STL_Extension/test/STL_Extension/test_In_place_list.cpp +++ b/STL_Extension/test/STL_Extension/test_In_place_list.cpp @@ -184,10 +184,7 @@ struct item : public In_place_list_base { item( const item& i) : In_place_list_base(i), key(i.key) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS item& operator=(const item& rhs)=default; -#endif - bool operator== (const item& i) const { return key == i.key;} bool operator!= (const item& i) const { return key != i.key;} bool operator== (int i) const { return key == i;} From 0669c6ad97d2b6ad43ddb141383b69e20c84435f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 12:28:36 +0100 Subject: [PATCH 174/271] remove error messages and disabled test if CPP11 is not available in PSP --- .../examples/Point_set_processing_3/property_map.cpp | 3 +-- Point_set_processing_3/include/CGAL/IO/read_las_points.h | 3 --- Point_set_processing_3/include/CGAL/IO/read_ply_points.h | 3 --- Point_set_processing_3/include/CGAL/IO/write_las_points.h | 3 --- Point_set_processing_3/include/CGAL/IO/write_ply_points.h | 3 --- .../include/CGAL/bilateral_smooth_point_set.h | 2 -- 6 files changed, 1 insertion(+), 16 deletions(-) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp b/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp index ac74a7f5ed3..72e6edb596f 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp @@ -155,7 +155,6 @@ int main() } } - #ifndef CGAL_CFG_NO_CPP0X_TUPLE // same test with std::tuple { typedef std::tuple IndexedPointWithOrientableNormalTuple; @@ -175,6 +174,6 @@ int main() CGAL::make_nth_of_tuple_property_map<2>(IndexedPointWithOrientableNormalTuple()), CGAL::make_nth_of_tuple_property_map<3>(IndexedPointWithOrientableNormalTuple())); } - #endif + return 0; } diff --git a/Point_set_processing_3/include/CGAL/IO/read_las_points.h b/Point_set_processing_3/include/CGAL/IO/read_las_points.h index 538ef68dcfd..0102a0be288 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_las_points.h @@ -24,9 +24,6 @@ #include #include -#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) || defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) -#error CGAL LAS reader requires a C++11 compiler -#endif #include diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index 094e3ac7633..3f7d18f1435 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -24,9 +24,6 @@ #include #include -#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) || defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) -#error CGAL PLY reader requires a C++11 compiler -#endif #include diff --git a/Point_set_processing_3/include/CGAL/IO/write_las_points.h b/Point_set_processing_3/include/CGAL/IO/write_las_points.h index 07cb6e244f7..b6ba6d76c75 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_las_points.h @@ -24,9 +24,6 @@ #include #include -#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) || defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) -#error CGAL LAS writer requires a C++11 compiler -#endif #include diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index 7d9886858b9..e20d211252f 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -24,9 +24,6 @@ #include #include -#if defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) || defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) -#error CGAL PLY writer requires a C++11 compiler -#endif #include diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index da0d9c43a97..a379ad01b3b 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -93,9 +93,7 @@ public: : Base(other), index(other.index) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS Kd_tree_element& operator=(const Kd_tree_element&)=default; -#endif }; From f95533f2d213d4117aaa803d47684ccef3a8b276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 13:02:46 +0100 Subject: [PATCH 175/271] remove conditional code with cpp11 in Number types --- Number_types/include/CGAL/Mpzf.h | 9 +-------- Number_types/include/CGAL/Quotient.h | 19 ------------------- Number_types/include/CGAL/double.h | 8 +------- Number_types/include/CGAL/float.h | 4 +--- 4 files changed, 3 insertions(+), 37 deletions(-) diff --git a/Number_types/include/CGAL/Mpzf.h b/Number_types/include/CGAL/Mpzf.h index bcf2c480c87..73fe360be9f 100644 --- a/Number_types/include/CGAL/Mpzf.h +++ b/Number_types/include/CGAL/Mpzf.h @@ -356,8 +356,7 @@ struct Mpzf { exp=x.exp; if(size!=0) mpn_copyi(data(),x.data(),asize); } -#if !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE) \ - && !defined(CGAL_MPZF_USE_CACHE) +#if !defined(CGAL_MPZF_USE_CACHE) Mpzf(Mpzf&& x):data_(x.data()),size(x.size),exp(x.exp){ x.init(); // yes, that's a shame... x.size = 0; @@ -944,9 +943,7 @@ struct Mpzf { } #ifdef CGAL_USE_GMPXX -#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS explicit -#endif operator mpq_class () const { mpq_class q; export_to_mpq_t(q.get_mpq_t()); @@ -954,9 +951,7 @@ struct Mpzf { } #endif -#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS explicit -#endif operator Gmpq () const { Gmpq q; export_to_mpq_t(q.mpq()); @@ -983,9 +978,7 @@ struct Mpzf { } } #if 0 -#ifndef CGAL_CFG_NO_CPP0X_EXPLICIT_CONVERSION_OPERATORS explicit -#endif // This makes Mpzf==int ambiguous operator Gmpzf () const { mpz_t z; diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index 800620d7c0e..1a0bc36fd12 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -119,29 +119,10 @@ class Quotient return *this; } -#ifdef CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE - template Quotient(const T1& n, const T2& d) : num(n), den(d) { CGAL_precondition( d != 0 ); } -#else - template - Quotient(T1 && n, T2 && d) - : num(std::forward(n)), den(std::forward(d)) - { CGAL_postcondition( den != 0 ); } - - Quotient(NT && n) - : num(std::move(n)), den(1) {} - - Quotient& operator=(NT && n) - { - num = std::move(n); - den = 1; - return *this; - } -#endif - Quotient& operator+= (const Quotient& r); Quotient& operator-= (const Quotient& r); Quotient& operator*= (const Quotient& r); diff --git a/Number_types/include/CGAL/double.h b/Number_types/include/CGAL/double.h index 0d924c7cb75..d9384887f9e 100644 --- a/Number_types/include/CGAL/double.h +++ b/Number_types/include/CGAL/double.h @@ -174,14 +174,8 @@ template <> class Real_embeddable_traits< double > Type d = x; IEEE_754_double* p = reinterpret_cast(&d); return is_finite_by_mask_double( p->c.H ); -#elif !defined CGAL_CFG_NO_CPP0X_ISFINITE - return std::isfinite(x); -#elif defined CGAL_CFG_NUMERIC_LIMITS_BUG - return (x == x) && (is_valid(x-x)); #else - return (x != std::numeric_limits::infinity()) - && (-x != std::numeric_limits::infinity()) - && is_valid(x); + return std::isfinite(x); #endif } }; diff --git a/Number_types/include/CGAL/float.h b/Number_types/include/CGAL/float.h index 5377b6e87f1..1654b5fdc60 100644 --- a/Number_types/include/CGAL/float.h +++ b/Number_types/include/CGAL/float.h @@ -124,10 +124,8 @@ public: Type f = x; IEEE_754_float* p = reinterpret_cast(&f); return is_finite_by_mask_float( p->c ); -#elif !defined CGAL_CFG_NO_CPP0X_ISFINITE - return std::isfinite(x); #else - return (x == x) && (is_valid(x-x)); + return std::isfinite(x); #endif } }; From 8ec090d1d15320037d6708c88a12ef4a820e575c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 19 Mar 2019 13:05:21 +0100 Subject: [PATCH 176/271] remove condition for cpp11 in Nef --- Nef_3/include/CGAL/Nef_3/SNC_list.h | 14 +++----------- Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h | 2 -- Nef_S2/include/CGAL/Nef_S2/SM_list.h | 10 ++-------- 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_list.h b/Nef_3/include/CGAL/Nef_3/SNC_list.h index 1113b6b1c4e..46553c3bf52 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_list.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_list.h @@ -39,9 +39,7 @@ public: // typedef typename Vertex::Vertex_handle Vertex_handle; // typedef typename Vertex::Vertex_const_handle Vertex_const_handle; SNC_in_place_list_sm() {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS SNC_in_place_list_sm(const Self&)=default; -#endif SNC_in_place_list_sm(const Sphere_map& sm) // down cast : Sphere_map(sm) {} Self& operator=( const Self& sm) { @@ -63,9 +61,7 @@ public: SNC_in_place_list_halffacet() {} SNC_in_place_list_halffacet(const Halffacet& v) // down cast : Halffacet(v) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - SNC_in_place_list_halffacet(const Self&)=default; -#endif + SNC_in_place_list_halffacet(const Self&)=default; Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. @@ -85,9 +81,7 @@ public: SNC_in_place_list_volume() {} SNC_in_place_list_volume(const Volume& v) // down cast : Volume(v) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - SNC_in_place_list_volume(const Self&)=default; -#endif + SNC_in_place_list_volume(const Self&)=default; Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. @@ -107,9 +101,7 @@ public: SNC_in_place_list_shalfloop() {} SNC_in_place_list_shalfloop(const SHalfloop& v) // down cast : SHalfloop(v) {} -#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS - SNC_in_place_list_shalfloop(const Self&)=default; -#endif + SNC_in_place_list_shalfloop(const Self&)=default; Self& operator=( const Self& v) { // This self written assignment avoids that assigning vertices will // overwrite the list linking of the target vertex. diff --git a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h index 64726dd6037..195f4f6090d 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h @@ -154,9 +154,7 @@ class SNC_sphere_map : public Items_::template Vertex Date: Tue, 19 Mar 2019 13:17:37 +0100 Subject: [PATCH 177/271] remove variadic template workaround for cmap, gmap, and lcell --- BGL/examples/BGL_LCC/range_lcc.cpp | 2 - BGL/examples/BGL_polyhedron_3/range.cpp | 2 - .../include/CGAL/Combinatorial_map.h | 649 ----- .../include/CGAL/Dart_const_iterators.h | 67 +- .../include/CGAL/Dart_iterators.h | 198 -- .../Combinatorial_map_internal_functors.h | 2 - .../CGAL/internal/Combinatorial_map_utility.h | 119 - .../Combinatorial_map_utility_novariadic.h | 2574 ----------------- .../include/CGAL/GMap_dart_const_iterators.h | 66 - .../include/CGAL/GMap_dart_iterators.h | 204 -- .../include/CGAL/Generalized_map.h | 608 ---- .../Generalized_map_internal_functors.h | 2 - .../include/CGAL/Linear_cell_complex_base.h | 60 - 13 files changed, 1 insertion(+), 4552 deletions(-) delete mode 100644 Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h diff --git a/BGL/examples/BGL_LCC/range_lcc.cpp b/BGL/examples/BGL_LCC/range_lcc.cpp index d33676676b4..6e1e30aefbb 100644 --- a/BGL/examples/BGL_LCC/range_lcc.cpp +++ b/BGL/examples/BGL_LCC/range_lcc.cpp @@ -37,12 +37,10 @@ void fct(const LCC& lcc) { vertex_range vr(vertices(lcc)); -#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } -#endif std::cout << "BOOST_FOREACH" << std::endl; BOOST_FOREACH(vertex_descriptor vd, vr){ diff --git a/BGL/examples/BGL_polyhedron_3/range.cpp b/BGL/examples/BGL_polyhedron_3/range.cpp index 48343cca787..dfddcdebf5d 100644 --- a/BGL/examples/BGL_polyhedron_3/range.cpp +++ b/BGL/examples/BGL_polyhedron_3/range.cpp @@ -36,12 +36,10 @@ void fct(const Polyhedron& p) { vertex_range vr(vertices(p)); -#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR std::cout << "new for loop" << std::endl; for(vertex_descriptor vd : vr){ std::cout << vd->point() << std::endl; } -#endif std::cout << "BOOST_FOREACH" << std::endl; BOOST_FOREACH(vertex_descriptor vd, vr){ diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 341789472da..9ccf7126441 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -431,7 +431,6 @@ namespace CGAL { * is unmarked for all the marks. * @return a Dart_handle on the new dart. */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template < typename... Args > Dart_handle create_dart(const Args&... args) { @@ -439,90 +438,6 @@ namespace CGAL { init_dart(res); return res; } -#else - Dart_handle create_dart() - { - Dart_handle res=mdarts.emplace(); - init_dart(res); - return res; - } - template < typename T1 > - Dart_handle create_dart(const T1 &t1) - { - Dart_handle res=mdarts.emplace(t1); - init_dart(res); - return res; - } - template < typename T1, typename T2 > - Dart_handle create_dart(const T1 &t1, const T2 &t2) - { - Dart_handle res=mdarts.emplace(t1, t2); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3) - { - Dart_handle res=mdarts.emplace(t1, t2, t3); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7, const T8 &t8) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8); - init_dart(res); - return res; - } - template < typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6, typename T7, typename T8, typename T9 > - Dart_handle create_dart(const T1 &t1, const T2 &t2, const T3 &t3, - const T4 &t4, const T5 &t5, const T6 &t6, - const T7 &t7, const T8 &t8, const T9 &t9) - { - Dart_handle res=mdarts.emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9); - init_dart(res); - return res; - } -#endif /** Erase a dart from the list of darts. * @param adart the dart to erase. @@ -731,8 +646,6 @@ namespace CGAL { /// @return the betas of ADart (beta are used in the same order than /// they are given as parameters) - -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template Dart_handle beta(Dart_handle ADart, Betas... betas) { return CGAL::internal::Beta_functor:: @@ -749,119 +662,6 @@ namespace CGAL { Dart_const_handle beta(Dart_const_handle ADart) const { return CGAL::internal::Beta_functor_static:: run(*this, ADart); } -#else - Dart_handle beta(Dart_handle ADart, int B1) - { return this->get_beta(ADart, B1); } - Dart_handle beta(Dart_handle ADart, int B1, int B2) - { return beta(beta(ADart, B1), B2); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3) - { return beta(beta(ADart, B1), B2, B3); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4) - { return beta(beta(ADart, B1), B2, B3, B4); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5) - { return beta(beta(ADart, B1), B2, B3, B4, B5); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); } - Dart_handle beta(Dart_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8, int B9) - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); } - - template - Dart_handle beta(Dart_handle ADart) - { return this->template get_beta(ADart); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - template - Dart_handle beta(Dart_handle ADart) - { return beta(beta(ADart)); } - - Dart_const_handle beta(Dart_const_handle ADart, int B1) const - { return this->get_beta(ADart, B1); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2) const - { return beta(beta(ADart, B1), B2); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3) const - { return beta(beta(ADart, B1), B2, B3); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4) const - { return beta(beta(ADart, B1), B2, B3, B4); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5) const - { return beta(beta(ADart, B1), B2, B3, B4, B5); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8); } - Dart_const_handle beta(Dart_const_handle ADart, int B1, int B2, int B3, - int B4, int B5, int B6, int B7, int B8, int B9) const - { return beta(beta(ADart, B1), B2, B3, B4, B5, B6, B7, B8, B9); } - - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return this->template get_beta(ADart); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } - template - Dart_const_handle beta(Dart_const_handle ADart) const - { return beta(beta(ADart)); } -#endif // Generic function to iterate on CMap or GMap in a generic way bool is_previous_exist(Dart_const_handle ADart) const @@ -1505,7 +1305,6 @@ namespace CGAL { /// Create a new attribute. /// @return a handle on the new attribute. -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template typename Attribute_handle::type create_attribute(const Args&... args) { @@ -1521,152 +1320,6 @@ namespace CGAL { (this->template attributes(), res); return res; } -#else - template - typename Attribute_handle::type - create_attribute() - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1); - // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". - this->template init_attribute_ref_counting(res); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } - template - typename Attribute_handle::type - create_attribute(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, - const T5 &t5, const T6 &t6, const T7 &t7, const T8 &t8, - const T9 &t9) - { - CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0, - "create_attribute but i-attributes are disabled"); - typename Attribute_handle::type res= - CGAL::cpp11::get::value> - (mattribute_containers).emplace(t1, t2, t3, t4, t5, t6, t7, t8, t9); - internal::Init_id::type>::run - (this->template attributes(), res); - return res; - } -#endif /// Erase an attribute. /// @param h a handle to the attribute to erase. @@ -2815,7 +2468,6 @@ namespace CGAL { return res; } -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //************************************************************************** // Dart_of_orbit_basic_range template @@ -2894,307 +2546,6 @@ namespace CGAL { darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const { return Dart_of_orbit_basic_const_range(*this,adart,amark); } //************************************************************************** -#else - //************************************************************************** - // Dart_of_orbit_basic_range - template - struct Dart_of_orbit_basic_range: public CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_basic_of_orbit > - { - typedef CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_basic_of_orbit > Base; - - Dart_of_orbit_basic_range(Self &amap, Dart_handle adart, - size_type /*amark*/=INVALID_MARK): - Base(amap, adart) - {} - }; - //************************************************************************** - // Dart_of_orbit_basic_const_range - template - struct Dart_of_orbit_basic_const_range: public CMap_const_range - > - { - typedef CMap_const_range - > Base; - - Dart_of_orbit_basic_const_range(const Self &amap, - Dart_const_handle adart, size_type amark=INVALID_MARK): - Base(amap, adart, amark) - {} - }; - //************************************************************************** - // Dart_of_orbit_range - template - struct Dart_of_orbit_range: public CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_of_orbit > - { - typedef CGAL::CMap_range - , - CGAL::CMap_dart_const_iterator_of_orbit > - Base; - - Dart_of_orbit_range(Self &amap, Dart_handle adart): - Base(amap, adart) - {} - }; - //************************************************************************** - // Dart_of_orbit_const_range - template - struct Dart_of_orbit_const_range: public CMap_const_range - > - { - typedef CMap_const_range - > Base; - - Dart_of_orbit_const_range(const Self &amap, Dart_const_handle adart): - Base(amap, adart) - {} - }; - //************************************************************************** - /// @return a range on all the darts of the given orbit - Dart_of_orbit_range<> darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range<>(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range darts_of_orbit - (Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_range - darts_of_orbit(Dart_handle adart) - { return Dart_of_orbit_range(*this,adart); } - //-------------------------------------------------------------------------- - // Const versions. - Dart_of_orbit_const_range<> darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range<>(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle - adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle - adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range darts_of_orbit - (Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range(*this,adart); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_const_range - darts_of_orbit(Dart_const_handle adart) const - { return Dart_of_orbit_const_range - (*this,adart); } - //-------------------------------------------------------------------------- - // Basic versions - Dart_of_orbit_basic_range<> darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range<>(*this,adart,amark); } - //-------------------------------------------------------------------------- - Dart_of_orbit_basic_const_range<> darts_of_orbit_basic - (Dart_const_handle adart,size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range<>(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic(Dart_handle adart, - size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range darts_of_orbit_basic - (Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range(*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit_basic - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range darts_of_orbit - (Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_range - darts_of_orbit_basic(Dart_handle adart, size_type amark=INVALID_MARK) - { return Dart_of_orbit_basic_range - (*this,adart,amark); } - //-------------------------------------------------------------------------- - template - Dart_of_orbit_basic_const_range - darts_of_orbit_basic(Dart_const_handle adart, size_type amark=INVALID_MARK) const - { return Dart_of_orbit_basic_const_range - (*this,adart,amark); } - //************************************************************************** -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES - //************************************************************************** // Dart_of_cell_basic_range template struct Dart_of_cell_basic_range: public CGAL::CMap_range diff --git a/Combinatorial_map/include/CGAL/Dart_const_iterators.h b/Combinatorial_map/include/CGAL/Dart_const_iterators.h index 389081b2f5a..40ec329ac14 100644 --- a/Combinatorial_map/include/CGAL/Dart_const_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_const_iterators.h @@ -38,7 +38,7 @@ namespace CGAL { * - CMap_dart_const_iterator_basic_of_involution_inv */ //**************************************************************************** -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES + template class CMap_dart_const_iterator_basic_of_orbit: public CMap_dart_iterator_basic_of_orbit_generic @@ -92,71 +92,6 @@ namespace CGAL { it.get_first_dart()) {} }; -#else - //**************************************************************************** - template - class CMap_dart_const_iterator_basic_of_orbit: - public CMap_dart_iterator_basic_of_orbit_generic - { - public: - typedef CMap_dart_const_iterator_basic_of_orbit Self; - typedef CMap_dart_iterator_basic_of_orbit_generic Base; - - typedef typename Map_::Dart_const_handle Dart_const_handle; - typedef typename Map_::size_type size_type; - - /// Main constructor. - CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart): - Base(amap,adart) - {} - /// Main constructor. - CMap_dart_const_iterator_basic_of_orbit(const Map_& amap, - Dart_const_handle adart, - size_type amark): - Base(amap,adart,amark) - {} - /// Constructor from non const version. - CMap_dart_const_iterator_basic_of_orbit - (const CMap_dart_iterator_basic_of_orbit& it): - Base(*const_cast(it.get_combinatorial_map()), - it.get_first_dart(), - it.mmark_number) - {} - }; - //**************************************************************************** - template - class CMap_dart_const_iterator_of_orbit: - public CMap_dart_iterator_of_orbit_generic - { - public: - typedef CMap_dart_const_iterator_of_orbit Self; - typedef CMap_dart_iterator_of_orbit_generic Base; - - typedef typename Map_::Dart_const_handle Dart_const_handle; - - /// Main constructor. - CMap_dart_const_iterator_of_orbit(const Map_& amap, - Dart_const_handle adart): - Base(amap,adart) - {} - /// Constructor from non const version. - CMap_dart_const_iterator_of_orbit - (const CMap_dart_iterator_of_orbit& it): - Base(*const_cast(it.get_combinatorial_map()), - it.get_first_dart()) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** template class CMap_dart_const_iterator_basic_of_all: diff --git a/Combinatorial_map/include/CGAL/Dart_iterators.h b/Combinatorial_map/include/CGAL/Dart_iterators.h index c8172f0038f..d9b6b3607bd 100644 --- a/Combinatorial_map/include/CGAL/Dart_iterators.h +++ b/Combinatorial_map/include/CGAL/Dart_iterators.h @@ -45,97 +45,8 @@ namespace CGAL { /* Class CMap_dart_iterator_basic_of_orbit: to iterate * on the darts of the orbit */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_basic_of_orbit_generic; -#else - template - class CMap_dart_iterator_basic_of_orbit_generic; - - template - struct Get_CMap_dart_iterator_basic_of_orbit; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; - - template - struct Get_CMap_dart_iterator_basic_of_orbit - { - typedef CMap_dart_iterator_basic_of_orbit_generic type; - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** // Case when Beta... is empty: iterator of self template @@ -994,7 +905,6 @@ namespace CGAL { //**************************************************************************** /* Generic nD version. */ -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_basic_of_orbit_generic: public CMap_extend_iterator - class CMap_dart_iterator_basic_of_orbit_generic: - public CMap_extend_iterator - ::type, B3> - { - public: - typedef typename Get_CMap_dart_iterator_basic_of_orbit - ::type Self; - - typedef CMap_extend_iterator - ::type, B3> Base; - - typedef typename Base::Dart_handle Dart_handle; - typedef typename Base::Map Map; - typedef typename Map::size_type size_type; - - /// True iff this iterator is basic - typedef Tag_true Basic_iterator; - - public: - /// Main constructor. - CMap_dart_iterator_basic_of_orbit_generic(Map& amap, Dart_handle adart, - size_type amark): - Base(amap, adart, amark) - {} - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** // TODO? we can optimize the iterators when // 1 class CMap_dart_iterator_basic_of_orbit: public CMap_dart_iterator_basic_of_orbit_generic @@ -1080,33 +958,6 @@ namespace CGAL { Base(amap,adart,amark) {} }; -#else - //**************************************************************************** - template - class CMap_dart_iterator_basic_of_orbit: - public Get_CMap_dart_iterator_basic_of_orbit::type - { - public: - typedef CMap_dart_iterator_basic_of_orbit - Self; - typedef typename Get_CMap_dart_iterator_basic_of_orbit - ::type Base; - - typedef typename Map::Dart_handle Dart_handle; - typedef typename Map::size_type size_type; - - /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart): - Base(amap,adart) - {} - /// Main constructor. - CMap_dart_iterator_basic_of_orbit(Map& amap,Dart_handle adart,size_type amark): - Base(amap,adart,amark) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** /* Class CMap_dart_iterator_basic_of_all: to iterate onto all the * darts of the map. @@ -1789,7 +1640,6 @@ namespace CGAL { //*************************ITERATORS*NON*BASIC******************************** //**************************************************************************** //**************************************************************************** -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template class CMap_dart_iterator_of_orbit_generic: public CMap_non_basic_iterator - class CMap_dart_iterator_of_orbit_generic: - public CMap_non_basic_iterator::type> - { - public: - typedef CMap_dart_iterator_of_orbit_generic Self; - typedef CMap_non_basic_iterator::type> Base; - - typedef typename Base::Map Map; - typedef typename Base::Dart_handle Dart_handle; - - /// Main constructor. - CMap_dart_iterator_of_orbit_generic(Map& amap, Dart_handle adart1): - Base(amap, adart1) - {} - }; - //**************************************************************************** - template - class CMap_dart_iterator_of_orbit: - public CMap_dart_iterator_of_orbit_generic - { - public: - typedef CMap_dart_iterator_of_orbit Self; - typedef CMap_dart_iterator_of_orbit_generic Base; - - typedef typename Base::Dart_handle Dart_handle; - - /// Main constructor. - CMap_dart_iterator_of_orbit(Map& amap, Dart_handle adart): - Base(amap, adart) - {} - }; -#endif // CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //**************************************************************************** template class CMap_dart_iterator_of_cell: diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h index 26286c5f5c7..8e1e4098fa5 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h @@ -984,7 +984,6 @@ struct Reverse_orientation_of_connected_component_functor }; // **************************************************************************** // Beta functor, used to combine several beta. -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES template struct Beta_functor; @@ -1036,7 +1035,6 @@ struct Beta_functor_static { return Beta_functor_static:: run(AMap, AMap.template get_beta(ADart)); } }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES // **************************************************************************** template diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h index 3ffbdec6657..9d3c9b2d792 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h @@ -81,8 +81,6 @@ namespace CGAL struct Get_attributes_tuple { typedef typename T::Attributes type; }; -#if ! defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && \ - ! defined(CGAL_CFG_NO_CPP0X_TUPLE) // Convert a tuple in a same tuple where each void type was replaced into // CGAL::Void. template @@ -377,10 +375,6 @@ namespace CGAL template static void run(T& ... ){} }; -#else - // Definitions of structs are moved to another file. -#include -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES //Apply a functor to each element of a tuple template { typedef CGAL::Void type; }; -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES // To iterate onto each enabled attributes template struct Foreach_enabled_attributes @@ -619,118 +612,6 @@ namespace CGAL static void run(Ts& ... t) { Foreach_static_restricted_except::run(t...); } }; -#else - // This one cannot be moved in Combinatorial_map_utility_novariadic.h - // because this is an inner struct which uses inner type Attributes. - template - struct Foreach_enabled_attributes - { - static void run() - {Foreach_static_restricted::run();} - - template - static void run(T1& t1) - {Foreach_static_restricted::run(t1);} - - template - static void run(T1& t1,T2& t2) - {Foreach_static_restricted::run(t1,t2);} - - template - static void run(T1& t1,T2& t2,T3& t3) - {Foreach_static_restricted::run(t1,t2,t3);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4) - {Foreach_static_restricted::run(t1,t2,t3,t4);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5,t6);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5, - t6,t7);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8) - {Foreach_static_restricted::run(t1,t2,t3,t4,t5,t6, - t7,t8);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8, - T9& t9) - {Foreach_static_restricted::run(t1,t2,t3,t4, - t5,t6,t7,t8,t9);} - }; - // This one cannot be moved in Combinatorial_map_utility_novariadic.h - // because this is an inner struct which uses inner type Attributes. - template - struct Foreach_enabled_attributes_except - { - static void run() - {Foreach_static_restricted_except::run();} - - template - static void run(T1& t1) - {Foreach_static_restricted_except::run(t1);} - - template - static void run(T1& t1,T2& t2) - {Foreach_static_restricted_except::run(t1,t2);} - - template - static void run(T1& t1,T2& t2,T3& t3) - {Foreach_static_restricted_except::run(t1,t2,t3);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4) - {Foreach_static_restricted_except::run(t1,t2,t3,t4);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5,t6);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5, - t6,t7);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8) - {Foreach_static_restricted_except::run(t1,t2,t3,t4,t5,t6, - t7,t8);} - - template - static void run(T1& t1,T2& t2,T3& t3,T4& t4, - T5& t5,T6& t6,T7& t7,T8& t8, - T9& t9) - {Foreach_static_restricted_except::run(t1,t2,t3,t4, - t5,t6,t7,t8,t9);} - }; -#endif //CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES }; } //namespace internal diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h deleted file mode 100644 index d5110578a1f..00000000000 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility_novariadic.h +++ /dev/null @@ -1,2574 +0,0 @@ -// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France). -// All rights reserved. -// -// This file is part of CGAL (www.cgal.org); you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public License as -// published by the Free Software Foundation; either version 3 of the License, -// or (at your option) any later version. -// -// Licensees holding a valid commercial license may use this file in -// accordance with the commercial license agreement provided with the software. -// -// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -// -// $URL$ -// $Id$ -// SPDX-License-Identifier: LGPL-3.0+ -// -// Author(s) : Guillaume Damiand -// -#ifndef CGAL_INTERNAL_COMBINATORIAL_MAP_UTILITY_NOVARIADIC_H -#define CGAL_INTERNAL_COMBINATORIAL_MAP_UTILITY_NOVARIADIC_H 1 - -#if defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) || defined(CGAL_CFG_NO_CPP0X_TUPLE) -#include -#include - -// This file is included in Combinatorial_map_utility.h, in the namespace -// CGAL::internal -//------------------------------------------------------------------------------ -template -struct Convert_tuple_with_void; - -template <> -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple<> type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -template -struct Convert_tuple_with_void > -{ - typedef CGAL::cpp11::tuple::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type, - typename Convert_void::type > type; -}; -//------------------------------------------------------------------------------ -template -struct My_length; - -template <> -struct My_length > -{ - static const int value = 0; -}; -template -struct My_length > -{ - static const int value = 1; -}; -template -struct My_length > -{ - static const int value = 2; -}; -template -struct My_length > -{ - static const int value = 3; -}; -template -struct My_length > -{ - static const int value = 4; -}; -template -struct My_length > -{ - static const int value = 5; -}; -template -struct My_length > -{ - static const int value = 6; -}; -template -struct My_length > -{ - static const int value = 7; -}; -template -struct My_length > -{ - static const int value = 8; -}; -template -struct My_length > -{ - static const int value = 9; -}; -//------------------------------------------------------------------------------ -template -struct Number_of_different_type_in_tuple; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value=0; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value=boost::is_same::value?0:1; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; - -template -struct Number_of_different_type_in_tuple > -{ - static const int value= (boost::is_same::value?0:1) + - Number_of_different_type_in_tuple - >::value; -}; -//------------------------------------------------------------------------------ -template ::value-1> -struct Nb_type_different_in_tuple_up_to_k; - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos=dim; - static const int value= pos==k? - boost::is_same::value?-dim-1:0 : 0; -}; - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos= Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos = Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k,dim >::value) - :0 - ); -}; - - -template -struct Nb_type_different_in_tuple_up_to_k,dim > -{ - static const int pos= Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - ,dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim >{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - , - dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - , - dim >::value) - :0 - ); -}; - -template -struct Nb_type_different_in_tuple_up_to_k -,dim > -{ - static const int pos=Nb_type_different_in_tuple_up_to_k - ,dim >::pos - 1; - - static const int value = - ( pos==k ) ? ( boost::is_same::value ? -dim-1 : 0 ) - : ( ( pos::value ? 0:1 ) - + Nb_type_different_in_tuple_up_to_k - , - dim >::value) - :0 - ); -}; -//------------------------------------------------------------------------------ -//Convert a tuple of T... to a tuple of Functor::type... -template