From 8b9c7afef7ec349c345de1151c6237f27e89dcd1 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Mar 2023 15:10:10 +0100 Subject: [PATCH 01/16] move header --- Mesh_3/doc/Mesh_3/Doxyfile.in | 1 + .../{Mesh_3/experimental => }/Sizing_field_with_aabb_tree.h | 0 Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) rename Mesh_3/include/CGAL/{Mesh_3/experimental => }/Sizing_field_with_aabb_tree.h (100%) diff --git a/Mesh_3/doc/Mesh_3/Doxyfile.in b/Mesh_3/doc/Mesh_3/Doxyfile.in index 13f34ec4653..a47899147f4 100644 --- a/Mesh_3/doc/Mesh_3/Doxyfile.in +++ b/Mesh_3/doc/Mesh_3/Doxyfile.in @@ -7,6 +7,7 @@ INPUT += \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polyhedral_complex_mesh_domain_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_domain_with_polyline_features_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_3/generate_label_weights.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Sizing_field_with_aabb_tree.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/exude_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/odt_optimize_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/lloyd_optimize_mesh_3.h \ diff --git a/Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h similarity index 100% rename from Mesh_3/include/CGAL/Mesh_3/experimental/Sizing_field_with_aabb_tree.h rename to Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index db87cc01bfd..1c57d5affc6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -243,7 +243,7 @@ edge_criteria(double b, Mesh_fnt::Domain_tag) return Edge_criteria(b); } -#include +#include #include template < typename D_, typename Tag > From 9c85204d3ac224ed8901b36bf3fab666af41e1d6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 3 Mar 2023 18:05:54 +0100 Subject: [PATCH 02/16] move doc to header and create new group for MeshDomainField_3 --- .../CGAL/Mesh_constant_domain_field_3.h | 73 ------------------- Mesh_3/doc/Mesh_3/Doxyfile.in | 1 + Mesh_3/doc/Mesh_3/PackageDescription.txt | 4 + .../CGAL/Mesh_constant_domain_field_3.h | 64 ++++++++++++++-- .../CGAL/Sizing_field_with_aabb_tree.h | 4 + 5 files changed, 68 insertions(+), 78 deletions(-) delete mode 100644 Mesh_3/doc/Mesh_3/CGAL/Mesh_constant_domain_field_3.h diff --git a/Mesh_3/doc/Mesh_3/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/doc/Mesh_3/CGAL/Mesh_constant_domain_field_3.h deleted file mode 100644 index b660a43e23b..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Mesh_constant_domain_field_3.h +++ /dev/null @@ -1,73 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Mesh_constant_domain_field_3` is a model of concept `MeshDomainField_3`. It provides -a constant field accessible using queries on 3D-points. - -The class `Mesh_constant_domain_field_3` can also be customized through `set_size()` operations to become -a piecewise constant field, i.e.\ a sizing field with a constant size on each subpart -of the domain. - -\tparam Gt is the geometric traits class. It must match the type `Triangulation::Geom_traits`, -where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used -in the meshing process. - -\tparam Index is the type of index of the vertices of the triangulation. -It must match the type `%Index` of the model of `MeshDomain_3` used in the meshing process. - -\cgalModels `MeshDomainField_3` - -\sa `MeshDomainField_3` - -*/ -template< typename Gt, typename Index > -class Mesh_constant_domain_field_3 { -public: - -/// \name Types -/// @{ - -/*! -Numerical type. -*/ -typedef Gt::FT FT; - -/*! -Point type. -*/ -typedef Gt::Point_3 Point_3; - -/*! -Type of index of the vertices of the triangulation. -*/ -typedef Index Index; - -/// @} - -/// \name Creation -/// @{ - -/*! - -Builds a constant domain field with size `size`. -*/ -Mesh_constant_domain_field_3(FT size); - -/// @} - -/// \name Operations -/// @{ - -/*! - -Sets the size such as `operator()` will return size `size` -at any query point of dimension `dimension` and index `index`. -*/ -void set_size(FT size, int dimension, const Index& index); - -/// @} - -}; /* end Mesh_constant_domain_field_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/Doxyfile.in b/Mesh_3/doc/Mesh_3/Doxyfile.in index a47899147f4..31618fd97c6 100644 --- a/Mesh_3/doc/Mesh_3/Doxyfile.in +++ b/Mesh_3/doc/Mesh_3/Doxyfile.in @@ -8,6 +8,7 @@ INPUT += \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_domain_with_polyline_features_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_3/generate_label_weights.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Sizing_field_with_aabb_tree.h \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_constant_domain_field_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/exude_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/odt_optimize_mesh_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/lloyd_optimize_mesh_3.h \ diff --git a/Mesh_3/doc/Mesh_3/PackageDescription.txt b/Mesh_3/doc/Mesh_3/PackageDescription.txt index 8cf21dda78d..9684e159f12 100644 --- a/Mesh_3/doc/Mesh_3/PackageDescription.txt +++ b/Mesh_3/doc/Mesh_3/PackageDescription.txt @@ -16,6 +16,10 @@ /// \ingroup PkgMesh3Ref /// The classes in this group are models of domain concepts and their associated classes. +/// \defgroup PkgMesh3DomainFields Mesh Domain Fields +/// \ingroup PkgMesh3Ref +/// The classes in this group are models of `MeshDomainField_3` + /// \defgroup PkgMesh3Functions Mesh Generation Functions /// \ingroup PkgMesh3Ref /// The two main functions to generate a mesh are `make_mesh_3()` and `refine_mesh_3()`. diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index 002117b14ae..c35a0d084b5 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -28,27 +28,77 @@ namespace CGAL { +/*! +* @ingroup PkgMesh3DomainFields +* The class `Mesh_constant_domain_field_3` is a model of concept `MeshDomainField_3`. It provides +* a constant field accessible using queries on 3D-points. +* +* The class `Mesh_constant_domain_field_3` can also be customized through `set_size()` operations to become +* a piecewise constant field, i.e.\ a sizing field with a constant size on each subpart +* of the domain. +* +* @tparam Gt is the geometric traits class. It must match the type `Triangulation::Geom_traits`, +* where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used +* in the meshing process. +* +* @tparam Index is the type of index of the vertices of the triangulation. +* It must match the type `%Index` of the model of `MeshDomain_3` used in the meshing process. +* +* @cgalModels `MeshDomainField_3` +*/ template class Mesh_constant_domain_field_3 { public: + /// \name Types + /// @{ + + /*! + * Numerical type. + */ typedef typename Gt::FT FT; - typedef typename boost::mpl::eval_if_c< + + /*! + * Point type. + */ +#ifdef DOXYGEN_RUNNING + typedef Gt::Point_3 Point_3; +#else + typedef typename boost::mpl::eval_if_c< internal::Has_nested_type_Bare_point::value, typename internal::Bare_point_type, boost::mpl::identity >::type Point_3; + #endif + + /*! + * Type of index of the vertices of the triangulation. + */ typedef Index_ Index; + /// @} + private: // Map to store field values typedef std::map,FT> Values; public: - /// Constructor - Mesh_constant_domain_field_3(const FT& d) : d_(d) {} + /// \name Creation + /// @{ - /// Returns size + /*! + * Builds a constant domain field with size `size`. + */ + Mesh_constant_domain_field_3(const FT& size) : d_(size) {} + + /// @} + + /// \name Operations + /// @{ + + /*! + * Returns size + */ FT operator()(const Point_3&, const int dim, const Index& index) const { typename Values::const_iterator it = values_.find(std::make_pair(dim,index)); @@ -57,11 +107,15 @@ public: return d_; } - /// Sets size at any point of dimension `dim` and index `index`. + /*! + * Sets the size such that `operator()` will return size `size` + * at any query point of dimension `dim` and index `index`. + */ void set_size(const FT& size, const int dim, const Index& index) { values_.insert(std::make_pair(std::make_pair(dim,index),size)); } + /// @} private: // default value diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 0dcff62901b..47b3330a3a4 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -29,6 +29,10 @@ #include "AABB_filtered_projection_traits.h" +/*! +* @ingroup PkgMesh3DomainFields +* +*/ template Date: Mon, 6 Mar 2023 12:15:44 +0100 Subject: [PATCH 03/16] reorganize header for documentation --- .../doc/Mesh_3/Concepts/MeshDomainField_3.h | 3 +- .../CGAL/Sizing_field_with_aabb_tree.h | 96 +++++++++++++------ .../Polyhedron/Plugins/Mesh_3/Mesh_function.h | 4 +- 3 files changed, 69 insertions(+), 34 deletions(-) diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h index f1ac2a10975..644a3a46046 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshDomainField_3.h @@ -46,10 +46,9 @@ on the input feature including the query point. /// @{ /*! - returns the value of the sizing field at the point `p`, assumed to be included in the input complex feature with dimension `dimension` -and mesh vertex index `index`. +and mesh subcomplex index `index`. */ FT operator()(const Point_3& p, int dimension, const Index& index) const; diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 47b3330a3a4..00d20eebbe2 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -17,38 +17,51 @@ #include #include -#include "Facet_patch_id_map.h" -#include "Get_curve_index.h" #include // for weight_modifier +#include +#include +#include + #include #if defined(CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY) || defined(CGAL_NO_ASSERTIONS) == 0 # include # include #endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY || (! CGAL_NO_ASSERTIONS) -#include "AABB_filtered_projection_traits.h" - /*! * @ingroup PkgMesh3DomainFields * +* @tparam GeomTraits is the geometric traits class. It must match the type `Triangulation::Geom_traits`, +* where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used +* in the meshing process. +* @tparam MeshDomain is the type of the domain. It must be a model of `MeshDomainWithFeatures_3`, +* and derive from `Polyhedral_mesh_domain_with_features_3` + + +* @cgalModels `MeshDomainField_3` */ -template struct Sizing_field_with_aabb_tree { - typedef GeomTraits Kernel_; - typedef typename Kernel_::FT FT; - typedef typename Kernel_::Point_3 Point_3; + typedef typename GeomTraits::FT FT; + typedef typename GeomTraits::Point_3 Point_3; typedef typename MeshDomain::Index Index; typedef typename MeshDomain::Corner_index Corner_index; typedef typename MeshDomain::Curve_index Curve_index; typedef typename MeshDomain::Surface_patch_index Patch_index; +private: + typedef GeomTraits Kernel_; + typedef boost::container::flat_set Curves_ids; typedef boost::container::flat_set Patches_ids; @@ -60,30 +73,48 @@ struct Sizing_field_with_aabb_tree typedef CGAL::Delaunay_triangulation_3 Dt; - typedef Input_facets_AABB_tree Input_facets_AABB_tree_; - typedef typename Input_facets_AABB_tree_::Primitive Input_facets_AABB_tree_primitive_; - typedef typename MeshDomain::Curves_AABB_tree Input_curves_AABB_tree_; + using Input_facets_AABB_tree = typename CGAL::Default::Get< + Input_facets_AABB_tree_, + typename MeshDomain::AABB_tree + >::type; + typedef typename Input_facets_AABB_tree::Primitive Input_facets_AABB_tree_primitive_; + typedef typename MeshDomain::Curves_AABB_tree Input_curves_AABB_tree_; typedef typename Input_curves_AABB_tree_::Primitive Input_curves_AABB_tree_primitive_; - typedef typename CGAL::Default::Get< + using Get_curve_index = typename CGAL::Default::Get< Get_curve_index_, CGAL::Mesh_3::Get_curve_index - >::type Get_curve_index; - typedef typename CGAL::Default::Get< + >::type; + using Facet_patch_id_map = typename CGAL::Default::Get< Facet_patch_id_map_, CGAL::Mesh_3::Facet_patch_id_map - >::type Facet_patch_id_map; + >::type; - Sizing_field_with_aabb_tree - (typename Kernel_::FT d, - const Input_facets_AABB_tree_& aabb_tree, - const MeshDomain& domain, - Get_curve_index get_curve_index = Get_curve_index(), - Facet_patch_id_map facet_patch_id_map = Facet_patch_id_map() - ) - : d_(d), aabb_tree(aabb_tree), +public: + /*! + * Constructor... + * @param d + * @param domain + */ + Sizing_field_with_aabb_tree(const FT& d, const MeshDomain& domain) + : Sizing_field_with_aabb_tree(d, + domain, + domain.aabb_tree(), + Get_curve_index(), + Facet_patch_id_map()) + {} + +#ifndef DOXYGEN_RUNNING + Sizing_field_with_aabb_tree(const FT& d, + const MeshDomain& domain, + const Input_facets_AABB_tree& input_facets_aabb_tree, + Get_curve_index get_curve_index = Get_curve_index(), + Facet_patch_id_map facet_patch_id_map = Facet_patch_id_map() + ) + : d_(d), domain(domain), + aabb_tree(input_facets_aabb_tree), dt(), get_curve_index(get_curve_index), facet_patch_id_map(facet_patch_id_map) @@ -169,7 +200,14 @@ struct Sizing_field_with_aabb_tree } } } +#endif // DOXYGEN_RUNNING +public: + /*! \name Operations + * returns the value of the sizing field at the point `p`, + * assumed to be included in the input complex feature with dimension `dimension` + * and mesh subcomplex index `index`. + */ double operator()(const Point_3& p, const int dim, const Index& id) const @@ -234,7 +272,7 @@ struct Sizing_field_with_aabb_tree CGAL_assertion(! ids.empty()); CGAL::Mesh_3::Filtered_projection_traits< - typename Input_facets_AABB_tree_::AABB_traits, + typename Input_facets_AABB_tree::AABB_traits, Facet_patch_id_map > projection_traits(ids.begin(), ids.end(), aabb_tree.traits(), @@ -297,7 +335,7 @@ struct Sizing_field_with_aabb_tree //Compute distance to surface patches CGAL::Mesh_3::Filtered_projection_traits < - typename Input_facets_AABB_tree_::AABB_traits + typename Input_facets_AABB_tree::AABB_traits , Facet_patch_id_map > projection_traits(ids.begin(), ids.end(), aabb_tree.traits(), @@ -520,8 +558,8 @@ struct Sizing_field_with_aabb_tree } private: typename Kernel_::FT d_; - const Input_facets_AABB_tree_& aabb_tree; const MeshDomain& domain; + const Input_facets_AABB_tree& aabb_tree; Dt dt; Corners corners; Corners_indices corners_indices; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index 1c57d5affc6..47987099312 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -264,9 +264,7 @@ edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag) (*patches_ids_vector_p)[curve_id] = domain_->get_incidences(curve_id); } Mesh_sizing_field* sizing_field_ptr = - new Mesh_sizing_field(edge_size, - domain_->aabb_tree(), - *domain_); + new Mesh_sizing_field(edge_size, *domain_, domain_->aabb_tree()); // The sizing field object, as well as the `patch_ids_vector` are // allocated on the heap, and the following `boost::any` object, // containing two shared pointers, is used to make the allocated From 6bacd852bd42f19c372243268560ba5a82056856 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 6 Mar 2023 17:23:42 +0100 Subject: [PATCH 04/16] doc and reorganize typedefs --- .../CGAL/Sizing_field_with_aabb_tree.h | 47 ++++++++++++++----- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 00d20eebbe2..4bfdb56f381 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -32,11 +32,24 @@ /*! * @ingroup PkgMesh3DomainFields * +* The class `Sizing_field_with_aabb_tree` is a model of concept `MeshDomainField_3`. +* It provides a sizing field to be used in the meshing process of a polyhedral surface with features. +* +* At each query point, the field value is the minimum of the distances to the +* surface patches it does not belong to, and the distances to the curves it does belong to. +* +* This sizing field is designed to be used for mesh complex edges, +* in `Mesh_edge_criteria_3` or as `edge_size` in `Mesh_criteria_3`. +* Using this sizing field for complex edges provides a high-quality hint +* to the protecting balls placement algorithm, since it ensures that no +* protecting ball will intersect a surface patch to which the +* corresponding vertex does not belong. +* * @tparam GeomTraits is the geometric traits class. It must match the type `Triangulation::Geom_traits`, * where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used * in the meshing process. * @tparam MeshDomain is the type of the domain. It must be a model of `MeshDomainWithFeatures_3`, -* and derive from `Polyhedral_mesh_domain_with_features_3` +* and derive from `CGAL::Polyhedral_mesh_domain_with_features_3` * @cgalModels `MeshDomainField_3` @@ -51,17 +64,15 @@ template struct Sizing_field_with_aabb_tree { - typedef typename GeomTraits::FT FT; - typedef typename GeomTraits::Point_3 Point_3; + using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; + using Index = typename MeshDomain::Index; - typedef typename MeshDomain::Index Index; +private: typedef typename MeshDomain::Corner_index Corner_index; typedef typename MeshDomain::Curve_index Curve_index; typedef typename MeshDomain::Surface_patch_index Patch_index; -private: - typedef GeomTraits Kernel_; - typedef boost::container::flat_set Curves_ids; typedef boost::container::flat_set Patches_ids; @@ -71,6 +82,7 @@ private: typedef std::vector Corners_incident_patches; typedef std::vector Curves_incident_patches; + typedef GeomTraits Kernel_; typedef CGAL::Delaunay_triangulation_3 Dt; using Input_facets_AABB_tree = typename CGAL::Default::Get< @@ -92,10 +104,15 @@ private: >::type; public: + /// \name Creation + /// @{ + /*! - * Constructor... - * @param d - * @param domain + * Constructor for the sizing field. + * @param d the minimal value returned by `operator()`, corresponding + * to the minimal edge length that can be requested in the + * feature protection by protecting balls placement algorithm. + * @param domain the mesh domain to be meshed */ Sizing_field_with_aabb_tree(const FT& d, const MeshDomain& domain) : Sizing_field_with_aabb_tree(d, @@ -105,6 +122,8 @@ public: Facet_patch_id_map()) {} + /// @} + #ifndef DOXYGEN_RUNNING Sizing_field_with_aabb_tree(const FT& d, const MeshDomain& domain, @@ -203,7 +222,10 @@ public: #endif // DOXYGEN_RUNNING public: - /*! \name Operations + /// \name Operations + /// @{ + + /*! * returns the value of the sizing field at the point `p`, * assumed to be included in the input complex feature with dimension `dimension` * and mesh subcomplex index `index`. @@ -556,6 +578,9 @@ public: #endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY return result; } + + /// @} + private: typename Kernel_::FT d_; const MeshDomain& domain; From 09abe79562a6cb76a99c895b9dbc04e648c6ca38 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Mar 2023 09:15:23 +0100 Subject: [PATCH 05/16] typos --- Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h | 2 +- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index c35a0d084b5..49ebd5dead2 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -34,7 +34,7 @@ namespace CGAL { * a constant field accessible using queries on 3D-points. * * The class `Mesh_constant_domain_field_3` can also be customized through `set_size()` operations to become -* a piecewise constant field, i.e.\ a sizing field with a constant size on each subpart +* a piecewise constant field, i.e. a sizing field with a constant size on each subpart * of the domain. * * @tparam Gt is the geometric traits class. It must match the type `Triangulation::Geom_traits`, diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 4bfdb56f381..4957cbd98c3 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -228,7 +228,7 @@ public: /*! * returns the value of the sizing field at the point `p`, * assumed to be included in the input complex feature with dimension `dimension` - * and mesh subcomplex index `index`. + * and mesh subcomplex index `id`. */ double operator()(const Point_3& p, const int dim, From 66636a68fcbdc142fa030f9cd0d39f83faeeee3f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Mar 2023 12:37:29 +0100 Subject: [PATCH 06/16] add namespace CGAL --- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 3 +++ Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 4957cbd98c3..cbfb48781b1 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -29,6 +29,7 @@ # include #endif // CGAL_MESH_3_PROTECTION_HIGH_VERBOSITY || (! CGAL_NO_ASSERTIONS) +namespace CGAL { /*! * @ingroup PkgMesh3DomainFields * @@ -595,4 +596,6 @@ private: Facet_patch_id_map facet_patch_id_map; }; +}//end namespace CGAL + #endif // CGAL_MESH_3_SIZING_FIELD_WITH_AABB_TREE_H diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index 47987099312..ee687e78b68 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -253,7 +253,7 @@ edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag) { if(p_.use_sizing_field_with_aabb_tree) { typedef typename Domain::Surface_patch_index_set Set_of_patch_ids; - typedef Sizing_field_with_aabb_tree Mesh_sizing_field; // type of sizing field for 0D and 1D features + typedef CGAL::Sizing_field_with_aabb_tree Mesh_sizing_field; // type of sizing field for 0D and 1D features typedef std::vector Patches_ids_vector; typedef typename Domain::Curve_index Curve_index; const Curve_index max_index = domain_->maximal_curve_index(); From 30016253ae66ad52126fd3bc253273ea8a6d5b9f Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Mar 2023 13:19:18 +0100 Subject: [PATCH 07/16] doc --- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index cbfb48781b1..312b839f21b 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -110,9 +110,8 @@ public: /*! * Constructor for the sizing field. - * @param d the minimal value returned by `operator()`, corresponding - * to the minimal edge length that can be requested in the - * feature protection by protecting balls placement algorithm. + * @param d the maximal value returned by `operator()`, corresponding + * to an upper bound on feature edges length in the output mesh. * @param domain the mesh domain to be meshed */ Sizing_field_with_aabb_tree(const FT& d, const MeshDomain& domain) From 2fd9194a2519b82cb54c857942dd5cecd2d7c7a8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Mar 2023 13:52:44 +0100 Subject: [PATCH 08/16] add an example --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 5 ++ ...polyhedral_domain_with_features_sizing.cpp | 66 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 335e98aa0de..005cc800506 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -96,6 +96,10 @@ create_single_source_cgal_program("mesh_polyhedral_domain_with_features.cpp") target_link_libraries(mesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) +create_single_source_cgal_program("mesh_polyhedral_domain_with_features_sizing.cpp") +target_link_libraries(mesh_polyhedral_domain_with_features_sizing + PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("mesh_polyhedral_domain_with_features_sm.cpp") target_link_libraries(mesh_polyhedral_domain_with_features_sm PUBLIC CGAL::Eigen3_support) @@ -195,6 +199,7 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) mesh_polyhedral_domain mesh_polyhedral_domain_sm mesh_polyhedral_domain_with_features + mesh_polyhedral_domain_with_features_sizing mesh_polyhedral_domain_with_features_sm mesh_polyhedral_domain_with_lipschitz_sizing mesh_two_implicit_spheres_with_balls) diff --git a/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp new file mode 100644 index 00000000000..fc69011dda5 --- /dev/null +++ b/Mesh_3/examples/Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp @@ -0,0 +1,66 @@ +#include + +#include +#include +#include + +#include +#include +#include +#include + +// Domain +using K = CGAL::Exact_predicates_inexact_constructions_kernel; +using Polyhedron = CGAL::Surface_mesh; +using Mesh_domain = CGAL::Polyhedral_mesh_domain_with_features_3; +using Features_sizing_field = CGAL::Sizing_field_with_aabb_tree; + + +#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; + +namespace params = CGAL::parameters; + +int main(int argc, char*argv[]) +{ + const std::string fname = (argc>1)?argv[1]:CGAL::data_file_path("meshes/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; + } + + // Create domain + Mesh_domain domain(polyhedron); + + // Get sharp features + domain.detect_features(); + + // Mesh criteria + Features_sizing_field edges_sizing_field(0.07, domain); + Mesh_criteria criteria(params::edge_size(edges_sizing_field). + facet_distance(0.0072). + cell_radius_edge_ratio(3)); + + // Mesh generation + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, params::no_exude().no_perturb()); + + // Output + CGAL::dump_c3t3(c3t3, "out_sizing_field_with_aabb_tree"); + + return EXIT_SUCCESS; +} From 7d6cc37a9f3e0024b3ac985e7ce624b4292c6252 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Mar 2023 14:36:53 +0100 Subject: [PATCH 09/16] user manual --- Mesh_3/doc/Mesh_3/Mesh_3.txt | 13 +++++++++++++ Mesh_3/doc/Mesh_3/examples.txt | 1 + 2 files changed, 14 insertions(+) diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index 29ba32bd500..4f4a5bdc881 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -1010,7 +1010,20 @@ Right: the mesh with added 1D-features along sharp edges and edges shared by at least two of the input polyhedral surfaces forming the complex. \cgalFigureCaptionEnd +\subsubsection Mesh_3EdgesSizingField Sizing field for feature edges +The following example shows how to generate a mesh from a polyhedral complex +or a polyhedral surface with polyline features. +Polyline features are covered by a set of so-called "protecting balls" which +sizes are driven by the size component of `Mesh_edge_criteria_3`. +The ideal size of the protecting balls can be computed using +`CGAL::Sizing_field_with_aabb_tree` that helps start the feature protection +process with a good initial guess. To fit the protecting balls requirements, +each protecting ball cannot have its radius +larger than half of the distance from its center to surface patches the +current polyline feature does not belong to. + +\cgalExample{Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp} \subsection Mesh_3TuningMeshOptimization Tuning Mesh Optimization diff --git a/Mesh_3/doc/Mesh_3/examples.txt b/Mesh_3/doc/Mesh_3/examples.txt index aa44908504c..4e85c820456 100644 --- a/Mesh_3/doc/Mesh_3/examples.txt +++ b/Mesh_3/doc/Mesh_3/examples.txt @@ -21,6 +21,7 @@ \example Mesh_3/mesh_polyhedral_complex.cpp \example Mesh_3/remesh_polyhedral_surface.cpp \example Mesh_3/mesh_polyhedral_domain_with_features.cpp +\example Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp \example Mesh_3/mesh_polyhedral_domain_with_surface_inside.cpp \example Mesh_3/mesh_polyhedral_domain_with_lipschitz_sizing.cpp \example Mesh_3/mesh_two_implicit_spheres_with_balls.cpp From 03fc6bbdb2305cdc7ddf05f1db202299c2313da6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 24 Mar 2023 11:00:26 +0100 Subject: [PATCH 10/16] doc --- Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h | 2 +- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index 49ebd5dead2..96cc1ddbec5 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -41,7 +41,7 @@ namespace CGAL { * where `Triangulation` is the nested type of the model of `MeshComplex_3InTriangulation_3` used * in the meshing process. * -* @tparam Index is the type of index of the vertices of the triangulation. +* @tparam Index_ is the type of index of the vertices of the triangulation. * It must match the type `%Index` of the model of `MeshDomain_3` used in the meshing process. * * @cgalModels `MeshDomainField_3` diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 312b839f21b..15d25aea2fe 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -36,8 +36,10 @@ namespace CGAL { * The class `Sizing_field_with_aabb_tree` is a model of concept `MeshDomainField_3`. * It provides a sizing field to be used in the meshing process of a polyhedral surface with features. * -* At each query point, the field value is the minimum of the distances to the -* surface patches it does not belong to, and the distances to the curves it does belong to. +* At each query point `p`, the field value is the minimum of the distances to +* - the surface patches `p` does not belong to, and +* - for each curve `C` it does belong to, the intersection points of `C` with +* plane orthogonal to `C` and passing through `p`. * * This sizing field is designed to be used for mesh complex edges, * in `Mesh_edge_criteria_3` or as `edge_size` in `Mesh_criteria_3`. From ed3a6f966fd520d1700033b57a7737359ec305c6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 30 Mar 2023 11:34:50 +0200 Subject: [PATCH 11/16] Apply suggestions from code review Co-authored-by: Andreas Fabri Co-authored-by: Mael --- Mesh_3/doc/Mesh_3/Mesh_3.txt | 2 +- Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h | 2 +- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index 62c14204b80..790b0bcb478 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -1013,7 +1013,7 @@ Right: the mesh with added 1D-features along sharp edges and edges shared by at least two of the input polyhedral surfaces forming the complex. \cgalFigureCaptionEnd -\subsubsection Mesh_3EdgesSizingField Sizing field for feature edges +\subsubsection Mesh_3EdgesSizingField Sizing Field for Feature Edges The following example shows how to generate a mesh from a polyhedral complex or a polyhedral surface with polyline features. diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index 96cc1ddbec5..c6d46d95f9b 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -97,7 +97,7 @@ public: /// @{ /*! - * Returns size + * Returns the size of query points of dimension `dim` and index `index`. */ FT operator()(const Point_3&, const int dim, const Index& index) const { diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 15d25aea2fe..dc6088ac7c1 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -39,7 +39,7 @@ namespace CGAL { * At each query point `p`, the field value is the minimum of the distances to * - the surface patches `p` does not belong to, and * - for each curve `C` it does belong to, the intersection points of `C` with -* plane orthogonal to `C` and passing through `p`. +* the plane orthogonal to `C` and passing through `p`. * * This sizing field is designed to be used for mesh complex edges, * in `Mesh_edge_criteria_3` or as `edge_size` in `Mesh_criteria_3`. From 789a4c337d3e05ee30c98b432e04d37214163908 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 3 Apr 2023 11:18:06 +0200 Subject: [PATCH 12/16] add link and remove CGAL:: --- Mesh_3/doc/Mesh_3/Mesh_3.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index 790b0bcb478..b7057a757a2 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -1018,12 +1018,16 @@ by at least two of the input polyhedral surfaces forming the complex. The following example shows how to generate a mesh from a polyhedral complex or a polyhedral surface with polyline features. Polyline features are covered by a set of so-called "protecting balls" which -sizes are driven by the size component of `Mesh_edge_criteria_3`. -The ideal size of the protecting balls can be computed using -`CGAL::Sizing_field_with_aabb_tree` that helps start the feature protection -process with a good initial guess. To fit the protecting balls requirements, -each protecting ball cannot have its radius -larger than half of the distance from its center to surface patches the +sizes are highly related to the edge length, and +are driven by the size component of `Mesh_edge_criteria_3` +(see Section \ref Mesh_3Protectionof0and1dimensionalExposed). +The ideal size can be computed using +`Sizing_field_with_aabb_tree` that helps start the feature protection +and one-dimensional meshing process with a good initial guess. +To fit the protecting balls requirements, +no protecting ball can have its radius +larger than half of the distance from the corresponding vertex (its center), +to surface patches the current polyline feature does not belong to. \cgalExample{Mesh_3/mesh_polyhedral_domain_with_features_sizing.cpp} From e4ec27fc5cc606cea0f667257e91068fe8d66763 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 3 Apr 2023 11:29:26 +0200 Subject: [PATCH 13/16] doc review --- Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h | 4 ++-- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index c6d46d95f9b..68cb73899a8 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -108,8 +108,8 @@ public: } /*! - * Sets the size such that `operator()` will return size `size` - * at any query point of dimension `dim` and index `index`. + * Sets the size such that `operator()` for any query point + * of dimension `dim` and index `index` returns `size`. */ void set_size(const FT& size, const int dim, const Index& index) { diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index 38e9714f1cb..c4ada4641a8 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -45,7 +45,7 @@ namespace CGAL { * - for each curve `C` it does belong to, the intersection points of `C` with * the plane orthogonal to `C` and passing through `p`. * -* This sizing field is designed to be used for mesh complex edges, +* This sizing field is designed to be used for the edges of the mesh complex, * in `Mesh_edge_criteria_3` or as `edge_size` in `Mesh_criteria_3`. * Using this sizing field for complex edges provides a high-quality hint * to the protecting balls placement algorithm, since it ensures that no @@ -119,7 +119,7 @@ public: /*! * Constructor for the sizing field. * @param d the maximal value returned by `operator()`, corresponding - * to an upper bound on feature edges length in the output mesh. + * to an upper bound on feature edge lengths in the output mesh. * @param domain the mesh domain to be meshed */ Sizing_field_with_aabb_tree(const FT& d, const MeshDomain& domain) From 57f06aa2878ed5d9aab53ff8a03e8a9da832d985 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Apr 2023 09:45:27 +0200 Subject: [PATCH 14/16] merge "Tetrahedral Mesh Generation" and "3D Mesh Generation" "3D Mesh Generation" is the right package name --- Installation/CHANGES.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index c48f38acbc6..355fd0abb48 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -40,13 +40,6 @@ CGAL tetrahedral Delaunay refinement algorithm. - This new package wraps all the existing code that deals with a `MeshComplex_3InTriangulation_3` to describe 3D simplicial meshes, and makes the data structure independent from the tetrahedral mesh generation package. -### [Tetrahedral Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) - -- Added two new named parameters to the named constructor `CGAL::create_labeled_image_mesh_domain()` -for automatic detection and protection -of 1D-curves that lie at the intersection of three or more subdomains, -extracted from labeled images. - ### [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) (breaking change, major changes) - **Breaking change**: The region growing part of the package have been reworked to fix design issues introduced with the handling `FaceGraph` models. @@ -91,6 +84,10 @@ extracted from labeled images. ### [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) - Deprecated usage of boost parameters in favor of function named parameters. +- Added two new named parameters to the named constructor `CGAL::create_labeled_image_mesh_domain()` +for automatic detection and protection +of 1D-curves that lie at the intersection of three or more subdomains, +extracted from labeled images. ### [3D Periodic Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgPeriodic3Mesh3) - Deprecated usage of boost parameters in favor of function named parameters. From bba019e06648c9d6d19a50b65edf7b7456144391 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 18 Apr 2023 10:02:15 +0200 Subject: [PATCH 15/16] changes --- Installation/CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 355fd0abb48..afbefa2b686 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -88,6 +88,7 @@ CGAL tetrahedral Delaunay refinement algorithm. for automatic detection and protection of 1D-curves that lie at the intersection of three or more subdomains, extracted from labeled images. +- Added `CGAL::Sizing_field_with_aabb_tree`, a geometry-aware sizing field for feature edges in polyhedral domains. ### [3D Periodic Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgPeriodic3Mesh3) - Deprecated usage of boost parameters in favor of function named parameters. From 5d0adfda4350130025bbbce196866c5cdedfcbdf Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 2 May 2023 10:12:57 +0200 Subject: [PATCH 16/16] avoid conflict with max macro on msvc --- Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h index c4ada4641a8..21fcb9fd1e9 100644 --- a/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h +++ b/Mesh_3/include/CGAL/Sizing_field_with_aabb_tree.h @@ -134,7 +134,7 @@ public: struct Face_ids_traversal_traits { using Limits = std::numeric_limits; - Patch_index min{Limits::max()}; + Patch_index min{(Limits::max)()}; Patch_index max{Limits::lowest()}; Facet_patch_id_map index_map{};