From 14a9db6d00af5aae18c2266d7f4af571e42ba7b8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 19 Aug 2024 12:23:32 +0200 Subject: [PATCH] weight_modifier was likely to make the weight too small let's keep the minimal weight as given in meshing criteria --- Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index 366f1b3a91e..7f9fface33e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -720,7 +720,10 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); - const Weighted_point wp = cwp(p,w*weight_modifier); + const FT wwm = use_minimal_size() + ? (std::max)(w * weight_modifier, minimal_weight()) + : w * weight_modifier; + const Weighted_point wp = cwp(p, wwm); typename Tr::Locate_type lt; int li, lj; @@ -1182,7 +1185,7 @@ insert_balls(const Vertex_handle& vp, const Weighted_point& vp_wp = c3t3_.triangulation().point(vp); #if ! defined(CGAL_NO_PRECONDITIONS) - if(sp <= minimal_size_) { + if(sp < minimal_size_) { std::stringstream msg; msg.precision(17); msg << "Error: the mesh sizing field is smaller than minimal size ";