From e8f7fcc0ae52c2499a7d57e156babd14d0d8ac1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 12 Feb 2025 01:16:54 +0100 Subject: [PATCH 1/4] foldover are not coplanar patches --- .../Polygon_mesh_processing/remesh_planar_patches.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h index 33514d6f2de..b3bb18bbd7a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh_planar_patches.h @@ -32,6 +32,10 @@ #include #include +#ifdef CGAL_DEBUG_DECIMATION +#include +#endif + #include #include @@ -243,7 +247,7 @@ bool is_edge_between_coplanar_faces(edge_descriptor e, Point_ref_3 s = get(vpm, target(next(opposite(h, tm), tm), tm) ); if (coplanar_cos_threshold==-1) - return coplanar(p, q, r, s); + return coplanar(p, q, r, s) && coplanar_orientation(p, q, r, s)!=CGAL::POSITIVE; else { typename Kernel::Compare_dihedral_angle_3 pred; @@ -848,6 +852,10 @@ bool decimate_impl(const TriangleMeshIn& tm_in, if (!is_polygon_soup_a_polygon_mesh(faces)) { +#ifdef CGAL_DEBUG_DECIMATION + CGAL::IO::write_polygon_soup("soup.off", corners, faces); + std::cout << "the output is not a valid polygon mesh!" << std::endl; +#endif return false; } From c5d8089232308321e3044832b8a2f3649dba5ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 Jan 2024 18:50:34 +0100 Subject: [PATCH 2/4] a test and an example requires Leda or Core --- .../examples/Triangulation_on_sphere_2/CMakeLists.txt | 8 +++++++- .../test/Triangulation_on_sphere_2/CMakeLists.txt | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt index 3d3d7367f53..65ed31daad1 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt @@ -3,9 +3,15 @@ cmake_minimum_required(VERSION 3.1...3.23) project( Triangulation_on_sphere_2_Examples ) find_package(CGAL REQUIRED COMPONENTS Core) +find_package(LEDA QUIET) create_single_source_cgal_program( "triang_on_sphere.cpp" ) create_single_source_cgal_program( "triang_on_sphere_range.cpp" ) -create_single_source_cgal_program( "triang_on_sphere_exact.cpp" ) create_single_source_cgal_program( "triang_on_sphere_proj.cpp" ) create_single_source_cgal_program( "triang_on_sphere_geo.cpp" ) + +if (CGAL_Core_FOUND OR LEDA_FOUND) + create_single_source_cgal_program( "triang_on_sphere_exact.cpp" ) +else() + message("NOTICE: Some tests require CGAL_Core (or LEDA), and will not be compiled.") +endif() diff --git a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt index be2360314ef..1d27f25b35b 100644 --- a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt @@ -3,15 +3,21 @@ cmake_minimum_required(VERSION 3.1...3.23) project( Triangulation_on_sphere_2_Tests ) find_package(CGAL REQUIRED COMPONENTS Core) +find_package(LEDA QUIET) create_single_source_cgal_program( "test_dtos.cpp" ) create_single_source_cgal_program( "test_dtos2_remove.cpp" ) -create_single_source_cgal_program( "test_dtos_degenerate_cases.cpp" ) create_single_source_cgal_program( "test_dtos_illegal_points.cpp" ) create_single_source_cgal_program( "test_dtos_projection_traits.cpp" ) create_single_source_cgal_program( "test_dtos_traits.cpp" ) create_single_source_cgal_program( "issue_8200.cpp" ) +if (CGAL_Core_FOUND OR LEDA_FOUND) + create_single_source_cgal_program( "test_dtos_degenerate_cases.cpp" ) +else() + message("NOTICE: Some tests require CGAL_Core (or LEDA), and will not be compiled.") +endif() + find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) From 29fcec6b3a3a67ec6273d4061c4f336c40bfe440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 Jan 2024 18:11:50 +0100 Subject: [PATCH 3/4] fix dependencies --- .../examples/Cone_spanners_2/CMakeLists.txt | 19 ++++-------------- .../test/Cone_spanners_2/CMakeLists.txt | 20 +++++++++++-------- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index ded37dfad08..99442720fc1 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -5,21 +5,10 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) find_package(LEDA QUIET) if(CGAL_Core_FOUND OR LEDA_FOUND) - if(MSVC) - # Turn off a boost related warning that appears with VC2015 - # boost_1_65_1\boost\graph\named_function_params.hpp(240) : - # warning C4172: returning address of local variable or temporary - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4172") - endif() - - # create a target per cppfile - file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") - endforeach() + create_single_source_cgal_program("compute_cones.cpp") + create_single_source_cgal_program("theta_io.cpp") else() message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.") endif() + +create_single_source_cgal_program("dijkstra_theta.cpp") diff --git a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt index 462edfc7819..17c47060a82 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt @@ -5,12 +5,16 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Cone_spanners_2_Tests) find_package(CGAL REQUIRED COMPONENTS Core) +find_package(LEDA QUIET) -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") -endforeach() +create_single_source_cgal_program("cones_inexact.cpp") +create_single_source_cgal_program("theta_inexact.cpp") +create_single_source_cgal_program("yao_inexact.cpp") + +if(CGAL_Core_FOUND OR LEDA_FOUND) + create_single_source_cgal_program("cones_exact.cpp") + create_single_source_cgal_program("theta_exact.cpp") + create_single_source_cgal_program("yao_exact.cpp") +else() + message("NOTICE: Some tests require the CGAL_Core library (or LEDA), and will not be compiled.") +endif() From b0dcf8c3f508e9f21cbf82048e00140054d9500a Mon Sep 17 00:00:00 2001 From: lvalque <131978677+LeoValque@users.noreply.github.com> Date: Tue, 15 Apr 2025 09:57:05 +0200 Subject: [PATCH 4/4] Remove Documention bug in to_vector of Segment_3.h --- Kernel_23/doc/Kernel_23/CGAL/Segment_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h b/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h index 36dcda52494..a38b193e798 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h @@ -92,7 +92,7 @@ returns the squared length of `s`. Kernel::FT squared_length() const; /*! -returns the vector `s.target()` - `s`.`source()`. +returns the vector `s.target()` - `s.source()`. */ Vector_3 to_vector() const;