Merge pull request #8248 from sloriot/CGAL-deprecate_Surface_mesher

deprecate Surface_mesher package
This commit is contained in:
Laurent Rineau 2024-06-12 10:06:14 +02:00
commit 1b534cd347
84 changed files with 1735 additions and 225 deletions

View File

@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.12...3.29)
project(Documentation NONE)
# Minimal version of CMake:
# Check whether this cmake script is the top level one
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
# decide if this is a branch build
@ -79,6 +77,7 @@ function(configure_doxygen_package CGAL_PACKAGE_NAME)
if(NOT EXISTS ${CGAL_PACKAGE_DOC_DIR}/Doxyfile.in)
return()
endif()
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CGAL_PACKAGE_DOC_DIR}/Doxyfile.in)
set(CGAL_DOC_PACKAGE_DEFAULTS
${CGAL_DOC_DXY_DIR}/${CGAL_PACKAGE_NAME}_defaults.dxy)
@ -166,6 +165,7 @@ function(configure_doxygen_package CGAL_PACKAGE_NAME)
endforeach()
else()
if(EXISTS ${CGAL_PACKAGE_DOC_DIR}/dependencies)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CGAL_PACKAGE_DOC_DIR}/dependencies)
file(STRINGS ${CGAL_PACKAGE_DOC_DIR}/dependencies DEPENDENCIES)
endif()
endif()

View File

@ -226,6 +226,11 @@ Release date: June 2024
- **Breaking change**: Removed the class templates `CGAL::Gray_image_mesh_domain_3`, `CGAL::Implicit_mesh_domain_3`,
and `CGAL::Labeled_image_mesh_domain_3`, which were deprecated since CGAL-4.13.
### [3D Surface Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesher3)
- This package is deprecated and the package [3D Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgMesh3) should
be used instead.
### [Surface Mesh Parameterization](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMeshParameterization)
- **Breaking change**: The method [`CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3`](https://doc.cgal.org/6.0/Surface_mesh_parameterization/classCGAL_1_1Surface__mesh__parameterization_1_1LSCM__parameterizer__3.html)

View File

@ -7,19 +7,23 @@
#include <CGAL/AABB_tree.h> // must be included before kernel
#include <CGAL/AABB_traits_3.h>
#include <CGAL/AABB_face_graph_triangle_primitive.h>
#include <CGAL/Timer.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/make_surface_mesh.h>
#include <CGAL/Implicit_surface_3.h>
#include <CGAL/IO/facets_in_complex_2_to_triangle_mesh.h>
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>
#include <CGAL/Eigen_solver_traits.h>
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
#include <math.h>
#include <CGAL/Timer.h>
#include "Kernel_type.h"
#include "SMesh_type.h"
@ -179,10 +183,11 @@ SMesh* poisson_reconstruct(Point_set& points,
// Poisson implicit function
typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
// Surface mesher
typedef CGAL::Surface_mesh_default_triangulation_3 STr;
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
// Mesh_3
typedef CGAL::Labeled_mesh_domain_3<Kernel> Mesh_domain;
typedef typename CGAL::Mesh_triangulation_3<Mesh_domain, CGAL::Default, Concurrency_tag>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
// AABB tree
typedef CGAL::AABB_face_graph_triangle_primitive<SMesh> Primitive;
@ -273,7 +278,7 @@ SMesh* poisson_reconstruct(Point_set& points,
else
{
//***************************************
// Surface mesh generation
// Surface mesh generation using Mesh_3
//***************************************
std::cerr << "Surface meshing...\n";
@ -301,45 +306,43 @@ SMesh* poisson_reconstruct(Point_set& points,
// conservative bounding sphere centered at inner point.
Kernel::FT sm_sphere_radius = 5.0 * radius;
Kernel::FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
Surface_3 surface(function,
Kernel::Sphere_3(inner_point,sm_sphere_radius*sm_sphere_radius),
sm_dichotomy_error/sm_sphere_radius);
// Defines surface mesh generation criteria
CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle, // Min triangle angle (degrees)
sm_radius*average_spacing, // Max triangle size
sm_distance*average_spacing); // Approximation error
Mesh_criteria criteria(CGAL::parameters::facet_angle = sm_angle,
CGAL::parameters::facet_size = sm_radius*average_spacing,
CGAL::parameters::facet_distance = sm_distance*average_spacing);
CGAL_TRACE_STREAM << " make_surface_mesh(sphere center=("<<inner_point << "),\n"
<< " sphere radius="<<sm_sphere_radius<<",\n"
<< " angle="<<sm_angle << " degrees,\n"
<< " triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
<< " distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
<< " dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
<< " Manifold_with_boundary_tag)\n";
CGAL_TRACE_STREAM << " make_mesh_3 with\n"
<< " \t sphere center = ("<<inner_point << "), \n"
<< " \t sphere radius="<<sm_sphere_radius<<",\n"
<< " \t angle="<<sm_angle << " degrees,\n"
<< " \t triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
<< " \t distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
<< " \t dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
<< " \t Manifold_with_boundary_tag\n";
// Generates surface mesh with manifold option
STr tr; // 3D Delaunay triangulation for surface mesh generation
C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
CGAL::make_surface_mesh(c2t3, // reconstructed mesh
surface, // implicit surface
criteria, // meshing criteria
CGAL::Manifold_with_boundary_tag()); // require manifold mesh
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, bsphere,
CGAL::parameters::relative_error_bound(sm_dichotomy_error / sm_sphere_radius));
// Generates mesh with manifold option
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
CGAL::parameters::no_exude().no_perturb()
.manifold_with_boundary());
// Prints status
std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
<< tr.number_of_vertices() << " output vertices"
<< c3t3.triangulation().number_of_vertices() << " output vertices"
<< std::endl;
task_timer.reset();
if(tr.number_of_vertices() == 0)
if(c3t3.triangulation().number_of_vertices() == 0)
{
delete mesh;
return nullptr;
}
// Converts to polyhedron
CGAL::facets_in_complex_2_to_triangle_mesh(c2t3, *mesh);
CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, *mesh);
// Prints total reconstruction duration
std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";

View File

@ -13,17 +13,22 @@
#include <CGAL/AABB_traits_3.h>
#include <CGAL/AABB_face_graph_triangle_primitive.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Timer.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/make_surface_mesh.h>
#include <CGAL/Poisson_implicit_surface_3.h>
#include <CGAL/IO/facets_in_complex_2_to_triangle_mesh.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/IO/read_points.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
#include <CGAL/Timer.h>
#include <deque>
#include <cstdlib>
#include <fstream>
@ -50,10 +55,11 @@ typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// Poisson implicit function
typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
// Surface mesher
typedef CGAL::Surface_mesh_default_triangulation_3 STr;
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
typedef CGAL::Poisson_implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
// Mesh_3
typedef CGAL::Labeled_mesh_domain_3<Kernel> Mesh_domain;
typedef typename CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
// AABB tree
typedef CGAL::AABB_face_graph_triangle_primitive<Polyhedron> Primitive;
@ -304,36 +310,33 @@ int main(int argc, char * argv[])
Sphere bsphere = function.bounding_sphere();
FT radius = std::sqrt(bsphere.squared_radius());
// Defines the implicit surface: requires defining a
// conservative bounding sphere centered at inner point.
FT sm_sphere_radius = 5.0 * radius;
FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
Surface_3 surface(function,
Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
sm_dichotomy_error/sm_sphere_radius);
// Defines surface mesh generation criteria
CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle, // Min triangle angle (degrees)
sm_radius*average_spacing, // Max triangle size
sm_distance*average_spacing); // Approximation error
// Defines generation criteria
Mesh_criteria criteria(CGAL::parameters::facet_angle = sm_angle,
CGAL::parameters::facet_size = sm_radius*average_spacing,
CGAL::parameters::facet_distance = sm_distance*average_spacing);
std::cerr << " make_surface_mesh(sphere center=("<<inner_point << "),\n"
std::cerr << " make_mesh_3 with sphere center=("<<inner_point << "),\n"
<< " sphere radius="<<sm_sphere_radius<<",\n"
<< " angle="<<sm_angle << " degrees,\n"
<< " triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
<< " distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
<< " dichotomy error=distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
<< " Manifold_with_boundary_tag)\n";
<< " manifold_with_boundary()\n";
// Generates surface mesh with manifold option
STr tr; // 3D Delaunay triangulation for surface mesh generation
C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
CGAL::make_surface_mesh(c2t3, // reconstructed mesh
surface, // implicit surface
criteria, // meshing criteria
CGAL::Manifold_with_boundary_tag()); // require manifold mesh
// Defines mesh domain
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, bsphere,
CGAL::parameters::relative_error_bound(sm_dichotomy_error / sm_sphere_radius));
// Generates mesh with manifold option
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
CGAL::parameters::no_exude().no_perturb()
.manifold_with_boundary());
// Prints status
const Tr& tr = c3t3.triangulation();
std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
<< tr.number_of_vertices() << " output vertices"
<< std::endl;
@ -344,7 +347,7 @@ int main(int argc, char * argv[])
// Converts to polyhedron
Polyhedron output_mesh;
CGAL::facets_in_complex_2_to_triangle_mesh(c2t3, output_mesh);
CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, output_mesh);
// Prints total reconstruction duration
std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";

View File

@ -1,10 +1,14 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/make_surface_mesh.h>
#include <CGAL/Implicit_surface_3.h>
#include <CGAL/IO/facets_in_complex_2_to_triangle_mesh.h>
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>
#include <CGAL/property_map.h>
#include <CGAL/IO/read_points.h>
#include <CGAL/compute_average_spacing.h>
@ -28,9 +32,10 @@ typedef Kernel::Sphere_3 Sphere;
typedef std::vector<Point_with_normal> PointList;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
typedef CGAL::Surface_mesh_default_triangulation_3 STr;
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
typedef CGAL::Labeled_mesh_domain_3<Kernel> Mesh_domain;
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
int main(void)
{
@ -67,40 +72,35 @@ int main(void)
(points, 6 /* knn = 1 ring */,
CGAL::parameters::point_map (Point_map()));
// Gets one point inside the implicit surface
// and computes implicit function bounding sphere radius.
Point inner_point = function.get_inner_point();
//Computes implicit function bounding sphere radius.
Sphere bsphere = function.bounding_sphere();
FT radius = std::sqrt(bsphere.squared_radius());
// Defines the implicit surface: requires defining a
// conservative bounding sphere centered at inner point.
FT sm_sphere_radius = 5.0 * radius;
FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
Surface_3 surface(function,
Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),
sm_dichotomy_error/sm_sphere_radius);
// Defines surface mesh generation criteria
CGAL::Surface_mesh_default_criteria_3<STr> criteria(sm_angle, // Min triangle angle (degrees)
sm_radius*average_spacing, // Max triangle size
sm_distance*average_spacing); // Approximation error
Mesh_criteria criteria(CGAL::parameters::facet_angle = sm_angle,
CGAL::parameters::facet_size = sm_radius*average_spacing,
CGAL::parameters::facet_distance = sm_distance*average_spacing);
// Generates surface mesh with manifold option
STr tr; // 3D Delaunay triangulation for surface mesh generation
C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
CGAL::make_surface_mesh(c2t3, // reconstructed mesh
surface, // implicit surface
criteria, // meshing criteria
CGAL::Manifold_with_boundary_tag()); // require manifold mesh
// Defines mesh domain
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, bsphere,
CGAL::parameters::relative_error_bound(sm_dichotomy_error / sm_sphere_radius));
// Generates mesh with manifold option
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
CGAL::parameters::no_exude().no_perturb()
.manifold_with_boundary());
const Tr& tr = c3t3.triangulation();
if(tr.number_of_vertices() == 0)
return EXIT_FAILURE;
// saves reconstructed surface mesh
std::ofstream out("kitten_poisson-20-30-0.375.off");
Polyhedron output_mesh;
CGAL::facets_in_complex_2_to_triangle_mesh(c2t3, output_mesh);
CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, output_mesh);
out << output_mesh;

View File

@ -109,15 +109,6 @@ namespace CGAL {
return surface(f, sphere, error_bound);
}
// template <typename GT, typename Function>
// struct Surface_mesh_traits_generator_3<Poisson_implicit_surface_3<GT, Function> >
// {
// typedef Poisson_implicit_surface_3<GT, Function> Surface_type;
// typedef typename Surface_mesher::Poisson_implicit_surface_oracle_3<GT,
// Surface_type> Type;
// typedef Type type; // Boost meta-programming compatibility
// };
// non documented class
template <typename FT, typename Point>
class Poisson_implicit_function_wrapper : public CGAL::cpp98::unary_function<Point, FT>

View File

@ -260,7 +260,10 @@ private:
Cell_handle get() const
{
return Triangulation_data_structure::Cell_range::s_iterator_to(*m_cell);
if(m_cell == nullptr)
return {};
else
return Triangulation_data_structure::Cell_range::s_iterator_to(*m_cell);
}
void set (Cell_handle ch) { m_cell = ch.operator->(); }
};

View File

@ -0,0 +1,49 @@
// Copyright (c) 2006-2007 INRIA Sophia-Antipolis (France).
// Copyright (c) 2024 GeometryFactory Sarl (France)
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Laurent Rineau, Jane Tournois
// This file is a copy-paste-adaptation of Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h
// Surface_mesher that has been deprecated and will be removed in the future.
#ifndef CGAL_POISSON_MESH_TRAITS_GENERATOR_3_H
#define CGAL_POISSON_MESH_TRAITS_GENERATOR_3_H
#include <CGAL/license/Poisson_surface_reconstruction_3.h>
#include <CGAL/Poisson_surface_reconstruction_3/internal/Poisson_sphere_oracle_3.h>
namespace CGAL {
template <class K>
class Sphere_3;
/** Default traits class.
* Partial specialization will be in other headers
*/
template <typename Surface>
struct Poisson_mesh_traits_generator_3
{
typedef typename Surface::Surface_mesher_traits_3 Type;
typedef Type type; // for Boost compatibility (meta-programming)
};
// specialization for Kernel::Sphere_3
template <typename Kernel>
struct Poisson_mesh_traits_generator_3<CGAL::Sphere_3<Kernel> >
{
typedef Surface_mesher::Poisson_sphere_oracle_3<Kernel> Type;
typedef Type type; // for Boost compatibility (meta-programming)
};
} // end namespace CGAL
#endif // CGAL_POISSON_MESH_TRAITS_GENERATOR_3_H

View File

@ -0,0 +1,468 @@
// Copyright (c) 2006-2007 INRIA Sophia-Antipolis (France).
// Copyright (c) 2024 GeometryFactory Sarl (France)
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Laurent RINEAU
// This file is a copy-paste-adaptation of Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h
// Surface_mesher that has been deprecated and will be removed in the future.
#ifndef CGAL_POISSON_SURFACE_MESHER_POISSON_SPHERE_ORACLE_3_H
#define CGAL_POISSON_SURFACE_MESHER_POISSON_SPHERE_ORACLE_3_H
#include <CGAL/license/Poisson_surface_reconstruction_3.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/number_utils.h>
#include <CGAL/Origin.h>
#include <boost/tuple/tuple.hpp>
namespace CGAL {
namespace Surface_mesher {
struct Poisson_null_oracle_visitor
{
template <class P>
void new_point(P&) const
{
}
};
template <
class GT,
class Point_creator = Creator_uniform_3<typename GT::FT,
typename GT::Point_3>,
class Visitor = Poisson_null_oracle_visitor
>
class Poisson_sphere_oracle_3
{
// private types
typedef Poisson_sphere_oracle_3<GT, Point_creator, Visitor> Self;
typedef typename GT::Point_3 Point;
typedef typename GT::FT FT;
typedef typename GT::Sphere_3 Sphere_3;
public:
// Public types
typedef GT Geom_traits;
typedef typename GT::Point_3 Point_3;
typedef typename GT::Segment_3 Segment_3;
typedef typename GT::Ray_3 Ray_3;
typedef typename GT::Line_3 Line_3;
typedef Sphere_3 Surface_3;
typedef Point Intersection_point;
private:
// Private members
Visitor visitor; // a visitor that can modify a point, before returning it.
public:
// Constructors
Poisson_sphere_oracle_3 (Visitor visitor_ = Visitor() ) :
visitor(visitor_)
{
#ifdef CGAL_SURFACE_MESHER_DEBUG_CONSTRUCTORS
# ifndef CGAL_SURFACE_MESHER_IMPLICIT_SURFACE_ORACLE_3_H
std::cerr << "CONS: Poisson_sphere_oracle_3\n";
# endif
#endif
}
const Visitor& get_visitor() const
{
return visitor;
}
// Predicates and Constructions
bool is_in_volume(const Surface_3& sphere, const Point& p) const
{
typename GT::Has_on_bounded_side_3 on_bounded_side_of_sphere =
GT().has_on_bounded_side_3_object();
return on_bounded_side_of_sphere(sphere, p);
}
class Intersect_3
{
const Self& oracle;
boost::tuple<int, FT, FT>
intersection_line_sphere_lambda(const Surface_3& sphere,
const Point& a,
const Point& b) const
{
/*
Let the vectorial line equation:
m = a + lambda * ( b - a )
(a, b, and m are points, and lambda if a real.)
Let c be the center of the sphere, of radius r.
The intersection of the line and the sphere is given by:
(c-m)^2 = r^2
That is:
((c-a)^2 - r^2)
- 2 lambda (c-a)*(b-a)
+ lambda^2 (b-a)^2 == 0
(second degre equation)
deltaprime = delta/4 = ((c-a)(b-a))^2 - (b-a)^2 * ( (c-a)^2 -r^2 )
if delta > 0, root_1 = ((c-a)(b-a) - \sqrt(delta/4)) / (b-a)^2
root_2 = ((c-a)(b-a) + \sqrt(delta/4)) / (b-a)^2
(root_1 < root_2)
*/
typedef typename GT::Vector_3 Vector_3;
typename GT::Construct_vector_3 vector =
GT().construct_vector_3_object();
typename GT::Compute_scalar_product_3 scalar_product =
GT().compute_scalar_product_3_object();
typename GT::Compute_squared_distance_3 squared_distance =
GT().compute_squared_distance_3_object();
typename GT::Construct_center_3 center =
GT().construct_center_3_object();
typename GT::Compute_squared_radius_3 squared_radius =
GT().compute_squared_radius_3_object();
const Point c = center(sphere);
const Vector_3 ab = vector(a, b);
const Vector_3 ac = vector(a, c);
const FT ab_ac = scalar_product(ab, ac);
const FT ab2 = squared_distance(a, b);
const FT ac2 = squared_distance(a, c);
const FT r2 = squared_radius(sphere);
const FT deltaprime = ab_ac * ab_ac - ab2 * ( ac2 - r2 );
switch( CGAL::sign(deltaprime) )
{
case ZERO:
return boost::make_tuple(1, ab_ac / ab2, 0);
case POSITIVE:
{
const FT sqrt_deltaprime = CGAL::sqrt(deltaprime);
return boost::make_tuple(2,
(ab_ac - sqrt_deltaprime) / ab2,
(ab_ac + sqrt_deltaprime) / ab2);
}
case NEGATIVE:
break;
}
return boost::make_tuple(0, 0, 0);
} //end intersection_line_sphere_lambda
template <class Assert_on_lambda>
Object private_intersection(const Surface_3& sphere,
const Point& a,
const Point& b,
Assert_on_lambda test) const
{
typedef typename GT::Vector_3 Vector;
typename GT::Construct_vector_3 vector =
GT().construct_vector_3_object();
typename GT::Construct_scaled_vector_3 scaled_vector =
GT().construct_scaled_vector_3_object();
typename GT::Construct_translated_point_3 translated_point =
GT().construct_translated_point_3_object();
int number_of_roots;
FT root_1, root_2;
boost::tie(number_of_roots, root_1, root_2) =
intersection_line_sphere_lambda(sphere, a, b);
const Vector ab = vector(a, b);
if(number_of_roots > 0 && test(root_1))
{
Point p = translated_point(a, scaled_vector(ab, root_1));
oracle.get_visitor().new_point(p);
return make_object(p);
}
else if (number_of_roots > 1 && test(root_2))
{
Point p = translated_point(a, scaled_vector(ab, root_2));
oracle.get_visitor().new_point(p);
return make_object(p);
}
// else
return Object();
} // end private_intersection
struct Lambda_between_0_and_1 : public CGAL::cpp98::unary_function<FT, bool>
{
bool operator()(const FT x) const
{
return FT(0) <= x && x <= FT(1);
}
};
struct Lambda_positive : public CGAL::cpp98::unary_function<FT, bool>
{
bool operator()(const FT x) const
{
return FT(0) <= x;
}
};
struct Always_true : public CGAL::cpp98::unary_function<FT, bool>
{
bool operator()(const FT) const
{
return true;
}
};
public:
Intersect_3(const Self& oracle) : oracle(oracle)
{
}
Object operator()(const Surface_3& sphere, Segment_3 s) const
{
typename GT::Construct_point_on_3 point_on =
GT().construct_point_on_3_object();
const Point& a = point_on(s, 0);
const Point& b = point_on(s, 1);
return private_intersection(sphere, a, b, Lambda_between_0_and_1());
} // end operator()(Surface_3, Segment_3)
Object operator()(const Surface_3& sphere, const Ray_3& r) const {
typename GT::Construct_point_on_3 point_on =
GT().construct_point_on_3_object();
const Point& a = point_on(r, 0);
const Point& b = point_on(r, 1);
return private_intersection(sphere, a, b, Lambda_positive());
} // end operator()(Surface_3, Ray_3)
Object operator()(const Surface_3& sphere, const Line_3& l) const {
typename GT::Construct_point_on_3 point_on =
GT().construct_point_on_3_object();
const Point& a = point_on(l, 0);
const Point& b = point_on(l, 1);
return private_intersection(sphere, a, b, Always_true());
} // end operator()(Surface_3, Line_3)
/** Modifies s = [a, b] by clipping it to sphere.
Return false iff s is outside sphere. */
bool clip_segment(const Surface_3& sphere,
Point_3& a,
Point_3& b) const
{
typedef typename GT::Vector_3 Vector;
typename GT::Has_on_bounded_side_3 on_bounded_side_of_sphere =
GT().has_on_bounded_side_3_object();
typename GT::Construct_vector_3 vector =
GT().construct_vector_3_object();
typename GT::Construct_scaled_vector_3 scaled_vector =
GT().construct_scaled_vector_3_object();
typename GT::Construct_translated_point_3 translated_point =
GT().construct_translated_point_3_object();
const bool a_in_sphere = on_bounded_side_of_sphere(sphere, a);
const bool b_in_sphere = on_bounded_side_of_sphere(sphere, b);
if( a_in_sphere && b_in_sphere )
return true;
int number_of_roots;
FT root_1, root_2;
boost::tie(number_of_roots, root_1, root_2) =
intersection_line_sphere_lambda(sphere, a, b);
#ifdef CGAL_SURFACE_MESHER_DEBUG_IMPLICIT_ORACLE
std::cerr << "Clip segment. Roots=("
<< root_1 << ", " << root_2 << ")\n";
#endif
if( number_of_roots < 2 )
return false;
if( root_1 > FT(1) ) // root_x \in ]1,\infinity[
return false; // no intersection
if( root_1 >= FT(0) ) // root_1 \in [0,1[
{ // move point a
const Point original_a = a;
const Vector ab = vector(a, b);
a = translated_point(original_a, scaled_vector(ab, root_1));
if( root_2 <= FT(1) ) /// move b if root_2 <=1
{
b = translated_point(original_a, scaled_vector(ab, root_2));
}
return true;
}
else // root_1 in ]-\infinity, 0[
{ // do not move point a
if( root_2 < FT(0) ) // root_x in ]-\infinity, 0[
return false; // no intersection
else
{
const Vector ab = vector(a, b);
if( root_2 <= FT(1) )
b = translated_point(a, scaled_vector(ab, root_2));
return true;
}
}
}
/** The return value s is r clipped to sphere.
Return false iff r does not intersect sphere. */
bool clip_ray(const Surface_3& sphere,
const Ray_3& r,
Point_3& a,
Point_3& b) const
{
typedef typename GT::Vector_3 Vector;
typename GT::Construct_point_on_3 point_on =
GT().construct_point_on_3_object();
typename GT::Construct_vector_3 vector =
GT().construct_vector_3_object();
typename GT::Construct_scaled_vector_3 scaled_vector =
GT().construct_scaled_vector_3_object();
typename GT::Construct_translated_point_3 translated_point =
GT().construct_translated_point_3_object();
a = point_on(r, 0);
b = point_on(r, 1);
int number_of_roots;
FT root_1, root_2;
boost::tie(number_of_roots, root_1, root_2) =
intersection_line_sphere_lambda(sphere, a, b);
if( number_of_roots == 2 && root_2 > FT(0) )
{
const Vector ab = vector(a, b);
b = translated_point(a, scaled_vector(ab, root_2));
if(root_1 > FT(0))
a = translated_point(a, scaled_vector(ab, root_1));
// if root_1 <= 0, a is in the ball
return true;
}
// else r does not intersect the sphere
return false;
} // end clip_ray
/** The return value s=(ab) is l clipped to sphere.
Return false iff l does not intersect sphere. */
bool clip_line(const Surface_3& sphere, const Line_3& l,
Point& a,
Point& b) const
{
typedef typename GT::Vector_3 Vector;
typename GT::Construct_point_on_3 point_on =
GT().construct_point_on_3_object();
typename GT::Construct_vector_3 vector =
GT().construct_vector_3_object();
typename GT::Construct_scaled_vector_3 scaled_vector =
GT().construct_scaled_vector_3_object();
typename GT::Construct_translated_point_3 translated_point =
GT().construct_translated_point_3_object();
a = point_on(l, 0);
b = point_on(l, 1);
int number_of_roots;
FT root_1, root_2;
boost::tie(number_of_roots, root_1, root_2) =
intersection_line_sphere_lambda(sphere, a, b);
if( number_of_roots == 2 )
{
const Point original_a = a;
const Vector ab = vector(a, b);
a = translated_point(original_a, scaled_vector(ab, root_1));
b = translated_point(original_a, scaled_vector(ab, root_2));
return true;
}
// else l does not intersect the sphere
return false;
} // end clip_line
}; // end nested class Intersect_3
class Construct_initial_points
{
const Self& oracle;
public:
Construct_initial_points(const Self& oracle) : oracle(oracle)
{
}
// Random points
template <typename OutputIteratorPoints>
OutputIteratorPoints operator() (const Surface_3& sphere,
OutputIteratorPoints out,
int n = 20) const // WARNING: why 20?
{
const Point center =
GT().construct_center_3_object()(sphere);
const FT squared_radius =
GT().compute_squared_radius_3_object()(sphere);
const double radius_in_double =
CGAL::sqrt(CGAL::to_double(squared_radius));
typename CGAL::Random_points_on_sphere_3<Point,
Point_creator> random_point_on_sphere(radius_in_double);
typename GT::Construct_vector_3 vector_3 =
GT().construct_vector_3_object();
typename GT::Construct_translated_point_3 translate =
GT().construct_translated_point_3_object();
while (n-->0)
{
Point p = translate(*random_point_on_sphere++,
vector_3(CGAL::ORIGIN, center));
oracle.get_visitor().new_point(p);
*out++ = p;
}
return out;
}
}; // end nested class Construct_initial_points
Construct_initial_points construct_initial_points_object() const
{
return Construct_initial_points(*this);
}
Intersect_3 intersect_3_object() const
{
return Intersect_3(*this);
}
}; // end Poisson_sphere_oracle_3
} // namespace Surface_mesher
} // namespace CGAL
#include <CGAL/enable_warnings.h>
#endif // CGAL_POISSON_SURFACE_MESHER_POISSON_SPHERE_ORACLE_3_H

View File

@ -1,5 +1,5 @@
// Copyright (c) 2003-2007 INRIA Sophia-Antipolis (France).
// Copyright (c) 2008,2011 GeometryFactory Sarl (France)
// Copyright (c) 2008,2011,2024 GeometryFactory Sarl (France)
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
@ -17,9 +17,8 @@
#include <CGAL/license/Poisson_surface_reconstruction_3.h>
#include <CGAL/Surface_mesher/Null_oracle_visitor.h>
#include <CGAL/point_generators_3.h>
#include <CGAL/Surface_mesher/Sphere_oracle_3.h>
#include <CGAL/Poisson_surface_reconstruction_3/internal/Poisson_sphere_oracle_3.h>
#include <CGAL/Surface_mesher/Implicit_surface_oracle_3.h>
#include <CGAL/Real_embeddable_traits.h>
#include <CGAL/squared_distance_3.h>
@ -56,7 +55,7 @@ namespace CGAL {
Return_min<typename Transform_functor_::result_type>,
class Point_creator = Creator_uniform_3<typename GT::FT,
typename GT::Point_3>,
class Visitor = Null_oracle_visitor
class Visitor = Poisson_null_oracle_visitor
>
class Poisson_implicit_surface_oracle_3
{
@ -68,7 +67,7 @@ namespace CGAL {
Point_creator,
Visitor> Self;
typedef Sphere_oracle_3<GT, Point_creator> Sphere_oracle;
typedef Poisson_sphere_oracle_3<GT, Point_creator> Sphere_oracle;
typedef typename GT::Point_3 Point;

View File

@ -21,7 +21,7 @@
#include <CGAL/Mesh_3/Poisson_refine_cells_3.h>
#include <CGAL/Poisson_mesh_cell_criteria_3.h>
#include <CGAL/assertions.h>
#include <CGAL/Surface_mesh_traits_generator_3.h>
#include <CGAL/Poisson_surface_reconstruction_3/internal/Poisson_mesh_traits_generator_3.h>
namespace CGAL {
@ -142,7 +142,7 @@ private:
template <typename Tr,
typename Criteria,
typename Surface,
typename Oracle = typename CGAL::Surface_mesh_traits_generator_3<Surface>::type,
typename Oracle = typename CGAL::Poisson_mesh_traits_generator_3<Surface>::type,
typename PreviousLevel = Null_mesher_level
>
class Poisson_mesher_level :
@ -220,7 +220,7 @@ unsigned int poisson_refine_triangulation(
, Sizing_field
, Second_sizing_field
> Tets_criteria;
typedef typename CGAL::Surface_mesh_traits_generator_3<Surface>::type Oracle;
typedef typename CGAL::Poisson_mesh_traits_generator_3<Surface>::type Oracle;
typedef Poisson_mesher_level<Tr, Tets_criteria, Surface, Oracle, Null_mesher_level> Refiner;

View File

@ -1,4 +1,4 @@
// Copyright (c) 2017 GeometryFactory (France)
// Copyright (c) 2017, 2024 GeometryFactory (France)
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
@ -7,17 +7,19 @@
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Simon Giraudot
// Author(s) : Simon Giraudot, Jane Tournois
#ifndef CGAL_POISSON_SURFACE_RECONSTRUCTION_H
#define CGAL_POISSON_SURFACE_RECONSTRUCTION_H
#include <CGAL/license/Poisson_surface_reconstruction_3.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/make_surface_mesh.h>
#include <CGAL/Implicit_surface_3.h>
#include <CGAL/IO/facets_in_complex_2_to_triangle_mesh.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/property_map.h>
@ -97,9 +99,10 @@ namespace CGAL {
typedef typename Kernel::FT FT;
typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
typedef typename CGAL::Surface_mesher::Surface_mesh_default_triangulation_3_generator<Kernel>::Type STr;
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
typedef CGAL::Implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
typedef CGAL::Labeled_mesh_domain_3<Kernel> Mesh_domain;
typedef typename CGAL::Mesh_triangulation_3<Mesh_domain, CGAL::Default, Sequential_tag>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
Poisson_reconstruction_function function(begin, end, point_map, normal_map);
if ( ! function.compute_implicit_function() )
@ -112,26 +115,34 @@ namespace CGAL {
FT sm_sphere_radius = 5.0 * radius;
FT sm_dichotomy_error = sm_distance * spacing / 1000.0;
Surface_3 surface(function,
Sphere (inner_point, sm_sphere_radius * sm_sphere_radius),
sm_dichotomy_error / sm_sphere_radius);
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, Sphere(inner_point, sm_sphere_radius),
CGAL::parameters::relative_error_bound(sm_dichotomy_error / sm_sphere_radius));
CGAL::Surface_mesh_default_criteria_3<STr> criteria (sm_angle,
sm_radius * spacing,
sm_distance * spacing);
Mesh_criteria criteria(CGAL::parameters::facet_angle = sm_angle,
CGAL::parameters::facet_size = sm_radius*spacing,
CGAL::parameters::facet_distance = sm_distance*spacing);
STr tr;
C2t3 c2t3(tr);
CGAL::make_surface_mesh(c2t3,
surface,
criteria,
tag);
auto turn_tag_into_mesh_3_manifold_option = [](Tag) {
if constexpr (std::is_same_v<Tag, CGAL::Manifold_with_boundary_tag>)
return CGAL::parameters::manifold_with_boundary();
else if constexpr (std::is_same_v<Tag, CGAL::Manifold_tag>)
return CGAL::parameters::manifold();
else
return CGAL::parameters::non_manifold();
};
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
turn_tag_into_mesh_3_manifold_option(tag)
.no_exude().no_perturb()
.manifold_with_boundary());
const auto& tr = c3t3.triangulation();
if(tr.number_of_vertices() == 0)
return false;
CGAL::facets_in_complex_2_to_triangle_mesh(c2t3, output_mesh);
CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, output_mesh);
return true;
}

View File

@ -1,9 +1,12 @@
AABB_tree
Algebraic_foundations
Arithmetic_kernel
BGL
CGAL_Core
CGAL_ImageIO
Cartesian_kernel
Circulator
Convex_hull_2
Distance_2
Distance_3
Filtered_kernel
@ -16,15 +19,19 @@ Intersections_3
Interval_support
Kernel_23
Kernel_d
Mesh_3
Mesher_level
Modular_arithmetic
Number_types
Point_set_processing_3
Poisson_surface_reconstruction_3
Polygon_mesh_processing
Principal_component_analysis
Principal_component_analysis_LGPL
Profiling_tools
Property_map
Random_numbers
SMDS_3
STL_Extension
Solver_interface
Spatial_searching

View File

@ -22,8 +22,14 @@ find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
# Executables that require Eigen 3.1
create_single_source_cgal_program("poisson_reconstruction_test.cpp")
target_link_libraries(poisson_reconstruction_test PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("poisson_reconstruction_test_surface_mesher.cpp")
target_link_libraries(poisson_reconstruction_test_surface_mesher PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("poisson_reconstruction_test_mesh_3.cpp")
target_link_libraries(poisson_reconstruction_test_mesh_3 PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("compare_mesh_3_vs_Poisson_implicit_surface_3.cpp")
target_link_libraries(compare_mesh_3_vs_Poisson_implicit_surface_3 PUBLIC CGAL::Eigen3_support)
find_package(TBB QUIET)
include(CGAL_TBB_support)
@ -36,3 +42,4 @@ if(TARGET CGAL::Eigen3_support)
else()
message("NOTICE: Tests in this directory require Eigen 3.1 (or greater), and will not be compiled.")
endif()

View File

@ -0,0 +1,424 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
//----------------------------------------------------------
// Compares Poisson using Mesh_3
// VS Poisson using Surface_mesher and Poisson_implicit_surface_3
// see issue https://github.com/CGAL/cgal/issues/8266
//----------------------------------------------------------
// CGAL
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/make_surface_mesh.h>
#include <CGAL/IO/facets_in_complex_2_to_triangle_mesh.h>
#include <CGAL/Poisson_implicit_surface_3.h>
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/IO/read_points.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
#include <CGAL/Timer.h>
#include <deque>
#include <cstdlib>
#include <fstream>
#include <math.h>
// ----------------------------------------------------------------------------
// Types
// ----------------------------------------------------------------------------
// kernel
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
// Simple geometric types
typedef Kernel::FT FT;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef std::pair<Point, Vector> Point_with_normal;
typedef Kernel::Sphere_3 Sphere;
typedef std::deque<Point_with_normal> PointList;
// polyhedron
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// Poisson implicit function
typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
typedef CGAL::Poisson_implicit_surface_3<Kernel, Poisson_reconstruction_function> Surface_3;
// Surface mesher
typedef CGAL::Surface_mesh_default_triangulation_3 STr;
typedef CGAL::Surface_mesh_complex_2_in_triangulation_3<STr> C2t3;
// Mesh_3
typedef CGAL::Labeled_mesh_domain_3<Kernel> Mesh_domain;
typedef typename CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
struct Counter {
std::size_t i, N;
Counter(std::size_t N)
: i(0), N(N)
{}
void operator()()
{
i++;
if(i == N){
std::cerr << "Counter reached " << N << std::endl;
}
}
};
struct InsertVisitor {
Counter& c;
InsertVisitor(Counter& c)
: c(c)
{}
void before_insertion()
{
c();
}
};
// ----------------------------------------------------------------------------
// main()
// ----------------------------------------------------------------------------
int main(int argc, char * argv[])
{
CGAL::get_default_random() = CGAL::Random(0);
std::cerr << "Poisson Delaunay Reconstruction method" << std::endl;
//***************************************
// decode parameters
//***************************************
// usage
if(argc == 1)
{
std::cerr << "Reads a point set or a mesh's set of vertices, reconstructs a surface using Poisson,\n";
std::cerr << "and saves the surface.\n";
std::cerr << "\n";
std::cerr << "Usage: " << argv[0] << " [file_in] [file_out] [options]\n";
std::cerr << "Input file formats are .off (mesh) and .xyz or .pwn (point set).\n";
std::cerr << "Output file format is .off.\n";
std::cerr << "Options:\n";
std::cerr << " -sm_radius <float> Radius upper bound (default=100 * average spacing)\n";
std::cerr << " -sm_distance <float> Distance upper bound (default=0.25 * average spacing)\n";
std::cerr << " -frac <float> factor appplied to sm_radius (default = 1.)\n";
std::cerr << "Running " << argv[0] << "data/kitten.xyz kitten_poisson-20-100-0.5.off -sm_distance 0.5\n";
}
// Poisson options
FT sm_angle = 20.0; // Min triangle angle (degrees).
FT sm_radius = 100; // Max triangle size w.r.t. point set average spacing.
FT sm_distance = 0.25; // Approximation error w.r.t. point set average spacing.
std::string solver_name = "eigen"; // Sparse linear solver name.
double approximation_ratio = 0.02;
double average_spacing_ratio = 5;
double frac = 1.;
// decode parameters
std::string input_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/kitten.xyz");
std::string output_filename = (argc > 2) ? argv[2] : "kitten_poisson-20-100-0.5.off";
for (int i=3; i+1<argc ; ++i)
{
if (std::string(argv[i]) == "-sm_radius")
sm_radius = atof(argv[++i]);
else if (std::string(argv[i]) == "-sm_distance")
sm_distance = atof(argv[++i]);
else if (std::string(argv[i]) == "-solver")
solver_name = argv[++i];
else if (std::string(argv[i]) == "-approx")
approximation_ratio = atof(argv[++i]);
else if (std::string(argv[i]) == "-ratio")
average_spacing_ratio = atof(argv[++i]);
else if (std::string(argv[i]) == "-frac")
frac = atof(argv[++i]);
else {
std::cerr << "Error: invalid option " << argv[i] << "\n";
return EXIT_FAILURE;
}
}
if (argc == 1) sm_distance = 0.5;
const std::size_t last_dot = output_filename.find_last_of(".");
const std::string output_extension = output_filename.substr(last_dot);
const std::string output_basename = output_filename.substr(0, last_dot);
CGAL::Timer task_timer; task_timer.start();
//***************************************
// Loads mesh/point set
//***************************************
PointList points;
// If OFF file format
std::cerr << "Open " << input_filename << " for reading..." << std::endl;
std::string extension = input_filename.substr(input_filename.find_last_of('.'));
if (extension == ".off" || extension == ".OFF")
{
// Reads the mesh file in a polyhedron
std::ifstream stream(input_filename.c_str());
Polyhedron input_mesh;
CGAL::scan_OFF(stream, input_mesh, true /* verbose */);
if(!stream || !input_mesh.is_valid() || input_mesh.empty())
{
std::cerr << "Error: cannot read file " << input_filename << std::endl;
return EXIT_FAILURE;
}
// Converts Polyhedron vertices to point set.
// Computes vertices normal from connectivity.
for(boost::graph_traits<Polyhedron>::vertex_descriptor v :
vertices(input_mesh)){
const Point& p = v->point();
Vector n = CGAL::Polygon_mesh_processing::compute_vertex_normal(v,input_mesh);
points.push_back(std::make_pair(p,n));
}
}
// If XYZ file format
else if (extension == ".xyz" || extension == ".XYZ" ||
extension == ".pwn" || extension == ".PWN" ||
extension == ".ply" || extension == ".PLY")
{
// Reads the point set file in points[].
// Note: read_points() requires an iterator over points
// + property maps to access each point's position and normal.
if (!CGAL::IO::read_points(input_filename.c_str(), std::back_inserter(points),
CGAL::parameters::point_map(CGAL::make_first_of_pair_property_map(Point_with_normal()))
.normal_map(CGAL::make_second_of_pair_property_map(Point_with_normal()))))
{
std::cerr << "Error: cannot read input file!" << input_filename << std::endl;
return EXIT_FAILURE;
}
}
else
{
std::cerr << "Error: cannot read file " << input_filename << std::endl;
return EXIT_FAILURE;
}
// Prints status
std::size_t nb_points = points.size();
std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, "
<< task_timer.time() << " seconds"
<< std::endl;
task_timer.reset();
//***************************************
// Checks requirements
//***************************************
if (nb_points == 0)
{
std::cerr << "Error: empty point set" << std::endl;
return EXIT_FAILURE;
}
bool points_have_normals = (points.begin()->second != CGAL::NULL_VECTOR);
if ( ! points_have_normals )
{
std::cerr << "Input point set not supported: this reconstruction method requires oriented normals" << std::endl;
return EXIT_FAILURE;
}
CGAL::Timer reconstruction_timer; reconstruction_timer.start();
Counter counter(std::distance(points.begin(), points.end()));
InsertVisitor visitor(counter) ;
//***************************************
// Computes implicit function
//***************************************
std::cerr << "\nComputes Poisson implicit function...\n";
// Creates implicit function from the read points.
// Note: this method requires an iterator over points
// + property maps to access each point's position and normal.
Poisson_reconstruction_function function(
points.begin(), points.end(),
CGAL::make_first_of_pair_property_map(Point_with_normal()),
CGAL::make_second_of_pair_property_map(Point_with_normal()),
visitor);
#ifdef CGAL_EIGEN3_ENABLED
{
if (solver_name == "eigen")
{
CGAL::Eigen_solver_traits<Eigen::ConjugateGradient<CGAL::Eigen_sparse_symmetric_matrix<double>::EigenType> > solver;
if ( ! function.compute_implicit_function(solver, visitor,
approximation_ratio,
average_spacing_ratio) )
{
std::cerr << "Error: cannot compute implicit function" << std::endl;
return EXIT_FAILURE;
}
}
else
{
std::cerr << "Error: invalid solver " << solver_name << "\n";
return EXIT_FAILURE;
}
}
#else
{
std::cerr << "Error: invalid solver " << solver_name << "\n";
return EXIT_FAILURE;
}
#endif
// Prints status
std::cerr << "Total implicit function (triangulation+refinement+solver): " << task_timer.time() << " seconds\n";
task_timer.reset();
//***************************************
// Surface mesh generation
//***************************************
std::cerr << std::endl << std::endl;
// Computes average spacing
FT average_spacing = CGAL::compute_average_spacing<CGAL::Sequential_tag>
(points, 6 /* knn = 1 ring */,
CGAL::parameters::point_map (CGAL::make_first_of_pair_property_map(Point_with_normal())));
// Gets one point inside the implicit surface
Point inner_point = function.get_inner_point();
FT inner_point_value = function(inner_point);
if(inner_point_value >= 0.0)
{
std::cerr << "Error: unable to seed (" << inner_point_value << " at inner_point)" << std::endl;
return EXIT_FAILURE;
}
// Gets implicit function's radius
Sphere bsphere = function.bounding_sphere();
FT radius = std::sqrt(bsphere.squared_radius());
// Defines the implicit surface: requires defining a
// conservative bounding sphere centered at inner point.
FT sm_sphere_radius = 5.0 * radius;
FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
// Meshing criteria
const double fangle = sm_angle;
const double fsize = frac * sm_radius * average_spacing;
const double fdist = sm_distance * average_spacing;
const double implicit_function_time = reconstruction_timer.time();
reconstruction_timer.reset();
// MESH_3
{
CGAL::Real_timer meshing_timer;
meshing_timer.start();
std::cout << "* Use Mesh_3 *" << std::endl;
// Defines generation criteria
Mesh_criteria criteria(CGAL::parameters::facet_angle = fangle,
CGAL::parameters::facet_size = fsize,
CGAL::parameters::facet_distance = fdist);
// Defines mesh domain
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, bsphere,
CGAL::parameters::relative_error_bound(sm_dichotomy_error / sm_sphere_radius));
// Generates mesh with manifold option
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
CGAL::parameters::no_exude().no_perturb()
.manifold_with_boundary());
meshing_timer.stop();
const Tr& tr = c3t3.triangulation();
// Prints status
std::cerr << "Mesh_3 meshing: " << meshing_timer.time() << " seconds, "
<< tr.number_of_vertices() << " output vertices"
<< std::endl;
if (tr.number_of_vertices() == 0)
return EXIT_FAILURE;
// Prints total reconstruction duration
reconstruction_timer.stop();
std::cerr << "Total reconstruction (implicit function + meshing): "
<< (implicit_function_time + reconstruction_timer.time()) << " seconds\n";
reconstruction_timer.reset();
// Converts to polyhedron
Polyhedron output_mesh;
CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, output_mesh);
std::ofstream out(output_basename + "_mesh_3.off");
out << output_mesh;
out.close();
}
// SURFACE_MESHER
{
CGAL::Real_timer meshing_timer;
meshing_timer.start();
reconstruction_timer.start();
std::cout << "\n\n* Use Surface_mesher with Poisson_implicit_surface_3 *" << std::endl;
Surface_3 surface(function,
Sphere(inner_point, sm_sphere_radius * sm_sphere_radius),
sm_dichotomy_error / sm_sphere_radius);
// Defines surface mesh generation criteria
CGAL::Surface_mesh_default_criteria_3<STr> criteria(fangle, fsize, fdist);
// Generates surface mesh with manifold option
STr tr; // 3D Delaunay triangulation for surface mesh generation
C2t3 c2t3(tr); // 2D complex in 3D Delaunay triangulation
CGAL::make_surface_mesh(c2t3, // reconstructed mesh
surface, // implicit surface
criteria, // meshing criteria
CGAL::Manifold_with_boundary_tag()); // require manifold mesh
meshing_timer.stop();
// Prints status
std::cerr << "Surface meshing: " << meshing_timer.time() << " seconds, "
<< tr.number_of_vertices() << " output vertices"
<< std::endl;
if (tr.number_of_vertices() == 0)
return EXIT_FAILURE;
// Prints total reconstruction duration
reconstruction_timer.stop();
std::cerr << "Total reconstruction (implicit function + meshing): "
<< (implicit_function_time + reconstruction_timer.time()) << " seconds\n";
Polyhedron output_mesh;
CGAL::facets_in_complex_2_to_triangle_mesh(c2t3, output_mesh);
std::ofstream out(output_basename + "_surface_mesher.off");
out << output_mesh;
out.close();
}
return EXIT_SUCCESS;
}

View File

@ -0,0 +1,300 @@
// poisson_reconstruction_test_mesh_3.cpp
//----------------------------------------------------------
// Test the Poisson Delaunay Reconstruction method:
// For each input point set or mesh's set of vertices, reconstruct a surface.
// No output.
//----------------------------------------------------------
// poisson_reconstruction_test_mesh_3 mesh1.off point_set2.xyz...
// CGAL
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Timer.h>
#include <CGAL/Memory_sizer.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Mesh_triangulation_3.h>
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
#include <CGAL/Mesh_criteria_3.h>
#include <CGAL/Labeled_mesh_domain_3.h>
#include <CGAL/make_mesh_3.h>
#include <CGAL/facets_in_complex_3_to_triangle_mesh.h>
#include <CGAL/Poisson_reconstruction_function.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/property_map.h>
#include <CGAL/IO/read_points.h>
#include <CGAL/compute_average_spacing.h>
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
#include <deque>
#include <cstdlib>
#include <fstream>
#include <math.h>
#include <CGAL/disable_warnings.h>
// ----------------------------------------------------------------------------
// Types
// ----------------------------------------------------------------------------
// kernel
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
// Simple geometric types
typedef Kernel::FT FT;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef CGAL::Point_with_normal_3<Kernel> Point_with_normal;
typedef Kernel::Sphere_3 Sphere;
typedef std::deque<Point_with_normal> PointList;
// polyhedron
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
// Poisson implicit function
typedef CGAL::Poisson_reconstruction_function<Kernel> Poisson_reconstruction_function;
// Mesh_3
typedef CGAL::Labeled_mesh_domain_3<Kernel> Mesh_domain;
typedef CGAL::Mesh_triangulation_3<Mesh_domain>::type Tr;
typedef CGAL::Mesh_complex_3_in_triangulation_3<Tr> C3t3;
typedef CGAL::Mesh_criteria_3<Tr> Mesh_criteria;
namespace params = CGAL::parameters;
// ----------------------------------------------------------------------------
// main()
// ----------------------------------------------------------------------------
int main(int argc, char * argv[])
{
std::cerr << "Test the Poisson Delaunay Reconstruction method" << std::endl;
//***************************************
// decode parameters
//***************************************
// usage
if (argc-1 == 0)
{
std::cerr << "For each input point set or mesh's set of vertices, reconstruct a surface.\n";
std::cerr << "\n";
std::cerr << "Usage: " << argv[0] << " mesh1.off point_set2.xyz..." << std::endl;
std::cerr << "Input file formats are .off (mesh) and .xyz or .pwn (point set).\n";
std::cerr << "No output" << std::endl;
return EXIT_FAILURE;
}
// Poisson options
FT sm_angle = 20.0; // Min triangle angle (degrees).
FT sm_radius = 100; // Max triangle size w.r.t. point set average spacing.
FT sm_distance = 0.5; // Approximation error w.r.t. point set average spacing.
// Accumulated errors
int accumulated_fatal_err = EXIT_SUCCESS;
// Process each input file
for (int i = 1; i <= argc-1; i++)
{
CGAL::Timer task_timer; task_timer.start();
std::cerr << std::endl;
//***************************************
// Loads mesh/point set
//***************************************
// File name is:
std::string input_filename = argv[i];
PointList points;
// If OFF file format
std::cerr << "Open " << input_filename << " for reading..." << std::endl;
std::string extension = input_filename.substr(input_filename.find_last_of('.'));
if (extension == ".off" || extension == ".OFF")
{
// Reads the mesh file in a polyhedron
std::ifstream stream(input_filename.c_str());
Polyhedron input_mesh;
CGAL::scan_OFF(stream, input_mesh, true /* verbose */);
if(!stream || !input_mesh.is_valid() || input_mesh.empty())
{
std::cerr << "Error: cannot read file " << input_filename << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
// Converts Polyhedron vertices to point set.
// Computes vertices normal from connectivity.
for(boost::graph_traits<Polyhedron>::vertex_descriptor v :
vertices(input_mesh)){
const Point& p = v->point();
Vector n = CGAL::Polygon_mesh_processing::compute_vertex_normal(v,input_mesh);
points.push_back(Point_with_normal(p,n));
}
}
// If XYZ file format
else if (extension == ".xyz" || extension == ".XYZ" ||
extension == ".pwn" || extension == ".PWN")
{
// Reads the point set file in points[].
// Note: read_points() requires an iterator over points
// + property maps to access each point's position and normal.
// The position property map can be omitted here as we use iterators over Point_3 elements.
if (!CGAL::IO::read_points(
input_filename.c_str(),
std::back_inserter(points),
CGAL::parameters::normal_map
(CGAL::make_normal_of_point_with_normal_map(PointList::value_type()))
))
{
std::cerr << "Error: cannot read file " << input_filename << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
}
else
{
std::cerr << "Error: cannot read file " << input_filename << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
// Prints status
std::size_t memory = CGAL::Memory_sizer().virtual_size();
std::size_t nb_points = points.size();
std::cerr << "Reads file " << input_filename << ": " << nb_points << " points, "
<< task_timer.time() << " seconds, "
<< (memory>>20) << " Mb allocated"
<< std::endl;
task_timer.reset();
//***************************************
// Checks requirements
//***************************************
if (nb_points == 0)
{
std::cerr << "Error: empty point set" << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
bool points_have_normals = (points.begin()->normal() != CGAL::NULL_VECTOR);
if ( ! points_have_normals )
{
std::cerr << "Input point set not supported: this reconstruction method requires oriented normals" << std::endl;
// this is not a bug => do not set accumulated_fatal_err
continue;
}
CGAL::Timer reconstruction_timer; reconstruction_timer.start();
//***************************************
// Computes implicit function
//***************************************
std::cerr << "Computes Poisson implicit function...\n";
// Creates implicit function from the read points.
// Note: this method requires an iterator over points
// + property maps to access each point's position and normal.
// The position property map can be omitted here as we use iterators over Point_3 elements.
Poisson_reconstruction_function function(
points.begin(), points.end(),
CGAL::make_normal_of_point_with_normal_map(PointList::value_type())
);
// Computes the Poisson indicator function f()
// at each vertex of the triangulation.
if ( ! function.compute_implicit_function() )
{
std::cerr << "Error: cannot compute implicit function" << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
// Prints status
std::cerr << "Total implicit function (triangulation+refinement+solver): " << task_timer.time() << " seconds\n";
task_timer.reset();
//***************************************
// Surface mesh generation
//***************************************
std::cerr << "Surface meshing...\n";
// Computes average spacing
FT average_spacing = CGAL::compute_average_spacing<CGAL::Sequential_tag>(points, 6 /* knn = 1 ring */);
// Gets one point inside the implicit surface
Point inner_point = function.get_inner_point();
FT inner_point_value = function(inner_point);
if(inner_point_value >= 0.0)
{
std::cerr << "Error: unable to seed (" << inner_point_value << " at inner_point)" << std::endl;
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
// Gets implicit function's radius
Sphere bsphere = function.bounding_sphere();
FT radius = std::sqrt(bsphere.squared_radius());
// Defines the implicit surface: requires defining a
// conservative bounding sphere centered at inner point.
FT sm_sphere_radius = 5.0 * radius;
FT sm_dichotomy_error = sm_distance*average_spacing/1000.0; // Dichotomy error must be << sm_distance
// Defines surface mesh generation criteria
Mesh_criteria criteria(params::facet_angle = sm_angle,
params::facet_size = sm_radius*average_spacing,
params::facet_distance = sm_distance*average_spacing);
std::cerr << " make_mesh_3 with sphere center=("<<inner_point << "),\n"
<< " sphere radius="<<sm_sphere_radius<<",\n"
<< " angle="<<sm_angle << " degrees,\n"
<< " triangle size="<<sm_radius<<" * average spacing="<<sm_radius*average_spacing<<",\n"
<< " distance="<<sm_distance<<" * average spacing="<<sm_distance*average_spacing<<",\n"
<< " dichotomy = distance/"<<sm_distance*average_spacing/sm_dichotomy_error<<",\n"
<< " manifold_with_boundary()\n";
// Generates surface mesh with manifold option
Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, bsphere,
params::relative_error_bound(sm_dichotomy_error / sm_sphere_radius));
C3t3 c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria,
params::no_exude().no_perturb().manifold_with_boundary());
// Prints status
/*long*/ memory = CGAL::Memory_sizer().virtual_size();
const Tr& tr = c3t3.triangulation();
std::cerr << "Surface meshing: " << task_timer.time() << " seconds, "
<< tr.number_of_vertices() << " output vertices, "
<< (memory>>20) << " Mb allocated"
<< std::endl;
task_timer.reset();
if(tr.number_of_vertices() == 0) {
accumulated_fatal_err = EXIT_FAILURE;
continue;
}
// Converts to polyhedron
Polyhedron output_mesh;
CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, output_mesh);
// Prints total reconstruction duration
std::cerr << "Total reconstruction (implicit function + meshing): " << reconstruction_timer.time() << " seconds\n";
} // for each input file
std::cerr << std::endl;
// Returns accumulated fatal error
std::cerr << "Tool returned " << accumulated_fatal_err << std::endl;
return accumulated_fatal_err;
}

View File

@ -0,0 +1 @@
${CGAL_DATA_DIR}/meshes/ChineseDragon-10kv.off ${CGAL_DATA_DIR}/points_3/oni.pwn data/robocat_deci.off ${CGAL_DATA_DIR}/points_3/sphere_20k.xyz

View File

@ -8,6 +8,8 @@
// poisson_reconstruction_test mesh1.off point_set2.xyz...
// CGAL
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Timer.h>
#include <CGAL/Memory_sizer.h>

View File

@ -102,3 +102,74 @@ struct Null_tag {
}; /* end Null_tag */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgSTLExtensionUtilities
The class `Manifold_tag` is a tag class used to monitor the
surface meshing algorithm. When instantiated with the tag
`Manifold_tag` the function template
`make_surface_mesh()`
ensures that the output mesh is a manifold surface
without boundary.
\sa `make_surface_mesh()`
\sa `Manifold_with_boundary_tag`
\sa `Non_manifold_tag`
*/
struct Manifold_tag {
}; /* end Manifold_tag */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgSTLExtensionUtilities
The class `Manifold_with_boundary_tag` is a tag class used to monitor the
surface meshing algorithm. When instantiated with the tag
`Manifold_with_boundary_tag`, the function template
`make_surface_mesh()`
ensures that the output mesh is a manifold surface
but it may have boundaries.
\sa `make_surface_mesh()`
\sa `Manifold_tag`
\sa `Non_manifold_tag`
*/
struct Manifold_with_boundary_tag {
}; /* end Manifold_with_boundary_tag */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgSTLExtensionUtilities
The class `Non_manifold_tag` is a tag class used to monitor the
surface meshing algorithm. When instantiated with the tag
`Non_manifold_tag` the function template
`make_surface_mesh()`
does not ensure that the output mesh is a manifold surface.
The manifold property of output mesh
may nevertheless result from the choice of
appropriate meshing criteria.
\sa `make_surface_mesh()`
\sa `Manifold_tag`
\sa `Manifold_with_boundary_tag`
*/
struct Non_manifold_tag {
}; /* end Non_manifold_tag */
} /* end namespace CGAL */

View File

@ -1,7 +1,8 @@
Manual
Circulator
Number_types
Kernel_23
Miscellany
Surface_mesh
BGL
Circulator
Kernel_23
Manual
Miscellany
Number_types
Surface_mesh
Surface_mesher

View File

@ -51,6 +51,11 @@ typedef CGAL::Parallel_tag Parallel_if_available_tag;
typedef CGAL::Sequential_tag Parallel_if_available_tag;
#endif
// For Surface_mesher and Mesh_3
struct Non_manifold_tag {};
struct Manifold_tag {};
struct Manifold_with_boundary_tag {};
// A function that asserts a specific compile time tag
// forcing its two arguments to have equal type.
template <class Base>

View File

@ -136,73 +136,3 @@ int initial_number_of_points = 20 );
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgSurfaceMesher3TagClasses
The class `Manifold_tag` is a tag class used to monitor the
surface meshing algorithm. When instantiated with the tag
`Manifold_tag` the function template
`make_surface_mesh()`
ensures that the output mesh is a manifold surface
without boundary.
\sa `make_surface_mesh()`
\sa `Manifold_with_boundary_tag`
\sa `Non_manifold_tag`
*/
struct Manifold_tag {
}; /* end Manifold_tag */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgSurfaceMesher3TagClasses
The class `Manifold_with_boundary_tag` is a tag class used to monitor the
surface meshing algorithm. When instantiated with the tag
`Manifold_with_boundary_tag`, the function template
`make_surface_mesh()`
ensures that the output mesh is a manifold surface
but it may have boundaries.
\sa `make_surface_mesh()`
\sa `Manifold_tag`
\sa `Non_manifold_tag`
*/
struct Manifold_with_boundary_tag {
}; /* end Manifold_with_boundary_tag */
} /* end namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgSurfaceMesher3TagClasses
The class `Non_manifold_tag` is a tag class used to monitor the
surface meshing algorithm. When instantiated with the tag
`Non_manifold_tag` the function template
`make_surface_mesh()`
does not ensure that the output mesh is a manifold surface.
The manifold property of output mesh
may nevertheless result from the choice of
appropriate meshing criteria.
\sa `make_surface_mesh()`
\sa `Manifold_tag`
\sa `Manifold_with_boundary_tag`
*/
struct Non_manifold_tag {
}; /* end Non_manifold_tag */
} /* end namespace CGAL */

View File

@ -7,10 +7,6 @@
/// \defgroup PkgSurfaceMesher3Classes Mesh and Domain Classes
/// \ingroup PkgSurfaceMesher3Ref
/// \defgroup PkgSurfaceMesher3TagClasses Tag Classes
/// \ingroup PkgSurfaceMesher3Ref
/// \defgroup PkgSurfaceMesher3Functions Functions
/// \ingroup PkgSurfaceMesher3Ref
@ -41,6 +37,9 @@
\cgalPkgShortInfoEnd
\cgalPkgDescriptionEnd
\deprecated This package is deprecated since the version 6.0 of \cgal. The package \ref PkgMesh3 should be used instead.
The surface mesh generation package offers a function template
which builds a triangular mesh approximating a surface.

View File

@ -11,6 +11,8 @@ namespace CGAL {
\image html segmented_head.png
\image latex segmented_head.png
\deprecated This package is deprecated since the version 6.0 of \cgal. The package \ref PkgMesh3 should be used instead.
\section SurfaceMesher_section_intro Introduction
This package provides a function template

View File

@ -1,9 +1,11 @@
Manual
Kernel_23
STL_Extension
Algebraic_foundations
Circulator
Kernel_23
Manual
Mesh_3
Polyhedron
STL_Extension
Stream_support
Triangulation_2
Triangulation_3
Polyhedron

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,3 +1,5 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/Surface_mesh_default_criteria_3.h>
#include <CGAL/Complex_2_in_triangulation_3.h>

View File

@ -1,3 +1,5 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/Complex_2_in_triangulation_3.h>
#include <CGAL/make_surface_mesh.h>

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/AABB_polyhedral_oracle.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <utility>
#include <CGAL/iterator.h>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Complex_2_in_triangulation_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
// TODO: add the iterators

View File

@ -17,6 +17,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Complex_2_in_triangulation_cell_base_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>
#include <bitset>

View File

@ -18,7 +18,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Complex_2_in_triangulation_vertex_base_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Triangulation_vertex_base_3.h>

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Gray_level_image_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/basic.h>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#define CGAL_C2T3_USE_FILE_WRITER_OFF

View File

@ -16,6 +16,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Modifier_base.h>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/IO/Complex_2_in_triangulation_3_to_medit.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <iomanip>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <unordered_map>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/IO/facets_in_complex_2_to_triangle_mesh.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/boost/graph/Euler_operations.h>

View File

@ -14,6 +14,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/IO/output_surface_facets_to_polyhedron.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Polyhedron_3.h>

View File

@ -14,6 +14,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Implicit_surface_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/make_surface_mesh.h>

View File

@ -14,6 +14,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Multi_surface_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
namespace CGAL {

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Point_traits.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Weighted_point_3.h>
#include <CGAL/assertions.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Point_with_psc_localisation.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Point_traits.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Point_with_surface_index.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Point_traits.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Point_with_surface_index_geom_traits.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Point_with_surface_index.h>

View File

@ -20,6 +20,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Robust_circumcenter_traits_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/number_utils_classes.h>
#include <CGAL/Cartesian_converter.h>

View File

@ -14,6 +14,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_cell_base_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Complex_2_in_triangulation_cell_base_3.h>
#include <CGAL/Delaunay_triangulation_cell_base_3.h>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_complex_2_in_triangulation_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Complex_2_in_triangulation_3.h>

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_default_criteria_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Surface_mesher/Standard_criteria.h>
#include <iostream>

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_default_edges_criteria_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Surface_mesher/Surface_mesher_edges_level.h>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_default_triangulation_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
// traits class

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_traits_generator_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Surface_mesher/Sphere_oracle_3.h>

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_triangulation_generator_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Triangulation_data_structure_3.h>
#include <CGAL/Delaunay_triangulation_3.h>

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesh_vertex_base_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Triangulation_vertex_base_3.h>
#include <CGAL/Complex_2_in_triangulation_vertex_base_3.h>

View File

@ -16,6 +16,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Combining_oracle.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <list>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Has_edges.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
namespace CGAL {
namespace Surface_mesher {

View File

@ -16,6 +16,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Implicit_surface_oracle_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Surface_mesher/Null_oracle_visitor.h>

View File

@ -14,6 +14,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Intersection_data_structure_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Segment_tree_k.h>
#include <CGAL/Range_segment_tree_traits.h>

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Null_oracle_visitor.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
namespace CGAL {

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
namespace CGAL {

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Polyhedral_oracle.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <utility>

View File

@ -18,6 +18,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Profile_counter.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Profile_counter.h>

View File

@ -18,6 +18,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Profile_timer.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Profile_timer.h>
#ifdef CGAL_SURFACE_MESHER_PROFILE

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Sphere_oracle_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Surface_mesher/Null_oracle_visitor.h>

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Standard_criteria.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <cmath>
#include <vector>

View File

@ -22,6 +22,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Surface_mesher.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Mesher_level.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Surface_mesher_edges_level.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Mesh_2/Output_stream.h>

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>

View File

@ -16,6 +16,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Surface_mesher_manifold.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Surface_mesher/Surface_mesher_regular_edges.h>

View File

@ -15,6 +15,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Surface_mesher_regular_edges.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/disable_warnings.h>
#include <CGAL/Surface_mesher/Surface_mesher.h>

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Surface_mesher_visitor.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Types_generators.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Meshes/Triangulation_mesher_level_traits_3.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Verbose_flag.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
namespace CGAL {
namespace Surface_mesher {

View File

@ -16,6 +16,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Surface_mesher/Standard_criteria.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Surface_mesher/Standard_criteria.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Surface_mesher_generator.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/Surface_mesher/Surface_mesher.h>
#include <CGAL/Surface_mesher/Surface_mesher_manifold.h>
@ -31,10 +35,6 @@
namespace CGAL {
struct Non_manifold_tag {};
struct Manifold_tag {};
struct Manifold_with_boundary_tag {};
// struct Dynamic_manifold_tag {
// enum Tag { Manifold = 0, Non_manifold = 1, Manifold_with_boundary = 2 };
// };

View File

@ -14,6 +14,11 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/make_piecewise_smooth_surface_mesh.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/make_surface_mesh.h>
#endif //CGAL_MAKE_PIECEWISE_SMOOTH_SURFACE_MESH_H

View File

@ -14,7 +14,12 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/make_surface_mesh.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#include <CGAL/tags.h>
#include <CGAL/Surface_mesher_generator.h>
#include <CGAL/Surface_mesh_complex_2_in_triangulation_3.h>

View File

@ -15,6 +15,10 @@
#include <CGAL/license/Surface_mesher.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/vtkSurfaceMesherContourFilter.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead."
#include <CGAL/Installation/internal/deprecation_warning.h>
#ifdef CGAL_USE_VTK

View File

@ -1,3 +1,5 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>

View File

@ -1,3 +1,5 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Cartesian.h>
#include <CGAL/Filtered_kernel.h>

View File

@ -1,3 +1,5 @@
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
// c2t3

View File

@ -1,8 +1,4 @@
// $URL$
// $Id$
//
//
// Author(s) : Mariette Yvinec
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>