-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mesh 3 : initial_points_generator parameter for make_mesh_3 point ini…
…tialization (#7798) ## Summary of Changes Added a `initial_points_generator` parameter in make_mesh_3. With this parameter, we can use a custom functor when initializing the C3t3 complex. This functor must follow the [Initial_points_generator](https://cgal.github.io/7798/v0/Mesh_3/classInitialPointsGenerator.html) concept. Tasks: - [x] Add `initial_points_generator` parameter in `make_mesh_3` - [x] Make an example - [x] Write `Construct_initial_points_labeled_image` into a header - [x] Make `initialize_triangulation_from_labeled_image` use `Construct_initial_points_labeled_image` - [x] Change definition of concept `InitialPointsGenerator` to output `std::tuple<MeshDomain::Point_3, int dimension, MeshDomain::Index>` (instead of `std::pair<MeshDomain::Point_3, MeshDomain::Index>`) - [x] Make it pass checks - [x] Document `initial_points_generator` parameter in `make_mesh_3` - [x] Document `Construct_initial_points_labeled_image` header - [x] Document example - [x] Delete `initialize_triangulation_from_labeled_image` and `initialize_triangulation_from_gray_image` - [x] Make an example of labelled and gray image initialisation with the parameter or the old custom initialization. - [x] Make small feature page - [x] add `Construct_initial_points_gray_image.h`, similar to `Construct_initial_points_labeled_image.h` - [x] Maybe add a test ? - [x] announce in `CHANGES.md`, see #7798 (comment) ## Release Management * Affected package(s): Mesh_3 * Issue(s) solved (if any): * fix #922 * fix #7469 * discussion #7537 * previous closed PR #7757 * Feature/Small Feature (if any): [Mesh_3_initial_points_generator_parameter](https://cgal.geometryfactory.com/CGAL/Members/wiki/Features/Small_Features/Mesh_3_initial_points_generator_parameter) * Link to compiled documentation [*here*](https://cgal.github.io/7798/v4/Manual/index.html): * [make_mesh_3](https://cgal.github.io/7798/v4/Mesh_3/group__PkgMesh3Functions.html#gac8599a0c967075f740bf8e2e92c4770e) has been modified to receive the parameters : * [initial_points_generator](https://cgal.github.io/7798/v4/Mesh_3/group__PkgMesh3Parameters.html#gaf53777b83f1b2f3e7d49275dbab6e46b) * [initial_points](https://cgal.github.io/7798/v4/Mesh_3/group__PkgMesh3Parameters.html#gae94f38c6cd23cce45a55608e881a546a) * The [InitialPointsGenerator](https://cgal.github.io/7798/v4/Mesh_3/classInitialPointsGenerator.html) concept that the functor must be a model of. * A model of this concept : [Construct_initial_points_labeled_image](https://cgal.github.io/7798/v4/Mesh_3/structCGAL_1_1Construct__initial__points__labeled__image.html) * License and copyright ownership:
- Loading branch information
Showing
25 changed files
with
1,389 additions
and
600 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/*! | ||
\ingroup PkgMesh3SecondaryConcepts | ||
\cgalConcept | ||
The function object concept `InitialPointsGenerator_3` is designed to construct | ||
a set of initial points on the surface of the domain. | ||
\cgalHasModelsBegin | ||
\cgalHasModels{CGAL::Construct_initial_points_labeled_image<C3t3, Mesh_domain>} | ||
\cgalHasModels{CGAL::Construct_initial_points_gray_image<C3t3, Mesh_domain>} | ||
\cgalHasModelsEnd | ||
*/ | ||
|
||
class InitialPointsGenerator_3 { | ||
public: | ||
|
||
/// \name Types (exposition only) | ||
/// @{ | ||
/// These types are used in the concept's description but are not part of the concept itself. | ||
|
||
/*! | ||
* Mesh domain type to be meshed, model of `MeshDomain_3` | ||
*/ | ||
typedef unspecified_type MeshDomain; | ||
|
||
/*! | ||
* Type of the output mesh complex, model of `MeshComplex_3InTriangulation_3` | ||
*/ | ||
typedef unspecified_type C3t3; | ||
/// @} | ||
|
||
/// \name Operations | ||
/// @{ | ||
/// Initial points generators are designed to output, via their operators `operator(OutputIterator)`, | ||
/// a set of surface points for mesh initialization to an output iterator. | ||
|
||
/*! | ||
outputs a set of surface points for mesh initialization. | ||
If, after insertion of these points, the triangulation is still not 3D, | ||
or does not have any facets | ||
in the restricted Delaunay triangulation, then more points will be added automatically | ||
by the mesh generator. | ||
@tparam OutputIterator model of `OutputIterator` whose value type is a tuple-like object made of 3 elements: | ||
- a `C3t3::Triangulation::Point` : the point `p`, | ||
- an `int` : the minimal dimension of the subcomplexes on which `p` lies, | ||
- a `MeshDomain_3::Index` : the index of the corresponding subcomplex. | ||
@param pts an output iterator for the points | ||
@param n a lower bound on the number of points to construct for initialization. | ||
When `n` is set to its default value `0`, the functor must provide enough | ||
points to initialize the mesh generation process, i.e., to have a 3D triangulation | ||
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 mesh generator. | ||
*/ | ||
template <typename OutputIterator> | ||
OutputIterator operator()(OutputIterator pts, const int n = 0); | ||
|
||
/// @} | ||
|
||
}; /* end InitialPointsGenerator_3 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.