From ab0b31fed3e057cc36b1adda614b6ed2c54196b2 Mon Sep 17 00:00:00 2001 From: Nicolas Saillant Date: Fri, 28 Apr 2023 13:58:49 +0200 Subject: [PATCH 01/23] Use SFTP API instead of SCP API --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 4 +- Polyhedron/demo/Polyhedron/Use_ssh.cpp | 133 +++++++++++----------- 2 files changed, 68 insertions(+), 69 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index b797ecf7a70..39c537dea5b 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -3191,8 +3191,8 @@ void MainWindow::on_actionSa_ve_Scene_as_Script_triggered() tr("Enter the name of your scene file.")); if(path.isEmpty()) return; - if(!path.contains("Polyhedron_demo_")) - path.prepend("Polyhedron_demo_"); + if(!path.contains("/tmp/Polyhedron_demo_")) + path.prepend("/tmp/Polyhedron_demo_"); try{ ssh_session session = nullptr; bool res = establish_ssh_session_from_agent(session, diff --git a/Polyhedron/demo/Polyhedron/Use_ssh.cpp b/Polyhedron/demo/Polyhedron/Use_ssh.cpp index 965abf23024..2fafe072444 100644 --- a/Polyhedron/demo/Polyhedron/Use_ssh.cpp +++ b/Polyhedron/demo/Polyhedron/Use_ssh.cpp @@ -26,6 +26,10 @@ #include #include + +#include +#include + bool test_result(int res) { switch(res){ @@ -240,21 +244,22 @@ bool push_file(ssh_session &session, const char* dest_path, const char* filepath) { + std::size_t processed = 0; + sftp_file sftpfile; //copy a file - ssh_scp scp = ssh_scp_new( - session, SSH_SCP_WRITE | SSH_SCP_RECURSIVE, "/tmp"); - if (scp == nullptr) + sftp_session sftp = sftp_new(session); + if (sftp == nullptr) { - std::cerr<<"Error allocating scp session: %s\n" + std::cerr<<"Error allocating sftp session:\n" << ssh_get_error(session)< timespan(size); - std::this_thread::sleep_for(timespan); - if (res != SSH_OK) + while ( size > 0 ) { - std::cerr<< "Can't write to remote file: %s\n" - << ssh_get_error(session)< 16384) + s = 16384; + res = sftp_write(sftpfile, buffer.data() + processed, s); + if ( res < 0) + { + std::cerr<< "Can't write data to file:\n" + << ssh_get_error(session)< buffer; - - ssh_scp scp = ssh_scp_new( - session, SSH_SCP_READ | SSH_SCP_RECURSIVE, from_path); - if (scp == nullptr) + sftp_file sftpfile; + sftp_session sftp = sftp_new(session); + if (sftp == nullptr) { - std::cerr<<"Error allocating scp session: %s\n" + std::cerr<<"Error allocating sftp session:\n" << ssh_get_error(session)<size; buffer.resize(size); - if(ssh_scp_accept_request(scp) != SSH_OK) + while ( size > 0 ) { - std::cerr<< "Could not accept request."< 16384) + s = 16384; + res = sftp_read(sftpfile, buffer.data() + processed, s); + if ( res < 0) { - std::cerr<< "Error receiving file data: %s\n"<< ssh_get_error(session)<size; std::ofstream file(to_path, std::ios::binary |std::ios::trunc); if(!file.write(buffer.data(), size)) { std::cerr<<"Error while writing file."< Date: Tue, 16 May 2023 15:48:50 +0200 Subject: [PATCH 02/23] Use VPM's reference --- .../CGAL/Polygon_mesh_processing/internal/refine_impl.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index 06ddc868f0d..98a80e05a8e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -42,6 +42,8 @@ template class Refine_Polyhedron_3 { //// typedefs typedef typename boost::property_traits::value_type Point_3; + typedef typename boost::property_traits::reference Point_3_ref; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::face_descriptor face_descriptor; @@ -88,7 +90,6 @@ private: bool relax(halfedge_descriptor h) { #ifdef CGAL_PMP_REFINE_DEBUG_PP - typedef typename boost::property_traits::reference Point_3_ref; Point_3_ref p = get(vpmap, source(h,pmesh)); Point_3_ref q = get(vpmap, target(h,pmesh)); Point_3_ref r = get(vpmap, target(next(h,pmesh),pmesh)); @@ -227,7 +228,7 @@ private: const std::set& interior_map, bool accept_internal_facets) { - const Point_3& vp = get(vpmap, vh); + const Point_3_ref vp = get(vpmap, vh); Halfedge_around_target_circulator circ(halfedge(vh,pmesh),pmesh), done(circ); int deg = 0; double sum = 0; @@ -239,7 +240,7 @@ private: { continue; } // which means current edge is an interior edge and should not be included in scale attribute calculation } - const Point_3& vq = get(vpmap, target(opposite(*circ,pmesh),pmesh)); + const Point_3_ref vq = get(vpmap, target(opposite(*circ,pmesh),pmesh)); sum += to_double(CGAL::approximate_sqrt(CGAL::squared_distance(vp, vq))); ++deg; } while(++circ != done); From eb1462ea562c7308a83af0c21563e7c60d3bf967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 16 May 2023 15:49:00 +0200 Subject: [PATCH 03/23] Remove needless reference --- .../include/CGAL/Polygon_mesh_processing/locate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h index 2d5d92374ba..956262a6413 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -1666,7 +1666,7 @@ locate_with_AABB_tree(const typename internal::Location_traits::const_type VertexPointMap; typedef internal::Point_to_Point_3_VPM WrappedVPM; - const Point_3& p3 = P_to_P3()(p); + const Point_3 p3 = P_to_P3()(p); typename AABB_tree::Point_and_primitive_id result = tree.closest_point_and_primitive(p3); typedef typename GetGeomTraits::type Geom_traits; @@ -1763,7 +1763,7 @@ locate(const typename internal::Location_traits:: AABB_tree tree; build_AABB_tree(tm, tree, parameters::vertex_point_map(wrapped_vpm)); - const Point_3& p3 = P_to_P3()(p); + const Point_3 p3 = P_to_P3()(p); return locate_with_AABB_tree(p3, tree, tm, parameters::vertex_point_map(wrapped_vpm)); } From 752aa944907cbadf4317c1a0601a1b3a705acd57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 16 May 2023 15:49:18 +0200 Subject: [PATCH 04/23] Properly initialize kernel functors --- .../CGAL/Polygon_mesh_processing/measure.h | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index ac5a340d816..468896b5a98 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -857,34 +857,38 @@ centroid(const TriangleMesh& tmesh, Vpm vpm = choose_parameter(get_parameter(np, internal_np::vertex_point), get_const_property_map(CGAL::vertex_point, tmesh)); - typedef typename GetGeomTraits::type Kernel; - typedef typename Kernel::Point_3 Point_3; + typedef typename GetGeomTraits::type Kernel; + Kernel k = choose_parameter(get_parameter(np, internal_np::geom_traits)); + + typedef typename Kernel::FT FT; + typedef typename boost::property_traits::reference Point_3_ref; typedef typename Kernel::Vector_3 Vector_3; + typedef typename Kernel::Construct_translated_point_3 Construct_translated_point_3; typedef typename Kernel::Construct_vector_3 Construct_vector_3; typedef typename Kernel::Construct_normal_3 Construct_normal_3; typedef typename Kernel::Compute_scalar_product_3 Scalar_product; typedef typename Kernel::Construct_scaled_vector_3 Scale; typedef typename Kernel::Construct_sum_of_vectors_3 Sum; + typedef typename boost::graph_traits::face_descriptor face_descriptor; - typedef typename Kernel::FT FT; FT volume = 0; Vector_3 centroid(NULL_VECTOR); - Construct_translated_point_3 point; - Construct_vector_3 vector; - Construct_normal_3 normal; - Scalar_product scalar_product; - Scale scale; - Sum sum; + Construct_translated_point_3 point = k.construct_translated_point_3_object(); + Construct_vector_3 vector = k.construct_vector_3_object(); + Construct_normal_3 normal = k.construct_normal_3_object(); + Scalar_product scalar_product = k.compute_scalar_product_3_object(); + Scale scale = k.construct_scaled_vector_3_object(); + Sum sum = k.construct_sum_of_vectors_3_object(); for(face_descriptor fd : faces(tmesh)) { - const Point_3& p = get(vpm, target(halfedge(fd, tmesh), tmesh)); - const Point_3& q = get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh)); - const Point_3& r = get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh)); + const Point_3_ref p = get(vpm, target(halfedge(fd, tmesh), tmesh)); + const Point_3_ref q = get(vpm, target(next(halfedge(fd, tmesh), tmesh), tmesh)); + const Point_3_ref r = get(vpm, target(prev(halfedge(fd, tmesh), tmesh), tmesh)); Vector_3 vp = vector(ORIGIN, p), vq = vector(ORIGIN, q), vr = vector(ORIGIN, r); From cb05427cf38da8d949fe45728f4002d5e50a00f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 16 May 2023 15:49:34 +0200 Subject: [PATCH 05/23] Remove std::move on temporary result --- .../include/CGAL/Polygon_mesh_processing/repair_degeneracies.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 798499f430b..40f480cbb7c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -483,7 +483,7 @@ struct Filter_wrapper_for_cap_needle_removal link_faces; collect_link_faces(e, link_faces); - Functor f = std::move(m_make_envelope(link_faces)); + Functor f = m_make_envelope(link_faces); Base base(m_tm, m_vpm, f); return base.collapse(e); } From 0acb4e8fceaf7824eaec2f58f4f3bff950eeca92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 16 May 2023 15:49:49 +0200 Subject: [PATCH 06/23] Add missing closing parenthesis --- .../Surface_mesh_simplification/Surface_mesh_simplification.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt index 31c3939c926..7ca5146ab1f 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Surface_mesh_simplification.txt @@ -306,7 +306,7 @@ int r = edge_collapse(surface_mesh, stop_predicate, .edge_is_border_map(ebmap) .get_cost(cf) .get_placement(pf) - .filter(filter + .filter(filter) .visitor(vis)); \endcode From 6cb88afe17769f5356633cbd7d84b6c92c4967b6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 May 2023 14:31:46 +0100 Subject: [PATCH 07/23] Scale_space_reconstruction: Cleanup --- .../Tutorials/Tutorial_reconstruction.txt | 2 +- .../tutorial_example.cpp | 2 +- .../scale_space_incremental.cpp | 26 +++++++------------ .../scale_space_manifold.cpp | 14 ++++------ .../Scale_space_surface_reconstruction_3.h | 20 ++++++-------- 5 files changed, 24 insertions(+), 40 deletions(-) diff --git a/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt b/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt index 4ec56ab4be3..8fbc5618881 100644 --- a/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt +++ b/Documentation/doc/Documentation/Tutorials/Tutorial_reconstruction.txt @@ -290,7 +290,7 @@ by the user at runtime with the second argument. \section TutorialsReconstruction_pipeline Full Pipeline Images -The following figure an example of a full reconstruction pipeline +The following figures show a full reconstruction pipeline applied to a bear statue (courtesy _EPFL Computer Graphics and Geometry Laboratory_ \cgalCite{cgal:e-esmr}). Two mesh processing algorithms (hole filling and isotropic remeshing) are also applied diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/tutorial_example.cpp b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/tutorial_example.cpp index b67e90210b5..4f23a1eaf55 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/tutorial_example.cpp +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/tutorial_example.cpp @@ -210,7 +210,7 @@ int main(int argc, char*argv[]) for (Point_set::Index idx : points) f << points.point (idx) << std::endl; for (const auto& facet : CGAL::make_range (reconstruct.facets_begin(), reconstruct.facets_end())) - f << "3 "<< facet << std::endl; + f << "3 "<< facet[0] << " " << facet[1] << " " << facet[2] << std::endl; f.close (); //! [Output scale space] diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp index 7164d7aa376..bb0f308b034 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_incremental.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -16,19 +17,6 @@ typedef Reconstruction::Point Point; typedef Reconstruction::Facet_const_iterator Facet_iterator; -// function for writing the reconstruction output in the off format -void dump_reconstruction(const Reconstruction& reconstruct, std::string name) -{ - std::ofstream output(name.c_str()); - output << "OFF " << reconstruct.number_of_points() << " " - << reconstruct.number_of_facets() << " 0\n"; - - std::copy(reconstruct.points_begin(), - reconstruct.points_end(), - std::ostream_iterator(output,"\n")); - for( Facet_iterator it = reconstruct.facets_begin(); it != reconstruct.facets_end(); ++it ) - output << "3 " << *it << std::endl; -} int main(int argc, char* argv[]) { @@ -70,14 +58,18 @@ int main(int argc, char* argv[]) if (i == 0) { std::cout << "First reconstruction done." << std::endl; - // Write the reconstruction. - dump_reconstruction(reconstruct, "reconstruction1.off"); + CGAL::IO::write_OFF("reconstruction1.off", + reconstruct.points(), + reconstruct.facets(), + CGAL::parameters::stream_precision(17)); } else { std::cout << "Second reconstruction done." << std::endl; - // Write the reconstruction. - dump_reconstruction(reconstruct, "reconstruction2.off"); + CGAL::IO::write_OFF("reconstruction2.off", + reconstruct.points(), + reconstruct.facets(), + CGAL::parameters::stream_precision(17)); } } diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp index 0344b6454a5..61fb8efb57a 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_manifold.cpp @@ -21,7 +21,7 @@ typedef Mesher::Facet_const_iterator Mesher_iterator; typedef CGAL::Timer Timer; int main(int argc, char* argv[]) { - // Read the dat + // Read the data std::string fname = argc==1?CGAL::data_file_path("points_3/kitten.off"):argv[1]; std::cerr << "Reading " << std::flush; @@ -49,22 +49,18 @@ int main(int argc, char* argv[]) { reconstruct.reconstruct_surface(mesher); std::cerr << "Reconstruction done in " << t.time() << " sec." << std::endl; - t.reset(); + std::ofstream out("out.off"); // Write the reconstruction. for(Facet_iterator it = reconstruct.facets_begin(); it != reconstruct.facets_end(); ++it ) - out << "3 "<< *it << '\n'; // We write a '3' in front so that it can be assembled into an OFF file - - std::cerr << "Writing result in " << t.time() << " sec." << std::endl; - + // We write a '3' in front so that it can be assembled into an OFF file + out << "3 " << (*it)[0] << " " << (*it)[1] << " " << (*it)[2] << '\n'; out.close(); - t.reset(); std::ofstream garbage("garbage.off"); // Write facets that were removed to force manifold output for(Mesher_iterator it = mesher.garbage_begin(); it != mesher.garbage_end(); ++it ) - garbage << "3 "<< *it << '\n'; // We write a '3' in front so that it can be assembled into an OFF file - std::cerr << "Writing garbage facets in " << t.time() << " sec." << std::endl; + garbage << "3 " << (*it)[0] << " " << (*it)[1] << " " << (*it)[2] << '\n'; std::cerr << "Done." << std::endl; diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h index 47410046e0e..c9db2f91f25 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h @@ -53,6 +53,7 @@ public: typedef std::array Facet; ///< defines a facet of the surface (triple of point indices). #ifdef DOXYGEN_RUNNING + typedef unspecified_type Point_range; ///< defines a range points. typedef unspecified_type Point_iterator; ///< defines an iterator over the points. typedef const unspecified_type Point_const_iterator; ///< defines a constant iterator over the points. #else @@ -62,6 +63,7 @@ public: #endif #ifdef DOXYGEN_RUNNING + typedef unspecified_type Facet_range; ///< defines a range of facets typedef unspecified_type Facet_iterator; ///< defines an iterator over the facets. typedef const unspecified_type Facet_const_iterator; ///< defines a constant iterator over the facets. #else @@ -233,6 +235,9 @@ public: /// gives the number of points of the surface. std::size_t number_of_points() const { return m_points.size(); } + /// gives the range of points + const Point_range points() const { return m_points; } + /// gives an iterator to the first point at the current scale. /** \warning Changes to the scale-space do not cause an automatic update to * the surface. @@ -254,6 +259,9 @@ public: /// gives the number of facets of the surface. std::size_t number_of_facets() const { return m_facets.size(); } + /// gives the range of facets + const Facet_range facets() const { return m_facets; } + /// gives an iterator to the first triple in the surface. /** \warning Changes to the surface may change its topology. */ @@ -292,16 +300,4 @@ std::ostream& operator<< (std::ostream& os, const CGAL::Scale_space_surface_reco } // namespace CGAL -template< typename T > -std::ostream& -operator<<( std::ostream& os, const std::array< T, 3 >& t ) { - return os << t[0] << " " << t[1] << " " << t[2]; -} - -template< typename T > -std::istream& -operator>>( std::istream& is, std::array< T, 3 >& t ) { - return is >> get<0>(t) >> get<1>(t) >> get<2>(t); -} - #endif // CGAL_SCALE_SPACE_SURFACE_RECONSTRUCTION_3_H From 2d71f225ca31b1fcd146e788811c157ce8e12a09 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 May 2023 15:12:36 +0100 Subject: [PATCH 08/23] Scale_space_reconstruction: Cleanup --- .../Scale_space_surface_reconstruction_3.h | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h index c9db2f91f25..d84d5842c2f 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_surface_reconstruction_3.h @@ -57,9 +57,9 @@ public: typedef unspecified_type Point_iterator; ///< defines an iterator over the points. typedef const unspecified_type Point_const_iterator; ///< defines a constant iterator over the points. #else - typedef typename std::vector Point_vector; - typedef typename Point_vector::iterator Point_iterator; - typedef typename Point_vector::const_iterator Point_const_iterator; + typedef typename std::vector Point_range; + typedef typename Point_range::iterator Point_iterator; + typedef typename Point_range::const_iterator Point_const_iterator; #endif #ifdef DOXYGEN_RUNNING @@ -67,9 +67,9 @@ public: typedef unspecified_type Facet_iterator; ///< defines an iterator over the facets. typedef const unspecified_type Facet_const_iterator; ///< defines a constant iterator over the facets. #else - typedef typename std::vector Facet_vector; - typedef typename Facet_vector::iterator Facet_iterator; - typedef typename Facet_vector::const_iterator Facet_const_iterator; + typedef typename std::vector Facet_range; + typedef typename Facet_range::iterator Facet_iterator; + typedef typename Facet_range::const_iterator Facet_const_iterator; #endif // Default algorithms used (same as in old API) @@ -78,8 +78,8 @@ public: private: - Point_vector m_points; - Facet_vector m_facets; + Point_range m_points; + Facet_range m_facets; FT m_internal_squared_radius; // For backward compatibility @@ -236,7 +236,7 @@ public: std::size_t number_of_points() const { return m_points.size(); } /// gives the range of points - const Point_range points() const { return m_points; } + const Point_range& points() const { return m_points; } /// gives an iterator to the first point at the current scale. /** \warning Changes to the scale-space do not cause an automatic update to @@ -260,7 +260,7 @@ public: std::size_t number_of_facets() const { return m_facets.size(); } /// gives the range of facets - const Facet_range facets() const { return m_facets; } + const Facet_range& facets() const { return m_facets; } /// gives an iterator to the first triple in the surface. /** \warning Changes to the surface may change its topology. From 96bad40e1d18531e939bd2b7617bb531e805a102 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 May 2023 16:26:06 +0100 Subject: [PATCH 09/23] Add an example that constructs a Surface_mesh --- .../CMakeLists.txt | 2 + .../scale_space_sm.cpp | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_sm.cpp diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt index 8a7397b76d3..f08b349b318 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt @@ -19,6 +19,8 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("scale_space.cpp") target_link_libraries(scale_space PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("scale_space_sm.cpp") + target_link_libraries(scale_space_sm PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_incremental.cpp") target_link_libraries(scale_space_incremental PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_manifold.cpp") diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_sm.cpp b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_sm.cpp new file mode 100644 index 00000000000..a562362bfcf --- /dev/null +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/scale_space_sm.cpp @@ -0,0 +1,73 @@ +#include + +#include + +#include +#include +#include +#include + +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; + +typedef CGAL::Scale_space_surface_reconstruction_3< Kernel > Reconstruction; +typedef CGAL::Scale_space_reconstruction_3::Weighted_PCA_smoother< Kernel > Smoother; +typedef CGAL::Scale_space_reconstruction_3::Alpha_shape_mesher< Kernel > Mesher; + +typedef Reconstruction::Point Point; +typedef Reconstruction::Facet_const_iterator Facet_iterator; + +typedef CGAL::Surface_mesh Surface_mesh; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; + +int main(int argc, char* argv[]) { + // Read the data + std::string fname = argc==1?CGAL::data_file_path("points_3/kitten.off"):argv[1]; + + std::cerr << "Reading " << std::flush; + std::vector points; + if(!CGAL::IO::read_points(fname, std::back_inserter(points))) + { + std::cerr << "Error: cannot read file" << std::endl; + return EXIT_FAILURE; + } + + std::cerr << "done: " << points.size() << " points." << std::endl; + + // Construct the mesh in a scale space. + Reconstruction reconstruct(points.begin(), points.end() ); + Smoother smoother(10, 200 ); + reconstruct.increase_scale(4, smoother); + + Mesher mesher(smoother.squared_radius(), + false, // Do not separate shells + true // Force manifold output + ); + reconstruct.reconstruct_surface(mesher); + + Reconstruction::Point_range smoothed(reconstruct.points()); + Reconstruction::Facet_range polygons(reconstruct.facets()); + + CGAL::Polygon_mesh_processing::orient_polygon_soup(smoothed, polygons); + + Surface_mesh mesh; + CGAL::Polygon_mesh_processing::polygon_soup_to_polygon_mesh(smoothed, polygons, mesh); + + // Also store the input points as vertex property + Surface_mesh::Property_map original; + bool created; + boost::tie(original, created) = mesh.add_property_map("v:original"); + assert(created); + + int i = 0; + for(auto v : vertices(mesh)){ + put(original, v, points[i++]); + } + + + std::cerr << "Done." << std::endl; + + return EXIT_SUCCESS; +} From ef386749338109d3bbe051c264387447c179894c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 May 2023 16:44:44 +0100 Subject: [PATCH 10/23] Add example --- .../doc/Scale_space_reconstruction_3/examples.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/examples.txt b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/examples.txt index 2446884a162..4f96d83d450 100644 --- a/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/examples.txt +++ b/Scale_space_reconstruction_3/doc/Scale_space_reconstruction_3/examples.txt @@ -1,5 +1,6 @@ /*! \example Scale_space_reconstruction_3/scale_space.cpp +\example Scale_space_reconstruction_3/scale_space_sm.cpp \example Scale_space_reconstruction_3/scale_space_incremental.cpp \example Scale_space_reconstruction_3/scale_space_manifold.cpp \example Scale_space_reconstruction_3/scale_space_advancing_front.cpp From 44a7b6a431d20ada31231bdf488e4d939d741e67 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 19 May 2023 18:36:24 +0200 Subject: [PATCH 11/23] Upgrade FindTBB.cmake Fixes https://github.com/CGAL/cgal/issues/7349 --- Installation/cmake/modules/FindTBB.cmake | 139 ++++++++++++----------- 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/Installation/cmake/modules/FindTBB.cmake b/Installation/cmake/modules/FindTBB.cmake index 8475edd450d..d219735faa3 100644 --- a/Installation/cmake/modules/FindTBB.cmake +++ b/Installation/cmake/modules/FindTBB.cmake @@ -1,3 +1,5 @@ +# Copy of https://github.com/NVIDIA/thrust/blob/9f1cddc62b1bebbaeb8d07d4476c285be5aa0adc/thrust/cmake/FindTBB.cmake +# # - Find ThreadingBuildingBlocks include dirs and libraries # Use this module by invoking find_package with the form: # find_package(TBB @@ -11,6 +13,7 @@ # malloc proxy # TBB::tbb - imported target for the TBB library # +# TBB_VERSION - Product Version Number ("MAJOR.MINOR") # TBB_VERSION_MAJOR - Major Product Version Number # TBB_VERSION_MINOR - Minor Product Version Number # TBB_INTERFACE_VERSION - Engineering Focused Version Number @@ -107,48 +110,48 @@ endfunction() # Do the final processing for the package find. #=============================================== macro(findpkg_finish PREFIX TARGET_NAME) - # skip if already processed during this run - if (NOT ${PREFIX}_FOUND) - if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY) - set(${PREFIX}_FOUND TRUE) - set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR}) - set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY}) - else () - if (${PREFIX}_FIND_REQUIRED AND NOT ${PREFIX}_FIND_QUIETLY) - message(FATAL_ERROR "Required library ${PREFIX} not found.") - endif () - endif () - - if (NOT TARGET "TBB::${TARGET_NAME}") - if (${PREFIX}_LIBRARY_RELEASE) - tbb_extract_real_library(${${PREFIX}_LIBRARY_RELEASE} real_release) - endif () - if (${PREFIX}_LIBRARY_DEBUG) - tbb_extract_real_library(${${PREFIX}_LIBRARY_DEBUG} real_debug) - endif () - add_library(TBB::${TARGET_NAME} UNKNOWN IMPORTED) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}_INCLUDE_DIR}") - if (${PREFIX}_LIBRARY_DEBUG AND ${PREFIX}_LIBRARY_RELEASE) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - IMPORTED_LOCATION "${real_release}" - IMPORTED_LOCATION_DEBUG "${real_debug}" - IMPORTED_LOCATION_RELEASE "${real_release}") - elseif (${PREFIX}_LIBRARY_RELEASE) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - IMPORTED_LOCATION "${real_release}") - elseif (${PREFIX}_LIBRARY_DEBUG) - set_target_properties(TBB::${TARGET_NAME} PROPERTIES - IMPORTED_LOCATION "${real_debug}") - endif () - endif () - - #mark the following variables as internal variables - mark_as_advanced(${PREFIX}_INCLUDE_DIR - ${PREFIX}_LIBRARY - ${PREFIX}_LIBRARY_DEBUG - ${PREFIX}_LIBRARY_RELEASE) + if (${PREFIX}_INCLUDE_DIR AND ${PREFIX}_LIBRARY) + set(${PREFIX}_FOUND TRUE) + set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIR}) + set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARY}) + else () + if (${PREFIX}_FIND_REQUIRED) + message(FATAL_ERROR "Required library ${PREFIX} not found.") + elseif (NOT ${PREFIX}_FIND_QUIETLY) + message("Library ${PREFIX} not found.") + endif() + return() endif () + + if (NOT TARGET "TBB::${TARGET_NAME}") + if (${PREFIX}_LIBRARY_RELEASE) + tbb_extract_real_library(${${PREFIX}_LIBRARY_RELEASE} real_release) + endif () + if (${PREFIX}_LIBRARY_DEBUG) + tbb_extract_real_library(${${PREFIX}_LIBRARY_DEBUG} real_debug) + endif () + add_library(TBB::${TARGET_NAME} UNKNOWN IMPORTED) + set_target_properties(TBB::${TARGET_NAME} PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${${PREFIX}_INCLUDE_DIR}") + if (${PREFIX}_LIBRARY_DEBUG AND ${PREFIX}_LIBRARY_RELEASE) + set_target_properties(TBB::${TARGET_NAME} PROPERTIES + IMPORTED_LOCATION "${real_release}" + IMPORTED_LOCATION_DEBUG "${real_debug}" + IMPORTED_LOCATION_RELEASE "${real_release}") + elseif (${PREFIX}_LIBRARY_RELEASE) + set_target_properties(TBB::${TARGET_NAME} PROPERTIES + IMPORTED_LOCATION "${real_release}") + elseif (${PREFIX}_LIBRARY_DEBUG) + set_target_properties(TBB::${TARGET_NAME} PROPERTIES + IMPORTED_LOCATION "${real_debug}") + endif () + endif () + + #mark the following variables as internal variables + mark_as_advanced(${PREFIX}_INCLUDE_DIR + ${PREFIX}_LIBRARY + ${PREFIX}_LIBRARY_DEBUG + ${PREFIX}_LIBRARY_RELEASE) endmacro() #=============================================== @@ -188,28 +191,10 @@ endmacro() #============================================================================= # Now to actually find TBB # -#start with looking for TBB_DIR and TBB_ROOT -if((TBB_ROOT OR ENV{TBB_ROOT} OR ENV{TBB_DIR} ) AND NOT TBB_FOUND) - find_package(TBB QUIET NO_MODULE NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) -endif() -if(TBB_FOUND) - return() -endif()#TBB_FOUND - -#try CONFIG Mode -find_package(TBB 2019.0.11005 QUIET NO_MODULE) -if(TBB_FOUND) - return() -endif()#TBB_FOUND # Get path, convert backslashes as ${ENV_${var}} getenv_path(TBB_ROOT) -if(NOT ENV_TBB_ROOT) - getenv_path(TBBROOT) - set(ENV_TBB_ROOT ${ENV_TBBROOT}) -endif() - # initialize search paths set(TBB_PREFIX_PATH ${TBB_ROOT} ${ENV_TBB_ROOT}) set(TBB_INC_SEARCH_PATH "") @@ -253,8 +238,26 @@ if (WIN32 AND MSVC) set(COMPILER_PREFIX "vc11") elseif(MSVC_VERSION EQUAL 1800) set(COMPILER_PREFIX "vc12") - elseif(MSVC_VERSION EQUAL 1900) + elseif(MSVC_VERSION GREATER_EQUAL 1900 AND MSVC_VERSION LESS_EQUAL 1939) + # 1900-1925 actually spans three Visual Studio versions: + # 1900 = VS 14.0 (v140 toolset) a.k.a. MSVC 2015 + # 1910-1919 = VS 15.0 (v141 toolset) a.k.a. MSVC 2017 + # 1920-1929 = VS 16.0 (v142 toolset) a.k.a. MSVC 2019 + # 1930-1939 = VS 17.0 (v143 toolset) a.k.a. MSVC 2022 + # + # But these are binary compatible and TBB's open source distribution only + # ships a single vs14 lib (as of 2020.0) set(COMPILER_PREFIX "vc14") + else() + # The next poor soul who finds themselves having to decode visual studio + # version conventions may find these helpful: + # - https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html + # - https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering + message(AUTHOR_WARNING + "Unrecognized MSVC version (${MSVC_VERSION}). " + "Please update FindTBB.cmake. " + "Some TBB_* CMake variables may need to be set manually." + ) endif () # for each prefix path, add ia32/64\${COMPILER_PREFIX}\lib to the lib search path @@ -351,7 +354,6 @@ endforeach () set(TBB_LIBRARY_NAMES tbb) get_debug_names(TBB_LIBRARY_NAMES) - find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h PATHS ${TBB_INC_SEARCH_PATH}) @@ -411,12 +413,18 @@ findpkg_finish(TBB_MALLOC_PROXY tbbmalloc_proxy) #============================================================================= -#parse all the version numbers from tbb +# Parse all the version numbers from tbb. if(NOT TBB_VERSION) + if(EXISTS "${TBB_INCLUDE_DIR}/tbb/version.h") + # The newer oneTBB provides tbb/version.h but no tbb/tbb_stddef.h. + set(version_file "${TBB_INCLUDE_DIR}/tbb/version.h") + else() + # Older TBB provides tbb/tbb_stddef.h but no tbb/version.h. + set(version_file "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h") + endif() - #only read the start of the file - file(STRINGS - "${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h" + file(STRINGS + "${version_file}" TBB_VERSION_CONTENTS REGEX "VERSION") @@ -436,4 +444,5 @@ if(NOT TBB_VERSION) ".*#define TBB_COMPATIBLE_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_COMPATIBLE_INTERFACE_VERSION "${TBB_VERSION_CONTENTS}") + set(TBB_VERSION "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}") endif() From 77c7335347dfff5c071e31aa7f045cd677e7f36d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Sun, 28 May 2023 23:16:46 +0200 Subject: [PATCH 12/23] Remove useless header include --- .../demo/Triangulation_on_sphere_2/main.cpp | 2 -- .../Triangulation_on_sphere_2/triang_on_sphere_proj.cpp | 2 -- .../include/CGAL/Delaunay_triangulation_on_sphere_2.h | 1 - 3 files changed, 5 deletions(-) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/main.cpp b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/main.cpp index 9b492a82213..99bf18bc2ec 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/main.cpp +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/main.cpp @@ -13,8 +13,6 @@ #include #include -#include - #include #include diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp index 814c36b7089..d3011f0f9b6 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp @@ -3,8 +3,6 @@ #include #include -#include - typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Projection_on_sphere_traits_3 Traits; diff --git a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h index 35600bdd788..53473d75515 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -27,7 +27,6 @@ #include #include -#include #include #include From 9bd19e82d65bca761b86c06691b9f32d8e17de3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Sun, 28 May 2023 23:21:53 +0200 Subject: [PATCH 13/23] Use the correct function for solid faces --- .../examples/Triangulation_on_sphere_2/triang_on_sphere.cpp | 2 +- .../examples/Triangulation_on_sphere_2/triang_on_sphere_geo.cpp | 2 +- .../Triangulation_on_sphere_2/triang_on_sphere_proj.cpp | 2 +- .../Triangulation_on_sphere_2/triang_on_sphere_range.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere.cpp b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere.cpp index 05a9135b26c..01a32e9e9a6 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere.cpp +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere.cpp @@ -36,7 +36,7 @@ int main(int, char**) std::cout << "It has:\n"; std::cout << dtos.number_of_vertices() << " vertices\n"; std::cout << dtos.number_of_edges() << " edges\n"; - std::cout << dtos.number_of_faces() << " solid faces\n"; + std::cout << dtos.number_of_solid_faces() << " solid faces\n"; std::cout << dtos.number_of_ghost_faces() << " ghost faces\n" << std::endl; } diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_geo.cpp b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_geo.cpp index f2dcb474906..23bed505d5b 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_geo.cpp +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_geo.cpp @@ -54,7 +54,7 @@ int main(int argc, char** argv) DToS2 dtos(points.begin(), points.end(), traits); std::cout << dtos.number_of_vertices() << " vertices" << std::endl; - std::cout << dtos.number_of_faces() << " solid faces" << std::endl; + std::cout << dtos.number_of_solid_faces() << " solid faces" << std::endl; std::cout << dtos.number_of_ghost_faces() << " ghost faces" << std::endl; CGAL::IO::write_OFF("result.off", dtos, CGAL::parameters::stream_precision(17)); diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp index d3011f0f9b6..3dafdcf9bca 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_proj.cpp @@ -34,7 +34,7 @@ int main(int, char**) std::cout << "The triangulation now has dimension: " << dtos.dimension() << " and\n"; std::cout << dtos.number_of_vertices() << " vertices" << std::endl; std::cout << dtos.number_of_edges() << " edges" << std::endl; - std::cout << dtos.number_of_faces() << " solid faces" << std::endl; + std::cout << dtos.number_of_solid_faces() << " solid faces" << std::endl; std::cout << dtos.number_of_ghost_faces() << " ghost faces" << std::endl; } diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_range.cpp b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_range.cpp index c6c433f824c..682eb394ffe 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_range.cpp +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/triang_on_sphere_range.cpp @@ -38,7 +38,7 @@ int main(int argc, char** argv) DToS2 dtos(points.begin(), points.end(), traits); std::cout << dtos.number_of_vertices() << " vertices" << std::endl; - std::cout << dtos.number_of_faces() << " solid faces" << std::endl; + std::cout << dtos.number_of_solid_faces() << " solid faces" << std::endl; CGAL::IO::write_OFF("result.off", dtos, CGAL::parameters::stream_precision(17)); From fb9f59d3a906de372c4ef30772fa5bc2223bb942 Mon Sep 17 00:00:00 2001 From: Rebecca Dengate Date: Tue, 30 May 2023 16:35:10 +1000 Subject: [PATCH 14/23] Adds missing AppendedData closing tag, so vtu binary file contains valid xml. --- SMDS_3/include/CGAL/IO/output_to_vtu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SMDS_3/include/CGAL/IO/output_to_vtu.h b/SMDS_3/include/CGAL/IO/output_to_vtu.h index e78f1b680a2..28818b8ba68 100644 --- a/SMDS_3/include/CGAL/IO/output_to_vtu.h +++ b/SMDS_3/include/CGAL/IO/output_to_vtu.h @@ -333,7 +333,7 @@ void output_to_vtu_with_attributes(std::ostream& os, os << "\n_"; write_c3t3_points(os,tr,V); // fills V if the mode is BINARY write_cells(os,c3t3,V); - for(std::size_t i = 0; i< attributes.size(); ++i) + for(std::size_t i = 0; i< attributes.size(); ++i) { switch(attributes[i].second.which()){ case 0: write_attributes(os, *boost::get* >(attributes[i].second)); @@ -345,6 +345,8 @@ void output_to_vtu_with_attributes(std::ostream& os, write_attributes(os, *boost::get* >(attributes[i].second)); break; } + } + os << "\n\n"; } os << "\n"; } From a08fd315e575b61954c2e68f3dbc7122a7f6433e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 31 May 2023 14:27:53 +0200 Subject: [PATCH 15/23] fix warning --- Polyhedron/demo/Polyhedron/Use_ssh.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Use_ssh.cpp b/Polyhedron/demo/Polyhedron/Use_ssh.cpp index 2fafe072444..a4495160fbc 100644 --- a/Polyhedron/demo/Polyhedron/Use_ssh.cpp +++ b/Polyhedron/demo/Polyhedron/Use_ssh.cpp @@ -319,7 +319,6 @@ bool pull_file(ssh_session &session, const char* from_path, const char* to_path) { - int rc; std::size_t size; std::size_t processed = 0; std::vector buffer; @@ -386,10 +385,9 @@ bool explore_the_galaxy(ssh_session &session, QStringList& files) { ssh_channel channel; - int rc; channel = ssh_channel_new(session); if (channel == nullptr) return false; - rc = ssh_channel_open_session(channel); + int rc = ssh_channel_open_session(channel); if (rc != SSH_OK) { ssh_channel_free(channel); From c02bd3cbd5f4f4201d2422bb91b02516a63f728e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 1 Jun 2023 10:15:58 +0200 Subject: [PATCH 16/23] Reintroduce a search in NO_MODULE mode --- Installation/cmake/modules/FindTBB.cmake | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Installation/cmake/modules/FindTBB.cmake b/Installation/cmake/modules/FindTBB.cmake index d219735faa3..08189aa454c 100644 --- a/Installation/cmake/modules/FindTBB.cmake +++ b/Installation/cmake/modules/FindTBB.cmake @@ -195,6 +195,25 @@ endmacro() # Get path, convert backslashes as ${ENV_${var}} getenv_path(TBB_ROOT) +#start with looking for TBB_DIR and TBB_ROOT +if((TBB_ROOT OR "$ENV{TBB_ROOT}" OR "$ENV{TBB_DIR}" ) AND NOT TBB_FOUND) + find_package(TBB QUIET NO_MODULE NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH) +endif() +if(TBB_FOUND) + return() +endif()#TBB_FOUND + +#try CONFIG Mode +find_package(TBB 2019.0.11005 QUIET NO_MODULE) +if(TBB_FOUND) + return() +endif()#TBB_FOUND + +if(NOT ENV_TBB_ROOT) + getenv_path(TBBROOT) + set(ENV_TBB_ROOT ${ENV_TBBROOT}) +endif() + # initialize search paths set(TBB_PREFIX_PATH ${TBB_ROOT} ${ENV_TBB_ROOT}) set(TBB_INC_SEARCH_PATH "") From cb3a1e03d40cae59c82f4a7333a01ecc0cee9baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 1 Jun 2023 11:17:45 +0200 Subject: [PATCH 17/23] remove the early exit as we could miss the fact that some operations might be impossible --- .../Corefinement/Face_graph_output_builder.h | 47 +++++++++++++------ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h index 8fafd13a9c9..0092f88b826 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Face_graph_output_builder.h @@ -1052,16 +1052,18 @@ public: previous_bitvalue[2] = is_patch_inside_tm1.test(patch_id_q1); previous_bitvalue[3] = is_patch_inside_tm1.test(patch_id_q2); -#ifndef CGAL_NDEBUG +/* + // Note that this code is commented as impossible_operation flag could be set thanks to + // another polyline and such a `continue` would make us miss it. if (is_tm1_closed && is_tm2_closed) { - if (!patch_status_was_not_already_set[0] && - !patch_status_was_not_already_set[1] && - !patch_status_was_not_already_set[2] && - !patch_status_was_not_already_set[3]) - continue; // all patches were already classified, no need to redo it + if (!patch_status_was_not_already_set[0] && + !patch_status_was_not_already_set[1] && + !patch_status_was_not_already_set[2] && + !patch_status_was_not_already_set[3]) + continue; // all patches were already classified, no need to redo it } -#endif +*/ // check incompatibility of patch classifications auto inconsistent_classification = [&]() @@ -1085,6 +1087,25 @@ public: } return false; }; +#ifndef CGAL_NDEBUG + auto debug_check_consistency = [&]() + { + if (!used_to_clip_a_surface && !used_to_classify_patches) + { + CGAL_assertion( patch_status_was_not_already_set[0] || (previous_bitvalue[0]==is_patch_inside_tm2[patch_id_p1]) ); + CGAL_assertion( patch_status_was_not_already_set[1] || (previous_bitvalue[1]==is_patch_inside_tm2[patch_id_p2]) ); + CGAL_assertion( patch_status_was_not_already_set[2] || (previous_bitvalue[2]==is_patch_inside_tm1[patch_id_q1]) ); + CGAL_assertion( patch_status_was_not_already_set[3] || (previous_bitvalue[3]==is_patch_inside_tm1[patch_id_q2]) ); + } + }; + is_patch_inside_tm2.reset(patch_id_p1); + is_patch_inside_tm2.reset(patch_id_p2); + is_patch_inside_tm1.reset(patch_id_q1); + is_patch_inside_tm1.reset(patch_id_q2); +#else + auto debug_check_consistency = [&](){}; + +#endif //indicates that patch status will be updated patch_status_not_set_tm1.reset(patch_id_p1); @@ -1141,6 +1162,7 @@ public: if ( q2_is_between_p1p2 ) is_patch_inside_tm1.set(patch_id_q2); //case 1 else is_patch_inside_tm2.set(patch_id_p2); //case 2 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } else{ @@ -1172,6 +1194,7 @@ public: is_patch_inside_tm2.set(patch_id_p2); } //else case 4 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } else @@ -1203,6 +1226,7 @@ public: is_patch_inside_tm2.set(patch_id_p1); } // else case 6 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } else{ @@ -1232,6 +1256,7 @@ public: if ( q1_is_between_p1p2 ) is_patch_inside_tm1.set(patch_id_q1); //case 7 else is_patch_inside_tm2.set(patch_id_p1); //case 8 if (inconsistent_classification()) return; + debug_check_consistency(); continue; } } @@ -1394,13 +1419,7 @@ public: } } if (inconsistent_classification()) return; - if (!used_to_clip_a_surface && !used_to_classify_patches) - { - CGAL_assertion( patch_status_was_not_already_set[0] || previous_bitvalue[0]==is_patch_inside_tm2[patch_id_p1] ); - CGAL_assertion( patch_status_was_not_already_set[1] || previous_bitvalue[1]==is_patch_inside_tm2[patch_id_p2] ); - CGAL_assertion( patch_status_was_not_already_set[2] || previous_bitvalue[2]==is_patch_inside_tm1[patch_id_q1] ); - CGAL_assertion( patch_status_was_not_already_set[3] || previous_bitvalue[3]==is_patch_inside_tm1[patch_id_q2] ); - } + debug_check_consistency(); } } From e0f48fb51aa55997a4ff30e380d29dc19d2dfdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 31 May 2023 16:41:39 +0200 Subject: [PATCH 18/23] fix script --- .../run_test_corefinement_bool_op_full.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/run_test_corefinement_bool_op_full.sh b/Polygon_mesh_processing/test/Polygon_mesh_processing/run_test_corefinement_bool_op_full.sh index 2cea97cfb6b..bf9b24931ba 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/run_test_corefinement_bool_op_full.sh +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/run_test_corefinement_bool_op_full.sh @@ -14,6 +14,8 @@ for i in `seq 1 $k`; do ri=`echo $files | awk '{print $5}'` rm=`echo $files | awk '{print $6}'` rmr=`echo $files | awk '{print $7}'` + f1=`eval echo $f1` + f2=`eval echo $f2` echo -n "==== " $f1 $f2 " " if (./test_corefinement_bool_op $f1 $f2 ALL $ru $ri $rm $rmr|| false ) > /dev/null 2>&1; then From a8e3c84c7847d7ab34fbfa52fa837f615b2f1e03 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Jun 2023 10:37:22 +0100 Subject: [PATCH 19/23] PMP: Document overload of angle_and_area_smoothing() --- .../angle_and_area_smoothing.h | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 03e9103df9e..685ce388897 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -33,7 +33,7 @@ namespace Polygon_mesh_processing { * * \short smooths a triangulated region of a polygon mesh. * -* This function attempts to make the triangle angle and area distributions as uniform as possible +* This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. * * Angle-based smoothing does not change the combinatorial information of the mesh. Area-based smoothing @@ -329,13 +329,33 @@ void angle_and_area_smoothing(const FaceRange& faces, } } -///\cond SKIP_IN_MANUAL +/*! +* \ingroup PMP_meshing_grp +* +* \short smooths a polygon mesh. +* +* This function aims to make the triangle angle and area distributions as uniform as possible +* by moving (non-constrained) vertices. +* +* Angle-based smoothing does not change the combinatorial information of the mesh. Area-based smoothing +* might change the combinatorial information, unless specified otherwise. It is also possible +* to make the smoothing algorithm "safer" by rejecting moves that, when applied, would worsen the +* quality of the mesh, e.g. that would decrease the value of the smallest angle around a vertex or +* create self-intersections. +* +* Optionally, the points are reprojected after each iteration. +* +* See the overload for a face range of this function for the template +* parameters, parameters, and named parameters. +*/ template void angle_and_area_smoothing(TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values()) { angle_and_area_smoothing(faces(tmesh), tmesh, np); } + +///\cond SKIP_IN_MANUAL template void angles_evaluation(TriangleMesh& tmesh, GeomTraits traits, Stream& output) { From bf1ffb3cae0066df2f7f5b274de42e69f8b15861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 1 Jun 2023 11:38:03 +0200 Subject: [PATCH 20/23] move tests into the testsuite --- .../test_corefinement_bool_op.cmd | 18 ++++++++++++++++++ .../test_corefinement_bool_op_full.cmd | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cmd b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cmd index c11009e6559..cc4c42e04cd 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cmd +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op.cmd @@ -1,3 +1,21 @@ ${CGAL_DATA_DIR}/meshes/elephant.off ${CGAL_DATA_DIR}/meshes/sphere.off ALL 1 1 1 1 ${CGAL_DATA_DIR}/meshes/open_cube.off data-coref/incompatible_with_open_cube.off ALL 0 0 0 0 data-coref/floating_squares.off data-coref/hexa.off ALL 1 1 1 1 +data-coref/star_tgt1-0.off data-coref/star_tgt2-0.off ALL 1 1 1 0 +data-coref/star_tgt1-0.off data-coref/star_tgt2-1.off ALL 1 1 1 0 +data-coref/star_tgt1-0.off data-coref/star_tgt2-2.off ALL 0 1 1 1 +data-coref/star_tgt1-0.off data-coref/star_tgt2-3.off ALL 1 1 1 0 +data-coref/star_tgt1-0.off data-coref/star_tgt2-4.off ALL 0 1 1 1 +data-coref/star_tgt1-0.off data-coref/star_tgt2-5.off ALL 1 1 1 0 +data-coref/star_tgt1-1.off data-coref/star_tgt2-0.off ALL 1 1 1 0 +data-coref/star_tgt1-1.off data-coref/star_tgt2-1.off ALL 1 1 1 0 +data-coref/star_tgt1-1.off data-coref/star_tgt2-2.off ALL 0 1 1 1 +data-coref/star_tgt1-1.off data-coref/star_tgt2-3.off ALL 1 1 1 0 +data-coref/star_tgt1-1.off data-coref/star_tgt2-4.off ALL 0 1 1 1 +data-coref/star_tgt1-1.off data-coref/star_tgt2-5.off ALL 1 1 1 0 +data-coref/star_tgt1-2.off data-coref/star_tgt2-0.off ALL 1 1 1 0 +data-coref/star_tgt1-2.off data-coref/star_tgt2-1.off ALL 1 1 1 0 +data-coref/star_tgt1-2.off data-coref/star_tgt2-2.off ALL 0 1 1 1 +data-coref/star_tgt1-2.off data-coref/star_tgt2-3.off ALL 1 1 1 1 +data-coref/star_tgt1-2.off data-coref/star_tgt2-4.off ALL 0 1 1 1 +data-coref/star_tgt1-2.off data-coref/star_tgt2-5.off ALL 1 1 1 1 diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op_full.cmd b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op_full.cmd index db4bb33152d..f506d796e9f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op_full.cmd +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_bool_op_full.cmd @@ -29,21 +29,3 @@ data-coref/cube_meshed.off data-coref/cube.off ALL 1 1 1 1 data-coref/cube.off data-coref/cube_interior_tgt.off ALL 1 1 1 1 data-coref/cube.off data-coref/edge_tangent_to_cube.off ALL 1 1 0 1 data-coref/cube_dig.off data-coref/wedge.off ALL 1 1 1 1 -data-coref/star_tgt1-0.off data-coref/star_tgt2-0.off ALL 1 1 1 0 -data-coref/star_tgt1-0.off data-coref/star_tgt2-1.off ALL 1 1 1 0 -data-coref/star_tgt1-0.off data-coref/star_tgt2-2.off ALL 0 1 1 1 -data-coref/star_tgt1-0.off data-coref/star_tgt2-3.off ALL 1 1 1 0 -data-coref/star_tgt1-0.off data-coref/star_tgt2-4.off ALL 0 1 1 1 -data-coref/star_tgt1-0.off data-coref/star_tgt2-5.off ALL 1 1 1 0 -data-coref/star_tgt1-1.off data-coref/star_tgt2-0.off ALL 1 1 1 0 -data-coref/star_tgt1-1.off data-coref/star_tgt2-1.off ALL 1 1 1 0 -data-coref/star_tgt1-1.off data-coref/star_tgt2-2.off ALL 0 1 1 1 -data-coref/star_tgt1-1.off data-coref/star_tgt2-3.off ALL 1 1 1 0 -data-coref/star_tgt1-1.off data-coref/star_tgt2-4.off ALL 0 1 1 1 -data-coref/star_tgt1-1.off data-coref/star_tgt2-5.off ALL 1 1 1 0 -data-coref/star_tgt1-2.off data-coref/star_tgt2-0.off ALL 1 1 1 0 -data-coref/star_tgt1-2.off data-coref/star_tgt2-1.off ALL 1 1 1 0 -data-coref/star_tgt1-2.off data-coref/star_tgt2-2.off ALL 0 1 1 1 -data-coref/star_tgt1-2.off data-coref/star_tgt2-3.off ALL 1 1 1 1 -data-coref/star_tgt1-2.off data-coref/star_tgt2-4.off ALL 0 1 1 1 -data-coref/star_tgt1-2.off data-coref/star_tgt2-5.off ALL 1 1 1 1 From 609f8ef7f14cae1f6e50aa6e4859be98b980b338 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Jun 2023 10:58:52 +0100 Subject: [PATCH 21/23] Alpha Wrapping: minor cleanup --- Alpha_wrap_3/examples/Alpha_wrap_3/mixed_inputs_wrap.cpp | 2 -- Alpha_wrap_3/examples/Alpha_wrap_3/point_set_wrap.cpp | 4 ---- Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp | 3 --- Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp | 3 --- 4 files changed, 12 deletions(-) diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/mixed_inputs_wrap.cpp b/Alpha_wrap_3/examples/Alpha_wrap_3/mixed_inputs_wrap.cpp index eca3fa1654e..be64a8febbd 100644 --- a/Alpha_wrap_3/examples/Alpha_wrap_3/mixed_inputs_wrap.cpp +++ b/Alpha_wrap_3/examples/Alpha_wrap_3/mixed_inputs_wrap.cpp @@ -25,8 +25,6 @@ using Mesh = CGAL::Surface_mesh; int main(int argc, char** argv) { - std::cout.precision(17); - // Read the inputs const std::string ts_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/armadillo.off"); // triangle soup const std::string ss_filename = (argc > 2) ? argv[2] : CGAL::data_file_path("images/420.polylines.txt"); // segment soup diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/point_set_wrap.cpp b/Alpha_wrap_3/examples/Alpha_wrap_3/point_set_wrap.cpp index feaa9c804af..8742a2a2001 100644 --- a/Alpha_wrap_3/examples/Alpha_wrap_3/point_set_wrap.cpp +++ b/Alpha_wrap_3/examples/Alpha_wrap_3/point_set_wrap.cpp @@ -8,8 +8,6 @@ #include #include -namespace AW3 = CGAL::Alpha_wraps_3; - using K = CGAL::Exact_predicates_inexact_constructions_kernel; using Point_3 = K::Point_3; @@ -18,8 +16,6 @@ using Mesh = CGAL::Surface_mesh; int main(int argc, char** argv) { - std::cout.precision(17); - // Read the input const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/oni.pwn"); std::cout << "Reading " << filename << "..." << std::endl; diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp b/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp index 5aa8deeb4de..00e2e4fd9fc 100644 --- a/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp +++ b/Alpha_wrap_3/examples/Alpha_wrap_3/triangle_mesh_wrap.cpp @@ -9,7 +9,6 @@ #include #include -namespace AW3 = CGAL::Alpha_wraps_3; namespace PMP = CGAL::Polygon_mesh_processing; using K = CGAL::Exact_predicates_inexact_constructions_kernel; @@ -19,8 +18,6 @@ using Mesh = CGAL::Surface_mesh; int main(int argc, char** argv) { - std::cout.precision(17); - // Read the input const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/armadillo.off"); std::cout << "Reading " << filename << "..." << std::endl; diff --git a/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp b/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp index 2eb3f9c4155..1c1d6c7b3d7 100644 --- a/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp +++ b/Alpha_wrap_3/examples/Alpha_wrap_3/wrap_from_cavity.cpp @@ -8,7 +8,6 @@ #include #include -namespace AW3 = CGAL::Alpha_wraps_3; namespace PMP = CGAL::Polygon_mesh_processing; using K = CGAL::Exact_predicates_inexact_constructions_kernel; @@ -18,8 +17,6 @@ using Mesh = CGAL::Surface_mesh; int main(int argc, char** argv) { - std::cout.precision(17); - // Read the input const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/armadillo.off"); std::cout << "Reading " << filename << "..." << std::endl; From f3c2d9b3102139dee24c5552f9e833435f4c0d01 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Jun 2023 17:25:23 +0100 Subject: [PATCH 22/23] polish --- .../Polygon_mesh_processing/angle_and_area_smoothing.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 685ce388897..25471889074 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -31,7 +31,7 @@ namespace Polygon_mesh_processing { /*! * \ingroup PMP_meshing_grp * -* \short smooths a triangulated region of a polygon mesh. +* \brief smooths a triangulated region of a polygon mesh. * * This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. @@ -332,7 +332,7 @@ void angle_and_area_smoothing(const FaceRange& faces, /*! * \ingroup PMP_meshing_grp * -* \short smooths a polygon mesh. +* \brief smooths a polygon mesh. * * This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. @@ -345,7 +345,8 @@ void angle_and_area_smoothing(const FaceRange& faces, * * Optionally, the points are reprojected after each iteration. * -* See the overload for a face range of this function for the template +* The overload of this function which takes a face range as +* additonal parameter documents the template * parameters, parameters, and named parameters. */ template From c1b9ea9d474984435b2a9b5f31447f737c984bb7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 2 Jun 2023 12:27:28 +0200 Subject: [PATCH 23/23] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h Co-authored-by: Mael --- .../CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 25471889074..e51999b9c54 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -345,9 +345,8 @@ void angle_and_area_smoothing(const FaceRange& faces, * * Optionally, the points are reprojected after each iteration. * -* The overload of this function which takes a face range as -* additonal parameter documents the template -* parameters, parameters, and named parameters. +* See the overload which takes a face range as additonal parameter for a comprehensive description +* of the parameters. */ template void angle_and_area_smoothing(TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values())