diff --git a/Mesh_3/doc/Mesh_3/Mesh_3.txt b/Mesh_3/doc/Mesh_3/Mesh_3.txt index 14d9ed23b59..1acfb81f978 100644 --- a/Mesh_3/doc/Mesh_3/Mesh_3.txt +++ b/Mesh_3/doc/Mesh_3/Mesh_3.txt @@ -1035,7 +1035,11 @@ current polyline feature does not belong to. \subsubsection Mesh_WithEdgeDistanceCriterion Approximation Criterion for Feature Edges The following example shows how to generate a mesh with an approximation error criterion. -This enables the subdivision of edges that are too far away from the corresponding input sharp features. +Polyline features are covered by a set of so-called "protecting balls" which +sizes are highly related to the edge length and the edge distance. +This edge distance is driven by the distance component of `Mesh_edge_criteria_3` +(see Section \ref Mesh_3Protectionof0and1dimensionalExposed). +The parameter `edge_distance` enables the subdivision of edges that are too far away from the corresponding input sharp features. It may result in an output mesh with shorter edges along the input polyline features. \cgalExample{Mesh_3/mesh_polyhedral_domain_with_edge_distance.cpp} 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 db51c44e452..8d82229dbd6 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 @@ -473,15 +473,10 @@ private: return s; } - /// Query the sizing field and return its value at the point `p`, or - /// `minimal_size` if the latter is greater. + /// Query the sizing field and return its value at the point `p` FT query_size(const Bare_point& p, int dim, const Index& index) const { FT s = query_field(p, dim, index, size_); - - // if(minimal_size_ != FT() && s < minimal_size_) - // return minimal_size_; - // else return s; } @@ -1556,9 +1551,9 @@ approx_is_too_large(const Vertex_handle& va, const Vertex_handle& vb) const Curve_index curve_index = domain_.curve_index((va->in_dimension() < vb->in_dimension()) ? vb->index() : va->index()); - Point_3 pa = va->point().point(); - Point_3 pb = vb->point().point(); - Point_3 segment_middle = CGAL::midpoint(pa, pb); + const Point_3& pa = va->point().point(); + const Point_3& pb = vb->point().point(); + const Point_3& segment_middle = CGAL::midpoint(pa, pb); // Obtain the geodesic middle point FT signed_geodesic_distance = domain_.signed_geodesic_distance(pa, pb, curve_index); Point_3 geodesic_middle; diff --git a/Mesh_3/test/Mesh_3/test_max_edge_distance.cpp b/Mesh_3/test/Mesh_3/test_max_edge_distance.cpp index bf9b83e270f..7358994f059 100644 --- a/Mesh_3/test/Mesh_3/test_max_edge_distance.cpp +++ b/Mesh_3/test/Mesh_3/test_max_edge_distance.cpp @@ -49,9 +49,9 @@ struct Edge_distance_test_helper typename C3t3::Curve_index curve_index = domain.curve_index((va->in_dimension() < vb->in_dimension()) ? vb->index() : va->index()); - K::Point_3 pa = va->point().point(); - K::Point_3 pb = vb->point().point(); - K::Point_3 segment_middle = CGAL::midpoint(pa, pb); + const K::Point_3& pa = va->point().point(); + const K::Point_3& pb = vb->point().point(); + const K::Point_3& segment_middle = CGAL::midpoint(pa, pb); // Obtain the geodesic middle point FT signed_geodesic_distance = domain.signed_geodesic_distance(pa, pb, curve_index); K::Point_3 geodesic_middle;