Skip to content

Mesh_3: Specific domain for Poisson reconstruction #8771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Installation/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
- `initial_points_generator` : enables the user to specify a functor that generates initial points,
- `initial_points` : enables the user to specify a `Range` of initial points.
- Added a new meshing parameter `surface_only`, to improve performances when the user is only interested in surface mesh generation.

### [Poisson Surface Reconstruction](https://doc.cgal.org/6.1/Manual/packages.html#PkgPoissonSurfaceReconstruction3)
- Added a new mesh domain `Poisson_mesh_domain_3` that integrates some optimizations from the deprecated 3D Surface Mesh Generation package.

### [2D Triangulations](https://doc.cgal.org/6.1/Manual/packages.html#PkgTriangulation2)

Expand Down
26 changes: 9 additions & 17 deletions Mesh_3/include/CGAL/Labeled_mesh_domain_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Stéphane Tayeb, Aymeric PELLE
//
//******************************************************************************
// File Description :
// class Labeled_mesh_domain_3. See class description.
//******************************************************************************


#ifndef CGAL_LABELED_MESH_DOMAIN_3_H
#define CGAL_LABELED_MESH_DOMAIN_3_H
Expand Down Expand Up @@ -875,17 +870,15 @@ class Labeled_mesh_domain_3
* function. The domain to be discretized is assumed to be the domain where
* the function has negative values.
*
* The method takes as argument a bounding sphere which is required to
* circumscribe the surface and to have its center inside the domain.
*
* \tparam Function a type compatible with the signature `FT(Point_3)`: it takes a point as argument,
* and returns a scalar value. That object must be model of `CopyConstructible`
* \tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters"
* \tparam Bounding_object either a bounding sphere (of type `Sphere_3`), a bounding box (type `Bbox_3`),
* or a bounding `Iso_cuboid_3`
* or a bounding `Iso_cuboid_3` which is required to circumscribe
* the surface and to have its center inside the domain.
*
* \param function the implicit function
* \param bounding_object object boundint the meshable domain and its center is inside the domain.
* \param bounding_object object bounding the meshable domain and its center is inside the domain.
* \param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below:
*
* \cgalNamedParamsBegin
Expand Down Expand Up @@ -936,12 +929,11 @@ class Labeled_mesh_domain_3
/// @}
#ifndef DOXYGEN_RUNNING
template<typename CGAL_NP_TEMPLATE_PARAMETERS>
static Labeled_mesh_domain_3 create_implicit_mesh_domain(const CGAL_NP_CLASS& np = parameters::default_values())
static Labeled_mesh_domain_3 create_implicit_mesh_domain(const CGAL_NP_CLASS &np)
{
static_assert(!parameters::is_default_parameter<CGAL_NP_CLASS, internal_np::function_param_t>::value, "Value for required parameter not found");
static_assert(!parameters::is_default_parameter<CGAL_NP_CLASS, internal_np::bounding_object_param_t>::value, "Value for required parameter not found");

using parameters::get_parameter;
return create_implicit_mesh_domain(parameters::get_parameter(np, internal_np::function_param),
parameters::get_parameter(np, internal_np::bounding_object_param),
np);
Expand Down Expand Up @@ -1170,10 +1162,10 @@ class Labeled_mesh_domain_3

private:
/*
* Returns a point in the intersection of [a,b] with the surface
* `a` must be the source point, and `b` the out point. It's important
* Returns a point in the intersection of `[a,b]` with the surface
* `a` must be the source point, and `b` the out point. It is important
* because it drives bisection cuts.
* Indeed, the returned point is the first intersection from `[a,b]`
* Indeed, the returned point is the first intersection of `[a,b]`
* with a subdomain surface.
*/
Intersection operator()(const Point_3& a, const Point_3& b) const
Expand All @@ -1196,7 +1188,7 @@ class Labeled_mesh_domain_3

// If both extremities are in the same subdomain,
// there is no intersection.
// This should not happen...
// Should only be able to happen during initial point generation.
if( value_at_p1 == value_at_p2 )
{
return Intersection();
Expand Down
Loading