doc (Mael's review)

This commit is contained in:
Jane Tournois 2024-09-30 12:46:29 +02:00
parent f0ad731919
commit f3b9a5ac84
7 changed files with 40 additions and 37 deletions

View File

@ -456,7 +456,8 @@ unspecified_type perturb(const Named_function_parameters& np = parameters::defau
*
* The function `parameters::initial_points_generator()` enables the user to specify a functor that follows
* the `InitialPointsGenerator` concept to the mesh generation function `make_mesh_3()`. This functor is called
* for the initialization of the meshing process. If this parameter is specified without arguments, the default behavior
* for the initialization of the meshing process, by inserting well-distributed surface vertices.
* If this parameter is specified without arguments, the default behavior
* is executed, which calls the domain's `construct_initial_points_object()` for the initialization of the meshing process.
*
* If the parameter `parameters::initial_points()` is used,
@ -468,7 +469,7 @@ unspecified_type perturb(const Named_function_parameters& np = parameters::defau
* If the generator does not generate enough points for the initialization to be complete,
* the domain's `construct_initial_points_object()` will be called to generate enough input points.
*
* \tparam InitialPointsGenerator a functor that follows the `InitialPointsGenerator` concept
* \tparam InitialPointsGenerator a model of the `InitialPointsGenerator` concept
*
* @param generator an instance of `InitialPointsGenerator`
*
@ -487,12 +488,12 @@ unspecified_type initial_points_generator(const InitialPointsGenerator& generato
/*!
* \ingroup PkgMesh3Parameters
*
* The function `parameters::initial_points()` enables the user to specify a container model of `Range` that contains
* initial points to be used in the `make_mesh_3()` function for mesh generation. The `Range` contains
* The function `parameters::initial_points()` enables the user to specify a container, model of `Range`, that contains
* initial points to be used in the `make_mesh_3()` function for mesh generation. Items in the container are
* tuple-like objects containing a `Weighted_point_3`, an `int`, and a `MeshDomain::Index`,
* where `Weighted_point_3` represents the position and weight of the point,
* where `Weighted_point_3` represents the position and the weight of the point,
* `int` the dimension of the minimal subcomplex on which the point lies,
* and `Index` the corresponding subcomplex index.
* and `MeshDomain::Index` the corresponding subcomplex index.
* These initial points are inserted after one dimensional features initialization.
*
* Initialization is considered to be complete if the triangulation is a 3D triangulation
@ -500,17 +501,18 @@ unspecified_type initial_points_generator(const InitialPointsGenerator& generato
* input surface).
*
* If the parameter `parameters::initial_points_generator()` is set,
* the points will be inserted before calling the functor.
* the points from this parameter will be inserted before calling the initial points generator
*
* If after the insertion of initial points, together with the input generator,
* If after the insertion of initial points (possibly together with the input generator),
* the initialization is not complete,
* the domain's `construct_initial_points_object()` will be called.
*
* \tparam MeshDomain a model of `MeshDomain_3`
* \tparam C3t3 a model of `MeshComplex_3InTriangulation_3`
* \tparam InitialPointsRange a model of `Range` containing tuple-like objects of
* `C3t3::Triangulation::Geom_traits::Weighted_point_3, int, MeshDomain::Index`.
*
* @param initial_points a `Range` that contains points of tuple-like objects of
* `C3t3::Triangulation::Geom_traits::Weighted_point_3, int, MeshDomain::Index`.
* @param initial_points an instance of `InitialPointsRange`
*
* \cgalHeading{Example}
*
@ -528,8 +530,8 @@ unspecified_type initial_points_generator(const InitialPointsGenerator& generato
* \sa `MeshDomain_3::Construct_initial_points`
*
*/
template <typename MeshDomain, typename C3t3>
unspecified_type initial_points(const std::vector<std::tuple<C3t3::Triangulation::Geom_traits::Weighted_point_3, int, MeshDomain::Index>>& initial_points);
template <typename MeshDomain, typename C3t3, typename InitialPointsRange>
unspecified_type initial_points(const InitialPointsRange& initial_points);
} /* namespace parameters */
} /* namespace CGAL */

View File

@ -33,7 +33,7 @@ typedef unspecified_type C3t3;
/// @{
/*!
Outputs a set of surface points, for mesh initialization, to the
outputs a set of surface points for mesh initialization to the
output iterator `pts`.
If, after insertion of these points, the triangulation is still not 3D,
@ -41,12 +41,12 @@ or does not have any facets
in the restricted Delaunay triangulation, then more points will be added automatically
by the mesher.
@tparam OutputIterator model of `OutputIterator`, containing tuple-like objects made of 3 elements :
@tparam OutputIterator model of `OutputIterator` whose value type is a tuple-like object made of 3 elements:
- a `C3t3::Triangulation::Point` : the point `p`,
- a `int` : the minimal dimension of the subcomplexes on which `p` lies,
- an `int` : the minimal dimension of the subcomplexes on which `p` lies,
- a `MeshDomain_3::Index` : the index of the corresponding subcomplex.
@param pts the output points
@param pts an output iterator for the points
@param n a lower bound on the number of points to construct for initialization.
A generator can choose to ignore this parameter.
@ -63,9 +63,9 @@ with at least one facet in the restricted Delaunay triangulation.
If these conditions are not satisfied, then more points will be added automatically
by the mesher.
@tparam OutputIterator model of `OutputIterator`, containing tuple-like objects made of 3 elements :
@tparam OutputIterator model of `OutputIterator` whose value type is a tuple-like object made of 3 elements :
- a `C3t3::Triangulation::Point` : the point `p`,
- a `int` : the minimal dimension of the subcomplexes to which `p` belongs,
- an `int` : the minimal dimension of the subcomplexes to which `p` belongs,
- a `MeshDomain_3::Index` : the index of the corresponding subcomplex.
*/
template <typename OutputIterator>

View File

@ -44,15 +44,14 @@ int main()
// Mesh criteria
Mesh_criteria criteria(params::facet_angle(30).facet_size(3).facet_distance(1)
.cell_radius_edge_ratio(3).cell_size(3)
);
.cell_radius_edge_ratio(3).cell_size(3));
/// [Meshing]
// Mesh generation with a custom initialization that places points in each of the image components.
CGAL::Construct_initial_points_labeled_image<C3t3, Mesh_domain> img_pts_generator(image, domain);
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria, params::initial_points_generator(img_pts_generator)
);
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
params::initial_points_generator(img_pts_generator));
/// [Meshing]
// Output

View File

@ -47,13 +47,11 @@ int main()
// Domain
Mesh_domain domain = Mesh_domain::create_labeled_image_mesh_domain(image
, params::features_detector(CGAL::Mesh_3::Detect_features_in_image())
);
, params::features_detector(CGAL::Mesh_3::Detect_features_in_image()));
// Mesh criteria
Mesh_criteria criteria(params::facet_angle(30).facet_size(3).facet_distance(1).edge_size(3)
.cell_radius_edge_ratio(3).cell_size(3)
);
.cell_radius_edge_ratio(3).cell_size(3));
using Point_3 = K::Point_3;
using Weighted_point_3 = K::Weighted_point_3;
@ -68,9 +66,8 @@ int main()
/// [Meshing]
// Mesh generation from labeled image with initial points.
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria
, params::initial_points(std::cref(initial_points))
);
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
params::initial_points(std::cref(initial_points)));
/// [Meshing]
// Output

View File

@ -35,6 +35,8 @@ namespace CGAL
* this functor will scan the full image and
* output points on every component.
*
* \cgalModels{InitialPointsGenerator}
*
* \sa `CGAL::parameters::initial_points_generator()`
* \sa `CGAL::make_mesh_3()`
* \sa `CGAL::Construct_initial_points_labeled_image`
@ -58,7 +60,7 @@ struct Construct_initial_points_gray_image
{ }
/*!
* \brief Constructs at least `n` points by collecting them on the surface of all objects
* \brief constructs at least `n` points by collecting them on the surface of all objects
* in the image,
* even if they are non-connected components.
* Using this functor guarantees to initialize each connected component.
@ -76,8 +78,9 @@ struct Construct_initial_points_gray_image
OutputIterator operator()(OutputIterator pts, int n = 20) const
{
using CGAL::Mesh_3::internal::Create_gray_image_values_to_subdomain_indices;
typedef Create_gray_image_values_to_subdomain_indices<Functor> C_i_v_t_s_i;
typedef typename C_i_v_t_s_i::type Image_values_to_subdomain_indices;
using C_i_v_t_s_i = Create_gray_image_values_to_subdomain_indices<Functor>;
using Image_values_to_subdomain_indices = typename C_i_v_t_s_i::type;
Image_values_to_subdomain_indices transform_fct =
C_i_v_t_s_i()(image_values_to_subdomain_indices_, iso_value_);
Construct_initial_points_labeled_image<C3t3, MeshDomain> init_pts{ image_, domain_ };

View File

@ -85,6 +85,8 @@ struct Get_point
* @tparam C3t3 model of `MeshComplex_3InTriangulation_3`
* @tparam MeshDomain model of `MeshDomain_3`
*
* \cgalModels{InitialPointsGenerator}
*
* \sa `CGAL::parameters::initial_points_generator()`
* \sa `CGAL::make_mesh_3()`
* \sa `CGAL::Construct_initial_points_gray_image`
@ -102,7 +104,7 @@ struct Construct_initial_points_labeled_image
{ }
/*!
* \brief Constructs at least `n` initial points,
* \brief constructs at least `n` initial points,
* by scanning the image and
* collecting points in each object in the image,
* even if they are non-connected components.
@ -132,7 +134,7 @@ struct Construct_initial_points_labeled_image
* @tparam MeshDomain model of `MeshDomain_3`
* @tparam TransformOperator functor that transforms values of the image.
* It must provide the following type:<br>
* `result_type` : a type that supports the '==' operator<br>
* `result_type` a type that supports the '==' operator<br>
* and the following operator:<br>
* `result_type operator()(Word v)`
* with `Word` the type of the image values.

View File

@ -11,14 +11,14 @@
#ifndef CGAL_MESH_OPTION_CLASSES_H
#define CGAL_MESH_OPTION_CLASSES_H
#include <functional>
#include <CGAL/STL_Extension/internal/Has_features.h>
#include <CGAL/Default.h>
#include <boost/iterator/function_output_iterator.hpp>
#include <type_traits>
#include <iterator>
#include <optional>
#include <type_traits>
namespace CGAL {