diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index 4bce6f48b428..52ee7faa48be 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -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() diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 6383e7fae0b8..f085ca0e72d8 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -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) diff --git a/Lab/demo/Lab/Plugins/Point_set/Surface_reconstruction_poisson_impl.cpp b/Lab/demo/Lab/Plugins/Point_set/Surface_reconstruction_poisson_impl.cpp index 11a8fe9a7b32..23b2b28d48d4 100644 --- a/Lab/demo/Lab/Plugins/Point_set/Surface_reconstruction_poisson_impl.cpp +++ b/Lab/demo/Lab/Plugins/Point_set/Surface_reconstruction_poisson_impl.cpp @@ -7,19 +7,23 @@ #include // must be included before kernel #include #include -#include -#include -#include -#include -#include + #include #include +#include +#include +#include +#include +#include +#include + #include #include #include +#include #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 Poisson_reconstruction_function; - // Surface mesher - typedef CGAL::Surface_mesh_default_triangulation_3 STr; - typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; - typedef CGAL::Implicit_surface_3 Surface_3; + // Mesh_3 + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; + typedef typename CGAL::Mesh_triangulation_3::type Tr; + typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + typedef CGAL::Mesh_criteria_3 Mesh_criteria; // AABB tree typedef CGAL::AABB_face_graph_triangle_primitive 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 criteria(sm_angle, // Min triangle angle (degrees) - sm_radius*average_spacing, // Max triangle size - sm_distance*average_spacing); // Approximation error - - CGAL_TRACE_STREAM << " make_surface_mesh(sphere center=("<(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"; diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp index 19b2afb49423..72942c49c9f9 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction.cpp @@ -13,17 +13,22 @@ #include #include #include -#include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include +#include + #include #include #include #include +#include + #include #include #include @@ -50,10 +55,11 @@ typedef CGAL::Polyhedron_3 Polyhedron; // Poisson implicit function typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; -// Surface mesher -typedef CGAL::Surface_mesh_default_triangulation_3 STr; -typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; -typedef CGAL::Poisson_implicit_surface_3 Surface_3; +// Mesh_3 +typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; +typedef typename CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; +typedef CGAL::Mesh_criteria_3 Mesh_criteria; // AABB tree typedef CGAL::AABB_face_graph_triangle_primitive 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 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=("<(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"; diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp index 92fef2cc1105..d44d13be0845 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp @@ -1,10 +1,14 @@ #include #include -#include -#include -#include -#include #include + +#include +#include +#include +#include +#include +#include + #include #include #include @@ -28,9 +32,10 @@ typedef Kernel::Sphere_3 Sphere; typedef std::vector PointList; typedef CGAL::Polyhedron_3 Polyhedron; typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; -typedef CGAL::Surface_mesh_default_triangulation_3 STr; -typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; -typedef CGAL::Implicit_surface_3 Surface_3; +typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; +typedef CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; +typedef CGAL::Mesh_criteria_3 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 criteria(sm_angle, // Min triangle angle (degrees) - sm_radius*average_spacing, // Max triangle size - sm_distance*average_spacing); // Approximation error - - // 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_criteria criteria(CGAL::parameters::facet_angle = sm_angle, + CGAL::parameters::facet_size = sm_radius*average_spacing, + CGAL::parameters::facet_distance = sm_distance*average_spacing); + + // 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(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; diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h index 79b070f16294..f11648362e9b 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h @@ -109,15 +109,6 @@ namespace CGAL { return surface(f, sphere, error_bound); } -// template -// struct Surface_mesh_traits_generator_3 > -// { -// typedef Poisson_implicit_surface_3 Surface_type; -// typedef typename Surface_mesher::Poisson_implicit_surface_oracle_3 Type; -// typedef Type type; // Boost meta-programming compatibility -// }; - // non documented class template class Poisson_implicit_function_wrapper : public CGAL::cpp98::unary_function diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h index 68c71a271519..ae2544567d73 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h @@ -260,7 +260,10 @@ class Poisson_reconstruction_function 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->(); } }; diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_surface_reconstruction_3/internal/Poisson_mesh_traits_generator_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_surface_reconstruction_3/internal/Poisson_mesh_traits_generator_3.h new file mode 100644 index 000000000000..c9330fa57044 --- /dev/null +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_surface_reconstruction_3/internal/Poisson_mesh_traits_generator_3.h @@ -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 + + +#include + +namespace CGAL { + +template +class Sphere_3; + +/** Default traits class. + * Partial specialization will be in other headers +*/ +template +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 +struct Poisson_mesh_traits_generator_3 > +{ + typedef Surface_mesher::Poisson_sphere_oracle_3 Type; + typedef Type type; // for Boost compatibility (meta-programming) +}; + +} // end namespace CGAL + +#endif // CGAL_POISSON_MESH_TRAITS_GENERATOR_3_H diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_surface_reconstruction_3/internal/Poisson_sphere_oracle_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_surface_reconstruction_3/internal/Poisson_sphere_oracle_3.h new file mode 100644 index 000000000000..fb0655be01ce --- /dev/null +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_surface_reconstruction_3/internal/Poisson_sphere_oracle_3.h @@ -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 + +#include +#include +#include +#include + +#include + +namespace CGAL { + + namespace Surface_mesher { + + struct Poisson_null_oracle_visitor + { + template + void new_point(P&) const + { + } + }; + + + template < + class GT, + class Point_creator = Creator_uniform_3, + class Visitor = Poisson_null_oracle_visitor + > + class Poisson_sphere_oracle_3 + { + // private types + typedef Poisson_sphere_oracle_3 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 + 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 + 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 + { + bool operator()(const FT x) const + { + return FT(0) <= x && x <= FT(1); + } + }; + + struct Lambda_positive : public CGAL::cpp98::unary_function + { + bool operator()(const FT x) const + { + return FT(0) <= x; + } + }; + + struct Always_true : public CGAL::cpp98::unary_function + { + 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 + 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 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 + +#endif // CGAL_POISSON_SURFACE_MESHER_POISSON_SPHERE_ORACLE_3_H diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h index 22dd536c08d4..7ebcbbe814ec 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Surface_mesher/Poisson_implicit_surface_oracle_3.h @@ -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 -#include #include -#include +#include #include #include #include @@ -56,7 +55,7 @@ namespace CGAL { Return_min, class Point_creator = Creator_uniform_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 Sphere_oracle; + typedef Poisson_sphere_oracle_3 Sphere_oracle; typedef typename GT::Point_3 Point; diff --git a/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h b/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h index c103468f3f16..75a2f3fe062c 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include namespace CGAL { @@ -142,7 +142,7 @@ class Poisson_mesher_level_impl_base : template ::type, + typename Oracle = typename CGAL::Poisson_mesh_traits_generator_3::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::type Oracle; + typedef typename CGAL::Poisson_mesh_traits_generator_3::type Oracle; typedef Poisson_mesher_level Refiner; diff --git a/Poisson_surface_reconstruction_3/include/CGAL/poisson_surface_reconstruction.h b/Poisson_surface_reconstruction_3/include/CGAL/poisson_surface_reconstruction.h index d926f3d1172d..9584e34f59f2 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/poisson_surface_reconstruction.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/poisson_surface_reconstruction.h @@ -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 -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -97,9 +99,10 @@ namespace CGAL { typedef typename Kernel::FT FT; typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; - typedef typename CGAL::Surface_mesher::Surface_mesh_default_triangulation_3_generator::Type STr; - typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; - typedef CGAL::Implicit_surface_3 Surface_3; + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; + typedef typename CGAL::Mesh_triangulation_3::type Tr; + typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + typedef CGAL::Mesh_criteria_3 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 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) + return CGAL::parameters::manifold_with_boundary(); + else if constexpr (std::is_same_v) + return CGAL::parameters::manifold(); + else + return CGAL::parameters::non_manifold(); + }; + + C3t3 c3t3 = CGAL::make_mesh_3(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; } diff --git a/Poisson_surface_reconstruction_3/package_info/Poisson_surface_reconstruction_3/dependencies b/Poisson_surface_reconstruction_3/package_info/Poisson_surface_reconstruction_3/dependencies index e8a4a934cd68..ae7a205b7564 100644 --- a/Poisson_surface_reconstruction_3/package_info/Poisson_surface_reconstruction_3/dependencies +++ b/Poisson_surface_reconstruction_3/package_info/Poisson_surface_reconstruction_3/dependencies @@ -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 diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt index 67de777d1a4c..8e56915cacab 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -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() + diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/compare_mesh_3_vs_Poisson_implicit_surface_3.cpp b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/compare_mesh_3_vs_Poisson_implicit_surface_3.cpp new file mode 100644 index 000000000000..4efae7300c27 --- /dev/null +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/compare_mesh_3_vs_Poisson_implicit_surface_3.cpp @@ -0,0 +1,424 @@ +#include + +//---------------------------------------------------------- +// 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 +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +// ---------------------------------------------------------------------------- +// 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_with_normal; +typedef Kernel::Sphere_3 Sphere; +typedef std::deque PointList; + +// polyhedron +typedef CGAL::Polyhedron_3 Polyhedron; + +// Poisson implicit function +typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; +typedef CGAL::Poisson_implicit_surface_3 Surface_3; + +// Surface mesher +typedef CGAL::Surface_mesh_default_triangulation_3 STr; +typedef CGAL::Surface_mesh_complex_2_in_triangulation_3 C2t3; + +// Mesh_3 +typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; +typedef typename CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; +typedef CGAL::Mesh_criteria_3 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 Radius upper bound (default=100 * average spacing)\n"; + std::cerr << " -sm_distance Distance upper bound (default=0.25 * average spacing)\n"; + std::cerr << " -frac 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::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::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 + (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(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 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; +} diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cmd b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_mesh_3.cmd similarity index 100% rename from Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cmd rename to Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_mesh_3.cmd diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_mesh_3.cpp b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_mesh_3.cpp new file mode 100644 index 000000000000..7007831e7e07 --- /dev/null +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_mesh_3.cpp @@ -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 +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + + +#include + +// ---------------------------------------------------------------------------- +// 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 Point_with_normal; +typedef Kernel::Sphere_3 Sphere; +typedef std::deque PointList; + +// polyhedron +typedef CGAL::Polyhedron_3 Polyhedron; + +// Poisson implicit function +typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; + +// Mesh_3 +typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; +typedef CGAL::Mesh_triangulation_3::type Tr; +typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; +typedef CGAL::Mesh_criteria_3 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::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(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=("<(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; +} diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_surface_mesher.cmd b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_surface_mesher.cmd new file mode 100644 index 000000000000..105324c3b586 --- /dev/null +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_surface_mesher.cmd @@ -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 diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_surface_mesher.cpp similarity index 99% rename from Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp rename to Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_surface_mesher.cpp index 760e505dc277..cfd35446a4a4 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test_surface_mesher.cpp @@ -8,6 +8,8 @@ // poisson_reconstruction_test mesh1.off point_set2.xyz... // CGAL +#include + #include #include #include diff --git a/STL_Extension/doc/STL_Extension/CGAL/tags.h b/STL_Extension/doc/STL_Extension/CGAL/tags.h index 91b0ca5532d7..9d349bf63a01 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/tags.h +++ b/STL_Extension/doc/STL_Extension/CGAL/tags.h @@ -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 */ diff --git a/STL_Extension/doc/STL_Extension/dependencies b/STL_Extension/doc/STL_Extension/dependencies index e3e3864ed1f5..798fd081dd51 100644 --- a/STL_Extension/doc/STL_Extension/dependencies +++ b/STL_Extension/doc/STL_Extension/dependencies @@ -1,7 +1,8 @@ -Manual +BGL Circulator -Number_types Kernel_23 +Manual Miscellany +Number_types Surface_mesh -BGL +Surface_mesher diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index eba9ffdc7215..8c446d8128d5 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -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 diff --git a/Surface_mesher/doc/Surface_mesher/CGAL/make_surface_mesh.h b/Surface_mesher/doc/Surface_mesher/CGAL/make_surface_mesh.h index 620f7b9184ea..23805009c22f 100644 --- a/Surface_mesher/doc/Surface_mesher/CGAL/make_surface_mesh.h +++ b/Surface_mesher/doc/Surface_mesher/CGAL/make_surface_mesh.h @@ -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 */ diff --git a/Surface_mesher/doc/Surface_mesher/PackageDescription.txt b/Surface_mesher/doc/Surface_mesher/PackageDescription.txt index bf46b3a6eba7..39b9d967d974 100644 --- a/Surface_mesher/doc/Surface_mesher/PackageDescription.txt +++ b/Surface_mesher/doc/Surface_mesher/PackageDescription.txt @@ -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. diff --git a/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt b/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt index 5414f94f1318..658dc7bae53c 100644 --- a/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt +++ b/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt @@ -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 diff --git a/Surface_mesher/doc/Surface_mesher/dependencies b/Surface_mesher/doc/Surface_mesher/dependencies index c0330a78330f..1cbc65e3661e 100644 --- a/Surface_mesher/doc/Surface_mesher/dependencies +++ b/Surface_mesher/doc/Surface_mesher/dependencies @@ -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 diff --git a/Surface_mesher/doc/Surface_mesher/fig/segmented_head-small.png b/Surface_mesher/doc/Surface_mesher/fig/segmented_head-small.png index e42950336e07..038424ea3930 100644 Binary files a/Surface_mesher/doc/Surface_mesher/fig/segmented_head-small.png and b/Surface_mesher/doc/Surface_mesher/fig/segmented_head-small.png differ diff --git a/Surface_mesher/examples/Surface_mesher/mesh_a_3d_gray_image.cpp b/Surface_mesher/examples/Surface_mesher/mesh_a_3d_gray_image.cpp index 00508fc121b9..600177e088ab 100644 --- a/Surface_mesher/examples/Surface_mesher/mesh_a_3d_gray_image.cpp +++ b/Surface_mesher/examples/Surface_mesher/mesh_a_3d_gray_image.cpp @@ -1,3 +1,5 @@ +#include + #include #include #include diff --git a/Surface_mesher/examples/Surface_mesher/mesh_an_implicit_function.cpp b/Surface_mesher/examples/Surface_mesher/mesh_an_implicit_function.cpp index c62844c85d51..0d2860938aa7 100644 --- a/Surface_mesher/examples/Surface_mesher/mesh_an_implicit_function.cpp +++ b/Surface_mesher/examples/Surface_mesher/mesh_an_implicit_function.cpp @@ -1,3 +1,5 @@ +#include + #include #include #include diff --git a/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h b/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h index 0f05ae1f18e8..251dabe040b2 100644 --- a/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h +++ b/Surface_mesher/include/CGAL/AABB_polyhedral_oracle.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h index 79122ed5f60b..9c17823f8736 100644 --- a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include // TODO: add the iterators diff --git a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_cell_base_3.h b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_cell_base_3.h index af757f8365e3..83a97cf4f5b4 100644 --- a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_cell_base_3.h +++ b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_cell_base_3.h @@ -17,6 +17,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h index 23140ed6efbb..0d7e84604b92 100644 --- a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h +++ b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_vertex_base_3.h @@ -18,7 +18,10 @@ #include - +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Gray_level_image_3.h b/Surface_mesher/include/CGAL/Gray_level_image_3.h index 64c00a06f3fb..9edd091f0ebe 100644 --- a/Surface_mesher/include/CGAL/Gray_level_image_3.h +++ b/Surface_mesher/include/CGAL/Gray_level_image_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h index 46e955660310..fe79571ff2fd 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #define CGAL_C2T3_USE_FILE_WRITER_OFF diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h index 865fdfb56572..5d804bd8cafa 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h @@ -16,6 +16,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h index f84385c85556..f3905c0aed5e 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h index 2a76461b98a9..6ae55d5a9c23 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h b/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h index 80a3afaefe59..72d1813359d6 100644 --- a/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h +++ b/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h b/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h index 08935e04503f..2bf6e11f9c38 100644 --- a/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h +++ b/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h @@ -14,6 +14,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Implicit_surface_3.h b/Surface_mesher/include/CGAL/Implicit_surface_3.h index 23fa443abdc8..34976c4660e5 100644 --- a/Surface_mesher/include/CGAL/Implicit_surface_3.h +++ b/Surface_mesher/include/CGAL/Implicit_surface_3.h @@ -14,6 +14,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Multi_surface_3.h b/Surface_mesher/include/CGAL/Multi_surface_3.h index 134e9627711f..2f4a27ef75d6 100644 --- a/Surface_mesher/include/CGAL/Multi_surface_3.h +++ b/Surface_mesher/include/CGAL/Multi_surface_3.h @@ -14,6 +14,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include namespace CGAL { diff --git a/Surface_mesher/include/CGAL/Point_traits.h b/Surface_mesher/include/CGAL/Point_traits.h index 948482f02194..cab4a1f9a171 100644 --- a/Surface_mesher/include/CGAL/Point_traits.h +++ b/Surface_mesher/include/CGAL/Point_traits.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Point_with_psc_localisation.h b/Surface_mesher/include/CGAL/Point_with_psc_localisation.h index 24122b515cc3..6eefcbc8256a 100644 --- a/Surface_mesher/include/CGAL/Point_with_psc_localisation.h +++ b/Surface_mesher/include/CGAL/Point_with_psc_localisation.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Point_with_surface_index.h b/Surface_mesher/include/CGAL/Point_with_surface_index.h index a4adc974429d..c14ba410f4b4 100644 --- a/Surface_mesher/include/CGAL/Point_with_surface_index.h +++ b/Surface_mesher/include/CGAL/Point_with_surface_index.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Point_with_surface_index_geom_traits.h b/Surface_mesher/include/CGAL/Point_with_surface_index_geom_traits.h index bf65a959d6b4..96af36419c37 100644 --- a/Surface_mesher/include/CGAL/Point_with_surface_index_geom_traits.h +++ b/Surface_mesher/include/CGAL/Point_with_surface_index_geom_traits.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h b/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h index 37b5107fd8d9..448c267a9a66 100644 --- a/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h +++ b/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h @@ -20,6 +20,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_cell_base_3.h b/Surface_mesher/include/CGAL/Surface_mesh_cell_base_3.h index 8d813f474696..a83722a3c3c2 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_cell_base_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_cell_base_3.h @@ -14,6 +14,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h b/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h index fefeb5580dcf..974d5f3d1f13 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h b/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h index 1fde430d98da..677a97cbea67 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_default_edges_criteria_3.h b/Surface_mesher/include/CGAL/Surface_mesh_default_edges_criteria_3.h index c07930d8bae3..32fa61734ce8 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_default_edges_criteria_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_default_edges_criteria_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h b/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h index 2474efe3e1f9..9589b2b52bdb 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include // traits class diff --git a/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h b/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h index 28b57b62dfac..08569ec23e36 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_triangulation_generator_3.h b/Surface_mesher/include/CGAL/Surface_mesh_triangulation_generator_3.h index f3df76a67d8e..575557d5e276 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_triangulation_generator_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_triangulation_generator_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesh_vertex_base_3.h b/Surface_mesher/include/CGAL/Surface_mesh_vertex_base_3.h index 479fcd944b3a..73520f1fc936 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_vertex_base_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_vertex_base_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h index 2541ef6ff30e..e5addd68f568 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h @@ -16,6 +16,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Has_edges.h b/Surface_mesher/include/CGAL/Surface_mesher/Has_edges.h index cb8b8e08b28b..4abebce71ab9 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Has_edges.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Has_edges.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include namespace CGAL { namespace Surface_mesher { diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h b/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h index 94a33878d552..1b1663c40913 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h @@ -16,6 +16,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h b/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h index 453d4db1212a..8e9b42811d4d 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Intersection_data_structure_3.h @@ -14,6 +14,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Null_oracle_visitor.h b/Surface_mesher/include/CGAL/Surface_mesher/Null_oracle_visitor.h index 1e633a3566e5..44897235895f 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Null_oracle_visitor.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Null_oracle_visitor.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include namespace CGAL { diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h b/Surface_mesher/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h index ef9526468c11..d5512a662c1d 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Point_surface_indices_oracle_visitor.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include namespace CGAL { diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Polyhedral_oracle.h b/Surface_mesher/include/CGAL/Surface_mesher/Polyhedral_oracle.h index 9d2ac2cd6b32..3863c8ebbb0f 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Polyhedral_oracle.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Polyhedral_oracle.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Profile_counter.h b/Surface_mesher/include/CGAL/Surface_mesher/Profile_counter.h index 12a0c01cc94b..43dbeb4c8bc4 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Profile_counter.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Profile_counter.h @@ -18,6 +18,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Profile_timer.h b/Surface_mesher/include/CGAL/Surface_mesher/Profile_timer.h index 5588637af54f..cd8bd792fdf3 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Profile_timer.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Profile_timer.h @@ -18,6 +18,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #ifdef CGAL_SURFACE_MESHER_PROFILE diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h b/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h index 55d4e1dc1040..2e8cf47f695b 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Standard_criteria.h b/Surface_mesher/include/CGAL/Surface_mesher/Standard_criteria.h index 01408e568c8f..e05d358bc5a6 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Standard_criteria.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Standard_criteria.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h index e2b9cd4720a9..ce0e4de049a4 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h @@ -22,6 +22,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h index 6466a188db9f..64b80f4d7937 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h index 049b35f9c669..c69a904283f7 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_edges_level_visitor.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h index 71b6cb08cbde..37c8d63bf125 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h @@ -16,6 +16,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h index 25095602a93e..074861ea2225 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h @@ -15,6 +15,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_visitor.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_visitor.h index 9eaa3b197d76..af3f9ea198d4 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_visitor.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_visitor.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Types_generators.h b/Surface_mesher/include/CGAL/Surface_mesher/Types_generators.h index 9bef978a28d8..da46a9858f00 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Types_generators.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Types_generators.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Verbose_flag.h b/Surface_mesher/include/CGAL/Surface_mesher/Verbose_flag.h index fefabbf888ab..fae4d9578503 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Verbose_flag.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Verbose_flag.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include namespace CGAL { namespace Surface_mesher { diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h b/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h index a349354287d5..14bb5893d6e7 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_psc_element_criterion.h @@ -16,6 +16,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h b/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h index 9cba024536c2..a8e8567adbcc 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Vertices_on_the_same_surface_criterion.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include diff --git a/Surface_mesher/include/CGAL/Surface_mesher_generator.h b/Surface_mesher/include/CGAL/Surface_mesher_generator.h index 45bdb7f28b68..420001442888 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher_generator.h +++ b/Surface_mesher/include/CGAL/Surface_mesher_generator.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #include #include @@ -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 }; // }; diff --git a/Surface_mesher/include/CGAL/make_piecewise_smooth_surface_mesh.h b/Surface_mesher/include/CGAL/make_piecewise_smooth_surface_mesh.h index ee7f4c54f0ba..f95e4234cca2 100644 --- a/Surface_mesher/include/CGAL/make_piecewise_smooth_surface_mesh.h +++ b/Surface_mesher/include/CGAL/make_piecewise_smooth_surface_mesh.h @@ -14,6 +14,11 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include + #include #endif //CGAL_MAKE_PIECEWISE_SMOOTH_SURFACE_MESH_H diff --git a/Surface_mesher/include/CGAL/make_surface_mesh.h b/Surface_mesher/include/CGAL/make_surface_mesh.h index 63929cc6f2f2..ba69f1d69429 100644 --- a/Surface_mesher/include/CGAL/make_surface_mesh.h +++ b/Surface_mesher/include/CGAL/make_surface_mesh.h @@ -14,7 +14,12 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include +#include #include #include diff --git a/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h b/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h index 76f3a81590da..59ea94847f25 100644 --- a/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h +++ b/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h @@ -15,6 +15,10 @@ #include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_DEPRECATED_MESSAGE_DETAILS \ + "The 3D Mesh Generation package (see https://doc.cgal.org/latest/Mesh_3/) should be used instead." +#include #ifdef CGAL_USE_VTK diff --git a/Surface_mesher/test/Surface_mesher/combined_spheres.cpp b/Surface_mesher/test/Surface_mesher/combined_spheres.cpp index 631ed4d355a7..26500a87635e 100644 --- a/Surface_mesher/test/Surface_mesher/combined_spheres.cpp +++ b/Surface_mesher/test/Surface_mesher/combined_spheres.cpp @@ -1,3 +1,5 @@ +#include + #include #include diff --git a/Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp b/Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp index 374c5b6941ca..19eb6e57e004 100644 --- a/Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp +++ b/Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp @@ -1,3 +1,5 @@ +#include + #include #include #include diff --git a/Surface_mesher/test/Surface_mesher/test_c2t3_iterators.cpp b/Surface_mesher/test/Surface_mesher/test_c2t3_iterators.cpp index 2a6dbdb633c3..531ae9b8e317 100644 --- a/Surface_mesher/test/Surface_mesher/test_c2t3_iterators.cpp +++ b/Surface_mesher/test/Surface_mesher/test_c2t3_iterators.cpp @@ -1,3 +1,5 @@ +#include + #include // c2t3 diff --git a/Surface_mesher/test/Surface_mesher/test_robust_circumcenter.cpp b/Surface_mesher/test/Surface_mesher/test_robust_circumcenter.cpp index 64950e89f51a..7a5a1f83e1bc 100644 --- a/Surface_mesher/test/Surface_mesher/test_robust_circumcenter.cpp +++ b/Surface_mesher/test/Surface_mesher/test_robust_circumcenter.cpp @@ -1,8 +1,4 @@ -// $URL$ -// $Id$ -// -// -// Author(s) : Mariette Yvinec +#include #include #include