From e729dbf14242f320d211f9781e842b593b72d206 Mon Sep 17 00:00:00 2001 From: Ian Bassi Date: Wed, 7 Oct 2026 20:24:22 -0300 Subject: [PATCH] Upgrade CGAL from 5.6.3 to 6.2.1 (#16258) Co-authored-by: Andrei <1331777+andreili@users.noreply.github.com> Co-authored-by: Amelia <26681721+elihwyma@users.noreply.github.com> Co-authored-by: Kris Austin --- deps/CGAL/CGAL.cmake | 6 ++--- .../igl/copyleft/cgal/CGAL_includes.hpp | 4 +-- .../igl/copyleft/cgal/closest_facet.cpp | 20 +++++++------- .../libigl/igl/copyleft/cgal/closest_facet.h | 12 ++++----- .../cgal/component_inside_component.cpp | 4 +-- .../igl/copyleft/cgal/extract_cells.cpp | 8 +++--- .../libigl/igl/copyleft/cgal/hausdorff.cpp | 10 +++---- deps_src/libigl/igl/copyleft/cgal/hausdorff.h | 4 +-- .../libigl/igl/copyleft/cgal/outer_hull.cpp | 4 +-- .../igl/copyleft/cgal/outer_hull_legacy.cpp | 4 +-- .../cgal/point_mesh_squared_distance.cpp | 22 ++++++++-------- .../cgal/point_mesh_squared_distance.h | 8 +++--- .../copyleft/cgal/points_inside_component.cpp | 8 +++--- .../cgal/signed_distance_isosurface.cpp | 4 +-- .../igl/copyleft/cgal/submesh_aabb_tree.cpp | 10 +++---- .../igl/copyleft/cgal/submesh_aabb_tree.h | 8 +++--- scripts/CAD/run-kernel-tests.sh | 2 +- scripts/flatpak/com.orcaslicer.OrcaSlicer.yml | 6 ++--- src/libslic3r/CMakeLists.txt | 4 +-- src/libslic3r/CutSurface.cpp | 26 +++++++++---------- src/libslic3r/MeshBoolean.cpp | 8 +++--- src/libslic3r/TextureToColor/ColorUtils.cpp | 4 +-- src/libslic3r/TextureToColor/Repair.hpp | 9 ++++--- 23 files changed, 98 insertions(+), 97 deletions(-) diff --git a/deps/CGAL/CGAL.cmake b/deps/CGAL/CGAL.cmake index a350677c27..a388638314 100644 --- a/deps/CGAL/CGAL.cmake +++ b/deps/CGAL/CGAL.cmake @@ -5,10 +5,10 @@ endif () orcaslicer_add_cmake_project( CGAL # GIT_REPOSITORY https://github.com/CGAL/cgal.git - # GIT_TAG 3654f780ae0c64675cabaef0e5ddaf904c48b4b7 # releases/CGAL-5.6.3 + # GIT_TAG 28811b671a12b5caa9e3688569dadbc6b3728fe6 # v6.2.1 # For whatever reason, this keeps downloading forever (repeats downloads if finished) - URL https://github.com/CGAL/cgal/releases/download/v5.6.3/CGAL-5.6.3.zip - URL_HASH SHA256=5d577acb4a9918ccb960491482da7a3838f8d363aff47e14d703f19fd84733d4 + URL https://github.com/CGAL/cgal/releases/download/v6.2.1/CGAL-6.2.1.zip + URL_HASH SHA256=eebd737d9b7f0199647ba5c1f9f6c7a3d0651aacef9c2fd4dedc52da6c25edbe DEPENDS dep_Boost dep_Eigen dep_GMP dep_MPFR ) diff --git a/deps_src/libigl/igl/copyleft/cgal/CGAL_includes.hpp b/deps_src/libigl/igl/copyleft/cgal/CGAL_includes.hpp index 38d2fc7497..6f3e3c0a1f 100644 --- a/deps_src/libigl/igl/copyleft/cgal/CGAL_includes.hpp +++ b/deps_src/libigl/igl/copyleft/cgal/CGAL_includes.hpp @@ -33,8 +33,8 @@ // Axis-aligned bounding box tree for tet tri intersection #include -#include -#include +#include +#include // Boolean operations #include diff --git a/deps_src/libigl/igl/copyleft/cgal/closest_facet.cpp b/deps_src/libigl/igl/copyleft/cgal/closest_facet.cpp index 131cc744a4..4dd10e157c 100644 --- a/deps_src/libigl/igl/copyleft/cgal/closest_facet.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/closest_facet.cpp @@ -41,9 +41,9 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet( const std::vector > & VF, const std::vector > & VFi, const CGAL::AABB_tree< - CGAL::AABB_traits< + CGAL::AABB_traits_3< Kernel, - CGAL::AABB_triangle_primitive< + CGAL::AABB_triangle_primitive_3< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & tree, const std::vector & triangles, @@ -56,8 +56,8 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet( typedef typename Kernel::Segment_3 Segment_3; typedef typename Kernel::Triangle_3 Triangle; typedef typename std::vector::iterator Iterator; - typedef typename CGAL::AABB_triangle_primitive Primitive; - typedef typename CGAL::AABB_traits AABB_triangle_traits; + typedef typename CGAL::AABB_triangle_primitive_3 Primitive; + typedef typename CGAL::AABB_traits_3 AABB_triangle_traits; typedef typename CGAL::AABB_tree Tree; if (F.rows() <= 0 || I.rows() <= 0) { @@ -451,8 +451,8 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet( typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef Kernel::Triangle_3 Triangle; typedef std::vector::iterator Iterator; - typedef CGAL::AABB_triangle_primitive Primitive; - typedef CGAL::AABB_traits AABB_triangle_traits; + typedef CGAL::AABB_triangle_primitive_3 Primitive; + typedef CGAL::AABB_traits_3 AABB_triangle_traits; typedef CGAL::AABB_tree Tree; if (F.rows() <= 0 || I.rows() <= 0) { @@ -498,9 +498,9 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet( #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation // generated by autoexplicit.sh -template void igl::copyleft::cgal::closest_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix>(Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, std::vector>, std::allocator>>> const&, std::vector>, std::allocator>>> const&, CGAL::AABB_tree>::iterator, CGAL::Boolean_tag>, CGAL::Default>> const&, std::vector> const&, std::vector> const&, Eigen::PlainObjectBase>&, Eigen::PlainObjectBase>&); +template void igl::copyleft::cgal::closest_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix>(Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, std::vector>, std::allocator>>> const&, std::vector>, std::allocator>>> const&, CGAL::AABB_tree>::iterator, CGAL::Boolean_tag>, CGAL::Default>> const&, std::vector> const&, std::vector> const&, Eigen::PlainObjectBase>&, Eigen::PlainObjectBase>&); // generated by autoexplicit.sh -template void igl::copyleft::cgal::closest_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix>(Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, std::vector>, std::allocator>>> const&, std::vector>, std::allocator>>> const&, CGAL::AABB_tree>::iterator, CGAL::Boolean_tag>, CGAL::Default>> const&, std::vector> const&, std::vector> const&, Eigen::PlainObjectBase>&, Eigen::PlainObjectBase>&); +template void igl::copyleft::cgal::closest_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix>(Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, std::vector>, std::allocator>>> const&, std::vector>, std::allocator>>> const&, CGAL::AABB_tree>::iterator, CGAL::Boolean_tag>, CGAL::Default>> const&, std::vector> const&, std::vector> const&, Eigen::PlainObjectBase>&, Eigen::PlainObjectBase>&); // generated by autoexplicit.sh template void igl::copyleft::cgal::closest_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix >( Eigen::MatrixBase > const&, @@ -509,7 +509,7 @@ template void igl::copyleft::cgal::closest_facet > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, - Eigen::MatrixBase > const&, std::vector >, std::allocator > > > const&, std::vector >, std::allocator > > > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector > const&, std::vector > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); + Eigen::MatrixBase > const&, std::vector >, std::allocator > > > const&, std::vector >, std::allocator > > > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector > const&, std::vector > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); #include template void igl::copyleft::cgal::closest_facet, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck, Eigen::Matrix, Eigen::Matrix >( Eigen::MatrixBase > const&, @@ -518,7 +518,7 @@ Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, -Eigen::MatrixBase > const&, std::vector >, std::allocator > > > const&, std::vector >, std::allocator > > > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector > const&, std::vector > const&, +Eigen::MatrixBase > const&, std::vector >, std::allocator > > > const&, std::vector >, std::allocator > > > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector > const&, std::vector > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); diff --git a/deps_src/libigl/igl/copyleft/cgal/closest_facet.h b/deps_src/libigl/igl/copyleft/cgal/closest_facet.h index 26729afd87..5be43ff633 100644 --- a/deps_src/libigl/igl/copyleft/cgal/closest_facet.h +++ b/deps_src/libigl/igl/copyleft/cgal/closest_facet.h @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -67,9 +67,9 @@ namespace igl const std::vector > & VF, const std::vector > & VFi, const CGAL::AABB_tree< - CGAL::AABB_traits< + CGAL::AABB_traits_3< Kernel, - CGAL::AABB_triangle_primitive< + CGAL::AABB_triangle_primitive_3< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & tree, const std::vector & triangles, @@ -139,9 +139,9 @@ namespace igl const std::vector > & VF, const std::vector > & VFi, const CGAL::AABB_tree< - CGAL::AABB_traits< + CGAL::AABB_traits_3< Kernel, - CGAL::AABB_triangle_primitive< + CGAL::AABB_triangle_primitive_3< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & tree, const std::vector & triangles, diff --git a/deps_src/libigl/igl/copyleft/cgal/component_inside_component.cpp b/deps_src/libigl/igl/copyleft/cgal/component_inside_component.cpp index 9580955ab8..1cc1e28a6f 100644 --- a/deps_src/libigl/igl/copyleft/cgal/component_inside_component.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/component_inside_component.cpp @@ -12,8 +12,8 @@ #include "points_inside_component.h" #include -#include -#include +#include +#include #include #include diff --git a/deps_src/libigl/igl/copyleft/cgal/extract_cells.cpp b/deps_src/libigl/igl/copyleft/cgal/extract_cells.cpp index c7856d7689..cac72b1690 100644 --- a/deps_src/libigl/igl/copyleft/cgal/extract_cells.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/extract_cells.cpp @@ -23,8 +23,8 @@ #include "../../vertex_triangle_adjacency.h" #include -#include -#include +#include +#include #include #include @@ -156,9 +156,9 @@ IGL_INLINE size_t igl::copyleft::cgal::extract_cells( std::vector Is(num_components); std::vector< CGAL::AABB_tree< - CGAL::AABB_traits< + CGAL::AABB_traits_3< Kernel, - CGAL::AABB_triangle_primitive< + CGAL::AABB_triangle_primitive_3< Kernel, std::vector< Kernel::Triangle_3 >::iterator > > > > trees(num_components); std::vector< std::vector > diff --git a/deps_src/libigl/igl/copyleft/cgal/hausdorff.cpp b/deps_src/libigl/igl/copyleft/cgal/hausdorff.cpp index 21127932f7..fb505f17c0 100644 --- a/deps_src/libigl/igl/copyleft/cgal/hausdorff.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/hausdorff.cpp @@ -9,8 +9,8 @@ template < IGL_INLINE void igl::copyleft::cgal::hausdorff( const Eigen::MatrixBase& V, const CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > @@ -27,8 +27,8 @@ IGL_INLINE void igl::copyleft::cgal::hausdorff( { CGAL::Point_3 query(x,y,z); typename CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > @@ -41,5 +41,5 @@ IGL_INLINE void igl::copyleft::cgal::hausdorff( #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation // generated by autoexplicit.sh -template void igl::copyleft::cgal::hausdorff, CGAL::Simple_cartesian, double>(Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector >, std::allocator > > > const&, double&, double&); +template void igl::copyleft::cgal::hausdorff, CGAL::Simple_cartesian, double>(Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive_3, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector >, std::allocator > > > const&, double&, double&); #endif diff --git a/deps_src/libigl/igl/copyleft/cgal/hausdorff.h b/deps_src/libigl/igl/copyleft/cgal/hausdorff.h index fd8ae64e07..08fc8afa6c 100644 --- a/deps_src/libigl/igl/copyleft/cgal/hausdorff.h +++ b/deps_src/libigl/igl/copyleft/cgal/hausdorff.h @@ -38,8 +38,8 @@ namespace igl IGL_INLINE void hausdorff( const Eigen::MatrixBase& V, const CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > diff --git a/deps_src/libigl/igl/copyleft/cgal/outer_hull.cpp b/deps_src/libigl/igl/copyleft/cgal/outer_hull.cpp index 9fd7899e90..baaee4be32 100644 --- a/deps_src/libigl/igl/copyleft/cgal/outer_hull.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/outer_hull.cpp @@ -12,8 +12,8 @@ #include "../../remove_unreferenced.h" #include -#include -#include +#include +#include #include #include diff --git a/deps_src/libigl/igl/copyleft/cgal/outer_hull_legacy.cpp b/deps_src/libigl/igl/copyleft/cgal/outer_hull_legacy.cpp index 0d164afedf..712a322f94 100644 --- a/deps_src/libigl/igl/copyleft/cgal/outer_hull_legacy.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/outer_hull_legacy.cpp @@ -12,8 +12,8 @@ #include "../../remove_unreferenced.h" #include -#include -#include +#include +#include #include #include diff --git a/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.cpp b/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.cpp index c146969c49..93ca6e4545 100644 --- a/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.cpp @@ -29,8 +29,8 @@ IGL_INLINE void igl::copyleft::cgal::point_mesh_squared_distance( using namespace std; typedef CGAL::Triangle_3 Triangle_3; typedef typename std::vector::iterator Iterator; - typedef CGAL::AABB_triangle_primitive Primitive; - typedef CGAL::AABB_traits AABB_triangle_traits; + typedef CGAL::AABB_triangle_primitive_3 Primitive; + typedef CGAL::AABB_traits_3 AABB_triangle_traits; typedef CGAL::AABB_tree Tree; Tree tree; vector T; @@ -43,8 +43,8 @@ IGL_INLINE void igl::copyleft::cgal::point_mesh_squared_distance_precompute( const Eigen::MatrixBase & V, const Eigen::MatrixBase & F, CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > @@ -90,8 +90,8 @@ template < IGL_INLINE void igl::copyleft::cgal::point_mesh_squared_distance( const Eigen::MatrixBase & P, const CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > @@ -103,8 +103,8 @@ IGL_INLINE void igl::copyleft::cgal::point_mesh_squared_distance( { typedef CGAL::Triangle_3 Triangle_3; typedef typename std::vector::iterator Iterator; - typedef CGAL::AABB_triangle_primitive Primitive; - typedef CGAL::AABB_traits AABB_triangle_traits; + typedef CGAL::AABB_triangle_primitive_3 Primitive; + typedef CGAL::AABB_traits_3 AABB_triangle_traits; typedef CGAL::AABB_tree Tree; typedef typename Tree::Point_and_primitive_id Point_and_primitive_id; typedef CGAL::Point_3 Point_3; @@ -134,7 +134,7 @@ IGL_INLINE void igl::copyleft::cgal::point_mesh_squared_distance( template void igl::copyleft::cgal::point_mesh_squared_distance, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix>(Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::MatrixBase> const&, Eigen::PlainObjectBase>&, Eigen::PlainObjectBase>&, Eigen::PlainObjectBase>&); template void igl::copyleft::cgal::point_mesh_squared_distance, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); template void igl::copyleft::cgal::point_mesh_squared_distance, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); -template void igl::copyleft::cgal::point_mesh_squared_distance, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); -template void igl::copyleft::cgal::point_mesh_squared_distance_precompute, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> >&, std::vector >, std::allocator > > >&); -template void igl::copyleft::cgal::point_mesh_squared_distance_precompute, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> >&, std::vector >, std::allocator > > >&); +template void igl::copyleft::cgal::point_mesh_squared_distance, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive_3, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> > const&, std::vector >, std::allocator > > > const&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&, Eigen::PlainObjectBase >&); +template void igl::copyleft::cgal::point_mesh_squared_distance_precompute, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive_3, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> >&, std::vector >, std::allocator > > >&); +template void igl::copyleft::cgal::point_mesh_squared_distance_precompute, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree, CGAL::AABB_triangle_primitive_3, std::vector >, std::allocator > > >::iterator, CGAL::Boolean_tag >, CGAL::Default> >&, std::vector >, std::allocator > > >&); #endif diff --git a/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.h b/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.h index 2eb338e3b9..6bc72463fc 100644 --- a/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.h +++ b/deps_src/libigl/igl/copyleft/cgal/point_mesh_squared_distance.h @@ -63,8 +63,8 @@ namespace igl const Eigen::MatrixBase & V, const Eigen::MatrixBase & F, CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > @@ -89,8 +89,8 @@ namespace igl IGL_INLINE void point_mesh_squared_distance( const Eigen::MatrixBase & P, const CGAL::AABB_tree< - CGAL::AABB_traits >::iterator > > diff --git a/deps_src/libigl/igl/copyleft/cgal/points_inside_component.cpp b/deps_src/libigl/igl/copyleft/cgal/points_inside_component.cpp index 657aca4585..e92243cad8 100644 --- a/deps_src/libigl/igl/copyleft/cgal/points_inside_component.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/points_inside_component.cpp @@ -13,8 +13,8 @@ #include "assign_scalar.h" #include -#include -#include +#include +#include #include #include @@ -35,8 +35,8 @@ namespace igl { typedef Kernel::Triangle_3 Triangle; typedef Kernel::Plane_3 Plane_3; typedef std::vector::iterator Iterator; - typedef CGAL::AABB_triangle_primitive Primitive; - typedef CGAL::AABB_traits AABB_triangle_traits; + typedef CGAL::AABB_triangle_primitive_3 Primitive; + typedef CGAL::AABB_traits_3 AABB_triangle_traits; typedef CGAL::AABB_tree Tree; template diff --git a/deps_src/libigl/igl/copyleft/cgal/signed_distance_isosurface.cpp b/deps_src/libigl/igl/copyleft/cgal/signed_distance_isosurface.cpp index 32587efd12..e62648772b 100644 --- a/deps_src/libigl/igl/copyleft/cgal/signed_distance_isosurface.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/signed_distance_isosurface.cpp @@ -23,8 +23,8 @@ #include // Axis-aligned bounding box tree for tet tri intersection #include -#include -#include +#include +#include #include IGL_INLINE bool igl::copyleft::cgal::signed_distance_isosurface( diff --git a/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.cpp b/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.cpp index 1bdfca5bcb..82b85dea2a 100644 --- a/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.cpp +++ b/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.cpp @@ -18,9 +18,9 @@ IGL_INLINE void igl::copyleft::cgal::submesh_aabb_tree( const Eigen::MatrixBase& F, const Eigen::MatrixBase& I, CGAL::AABB_tree< - CGAL::AABB_traits< + CGAL::AABB_traits_3< Kernel, - CGAL::AABB_triangle_primitive< + CGAL::AABB_triangle_primitive_3< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & tree, std::vector & triangles, @@ -51,7 +51,7 @@ IGL_INLINE void igl::copyleft::cgal::submesh_aabb_tree( #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation // generated by autoexplicit.sh -template void igl::copyleft::cgal::submesh_aabb_tree, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag > > >&, std::vector >&, std::vector >&); -template void igl::copyleft::cgal::submesh_aabb_tree, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag > > >&, std::vector >&, std::vector >&); -template void igl::copyleft::cgal::submesh_aabb_tree, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag > > >&, std::vector >&, std::vector >&); +template void igl::copyleft::cgal::submesh_aabb_tree, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag > > >&, std::vector >&, std::vector >&); +template void igl::copyleft::cgal::submesh_aabb_tree, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag > > >&, std::vector >&, std::vector >&); +template void igl::copyleft::cgal::submesh_aabb_tree, Eigen::Matrix, Eigen::Matrix, CGAL::Epeck>(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, CGAL::AABB_tree >::iterator, CGAL::Boolean_tag > > >&, std::vector >&, std::vector >&); #endif diff --git a/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.h b/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.h index 5936845f3e..23309d7338 100644 --- a/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.h +++ b/deps_src/libigl/igl/copyleft/cgal/submesh_aabb_tree.h @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -44,9 +44,9 @@ namespace igl const Eigen::MatrixBase& F, const Eigen::MatrixBase& I, CGAL::AABB_tree< - CGAL::AABB_traits< + CGAL::AABB_traits_3< Kernel, - CGAL::AABB_triangle_primitive< + CGAL::AABB_triangle_primitive_3< Kernel, typename std::vector< typename Kernel::Triangle_3 >::iterator > > > & tree, std::vector & triangles, diff --git a/scripts/CAD/run-kernel-tests.sh b/scripts/CAD/run-kernel-tests.sh index cc52a2a00b..ac506a7056 100755 --- a/scripts/CAD/run-kernel-tests.sh +++ b/scripts/CAD/run-kernel-tests.sh @@ -24,7 +24,7 @@ set -euo pipefail REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" # orcacad-deps, NOT snapmaker-deps: this fork is mainline-based and needs Eigen 5.0.1, -# CGAL 5.6.3, wx 3.3.2 and Python 3.12 Development.Embed, none of which snapmaker-deps has. +# CGAL 6.2.1, wx 3.3.2 and Python 3.12 Development.Embed, none of which snapmaker-deps has. # With the wrong image CMake dies at configure, which is exactly why this fork went # M1-M8 without ever compiling (see commit 1633005bba). IMAGE="${IMAGE:-orcacad-deps}" diff --git a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml index 21587a361f..e099ce909c 100644 --- a/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml +++ b/scripts/flatpak/com.orcaslicer.OrcaSlicer.yml @@ -259,10 +259,10 @@ modules: sha256: 9ad62c7dc910303cd384ff8f1f4767a655124980bb6d8650fe62c815a231bb7b dest: external-packages/MPFR - # CGAL 5.6.3 + # CGAL 6.2.1 - type: file - url: https://github.com/CGAL/cgal/releases/download/v5.6.3/CGAL-5.6.3.zip - sha256: 5d577acb4a9918ccb960491482da7a3838f8d363aff47e14d703f19fd84733d4 + url: https://github.com/CGAL/cgal/releases/download/v6.2.1/CGAL-6.2.1.zip + sha256: eebd737d9b7f0199647ba5c1f9f6c7a3d0651aacef9c2fd4dedc52da6c25edbe dest: external-packages/CGAL # NLopt v2.5.0 diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt index 6cfb813227..fa81aceea2 100644 --- a/src/libslic3r/CMakeLists.txt +++ b/src/libslic3r/CMakeLists.txt @@ -585,10 +585,10 @@ set(CGAL_DO_NOT_WARN_ABOUT_CMAKE_BUILD_TYPE ON CACHE BOOL "" FORCE) cmake_policy(PUSH) cmake_policy(SET CMP0011 NEW) -# CGAL's config resets policies (cmake_minimum_required ...3.23), so a plain SET +# CGAL's config resets policies (cmake_minimum_required ...3.31), so a plain SET # can't reach it; the default opts its Boost lookup into BoostConfig (CMP0167). set(CMAKE_POLICY_DEFAULT_CMP0167 NEW) -find_package(CGAL REQUIRED) +find_package(CGAL 6.2 REQUIRED) find_package(OpenCV REQUIRED core) find_package(assimp REQUIRED) unset(CMAKE_POLICY_DEFAULT_CMP0167) diff --git a/src/libslic3r/CutSurface.cpp b/src/libslic3r/CutSurface.cpp index cf5bd119f4..76b87a1e7e 100644 --- a/src/libslic3r/CutSurface.cpp +++ b/src/libslic3r/CutSurface.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -1443,8 +1443,8 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model, // detect anomalities in visitor. bool is_valid = true; // NOTE: map are created when convert shapes to cgal model - const EdgeShapeMap& edge_shape_map = cgal_shape.property_map(edge_shape_map_name).first; - const FaceShapeMap& face_shape_map = cgal_shape.property_map(face_shape_map_name).first; + const EdgeShapeMap edge_shape_map = cgal_shape.property_map(edge_shape_map_name).value(); + const FaceShapeMap face_shape_map = cgal_shape.property_map(face_shape_map_name).value(); Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid}; // a property map containing the constrained-or-not status of each edge @@ -1593,8 +1593,8 @@ void priv::collect_surface_data(std::queue &process, void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh) { - const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).first; - const EdgeBoolMap &ecm = mesh.property_map(is_constrained_edge_name).first; + const VertexShapeMap vert_shape_map = mesh.property_map(vert_shape_map_name).value(); + const EdgeBoolMap ecm = mesh.property_map(is_constrained_edge_name).value(); // check if vertex was made by edge_2 which is diagonal of quad auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool { @@ -1778,11 +1778,11 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches, priv::VDistances result(count_shapes_points); for (const SurfacePatch &patch : patches) { // map is created during intersection by corefine visitor - const VertexShapeMap &vert_shape_map = - models[patch.model_id].property_map(vert_shape_map_name).first; + const VertexShapeMap vert_shape_map = + models[patch.model_id].property_map(vert_shape_map_name).value(); uint32_t patch_index = &patch - &patches.front(); // map is created during patch creation / dividing - const CvtVI2VI& cvt = patch.mesh.property_map(patch_source_name).first; + const CvtVI2VI cvt = patch.mesh.property_map(patch_source_name).value(); // for each point on outline for (const Loop &loop : patch.loops) for (const VI &vi_patch : loop) { @@ -2804,7 +2804,7 @@ using BBS = std::vector; BBS create_bbs(const VCutAOIs &cuts, const CutMeshes &cut_models); using Primitive = CGAL::AABB_face_graph_triangle_primitive; -using Traits = CGAL::AABB_traits; +using Traits = CGAL::AABB_traits_3; using Ray = EpicKernel::Ray_3; using Tree = CGAL::AABB_tree; using Trees = std::vector; @@ -2957,7 +2957,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch, uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model) { // map is created during intersection by corefine visitor - const VertexShapeMap &vert_shape_map = model.property_map(vert_shape_map_name).first; + const VertexShapeMap vert_shape_map = model.property_map(vert_shape_map_name).value(); // for each half edge of outline for (HI hi : cut.second) { VI vi = model.source(hi); @@ -2982,7 +2982,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector& fis, patch_new.model_id = patch.model_id; patch_new.shape_id = patch.shape_id; // fix cvt - CvtVI2VI cvt = patch_new.mesh.property_map(patch_source_name).first; + CvtVI2VI cvt = patch_new.mesh.property_map(patch_source_name).value(); for (VI &vi : cvt) { if (!vi.is_valid()) continue; vi = cvt_from[vi]; @@ -3002,7 +3002,7 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches) std::string patch_number_name = "f:patch_number"; CutMesh::Property_map is_processed = cm.add_property_map(patch_number_name, false).first; - const CvtVI2VI& cvt_from = patch.mesh.property_map(patch_source_name).first; + const CvtVI2VI cvt_from = patch.mesh.property_map(patch_source_name).value(); std::vector fis; fis.reserve(cm.faces().size()); @@ -3189,7 +3189,7 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI, const CutMesh &mesh) { // NonInterupted contour is without other point and contain all from shape - const VertexShapeMap &vert_shape_map = mesh.property_map(vert_shape_map_name).first; + const VertexShapeMap vert_shape_map = mesh.property_map(vert_shape_map_name).value(); for (HI hi : cutAOI.second) { const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)]; const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)]; diff --git a/src/libslic3r/MeshBoolean.cpp b/src/libslic3r/MeshBoolean.cpp index 8f30b356d1..44d54be99d 100644 --- a/src/libslic3r/MeshBoolean.cpp +++ b/src/libslic3r/MeshBoolean.cpp @@ -58,7 +58,7 @@ #include #include // For parameterize_lscm() -#include +#include #include #include #include @@ -145,7 +145,7 @@ void self_union(TriangleMesh& mesh) namespace cgal { namespace CGALProc = CGAL::Polygon_mesh_processing; -namespace CGALParams = CGAL::Polygon_mesh_processing::parameters; +namespace CGALParams = CGAL::parameters; using EpecKernel = CGAL::Exact_predicates_exact_constructions_kernel; using EpicKernel = CGAL::Exact_predicates_inexact_constructions_kernel; @@ -515,7 +515,7 @@ void segment(CGALMesh& src, std::vector& dst, double smoothing_alpha = typedef boost::graph_traits<_EpicMesh>::halfedge_descriptor halfedge_descriptor; typedef boost::graph_traits<_EpicMesh>::vertex_descriptor vertex_descriptor; std::vector border_cycles; - CGAL::Polygon_mesh_processing::extract_boundary_cycles(out, std::back_inserter(border_cycles)); + CGAL::extract_boundary_cycles(out, std::back_inserter(border_cycles)); for (halfedge_descriptor h : border_cycles) { std::vector patch_facets; @@ -705,7 +705,7 @@ bool repair(TriangleMesh& mesh, RepairedMeshErrors* repaired_errors, std::string using halfedge_descriptor = boost::graph_traits<_EpicMesh>::halfedge_descriptor; std::vector borders; - PMP::extract_boundary_cycles(cgal_mesh, std::back_inserter(borders)); + CGAL::extract_boundary_cycles(cgal_mesh, std::back_inserter(borders)); for (halfedge_descriptor h : borders) { PMP::triangulate_and_refine_hole(cgal_mesh, h); diff --git a/src/libslic3r/TextureToColor/ColorUtils.cpp b/src/libslic3r/TextureToColor/ColorUtils.cpp index a32b4848b2..9584d8c8f9 100644 --- a/src/libslic3r/TextureToColor/ColorUtils.cpp +++ b/src/libslic3r/TextureToColor/ColorUtils.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include @@ -98,7 +98,7 @@ typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef boost::graph_traits::edge_descriptor edge_descriptor; typedef boost::graph_traits::vertex_descriptor vertex_descriptor; typedef CGAL::AABB_face_graph_triangle_primitive Primitive; -typedef CGAL::AABB_traits Traits; +typedef CGAL::AABB_traits_3 Traits; typedef CGAL::AABB_tree Tree; typedef CGALMesh::template Property_map VNMap; diff --git a/src/libslic3r/TextureToColor/Repair.hpp b/src/libslic3r/TextureToColor/Repair.hpp index 092c0623fb..25ef9cc7ac 100644 --- a/src/libslic3r/TextureToColor/Repair.hpp +++ b/src/libslic3r/TextureToColor/Repair.hpp @@ -2,7 +2,8 @@ #include "TriMesh.hpp" #include "CgalUtils.hpp" #include "Callbacks.hpp" -#include +#include +#include #include #include #include @@ -64,7 +65,7 @@ inline BoundaryEdgeStats ComputeBoundaryEdgeStats(const cgalutils::CGALMesh& cga using HalfedgeDescriptor = boost::graph_traits::halfedge_descriptor; std::vector border_cycles; - PMP::extract_boundary_cycles(cgal_mesh, std::back_inserter(border_cycles)); + CGAL::extract_boundary_cycles(cgal_mesh, std::back_inserter(border_cycles)); BoundaryEdgeStats stats; stats.cycle_count = border_cycles.size(); @@ -94,11 +95,11 @@ inline void CloseBoundariesAndRepairManifoldness(cgalutils::CGALMesh& cgal_mesh) PMP::duplicate_non_manifold_vertices(cgal_mesh); std::vector border_cycles; - PMP::extract_boundary_cycles(cgal_mesh, std::back_inserter(border_cycles)); + CGAL::extract_boundary_cycles(cgal_mesh, std::back_inserter(border_cycles)); for (const HalfedgeDescriptor h : border_cycles) { std::vector patch_faces; - PMP::triangulate_hole(cgal_mesh, h, std::back_inserter(patch_faces)); + PMP::triangulate_hole(cgal_mesh, h, CGAL::parameters::face_output_iterator(std::back_inserter(patch_faces))); } PMP::remove_degenerate_faces(cgal_mesh);