From e2423af1ad5045d443fbc6aa7dc838f6d6613310 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 25 Aug 2022 19:11:07 +0300 Subject: [PATCH 001/426] Replaced call to member traits() with geometry_traits() and cleaned up --- .../Arr_trapezoid_ric_pl_impl.h | 39 +++++++------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index f95817735da..45964fdf1e6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -316,7 +316,7 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const // face) we check the isolated vertices inside the face to check whether there // is an isolated vertex right above/below the query point. // -template +template typename Arr_trapezoid_ric_point_location::result_type Arr_trapezoid_ric_point_location:: _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, @@ -324,40 +324,33 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, bool shoot_up, const Td_map_item& tr) const { + const auto* gt = this->arrangement()->geometry_traits(); const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER); - typename Geometry_traits_2::Compare_x_2 compare_x = - this->arrangement()->traits()->compare_x_2_object(); - typename Geometry_traits_2::Compare_xy_2 compare_xy = - this->arrangement()->traits()->compare_xy_2_object(); - typename Geometry_traits_2::Compare_y_at_x_2 compare_y_at_x = - this->arrangement()->traits()->compare_y_at_x_2_object(); + auto compare_x = gt->compare_x_2_object(); + auto compare_xy = gt->compare_xy_2_object(); + auto compare_y_at_x = gt->compare_y_at_x_2_object(); - Isolated_vertex_const_iterator iso_verts_it; - Vertex_const_handle closest_iso_v; - const Vertex_const_handle invalid_v; - const Halfedge_const_handle invalid_he; - Face_const_handle face; + Vertex_const_handle closest_iso_v; + const Vertex_const_handle invalid_v; + const Halfedge_const_handle invalid_he; // If the closest feature is a valid halfedge, take its incident face. // Otherwise, take the unbounded face. - if (halfedge_found == invalid_he) - face = _get_unbounded_face(tr, p, All_sides_oblivious_category()); - else + Face_const_handle face = (halfedge_found == invalid_he) ? + _get_unbounded_face(tr, p, All_sides_oblivious_category()) : face = halfedge_found->face(); // Go over the isolated vertices in the face. - for (iso_verts_it = face->isolated_vertices_begin(); + for (auto iso_verts_it = face->isolated_vertices_begin(); iso_verts_it != face->isolated_vertices_end(); ++iso_verts_it) { // The current isolated vertex should have the same x-coordinate as the // query point in order to be below or above it. - if (compare_x (p, iso_verts_it->point()) != EQUAL) - continue; + if (compare_x (p, iso_verts_it->point()) != EQUAL) continue; // Make sure the isolated vertex is above the query point (if we shoot up) // or below it (if we shoot down). - if (compare_xy (p, iso_verts_it->point()) != point_above_under) - continue; + if (compare_xy (p, iso_verts_it->point()) != point_above_under) continue; // Check if the current isolated vertex lies closer to the query point than // the closest feature so far. @@ -379,12 +372,10 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, // If we found an isolated vertex above (or under) the query point, return // a handle to this vertex. - if (closest_iso_v != invalid_v) - return make_result(closest_iso_v); + if (closest_iso_v != invalid_v) return make_result(closest_iso_v); // If we are inside the unbounded face, return this face. - if (halfedge_found == invalid_he) - return make_result(face); + if (halfedge_found == invalid_he) return make_result(face); // Return the halfedge lying above (or below) the query point. return make_result(halfedge_found); From fa4d69c1fa8a8e8fd81d79d0d1c18cb2fcd85c0f Mon Sep 17 00:00:00 2001 From: maximecharriere <51918753+maximecharriere@users.noreply.github.com> Date: Mon, 29 Aug 2022 19:57:32 +0200 Subject: [PATCH 002/426] Draw face/vertex/edge with its own colour or a random colour --- BGL/include/CGAL/draw_face_graph.h | 33 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 00e22278c7b..cea4fb68d74 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -22,17 +22,29 @@ namespace CGAL { +template +std::string getColorPropertyName(void) { return std::string("color"); } + +template <> +inline std::string getColorPropertyName(void) { return std::string("f:color"); } + +template <> +inline std::string getColorPropertyName(void) { return std::string("e:color"); } + +template <> +inline std::string getColorPropertyName(void) { return std::string("v:color"); } + // Default color functor; user can change it to have its own face color struct DefaultColorFunctorFaceGraph { - template - CGAL::IO::Color operator()(const Graph&, - typename boost::graph_traits::face_descriptor fh) const + template + CGAL::IO::Color operator()(const Graph& mesh, + EI elementIndex) const { - if (fh==boost::graph_traits::null_face()) // use to get the mono color - return CGAL::IO::Color(100, 125, 200); // R G B between 0-255 - - return get_random_color(CGAL::get_default_random()); + typename Graph::template Property_map colorPm; + bool found; + std::tie(colorPm, found) = mesh.property_map(getColorPropertyName()); //Get the color property map + return found ? colorPm[elementIndex] : get_random_color(CGAL::get_default_random()); //return the element color if any, otherwise return a random color } }; @@ -159,13 +171,16 @@ protected: for (auto e: edges(sm)) { + CGAL::IO::Color c=fcolor(sm, e); add_segment(get(point_pmap, source(halfedge(e, sm), sm)), - get(point_pmap, target(halfedge(e, sm), sm))); + get(point_pmap, target(halfedge(e, sm), sm)), + c); } for (auto v: vertices(sm)) { - this->add_point(get(point_pmap, v)); + CGAL::IO::Color c=fcolor(sm, v); + this->add_point(get(point_pmap, v), c); } }; } From 7c92341be777d7c295d3fa8010c34dc8b35eab16 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 2 Sep 2022 11:31:47 +0200 Subject: [PATCH 003/426] Introduce CGAL_Kernel_pred_RT_or_FT This commit introduces a new kind of predicate in ``. In addition to - `CGAL_kernel_pred` for predicates, - `CGAL_Kernel_pred_RT` for predicates that can be implemented using a ring-type, now there is also: - `CGAL_Kernel_pred_RT_or_FT` for predicates with multiple overloads of `operator()`, some needing a field type and other needing a ring type (without the division operator). The C++ code can discriminate between the two cases with a special wrapper for the return type: `CGAL::Needs_FT`. In ``, in addition to the usual class template `Filtered_predicate`, there is now also `Filtered_predicate_RT_FT` that takes three predicates as template parameters instead of two: - the exact predicate with an ring-type, - the exact predicate with a field-type, - the approximate predicate (with `Interval_nt` as number-type). For the moment, only `Compare_distance_3` in `` is using the new `Filtered_predicate_RT_FT`. Before this commit, the file `Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h` was testing `Compare_distance_3` only with three points or for points. This commit adds: - a test with `Point_3, Point_3, Segment_3`, and - a test with `Line_3, Point_3, Point_3`, that actually needs a field type with its current implementation. In the test `Kernel_23/test/Kernel_23/Filtered_cartesian.cpp`, the macro `CGAL_NO_MPZF_DIVISION_OPERATOR` is defined, to remove the division operator from `CGAL::Mpzf`. `CGAL::Mpzf` is a ring-type, even with its `operator/` (because that `operator/` can only compute exact divisions), but with `CGAL_NO_MPZF_DIVISION_OPERATOR` defined, that is now checked by the compiler. --- .../include/CGAL/Cartesian/function_objects.h | 5 +- .../include/CGAL/Filtered_kernel.h | 9 ++++ .../include/CGAL/Filtered_predicate.h | 51 +++++++++++++++++++ .../modules/CGAL_SetupCGALDependencies.cmake | 2 +- .../include/CGAL/Kernel/interface_macros.h | 12 ++++- .../test/Kernel_23/Filtered_cartesian.cpp | 4 ++ .../test/Kernel_23/include/CGAL/_test_new_3.h | 13 +++++ STL_Extension/include/CGAL/tags.h | 17 +++++++ 8 files changed, 108 insertions(+), 5 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index a93004ad293..207aedd7053 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -17,6 +17,7 @@ #ifndef CGAL_CARTESIAN_FUNCTION_OBJECTS_H #define CGAL_CARTESIAN_FUNCTION_OBJECTS_H +#include #include #include #include @@ -591,14 +592,14 @@ namespace CartesianKernelFunctors { } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - result_type + Needs_FT operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel.h b/Filtered_kernel/include/CGAL/Filtered_kernel.h index 7e7c21ef79f..372295066cf 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel.h @@ -89,6 +89,15 @@ struct Filtered_kernel_base typedef Filtered_predicate P; \ P Pf() const { return P(); } +#define CGAL_Kernel_pred_RT_or_FT(P, Pf) \ + typedef Filtered_predicate_RT_FT P; \ + P Pf() const { return P(); } + // We don't touch the constructions. #define CGAL_Kernel_cons(Y,Z) diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index 2adad47f329..d0035916e8b 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -19,6 +19,8 @@ #include #include +#include + namespace CGAL { // This template class is a wrapper that implements the filtering for any @@ -111,6 +113,55 @@ Filtered_predicate:: return ep(c2e(args)...); } +template +class Filtered_predicate_RT_FT +{ + C2E_RT c2e_rt; + C2E_FT c2e_ft; + C2A c2a; + EP_RT ep_rt; + EP_FT ep_ft; + AP ap; + + using Ares = typename Remove_needs_FT::Type; + +public: + using result_type = typename Remove_needs_FT::Type; + + template + bool needs_ft(const Args&... args) const { + using Actual_approx_res = std::remove_cv_t>; + return std::is_same_v>; + } + + template + result_type + operator()(const Args&... args) const + { + CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); + // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG + { + Protect_FPU_rounding p; + try + { + Ares res = ap(c2a(args)...); + if (is_certain(res)) + return get_certain(res); + } + catch (Uncertain_conversion_exception&) {} + } + CGAL_BRANCH_PROFILER_BRANCH(tmp); + Protect_FPU_rounding p(CGAL_FE_TONEAREST); + CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); + using Actual_approx_res = std::remove_cv_t>; + if constexpr (std::is_same_v>) + return ep_ft(c2e_ft(args)...); + else + return ep_rt(c2e_rt(args)...); + } +}; + + } //namespace CGAL #endif // CGAL_FILTERED_PREDICATE_H diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 790b13331b1..03dd6682c70 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -99,7 +99,7 @@ function(CGAL_setup_CGAL_dependencies target) # CGAL now requires C++14. `decltype(auto)` is used as a marker of # C++14. - target_compile_features(${target} INTERFACE cxx_decltype_auto) + target_compile_features(${target} INTERFACE cxx_std_17) use_CGAL_Boost_support(${target} INTERFACE) diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index d0ba827fa37..04b9639a91b 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -32,6 +32,13 @@ # define CGAL_Kernel_pred_RT(X, Y) CGAL_Kernel_pred(X, Y) #endif +// Those predicates for which Simple_cartesian maybe use division of not. +// Predicates using division must have Needs_FT as actual return +// type. +#ifndef CGAL_Kernel_pred_RT_or_FT +# define CGAL_Kernel_pred_RT_or_FT(X, Y) CGAL_Kernel_pred(X, Y) +#endif + #ifndef CGAL_Kernel_cons # define CGAL_Kernel_cons(X, Y) #endif @@ -110,8 +117,8 @@ CGAL_Kernel_pred(Compare_dihedral_angle_3, compare_dihedral_angle_3_object) CGAL_Kernel_pred(Compare_distance_2, compare_distance_2_object) -CGAL_Kernel_pred(Compare_distance_3, - compare_distance_3_object) +CGAL_Kernel_pred_RT_or_FT(Compare_distance_3, + compare_distance_3_object) CGAL_Kernel_pred_RT(Compare_power_distance_2, compare_power_distance_2_object) CGAL_Kernel_pred_RT(Compare_power_distance_3, @@ -609,6 +616,7 @@ CGAL_Kernel_pred_RT(Side_of_oriented_circle_2, CGAL_Kernel_pred_RT(Side_of_oriented_sphere_3, side_of_oriented_sphere_3_object) +#undef CGAL_Kernel_pred_RT_or_FT #undef CGAL_Kernel_pred_RT #undef CGAL_Kernel_pred #undef CGAL_Kernel_cons diff --git a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp index d8b24523c15..0434a8f8a3c 100644 --- a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp +++ b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp @@ -14,6 +14,10 @@ // // Author(s) : Sylvain Pion +// This defines removes the operator/ from CGAL::Mpzf, to check that functors +// declared with CGAL_Kernel_pred_RT in interface_macros.h really only need +// a RT (ring type), without division. +#define CGAL_NO_MPZF_DIVISION_OPERATOR 1 #include #include diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h index b70b9eea4b6..993b9ce57ca 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h @@ -22,9 +22,12 @@ #include #include #include +#include #include +CGAL_GENERATE_MEMBER_DETECTOR(needs_ft); + using CGAL::internal::use; // Accessory function testing functions that require sqrt(). @@ -605,6 +608,16 @@ test_new_3(const R& rep) Comparison_result tmp34ab = compare_dist(p2,p3,p4); tmp34ab = compare_dist(p2,p3,p2,p3); tmp34ab = compare_dist(p1, p2, p3, p4); + tmp34ab = compare_dist(l2, p1, p1); + tmp34ab = compare_dist(p1, p2, s2); + if constexpr (R::Has_filtered_predicates && + has_needs_ft::value) +{ + assert(compare_dist.needs_ft(l1, p1, p1)); + assert(compare_dist.needs_ft(p2, p3, p2, p3)); + assert(!compare_dist.needs_ft(p1, p2, p3)); + assert(!compare_dist.needs_ft(p2, p2, s2)); + } (void) tmp34ab; typename R::Compare_squared_distance_3 compare_sq_dist diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index c1f9c8ab130..dbacc57b2d3 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -81,6 +81,23 @@ Assert_compile_time_tag( const Tag&, const Derived& b) x.match_compile_time_tag(b); } +template +struct Needs_FT { + T value; + Needs_FT(T v) : value(v) {} + operator T() const { return value; } +}; + +template +struct Remove_needs_FT { + using Type = T; +}; + +template +struct Remove_needs_FT> { + using Type = T; +}; + } //namespace CGAL #endif // CGAL_TAGS_H From 2923eff641b41ea6965c7effa6d51139565453dc Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 2 Sep 2022 11:33:07 +0200 Subject: [PATCH 004/426] Fix a warning `-Wnull-pointer-subtraction` https://clang.llvm.org/docs/DiagnosticsReference.html#wnull-pointer-subtraction --- STL_Extension/include/CGAL/Handle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/Handle.h b/STL_Extension/include/CGAL/Handle.h index 4fa3a17286b..55634481044 100644 --- a/STL_Extension/include/CGAL/Handle.h +++ b/STL_Extension/include/CGAL/Handle.h @@ -122,7 +122,7 @@ class Handle int refs() const noexcept { return PTR->count.load(std::memory_order_relaxed); } - Id_type id() const noexcept { return PTR - static_cast(0); } + Id_type id() const noexcept { return static_cast(reinterpret_cast(static_cast(PTR)) / sizeof(Rep)); } bool identical(const Handle& h) const noexcept { return PTR == h.PTR; } From f9527917c2865983ea2c9f08ade15b725c4b61c1 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Tue, 6 Sep 2022 13:32:53 +0200 Subject: [PATCH 005/426] Add missing template keyword --- BGL/include/CGAL/draw_face_graph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index cea4fb68d74..905987d3313 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -43,7 +43,7 @@ struct DefaultColorFunctorFaceGraph { typename Graph::template Property_map colorPm; bool found; - std::tie(colorPm, found) = mesh.property_map(getColorPropertyName()); //Get the color property map + std::tie(colorPm, found) = mesh.template property_map(getColorPropertyName()); //Get the color property map return found ? colorPm[elementIndex] : get_random_color(CGAL::get_default_random()); //return the element color if any, otherwise return a random color } }; From b114789abf5ede7053b3fcf2f3795253504d159b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Sep 2022 13:56:31 +0200 Subject: [PATCH 006/426] Fix spelling --- Cartesian_kernel/include/CGAL/Cartesian/function_objects.h | 2 +- Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h | 2 +- Filtered_kernel/include/CGAL/Lazy_kernel.h | 2 +- .../doc/STL_Extension/CGAL/Concurrent_compact_container.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 207aedd7053..7e831f8bd40 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -2506,7 +2506,7 @@ namespace CartesianKernelFunctors { FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; - // The following determinants can be developped and simplified. + // The following determinants can be developed and simplified. // // FT num_x = determinant(psy,psz,ps2, // qsy,qsz,qs2, diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h index 8765d0cb587..8917cfaf36e 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h @@ -754,7 +754,7 @@ power_side_of_bounded_power_sphereC3( } // return the sign of the power test of weighted point (rx,ry,rz,rw) - // with respect to the smallest sphere orthogoanal to + // with respect to the smallest sphere orthogonal to // p,q template< class FT > typename Same_uncertainty_nt::type diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index c88f93e3acf..08a6ebb41a0 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -89,7 +89,7 @@ protected: // Exact_kernel = exact kernel that will be made lazy // Kernel = lazy kernel -// the Generic base simplies applies the generic magic functor stupidly. +// the Generic base simply applies the generic magic functor stupidly. // then the real base fixes up a few special cases. template < typename EK_, typename AK_, typename E2A_, typename Kernel_ > class Lazy_kernel_generic_base : protected internal::Enum_holder diff --git a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h index 65e853f489a..334976ab363 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h @@ -293,7 +293,7 @@ complexity. No exception is thrown. /// @{ /// returns whether `pos` is in the range `[ccc.begin(), ccc.end()]` (`ccc.end()` included). bool owns(const_iterator pos); - /// returns whether `pos` is in the range `[ccc.begin(), ccc`.end())` (`ccc.end()` excluded). + /// returns whether `pos` is in the range `[ccc.begin(), ccc.end())` (`ccc.end()` excluded). bool owns_dereferencable(const_iterator pos); /// @} From 28ba446895561001df26b8c21f704b461fe6c014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 15:38:18 +0200 Subject: [PATCH 007/426] Clean (some) CMakeLists.txt indentation --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 14 ++-- .../test/Algebraic_kernel_d/CMakeLists.txt | 18 +++-- .../demo/Alpha_shapes_3/CMakeLists.txt | 1 + BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 6 -- BGL/test/BGL/CMakeLists.txt | 46 ++----------- .../Barycentric_coordinates_2/CMakeLists.txt | 2 - CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 2 - .../test/Classification/CMakeLists.txt | 7 +- .../examples/Cone_spanners_2/CMakeLists.txt | 1 - .../examples/Convex_hull_3/CMakeLists.txt | 10 --- .../demo/Alpha_shapes_2/CMakeLists.txt | 1 - .../test/Heat_method_3/CMakeLists.txt | 7 +- .../Hyperbolic_triangulation_2/CMakeLists.txt | 1 - Installation/CMakeLists.txt | 6 +- Mesh_3/examples/Mesh_3/CMakeLists.txt | 9 +-- Number_types/test/Number_types/CMakeLists.txt | 3 +- .../test/Periodic_3_mesh_3/CMakeLists.txt | 6 +- .../Point_set_processing_3/CMakeLists.txt | 20 ++---- .../CMakeLists.txt | 25 ++----- .../CMakeLists.txt | 19 ++---- .../Polygon_mesh_processing/CMakeLists.txt | 5 +- .../Polygon_mesh_processing/CMakeLists.txt | 1 - Polyhedron/demo/Polyhedron/CMakeLists.txt | 11 ++-- .../Plugins/Classification/CMakeLists.txt | 10 ++- .../Plugins/Point_set/CMakeLists.txt | 6 +- .../Plugins/Three_examples/CMakeLists.txt | 7 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 1 + .../test/STL_Extension/CMakeLists.txt | 66 +++++++++---------- .../CMakeLists.txt | 1 + .../Set_movable_separability_2/CMakeLists.txt | 3 +- .../examples/Shape_detection/CMakeLists.txt | 10 ++- .../test/Shape_detection/CMakeLists.txt | 50 +++++--------- .../examples/Solver_interface/CMakeLists.txt | 11 ---- .../examples/Spatial_searching/CMakeLists.txt | 18 +---- .../Surface_mesh_approximation/CMakeLists.txt | 3 +- .../Surface_mesh_deformation/CMakeLists.txt | 15 ++--- .../Surface_mesh_segmentation/CMakeLists.txt | 8 +-- .../examples/Triangulation_3/CMakeLists.txt | 9 +-- .../test/Triangulation_3/CMakeLists.txt | 3 +- Weights/test/Weights/CMakeLists.txt | 4 -- 40 files changed, 134 insertions(+), 312 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 8cc6c27c3f8..c8a7e6dffce 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -5,6 +5,7 @@ project(AABB_tree_Demo) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) if(NOT POLICY CMP0070 AND POLICY CMP0053) @@ -31,10 +32,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(AddFileDependencies) - qt5_generate_moc("MainWindow.h" - "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp") - add_file_dependencies(MainWindow_moc.cpp - "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h") + qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp") + add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h") qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp") add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h") @@ -62,8 +61,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(AABB_demo) -else(CGAL_Qt5_FOUND - AND Qt5_FOUND) +else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(AABB_MISSING_DEPS "") @@ -80,6 +78,4 @@ else(CGAL_Qt5_FOUND "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled." ) -endif( - CGAL_Qt5_FOUND - AND Qt5_FOUND) +endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 78210e47045..850c3396759 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -4,11 +4,12 @@ project(Algebraic_kernel_d_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS Core) -find_package(RS3 QUIET) - +find_package(MPFI QUIET) if(MPFI_FOUND) include(${MPFI_USE_FILE}) endif() + +find_package(RS3 QUIET) if(RS3_FOUND) include(${RS3_USE_FILE}) endif() @@ -33,19 +34,16 @@ include_directories(BEFORE include) create_single_source_cgal_program("cyclic.cpp") create_single_source_cgal_program("Descartes.cpp") + if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp") create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp") create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_Integer_rational.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_Integer_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp") create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp") create_single_source_cgal_program("Algebraic_kernel_d_2.cpp") diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 4ebb4334fbd..dde215bbeee 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -6,6 +6,7 @@ project(Alpha_shapes_3_Demo) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) if(NOT POLICY CMP0070 AND POLICY CMP0053) diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 4179ca63745..51c84c35aed 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -27,17 +27,11 @@ endif() # ########################################################## create_single_source_cgal_program("distance.cpp") - create_single_source_cgal_program("incident_vertices.cpp") - create_single_source_cgal_program("kruskal.cpp") - create_single_source_cgal_program("kruskal_with_stored_id.cpp") - create_single_source_cgal_program("normals.cpp") - create_single_source_cgal_program("range.cpp") - create_single_source_cgal_program("transform_iterator.cpp") create_single_source_cgal_program("copy_polyhedron.cpp") diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index da8baf25ccb..8a06a97cb2a 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -36,68 +36,36 @@ if(OpenMesh_FOUND) endif() create_single_source_cgal_program("test_split.cpp") - create_single_source_cgal_program("next.cpp") - create_single_source_cgal_program("test_circulator.cpp") - create_single_source_cgal_program("test_Gwdwg.cpp") - create_single_source_cgal_program("test_bgl_dual.cpp") - create_single_source_cgal_program("graph_concept_Polyhedron_3.cpp") - create_single_source_cgal_program("graph_concept_Dual.cpp") - create_single_source_cgal_program("graph_concept_Triangulation_2.cpp") - create_single_source_cgal_program("graph_concept_Surface_mesh.cpp") - create_single_source_cgal_program("graph_concept_Seam_mesh_Surface_mesh.cpp") - create_single_source_cgal_program("graph_concept_Gwdwg_Surface_mesh.cpp") - create_single_source_cgal_program("graph_concept_Linear_cell_complex.cpp") - create_single_source_cgal_program("graph_concept_Arrangement_2.cpp") - -create_single_source_cgal_program( "graph_concept_Derived.cpp" ) - -create_single_source_cgal_program( "test_clear.cpp" ) - +create_single_source_cgal_program("graph_concept_Derived.cpp" ) +create_single_source_cgal_program("test_clear.cpp" ) create_single_source_cgal_program("test_helpers.cpp") - create_single_source_cgal_program("test_Has_member_clear.cpp") - create_single_source_cgal_program("test_Has_member_id.cpp") - create_single_source_cgal_program("test_bgl_read_write.cpp") - create_single_source_cgal_program("graph_concept_Face_filtered_graph.cpp") - create_single_source_cgal_program("test_Manifold_face_removal.cpp") - create_single_source_cgal_program("test_Regularize_face_selection_borders.cpp") - create_single_source_cgal_program("test_Face_filtered_graph.cpp") - create_single_source_cgal_program("test_Euler_operations.cpp") - -create_single_source_cgal_program( "test_test_face.cpp" ) - -create_single_source_cgal_program( "test_Collapse_edge.cpp" ) - -create_single_source_cgal_program( "test_Collapse_edge_with_constraints.cpp" ) - +create_single_source_cgal_program("test_test_face.cpp" ) +create_single_source_cgal_program("test_Collapse_edge.cpp" ) +create_single_source_cgal_program("test_Collapse_edge_with_constraints.cpp" ) create_single_source_cgal_program("test_graph_traits.cpp") - create_single_source_cgal_program("test_Properties.cpp") - -create_single_source_cgal_program( - "bench_read_from_stream_vs_add_face_and_add_faces.cpp") - -create_single_source_cgal_program( "graph_traits_inheritance.cpp" ) - +create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp") +create_single_source_cgal_program("graph_traits_inheritance.cpp" ) create_single_source_cgal_program("test_deprecated_io.cpp") if(OpenMesh_FOUND) diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index 8dfd74dd75c..41c76ac2db2 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -45,7 +45,6 @@ create_single_source_cgal_program("test_dh_deprecated_api.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("test_hm_unit_square.cpp") target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_hm_const_linear_precision.cpp") @@ -56,7 +55,6 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_bc_all_coordinates.cpp") target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support) - else() message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") endif() diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 0cffb49018c..1a6c6591822 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -33,7 +33,6 @@ if(NOT TARGET CGAL::Eigen3_support) endif() find_package(IPE 7) - if(IPE_FOUND) if ( NOT ${IPE_VERSION} EQUAL "7") message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") @@ -41,7 +40,6 @@ if(IPE_FOUND) endif() endif() - if(IPE_FOUND AND IPE_VERSION) message("-- Using IPE version ${IPE_VERSION} compatibility.") diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index f45464cb3ad..8e6794dae27 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -29,6 +29,7 @@ if(NOT TARGET CGAL::Boost_serialization_support) ) set(Classification_dependencies_met FALSE) endif() + if(NOT TARGET CGAL::Boost_iostreams_support) message( STATUS @@ -56,9 +57,9 @@ create_single_source_cgal_program("test_classification_point_set.cpp") create_single_source_cgal_program("test_classification_io.cpp") foreach(target test_classification_point_set test_classification_io) - target_link_libraries( - ${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 7bb7268e27e..608e8c0a839 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -20,7 +20,6 @@ if(CGAL_Core_FOUND OR LEDA_FOUND) foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") endforeach() - else() message( diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 0a7e6ea7968..a9ff9378850 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -35,25 +35,15 @@ endif() # ########################################################## create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp") - create_single_source_cgal_program("dynamic_hull_3.cpp") - create_single_source_cgal_program("dynamic_hull_LCC_3.cpp") - create_single_source_cgal_program("dynamic_hull_SM_3.cpp") - create_single_source_cgal_program("halfspace_intersection_3.cpp") - create_single_source_cgal_program("lloyd_algorithm.cpp") - create_single_source_cgal_program("quickhull_3.cpp") - create_single_source_cgal_program("graph_hull_3.cpp") - create_single_source_cgal_program("quickhull_any_dim_3.cpp") - create_single_source_cgal_program("extreme_points_3_sm.cpp") - create_single_source_cgal_program("extreme_indices_3.cpp") if(OpenMesh_FOUND) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index af2ccbeeca2..5dfc09dac1f 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -46,7 +46,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Alpha_shapes_2) - else() message( diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index b096f0338c6..98bd95f5d56 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -21,7 +21,6 @@ endif() find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) - if(NOT TARGET CGAL::Eigen3_support) message( STATUS @@ -41,8 +40,6 @@ target_link_libraries(heat_method_concept PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_test.cpp") target_link_libraries(heat_method_surface_mesh_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_direct_test.cpp") -target_link_libraries(heat_method_surface_mesh_direct_test - PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_direct_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_intrinsic_test.cpp") -target_link_libraries(heat_method_surface_mesh_intrinsic_test - PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_intrinsic_test PUBLIC CGAL::Eigen3_support) diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 13f97548589..1236c0453b1 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -17,7 +17,6 @@ find_package(LEDA QUIET) # Find Qt5 itself find_package(Qt5 QUIET COMPONENTS OpenGL Gui) - if(CGAL_Qt5_FOUND AND Qt5_FOUND AND (CGAL_Core_FOUND OR LEDA_FOUND)) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 28ee5079fdb..19ba65d9900 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -75,10 +75,8 @@ if(CGAL_BRANCH_BUILD) "${CGAL_SOURCE_DIR}/GraphicsView" CACHE INTERNAL "Directory containing the GraphicsView package") - message( - STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}") - message( - STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}") + message(STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}") + message(STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}") message(STATUS "Core package directory: ${CGAL_CORE_PACKAGE_DIR}") else(CGAL_BRANCH_BUILD) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 6f848c2c657..b91fb018970 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -51,12 +51,10 @@ create_single_source_cgal_program("mesh_implicit_sphere.cpp") target_link_libraries(mesh_implicit_sphere PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_sphere_variable_size.cpp") -target_link_libraries(mesh_implicit_sphere_variable_size - PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_sphere_variable_size PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_two_implicit_spheres_with_balls.cpp") -target_link_libraries(mesh_two_implicit_spheres_with_balls - PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_two_implicit_spheres_with_balls PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_domains_2.cpp" "implicit_functions.cpp") @@ -66,8 +64,7 @@ create_single_source_cgal_program("mesh_cubes_intersection.cpp") target_link_libraries(mesh_cubes_intersection PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_cubes_intersection_with_features.cpp") -target_link_libraries(mesh_cubes_intersection_with_features - PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_cubes_intersection_with_features PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_domains.cpp" "implicit_functions.cpp") diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index 49b8cd31ba3..b26ca0fe97a 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -12,7 +12,6 @@ include(CGAL_VersionUtils) include_directories(BEFORE include) - create_single_source_cgal_program("bench_interval.cpp") create_single_source_cgal_program("constant.cpp") create_single_source_cgal_program("CORE_BigFloat.cpp") @@ -65,6 +64,7 @@ create_single_source_cgal_program("_test_valid_finite_float.cpp") create_single_source_cgal_program("to_interval_test.cpp") create_single_source_cgal_program("unsigned.cpp") create_single_source_cgal_program("utilities.cpp") + find_package( GMP ) if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" ) @@ -73,6 +73,7 @@ if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) include( ${MPFI_USE_FILE} ) endif() #MPFI_FOUND endif() #GMP_FOUND AND NOT CGAL_DISABLE_GMP + if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program( "Gmpfi.cpp" ) create_single_source_cgal_program( "Gmpfr_bug.cpp" ) diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 25990ad8479..5ff935ae611 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -18,8 +18,6 @@ endif() create_single_source_cgal_program("test_implicit_shapes_bunch.cpp") target_link_libraries(test_implicit_shapes_bunch PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_implicit_shapes_with_features.cpp") -target_link_libraries(test_implicit_shapes_with_features - PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_implicit_shapes_with_features PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_triply_periodic_minimal_surfaces.cpp") -target_link_libraries(test_triply_periodic_minimal_surfaces - PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_triply_periodic_minimal_surfaces PUBLIC CGAL::Eigen3_support) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index c3ccee0d7a4..c4d8da3b0a0 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -18,21 +18,10 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") endif() # Prints new compilation options - message( - STATUS - "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") - message( - STATUS - "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" - ) - message( - STATUS - "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" - ) - message( - STATUS - "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" - ) + message(STATUS "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") + message(STATUS "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'") + message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") + message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() # Activate concurrency? @@ -104,6 +93,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(orient_scanlines_example PRIVATE ${CGAL_libs} CGAL::Eigen3_support CGAL::LASLIB_support) endif() + # Executables that require libpointmatcher find_package(libpointmatcher QUIET) include(CGAL_pointmatcher_support) diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 044b462442d..287652eae55 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -12,21 +12,10 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") # Print new compilation options - message( - STATUS - "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") - message( - STATUS - "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" - ) - message( - STATUS - "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" - ) - message( - STATUS - "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" - ) + message(STATUS "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") + message(STATUS "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'") + message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") + message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() # Find Eigen3 (requires 3.1.0 or greater) @@ -35,13 +24,11 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 create_single_source_cgal_program("poisson_reconstruction_example.cpp") - target_link_libraries(poisson_reconstruction_example - PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_example PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction.cpp") target_link_libraries(poisson_reconstruction PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction_function.cpp") - target_link_libraries(poisson_reconstruction_function - PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_function PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("tutorial_example.cpp") target_link_libraries(tutorial_example PUBLIC CGAL::Eigen3_support) else() 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 e3adcb68d37..978908627f2 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 @@ -12,21 +12,10 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") # Prints new compilation options - message( - STATUS - "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") - message( - STATUS - "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" - ) - message( - STATUS - "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" - ) - message( - STATUS - "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" - ) + message(STATUS "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") + message(STATUS "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'") + message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") + message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() # Temporary debugging stuff find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 44b2282519a..ccd26052b98 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -16,7 +16,6 @@ if(NOT Boost_FOUND) STATUS "This project requires the Boost library, and will not be compiled.") return() - endif() # include for local directory @@ -33,7 +32,7 @@ if (FAST_ENVELOPE_BUILD_DIR) message(STATUS "Using ${FAST_ENVELOPE_BUILD_DIR} as build directory of fast-evelope") include_directories("${FAST_ENVELOPE_BUILD_DIR}/include") - link_directories ( "${FAST_ENVELOPE_BUILD_DIR}/lib" "${FAST_ENVELOPE_BUILD_DIR}" "${FAST_ENVELOPE_BUILD_DIR}/tbb" ) + link_directories ( "${FAST_ENVELOPE_BUILD_DIR}/lib" "${FAST_ENVELOPE_BUILD_DIR}" "${FAST_ENVELOPE_BUILD_DIR}/tbb") find_package(OpenMP) if (OPENMP_FOUND) @@ -42,7 +41,7 @@ if (FAST_ENVELOPE_BUILD_DIR) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") endif() - create_single_source_cgal_program( "fastE.cpp" ) + create_single_source_cgal_program("fastE.cpp") target_link_libraries( fastE PUBLIC CGAL::Eigen3_support) target_link_libraries( fastE PUBLIC FastEnvelope IndirectPredicates geogram) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 909dd292063..9eb13d3458e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -140,7 +140,6 @@ endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) - if(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) target_link_libraries( test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 68b0afc77d6..b3a6562f1c4 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1...3.23) -project( Polyhedron_Demo ) +project(Polyhedron_Demo) include(FeatureSummary) # Find includes in corresponding build directories @@ -29,6 +29,7 @@ if(CMAKE_CXX_COMPILER_ID EQUAL Clang set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z defs") endif() endif() + # Let plugins be compiled in the same directory as the executable. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") @@ -60,7 +61,6 @@ set_package_properties( ) if(Qt5_FOUND) - add_definitions(-DQT_NO_KEYWORDS) add_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt5_FOUND) @@ -83,7 +83,6 @@ set_package_properties( # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) - if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) find_package(TBB) include(CGAL_TBB_support) @@ -475,8 +474,7 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(POLYHEDRON_MISSING_DEPS "") if(NOT CGAL_Qt5_FOUND) - set(POLYHEDRON_MISSING_DEPS - "the CGAL Qt5 library, ${POLYHEDRON_MISSING_DEPS}") + set(POLYHEDRON_MISSING_DEPS "the CGAL Qt5 library, ${POLYHEDRON_MISSING_DEPS}") endif() if(NOT Qt5_FOUND) @@ -493,8 +491,7 @@ endif(CGAL_Qt5_FOUND AND Qt5_FOUND) feature_summary( WHAT REQUIRED_PACKAGES_NOT_FOUND INCLUDE_QUIET_PACKAGES - DESCRIPTION - "NOTICE: Missing required packages that prevent the demo from being compiled:" + DESCRIPTION "NOTICE: Missing required packages that prevent the demo from being compiled:" QUIET_ON_EMPTY VAR NotFound_REQ_PACKAGES) if(NOT ${NotFound_REQ_PACKAGES} STREQUAL "") diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index a44ae7fd8b4..4ed41201cf4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -15,7 +15,7 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning set_package_properties( OpenCV PROPERTIES - DESCRIPTION "A library for real-time computer vision." + DESCRIPTION "A library for real-time computer vision." PURPOSE "Enables the random forest predicate for the classification plugin." ) include(CGAL_OpenCV_support) @@ -54,9 +54,8 @@ if(TARGET CGAL::Eigen3_support) endif() if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) - target_link_libraries(classification_plugin PUBLIC - CGAL::Boost_serialization_support - CGAL::Boost_iostreams_support) + target_link_libraries(classification_plugin PUBLIC CGAL::Boost_serialization_support + CGAL::Boost_iostreams_support) endif() if(TARGET CGAL::OpenCV_support) @@ -67,8 +66,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(classification_plugin PUBLIC CGAL::TBB_support) endif() - add_dependencies(classification_plugin point_set_selection_plugin - selection_plugin) + add_dependencies(classification_plugin point_set_selection_plugin selection_plugin) else() message( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index 0c562c8a6f2..ef370a1fbe6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -46,11 +46,9 @@ if(TARGET CGAL::Eigen3_support) scene_points_with_normal_item CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(surface_reconstruction_plugin - PUBLIC CGAL::SCIP_support) + target_link_libraries(surface_reconstruction_plugin PUBLIC CGAL::SCIP_support) elseif(TARGET CGAL::GLPK_support) - target_link_libraries(surface_reconstruction_plugin - PUBLIC CGAL::GLPK_support) + target_link_libraries(surface_reconstruction_plugin PUBLIC CGAL::GLPK_support) endif() qt5_wrap_ui(point_set_normal_estimationUI_FILES diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt index f6b0e9c045b..05337f34adf 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt @@ -12,10 +12,9 @@ set(CMAKE_AUTOMOC ON) #Find CGAL find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 ImageIO) # Find Qt5 itself -find_package( - Qt5 QUIET - COMPONENTS OpenGL Script Svg - OPTIONAL_COMPONENTS ScriptTools WebSockets) +find_package(Qt5 QUIET + COMPONENTS OpenGL Script Svg + OPTIONAL_COMPONENTS ScriptTools WebSockets) if(RUNNING_CGAL_AUTO_TEST) if(Qt5_FOUND) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 707e5835f9d..74b132ea916 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -19,6 +19,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Ridges_Umbilics_SM PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) target_link_libraries(Ridges_Umbilics_LCC PUBLIC CGAL::Eigen3_support) + add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") if(TARGET Boost::program_options) target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 2eba3848727..98018bcf782 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -2,8 +2,7 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.23) -project( STL_Extension_Tests ) - +project(STL_Extension_Tests) find_package(CGAL REQUIRED) find_package( TBB QUIET ) @@ -18,45 +17,44 @@ else() message(STATUS "Tests that use OpenMesh will not be compiled.") endif() - -create_single_source_cgal_program( "test_Boolean_tag.cpp" ) -create_single_source_cgal_program( "test_Cache.cpp" ) -create_single_source_cgal_program( "test_Compact_container.cpp" ) -create_single_source_cgal_program( "test_Compact_container_is_used.cpp" ) -create_single_source_cgal_program( "test_complexity_tags.cpp" ) -create_single_source_cgal_program( "test_composition.cpp" ) -create_single_source_cgal_program( "test_Concatenate_iterator.cpp" ) -create_single_source_cgal_program( "test_Concurrent_compact_container.cpp" ) +create_single_source_cgal_program("test_Boolean_tag.cpp") +create_single_source_cgal_program("test_Cache.cpp") +create_single_source_cgal_program("test_Compact_container.cpp") +create_single_source_cgal_program("test_Compact_container_is_used.cpp") +create_single_source_cgal_program("test_complexity_tags.cpp") +create_single_source_cgal_program("test_composition.cpp") +create_single_source_cgal_program("test_Concatenate_iterator.cpp") +create_single_source_cgal_program("test_Concurrent_compact_container.cpp") if(TARGET CGAL::TBB_support) target_link_libraries(test_Concurrent_compact_container PUBLIC CGAL::TBB_support) endif() -create_single_source_cgal_program( "test_dispatch_output.cpp" ) -create_single_source_cgal_program( "test_Flattening_iterator.cpp" ) -create_single_source_cgal_program( "test_Handle_with_policy.cpp" ) -create_single_source_cgal_program( "test_In_place_list.cpp" ) -create_single_source_cgal_program( "test_is_iterator.cpp" ) -create_single_source_cgal_program( "test_is_streamable.cpp" ) -create_single_source_cgal_program( "test_lexcompare_outputrange.cpp" ) -create_single_source_cgal_program( "test_Modifiable_priority_queue.cpp" ) -create_single_source_cgal_program( "test_multiset.cpp" ) +create_single_source_cgal_program("test_dispatch_output.cpp") +create_single_source_cgal_program("test_Flattening_iterator.cpp") +create_single_source_cgal_program("test_Handle_with_policy.cpp") +create_single_source_cgal_program("test_In_place_list.cpp") +create_single_source_cgal_program("test_is_iterator.cpp") +create_single_source_cgal_program("test_is_streamable.cpp") +create_single_source_cgal_program("test_lexcompare_outputrange.cpp") +create_single_source_cgal_program("test_Modifiable_priority_queue.cpp") +create_single_source_cgal_program("test_multiset.cpp") create_single_source_cgal_program("test_cgal_named_params.cpp") -add_executable( test_multiset_cc "test_multiset.cpp" ) -target_link_libraries( test_multiset_cc PUBLIC CGAL::CGAL ) -target_compile_options( test_multiset_cc PUBLIC -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT ) -cgal_add_test(test_multiset_cc ) +add_executable(test_multiset_cc "test_multiset.cpp") +target_link_libraries(test_multiset_cc PUBLIC CGAL::CGAL) +target_compile_options(test_multiset_cc PUBLIC -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT) +cgal_add_test(test_multiset_cc) add_to_cached_list(CGAL_EXECUTABLE_TARGETS test_multiset_cc) -create_single_source_cgal_program( "test_N_tuple.cpp" ) -create_single_source_cgal_program( "test_namespaces.cpp" ) -create_single_source_cgal_program( "test_Nested_iterator.cpp" ) -create_single_source_cgal_program( "test_Object.cpp" ) -create_single_source_cgal_program( "test_stl_extension.cpp" ) -create_single_source_cgal_program( "test_type_traits.cpp" ) -create_single_source_cgal_program( "test_Uncertain.cpp" ) -create_single_source_cgal_program( "test_vector.cpp" ) -create_single_source_cgal_program( "test_join_iterators.cpp" ) -create_single_source_cgal_program( "test_for_each.cpp" ) +create_single_source_cgal_program("test_N_tuple.cpp") +create_single_source_cgal_program("test_namespaces.cpp") +create_single_source_cgal_program("test_Nested_iterator.cpp") +create_single_source_cgal_program("test_Object.cpp") +create_single_source_cgal_program("test_stl_extension.cpp") +create_single_source_cgal_program("test_type_traits.cpp") +create_single_source_cgal_program("test_Uncertain.cpp") +create_single_source_cgal_program("test_vector.cpp") +create_single_source_cgal_program("test_join_iterators.cpp") +create_single_source_cgal_program("test_for_each.cpp") if(TARGET CGAL::TBB_support) target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() 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 4c1714d2ace..2532c9defb5 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 @@ -27,6 +27,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(scale_space_manifold PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_advancing_front.cpp") target_link_libraries(scale_space_advancing_front PUBLIC CGAL::Eigen3_support) + if(ACTIVATE_CONCURRENCY AND TARGET CGAL::TBB_support) target_link_libraries(scale_space PUBLIC CGAL::TBB_support) target_link_libraries(scale_space_incremental PUBLIC CGAL::TBB_support) diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index c59acf0e24a..3a9a7471fa9 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -24,5 +24,4 @@ endif() find_package(CGAL REQUIRED) create_single_source_cgal_program("test_top_edges_single_mold_trans_cast.cpp") -create_single_source_cgal_program( - "test_is_pullout_directions_single_mold_trans_cast.cpp") +create_single_source_cgal_program("test_is_pullout_directions_single_mold_trans_cast.cpp") diff --git a/Shape_detection/examples/Shape_detection/CMakeLists.txt b/Shape_detection/examples/Shape_detection/CMakeLists.txt index e677c27b214..f9f83b8095d 100644 --- a/Shape_detection/examples/Shape_detection/CMakeLists.txt +++ b/Shape_detection/examples/Shape_detection/CMakeLists.txt @@ -6,7 +6,10 @@ project(Shape_detection_Examples) find_package(CGAL REQUIRED COMPONENTS Core) -# Use Eigen. +create_single_source_cgal_program("efficient_RANSAC_with_custom_shape.cpp") +create_single_source_cgal_program("efficient_RANSAC_with_parameters.cpp") +create_single_source_cgal_program("efficient_RANSAC_with_point_access.cpp") + find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) @@ -37,9 +40,4 @@ if(TARGET CGAL::Eigen3_support) shape_detection_basic_deprecated) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() - endif() - -create_single_source_cgal_program("efficient_RANSAC_with_custom_shape.cpp") -create_single_source_cgal_program("efficient_RANSAC_with_parameters.cpp") -create_single_source_cgal_program("efficient_RANSAC_with_point_access.cpp") diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index a80a3be8640..92e45de666c 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -6,7 +6,18 @@ project(Shape_detection_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -# Use Eigen. +create_single_source_cgal_program("test_efficient_RANSAC_cone_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_cone_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_cylinder_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_cylinder_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_plane_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_plane_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_sphere_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_sphere_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_torus_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_torus_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") + find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(EIGEN3_FOUND) @@ -15,14 +26,10 @@ if(EIGEN3_FOUND) create_single_source_cgal_program("test_region_growing_on_point_set_2.cpp") create_single_source_cgal_program("test_region_growing_on_point_set_3.cpp") create_single_source_cgal_program("test_region_growing_on_polygon_mesh.cpp") - create_single_source_cgal_program( - "test_region_growing_on_point_set_2_with_sorting.cpp") - create_single_source_cgal_program( - "test_region_growing_on_point_set_3_with_sorting.cpp") - create_single_source_cgal_program( - "test_region_growing_on_polygon_mesh_with_sorting.cpp") - create_single_source_cgal_program( - "test_region_growing_on_degenerated_mesh.cpp") + create_single_source_cgal_program("test_region_growing_on_point_set_2_with_sorting.cpp") + create_single_source_cgal_program("test_region_growing_on_point_set_3_with_sorting.cpp") + create_single_source_cgal_program("test_region_growing_on_polygon_mesh_with_sorting.cpp") + create_single_source_cgal_program("test_region_growing_on_degenerated_mesh.cpp") foreach( target test_region_growing_basic @@ -38,7 +45,7 @@ if(EIGEN3_FOUND) endforeach() set(RANSAC_PROTO_DIR CACHE PATH "") - if (NOT RANSAC_PROTO_DIR STREQUAL "") + if(NOT RANSAC_PROTO_DIR STREQUAL "") add_definitions(-DPOINTSWITHINDEX -DCGAL_TEST_RANSAC_PROTOTYPE) include_directories(${RANSAC_PROTO_DIR}) include_directories(${RANSAC_PROTO_DIR}/MiscLib/) @@ -53,26 +60,3 @@ if(EIGEN3_FOUND) endif() cgal_add_test(test_validity_sampled_data) endif() - -create_single_source_cgal_program( - "test_efficient_RANSAC_cone_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_cone_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_cylinder_connected_component.cpp") -create_single_source_cgal_program( - "test_efficient_RANSAC_cylinder_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_plane_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_plane_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_sphere_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_sphere_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_torus_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_torus_parameters.cpp") - -create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index b65e4965bb5..a8ce3e9a528 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -9,7 +9,6 @@ find_package(CGAL REQUIRED) # Use Eigen find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("singular_value_decomposition.cpp") target_link_libraries(singular_value_decomposition PUBLIC CGAL::Eigen3_support) @@ -21,35 +20,26 @@ endif() find_package(OSQP QUIET) include(CGAL_OSQP_support) - if(TARGET CGAL::OSQP_support) - create_single_source_cgal_program("osqp_quadratic_program.cpp") target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) message("OSQP found and used") else() - message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") - endif() find_package(SCIP QUIET) include(CGAL_SCIP_support) - if(TARGET CGAL::SCIP_support) - create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) message("SCIP found and used") else() - find_package(GLPK QUIET) include(CGAL_GLPK_support) - if(TARGET CGAL::GLPK_support) - create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) message("GLPK found and used") @@ -63,5 +53,4 @@ else() ) endif() - endif() diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 811774b5ed5..9dd43a935e1 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -23,42 +23,26 @@ endif() # ########################################################## create_single_source_cgal_program("circular_query.cpp") - create_single_source_cgal_program("distance_browsing.cpp") - create_single_source_cgal_program("iso_rectangle_2_query.cpp") - create_single_source_cgal_program("nearest_neighbor_searching.cpp") - create_single_source_cgal_program("searching_with_circular_query.cpp") - create_single_source_cgal_program("searching_with_point_with_info.cpp") - create_single_source_cgal_program("searching_with_point_with_info_inplace.cpp") - create_single_source_cgal_program("searching_with_point_with_info_pmap.cpp") - create_single_source_cgal_program("searching_surface_mesh_vertices.cpp") - create_single_source_cgal_program("searching_polyhedron_vertices.cpp") - -create_single_source_cgal_program( - "searching_polyhedron_vertices_with_fuzzy_sphere.cpp") - +create_single_source_cgal_program("searching_polyhedron_vertices_with_fuzzy_sphere.cpp") create_single_source_cgal_program("user_defined_point_and_distance.cpp") - create_single_source_cgal_program("using_fair_splitting_rule.cpp") - create_single_source_cgal_program("weighted_Minkowski_distance.cpp") if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("fuzzy_range_query.cpp") target_link_libraries(fuzzy_range_query PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("general_neighbor_searching.cpp") target_link_libraries(general_neighbor_searching PUBLIC CGAL::Eigen3_support) - else() message(STATUS "fuzzy_range_query.cpp and general_neighbor_searching.cpp") diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index e6f30275b74..49b649baf99 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -43,5 +43,4 @@ create_single_source_cgal_program("vsa_segmentation_example.cpp") target_link_libraries(vsa_segmentation_example PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("vsa_simple_approximation_example.cpp") -target_link_libraries(vsa_simple_approximation_example - PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_simple_approximation_example PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 7ddddf95188..80137f8569b 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -10,17 +10,13 @@ find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") - create_single_source_cgal_program( - "all_roi_assign_example_custom_polyhedron.cpp") + create_single_source_cgal_program("all_roi_assign_example_custom_polyhedron.cpp") create_single_source_cgal_program("all_roi_assign_example_Surface_mesh.cpp") create_single_source_cgal_program("custom_weight_for_edges_example.cpp") - create_single_source_cgal_program( - "deform_polyhedron_with_custom_pmap_example.cpp") + create_single_source_cgal_program("deform_polyhedron_with_custom_pmap_example.cpp") create_single_source_cgal_program("k_ring_roi_translate_rotate_example.cpp") - create_single_source_cgal_program( - "k_ring_roi_translate_rotate_Surface_mesh.cpp") - create_single_source_cgal_program( - "deform_mesh_for_botsch08_format_sre_arap.cpp") + create_single_source_cgal_program("k_ring_roi_translate_rotate_Surface_mesh.cpp") + create_single_source_cgal_program("deform_mesh_for_botsch08_format_sre_arap.cpp") foreach( target @@ -38,8 +34,7 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) - create_single_source_cgal_program( - "all_roi_assign_example_with_OpenMesh.cpp") + create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") target_link_libraries(all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) else() diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 56243f443ec..b0802132a2e 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -33,17 +33,11 @@ endif() # ########################################################## create_single_source_cgal_program("sdf_values_example.cpp") - create_single_source_cgal_program("segmentation_from_sdf_values_example.cpp") - create_single_source_cgal_program("segmentation_via_sdf_values_example.cpp") - create_single_source_cgal_program("segmentation_with_facet_ids_example.cpp") - create_single_source_cgal_program("segmentation_from_sdf_values_SM_example.cpp") -create_single_source_cgal_program( - "segmentation_from_sdf_values_LCC_example.cpp") - +create_single_source_cgal_program("segmentation_from_sdf_values_LCC_example.cpp") create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") if(OpenMesh_FOUND) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 94b035fc9d0..3bc81426b94 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -31,14 +31,11 @@ find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) - create_single_source_cgal_program( - "parallel_insertion_and_removal_in_regular_3.cpp") + create_single_source_cgal_program("parallel_insertion_and_removal_in_regular_3.cpp") create_single_source_cgal_program("parallel_insertion_in_delaunay_3.cpp") create_single_source_cgal_program("sequential_parallel.cpp") - target_link_libraries(parallel_insertion_and_removal_in_regular_3 - PUBLIC CGAL::TBB_support) - target_link_libraries(parallel_insertion_in_delaunay_3 - PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_insertion_and_removal_in_regular_3 PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_insertion_in_delaunay_3 PUBLIC CGAL::TBB_support) target_link_libraries(sequential_parallel PUBLIC CGAL::TBB_support) if(BUILD_TESTING) diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index a820549bf20..20960afe639 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -19,8 +19,7 @@ create_single_source_cgal_program("test_regular_as_delaunay_3.cpp") create_single_source_cgal_program("test_regular_insert_range_with_info.cpp") create_single_source_cgal_program("test_regular_remove_3.cpp") create_single_source_cgal_program("test_regular_traits_3.cpp") -create_single_source_cgal_program( - "test_RT_cell_base_with_weighted_circumcenter_3.cpp") +create_single_source_cgal_program("test_RT_cell_base_with_weighted_circumcenter_3.cpp") create_single_source_cgal_program("test_robust_weighted_circumcenter.cpp") create_single_source_cgal_program("test_simplex_3.cpp") create_single_source_cgal_program( "test_simplex_iterator_3.cpp" ) diff --git a/Weights/test/Weights/CMakeLists.txt b/Weights/test/Weights/CMakeLists.txt index 9b7dddc43b7..81a9c9eb367 100644 --- a/Weights/test/Weights/CMakeLists.txt +++ b/Weights/test/Weights/CMakeLists.txt @@ -12,16 +12,12 @@ create_single_source_cgal_program("test_shepard_weights.cpp") create_single_source_cgal_program("test_inverse_distance_weights.cpp") create_single_source_cgal_program("test_three_point_family_weights.cpp") create_single_source_cgal_program("test_projected_weights.cpp") - create_single_source_cgal_program("test_wachspress_weights.cpp") create_single_source_cgal_program("test_authalic_weights.cpp") - create_single_source_cgal_program("test_mean_value_weights.cpp") create_single_source_cgal_program("test_tangent_weights.cpp") - create_single_source_cgal_program("test_discrete_harmonic_weights.cpp") create_single_source_cgal_program("test_cotangent_weights.cpp") - create_single_source_cgal_program("test_uniform_region_weights.cpp") create_single_source_cgal_program("test_triangular_region_weights.cpp") create_single_source_cgal_program("test_barycentric_region_weights.cpp") From 7cb21c24b05346c4fe95922527093f1fd14ae926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:07:31 +0200 Subject: [PATCH 008/426] Uniformize message() for missing 3rd party libraries STATUS for non-essential, NOTICE for important stuff --- AABB_tree/benchmark/AABB_tree/CMakeLists.txt | 2 + AABB_tree/demo/AABB_tree/CMakeLists.txt | 5 +- .../Algebraic_kernel_d/CMakeLists.txt | 2 +- .../test/Algebraic_kernel_d/CMakeLists.txt | 7 +-- .../demo/Alpha_shapes_3/CMakeLists.txt | 4 +- .../test/Arithmetic_kernel/CMakeLists.txt | 10 +--- .../Arrangement_on_surface_2/CMakeLists.txt | 3 +- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 2 + BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 4 +- BGL/examples/BGL_surface_mesh/CMakeLists.txt | 2 +- BGL/test/BGL/CMakeLists.txt | 2 +- .../Barycentric_coordinates_2/CMakeLists.txt | 4 +- .../Barycentric_coordinates_2/CMakeLists.txt | 4 +- .../Barycentric_coordinates_2/CMakeLists.txt | 2 +- .../Boolean_set_operations_2/CMakeLists.txt | 5 +- .../test/Box_intersection_d/CMakeLists.txt | 3 +- CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt | 5 +- CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 11 ++-- .../demo/Circular_kernel_3/CMakeLists.txt | 4 +- .../examples/Classification/CMakeLists.txt | 14 ++--- .../test/Classification/CMakeLists.txt | 13 +--- .../examples/Cone_spanners_2/CMakeLists.txt | 7 +-- .../examples/Convex_hull_3/CMakeLists.txt | 2 + .../demo/Alpha_shapes_2/CMakeLists.txt | 5 +- .../demo/Apollonius_graph_2/CMakeLists.txt | 6 +- .../demo/Bounding_volumes/CMakeLists.txt | 3 +- .../demo/Circular_kernel_2/CMakeLists.txt | 3 +- GraphicsView/demo/Generator/CMakeLists.txt | 4 +- GraphicsView/demo/GraphicsView/CMakeLists.txt | 3 +- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 3 +- .../demo/Largest_empty_rect_2/CMakeLists.txt | 4 +- .../Periodic_2_triangulation_2/CMakeLists.txt | 3 +- GraphicsView/demo/Polygon/CMakeLists.txt | 12 +--- .../Segment_Delaunay_graph_2/CMakeLists.txt | 6 +- .../CMakeLists.txt | 5 +- .../demo/Snap_rounding_2/CMakeLists.txt | 6 +- .../demo/Spatial_searching_2/CMakeLists.txt | 4 +- .../demo/Stream_lines_2/CMakeLists.txt | 3 +- .../demo/Triangulation_2/CMakeLists.txt | 6 +- .../examples/Heat_method_3/CMakeLists.txt | 6 +- .../test/Heat_method_3/CMakeLists.txt | 5 +- .../Hyperbolic_triangulation_2/CMakeLists.txt | 5 +- Installation/CMakeLists.txt | 3 +- .../modules/CGAL_pointmatcher_support.cmake | 2 +- .../examples/Jet_fitting_3/CMakeLists.txt | 12 +--- .../test/Jet_fitting_3/CMakeLists.txt | 5 +- .../demo/Linear_cell_complex/CMakeLists.txt | 3 +- Mesh_3/examples/Mesh_3/CMakeLists.txt | 16 ++--- NewKernel_d/test/NewKernel_d/CMakeLists.txt | 12 +--- .../Optimal_bounding_box/CMakeLists.txt | 3 +- .../Optimal_bounding_box/CMakeLists.txt | 3 +- .../test/Optimal_bounding_box/CMakeLists.txt | 3 +- .../CMakeLists.txt | 15 ++--- .../test/Periodic_3_mesh_3/CMakeLists.txt | 3 +- .../Periodic_3_triangulation_3/CMakeLists.txt | 5 +- .../demo/Periodic_Lloyd_3/CMakeLists.txt | 5 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 6 +- .../CMakeLists.txt | 8 +-- .../examples/Point_set_3/CMakeLists.txt | 2 + Point_set_3/test/Point_set_3/CMakeLists.txt | 4 +- .../Point_set_processing_3/CMakeLists.txt | 25 ++------ .../Point_set_processing_3/CMakeLists.txt | 11 ++-- .../CMakeLists.txt | 4 +- .../Polygon_mesh_processing/CMakeLists.txt | 9 +-- .../Polygon_mesh_processing/CMakeLists.txt | 9 ++- .../CMakeLists.txt | 10 +--- .../CMakeLists.txt | 10 +--- Polyhedron/demo/Polyhedron/CMakeLists.txt | 60 +++++++------------ .../Plugins/Classification/CMakeLists.txt | 15 +---- .../demo/Polyhedron/Plugins/IO/CMakeLists.txt | 34 +++-------- .../Polyhedron/Plugins/Mesh_3/CMakeLists.txt | 33 +++------- .../Operations_on_polyhedra/CMakeLists.txt | 4 +- .../Polyhedron/Plugins/PMP/CMakeLists.txt | 21 ++----- .../Plugins/Point_set/CMakeLists.txt | 46 ++++---------- .../Plugins/Surface_mesh/CMakeLists.txt | 5 +- .../Surface_mesh_deformation/CMakeLists.txt | 5 +- .../implicit_functions/CMakeLists.txt | 5 +- .../Polyline_simplification_2/CMakeLists.txt | 3 +- .../CMakeLists.txt | 10 +--- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../examples/Property_map/CMakeLists.txt | 2 + Ridges_3/examples/Ridges_3/CMakeLists.txt | 10 +--- Ridges_3/test/Ridges_3/CMakeLists.txt | 7 +-- .../test/STL_Extension/CMakeLists.txt | 2 + .../CMakeLists.txt | 9 +-- .../test/Shape_detection/CMakeLists.txt | 2 + .../Shape_regularization/CMakeLists.txt | 2 +- .../Shape_regularization/CMakeLists.txt | 4 +- .../test/Shape_regularization/CMakeLists.txt | 2 +- .../examples/Skin_surface_3/CMakeLists.txt | 5 +- .../examples/Solver_interface/CMakeLists.txt | 20 +++---- .../examples/Spatial_searching/CMakeLists.txt | 11 +--- .../Straight_skeleton_2/CMakeLists.txt | 2 +- .../test/Stream_support/CMakeLists.txt | 5 +- Surface_mesh/test/Surface_mesh/CMakeLists.txt | 2 +- .../Surface_mesh_approximation/CMakeLists.txt | 3 +- .../Surface_mesh_approximation/CMakeLists.txt | 3 +- .../optimal_rotation/CMakeLists.txt | 5 +- .../Surface_mesh_deformation/CMakeLists.txt | 5 +- .../Surface_mesh_deformation/CMakeLists.txt | 7 +-- .../Surface_mesh_deformation/CMakeLists.txt | 7 +-- .../CMakeLists.txt | 15 +---- .../CMakeLists.txt | 5 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 2 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 10 +--- .../CMakeLists.txt | 5 +- .../CMakeLists.txt | 5 +- .../CMakeLists.txt | 6 +- .../examples/Surface_mesher/CMakeLists.txt | 6 +- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- .../applications/Triangulation/CMakeLists.txt | 4 ++ .../benchmark/Triangulation/CMakeLists.txt | 5 +- .../examples/Triangulation/CMakeLists.txt | 10 +--- .../test/Triangulation/CMakeLists.txt | 10 +--- .../examples/Triangulation_2/CMakeLists.txt | 5 +- .../demo/Triangulation_3/CMakeLists.txt | 5 +- .../examples/Triangulation_3/CMakeLists.txt | 4 +- .../test/Triangulation_3/CMakeLists.txt | 2 + .../Triangulation_on_sphere_2/CMakeLists.txt | 2 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 4 +- .../examples/Voronoi_diagram_2/CMakeLists.txt | 2 + .../test/Voronoi_diagram_2/CMakeLists.txt | 3 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 125 files changed, 257 insertions(+), 616 deletions(-) diff --git a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt index 162d8cd9a15..3a314302b01 100644 --- a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt +++ b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt @@ -12,6 +12,8 @@ find_package(benchmark) if (benchmark_FOUND) create_single_source_cgal_program("tree_creation.cpp") target_link_libraries(tree_creation benchmark::benchmark) +else() + message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.") endif() create_single_source_cgal_program("test.cpp") create_single_source_cgal_program("tree_construction.cpp") diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index c8a7e6dffce..c777eba1798 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -73,9 +73,6 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index de5a1876957..841c0b28d95 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -14,5 +14,5 @@ if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) create_single_source_cgal_program("Sign_at_1.cpp") create_single_source_cgal_program("Solve_1.cpp") else() - message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.") + message("NOTICE: This project requires the MPFI library and GMP support, and will not be compiled.") endif() diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 850c3396759..1a16e619149 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -52,14 +52,13 @@ if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program("Curve_analysis_2.cpp") create_single_source_cgal_program("Curve_pair_analysis_2.cpp") create_single_source_cgal_program("Real_embeddable_traits_extension.cpp") + if(RS_FOUND) create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp") create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp") else() - message( - STATUS - "NOTICE: Some tests require the RS library, and will not be compiled.") + message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.") endif() else() - message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") + message(STATUS "NOTICE: Some tests require GMP support, and will not be compiled.") endif() diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index dde215bbeee..27ebe2ddbf6 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -47,8 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index 3c1e32fa19f..cb56ac2bc55 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -27,16 +27,13 @@ if(GMP_FOUND) # version needs GMP>=4.2, so we require this dependency only here and # not in FindMPFI.cmake if(_IS_GMP_VERSION_TO_LOW) - message( - STATUS - "MPFI tests need GMP>=4.2, some of the tests will not be compiled") + message(STATUS "NOTICE: MPFI tests need GMP>=4.2, some of the tests will not be compiled") else(_IS_GMP_VERSION_TO_LOW) include(${MPFI_USE_FILE}) create_single_source_cgal_program("GMP_arithmetic_kernel.cpp") endif(_IS_GMP_VERSION_TO_LOW) else(MPFI_FOUND) - message( - STATUS "MPFI is not present, some of the tests will not be compiled.") + message(STATUS "NOTICE: MPFI is not present, some of the tests will not be compiled.") endif(MPFI_FOUND) create_single_source_cgal_program("Arithmetic_kernel.cpp") @@ -46,7 +43,6 @@ if(GMP_FOUND) else() - message( - STATUS "This program requires the CGAL library, and will not be compiled.") + message("NOTICE: This project requires GMP support, and will not be compiled.") endif() diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index e91295a5d90..35940772325 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -133,6 +133,5 @@ else() if(NOT Qt5_FOUND) set(MISSING_DEPS "Qt5, ${MISSING_DEPS}") endif() - message(STATUS - "NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.") + message("NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.") endif() diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index ca213799b53..19ade1e416b 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -41,4 +41,6 @@ endif() if(OpenMesh_FOUND) create_single_source_cgal_program("TriMesh.cpp") target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message("NOTICE: This project requires OpenMesh and will not be compiled.") endif() diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 51c84c35aed..f898cb277fa 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -41,7 +41,7 @@ if(OpenMesh_FOUND) target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH ) else() - message(STATUS "Examples that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: The example 'copy_polyhedron' requires OpenMesh, and will not be compiled.") endif() find_package( METIS ) @@ -50,5 +50,5 @@ if( TARGET CGAL::METIS_support ) create_single_source_cgal_program( "polyhedron_partition.cpp" ) target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support) else() - message( STATUS "Examples that use the METIS library will not be compiled." ) + message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.") endif() diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index b96ec0308e1..e53938277bb 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -18,5 +18,5 @@ if( TARGET CGAL::METIS_support ) create_single_source_cgal_program( "surface_mesh_partition.cpp" ) target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support ) else() - message(STATUS "Examples that use the METIS library will not be compiled.") + message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 8a06a97cb2a..f695c456d7d 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -118,5 +118,5 @@ if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/N target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES}) target_compile_definitions(test_3mf_to_sm PRIVATE -DCGAL_LINKED_WITH_3MF) else() - message(STATUS "NOTICE : This program requires the lib3MF library, and will not be compiled.") + message(STATUS "NOTICE: The test 'test_3mf_to_sm' requires the lib3MF library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index f8b37af9c4b..9aa881ce12f 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -19,12 +19,10 @@ create_single_source_cgal_program("benchmark_mv_34_vertices.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("benchmark_hm_4_vertices.cpp") target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_hm_n_vertices.cpp") target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support) - else() - message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: Several benchmarks require the Eigen library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt index 547eb21203d..95f907fbb10 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt @@ -20,14 +20,12 @@ create_single_source_cgal_program("deprecated_coordinates.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("affine_coordinates.cpp") target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("harmonic_coordinates.cpp") target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("shape_deformation.cpp") target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support) - else() - message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: Several examples require the Eigen library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index 41c76ac2db2..e147d8f5dae 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -56,5 +56,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_bc_all_coordinates.cpp") target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support) else() - message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: Several tests require the Eigen library, and will not be compiled.") endif() diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt index 73a02373208..f24ead2e8bd 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt @@ -18,8 +18,5 @@ endforeach() if(CGAL_Qt5_FOUND) target_link_libraries(draw_polygon_set PUBLIC CGAL::CGAL_Basic_viewer) else() - message( - STATUS - "NOTICE: The example draw_polygon_set requires Qt and drawing will be disabled." - ) + message(STATUS "NOTICE: The example 'draw_polygon_set' requires Qt and drawing will be disabled.") endif() diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 1d331fd485f..81d14bb28d7 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -18,6 +18,5 @@ create_single_source_cgal_program("test_Has_member_report.cpp") if(TARGET CGAL::TBB_support) target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() - message( - STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") + message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") endif() diff --git a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt index 8e2edfb8f13..81349809977 100644 --- a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt +++ b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt @@ -9,8 +9,5 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO) if(WITH_CGAL_ImageIO) create_single_source_cgal_program("test_trilinear_interpolation.cpp") else() - message( - STATUS - "NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled." - ) + message("NOTICE: This project requires the CGAL_ImageIO library, and will not be compiled.") endif() diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 1a6c6591822..8944aae476d 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -25,17 +25,14 @@ include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires the Eigen library, and will not be compiled." - ) + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() find_package(IPE 7) if(IPE_FOUND) - if ( NOT ${IPE_VERSION} EQUAL "7") - message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") + if(NOT ${IPE_VERSION} EQUAL "7") + message("NOTICE: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") set(IPE_FOUND FALSE) endif() endif() @@ -117,5 +114,5 @@ if(IPE_FOUND AND IPE_VERSION) cgal_add_compilation_test(simple_triangulation) else() - message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.") + message("NOTICE: This project requires the Ipe include files and library, and will not be compiled.") endif() diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index 651458bf5c0..54c3be3aba4 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -33,8 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index aef4c8b5952..2af17775b7c 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,17 +23,12 @@ include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support) - message( - STATUS - "NOTICE: This project requires Boost Serialization, and will not be compiled." - ) + message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() + if(NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: This project requires Boost IO Streams, and will not be compiled." - ) + message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() @@ -49,8 +44,7 @@ endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 8e6794dae27..63ba324644c 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,26 +23,19 @@ include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support) - message( - STATUS - "NOTICE: This project requires Boost Serialization, and will not be compiled." - ) + message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() if(NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: This project requires Boost IO Streams, and will not be compiled." - ) + message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 608e8c0a839..06592fa2548 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -21,10 +21,5 @@ if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("${cppfile}") endforeach() else() - - message( - STATUS - "This program requires the CGAL_Core library (or LEDA), and will not be compiled." - ) - + message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.") endif() diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index a9ff9378850..097eb885bd6 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -52,4 +52,6 @@ if(OpenMesh_FOUND) target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 5dfc09dac1f..0b8741ef5d2 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -47,8 +47,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Alpha_shapes_2) else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 3433ff6e691..ab0f43011f9 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -45,10 +45,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Apollonius_graph_2) - else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 311b31d8e25..8eba3017587 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -53,7 +53,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 6426853a664..9b0fbd66a4a 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -51,7 +51,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index 984dd76b770..b9644157f9e 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -45,8 +45,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Generator_2) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index f21185f0fbd..51617b00b87 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -31,7 +31,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(min) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index f853f269b66..3345c6df337 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -51,7 +51,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 02e1504bfa2..ff7f9dc4b71 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -46,8 +46,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Largest_empty_rectangle_2) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 1fcba00f1bb..993391e843a 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -58,7 +58,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Periodic_2_Delaunay_triangulation_2) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index d59836a1962..fc0a5e8cda2 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -18,10 +18,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 Core) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires the Eigen library, and will not be compiled." - ) + message("NOTICE: This demo requires the Eigen library, and will not be compiled.") return() endif() @@ -60,10 +57,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Polygon_2) else() - - message( - STATUS - "NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled." - ) - + message("NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 33153f23df0..2615db48f37 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -50,10 +50,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Segment_voronoi_2) - else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 2c46585863c..5f80bc0a62e 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -50,8 +50,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Segment_voronoi_linf_2) else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 6aa164e6d86..34af3f712aa 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -44,10 +44,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Snap_rounding_2) - else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index 9fb9c869f2b..a67f0aa90d8 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -46,8 +46,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Spatial_searching_2) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 36f479ebe4d..e45c19bc07a 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -48,7 +48,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index fdf6a86dd26..4560bc339dc 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -19,10 +19,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR TRUE) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) find_package(Qt5 QUIET COMPONENTS Widgets) -if(NOT CGAL_Qt5_FOUND - OR NOT Qt5_FOUND) - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") +if(NOT CGAL_Qt5_FOUND OR NOT Qt5_FOUND) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") return() endif() diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index b766023186e..5d52ae0861b 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -21,12 +21,8 @@ endif() find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) - if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "This project requires the Eigen library (3.3 or greater), and will not be compiled." - ) + message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.") return() endif() diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index 98bd95f5d56..b248cc08734 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -22,10 +22,7 @@ endif() find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "This project requires the Eigen library (3.3 or greater), and will not be compiled." - ) + message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.") return() endif() diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 1236c0453b1..b61e95c544a 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -39,8 +39,5 @@ if(CGAL_Qt5_FOUND include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test( HDT2 ) else() - message( - STATUS - "NOTICE: This demo requires CGAL, CGAL_Core (or LEDA), and Qt5 and will not be compiled." - ) + message("NOTICE: This demo requires CGAL_Core (or LEDA), and Qt5 and will not be compiled.") endif() diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 19ba65d9900..3c0e1ec0fdb 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -24,8 +24,7 @@ include(GNUInstallDirs) if(CGAL_BRANCH_BUILD) - message( - STATUS "Build CGAL from ${CGAL_SCM_NAME}-branch: ${CGAL_SCM_BRANCH_NAME}") + message(STATUS "Build CGAL from ${CGAL_SCM_NAME}-branch: ${CGAL_SCM_BRANCH_NAME}") # list packages file( diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake index ab55c3b86f9..19ca4ed14de 100644 --- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake +++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake @@ -11,6 +11,6 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") target_link_libraries(CGAL::pointmatcher_support INTERFACE ${libpointmatcher_LIBRARIES}) else() - message(STATUS "NOTICE : the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") + message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") endif() endif() diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index 37576cd9dce..e3c35fe60a2 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -10,9 +10,9 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) + # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) - if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("Mesh_estimation.cpp") target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) @@ -22,18 +22,12 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() else() - message( - STATUS - "NOTICE: This program requires Boost Program Options and will not be compiled." - ) + message(STATUS "NOTICE: The example 'Mesh_estimation' requires Boost Program Options, and will not be compiled.") endif() create_single_source_cgal_program("Single_estimation.cpp") target_link_libraries(Single_estimation PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: These examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index 55604c4c554..c371969ef24 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -13,8 +13,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("blind_1pt.cpp") target_link_libraries(blind_1pt PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 8f715aac084..06cbe3335e9 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -48,8 +48,7 @@ if(NOT (CGAL_Qt5_FOUND AND Qt5_FOUND)) - message(STATUS "NOTICE: This demo requires CGAL, " - "and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") else() diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index b91fb018970..1044f4486a7 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -23,9 +23,9 @@ endif() find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( STATUS "NOTICE: All examples need the Eigen3 library, and will not be compiled." ) + message("NOTICE: All examples require the Eigen3 library, and will not be compiled.") return() -endif() #CGAL::Eigen_3_support +endif() find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) if(VTK_FOUND) @@ -166,21 +166,15 @@ if(TARGET CGAL::CGAL_ImageIO) target_link_libraries(mesh_3D_weighted_image PUBLIC CGAL::Eigen3_support CGAL::ITK_support) else(ITK_FOUND) - message(STATUS "NOTICE: The examples that need ITK will not be compiled.") + message(STATUS "NOTICE: The examples that need ITK will not be compiled.") endif(ITK_FOUND) else() - message( - STATUS - "NOTICE: The examples mesh_3D_image.cpp, mesh_3D_weighted_image.cpp, mesh_3D_image_variable_size.cpp, mesh_optimization_example.cpp and mesh_optimization_lloyd_example.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." - ) + message(STATUS "NOTICE: The examples mesh_3D_image.cpp, mesh_3D_weighted_image.cpp, mesh_3D_image_variable_size.cpp, mesh_optimization_example.cpp and mesh_optimization_lloyd_example.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." - ) + message(STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled.") endif() if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) diff --git a/NewKernel_d/test/NewKernel_d/CMakeLists.txt b/NewKernel_d/test/NewKernel_d/CMakeLists.txt index c8d8f00f844..103bcabd9ca 100644 --- a/NewKernel_d/test/NewKernel_d/CMakeLists.txt +++ b/NewKernel_d/test/NewKernel_d/CMakeLists.txt @@ -6,10 +6,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(NewKernel_d_Tests) if(CMAKE_COMPILER_IS_GNUCCX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - message( - STATUS - "NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled." - ) + message("NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled.") return() endif() @@ -28,10 +25,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() - - message( - STATUS - "NOTICE: These programs require the Eigen3 library, and will not be compiled." - ) - + message("NOTICE: These programs require the Eigen3 library, and will not be compiled.") endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index d7c0b148f90..cb165f79427 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -13,8 +13,7 @@ include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 822eb0d43c4..e35a681812b 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -9,8 +9,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index e3f74be5219..bd6f6a443b3 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -9,8 +9,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt index fe35cc31bb4..81e68f53bd3 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt @@ -33,14 +33,10 @@ find_path( DOC "Path to the header of the CImg library") if(CIMG_INCLUDE_DIR) - message( - STATUS "CImg library found, the demo can load point set from image files.") + message(STATUS "NOTICE: CImg library found, the demo can load point set from image files.") else() - message( - STATUS - "CImg library was not found, the demo will not be able to load point set from image files. " - "Try setting the environment variable CIMG_INC_DIR to point to the path of the directory containing CImg.h." - ) + message(STATUS "CImg library was not found, the demo will not be able to load point set from image files. " + "Try setting the environment variable CIMG_INC_DIR to point to the path of the directory containing CImg.h.") endif() if(CGAL_Qt5_FOUND AND Qt5_FOUND) @@ -105,10 +101,7 @@ else( set(OTR2_MISSING_DEPS "Qt5.4, ${OTR2_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${OTR2_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${OTR2_MISSING_DEPS} and will not be compiled.") endif( CGAL_Qt5_FOUND diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 5ff935ae611..22faeaf1c29 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -10,8 +10,7 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index b763183740b..3692008579e 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -97,9 +97,6 @@ else() ) endif() - message( - STATUS - "NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled.") endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt index eccdac1b231..b92bb85a4c3 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -92,9 +92,6 @@ else(CGAL_Qt5_FOUND "${CGAL_QCOLLECTIONGENERATOR_TARGET}, ${PERIODIC_LLOYD_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${PERIODIC_LLOYD_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${PERIODIC_LLOYD_MISSING_DEPS} and will not be compiled.") endif() diff --git a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 013be0260c8..a2b4110a07f 100644 --- a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -41,5 +41,5 @@ if((CGAL_Core_FOUND OR LEDA_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(P4HDT2) else() - message(STATUS "NOTICE: This demo requires Qt5 and will not be compiled.") + message("NOTICE: This demo requires Qt5 and will not be compiled.") endif() diff --git a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index ddabef6c10d..1a7e63715ec 100644 --- a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -7,10 +7,6 @@ find_package(LEDA QUIET) if((CGAL_Core_FOUND OR LEDA_FOUND)) create_single_source_cgal_program("p4ht2_example_insertion.cpp") - else() - - message( - STATUS "This program requires the CGAL library, and will not be compiled.") - + message("NOTICE: This program requires the CGAL library, and will not be compiled.") endif() diff --git a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index f62e869c177..812dc8b307d 100644 --- a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -14,12 +14,6 @@ if((CGAL_Core_FOUND OR LEDA_FOUND)) create_single_source_cgal_program("test_p4ht2_removal_iterator.cpp") create_single_source_cgal_program("test_p4ht2_removal.cpp") create_single_source_cgal_program("test_p4ht2_insert_degenerate.cpp") - else() - - message( - STATUS - "This program requires the CGAL library and the GMP library, and will not be compiled." - ) - + message("NOTICE: This program requires the CGAL library and the GMP library, and will not be compiled.") endif() diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 7fde9c1408d..f7600b60857 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -36,6 +36,8 @@ include(CGAL_Eigen3_support) if(EIGEN3_FOUND) create_single_source_cgal_program("point_set_algo.cpp") target_link_libraries(point_set_algo PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The example 'point_set_algo' requires the Eigen library, and will not be compiled.") endif() create_single_source_cgal_program("draw_point_set_3.cpp") diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index bb283d43771..b7496eb6d5e 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -38,8 +38,8 @@ if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1 if (TARGET CGAL::LASLIB_support) target_link_libraries(test_deprecated_io_ps PUBLIC CGAL::LASLIB_support) else() - message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader test requires LASlib, and will not be compiled.") endif() else() - message(STATUS "NOTICE : the LAS reader does not work with Visual Studio 2017.") + message(STATUS "NOTICE: the LAS reader does not work with Visual Studio 2017.") endif() diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index c4d8da3b0a0..39655c8b217 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -62,9 +62,7 @@ if(TARGET CGAL::LASLIB_support) create_single_source_cgal_program("read_las_example.cpp") target_link_libraries(read_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) else() - message( - STATUS - "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader example requires LASlib and will not be compiled.") endif() # Use Eigen @@ -102,11 +100,9 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(registration_with_pointmatcher PRIVATE ${CGAL_libs} CGAL::pointmatcher_support) else() - message( - STATUS - "NOTICE : the registration_with_pointmatcher test requires libpointmatcher and will not be compiled." - ) + message(STATUS "NOTICE: registration with pointmatcher requires libpointmatcher and will not be compiled.") endif() + # Executables that require OpenGR find_package(OpenGR QUIET) include(CGAL_OpenGR_support) @@ -115,10 +111,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(registration_with_OpenGR PRIVATE ${CGAL_libs} CGAL::OpenGR_support) else() - message( - STATUS - "NOTICE : registration_with_OpenGR requires OpenGR, and will not be compiled." - ) + message(STATUS "NOTICE: registration_with_OpenGR requires OpenGR, and will not be compiled.") endif() # Executables that require both libpointmatcher and OpenGR @@ -129,15 +122,9 @@ if(TARGET CGAL::Eigen3_support) registration_with_opengr_pointmatcher_pipeline PRIVATE ${CGAL_libs} CGAL::pointmatcher_support CGAL::OpenGR_support) else() - message( - STATUS - "NOTICE : registration_with_opengr_pointmatcher_pipeline requires libpointmatcher and OpenGR, and will not be compiled." - ) + message(STATUS "NOTICE: registration with OpenGR and pointmatcher requires both libpointmatcher and OpenGR, and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message(STATUS "NOTICE: Some of the executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 895fae52907..52c6df32af0 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -46,10 +46,10 @@ if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1 target_link_libraries(test_read_write_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) target_link_libraries(test_deprecated_io_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) else() - message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader test requires LASlib and will not be compiled.") endif() else() - message(STATUS "NOTICE : the LAS reader does not work with Visual Studio 2017.") + message(STATUS "NOTICE: the LAS reader does not work with Visual Studio 2017.") endif() # Use Eigen @@ -76,10 +76,7 @@ if (EIGEN3_FOUND) create_single_source_cgal_program("jet_pointer_as_property_map.cpp") target_link_libraries(jet_pointer_as_property_map PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() if(TARGET CGAL::TBB_support) @@ -92,4 +89,6 @@ if(TARGET CGAL::TBB_support) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endforeach() +else() + message(STATUS "NOTICE: Tests are not using TBB.") endif() diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 287652eae55..40694e9e5d1 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -32,7 +32,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("tutorial_example.cpp") target_link_libraries(tutorial_example PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: The examples need Eigen 3.1 (or greater) will not be compiled.") + message("NOTICE: The examples require Eigen 3.1 (or greater) will not be compiled.") endif() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index baa4d41677a..11be7ccef68 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -136,7 +136,7 @@ include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::METIS_support) else() - message(STATUS "Tests, which use the METIS library will not be compiled.") + message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() find_package(TBB) @@ -152,12 +152,13 @@ if(TARGET CGAL::TBB_support) create_single_source_cgal_program("corefinement_parallel_union_meshes.cpp") target_link_libraries(corefinement_parallel_union_meshes PUBLIC CGAL::TBB_support) else() - message( - STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") + message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support) target_link_libraries(mesh_smoothing_example PUBLIC CGAL::Ceres_support) -endif(TARGET CGAL::Ceres_support) +else() + message(STATUS "NOTICE: The example 'mesh_smoothing_example' uses the Ceres library, and will not be compiled.") +endif() diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 9eb13d3458e..f5a2182b27f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -117,7 +117,7 @@ include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::METIS_support) else() - message(STATUS "Tests, which use the METIS library will not be compiled.") + message(STATUS "NOTICE: Tests are not using METIS.") endif() if(TARGET CGAL::TBB_support) @@ -127,15 +127,14 @@ if(TARGET CGAL::TBB_support) target_link_libraries(self_intersection_surface_mesh_test PUBLIC CGAL::TBB_support) else() - message( - STATUS - "NOTICE: Intel TBB was not found. test_pmp_distance will use sequential code." - ) + message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() if(OpenMesh_FOUND) create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") target_link_libraries(remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() find_package(Ceres QUIET) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 9db1ae5e988..6f14f6590fb 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -28,10 +28,7 @@ endif() find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() @@ -41,10 +38,7 @@ if(NOT TARGET CGAL::SCIP_support) find_package(GLPK QUIET) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) - message( - STATUS - "NOTICE: This project requires either SCIP or GLPK, and will not be compiled." - ) + message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") return() endif() endif() diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 7b6a992ea95..4d3142d9b4d 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -28,10 +28,7 @@ endif() find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() @@ -41,10 +38,7 @@ if(NOT TARGET CGAL::SCIP_support) find_package(GLPK QUIET) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) - message( - STATUS - "NOTICE: This project requires either SCIP or GLPK, and will not be compiled." - ) + message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") return() endif() endif() diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index b3a6562f1c4..b66e739024b 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -56,9 +56,7 @@ set_package_properties( Qt5 PROPERTIES TYPE REQUIRED PURPOSE "Enables the 3D Features, for GUI and visualization." - DESCRIPTION - "To find this package, it should be sufficient to fill the Qt5_DIR variable with : ///lib/cmake/Qt5" -) + DESCRIPTION "To find this package, it should be sufficient to fill the Qt5_DIR variable with: ///lib/cmake/Qt5") if(Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) @@ -68,18 +66,19 @@ endif(Qt5_FOUND) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) set_package_properties( Eigen3 PROPERTIES - DESCRIPTION "A library for mathematical tools." - PURPOSE - "Requiered for the Polyhedron Edit, Parameterization, Jet fitting, Classification plugin, Surface reconstruction, Normal estimation, Smoothing, Average spacing, Feature detection, Hole Filling and Fairing plugins ." -) + DESCRIPTION "A library for linear algebra." + PURPOSE "Required for most plugins (Meshing, Mesh and Point Set Processing, etc.).") include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message(STATUS "NOTICE: Eigen was not found.") +endif() find_package(METIS) include(CGAL_METIS_support) set_package_properties( METIS PROPERTIES - DESCRIPTION "A library for partitioning." - PURPOSE "Requiered for the partition plugin.") + DESCRIPTION "A library for graph partitioning." + PURPOSE "Required for the partition plugin.") # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) @@ -87,10 +86,7 @@ if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) find_package(TBB) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) - message( - STATUS - "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked." - ) + message(STATUS "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked.") endif() endif() @@ -98,11 +94,10 @@ endif() find_package(LibSSH) set_package_properties( LibSSH PROPERTIES - DESCRIPTION "A library used to enable the SSH features. " - PURPOSE "Requiered for loading (saving) a scene to (from) a distant server.") - + DESCRIPTION "A library implementing the SSH protocol on client and server side. " + PURPOSE "Required for loading (saving) a scene to (from) a distant server.") if(NOT LIBSSH_FOUND) - message("NOTICE : The SSH features will be disabled.") + message(STATUS "NOTICE: The SSH features will be disabled.") endif() # Activate concurrency ? (turned OFF by default) @@ -115,15 +110,11 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") find_package(TBB REQUIRED) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) - message( - STATUS - "NOTICE: Intel TBB was not found. Mesh_3 is faster if TBB is linked.") + message(STATUS "NOTICE: Intel TBB was not found. Mesh_3 is faster if TBB is linked.") endif() endif() - else(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - option(LINK_WITH_TBB - "Link with TBB anyway so we can use TBB timers for profiling" ON) + option(LINK_WITH_TBB "Link with TBB anyway so we can use TBB timers for profiling" ON) if(LINK_WITH_TBB) find_package(TBB) include(CGAL_TBB_support) @@ -132,9 +123,8 @@ endif() set_package_properties( TBB PROPERTIES - DESCRIPTION - "A library for parallelism. Mesh_3, Bilateral smoothing and WLOP plugins are faster if TBB is linked." - PURPOSE "Requiered for running some algorithms in parallel.") + DESCRIPTION "A library for parallel programming." + PURPOSE "Plugins such as Mesh_3, Bilateral smoothing, and WLOP are faster if TBB is linked.") if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) @@ -212,8 +202,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) Qt5::Script CGAL::CGAL_Qt5) if(TARGET Qt5::WebSockets) target_link_libraries(demo_framework PUBLIC Qt5::WebSockets) - message( - STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") + message(STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") endif() #compilation_of__demo_framework is defined in polyhedron_demo_macros.cmake @@ -383,10 +372,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) if(TARGET Qt5::ScriptTools) target_link_libraries(polyhedron_demo PUBLIC Qt5::ScriptTools) else() - message( - STATUS - "POLYHEDRON_QTSCRIPT_DEBUGGER is set to TRUE but the Qt5 ScriptTools library was not found." - ) + message(STATUS "POLYHEDRON_QTSCRIPT_DEBUGGER is set to TRUE but the Qt5 ScriptTools library was not found.") endif() endif() target_link_libraries(Polyhedron_3 PRIVATE demo_framework) @@ -433,8 +419,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) if(TARGET Qt5::WebSockets AND TARGET Qt5::Network) add_executable(WS_server Server_ws.cpp) target_link_libraries(WS_server PUBLIC Qt5::WebSockets Qt5::Widgets Qt5::Network) - message( - STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") + message(STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") endif() # # Exporting @@ -481,10 +466,7 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(POLYHEDRON_MISSING_DEPS "Qt5, ${POLYHEDRON_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS} and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) @@ -495,7 +477,7 @@ feature_summary( QUIET_ON_EMPTY VAR NotFound_REQ_PACKAGES) if(NOT ${NotFound_REQ_PACKAGES} STREQUAL "") - message(STATUS "${NotFound_REQ_PACKAGES}") + message("${NotFound_REQ_PACKAGES}") endif() feature_summary( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index 4ed41201cf4..e2314c89202 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -6,10 +6,7 @@ if(TARGET CGAL::Eigen3_support) include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible." - ) + message(STATUS "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible.") endif() find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning @@ -20,10 +17,7 @@ if(TARGET CGAL::Eigen3_support) ) include(CGAL_OpenCV_support) if(NOT TARGET CGAL::OpenCV_support) - message( - STATUS - "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available." - ) + message(STATUS "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.") endif() qt5_wrap_ui(classificationUI_FILES Classification_widget.ui @@ -69,8 +63,5 @@ if(TARGET CGAL::Eigen3_support) add_dependencies(classification_plugin point_set_selection_plugin selection_plugin) else() - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Classification plugin will not be available." - ) + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Classification plugin will not be available.") endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt index d7ed3ec6bb8..7d404d7f196 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt @@ -3,8 +3,8 @@ include(polyhedron_demo_macros) find_package(LASLIB) set_package_properties( LASLIB PROPERTIES - DESCRIPTION "A library for some I/O." - PURPOSE "Requiered for reading or writing LAS files.") + DESCRIPTION "A library for LIDAR I/O." + PURPOSE "Required for reading or writing LAS files.") include(CGAL_LASLIB_support) @@ -68,22 +68,13 @@ if(VTK_FOUND) ${VTK_LIBRARIES}) target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK) else() - message( - STATUS - "NOTICE : the vtk IO plugin needs VTK libraries and will not be compiled." - ) + message(STATUS "NOTICE: the vtk IO plugin needs VTK libraries and will not be compiled.") endif() else() - message( - STATUS - "NOTICE : the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found)." - ) + message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found).") endif() else() - message( - STATUS - "NOTICE : the vtk IO plugin needs VTK 6.0 or greater and will not be compiled." - ) + message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.") endif() polyhedron_demo_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification) target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item) @@ -92,10 +83,7 @@ list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_rvalue_references has_cxx_rvalues) list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_variadic_templates has_cxx_variadic) if(has_cxx_rvalues LESS 0 OR has_cxx_variadic LESS 0) - message( - STATUS - "NOTICE : LAS/PLY IO examples require a C++11 compiler and will not be compiled." - ) + message(STATUS "NOTICE: LAS/PLY IO examples require a C++11 compiler and will not be compiled.") else() set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) @@ -113,10 +101,7 @@ else() PUBLIC "-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS") endif() else() - message( - STATUS - "NOTICE : the LAS IO plugin needs LAS libraries and will not be compiled." - ) + message(STATUS "NOTICE: the LAS IO plugin needs LAS libraries and will not be compiled.") endif() endif() @@ -138,8 +123,5 @@ if(3MF_LIBRARIES target_link_libraries(io_3mf_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item ${3MF_LIBRARIES}) target_compile_definitions(io_3mf_plugin PRIVATE -DCGAL_LINKED_WITH_3MF) else() - message( - STATUS - "NOTICE : The 3mf_io_plugin requires the lib3MF library in a version < 2.0, and will not be compiled." - ) + message(STATUS "NOTICE: The 3mf_io_plugin requires the lib3MF library in a version < 2.0, and will not be compiled.") endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt index 89d05476c46..ab8d02e1d80 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt @@ -44,22 +44,13 @@ if(VTK_FOUND) set(VTK_LIBRARIES VTK::IOImage VTK::ImagingGeneral) endif() if(NOT VTK_LIBRARIES) - message( - STATUS - "NOTICE : the DICOM files (.dcm) need VTK libraries to be open and will not be able to." - ) + message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() else() - message( - STATUS - "NOTICE : the DICOM files (.dcm) need VTK libraries to be open and will not be able to." - ) + message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() else() - message( - STATUS - "NOTICE : the DICOM files (.dcm) need VTK libraries to be open and will not be able to." - ) + message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() find_package(Boost QUIET OPTIONAL_COMPONENTS filesystem system) @@ -82,10 +73,7 @@ if(Boost_FILESYSTEM_FOUND) target_link_libraries(io_image_plugin PUBLIC ${Boost_LIBRARIES}) endif() else() - message( - STATUS - "NOTICE : the Io_image_plugin needs boost-filesystem to work and will not be compiled" - ) + message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled") endif() polyhedron_demo_plugin( mesh_3_optimization_plugin @@ -101,17 +89,14 @@ target_link_libraries( scene_implicit_function_item) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) target_link_libraries(mesh_3_optimization_plugin PUBLIC CGAL::Eigen3_support) -else() #eigen - message( - STATUS - "The Mesh_3_optimization_plugin requires Eigen, which was not found, and will use a deprecated class to replace it. Warnings are to be expected." - ) -endif() #eigen +else() + message(STATUS "NOTICE: The Mesh_3_optimization_plugin requires Eigen, which was not found." + "A deprecated class will be used to replace it. Warnings are to be expected.") +endif() polyhedron_demo_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3) target_link_libraries(c3t3_io_plugin PUBLIC scene_c3t3_item) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt index 82d8554f6e3..628d00b72d3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt @@ -25,7 +25,5 @@ target_link_libraries(diff_between_meshes_plugin PUBLIC scene_surface_mesh_item) polyhedron_demo_plugin(partition_plugin Partition_graph_plugin ${partitionUI_FILES}) target_link_libraries(partition_plugin PUBLIC scene_surface_mesh_item CGAL::METIS_support ) else() - message( - "NOTICE : the Partition plugin needs METIS libraries and will not be compiled." - ) + message(STATUS "NOTICE: the Partition plugin needs METIS libraries and will not be compiled.") endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt index 53cfdc9b825..adcd4f7f02b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt @@ -1,16 +1,12 @@ include(polyhedron_demo_macros) -if(TARGET CGAL::Eigen3_support) +if(TARGET CGAL::Eigen3_support) polyhedron_demo_plugin(jet_fitting_plugin Jet_fitting_plugin) target_link_libraries( jet_fitting_plugin PUBLIC scene_surface_mesh_item scene_polylines_item CGAL::Eigen3_support) - else() - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available." - ) + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available.") endif() polyhedron_demo_plugin(extrude_plugin Extrude_plugin KEYWORDS PMP) @@ -64,17 +60,10 @@ if(TARGET CGAL::Eigen3_support) PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() else() - message( - STATUS - "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available." - ) + message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.") endif() - -else(EIGEN3_FOUND) - message( - STATUS - "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available." - ) +else() + message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.") endif() qt5_wrap_ui(soupUI_FILES Repair_soup.ui) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index ef370a1fbe6..702e4a1898e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -5,9 +5,8 @@ if(TARGET CGAL::Eigen3_support) set_package_properties( SCIP PROPERTIES - DESCRIPTION "A solver." - PURPOSE - "Can be used as a solver in the surface_reconstruction_plugin plugin.") + DESCRIPTION "A solver for mixed integer programming." + PURPOSE "Can be used as a solver in the surface_reconstruction_plugin plugin.") include(CGAL_SCIP_support) if(NOT TARGET CGAL::SCIP_support) @@ -16,17 +15,13 @@ if(TARGET CGAL::Eigen3_support) set_package_properties( GLPK PROPERTIES DESCRIPTION "An alternative for SCIP." - PURPOSE - "Can be used as a solver in the surface_reconstruction_plugin plugin.") + PURPOSE "Can be used as a solver in the surface_reconstruction_plugin plugin.") include(CGAL_GLPK_support) endif() if(NOT TARGET CGAL::SCIP_support AND NOT TARGET CGAL::GLPK_support) - message( - STATUS - "NOTICE: SCIP and GLPK were not found. Polygonal surface reconstruction will not be available." - ) + message(STATUS "NOTICE: SCIP and GLPK were not found. Polygonal surface reconstruction will not be available.") endif() qt5_wrap_ui(surface_reconstructionUI_FILES Surface_reconstruction_plugin.ui) @@ -118,33 +113,14 @@ if(TARGET CGAL::Eigen3_support) PUBLIC CGAL::pointmatcher_support) endif() else() - message( - STATUS - "NOTICE: OpenGR and libpointmatcher were not found. Registration plugin will not be available." - ) + message(STATUS "NOTICE: OpenGR and libpointmatcher were not found. Registration plugin will not be available.") endif() - -else(EIGEN3_FOUND) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Surface reconstruction plugin will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Normal estimation plugins will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Smoothing plugin will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Average spacing plugin will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Feature detection plugin will not be available." - ) +else() + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Surface reconstruction plugin will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Normal estimation plugins will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Smoothing plugin will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Average spacing plugin will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Feature detection plugin will not be available.") endif() qt5_wrap_ui(point_set_bilateral_smoothingUI_FILES diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt index 682998322e0..4e553fbde16 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt @@ -23,10 +23,7 @@ if(NOT CGAL_DISABLE_GMP) endif() else() - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available." - ) + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available.") endif() qt5_wrap_ui(segmentationUI_FILES Mesh_segmentation_widget.ui) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt index 0954a8c13c3..b7f9d81ad41 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -12,8 +12,5 @@ if(EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") endif() else() - message( - STATUS - "NOTICE: The polyhedron edit plugin require Eigen 3.2 (or higher) and will not be available." - ) + message(STATUS "NOTICE: The polyhedron edit plugin requires Eigen 3.2 (or higher) and will not be available.") endif() diff --git a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt index f11de800034..98faad76be3 100644 --- a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt @@ -59,9 +59,6 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(MESH_3_MISSING_DEPS "Qt5, ${MESH_3_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${MESH_3_MISSING_DEPS} and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index d920d36fcc7..002fd913902 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -48,7 +48,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index d1ee8325335..60b1475d431 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -20,10 +20,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires the Eigen library, and will not be compiled." - ) + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() @@ -73,9 +70,6 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(PCA_MISSING_DEPS "Qt5, ${PCA_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${PCA_MISSING_DEPS} and will not be compiled." - ) + message("NOTICE: This demo requires ${PCA_MISSING_DEPS} and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt index 01bbb5c99af..6ba4150b812 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message(STATUS "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt index a4ea754853f..9fb9d3a75db 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message(STATUS "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index b33ebc34768..e1f2e269e23 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -28,4 +28,6 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("custom_property_map.cpp") target_link_libraries(custom_property_map PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The example 'custom_property_map' requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 74b132ea916..c8e1f4d9e83 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -31,14 +31,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Ridges_Umbilics_LCC PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() else() - message( - STATUS - "NOTICE: This programs require Boost Program Options and will not be compiled." - ) + message("NOTICE: This project requires Boost Program Options and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index ae33dbe2534..73fcc4e7f89 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -13,10 +13,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("ridge_test.cpp") target_link_libraries(ridge_test PUBLIC CGAL::Eigen3_support) else() - - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) - + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 98018bcf782..65a100afa6d 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -62,4 +62,6 @@ endif() if(OpenMesh_FOUND) create_single_source_cgal_program("test_hash_OpenMesh.cpp") target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() 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 2532c9defb5..ba2c593d83e 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 @@ -10,9 +10,7 @@ if(ACTIVATE_CONCURRENCY) find_package(TBB) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) - message( - STATUS - "NOTICE: Intel TBB NOT found! The example is faster if TBB is linked.") + message(STATUS "NOTICE: Intel TBB not found. Examples are faster if TBB is linked.") endif() endif() @@ -35,8 +33,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(scale_space_advancing_front PUBLIC CGAL::TBB_support) endif() else() - message( - STATUS - "NOTICE: The example needs Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 92e45de666c..149f34e57f0 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -59,4 +59,6 @@ if(EIGEN3_FOUND) target_link_libraries(test_validity_sampled_data CGAL::CGAL CGAL::Data CGAL::Eigen3_support) endif() cgal_add_test(test_validity_sampled_data) +else() + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index e0c8987322e..84e8e1a509a 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -27,5 +27,5 @@ if(TARGET CGAL::OSQP_support) endif() endforeach() else() - message(NOTICE "OSQP was not found. OSQP benchmarks won't be available.") + message("NOTICE: OSQP was not found. OSQP benchmarks won't be available.") endif() diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index adfb948e463..d01c9585a16 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -34,10 +34,10 @@ if(TARGET CGAL::OSQP_support) create_single_source_cgal_program("regularize_real_data_2.cpp") target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support) else() - message(NOTICE "Eigen was not found. Eigen examples won't be available.") + message(STATUS "NOTICE: Eigen was not found. Eigen examples won't be available.") endif() else() - message(NOTICE "OSQP was not found. OSQP examples won't be available.") + message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") endif() create_single_source_cgal_program("regularize_framework.cpp") diff --git a/Shape_regularization/test/Shape_regularization/CMakeLists.txt b/Shape_regularization/test/Shape_regularization/CMakeLists.txt index 5bb7cc98ef3..96ce53eb1a5 100644 --- a/Shape_regularization/test/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/test/Shape_regularization/CMakeLists.txt @@ -31,7 +31,7 @@ if(TARGET CGAL::OSQP_support) endif() endforeach() else() - message(NOTICE "OSQP was not found. OSQP tests won't be available.") + message(STATUS "NOTICE: OSQP was not found. OSQP tests won't be available.") endif() set(targets diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index 3de1179c2f5..f053e7e5079 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -25,8 +25,5 @@ if(ESBTL_FOUND) include_directories(${ESBTL_INCLUDE_DIR}) create_single_source_cgal_program("skin_surface_pdb_reader.cpp") else(ESBTL_FOUND) - message( - STATUS - "NOTICE: skin_surface_pdb_reader.cpp requires ESBTL library, and will not be compiled." - ) + message(STATUS "NOTICE: skin_surface_pdb_reader.cpp requires ESBTL library, and will not be compiled.") endif(ESBTL_FOUND) diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index a8ce3e9a528..b269af2e059 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -16,6 +16,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(sparse_solvers PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("diagonalize_matrix.cpp") target_link_libraries(diagonalize_matrix PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Eigen3 was not found. Some examples won't be available.") endif() find_package(OSQP QUIET) @@ -23,8 +25,7 @@ include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) create_single_source_cgal_program("osqp_quadratic_program.cpp") target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) - message("OSQP found and used") - + message(STATUS "OSQP found and used") else() message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") endif() @@ -34,23 +35,16 @@ include(CGAL_SCIP_support) if(TARGET CGAL::SCIP_support) create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) - message("SCIP found and used") - + message(STATUS "SCIP found and used") else() find_package(GLPK QUIET) include(CGAL_GLPK_support) if(TARGET CGAL::GLPK_support) create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) - message("GLPK found and used") - + message(STATUS "GLPK found and used") else() - - message( - STATUS - "NOTICE : This project requires either SCIP or GLPK, and will not be compiled. " - "Please provide either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'" - ) - + message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " + "Please provide either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'") endif() endif() diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 9dd43a935e1..374ff11054d 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -44,13 +44,8 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("general_neighbor_searching.cpp") target_link_libraries(general_neighbor_searching PUBLIC CGAL::Eigen3_support) else() - - message(STATUS "fuzzy_range_query.cpp and general_neighbor_searching.cpp") - message( - STATUS - "will not be compiled as they use CGAL::Epick_d which requires the Eigen library." - ) - + message(STATUS "NOTICE: The examples 'fuzzy_range_query' and 'general_neighbor_searching'") + message(STATUS "will not be compiled as they use CGAL::Epick_d, which requires the Eigen library.") endif() find_package(TBB QUIET) @@ -59,5 +54,5 @@ if(TARGET CGAL::TBB_support) create_single_source_cgal_program("parallel_kdtree.cpp") target_link_libraries(parallel_kdtree PUBLIC CGAL::TBB_support) else() - message(STATUS "parallel_kdtree.cpp requires TBB and will not be compiled") + message(STATUS "NOTICE: The example 'parallel_kdtree' requires TBB, and will not be compiled") endif() diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt b/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt index 56b2fffadd5..c6e8c6c0d51 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt @@ -17,5 +17,5 @@ if(CGAL_Qt5_FOUND) target_link_libraries(draw_straight_skeleton_2 PUBLIC CGAL::CGAL_Basic_viewer) target_link_libraries(exterior_offset_of_multiple_polygons_with_holes PUBLIC CGAL::CGAL_Basic_viewer) else() - message(STATUS "NOTICE: The example draw_straight_skeleton_2 requires Qt and will not be compiled.") + message(STATUS "NOTICE: The example 'draw_straight_skeleton_2' requires Qt and will not be compiled.") endif() diff --git a/Stream_support/test/Stream_support/CMakeLists.txt b/Stream_support/test/Stream_support/CMakeLists.txt index ade4d2c88f8..15c115bd3fa 100644 --- a/Stream_support/test/Stream_support/CMakeLists.txt +++ b/Stream_support/test/Stream_support/CMakeLists.txt @@ -27,10 +27,7 @@ foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES}) else() - message( - STATUS - "NOTICE : This program requires the lib3MF library, and will not be compiled." - ) + message(STATUS "NOTICE: Some tests require the lib3MF library, and will not be compiled.") endif() else() create_single_source_cgal_program("${cppfile}") diff --git a/Surface_mesh/test/Surface_mesh/CMakeLists.txt b/Surface_mesh/test/Surface_mesh/CMakeLists.txt index 0796515d99d..ce006010e98 100644 --- a/Surface_mesh/test/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/test/Surface_mesh/CMakeLists.txt @@ -25,5 +25,5 @@ if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/N target_link_libraries(test_deprecated_io_sm PRIVATE ${3MF_LIBRARIES}) target_compile_definitions(test_deprecated_io_sm PRIVATE -DCGAL_LINKED_WITH_3MF) else() - message(STATUS "NOTICE : read_3mf requires the lib3MF library, and will not be tested.") + message(STATUS "NOTICE: read_3mf requires the lib3MF library, and will not be tested.") endif() diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 49b649baf99..a76d0e049f7 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -19,8 +19,7 @@ endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index 64fb53467a0..cb8582389d6 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -19,8 +19,7 @@ endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index 625c8fbcbcd..ca4ca2ffd1e 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -11,8 +11,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_for_concept_models.cpp") target_link_libraries(benchmark_for_concept_models PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "This program requires the Eigen library, version 3.1 or later and will not be compiled." - ) + message("NOTICE: This program requires requires Eigen 3.1 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index 778b63e37ec..40354505e1b 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -20,8 +20,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(deform_mesh_for_botsch08_format PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires the Eigen library, version 3.2 or later and will not be compiled." - ) + message("NOTICE: This program requires requires Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 80137f8569b..168b336edff 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -38,12 +38,9 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) else() - message(STATUS "Example that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() else() - message( - STATUS - "NOTICE: These examples require the Eigen library, version 3.2 or later and will not be compiled." - ) + message("NOTICE: These examples require Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index 001902d0187..5046d551a55 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -23,11 +23,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Cactus_deformation_session_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) else() - message(STATUS "Example that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() else() - message( - STATUS - "NOTICE: These tests require the Eigen library, version 3.2 or later and will not be compiled." - ) + message("NOTICE: These tests require the Eigen library, version 3.1.91 or later and will not be compiled.") endif() diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 0c373f160c6..d4c54e35640 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -37,16 +37,10 @@ if(TARGET CGAL::Eigen3_support) add_definitions(-DEIGEN_DONT_ALIGN_STATICALLY) add_definitions(-DCGAL_SMP_USE_SPARSESUITE_SOLVERS) else() - message( - STATUS - "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation." - ) + message(STATUS "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation.") endif() else(SuiteSparse_FOUND) - message( - STATUS - "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library." - ) + message(STATUS "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library.") endif(SuiteSparse_FOUND) # ------------------------------------------------------------------ @@ -72,8 +66,5 @@ if(TARGET CGAL::Eigen3_support) endif() else() - message( - STATUS - "NOTICE: The examples require Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: The examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index b8567b47ad3..81d75a3ce49 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -13,8 +13,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(extensive_parameterization_test PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: The tests require Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: The tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt index 86cfaeb0351..67c248833c6 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt @@ -19,5 +19,5 @@ if(OpenMesh_FOUND) create_single_source_cgal_program("shortest_paths_OpenMesh.cpp") target_link_libraries(shortest_paths_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() - message(STATUS "Examples that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index 973af0b75e3..95099585460 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -26,14 +26,8 @@ if(Boost_PROGRAM_OPTIONS_FOUND) target_link_libraries(TestMesh PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() else() - message( - STATUS - "NOTICE: Example TestMesh.cpp requires the CGAL_Core library (or LEDA) and will not be compiled." - ) + message(STATUS "NOTICE: The example TestMesh.cpp requires the CGAL_Core library (or LEDA) and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: Example TestMesh.cpp requires boost program_option and will not be compiled." - ) + message(STATUS "NOTICE: The example TestMesh.cpp requires boost program_option and will not be compiled.") endif() diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 2af41a74f0a..68f1f271083 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -50,6 +50,8 @@ endif() if(OpenMesh_FOUND) create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() find_package(METIS) @@ -57,10 +59,9 @@ include(CGAL_METIS_support) find_package(TBB) include(CGAL_TBB_support) - if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") target_link_libraries(collapse_small_edges_in_parallel PUBLIC CGAL::TBB_support CGAL::METIS_support) else() - message(STATUS "collapse_small_edges_in_parallel, which use the METIS and TBB libraries will not be compiled.") + message(STATUS "NOTICE: The example 'collapse_small_edges_in_parallel' uses the METIS and TBB libraries, and will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index e66903608e9..e809e5b742d 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -42,8 +42,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries( MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) endif() else() - message( - STATUS - "These programs require the Eigen library (3.2 or greater), and will not be compiled." - ) + message("NOTICE: These programs require the Eigen library (3.2 or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 91a2c82d39a..0c39993aed8 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -8,15 +8,11 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") target_link_libraries(MCF_Skeleton_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("skeleton_connectivity_test.cpp") target_link_libraries(skeleton_connectivity_test PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "These tests require the Eigen library (3.2 or greater), and will not be compiled." - ) + message("NOTICE: These tests require the Eigen library (3.2 or greater), and will not be compiled.") endif() diff --git a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt index aab8a082853..f5eb723ef7f 100644 --- a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt @@ -11,13 +11,11 @@ if(CGAL_ImageIO_FOUND) create_single_source_cgal_program("mesh_an_implicit_function.cpp") else() + if(RUNNING_CGAL_AUTO_TEST) # Just to avoid a warning from CMake if that variable is set on the command line... endif() - message( - STATUS - "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled." - ) + message("NOTICE: This project requires the CGAL and CGAL ImageIO libraries, and will not be compiled.") endif() diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index 380b7ff60d7..c74b11a60ad 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -44,6 +44,6 @@ create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_featu target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::TBB_support) endif() else() - message(STATUS "Some examples need the Eigen3 library, and will not be compiled.") + message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index d0928bb79ce..8febe2625c7 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -21,6 +21,10 @@ endif() find_package(Eigen3 3.1.0) include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: Applications require Eigen 3.1 (or greater), and will not be compiled") + return() +endif() # include for local directory include_directories(BEFORE include) diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index 47e4945c25b..a1c4160d2fb 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -18,8 +18,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Td_vs_T2_and_T3 PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/examples/Triangulation/CMakeLists.txt b/Triangulation/examples/Triangulation/CMakeLists.txt index 4a8d458026a..0574b70126e 100644 --- a/Triangulation/examples/Triangulation/CMakeLists.txt +++ b/Triangulation/examples/Triangulation/CMakeLists.txt @@ -5,10 +5,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Triangulation_Examples) if(CMAKE_COMPILER_IS_GNUCCX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - message( - STATUS - "NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled." - ) + message("NOTICE: Examples in this directory require a version of gcc >= 4.4, and will not be compiled.") return() endif() @@ -37,8 +34,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Examples in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/test/Triangulation/CMakeLists.txt b/Triangulation/test/Triangulation/CMakeLists.txt index 9f04381d282..292869eee6c 100644 --- a/Triangulation/test/Triangulation/CMakeLists.txt +++ b/Triangulation/test/Triangulation/CMakeLists.txt @@ -5,10 +5,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Triangulation_Tests) if(CMAKE_COMPILER_IS_GNUCCX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - message( - STATUS - "NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled." - ) + message("NOTICE: Examples in this directory require a version of gcc >= 4.4, and will not be compiled.") return() endif() @@ -31,8 +28,5 @@ if(TARGET CGAL::Eigen3_support) endforeach() else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Tests in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_2/examples/Triangulation_2/CMakeLists.txt b/Triangulation_2/examples/Triangulation_2/CMakeLists.txt index 179ea91a3e7..e4f5e7392ee 100644 --- a/Triangulation_2/examples/Triangulation_2/CMakeLists.txt +++ b/Triangulation_2/examples/Triangulation_2/CMakeLists.txt @@ -20,8 +20,5 @@ if(CGAL_Qt5_FOUND) target_link_libraries(draw_triangulation_2 PUBLIC CGAL::CGAL_Basic_viewer) target_link_libraries(star_conflict_zone PUBLIC CGAL::CGAL_Basic_viewer) else() - message( - STATUS - "NOTICE: Several examples require Qt and will not be compiled." - ) + message(STATUS "NOTICE: Several examples require Qt5 and will not be compiled.") endif() diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 512c39d52fa..15fc236f473 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -94,10 +94,7 @@ else(Qt5_FOUND) set(TRIANGULATION_3_MISSING_DEPS "Qt5, ${TRIANGULATION_3_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}, and will not be compiled.") endif( CGAL_Qt5_FOUND diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 3bc81426b94..f69ece8b238 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -25,6 +25,8 @@ create_single_source_cgal_program("simplex.cpp") create_single_source_cgal_program("draw_triangulation_3.cpp") if(CGAL_Qt5_FOUND) target_link_libraries(draw_triangulation_3 PUBLIC CGAL::CGAL_Basic_viewer) +else() + message(STATUS "NOTICE: The example 'draw_triangulation_3' requires Qt5, and will not be compiled.") endif() find_package(TBB QUIET) @@ -46,5 +48,5 @@ if(TARGET CGAL::TBB_support) PROPERTY RUN_SERIAL 1) endif() else() - message(STATUS "NOTICE: a few examples require TBB and will not be compiled.") + message(STATUS "NOTICE: A few examples require TBB, and will not be compiled.") endif() diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 20960afe639..19983c752f3 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -41,6 +41,8 @@ if(TARGET CGAL::TBB_support) execution___of__test_regular_insert_range_with_info PROPERTY RUN_SERIAL 1) endif() +else() + message(STATUS "NOTICE: The TBB library was not found. Some tests will not be available.") endif() if(BUILD_TESTING) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index 865b4681f0c..4312001ac0a 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -48,5 +48,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test( Triangulation_on_sphere_2_Demo ) else() - message(STATUS "NOTICE: This demo requires CGAL, Qt5 and OpenGL, and will not be compiled.") + message("NOTICE: This demo requires CGAL, Qt5, and Eigen, and will not be compiled.") endif() diff --git a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt index a9b9fba423d..36405ad2cb7 100644 --- a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt @@ -22,7 +22,5 @@ if ( CGAL_FOUND ) endif() else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - + message(STATUS "NOTICE: The Eigen library was not found. The test 'test_dtos_dual' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt index 7d6f692ba0d..3408ad984cb 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt @@ -17,4 +17,6 @@ endforeach() if(CGAL_Qt5_FOUND) target_link_libraries(draw_voronoi_diagram_2 PUBLIC CGAL::CGAL_Basic_viewer) +else() + message(STATUS "NOTICE: The Qt5 library was not found. The example 'draw_voronoi_diagram_2' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index c6a29500bef..052f1966487 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -16,8 +16,9 @@ create_single_source_cgal_program("vda_sdg.cpp") find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("vda_tos2.cpp") target_link_libraries(vda_tos2 PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The Eigen library was not found. The test 'vda_tos2' will not be available.") endif() diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 4521e9cc475..1ab1057ae14 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -20,5 +20,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") target_link_libraries(weighted_laplacian PUBLIC CGAL::Eigen3_support) else() - message(NOTICE "Several examples require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: The Eigen library was not found. The example 'weighted_laplacian' will not be compiled.") endif() From 4fc486b19586f0b7f5fe5c94a65afb64dfc31373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:19:11 +0200 Subject: [PATCH 009/426] Purge CMakeLists.txts from obsolete code / noise --- .../Algebraic_kernel_d/CMakeLists.txt | 1 - .../test/Algebraic_kernel_d/CMakeLists.txt | 15 ---------- .../Arrangement_on_surface_2/CMakeLists.txt | 3 -- BGL/examples/BGL_LCC/CMakeLists.txt | 17 ----------- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 29 ------------------- BGL/examples/BGL_graphcut/CMakeLists.txt | 19 ------------ BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 19 ------------ BGL/examples/BGL_surface_mesh/CMakeLists.txt | 2 -- BGL/test/BGL/CMakeLists.txt | 16 ---------- .../Barycentric_coordinates_2/CMakeLists.txt | 2 -- CGAL_Core/examples/Core/CMakeLists.txt | 21 +------------- .../examples/CGALimageIO/CMakeLists.txt | 16 +++------- .../examples/Classification/CMakeLists.txt | 9 ------ .../test/Classification/CMakeLists.txt | 9 ------ .../examples/Convex_hull_3/CMakeLists.txt | 20 ------------- .../test/Convex_hull_3/CMakeLists.txt | 8 ----- .../benchmark/Filtered_kernel/CMakeLists.txt | 2 -- .../test/Generalized_map/CMakeLists.txt | 11 ------- .../demo/Alpha_shapes_2/CMakeLists.txt | 4 +-- .../demo/Bounding_volumes/CMakeLists.txt | 3 -- .../demo/Circular_kernel_2/CMakeLists.txt | 3 -- GraphicsView/demo/Generator/CMakeLists.txt | 3 -- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 3 -- .../demo/Largest_empty_rect_2/CMakeLists.txt | 3 -- .../Periodic_2_triangulation_2/CMakeLists.txt | 3 -- GraphicsView/demo/Polygon/CMakeLists.txt | 3 -- .../Segment_Delaunay_graph_2/CMakeLists.txt | 3 -- .../CMakeLists.txt | 3 -- .../demo/Snap_rounding_2/CMakeLists.txt | 1 - .../demo/Spatial_searching_2/CMakeLists.txt | 3 -- .../demo/Stream_lines_2/CMakeLists.txt | 1 - Hash_map/benchmark/Hash_map/CMakeLists.txt | 19 ------------ .../examples/Heat_method_3/CMakeLists.txt | 15 ---------- .../test/Heat_method_3/CMakeLists.txt | 15 ---------- .../Hyperbolic_triangulation_2/CMakeLists.txt | 4 --- .../Linear_cell_complex_3/CMakeLists.txt | 7 ----- Mesh_3/examples/Mesh_3/CMakeLists.txt | 1 - .../test/Minkowski_sum_2/CMakeLists.txt | 7 ----- Number_types/test/Number_types/CMakeLists.txt | 7 +---- .../Optimal_bounding_box/CMakeLists.txt | 2 -- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 16 +--------- .../CMakeLists.txt | 4 --- .../examples/Point_set_3/CMakeLists.txt | 15 ---------- Point_set_3/test/Point_set_3/CMakeLists.txt | 19 ------------ .../Point_set_processing_3/CMakeLists.txt | 3 -- .../Polygon_mesh_processing/CMakeLists.txt | 21 +++----------- .../CMakeLists.txt | 17 ----------- .../CMakeLists.txt | 17 ----------- Polyhedron/demo/Polyhedron/CMakeLists.txt | 8 ----- .../Polyline_simplification_2/CMakeLists.txt | 20 ------------- .../examples/Property_map/CMakeLists.txt | 17 ----------- Property_map/test/Property_map/CMakeLists.txt | 23 --------------- Ridges_3/examples/Ridges_3/CMakeLists.txt | 1 - Ridges_3/test/Ridges_3/CMakeLists.txt | 1 - .../benchmark/copy_n_benchmark/CMakeLists.txt | 3 -- .../Segment_Delaunay_graph_2/CMakeLists.txt | 2 -- .../CMakeLists.txt | 2 -- .../Set_movable_separability_2/CMakeLists.txt | 10 ------- .../Set_movable_separability_2/CMakeLists.txt | 10 ------- .../Shape_regularization/CMakeLists.txt | 3 -- .../Spatial_searching/tools/CMakeLists.txt | 3 -- .../examples/Spatial_searching/CMakeLists.txt | 10 ------- .../benchmark/Spatial_sorting/CMakeLists.txt | 1 - .../benchmark/Stream_support/CMakeLists.txt | 19 ------------ Surface_mesh/benchmark/CMakeLists.txt | 2 -- .../Surface_mesh_approximation/CMakeLists.txt | 26 ----------------- .../Surface_mesh_approximation/CMakeLists.txt | 11 ------- .../Surface_mesh_approximation/CMakeLists.txt | 11 ------- .../optimal_rotation/CMakeLists.txt | 2 -- .../CMakeLists.txt | 1 - .../Surface_mesh_segmentation/CMakeLists.txt | 18 ------------ .../CMakeLists.txt | 12 -------- .../CMakeLists.txt | 19 ------------ .../examples/Surface_sweep_2/CMakeLists.txt | 19 ------------ .../Tetrahedral_remeshing/CMakeLists.txt | 8 ----- .../applications/Triangulation/CMakeLists.txt | 17 ----------- .../benchmark/Triangulation/CMakeLists.txt | 3 -- .../benchmark/Triangulation_3/CMakeLists.txt | 22 -------------- .../Triangulation_on_sphere_2/CMakeLists.txt | 1 - .../Triangulation_on_sphere_2/CMakeLists.txt | 18 ++++-------- .../test/Voronoi_diagram_2/CMakeLists.txt | 4 +-- Weights/examples/Weights/CMakeLists.txt | 5 +--- Weights/test/Weights/CMakeLists.txt | 5 +--- 83 files changed, 20 insertions(+), 761 deletions(-) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index 841c0b28d95..fca83423fa4 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -7,7 +7,6 @@ find_package(MPFI QUIET) if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) include(${MPFI_USE_FILE}) - include(CGAL_VersionUtils) create_single_source_cgal_program("Compare_1.cpp") create_single_source_cgal_program("Construct_algebraic_real_1.cpp") create_single_source_cgal_program("Isolate_1.cpp") diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 1a16e619149..aafb87f5217 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -14,24 +14,9 @@ if(RS3_FOUND) include(${RS3_USE_FILE}) endif() -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - # include for local directory include_directories(BEFORE include) -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("cyclic.cpp") create_single_source_cgal_program("Descartes.cpp") diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 35940772325..8574cef2a18 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -124,9 +124,6 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) else() set(MISSING_DEPS "") - if(NOT CGAL_FOUND) - set(MISSING_DEPS "CGAL, ${MISSING_DEPS}") - endif() if(NOT CGAL_Qt5_FOUND) set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}") endif() diff --git a/BGL/examples/BGL_LCC/CMakeLists.txt b/BGL/examples/BGL_LCC/CMakeLists.txt index 9264e681521..f9230373e23 100644 --- a/BGL/examples/BGL_LCC/CMakeLists.txt +++ b/BGL/examples/BGL_LCC/CMakeLists.txt @@ -7,23 +7,6 @@ project(BGL_LCC_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# Creating entries for all C++ files with "main" routine -# ########################################################## - # create a target per cppfile file( GLOB_RECURSE cppfiles diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index 19ade1e416b..45babdf9fed 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -7,38 +7,9 @@ project(BGL_OpenMesh_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(OpenMesh QUIET) - if(OpenMesh_FOUND) include(UseOpenMesh) -else() - - message( - STATUS "NOTICE: These examples require OpenMesh and will not be compiled.") - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - -if(OpenMesh_FOUND) create_single_source_cgal_program("TriMesh.cpp") target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/BGL/examples/BGL_graphcut/CMakeLists.txt b/BGL/examples/BGL_graphcut/CMakeLists.txt index c9385bee6d9..dc8be80ed63 100644 --- a/BGL/examples/BGL_graphcut/CMakeLists.txt +++ b/BGL/examples/BGL_graphcut/CMakeLists.txt @@ -8,25 +8,6 @@ project(BGL_graphcut_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("alpha_expansion_example.cpp") create_single_source_cgal_program( "face_selection_borders_regularization_example.cpp") diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index f898cb277fa..5a541371584 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -7,25 +7,6 @@ project(BGL_polyhedron_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("distance.cpp") create_single_source_cgal_program("incident_vertices.cpp") create_single_source_cgal_program("kruskal.cpp") diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index e53938277bb..1056de28413 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -3,8 +3,6 @@ project(BGL_surface_mesh_Examples) find_package(CGAL REQUIRED) -# include for local package - create_single_source_cgal_program("prim.cpp") create_single_source_cgal_program("gwdwg.cpp") create_single_source_cgal_program("seam_mesh.cpp") diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index f695c456d7d..30b6aaf28d0 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -7,15 +7,6 @@ project(BGL_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -24,17 +15,10 @@ if(OpenMesh_FOUND) else() message(STATUS "Tests that use OpenMesh will not be compiled.") endif() - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - if(OpenMesh_FOUND) create_single_source_cgal_program("graph_concept_OpenMesh.cpp") target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) endif() - create_single_source_cgal_program("test_split.cpp") create_single_source_cgal_program("next.cpp") create_single_source_cgal_program("test_circulator.cpp") diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index 9aa881ce12f..c7341df3d11 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -6,8 +6,6 @@ project(Barycentric_coordinates_2_Benchmarks) cmake_minimum_required(VERSION 3.1...3.23) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include(CGAL_CreateSingleSourceCGALProgram) create_single_source_cgal_program("benchmark_segment_coordinates.cpp") create_single_source_cgal_program("benchmark_triangle_coordinates.cpp") diff --git a/CGAL_Core/examples/Core/CMakeLists.txt b/CGAL_Core/examples/Core/CMakeLists.txt index 77eaec4e81c..d4513e22dea 100644 --- a/CGAL_Core/examples/Core/CMakeLists.txt +++ b/CGAL_Core/examples/Core/CMakeLists.txt @@ -5,27 +5,8 @@ project(Core_Examples) find_package(CGAL REQUIRED COMPONENTS Core) if(NOT CGAL_Core_FOUND) - - message( - STATUS - "This project requires the CGAL_Core library, and will not be compiled.") + message("NOTICE: This project requires the CGAL_Core library, and will not be compiled.") return() - endif() -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("delaunay.cpp") diff --git a/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt b/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt index a5d95b3fd05..a9e95aef718 100644 --- a/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt +++ b/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt @@ -6,15 +6,7 @@ project(CGALimageIO_Examples) find_package(CGAL REQUIRED COMPONENTS ImageIO) -if(CGAL_ImageIO_FOUND) - - create_single_source_cgal_program("convert_raw_image_to_inr.cpp") - create_single_source_cgal_program("test_imageio.cpp") - create_single_source_cgal_program("extract_a_sub_image.cpp") - create_single_source_cgal_program("slice_image.cpp") -else() - message( - STATUS - "NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled." - ) -endif() +create_single_source_cgal_program("convert_raw_image_to_inr.cpp") +create_single_source_cgal_program("test_imageio.cpp") +create_single_source_cgal_program("extract_a_sub_image.cpp") +create_single_source_cgal_program("slice_image.cpp") diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 2af17775b7c..83cc5c6149d 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -7,15 +7,6 @@ project(Classification_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 63ba324644c..d785190f8cb 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -7,15 +7,6 @@ project(Classification_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 097eb885bd6..55bc102f967 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -7,18 +7,6 @@ project(Convex_hull_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -26,14 +14,6 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp") create_single_source_cgal_program("dynamic_hull_3.cpp") create_single_source_cgal_program("dynamic_hull_LCC_3.cpp") diff --git a/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt index 27325c0a8c7..3a728d3500a 100644 --- a/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt @@ -6,14 +6,6 @@ project(Convex_hull_3_Tests) find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - include_directories(BEFORE "include") # create a target per cppfile diff --git a/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt b/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt index 50d11049a6b..b894f739229 100644 --- a/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt +++ b/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt @@ -8,8 +8,6 @@ add_executable(bench_simple_comparisons bench_simple_comparisons.cpp) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - add_executable(bench_orientation_3 "orientation_3.cpp") target_link_libraries(bench_orientation_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) diff --git a/Generalized_map/test/Generalized_map/CMakeLists.txt b/Generalized_map/test/Generalized_map/CMakeLists.txt index d712bb061dc..4cebd95827c 100644 --- a/Generalized_map/test/Generalized_map/CMakeLists.txt +++ b/Generalized_map/test/Generalized_map/CMakeLists.txt @@ -7,17 +7,6 @@ project(Generalized_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() set(hfiles Generalized_map_2_test.h Generalized_map_3_test.h Generalized_map_4_test.h GMap_test_insertions.h) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 0b8741ef5d2..ca4a58c5958 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -22,9 +22,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The "Delaunay" demo: Alpha_shapes_2 - #-------------------------------- + # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Alpha_shapes_2.ui) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 8eba3017587..69a30838cea 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -24,9 +24,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) - #---------------------------------------------- - # The "Bounding volumes" demo: Bounding_volumes - #---------------------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Bounding_volumes.ui) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 9b0fbd66a4a..eb2e2b79011 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -22,9 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The demo: Circular_kernel_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Circular_kernel_2.ui) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index b9644157f9e..3be28ec735d 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -22,9 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # Demo: Generator_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Generator_2.ui) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 3345c6df337..432cb655369 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -24,9 +24,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES L1_voronoi_diagram_2.ui) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index ff7f9dc4b71..a6de2468c40 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -23,9 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # Demo: Largest_empty_rectangle_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Largest_empty_rectangle_2.ui) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 993391e843a..2f964941bb0 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -21,9 +21,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The "2D Periodic triangulation" demo: Periodic_2_triangulation_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Periodic_2_triangulation_2.ui) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index fc0a5e8cda2..5aa21d3880b 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -33,9 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DCGAL_USE_CORE) endif() - #-------------------------------- - # Demo: Polygon_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Polygon_2.ui) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 2615db48f37..745fbb09ed0 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -29,9 +29,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) add_definitions(-DQT_NO_KEYWORDS) - #-------------------------------- - # The "Segment Voronoi" demo: Segment_voronoi_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(CDT_UI_FILES Segment_voronoi_2.ui) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 5f80bc0a62e..f1d5e4fbbd4 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -28,9 +28,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) add_definitions(-DQT_NO_KEYWORDS) - #-------------------------------- - # The "Segment Voronoi Linf" demo: Segment_voronoi_linf_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(CDT_UI_FILES Segment_voronoi_2.ui) diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 34af3f712aa..0b7ebdeb6d8 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -22,7 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Snap_rounding_2.ui) diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index a67f0aa90d8..f5d5aad6d14 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -23,9 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # Demo: Spatial_searching_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Spatial_searching_2.ui) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index e45c19bc07a..0067351b4e1 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -23,7 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Stream_lines_2.ui) diff --git a/Hash_map/benchmark/Hash_map/CMakeLists.txt b/Hash_map/benchmark/Hash_map/CMakeLists.txt index 0d2e366b101..6aaaab62124 100644 --- a/Hash_map/benchmark/Hash_map/CMakeLists.txt +++ b/Hash_map/benchmark/Hash_map/CMakeLists.txt @@ -7,25 +7,6 @@ project(Hash_map) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("hm.cpp") create_single_source_cgal_program("foreach.cpp") create_single_source_cgal_program("triangulation.cpp") diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index 5d52ae0861b..fc6be4f65ec 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -7,18 +7,6 @@ project(Heat_method_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) @@ -29,9 +17,6 @@ endif() # include for local directory include_directories(BEFORE include) -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("heat_method.cpp") target_link_libraries(heat_method PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_polyhedron.cpp") diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index b248cc08734..f57897dc07b 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -7,18 +7,6 @@ project(Heat_method_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) @@ -29,9 +17,6 @@ endif() # include for local directory include_directories(BEFORE include) -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("heat_method_concept.cpp") target_link_libraries(heat_method_concept PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_test.cpp") diff --git a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt index 8c5ab3d473f..bb1b77b196f 100644 --- a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt @@ -6,8 +6,4 @@ project(Hyperbolic_triangulation_2_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -include(CGAL_CreateSingleSourceCGALProgram) - create_single_source_cgal_program("bench_insertion_with_different_kernels.cpp") diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt index bc7fb931661..4b65e2ee3c5 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt @@ -8,13 +8,6 @@ endif() find_package(CGAL REQUIRED) -find_package(Boost 1.43.0) -if(Boost_FOUND) - include_directories(${Boost_INCLUDE_DIRS}) -else() - set(USE_IN_SOURCE_TREE_BOOST true) -endif() - add_subdirectory(openvolumemesh) include_directories(BEFORE openvolumemesh/src) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 1044f4486a7..335e98aa0de 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -9,7 +9,6 @@ if(CGAL_MESH_3_VERBOSE) endif() find_package(CGAL REQUIRED COMPONENTS ImageIO) -find_package(Boost) option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) diff --git a/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt b/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt index 723acfc1282..be75477e286 100644 --- a/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt +++ b/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt @@ -4,13 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Minkowski_sum_2_Tests) -# Commented out C++11 for now -# list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -# if (has_cpp11 LESS 0) -# message(STATUS "NOTICE: These examples requires a C++11 compiler and will not be compiled.") -# return() -# endif() - find_package(CGAL REQUIRED COMPONENTS Core) # create a target per cppfile diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index b26ca0fe97a..a637db06486 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -8,8 +8,6 @@ project(Number_types_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -include(CGAL_VersionUtils) - include_directories(BEFORE include) create_single_source_cgal_program("bench_interval.cpp") @@ -86,11 +84,8 @@ if(NOT CGAL_DISABLE_GMP) else()#NOT CGAL_DISABLE_GMP message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") endif()#NOT CGAL_DISABLE_GMP + # all the programs below will be linked against MPFI in case it is present create_single_source_cgal_program("Quotient_new.cpp") create_single_source_cgal_program("test_nt_Coercion_traits.cpp") - -find_package(Boost) -if(Boost_FOUND) create_single_source_cgal_program("to_interval_test_boost.cpp") -endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index cb165f79427..8ad70c5f829 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,8 +7,6 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) -# include helper file -include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 61362c53923..05c83888820 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -7,29 +7,15 @@ project(Periodic_3_mesh_3_Examples) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS ImageIO) -# include for local package # Use Eigen find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("mesh_implicit_shape.cpp") create_single_source_cgal_program("mesh_implicit_multi_domain.cpp") create_single_source_cgal_program("mesh_implicit_shape_with_subdomains.cpp") diff --git a/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 02ee6e0849a..e83a7c4a836 100644 --- a/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -6,10 +6,6 @@ project(Periodic_4_hyperbolic_triangulation_2_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -include(CGAL_CreateSingleSourceCGALProgram) - create_single_source_cgal_program("bench_p4ht2_hyperbolic_vs_euclidean.cpp") create_single_source_cgal_program("bench_p4ht2_insertion.cpp") create_single_source_cgal_program("bench_p4ht2_remove_dummy_points.cpp") diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index f7600b60857..1ba5c604bab 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -7,21 +7,6 @@ project(Point_set_3_Examples) # CGAL and its components find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("point_set.cpp") create_single_source_cgal_program("point_set_property.cpp") create_single_source_cgal_program("point_set_read_xyz.cpp") diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index b7496eb6d5e..970ffd456f5 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -7,25 +7,6 @@ project(Point_set_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("point_set_test.cpp") create_single_source_cgal_program("point_set_test_join.cpp") create_single_source_cgal_program("test_deprecated_io_ps.cpp") diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 52c6df32af0..b96bd07f0d9 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -19,9 +19,6 @@ if (MSVC) message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" ) endif() -# Temporary debugging stuff -ADD_DEFINITIONS( "-DDEBUG_TRACE" ) - find_package( TBB QUIET ) include(CGAL_TBB_support) diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index ccd26052b98..22a07946a15 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -7,26 +7,13 @@ project(Polygon_mesh_processing) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - +find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: Benchmarks require Eigen 3.2 (or greater), and will not be compiled") return() endif() -# include for local directory - -# include for local package -find_package(Eigen3 REQUIRED 3.2.0) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - set(FAST_ENVELOPE_BUILD_DIR "" CACHE PATH "Path to fast-evelope build directory") if (FAST_ENVELOPE_BUILD_DIR) message(STATUS "Using ${FAST_ENVELOPE_BUILD_DIR} as build directory of fast-evelope") diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 6f14f6590fb..e3b460139a0 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,23 +8,6 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS - "NOTICE: This project requires the Boost library, and will not be compiled." - ) - - return() - -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 4d3142d9b4d..b4984c15043 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,23 +8,6 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS - "NOTICE: This project requires the Boost library, and will not be compiled." - ) - - return() - -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index b66e739024b..e560e6b44f0 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -8,14 +8,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: This demo requires a C++11 compiler and will not be compiled.") - return() -endif() - #Defines flags to emulate windows behavior for linking error generation if(CMAKE_CXX_COMPILER_ID EQUAL Clang OR CMAKE_COMPILER_IS_GNUCC diff --git a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt index 4be14be6b2a..954afd626ab 100644 --- a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt @@ -7,26 +7,6 @@ project(Polyline_simplification_2_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program( "issue-5774.cpp" ) create_single_source_cgal_program( "simplify_polygon_test.cpp" ) - create_single_source_cgal_program( "simplify_polyline_with_duplicate_points.cpp" ) diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index e1f2e269e23..771f98f63ed 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -4,23 +4,6 @@ project(Property_map_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("dynamic_properties.cpp") find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index fe00b2bf83a..cc6b86f23d7 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -4,18 +4,6 @@ project(Property_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -24,20 +12,9 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("test_property_map.cpp") - create_single_source_cgal_program("dynamic_property_map.cpp") - create_single_source_cgal_program("dynamic_properties_test.cpp") - create_single_source_cgal_program("kernel_converter_properties_test.cpp") if(OpenMesh_FOUND) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index c8e1f4d9e83..2c8200b2bed 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -4,7 +4,6 @@ project(Ridges_3_Examples) find_package(CGAL REQUIRED) -# use either Eigen find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index 73fcc4e7f89..4ec3de72518 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -6,7 +6,6 @@ project(Ridges_3_Tests) find_package(CGAL REQUIRED) -# use either Eigen find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt b/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt index 34e2b2e9691..f84da4862f9 100644 --- a/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt +++ b/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt @@ -6,8 +6,5 @@ project(copy_n_benchmark_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - create_single_source_cgal_program("copy_n_benchmark.cpp") - create_single_source_cgal_program("copy_n_use_case_benchmark.cpp") diff --git a/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt b/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt index 016a4545fc0..c46aa5c84de 100644 --- a/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt @@ -6,8 +6,6 @@ project(Segment_Delaunay_graph_2_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - create_single_source_cgal_program("benchmark.cpp") create_single_source_cgal_program("benchmark_nox.cpp") create_single_source_cgal_program("double.cpp") diff --git a/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 4d6aa5dae0a..806bec1f95d 100644 --- a/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -6,8 +6,6 @@ project(Segment_Delaunay_graph_2_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - create_single_source_cgal_program("sdg-creation-time.cpp") create_single_source_cgal_program("benchmark-gen.cpp") create_single_source_cgal_program("incirc.cpp") diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt index a679f950cba..7ee0eaa3b49 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt @@ -4,16 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Set_movable_separability_2_Examples) -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: These examples requires a C++11 compiler and will not be compiled." - ) - return() -endif() - - find_package(CGAL REQUIRED) create_single_source_cgal_program("top_edges_single_mold_trans_cast.cpp") diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index 3a9a7471fa9..ce108acd83c 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -11,16 +11,6 @@ if(CGAL_DIR) # Just to avoid a warning from CMake when that variable is set on the command line... endif() -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: These examples requires a C++11 compiler and will not be compiled." - ) - return() -endif() - - find_package(CGAL REQUIRED) create_single_source_cgal_program("test_top_edges_single_mold_trans_cast.cpp") diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 84e8e1a509a..9de592b8f8a 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -7,9 +7,6 @@ cmake_minimum_required(VERSION 3.1...3.23) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include(CGAL_CreateSingleSourceCGALProgram) - # Find OSQP library and headers. find_package(OSQP QUIET) include(CGAL_OSQP_support) diff --git a/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt index 3d751e686bd..20d5ad1bb2d 100644 --- a/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt @@ -6,7 +6,4 @@ project(tools_) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include_directories(BEFORE "../include") - create_single_source_cgal_program("points_in_bbox.cpp") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 374ff11054d..5dc1eab0dcd 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -7,21 +7,11 @@ project(Spatial_searching_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - if(MSVC) # Turn off VC++ warning set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244") endif() -# include for local directory - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("circular_query.cpp") create_single_source_cgal_program("distance_browsing.cpp") create_single_source_cgal_program("iso_rectangle_2_query.cpp") diff --git a/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt index 69fb787285b..9cd0fbfc6ba 100644 --- a/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt @@ -6,5 +6,4 @@ project(Spatial_sorting_) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) create_single_source_cgal_program("simple.cpp") diff --git a/Stream_support/benchmark/Stream_support/CMakeLists.txt b/Stream_support/benchmark/Stream_support/CMakeLists.txt index 1a060090fb6..8d03f6b673a 100644 --- a/Stream_support/benchmark/Stream_support/CMakeLists.txt +++ b/Stream_support/benchmark/Stream_support/CMakeLists.txt @@ -7,24 +7,5 @@ project(Stream_support) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("read_doubles.cpp") create_single_source_cgal_program("read_points.cpp") diff --git a/Surface_mesh/benchmark/CMakeLists.txt b/Surface_mesh/benchmark/CMakeLists.txt index 31f48865d7f..841e9b4bea9 100644 --- a/Surface_mesh/benchmark/CMakeLists.txt +++ b/Surface_mesh/benchmark/CMakeLists.txt @@ -3,8 +3,6 @@ project(Surface_mesh_performance) find_package(CGAL REQUIRED) -include_directories(BEFORE "../include") - # For profilling with gprof #add_definitions("-pg") #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") diff --git a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt index 70482a41b01..a4eea6abf69 100644 --- a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt @@ -7,31 +7,5 @@ project(Surface_mesh_approximation_Benchmarks) # CGAL and its components find_package(CGAL REQUIRED) -# include helper file -include(${CGAL_USE_FILE}) - -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package -include_directories(BEFORE ../../include) - -# Creating entries for all C++ files with "main" routine -# ########################################################## - -include(CGAL_CreateSingleSourceCGALProgram) - create_single_source_cgal_program("vsa_autoinit_timing_benchmark.cpp") - create_single_source_cgal_program("vsa_timing_benchmark.cpp") diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index a76d0e049f7..1d5b7047fd7 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -7,14 +7,6 @@ project(Surface_mesh_approximation_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost -find_package(Boost) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - # Use Eigen (for PCA) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) @@ -23,9 +15,6 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("vsa_approximation_2_example.cpp") target_link_libraries(vsa_approximation_2_example PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index cb8582389d6..ab1ca32384a 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -7,14 +7,6 @@ project(Surface_mesh_approximation_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost -find_package(Boost) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - # Use Eigen (for PCA) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) @@ -23,9 +15,6 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("vsa_class_interface_test.cpp") target_link_libraries(vsa_class_interface_test PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index ca4ca2ffd1e..6e3106ff9f4 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -3,8 +3,6 @@ project(benchmark_for_closest_rotation) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index d4c54e35640..b09f63d1cd8 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Surface_mesh_parameterization_Examples) -# Find CGAL find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index b0802132a2e..17af23300b8 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -7,18 +7,6 @@ project(Surface_mesh_segmentation_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -26,12 +14,6 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("sdf_values_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_example.cpp") create_single_source_cgal_program("segmentation_via_sdf_values_example.cpp") diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 68f1f271083..df746cdc92c 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -7,14 +7,6 @@ project(Surface_mesh_simplification_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -22,10 +14,6 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("edge_collapse_envelope.cpp") create_single_source_cgal_program("edge_collapse_constrain_sharp_edges.cpp") create_single_source_cgal_program("edge_collapse_constrained_border_polyhedron.cpp") diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 0eb517e341d..061db68f7e1 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -4,28 +4,9 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Mean_curvature_skeleton) -#SET(CMAKE_BUILD_TYPE "Debug") -#SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage") -#SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" ) - # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) diff --git a/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt b/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt index c7cba6d622b..37472e6b921 100644 --- a/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt +++ b/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt @@ -7,23 +7,4 @@ project(Surface_sweep_2_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("plane_sweep.cpp") diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index c74b11a60ad..b94703841f1 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -8,14 +8,6 @@ project(Tetrahedral_remeshing_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - # Use Eigen for Mesh_3 find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 8febe2625c7..2b0d8c131ed 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -7,18 +7,6 @@ project(Triangulation_apps) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(Eigen3 3.1.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) @@ -29,11 +17,6 @@ endif() # include for local directory include_directories(BEFORE include) -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("points_to_RT_to_off.cpp") target_link_libraries(points_to_RT_to_off PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("points_to_DT_to_off.cpp") diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index a1c4160d2fb..b47bea021e1 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -6,8 +6,6 @@ project(Triangulation_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - find_package(Eigen3 3.1.0) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) @@ -16,7 +14,6 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(delaunay PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("Td_vs_T2_and_T3.cpp") target_link_libraries(Td_vs_T2_and_T3 PUBLIC CGAL::Eigen3_support) - else() message("NOTICE: Executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt index 6d9dd5907d5..8a207c2b79f 100644 --- a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt @@ -8,31 +8,9 @@ project(Triangulation_3) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("incident_edges.cpp") - create_single_source_cgal_program("simple_2.cpp") - create_single_source_cgal_program("simple.cpp") - create_single_source_cgal_program("Triangulation_benchmark_3.cpp") create_single_source_cgal_program( "segment_traverser_benchmark.cpp" ) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index 4312001ac0a..f99b2a133d0 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -20,7 +20,6 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() - # Find CGAL and CGAL Qt5 find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt index a1c1d31478d..3d3d7367f53 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt @@ -4,16 +4,8 @@ project( Triangulation_on_sphere_2_Examples ) find_package(CGAL REQUIRED COMPONENTS Core) -if ( CGAL_FOUND ) - - create_single_source_cgal_program( "triang_on_sphere.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_range.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_exact.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_proj.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_geo.cpp" ) - -else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - -endif() +create_single_source_cgal_program( "triang_on_sphere.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_range.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_exact.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_proj.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_geo.cpp" ) diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index 052f1966487..9172b01d64d 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -1,7 +1,5 @@ -# Created by the script cgal_create_cmake_script -# This is the CMake script for compiling a CGAL application. - cmake_minimum_required(VERSION 3.1...3.23) + project(Voronoi_diagram_2_Tests) find_package(CGAL REQUIRED) diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 1ab1057ae14..1ccd0cf4364 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -1,10 +1,7 @@ -# Created by the script cgal_create_cmake_script. -# This is the CMake script for compiling a CGAL application. +cmake_minimum_required(VERSION 3.1...3.23) project(Weights_Examples) -cmake_minimum_required(VERSION 3.1...3.23) - find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("weights.cpp") diff --git a/Weights/test/Weights/CMakeLists.txt b/Weights/test/Weights/CMakeLists.txt index 81a9c9eb367..38fb9e881a3 100644 --- a/Weights/test/Weights/CMakeLists.txt +++ b/Weights/test/Weights/CMakeLists.txt @@ -1,10 +1,7 @@ -# Created by the script cgal_create_cmake_script. -# This is the CMake script for compiling a CGAL application. +cmake_minimum_required(VERSION 3.1...3.23) project(Weights_Tests) -cmake_minimum_required(VERSION 3.1...3.23) - find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("test_uniform_weights.cpp") From 9b265fddf83a7ff4f714935aed6f2e9c36e584c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:24:27 +0200 Subject: [PATCH 010/426] Uniformize REQUIRED / QUIET usage: Following this: - CGAL: always REQUIRED - CGAL component: COMPONENT / OPTIONAL_COMPONENT (never QUIET) - required 3rd party: (not QUIET) + message(NOTICE "") on NOT_FOUND - optional 3rd party: QUIET + message(STATUS "") except for Polyhedron/demo - 3rd party components: COMPONENT / OPTIONAL_COMPONENT (QUIET depending on required or optional 3rd party) --- AABB_tree/benchmark/AABB_tree/CMakeLists.txt | 10 +- .../Algebraic_kernel_d/CMakeLists.txt | 3 +- .../test/Arithmetic_kernel/CMakeLists.txt | 4 +- .../Arrangement_on_surface_2/CMakeLists.txt | 10 +- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 2 +- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 17 +- BGL/examples/BGL_surface_mesh/CMakeLists.txt | 8 +- BGL/test/BGL/CMakeLists.txt | 21 +- .../test/Box_intersection_d/CMakeLists.txt | 5 +- .../examples/Classification/CMakeLists.txt | 32 +-- .../test/Classification/CMakeLists.txt | 8 +- .../test/Combinatorial_map/CMakeLists.txt | 4 + .../examples/Cone_spanners_2/CMakeLists.txt | 2 +- .../test/Cone_spanners_2/CMakeLists.txt | 28 +-- .../examples/Convex_hull_3/CMakeLists.txt | 13 +- .../create_and_use_a_cmakelist.txt | 2 +- Generator/benchmark/Generator/CMakeLists.txt | 23 +- Generator/examples/Generator/CMakeLists.txt | 47 ++-- Generator/test/Generator/CMakeLists.txt | 32 ++- .../Hyperbolic_triangulation_2/CMakeLists.txt | 2 +- Kernel_23/benchmark/Kernel_23/CMakeLists.txt | 7 +- Mesh_3/benchmark/Mesh_3/CMakeLists.txt | 33 +-- Mesh_3/test/Mesh_3/CMakeLists.txt | 235 +++++++++--------- .../Optimal_bounding_box/CMakeLists.txt | 3 +- .../Optimal_bounding_box/CMakeLists.txt | 2 +- .../test/Optimal_bounding_box/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- Orthtree/benchmark/Orthtree/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 38 ++- Orthtree/test/Orthtree/CMakeLists.txt | 2 +- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 5 +- .../test/Periodic_3_mesh_3/CMakeLists.txt | 2 +- .../CMakeLists.txt | 7 +- .../CMakeLists.txt | 7 +- .../examples/Point_set_3/CMakeLists.txt | 4 +- Point_set_3/test/Point_set_3/CMakeLists.txt | 2 +- .../Point_set_processing_3/CMakeLists.txt | 6 +- .../Point_set_processing_3/CMakeLists.txt | 11 +- .../CMakeLists.txt | 33 +-- .../Polygon_mesh_processing/CMakeLists.txt | 10 +- .../Polygon_mesh_processing/CMakeLists.txt | 154 +++++------- .../Polygon_mesh_processing/CMakeLists.txt | 79 +++--- .../CMakeLists.txt | 4 +- Polyhedron/demo/Polyhedron/CMakeLists.txt | 6 +- .../Plugins/Classification/CMakeLists.txt | 2 +- .../demo/Polyhedron/Plugins/IO/CMakeLists.txt | 2 +- .../Plugins/Point_set/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 3 +- Property_map/test/Property_map/CMakeLists.txt | 14 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 3 +- SMDS_3/examples/SMDS_3/CMakeLists.txt | 9 +- SMDS_3/test/SMDS_3/CMakeLists.txt | 46 ++-- .../test/STL_Extension/CMakeLists.txt | 15 +- .../CMakeLists.txt | 2 +- .../benchmark/Shape_detection/CMakeLists.txt | 20 +- .../test/Shape_detection/CMakeLists.txt | 2 +- .../examples/Skin_surface_3/CMakeLists.txt | 4 +- .../Spatial_searching/CMakeLists.txt | 12 +- .../examples/Spatial_searching/CMakeLists.txt | 2 + .../Surface_mesh_approximation/CMakeLists.txt | 2 +- .../Surface_mesh_approximation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_segmentation/CMakeLists.txt | 17 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 4 +- .../CMakeLists.txt | 13 +- .../CMakeLists.txt | 18 +- .../CMakeLists.txt | 15 +- .../CMakeLists.txt | 2 +- .../Surface_mesh_topology/CMakeLists.txt | 2 +- .../Tetrahedral_remeshing/CMakeLists.txt | 24 +- .../test/Tetrahedral_remeshing/CMakeLists.txt | 45 ++-- .../benchmark/Triangulation_3/CMakeLists.txt | 40 +-- .../Triangulation_on_sphere_2/CMakeLists.txt | 16 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 2 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 27 +- .../examples/Voronoi_diagram_2/CMakeLists.txt | 2 +- .../test/Voronoi_diagram_2/CMakeLists.txt | 2 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 80 files changed, 577 insertions(+), 731 deletions(-) diff --git a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt index 3a314302b01..b6ae8fdc0e2 100644 --- a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt +++ b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt @@ -6,14 +6,14 @@ project(AABB_traits_benchmark) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) -# google benchmark -find_package(benchmark) +create_single_source_cgal_program("test.cpp") +create_single_source_cgal_program("tree_construction.cpp") -if (benchmark_FOUND) +# google benchmark +find_package(benchmark QUIET) +if(benchmark_FOUND) create_single_source_cgal_program("tree_creation.cpp") target_link_libraries(tree_creation benchmark::benchmark) else() message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.") endif() -create_single_source_cgal_program("test.cpp") -create_single_source_cgal_program("tree_construction.cpp") diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index fca83423fa4..c1fd8d009f6 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -3,8 +3,7 @@ project(Algebraic_kernel_d_Examples) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(MPFI QUIET) - +find_package(MPFI) if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) include(${MPFI_USE_FILE}) create_single_source_cgal_program("Compare_1.cpp") diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index cb56ac2bc55..08d054ea54c 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -6,7 +6,7 @@ project(Arithmetic_kernel_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(GMP QUIET) +find_package(GMP) if(GMP_FOUND) @@ -18,7 +18,7 @@ if(GMP_FOUND) include_directories(include) - find_package(MPFI) + find_package(MPFI QUIET) if(MPFI_FOUND) include(${MPFI_USE_FILE}) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 8574cef2a18..82e33197dae 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -12,10 +12,10 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -find_package(CGAL QUIET COMPONENTS Qt5 OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5) find_package(Qt5 QUIET COMPONENTS Gui Widgets) -if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) +if (CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) add_compile_definitions(QT_NO_KEYWORDS) include_directories( BEFORE ./ ) @@ -110,10 +110,10 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - target_link_libraries(arrangement_2 Qt5::Core Qt5::Gui Qt5::Widgets) - target_link_libraries(arrangement_2 CGAL::CGAL CGAL::CGAL_Qt5) + target_link_libraries(arrangement_2 PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets) + target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5) if(CGAL_Core_FOUND) - target_link_libraries(arrangement_2 CGAL::CGAL_Core) + target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL_Core) endif() add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2) diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index 45babdf9fed..aa4e0e208f2 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -7,7 +7,7 @@ project(BGL_OpenMesh_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) +find_package(OpenMesh) if(OpenMesh_FOUND) include(UseOpenMesh) create_single_source_cgal_program("TriMesh.cpp") diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 5a541371584..31f3a4f2d51 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -15,21 +15,20 @@ create_single_source_cgal_program("normals.cpp") create_single_source_cgal_program("range.cpp") create_single_source_cgal_program("transform_iterator.cpp") -create_single_source_cgal_program("copy_polyhedron.cpp") - -find_package( OpenMesh QUIET ) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) - target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH ) + create_single_source_cgal_program("copy_polyhedron.cpp") + target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) + target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) else() message(STATUS "NOTICE: The example 'copy_polyhedron' requires OpenMesh, and will not be compiled.") endif() -find_package( METIS ) +find_package(METIS QUIET) include(CGAL_METIS_support) -if( TARGET CGAL::METIS_support ) - create_single_source_cgal_program( "polyhedron_partition.cpp" ) - target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support) +if(TARGET CGAL::METIS_support) + create_single_source_cgal_program("polyhedron_partition.cpp") + target_link_libraries(polyhedron_partition PUBLIC CGAL::METIS_support) else() message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.") endif() diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index 1056de28413..551484979a1 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -10,11 +10,11 @@ create_single_source_cgal_program("write_inp.cpp") create_single_source_cgal_program("surface_mesh_dual.cpp") create_single_source_cgal_program("connected_components.cpp") -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) -if( TARGET CGAL::METIS_support ) - create_single_source_cgal_program( "surface_mesh_partition.cpp" ) - target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support ) +if(TARGET CGAL::METIS_support) + create_single_source_cgal_program("surface_mesh_partition.cpp") + target_link_libraries(surface_mesh_partition PUBLIC CGAL::METIS_support) else() message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 30b6aaf28d0..3f81213dd21 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -7,18 +7,6 @@ project(BGL_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Tests that use OpenMesh will not be compiled.") -endif() -if(OpenMesh_FOUND) - create_single_source_cgal_program("graph_concept_OpenMesh.cpp") - target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) -endif() create_single_source_cgal_program("test_split.cpp") create_single_source_cgal_program("next.cpp") create_single_source_cgal_program("test_circulator.cpp") @@ -52,7 +40,11 @@ create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_fa create_single_source_cgal_program("graph_traits_inheritance.cpp" ) create_single_source_cgal_program("test_deprecated_io.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) + add_definitions(-DCGAL_USE_OPENMESH) + target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) @@ -67,6 +59,11 @@ if(OpenMesh_FOUND) target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH) + + create_single_source_cgal_program("graph_concept_OpenMesh.cpp") + target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources) diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 81d14bb28d7..0a032673863 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -6,15 +6,14 @@ project(Box_intersection_d_Tests) find_package(CGAL REQUIRED) -find_package(TBB) -include(CGAL_TBB_support) - create_single_source_cgal_program("automated_test.cpp") create_single_source_cgal_program("benchmark_box_intersection.cpp") create_single_source_cgal_program("random_set_test.cpp") create_single_source_cgal_program("test_box_grid.cpp") create_single_source_cgal_program("test_Has_member_report.cpp") +find_package(TBB QUIET) +include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 83cc5c6149d..3901b756407 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,29 +23,20 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning -include(CGAL_OpenCV_support) -if(NOT TARGET CGAL::OpenCV_support) - message( - STATUS - "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available." - ) -endif() - -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -find_package(TBB QUIET) -include(CGAL_TBB_support) - if(NOT Classification_dependencies_met) return() endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) + create_single_source_cgal_program( "example_classification.cpp" ) create_single_source_cgal_program( "example_ethz_random_forest.cpp" ) create_single_source_cgal_program( "example_feature.cpp" ) @@ -55,10 +46,13 @@ create_single_source_cgal_program( "example_cluster_classification.cpp" ) create_single_source_cgal_program( "gis_tutorial_example.cpp" ) create_single_source_cgal_program( "example_deprecated_conversion.cpp" ) -if (TARGET CGAL::OpenCV_support) +find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning +include(CGAL_OpenCV_support) +if(TARGET CGAL::OpenCV_support) create_single_source_cgal_program( "example_opencv_random_forest.cpp" ) - target_link_libraries(example_opencv_random_forest - PUBLIC CGAL::OpenCV_support) + target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support) +else() + message("NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.") endif() foreach(target @@ -72,9 +66,9 @@ foreach(target gis_tutorial_example example_deprecated_conversion) if(TARGET ${target}) - target_link_libraries( - ${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index d785190f8cb..c2a8f3211dc 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,20 +23,20 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -find_package(TBB QUIET) -include(CGAL_TBB_support) - if(NOT Classification_dependencies_met) return() endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) + create_single_source_cgal_program("test_classification_point_set.cpp") create_single_source_cgal_program("test_classification_io.cpp") diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 94b110c4ac7..898951705f9 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -28,5 +28,9 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) find_package(OpenMesh QUIET) if(TARGET OpenMesh::OpenMesh) target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) + target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh) + target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE -DCGAL_USE_OPENMESH) +else() + message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 06592fa2548..ded37dfad08 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Cone_spanners_2_Examples) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) find_package(LEDA QUIET) if(CGAL_Core_FOUND OR LEDA_FOUND) diff --git a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt index ac3d47b8f6d..462edfc7819 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt @@ -6,23 +6,11 @@ project(Cone_spanners_2_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -if(CGAL_Core_FOUND) - include_directories(BEFORE "include") - - # create a target per cppfile - file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") - endforeach() - -else() - - message( - STATUS - "This program requires the CGAL and CGAL_Core libraries, and will not be compiled." - ) - -endif() +# create a target per cppfile +file( + GLOB cppfiles + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +foreach(cppfile ${cppfiles}) + create_single_source_cgal_program("${cppfile}") +endforeach() diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 55bc102f967..bfb1068c315 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -7,13 +7,6 @@ project(Convex_hull_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp") create_single_source_cgal_program("dynamic_hull_3.cpp") create_single_source_cgal_program("dynamic_hull_LCC_3.cpp") @@ -26,11 +19,13 @@ create_single_source_cgal_program("quickhull_any_dim_3.cpp") create_single_source_cgal_program("extreme_points_3_sm.cpp") create_single_source_cgal_program("extreme_indices_3.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - create_single_source_cgal_program("quickhull_OM_3.cpp") - create_single_source_cgal_program("dynamic_hull_OM_3.cpp") + include(UseOpenMesh) + create_single_source_cgal_program("quickhull_OM_3.cpp") target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) + create_single_source_cgal_program("dynamic_hull_OM_3.cpp") target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index 44baf0d84aa..68318652bdc 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -14,7 +14,7 @@ target_link_libraries(my_executable CGAL::CGAL) Other \cgal libraries are linked similarly. For example, with `CGAL_Core`: \code -find_package(CGAL REQUIRED COMPONENTS Core) +find_package(CGAL COMPONENTS Core) target_link_libraries(my_executable CGAL::CGAL CGAL::CGAL_Core) \endcode diff --git a/Generator/benchmark/Generator/CMakeLists.txt b/Generator/benchmark/Generator/CMakeLists.txt index 37b35229acf..7cc0116c64b 100644 --- a/Generator/benchmark/Generator/CMakeLists.txt +++ b/Generator/benchmark/Generator/CMakeLists.txt @@ -6,12 +6,17 @@ project(Generator_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -find_package(Boost REQUIRED program_options) -include_directories(${Boost_PROGRAM_OPTIONS_INCLUDE_DIR}) -add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") -list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) - -create_single_source_cgal_program("random_grid.cpp") -create_single_source_cgal_program("random_disc_2.cpp") +find_package(Boost COMPONENTS program_options) +if(Boost_PROGRAM_OPTIONS_FOUND) + create_single_source_cgal_program("random_grid.cpp") + create_single_source_cgal_program("random_disc_2.cpp") + if(TARGET Boost::program_options) + target_link_libraries(random_grid PRIVATE Boost::program_options) + target_link_libraries(random_disc_2 PRIVATE Boost::program_options) + else() + target_link_libraries(random_grid PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(random_disc_2 PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + endif() +else() + message("NOTICE: The benchmarks requires Boost Program Options, and will not be compiled.") +endif() diff --git a/Generator/examples/Generator/CMakeLists.txt b/Generator/examples/Generator/CMakeLists.txt index f9239ce0dbb..0e9f4189a2e 100644 --- a/Generator/examples/Generator/CMakeLists.txt +++ b/Generator/examples/Generator/CMakeLists.txt @@ -6,23 +6,34 @@ project(Generator_Examples) find_package(CGAL REQUIRED) -# Use Eigen +create_single_source_cgal_program("ball_d.cpp") +create_single_source_cgal_program("combination_enumerator.cpp") +create_single_source_cgal_program("cube_d.cpp") +create_single_source_cgal_program("grid_d.cpp") +create_single_source_cgal_program("name_pairs.cpp") +create_single_source_cgal_program("random_convex_hull_2.cpp") +create_single_source_cgal_program("random_convex_set.cpp") +create_single_source_cgal_program("random_degenerate_point_set.cpp") +create_single_source_cgal_program("random_grid.cpp") +create_single_source_cgal_program("random_points_in_triangles_2.cpp") +create_single_source_cgal_program("random_points_in_triangles_3.cpp") +create_single_source_cgal_program("random_points_on_triangle_mesh_2.cpp") +create_single_source_cgal_program("random_points_on_triangle_mesh_3.cpp") +create_single_source_cgal_program("random_points_tetrahedron_and_triangle_3.cpp") +create_single_source_cgal_program("random_points_triangle_2.cpp") +create_single_source_cgal_program("random_polygon2.cpp") +create_single_source_cgal_program("random_polygon.cpp") +create_single_source_cgal_program("random_segments1.cpp") +create_single_source_cgal_program("random_segments2.cpp") +create_single_source_cgal_program("sphere_d.cpp") + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) - -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - if(NOT (${cppfile} STREQUAL "random_points_in_tetrahedral_mesh_3.cpp") - OR NOT (${cppfile} STREQUAL "random_points_on_tetrahedral_mesh_3.cpp") - OR TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("${cppfile}") - if(TARGET CGAL::Eigen3_support) - get_filename_component(target ${cppfile} NAME_WE) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) - endif() - endif() -endforeach() +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("random_points_in_tetrahedral_mesh_3.cpp") + target_link_libraries(random_points_in_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support) + create_single_source_cgal_program("random_points_on_tetrahedral_mesh_3.cpp") + target_link_libraries(random_points_on_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Some examples use Eigen, and will not be compiled.") +endif() diff --git a/Generator/test/Generator/CMakeLists.txt b/Generator/test/Generator/CMakeLists.txt index 50edd9f6e5c..5bd1befed5e 100644 --- a/Generator/test/Generator/CMakeLists.txt +++ b/Generator/test/Generator/CMakeLists.txt @@ -6,22 +6,20 @@ project(Generator_Tests) find_package(CGAL REQUIRED) -# Use Eigen +create_single_source_cgal_program("random_hull_test.cpp") +create_single_source_cgal_program("random_poly_test.cpp") +create_single_source_cgal_program("rcs_test.cpp") +create_single_source_cgal_program("test_combination_enumerator.cpp") +create_single_source_cgal_program("test_generators.cpp") +create_single_source_cgal_program("test_tetrahedron_3.cpp") +create_single_source_cgal_program("test_triangle_2.cpp") +create_single_source_cgal_program("test_triangle_3.cpp") + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) - -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - if(NOT (${cppfile} STREQUAL "generic_random_test.cpp") OR TARGET - CGAL::Eigen3_support) - create_single_source_cgal_program("${cppfile}") - if(TARGET CGAL::Eigen3_support) - get_filename_component(target ${cppfile} NAME_WE) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) - endif() - endif() -endforeach() +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("generic_random_test.cpp") + target_link_libraries(generic_random_test PRIVATE CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The test 'generic_random_test' uses Eigen, and will not be compiled.") +endif() diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index b61e95c544a..fbdf3791ccb 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -11,7 +11,7 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core Qt5) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5) find_package(LEDA QUIET) # Find Qt5 itself diff --git a/Kernel_23/benchmark/Kernel_23/CMakeLists.txt b/Kernel_23/benchmark/Kernel_23/CMakeLists.txt index 409561c1b6e..862b98b2152 100644 --- a/Kernel_23/benchmark/Kernel_23/CMakeLists.txt +++ b/Kernel_23/benchmark/Kernel_23/CMakeLists.txt @@ -2,11 +2,8 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.23) -project( benchmark ) +project(Kernel_23_benchmark) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core ) - - include_directories (BEFORE "../include") +find_package(CGAL QUIET OPTIONAL_COMPONENTS Core) create_single_source_cgal_program( "cmp_epeck_points.cpp" ) - diff --git a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt index 26d56becb15..50b7730178e 100644 --- a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt +++ b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt @@ -66,31 +66,20 @@ else() endif(LINK_WITH_TBB) endif() +# Compilable benchmark +set(BENCHMARK_SOURCE_FILES "concurrency.cpp") +add_msvc_precompiled_header("StdAfx.h" "StdAfx.cpp" BENCHMARK_SOURCE_FILES) +create_single_source_cgal_program(${BENCHMARK_SOURCE_FILES}) +if(TARGET CGAL::TBB_support) + target_link_libraries(concurrency PUBLIC CGAL::TBB_support) +endif() + # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) - if(CGAL_AUTO_LINK_ENABLED) - message(STATUS "Boost.ProgramOptions library: found") + if(TARGET Boost::program_options) + target_link_libraries(concurrency PRIVATE Boost::program_options) else() - message( - STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}") + target_link_libraries(concurrency PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() - add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES}) -endif() - -if(Boost_FOUND ) - # Compilable benchmark - set(BENCHMARK_SOURCE_FILES "concurrency.cpp") - add_msvc_precompiled_header("StdAfx.h" "StdAfx.cpp" BENCHMARK_SOURCE_FILES) - create_single_source_cgal_program(${BENCHMARK_SOURCE_FILES}) - if(TARGET CGAL::TBB_support) - target_link_libraries(concurrency PUBLIC CGAL::TBB_support) - endif() - -else() - message( - STATUS - "NOTICE: This program requires Boost >= 1.34.1, and will not be compiled." - ) endif() diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3f91ea357bd..58fb91a6bb9 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -1,147 +1,142 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. - cmake_minimum_required(VERSION 3.1...3.23) project( Mesh_3_Tests ) -find_package(CGAL QUIET COMPONENTS ImageIO) +find_package(CGAL REQUIRED COMPONENTS ImageIO) -if ( CGAL_FOUND ) +# Use Eigen +find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +include(CGAL_Eigen3_support) +if (NOT TARGET CGAL::Eigen3_support) + message("NOTICE: This project requires the Eigen library, and will not be compiled.") + return() +endif() - find_package( TBB QUIET ) - include(CGAL_TBB_support) +find_package(TBB QUIET) +include(CGAL_TBB_support) - find_package( ITT QUIET ) +find_package(ITT QUIET) - # Use Eigen - find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) - include(CGAL_Eigen3_support) - if (NOT TARGET CGAL::Eigen3_support) - message(STATUS "This project requires the Eigen library, and will not be compiled.") - return() +create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) +create_single_source_cgal_program( "test_mesh_capsule_var_distance_bound.cpp" ) +create_single_source_cgal_program( "test_implicit_multi_domain_to_labeling_function_wrapper.cpp" ) +create_single_source_cgal_program( "test_criteria.cpp" ) +create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) +create_single_source_cgal_program( "test_labeled_mesh_domain_3.cpp" ) +create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) +create_single_source_cgal_program( "test_without_detect_features.cpp" ) + +if(CGAL_ImageIO_USE_ZLIB) + create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) + create_single_source_cgal_program( "test_meshing_3D_image_deprecated.cpp" ) + create_single_source_cgal_program( "test_meshing_3D_gray_image.cpp" ) + create_single_source_cgal_program( "test_meshing_3D_gray_image_deprecated.cpp" ) +else() + message(STATUS "NOTICE: The test 'test_meshing_3D_image' requires the ZLIB library, and will not be compiled.") +endif() + +create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) +create_single_source_cgal_program( "test_meshing_implicit_function_deprecated.cpp" ) +create_single_source_cgal_program( "test_meshing_polyhedral_complex.cpp" ) +create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) +create_single_source_cgal_program( "test_meshing_polylines_only.cpp" ) +create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) +create_single_source_cgal_program( "test_meshing_verbose.cpp" ) +create_single_source_cgal_program( "test_meshing_unit_tetrahedron.cpp" ) +create_single_source_cgal_program( "test_meshing_with_default_edge_size.cpp" ) +create_single_source_cgal_program( "test_meshing_determinism.cpp" ) +create_single_source_cgal_program( "test_mesh_3_issue_1554.cpp" ) +create_single_source_cgal_program( "test_mesh_polyhedral_domain_with_features_deprecated.cpp" ) +create_single_source_cgal_program( "test_meshing_with_one_step.cpp" ) +create_single_source_cgal_program( "test_mesh_cell_base_3.cpp") + +foreach(target + test_boost_has_xxx + test_mesh_capsule_var_distance_bound + test_implicit_multi_domain_to_labeling_function_wrapper + test_criteria + test_domain_with_polyline_features + test_labeled_mesh_domain_3 + test_mesh_criteria_creation + test_without_detect_features + test_meshing_3D_image + test_meshing_3D_image_deprecated + test_meshing_3D_gray_image + test_meshing_3D_gray_image_deprecated + test_meshing_implicit_function + test_meshing_implicit_function_deprecated + test_meshing_polyhedral_complex + test_meshing_polyhedron + test_meshing_polylines_only + test_meshing_polyhedron_with_features + test_meshing_verbose + test_meshing_unit_tetrahedron + test_meshing_with_default_edge_size + test_meshing_determinism + test_mesh_3_issue_1554 + test_mesh_polyhedral_domain_with_features_deprecated + test_mesh_cell_base_3 + test_meshing_with_one_step.cpp) + if(TARGET ${target}) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endif() +endforeach() - create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) - create_single_source_cgal_program( "test_mesh_capsule_var_distance_bound.cpp" ) - create_single_source_cgal_program( "test_implicit_multi_domain_to_labeling_function_wrapper.cpp" ) - create_single_source_cgal_program( "test_criteria.cpp" ) - create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) - create_single_source_cgal_program( "test_labeled_mesh_domain_3.cpp" ) - create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) - create_single_source_cgal_program( "test_without_detect_features.cpp" ) - if(CGAL_ImageIO_USE_ZLIB) - create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_image_deprecated.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_gray_image.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_gray_image_deprecated.cpp" ) - else() - message(STATUS "test_meshing_3D_image requires the ZLIB library, and will not be compiled.") - endif() - create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) - create_single_source_cgal_program( "test_meshing_implicit_function_deprecated.cpp" ) - create_single_source_cgal_program( "test_meshing_polyhedral_complex.cpp" ) - create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) - create_single_source_cgal_program( "test_meshing_polylines_only.cpp" ) - create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) - create_single_source_cgal_program( "test_meshing_verbose.cpp" ) - create_single_source_cgal_program( "test_meshing_unit_tetrahedron.cpp" ) - create_single_source_cgal_program( "test_meshing_with_default_edge_size.cpp" ) - create_single_source_cgal_program( "test_meshing_determinism.cpp" ) - create_single_source_cgal_program( "test_mesh_3_issue_1554.cpp" ) - create_single_source_cgal_program( "test_mesh_polyhedral_domain_with_features_deprecated.cpp" ) - create_single_source_cgal_program( "test_meshing_with_one_step.cpp" ) - create_single_source_cgal_program( "test_mesh_cell_base_3.cpp") - +if(TARGET CGAL::TBB_support) foreach(target - test_boost_has_xxx - test_mesh_capsule_var_distance_bound - test_implicit_multi_domain_to_labeling_function_wrapper - test_criteria - test_domain_with_polyline_features - test_labeled_mesh_domain_3 - test_mesh_criteria_creation - test_without_detect_features - test_meshing_3D_image - test_meshing_3D_image_deprecated - test_meshing_3D_gray_image - test_meshing_3D_gray_image_deprecated - test_meshing_implicit_function - test_meshing_implicit_function_deprecated - test_meshing_polyhedral_complex - test_meshing_polyhedron - test_meshing_polylines_only - test_meshing_polyhedron_with_features test_meshing_verbose + test_meshing_polyhedron_with_features + test_meshing_utilities.h + test_meshing_implicit_function + test_meshing_3D_image + test_meshing_3D_gray_image test_meshing_unit_tetrahedron - test_meshing_with_default_edge_size - test_meshing_determinism + test_meshing_polyhedron + test_meshing_polyhedral_complex + test_mesh_capsule_var_distance_bound test_mesh_3_issue_1554 test_mesh_polyhedral_domain_with_features_deprecated test_mesh_cell_base_3 - test_meshing_with_one_step.cpp) + ) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endforeach() - if(TARGET CGAL::TBB_support) - foreach(target - test_meshing_verbose - test_meshing_polyhedron_with_features - test_meshing_utilities.h - test_meshing_implicit_function - test_meshing_3D_image - test_meshing_3D_gray_image - test_meshing_unit_tetrahedron - test_meshing_polyhedron - test_meshing_polyhedral_complex - test_mesh_capsule_var_distance_bound - test_mesh_3_issue_1554 - test_mesh_polyhedral_domain_with_features_deprecated - test_mesh_cell_base_3 - ) - if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) - endif() - endforeach() - - if(BUILD_TESTING) + if(BUILD_TESTING) + set_property(TEST + execution___of__test_meshing_verbose + execution___of__test_meshing_polyhedron_with_features + execution___of__test_meshing_implicit_function + execution___of__test_meshing_unit_tetrahedron + execution___of__test_meshing_polyhedron + execution___of__test_meshing_polyhedral_complex + execution___of__test_mesh_capsule_var_distance_bound + execution___of__test_mesh_3_issue_1554 + execution___of__test_mesh_polyhedral_domain_with_features_deprecated + execution___of__test_mesh_cell_base_3 + PROPERTY RUN_SERIAL 1) + if(TARGET test_meshing_3D_image) set_property(TEST - execution___of__test_meshing_verbose - execution___of__test_meshing_polyhedron_with_features - execution___of__test_meshing_implicit_function - execution___of__test_meshing_unit_tetrahedron - execution___of__test_meshing_polyhedron - execution___of__test_meshing_polyhedral_complex - execution___of__test_mesh_capsule_var_distance_bound - execution___of__test_mesh_3_issue_1554 - execution___of__test_mesh_polyhedral_domain_with_features_deprecated - execution___of__test_mesh_cell_base_3 + execution___of__test_meshing_3D_image + execution___of__test_meshing_3D_gray_image PROPERTY RUN_SERIAL 1) - if(TARGET test_meshing_3D_image) - set_property(TEST - execution___of__test_meshing_3D_image - execution___of__test_meshing_3D_gray_image - PROPERTY RUN_SERIAL 1) - endif() endif() endif() - if(TARGET ITT::ITT) - target_link_libraries(test_meshing_polyhedron_with_features PRIVATE ITT::ITT) - target_compile_definitions(test_meshing_polyhedron_with_features PRIVATE CGAL_MESH_3_USE_INTEL_ITT) - target_link_libraries(test_meshing_verbose PRIVATE ITT::ITT) - target_compile_definitions(test_meshing_verbose PRIVATE CGAL_MESH_3_USE_INTEL_ITT) - endif() - - if(BUILD_TESTING) - set_tests_properties( - execution___of__test_meshing_polyhedron_with_features - execution___of__test_meshing_verbose - PROPERTIES RESOURCE_LOCK Mesh_3_Tests_IO) - endif() -else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - +endif() + +if(TARGET ITT::ITT) + target_link_libraries(test_meshing_polyhedron_with_features PRIVATE ITT::ITT) + target_compile_definitions(test_meshing_polyhedron_with_features PRIVATE CGAL_MESH_3_USE_INTEL_ITT) + target_link_libraries(test_meshing_verbose PRIVATE ITT::ITT) + target_compile_definitions(test_meshing_verbose PRIVATE CGAL_MESH_3_USE_INTEL_ITT) +endif() + +if(BUILD_TESTING) + set_tests_properties( + execution___of__test_meshing_polyhedron_with_features + execution___of__test_meshing_verbose + PROPERTIES RESOURCE_LOCK Mesh_3_Tests_IO) endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index 8ad70c5f829..31b92ab56e6 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,8 +7,7 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) - -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index e35a681812b..97f9a323685 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index bd6f6a443b3..db5e5b0a874 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt index 81e68f53bd3..96eb570c9c9 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt @@ -77,7 +77,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) target_include_directories(Otr2_demo PRIVATE ${CIMG_INCLUDE_DIR}) # Is pthread around? If yes, we need to link against it set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package(Threads) + find_package(Threads QUIET) if(CMAKE_USE_PTHREADS_INIT) target_link_libraries(Otr2_demo PRIVATE ${CMAKE_THREAD_LIBS_INIT}) endif() diff --git a/Orthtree/benchmark/Orthtree/CMakeLists.txt b/Orthtree/benchmark/Orthtree/CMakeLists.txt index 06cea796719..24274ae62b8 100644 --- a/Orthtree/benchmark/Orthtree/CMakeLists.txt +++ b/Orthtree/benchmark/Orthtree/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Orthtree_benchmarks) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) create_single_source_cgal_program("construction.cpp") create_single_source_cgal_program("nearest_neighbor.cpp") diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index 09026783dab..b4e92f36ee9 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -4,27 +4,21 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Orthtree_Examples) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) -if (CGAL_FOUND) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) - create_single_source_cgal_program("octree_build_from_point_set.cpp") - create_single_source_cgal_program("octree_build_from_point_vector.cpp") - create_single_source_cgal_program("octree_build_with_custom_split.cpp") - create_single_source_cgal_program("octree_find_nearest_neighbor.cpp") - create_single_source_cgal_program("octree_traversal_custom.cpp") - create_single_source_cgal_program("octree_traversal_manual.cpp") - create_single_source_cgal_program("octree_traversal_preorder.cpp") - create_single_source_cgal_program("octree_grade.cpp") - create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") +create_single_source_cgal_program("octree_build_from_point_set.cpp") +create_single_source_cgal_program("octree_build_from_point_vector.cpp") +create_single_source_cgal_program("octree_build_with_custom_split.cpp") +create_single_source_cgal_program("octree_find_nearest_neighbor.cpp") +create_single_source_cgal_program("octree_traversal_custom.cpp") +create_single_source_cgal_program("octree_traversal_manual.cpp") +create_single_source_cgal_program("octree_traversal_preorder.cpp") +create_single_source_cgal_program("octree_grade.cpp") +create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") - find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) - include(CGAL_Eigen_support) - if (TARGET CGAL::Eigen_support) - create_single_source_cgal_program("orthtree_build.cpp") - target_link_libraries(orthtree_build PUBLIC CGAL::Eigen_support) - endif() - -else () - message(WARNING - "This program requires the CGAL library, and will not be compiled.") -endif () +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +include(CGAL_Eigen_support) +if (TARGET CGAL::Eigen_support) + create_single_source_cgal_program("orthtree_build.cpp") + target_link_libraries(orthtree_build PUBLIC CGAL::Eigen_support) +endif() diff --git a/Orthtree/test/Orthtree/CMakeLists.txt b/Orthtree/test/Orthtree/CMakeLists.txt index 6ffe9220aaf..6776af02157 100644 --- a/Orthtree/test/Orthtree/CMakeLists.txt +++ b/Orthtree/test/Orthtree/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Orthtree_Tests) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) create_single_source_cgal_program("test_octree_equality.cpp") create_single_source_cgal_program("test_octree_refine.cpp") diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 05c83888820..70027d80b08 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -5,11 +5,10 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Periodic_3_mesh_3_Examples) # CGAL and its components -find_package(CGAL REQUIRED COMPONENTS ImageIO) - +find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 22faeaf1c29..b962e56be41 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Periodic_3_mesh_3_Tests) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 1a7e63715ec..a4ee8805749 100644 --- a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -1,11 +1,10 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Periodic_4_hyperbolic_triangulation_2_Examples) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) + find_package(LEDA QUIET) - -if((CGAL_Core_FOUND OR LEDA_FOUND)) - +if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("p4ht2_example_insertion.cpp") else() message("NOTICE: This program requires the CGAL library, and will not be compiled.") diff --git a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 812dc8b307d..ef5923f844c 100644 --- a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -1,11 +1,10 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Periodic_4_hyperbolic_triangulation_2_Tests) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) + find_package(LEDA QUIET) - -if((CGAL_Core_FOUND OR LEDA_FOUND)) - +if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("test_p4ht2_construct_point_2.cpp") create_single_source_cgal_program("test_p4ht2_exact_complex_numbers.cpp") create_single_source_cgal_program("test_p4ht2_intersections.cpp") diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 1ba5c604bab..1699f75d099 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -16,9 +16,9 @@ set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) create_single_source_cgal_program("point_set_read_ply.cpp" CXX_FEATURES ${needed_cxx_features}) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) -if(EIGEN3_FOUND) +if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("point_set_algo.cpp") target_link_libraries(point_set_algo PUBLIC CGAL::Eigen3_support) else() diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index 970ffd456f5..4daea00a56b 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -14,7 +14,7 @@ create_single_source_cgal_program("test_deprecated_io_ps.cpp") #Use LAS #disable if MSVC 2017 if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) - find_package(LASLIB) + find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) target_link_libraries(test_deprecated_io_ps PUBLIC CGAL::LASLIB_support) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index 39655c8b217..ac5e71b1aa1 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -6,8 +6,6 @@ project(Point_set_processing_3_Examples) # Find CGAL find_package(CGAL REQUIRED) -find_package(Boost QUIET) - # VisualC++ optimization for applications dealing with large data if(MSVC) # Quit warning in the lasreader @@ -56,7 +54,7 @@ foreach( target_link_libraries(${target} PRIVATE ${CGAL_libs}) endforeach() -find_package(LASLIB) +find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if(TARGET CGAL::LASLIB_support) create_single_source_cgal_program("read_las_example.cpp") @@ -66,7 +64,7 @@ else() endif() # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) set(CGAL_libs ${CGAL_libs} CGAL::Eigen3_support) diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index b96bd07f0d9..8766b4c40ca 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -19,9 +19,6 @@ if (MSVC) message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" ) endif() -find_package( TBB QUIET ) -include(CGAL_TBB_support) - # Executables that do *not* require Eigen create_single_source_cgal_program( "read_test.cpp" ) create_single_source_cgal_program( "test_read_write_point_set.cpp" ) @@ -37,7 +34,7 @@ create_single_source_cgal_program( "structuring_test.cpp" ) #Use LAS #disable if MSVC 2017 if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) - find_package(LASLIB) + find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) target_link_libraries(test_read_write_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) @@ -50,9 +47,9 @@ else() endif() # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) -if (EIGEN3_FOUND) +if(TARGET CGAL::Eigen3_support) # Executables that require Eigen create_single_source_cgal_program( "normal_estimation_test.cpp" ) target_link_libraries(normal_estimation_test PUBLIC CGAL::Eigen3_support) @@ -76,6 +73,8 @@ else() message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) foreach( target 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 978908627f2..347a37eeab9 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 @@ -17,21 +17,22 @@ if(MSVC) message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() - # Temporary debugging stuff - find_package(Eigen3 3.1.0) #(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) - find_package(TBB) - include(CGAL_TBB_support) - if (TBB_FOUND) - create_single_source_cgal_program( "poisson_and_parallel_mesh_3.cpp" ) - target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support CGAL::TBB_support) - else() - message(STATUS "NOTICE: test with parallel Mesh_3 needs TBB and will not be compiled.") - endif() + +find_package(Eigen3 3.1.0) #(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) + + find_package(TBB QUIET) + include(CGAL_TBB_support) + if (TBB_FOUND) + create_single_source_cgal_program( "poisson_and_parallel_mesh_3.cpp" ) + target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support CGAL::TBB_support) else() - message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled.") + message(STATUS "NOTICE: The test 'poisson_and_parallel_mesh_3' requires TBB, and will not be compiled.") + endif() +else() + message("NOTICE: Tests in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 22a07946a15..fd77f8a046d 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -33,13 +33,11 @@ if (FAST_ENVELOPE_BUILD_DIR) target_link_libraries( fastE PUBLIC FastEnvelope IndirectPredicates geogram) else() - message(STATUS "Cmake variable FAST_ENVELOPE_BUILD_DIR is not defined fastE will not be built") + message(STATUS "CMake variable FAST_ENVELOPE_BUILD_DIR is not defined; benchmark 'fastE' will not be built") endif() -create_single_source_cgal_program( "fast.cpp" ) +create_single_source_cgal_program("fast.cpp") + create_single_source_cgal_program("polygon_mesh_slicer.cpp") +target_link_libraries(polygon_mesh_slicer PUBLIC CGAL::Eigen3_support) - -if(TARGET CGAL::Eigen3_support) - target_link_libraries(polygon_mesh_slicer PUBLIC CGAL::Eigen3_support) -endif() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 11be7ccef68..192e7d29b74 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -7,38 +7,52 @@ project(Polygon_mesh_processing_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - -# include for local directory - -# include for local package -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - +create_single_source_cgal_program("extrude.cpp" ) +create_single_source_cgal_program("polyhedral_envelope.cpp" ) +create_single_source_cgal_program("polyhedral_envelope_of_triangle_soup.cpp" ) +create_single_source_cgal_program("polyhedral_envelope_mesh_containment.cpp" ) +create_single_source_cgal_program("self_intersections_example.cpp" ) +create_single_source_cgal_program("stitch_borders_example.cpp" ) +create_single_source_cgal_program("compute_normals_example_Polyhedron.cpp" CXX_FEATURES cxx_range_for ) +create_single_source_cgal_program("compute_normals_example.cpp" CXX_FEATURES cxx_range_for cxx_auto_type ) +create_single_source_cgal_program("point_inside_example.cpp") +create_single_source_cgal_program("triangulate_faces_example.cpp") +create_single_source_cgal_program("triangulate_faces_split_visitor_example.cpp") +create_single_source_cgal_program("connected_components_example.cpp") +create_single_source_cgal_program( "face_filtered_graph_example.cpp") +create_single_source_cgal_program("orient_polygon_soup_example.cpp") +create_single_source_cgal_program("triangulate_polyline_example.cpp") +create_single_source_cgal_program("mesh_slicer_example.cpp") +#create_single_source_cgal_program( "remove_degeneracies_example.cpp") +create_single_source_cgal_program("isotropic_remeshing_example.cpp") +create_single_source_cgal_program("isotropic_remeshing_of_patch_example.cpp") +create_single_source_cgal_program("tangential_relaxation_example.cpp") +create_single_source_cgal_program("surface_mesh_intersection.cpp") +create_single_source_cgal_program("corefinement_SM.cpp") +create_single_source_cgal_program("corefinement_consecutive_bool_op.cpp") +create_single_source_cgal_program("corefinement_difference_remeshed.cpp") +create_single_source_cgal_program("corefinement_mesh_union.cpp") +create_single_source_cgal_program("corefinement_mesh_union_progress.cpp") +create_single_source_cgal_program("corefinement_mesh_union_and_intersection.cpp") +create_single_source_cgal_program("corefinement_mesh_union_with_attributes.cpp") +create_single_source_cgal_program("corefinement_polyhedron_union.cpp") +create_single_source_cgal_program("random_perturbation_SM_example.cpp") +create_single_source_cgal_program("corefinement_LCC.cpp") +create_single_source_cgal_program("detect_features_example.cpp") +create_single_source_cgal_program("volume_connected_components.cpp") +create_single_source_cgal_program("manifoldness_repair_example.cpp") +create_single_source_cgal_program("repair_polygon_soup_example.cpp") +create_single_source_cgal_program("locate_example.cpp") +create_single_source_cgal_program("orientation_pipeline_example.cpp") +#create_single_source_cgal_program("self_snapping_example.cpp") +#create_single_source_cgal_program("snapping_example.cpp") +create_single_source_cgal_program("match_faces.cpp") +create_single_source_cgal_program("cc_compatible_orientations.cpp") create_single_source_cgal_program("hausdorff_distance_remeshing_example.cpp") -create_single_source_cgal_program( "hausdorff_bounded_error_distance_example.cpp") +create_single_source_cgal_program("hausdorff_bounded_error_distance_example.cpp") +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example.cpp") target_link_libraries(hole_filling_example PUBLIC CGAL::Eigen3_support) @@ -56,65 +70,22 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(mesh_smoothing_example PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("delaunay_remeshing_example.cpp") target_link_libraries(delaunay_remeshing_example PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Examples that use Eigen will not be compiled.") endif() -create_single_source_cgal_program( "extrude.cpp" ) -create_single_source_cgal_program( "polyhedral_envelope.cpp" ) -create_single_source_cgal_program( "polyhedral_envelope_of_triangle_soup.cpp" ) -create_single_source_cgal_program( "polyhedral_envelope_mesh_containment.cpp" ) -create_single_source_cgal_program( "self_intersections_example.cpp" ) -create_single_source_cgal_program( "stitch_borders_example.cpp" ) -create_single_source_cgal_program( "compute_normals_example_Polyhedron.cpp" CXX_FEATURES cxx_range_for ) -create_single_source_cgal_program( "compute_normals_example.cpp" CXX_FEATURES cxx_range_for cxx_auto_type ) -create_single_source_cgal_program( "point_inside_example.cpp") -create_single_source_cgal_program( "triangulate_faces_example.cpp") -create_single_source_cgal_program( "triangulate_faces_split_visitor_example.cpp") -create_single_source_cgal_program( "connected_components_example.cpp") -create_single_source_cgal_program( "face_filtered_graph_example.cpp") -create_single_source_cgal_program( "orient_polygon_soup_example.cpp") -create_single_source_cgal_program( "triangulate_polyline_example.cpp") -create_single_source_cgal_program( "mesh_slicer_example.cpp") -#create_single_source_cgal_program( "remove_degeneracies_example.cpp") -create_single_source_cgal_program("isotropic_remeshing_example.cpp") -create_single_source_cgal_program("isotropic_remeshing_of_patch_example.cpp") -create_single_source_cgal_program("tangential_relaxation_example.cpp") -create_single_source_cgal_program("surface_mesh_intersection.cpp") -create_single_source_cgal_program("corefinement_SM.cpp") -create_single_source_cgal_program("corefinement_consecutive_bool_op.cpp") -create_single_source_cgal_program("corefinement_difference_remeshed.cpp") -create_single_source_cgal_program("corefinement_mesh_union.cpp") -create_single_source_cgal_program("corefinement_mesh_union_progress.cpp") -create_single_source_cgal_program( - "corefinement_mesh_union_and_intersection.cpp") -create_single_source_cgal_program("corefinement_mesh_union_with_attributes.cpp") -create_single_source_cgal_program("corefinement_polyhedron_union.cpp") -create_single_source_cgal_program("random_perturbation_SM_example.cpp") -create_single_source_cgal_program("corefinement_LCC.cpp") -create_single_source_cgal_program("detect_features_example.cpp") -create_single_source_cgal_program("volume_connected_components.cpp") -create_single_source_cgal_program("manifoldness_repair_example.cpp") -create_single_source_cgal_program("repair_polygon_soup_example.cpp") -create_single_source_cgal_program("locate_example.cpp") -create_single_source_cgal_program("orientation_pipeline_example.cpp") -#create_single_source_cgal_program( "self_snapping_example.cpp") -#create_single_source_cgal_program( "snapping_example.cpp") -create_single_source_cgal_program("match_faces.cpp") -create_single_source_cgal_program("cc_compatible_orientations.cpp") - +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("compute_normals_example_OM.cpp") - target_link_libraries(compute_normals_example_OM - PRIVATE ${OPENMESH_LIBRARIES}) - + target_link_libraries(compute_normals_example_OM PRIVATE ${OPENMESH_LIBRARIES}) create_single_source_cgal_program("corefinement_OM_union.cpp") - target_link_libraries(corefinement_OM_union - PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(corefinement_OM_union PRIVATE ${OPENMESH_LIBRARIES}) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example_OM.cpp") - target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support - ${OPENMESH_LIBRARIES}) + target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support ${OPENMESH_LIBRARIES}) endif() create_single_source_cgal_program("point_inside_example_OM.cpp") @@ -123,15 +94,17 @@ if(OpenMesh_FOUND) create_single_source_cgal_program("stitch_borders_example_OM.cpp") target_link_libraries(stitch_borders_example_OM PRIVATE ${OPENMESH_LIBRARIES}) - #create_single_source_cgal_program( "remove_degeneracies_example.cpp") - #target_link_libraries( remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES} ) + #create_single_source_cgal_program("remove_degeneracies_example.cpp") + #target_link_libraries(remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES}) + #target_compile_definitions(remove_degeneracies_example PRIVATE -DCGAL_USE_OPENMESH) create_single_source_cgal_program("triangulate_faces_example_OM.cpp") - target_link_libraries(triangulate_faces_example_OM - PRIVATE ${OPENMESH_LIBRARIES}) -endif(OpenMesh_FOUND) + target_link_libraries(triangulate_faces_example_OM PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") +endif() -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::METIS_support) @@ -139,15 +112,12 @@ else() message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() -find_package(TBB) +find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(self_intersections_example PUBLIC CGAL::TBB_support) - target_link_libraries(hausdorff_distance_remeshing_example - PUBLIC CGAL::TBB_support) - target_link_libraries(hausdorff_bounded_error_distance_example - PUBLIC CGAL::TBB_support) - + target_link_libraries(hausdorff_distance_remeshing_example PUBLIC CGAL::TBB_support) + target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::TBB_support) create_single_source_cgal_program("corefinement_parallel_union_meshes.cpp") target_link_libraries(corefinement_parallel_union_meshes PUBLIC CGAL::TBB_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index f5a2182b27f..b7328227479 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -7,52 +7,6 @@ project(Polygon_mesh_processing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS Core) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# include for local directory - -# include for local package -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - -find_package(TBB) -include(CGAL_TBB_support) - -if(TARGET CGAL::Eigen3_support) - # Creating entries for all .cpp/.C files with "main" routine - # ########################################################## - create_single_source_cgal_program("fairing_test.cpp") - target_link_libraries(fairing_test PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program( - "triangulate_hole_Polyhedron_3_no_delaunay_test.cpp") - target_link_libraries(triangulate_hole_Polyhedron_3_no_delaunay_test - PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program("triangulate_hole_Polyhedron_3_test.cpp") - target_link_libraries(triangulate_hole_Polyhedron_3_test - PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program("test_shape_smoothing.cpp") - target_link_libraries(test_shape_smoothing PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program("delaunay_remeshing_test.cpp") - target_link_libraries(delaunay_remeshing_test PUBLIC CGAL::Eigen3_support) -endif() - -find_package(OpenMesh QUIET) -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - create_single_source_cgal_program("test_pmp_triangle.cpp") create_single_source_cgal_program("test_hausdorff_bounded_error_distance.cpp") create_single_source_cgal_program("test_pmp_read_polygon_mesh.cpp") @@ -112,7 +66,24 @@ create_single_source_cgal_program("test_pmp_np_function.cpp") create_single_source_cgal_program("test_degenerate_pmp_clip_split_corefine.cpp") # create_single_source_cgal_program("test_pmp_repair_self_intersections.cpp") -find_package(METIS) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +include(CGAL_Eigen3_support) +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("fairing_test.cpp") + target_link_libraries(fairing_test PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("triangulate_hole_Polyhedron_3_no_delaunay_test.cpp") + target_link_libraries(triangulate_hole_Polyhedron_3_no_delaunay_test PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("triangulate_hole_Polyhedron_3_test.cpp") + target_link_libraries(triangulate_hole_Polyhedron_3_test PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("test_shape_smoothing.cpp") + target_link_libraries(test_shape_smoothing PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("delaunay_remeshing_test.cpp") + target_link_libraries(delaunay_remeshing_test PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Tests that use the Eigen library will not be compiled.") +endif() + +find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::METIS_support) @@ -120,6 +91,8 @@ else() message(STATUS "NOTICE: Tests are not using METIS.") endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::TBB_support) target_link_libraries(test_pmp_distance PUBLIC CGAL::TBB_support) @@ -130,7 +103,9 @@ else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") target_link_libraries(remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES}) else() @@ -140,11 +115,13 @@ endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) - target_link_libraries( test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) + target_link_libraries(test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) -# target_compile_definitions( test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER ) -# target_link_libraries( test_pmp_repair_self_intersections PRIVATE ceres ) -endif(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) +# target_compile_definitions(test_pmp_repair_self_intersections PUBLIC CGAL_PMP_USE_CERES_SOLVER) +# target_link_libraries(test_pmp_repair_self_intersections PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) +else() + message(STATUS "NOTICE: Tests are not using Ceres.") +endif() if(BUILD_TESTING) set_tests_properties( diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index e3b460139a0..a5bd6e2c6a4 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -15,10 +15,10 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -find_package(SCIP QUIET) +find_package(SCIP) include(CGAL_SCIP_support) if(NOT TARGET CGAL::SCIP_support) - find_package(GLPK QUIET) + find_package(GLPK) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index e560e6b44f0..a15bb212d96 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -55,7 +55,7 @@ if(Qt5_FOUND) add_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt5_FOUND) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) set_package_properties( Eigen3 PROPERTIES DESCRIPTION "A library for linear algebra." @@ -75,7 +75,7 @@ set_package_properties( # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) - find_package(TBB) + find_package(TBB QUIET) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) message(STATUS "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked.") @@ -83,7 +83,7 @@ if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) endif() #find libssh for scene sharing -find_package(LibSSH) +find_package(LibSSH QUIET) set_package_properties( LibSSH PROPERTIES DESCRIPTION "A library implementing the SSH protocol on client and server side. " diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index e2314c89202..86d60a56319 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -2,7 +2,7 @@ include(polyhedron_demo_macros) if(TARGET CGAL::Eigen3_support) - find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) + find_package(Boost QUIET OPTIONAL_COMPONENTS serialization iostreams) include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt index 7d404d7f196..fefcc2706b4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt @@ -1,6 +1,6 @@ include(polyhedron_demo_macros) -find_package(LASLIB) +find_package(LASLIB QUIET) set_package_properties( LASLIB PROPERTIES DESCRIPTION "A library for LIDAR I/O." diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index 702e4a1898e..1955755b2db 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -1,6 +1,6 @@ include(polyhedron_demo_macros) -if(TARGET CGAL::Eigen3_support) +if(TARGET CGAL::Eigen3_support) find_package(SCIP QUIET) set_package_properties( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt index b7f9d81ad41..876ccbd0f36 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -1,5 +1,6 @@ include(polyhedron_demo_macros) -if(EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") + +if(TARGET CGAL::Eigen3_support AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") polyhedron_demo_plugin(edit_plugin Edit_polyhedron_plugin Deform_mesh.ui) target_link_libraries(edit_plugin PUBLIC scene_surface_mesh_item diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index cc6b86f23d7..ab38886b812 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -4,19 +4,17 @@ project(Property_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("test_property_map.cpp") create_single_source_cgal_program("dynamic_property_map.cpp") create_single_source_cgal_program("dynamic_properties_test.cpp") create_single_source_cgal_program("kernel_converter_properties_test.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) + target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES}) + target_compile_definitions(dynamic_properties_test PRIVATE -DCGAL_USE_OPENMESH) +else() + message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 2c8200b2bed..f310a7f98f0 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -9,8 +9,7 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) - find_package(Boost QUIET COMPONENTS program_options) - + find_package(Boost COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program(Compute_Ridges_Umbilics.cpp) target_link_libraries(Compute_Ridges_Umbilics PUBLIC CGAL::Eigen3_support) diff --git a/SMDS_3/examples/SMDS_3/CMakeLists.txt b/SMDS_3/examples/SMDS_3/CMakeLists.txt index 54bb8f0ecf1..a1d23ab87ab 100644 --- a/SMDS_3/examples/SMDS_3/CMakeLists.txt +++ b/SMDS_3/examples/SMDS_3/CMakeLists.txt @@ -8,10 +8,5 @@ project(SMDS_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -# Creating entries for all C++ files with "main" routine -# ########################################################## -create_single_source_cgal_program( "c3t3_example.cpp" ) -create_single_source_cgal_program( "tetrahedron_soup_to_c3t3_example.cpp" ) +create_single_source_cgal_program("c3t3_example.cpp") +create_single_source_cgal_program("tetrahedron_soup_to_c3t3_example.cpp") diff --git a/SMDS_3/test/SMDS_3/CMakeLists.txt b/SMDS_3/test/SMDS_3/CMakeLists.txt index 43cea5fc098..2baa66ee018 100644 --- a/SMDS_3/test/SMDS_3/CMakeLists.txt +++ b/SMDS_3/test/SMDS_3/CMakeLists.txt @@ -2,29 +2,33 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.20) -project( SMDS_3_Tests ) +project(SMDS_3_Tests) find_package(CGAL REQUIRED) -# Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(requires 3.1.0 or greater) -include(CGAL_Eigen3_support) - -create_single_source_cgal_program( "test_c3t3.cpp" ) -create_single_source_cgal_program( "test_c3t3_io.cpp" ) -create_single_source_cgal_program( "test_c3t3_with_features.cpp" ) -create_single_source_cgal_program( "test_c3t3_into_facegraph.cpp" ) -create_single_source_cgal_program( "test_c3t3_extract_subdomains_boundaries.cpp" ) -create_single_source_cgal_program( "test_c3t3_io_MEDIT.cpp" ) create_single_source_cgal_program( "test_simplicial_cb_vb.cpp") -foreach(target - test_c3t3 - test_c3t3_io - test_c3t3_with_features - test_c3t3_into_facegraph - test_c3t3_extract_subdomains_boundaries) - if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) - endif() -endforeach() +find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +include(CGAL_Eigen3_support) +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program( "test_c3t3.cpp" ) + create_single_source_cgal_program( "test_c3t3_io.cpp" ) + create_single_source_cgal_program( "test_c3t3_with_features.cpp" ) + create_single_source_cgal_program( "test_c3t3_into_facegraph.cpp" ) + create_single_source_cgal_program( "test_c3t3_extract_subdomains_boundaries.cpp" ) + create_single_source_cgal_program( "test_c3t3_io_MEDIT.cpp" ) + + foreach(target + test_c3t3 + test_c3t3_io + test_c3t3_with_features + test_c3t3_into_facegraph + test_c3t3_extract_subdomains_boundaries + test_c3t3_io_MEDIT) + if(TARGET ${target}) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + endif() + endforeach() +else() + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") +endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 65a100afa6d..a295d487ca3 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -5,16 +5,11 @@ cmake_minimum_required(VERSION 3.1...3.23) project(STL_Extension_Tests) find_package(CGAL REQUIRED) -find_package( TBB QUIET ) + +find_package(TBB QUIET) include(CGAL_TBB_support) - -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Tests that use OpenMesh will not be compiled.") +if(NOT TARGET CGAL::TBB_support) + message(STATUS "NOTICE: Tests are not using TBB.") endif() create_single_source_cgal_program("test_Boolean_tag.cpp") @@ -59,7 +54,9 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("test_hash_OpenMesh.cpp") target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() 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 ba2c593d83e..8aec35e8e15 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 @@ -7,7 +7,7 @@ find_package(CGAL REQUIRED) option(ACTIVATE_CONCURRENCY "Enable concurrency" ON) if(ACTIVATE_CONCURRENCY) - find_package(TBB) + find_package(TBB QUIET) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) message(STATUS "NOTICE: Intel TBB not found. Examples are faster if TBB is linked.") diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 3baee301825..8b7bd020dd3 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -6,19 +6,13 @@ project(Shape_detection_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include(CGAL_CreateSingleSourceCGALProgram) - -# Use Eigen. -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 3.1.0) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program( - "benchmark_region_growing_on_point_set_2.cpp") - target_link_libraries(benchmark_region_growing_on_point_set_2 - PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program( - "benchmark_region_growing_on_point_set_3.cpp") - target_link_libraries(benchmark_region_growing_on_point_set_3 - PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("benchmark_region_growing_on_point_set_2.cpp") + target_link_libraries(benchmark_region_growing_on_point_set_2 PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("benchmark_region_growing_on_point_set_3.cpp") + target_link_libraries(benchmark_region_growing_on_point_set_3 PUBLIC CGAL::Eigen3_support) +else() + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 149f34e57f0..5250b7a6a4b 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -20,7 +20,7 @@ create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) -if(EIGEN3_FOUND) +if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_region_growing_basic.cpp") create_single_source_cgal_program("test_region_growing_on_cube.cpp") create_single_source_cgal_program("test_region_growing_on_point_set_2.cpp") diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index f053e7e5079..24e5253b5ea 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Skin_surface_3_Examples) -find_package(CGAL) +find_package(CGAL REQUIRED) include_directories(BEFORE include) @@ -20,7 +20,7 @@ create_single_source_cgal_program("skin_surface_subdiv_with_normals.cpp") create_single_source_cgal_program("union_of_balls_simple.cpp") create_single_source_cgal_program("union_of_balls_subdiv.cpp") -find_package(ESBTL) +find_package(ESBTL QUIET) if(ESBTL_FOUND) include_directories(${ESBTL_INCLUDE_DIR}) create_single_source_cgal_program("skin_surface_pdb_reader.cpp") diff --git a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt index 0585028eec8..239b7f03600 100644 --- a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt @@ -6,13 +6,15 @@ project(Spatial_searching_) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -find_package(Eigen3 3.1.91) # (requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - include_directories(BEFORE "include") +find_package(Eigen3 3.1.91) # (requires 3.1.91 or greater) +include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: These benchmarks require Eigen 3.1.91 (or greater), and will not be compiled.") + return() +endif() + # create_single_source_cgal_program("Compare_ANN_STANN_CGAL.cpp") # does not compile, missing dependency create_single_source_cgal_program("nanoflan.cpp") create_single_source_cgal_program("binary.cpp") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 5dc1eab0dcd..53661afd8bb 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -27,6 +27,8 @@ create_single_source_cgal_program("user_defined_point_and_distance.cpp") create_single_source_cgal_program("using_fair_splitting_rule.cpp") create_single_source_cgal_program("weighted_Minkowski_distance.cpp") +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("fuzzy_range_query.cpp") target_link_libraries(fuzzy_range_query PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 1d5b7047fd7..7748468d634 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Examples) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index ab1ca32384a..d1acae25bf2 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Tests) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index 40354505e1b..d0e7ddae9bb 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -13,7 +13,7 @@ set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 168b336edff..19989c9654d 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index 5046d551a55..cc33b2b8f22 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Cactus_deformation_session.cpp") diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 17af23300b8..6f8460fec27 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -7,13 +7,6 @@ project(Surface_mesh_segmentation_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("sdf_values_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_example.cpp") create_single_source_cgal_program("segmentation_via_sdf_values_example.cpp") @@ -22,9 +15,11 @@ create_single_source_cgal_program("segmentation_from_sdf_values_SM_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_LCC_example.cpp") create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - create_single_source_cgal_program( - "segmentation_from_sdf_values_OpenMesh_example.cpp") - target_link_libraries(segmentation_from_sdf_values_OpenMesh_example - PRIVATE ${OPENMESH_LIBRARIES}) + include(UseOpenMesh) + create_single_source_cgal_program("segmentation_from_sdf_values_OpenMesh_example.cpp") + target_link_libraries(segmentation_from_sdf_values_OpenMesh_example PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index 95099585460..f086d72d46a 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -3,8 +3,6 @@ project(Surface_mesh_shortest_path_Tests) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) -find_package(LEDA QUIET) - include_directories(BEFORE "include") create_single_source_cgal_program("Surface_mesh_shortest_path_test_1.cpp") @@ -15,6 +13,8 @@ create_single_source_cgal_program("Surface_mesh_shortest_path_test_5.cpp") create_single_source_cgal_program("Surface_mesh_shortest_path_test_6.cpp") create_single_source_cgal_program("Surface_mesh_shortest_path_traits_test.cpp") +find_package(LEDA QUIET) + # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index df746cdc92c..e082b7e942a 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -7,13 +7,6 @@ project(Surface_mesh_simplification_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("edge_collapse_envelope.cpp") create_single_source_cgal_program("edge_collapse_constrain_sharp_edges.cpp") create_single_source_cgal_program("edge_collapse_constrained_border_polyhedron.cpp") @@ -35,17 +28,19 @@ else() message(STATUS "NOTICE: Garland-Heckbert polices require the Eigen library, which has not been found; related examples will not be compiled.") endif() +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) -find_package(TBB) +find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 061db68f7e1..e61824ac4f5 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -9,15 +9,11 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - -if(NOT TARGET CGAL::Eigen3_support) - message(STATUS "NOTICE: Eigen 3.2 (or greater) is not found.") +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("solver_benchmark.cpp") + target_link_libraries(solver_benchmark PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("mcf_scale_invariance.cpp") + target_link_libraries(mcf_scale_invariance PUBLIC CGAL::Eigen3_support) +else() + message("NOTICE: This project requires Eigen 3.2.0 (or greater), and will not be compiled.") endif() - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - -create_single_source_cgal_program("solver_benchmark.cpp") -target_link_libraries(solver_benchmark PUBLIC CGAL::Eigen3_support) -create_single_source_cgal_program("mcf_scale_invariance.cpp") -target_link_libraries(mcf_scale_invariance PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index e809e5b742d..a2916b9e2a0 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -8,15 +8,6 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("simple_mcfskel_example.cpp") create_single_source_cgal_program("simple_mcfskel_sm_example.cpp") @@ -37,9 +28,13 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() + find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("MCF_Skeleton_om_example.cpp") - target_link_libraries( MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) + else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() else() message("NOTICE: These programs require the Eigen library (3.2 or greater), and will not be compiled.") diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 0c39993aed8..758f2f8bd87 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_skeletonization_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 REQUIRED) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") diff --git a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt index d0521ebfc51..1eaee1642bc 100644 --- a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt @@ -2,7 +2,7 @@ project(Surface_mesh_topology_Benchmarks) cmake_minimum_required(VERSION 3.1...3.23) -find_package(CGAL) +find_package(CGAL REQUIRED) # add_definitions(-DCGAL_TRACE_PATH_TESTS) # add_definitions(-DCGAL_TRACE_CMAP_TOOLS) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index b94703841f1..9e89831fc98 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -8,11 +8,10 @@ project(Tetrahedral_remeshing_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Use Eigen for Mesh_3 -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) -include(CGAL_Eigen3_support) -find_package(TBB QUIET) -include(CGAL_TBB_support) +create_single_source_cgal_program("tetrahedral_remeshing_example.cpp" ) +create_single_source_cgal_program("tetrahedral_remeshing_with_features.cpp") +create_single_source_cgal_program("tetrahedral_remeshing_of_one_subdomain.cpp") +create_single_source_cgal_program("tetrahedral_remeshing_from_mesh.cpp") # Concurrent Mesh_3 option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) @@ -20,17 +19,16 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") add_definitions(-DCGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) +else() + find_package(TBB QUIET) + include(CGAL_TBB_support) endif() -# Creating entries for all C++ files with "main" routine -# ########################################################## -create_single_source_cgal_program( "tetrahedral_remeshing_example.cpp" ) -create_single_source_cgal_program( "tetrahedral_remeshing_with_features.cpp") -create_single_source_cgal_program( "tetrahedral_remeshing_of_one_subdomain.cpp") -create_single_source_cgal_program( "tetrahedral_remeshing_from_mesh.cpp") - +# Use Eigen for Mesh_3 +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) -create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) + create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::TBB_support) diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index 6cebbe30e7e..a47c71cd04f 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -8,40 +8,25 @@ project(Tetrahedral_remeshing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS ImageIO) -# Boost and its components -find_package(Boost REQUIRED) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## create_single_source_cgal_program("test_tetrahedral_remeshing.cpp") -create_single_source_cgal_program( - "test_tetrahedral_remeshing_with_features.cpp") -create_single_source_cgal_program( - "test_tetrahedral_remeshing_of_one_subdomain.cpp") +create_single_source_cgal_program("test_tetrahedral_remeshing_with_features.cpp") +create_single_source_cgal_program("test_tetrahedral_remeshing_of_one_subdomain.cpp") create_single_source_cgal_program("test_tetrahedral_remeshing_io.cpp") -create_single_source_cgal_program( - "test_tetrahedral_remeshing_from_mesh_file.cpp") +create_single_source_cgal_program("test_tetrahedral_remeshing_from_mesh_file.cpp") # Tests using Mesh_3 require Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) -if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") - return() -endif() +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("test_mesh_and_remesh_polyhedral_domain_with_features.cpp") + target_link_libraries(test_mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) -create_single_source_cgal_program( - "test_mesh_and_remesh_polyhedral_domain_with_features.cpp") -target_link_libraries(test_mesh_and_remesh_polyhedral_domain_with_features - PUBLIC CGAL::Eigen3_support) - -if(CGAL_ImageIO_USE_ZLIB) - create_single_source_cgal_program("test_mesh_and_remesh_image.cpp") - target_link_libraries(test_mesh_and_remesh_image PUBLIC CGAL::Eigen3_support) + if(CGAL_ImageIO_USE_ZLIB) + create_single_source_cgal_program("test_mesh_and_remesh_image.cpp") + target_link_libraries(test_mesh_and_remesh_image PUBLIC CGAL::Eigen3_support) + else() + message(STATUS "NOTICE: The test 'test_mesh_and_remesh_image' uses zlib, and will not be compiled.") + endif() +else() + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt index 8a207c2b79f..19fd0c0efac 100644 --- a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt @@ -12,25 +12,25 @@ create_single_source_cgal_program("incident_edges.cpp") create_single_source_cgal_program("simple_2.cpp") create_single_source_cgal_program("simple.cpp") create_single_source_cgal_program("Triangulation_benchmark_3.cpp") +create_single_source_cgal_program("segment_traverser_benchmark.cpp" ) -create_single_source_cgal_program( "segment_traverser_benchmark.cpp" ) - -find_package(benchmark) - -if(TARGET benchmark::benchmark) - find_package(TBB REQUIRED) - include(CGAL_TBB_support) - - create_single_source_cgal_program("DT3_benchmark_with_TBB.cpp") - target_link_libraries(DT3_benchmark_with_TBB PRIVATE benchmark::benchmark - CGAL::TBB_support) - - add_executable(DT3_benchmark_with_TBB_CCC_approximate_size - DT3_benchmark_with_TBB.cpp) - target_compile_definitions( - DT3_benchmark_with_TBB_CCC_approximate_size - PRIVATE CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE) - target_link_libraries( - DT3_benchmark_with_TBB_CCC_approximate_size - PRIVATE CGAL::CGAL benchmark::benchmark CGAL::TBB_support) +find_package(benchmark QUIET) +if(NOT TARGET benchmark::benchmark) + message(STATUS "NOTICE: Some benchmarks require the Google benchmark library, and will not be compiled.") + return() +endif() + +find_package(TBB REQUIRED) +include(CGAL_TBB_support) +if(TARGET CGAL::TBB_support) + create_single_source_cgal_program("DT3_benchmark_with_TBB.cpp") + target_link_libraries(DT3_benchmark_with_TBB PRIVATE benchmark::benchmark CGAL::TBB_support) + + add_executable(DT3_benchmark_with_TBB_CCC_approximate_size DT3_benchmark_with_TBB.cpp) + target_compile_definitions(DT3_benchmark_with_TBB_CCC_approximate_size + PRIVATE CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE) + target_link_libraries(DT3_benchmark_with_TBB_CCC_approximate_size + PRIVATE CGAL::CGAL benchmark::benchmark CGAL::TBB_support) +else() + message(STATUS "NOTICE: Some benchmarks require the TBB library, and will not be compiled.") endif() diff --git a/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt index b8c1d21bba3..0e8422aefa1 100644 --- a/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt @@ -1,20 +1,12 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -project( Triangulation_on_sphere_2_Benchmarks ) - cmake_minimum_required(VERSION 3.1...3.23) +project( Triangulation_on_sphere_2_Benchmarks ) + find_package(CGAL REQUIRED COMPONENTS Core ) -if ( CGAL_FOUND ) - - create_single_source_cgal_program( "bench_dtos2.cpp" ) - create_single_source_cgal_program( "generate_points.cpp" ) - -else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - -endif() +create_single_source_cgal_program( "bench_dtos2.cpp" ) +create_single_source_cgal_program( "generate_points.cpp" ) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index f99b2a133d0..a06979d869f 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -26,7 +26,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) # Find Qt5 itself find_package(Qt5 QUIET COMPONENTS Script OpenGL Gui Svg) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) diff --git a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt index 36405ad2cb7..6e26394bee1 100644 --- a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt @@ -4,23 +4,18 @@ project( Triangulation_on_sphere_2_Tests ) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +create_single_source_cgal_program( "test_dtos.cpp" ) +create_single_source_cgal_program( "test_dtos2_remove.cpp" ) +create_single_source_cgal_program( "test_dtos_degenerate_cases.cpp" ) +create_single_source_cgal_program( "test_dtos_illegal_points.cpp" ) +create_single_source_cgal_program( "test_dtos_projection_traits.cpp" ) +create_single_source_cgal_program( "test_dtos_traits.cpp" ) + +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) - -if ( CGAL_FOUND ) - - create_single_source_cgal_program( "test_dtos.cpp" ) - create_single_source_cgal_program( "test_dtos2_remove.cpp" ) - create_single_source_cgal_program( "test_dtos_degenerate_cases.cpp" ) - create_single_source_cgal_program( "test_dtos_illegal_points.cpp" ) - create_single_source_cgal_program( "test_dtos_projection_traits.cpp" ) - create_single_source_cgal_program( "test_dtos_traits.cpp" ) - - if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program( "test_dtos_dual.cpp" ) - target_link_libraries(test_dtos_dual PUBLIC CGAL::Eigen3_support) - endif() - +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program( "test_dtos_dual.cpp" ) + target_link_libraries(test_dtos_dual PUBLIC CGAL::Eigen3_support) else() message(STATUS "NOTICE: The Eigen library was not found. The test 'test_dtos_dual' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt index 3408ad984cb..ea1bf322bf5 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Voronoi_diagram_2_Examples) -find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) +find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Qt5) # create a target per cppfile file( diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index 9172b01d64d..3c52d3d7eca 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -12,7 +12,7 @@ create_single_source_cgal_program("vda_pt.cpp") create_single_source_cgal_program("vda_rt.cpp") create_single_source_cgal_program("vda_sdg.cpp") -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("vda_tos2.cpp") diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 1ccd0cf4364..bfa7a57734b 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -11,7 +11,7 @@ create_single_source_cgal_program("projection_traits.cpp") create_single_source_cgal_program("custom_traits.cpp") create_single_source_cgal_program("convergence.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) # (requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") From e93b0b28eb6f326ed4cbe0b770ac18f75d5193d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:25:47 +0200 Subject: [PATCH 011/426] Misc trivial cleaning --- .../Arrangement_on_surface_2/lexical_cast.hpp | 2 +- .../Arrangement_on_surface_2/test_configuration.h | 2 +- BGL/examples/BGL_graphcut/CMakeLists.txt | 3 +-- .../test/Generalized_map/CMakeLists.txt | 7 ++++--- .../examples/Heat_method_3/CMakeLists.txt | 3 +-- .../cmake/modules/CGALConfig_binary.cmake.in | 2 +- .../cmake/modules/CGALConfig_install.cmake.in | 2 +- Installation/cmake/modules/CGAL_Macros.cmake | 2 +- .../include/CGAL/Sqrt_extension/convert_to_bfi.h | 2 +- .../examples/Optimal_bounding_box/CMakeLists.txt | 3 +-- Point_set_3/examples/Point_set_3/CMakeLists.txt | 3 +-- .../test/Point_set_processing_3/CMakeLists.txt | 3 +-- .../test/Polygon_mesh_processing/CMakeLists.txt | 3 +-- .../CMakeLists.txt | 9 +++------ Polyhedron/demo/Polyhedron/CMakeLists.txt | 14 ++++++-------- .../Set_movable_separability_2/CMakeLists.txt | 6 ++---- .../benchmark/Shape_regularization/CMakeLists.txt | 7 +------ .../Surface_mesh_parameterization/CMakeLists.txt | 3 +-- .../Surface_mesh_parameterization/CMakeLists.txt | 3 +-- .../demo/Triangulation_3/CMakeLists.txt | 6 ++---- 20 files changed, 32 insertions(+), 53 deletions(-) diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp index 79d885905ef..d16d9e378a8 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp @@ -1,7 +1,7 @@ #ifndef LEXICAL_CAST_HPP #define LEXICAL_CAST_HPP -/*! This files provides lexical casts from std::string to any one of the number +/*! This file provides lexical casts from std::string to any one of the number * types we intend to use in the benchmark, and a lexical cast does not exist. * It is inspired by boost::lexical_cast */ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h index dfd25a01536..2a4baa7609b 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h @@ -1,7 +1,7 @@ #ifndef CGAL_TEST_CONFIGURATION_H #define CGAL_TEST_CONFIGURATION_H -/*! This files contains define statements, include statement, and typedef +/*! This file contains define statements, include statement, and typedef * of the number types, kernel, and traits used. * */ diff --git a/BGL/examples/BGL_graphcut/CMakeLists.txt b/BGL/examples/BGL_graphcut/CMakeLists.txt index dc8be80ed63..af873296cab 100644 --- a/BGL/examples/BGL_graphcut/CMakeLists.txt +++ b/BGL/examples/BGL_graphcut/CMakeLists.txt @@ -9,5 +9,4 @@ project(BGL_graphcut_Examples) find_package(CGAL REQUIRED) create_single_source_cgal_program("alpha_expansion_example.cpp") -create_single_source_cgal_program( - "face_selection_borders_regularization_example.cpp") +create_single_source_cgal_program("face_selection_borders_regularization_example.cpp") diff --git a/Generalized_map/test/Generalized_map/CMakeLists.txt b/Generalized_map/test/Generalized_map/CMakeLists.txt index 4cebd95827c..642815d6c08 100644 --- a/Generalized_map/test/Generalized_map/CMakeLists.txt +++ b/Generalized_map/test/Generalized_map/CMakeLists.txt @@ -7,9 +7,10 @@ project(Generalized_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) - -set(hfiles Generalized_map_2_test.h Generalized_map_3_test.h - Generalized_map_4_test.h GMap_test_insertions.h) +set(hfiles Generalized_map_2_test.h + Generalized_map_3_test.h + Generalized_map_4_test.h + GMap_test_insertions.h) create_single_source_cgal_program("Generalized_map_test.cpp" ${hfiles}) diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index fc6be4f65ec..a2ca12fbc65 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -24,5 +24,4 @@ target_link_libraries(heat_method_polyhedron PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh.cpp") target_link_libraries(heat_method_surface_mesh PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_direct.cpp") -target_link_libraries(heat_method_surface_mesh_direct - PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_direct PUBLIC CGAL::Eigen3_support) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 769d18ab80d..9782812a2e3 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -1,5 +1,5 @@ # -# This files contains definitions needed to use CGAL in a program. +# This file contains definitions needed to use CGAL in a program. # DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time. # This file is loaded by cmake via the command "find_package(CGAL)" # diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index ade24452f95..4d840a8a68c 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -1,5 +1,5 @@ # -# This files contains definitions needed to use CGAL in a program. +# This file contains definitions needed to use CGAL in a program. # DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time. # This file is loaded by cmake via the command "find_package(CGAL)" # diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 6cc009ec9aa..8cc470d2673 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -360,7 +360,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}" COMPATIBILITY SameMajorVersion) - # There is also a version of CGALConfig.cmake that is prepared in case CGAL in installed in CMAKE_INSTALL_PREFIX. + # There is also a version of CGALConfig.cmake that is prepared in case CGAL is installed in CMAKE_INSTALL_PREFIX. configure_file("${CGAL_MODULES_DIR}/CGALConfig_install.cmake.in" "${CMAKE_BINARY_DIR}/config/CGALConfig.cmake" @ONLY) #write prefix exceptions diff --git a/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h b/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h index 544f8fb8790..004f53bd9c1 100644 --- a/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h +++ b/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h @@ -10,7 +10,7 @@ // // Author(s) : Michael Hemmer -// This files adds an optional static cache to convert_to_bfi for Sqrt_extension +// This file adds an optional static cache to convert_to_bfi for Sqrt_extension #ifndef CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H #define CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 97f9a323685..8c8dbb8a6e2 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -17,7 +17,6 @@ create_single_source_cgal_program("obb_example.cpp") create_single_source_cgal_program("obb_with_point_maps_example.cpp") create_single_source_cgal_program("rotated_aabb_tree_example.cpp") -foreach(target obb_example obb_with_point_maps_example - rotated_aabb_tree_example) +foreach(target obb_example obb_with_point_maps_example rotated_aabb_tree_example) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 1699f75d099..b26633c293a 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -13,8 +13,7 @@ create_single_source_cgal_program("point_set_read_xyz.cpp") create_single_source_cgal_program("point_set_advanced.cpp") set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) -create_single_source_cgal_program("point_set_read_ply.cpp" CXX_FEATURES - ${needed_cxx_features}) +create_single_source_cgal_program("point_set_read_ply.cpp" CXX_FEATURES ${needed_cxx_features}) find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 8766b4c40ca..3f5583bb8b8 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -55,8 +55,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(normal_estimation_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("hierarchy_simplification_test.cpp") - target_link_libraries(hierarchy_simplification_test - PUBLIC CGAL::Eigen3_support) + target_link_libraries(hierarchy_simplification_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("smoothing_test.cpp") target_link_libraries(smoothing_test PUBLIC CGAL::Eigen3_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index b7328227479..d3fc45f270e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -97,8 +97,7 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::TBB_support) target_link_libraries(test_pmp_distance PUBLIC CGAL::TBB_support) target_link_libraries(orient_polygon_soup_test PUBLIC CGAL::TBB_support) - target_link_libraries(self_intersection_surface_mesh_test - PUBLIC CGAL::TBB_support) + target_link_libraries(self_intersection_surface_mesh_test PUBLIC CGAL::TBB_support) else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index b4984c15043..78198bdec86 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -27,12 +27,9 @@ if(NOT TARGET CGAL::SCIP_support) endif() create_single_source_cgal_program("polygonal_surface_reconstruction_test.cpp") -target_link_libraries(polygonal_surface_reconstruction_test - PUBLIC CGAL::Eigen3_support) +target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(polygonal_surface_reconstruction_test - PUBLIC CGAL::SCIP_support) + target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::SCIP_support) else() - target_link_libraries(polygonal_surface_reconstruction_test - PUBLIC CGAL::GLPK_support) + target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::GLPK_support) endif() diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index a15bb212d96..563deff8f5c 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -29,20 +29,18 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") include_directories(BEFORE ./ ./include ./CGAL_demo) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}") -# Find CGAL - option(POLYHEDRON_QTSCRIPT_DEBUGGER "Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF) +# Find CGAL find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 ImageIO) set_package_properties(CGAL PROPERTIES TYPE REQUIRED) include(${CGAL_USE_FILE}) -# Find Qt5 itself -find_package( - Qt5 QUIET - COMPONENTS OpenGL Script Widgets - OPTIONAL_COMPONENTS ScriptTools WebSockets Network) +# Find Qt5 itself +find_package(Qt5 QUIET + COMPONENTS OpenGL Script Widgets + OPTIONAL_COMPONENTS ScriptTools WebSockets Network) set_package_properties( Qt5 PROPERTIES @@ -162,7 +160,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) # AUXILIARY LIBRARIES - # put s (which are shared libraries) at the same location as + # put plugins (which are shared libraries) at the same location as # executable files set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}") set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}") diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt index 7ee0eaa3b49..5f5008878f6 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt @@ -7,7 +7,5 @@ project(Set_movable_separability_2_Examples) find_package(CGAL REQUIRED) create_single_source_cgal_program("top_edges_single_mold_trans_cast.cpp") -create_single_source_cgal_program( - "is_pullout_direction_single_mold_trans_cast.cpp") -create_single_source_cgal_program( - "pullout_directions_single_mold_trans_cast.cpp") +create_single_source_cgal_program("is_pullout_direction_single_mold_trans_cast.cpp") +create_single_source_cgal_program("pullout_directions_single_mold_trans_cast.cpp") diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 9de592b8f8a..6ad0b25d29e 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -11,12 +11,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) find_package(OSQP QUIET) include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) - message(STATUS "Found OSQP") - - set(osqp_targets - benchmark_contours - benchmark_qp_segments) - + set(osqp_targets benchmark_contours benchmark_qp_segments) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") if(TARGET ${osqp_target}) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index b09f63d1cd8..7c2d1fb9dc8 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -17,8 +17,7 @@ if(TARGET CGAL::Eigen3_support) # ------------------------------------------------------------------ set(SuiteSparse_USE_LAPACK_BLAS ON) - find_package(SuiteSparse QUIET NO_MODULE - )# 1st: Try to locate the *config.cmake file. + find_package(SuiteSparse QUIET NO_MODULE)# 1st: Try to locate the *config.cmake file. if(NOT SuiteSparse_FOUND) set(SuiteSparse_VERBOSE ON) find_package(SuiteSparse QUIET) # 2nd: Use FindSuiteSparse.cmake module diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index 81d75a3ce49..bf1a08432cd 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -10,8 +10,7 @@ find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("extensive_parameterization_test.cpp") - target_link_libraries(extensive_parameterization_test - PUBLIC CGAL::Eigen3_support) + target_link_libraries(extensive_parameterization_test PUBLIC CGAL::Eigen3_support) else() message("NOTICE: The tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 15fc236f473..d142ca17989 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -81,7 +81,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(T3_demo) -else(Qt5_FOUND) +else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(TRIANGULATION_3_MISSING_DEPS "") @@ -96,6 +96,4 @@ else(Qt5_FOUND) message("NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}, and will not be compiled.") -endif( - CGAL_Qt5_FOUND - AND Qt5_FOUND) +endif(CGAL_Qt5_FOUND AND Qt5_FOUND) From 174fefaeb854137b38430e1c909981512d62ba74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:26:06 +0200 Subject: [PATCH 012/426] Fix wrong target check for Boost program_options --- Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt | 2 +- .../test/Surface_mesh_shortest_path/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index e3c35fe60a2..844f51f4331 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -16,7 +16,7 @@ if(TARGET CGAL::Eigen3_support) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("Mesh_estimation.cpp") target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) - if(TARGET Boost::filesystem) + if(TARGET Boost::program_options) target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) else() target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index f086d72d46a..b1f2e05b69e 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -20,7 +20,7 @@ find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("TestMesh.cpp") - if(TARGET Boost::filesystem) + if(TARGET Boost::program_options) target_link_libraries(TestMesh PRIVATE Boost::program_options) else() target_link_libraries(TestMesh PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) From 81410701f788a648dd379941536faa6ac062ba47 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Sep 2022 17:25:39 +0200 Subject: [PATCH 013/426] Factorize the test "needs_ft" into a meta-function --- Filtered_kernel/include/CGAL/Filtered_predicate.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index d0035916e8b..3a89ad244ec 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -129,9 +129,15 @@ public: using result_type = typename Remove_needs_FT::Type; template - bool needs_ft(const Args&... args) const { - using Actual_approx_res = std::remove_cv_t>; - return std::is_same_v>; + struct Call_operator_needs_FT { + using Actual_approx_res = decltype(ap(c2a(std::declval())...)); + using Approx_res = std::remove_cv_t>; + enum { value = std::is_same>::value }; + }; + + template + bool needs_ft(const Args&...) const { + return Call_operator_needs_FT::value; } template @@ -153,8 +159,7 @@ public: CGAL_BRANCH_PROFILER_BRANCH(tmp); Protect_FPU_rounding p(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - using Actual_approx_res = std::remove_cv_t>; - if constexpr (std::is_same_v>) + if constexpr (Call_operator_needs_FT::value) return ep_ft(c2e_ft(args)...); else return ep_rt(c2e_rt(args)...); From f62a289d112f795df54512f65b4665ae8486c4d6 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 7 Sep 2022 10:23:10 +0300 Subject: [PATCH 014/426] Fixed _check_isolated_for_vertical_ray_shoot() --- .../include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index 45964fdf1e6..e618f3a37fa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -338,7 +338,7 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, // Otherwise, take the unbounded face. Face_const_handle face = (halfedge_found == invalid_he) ? _get_unbounded_face(tr, p, All_sides_oblivious_category()) : - face = halfedge_found->face(); + halfedge_found->face(); // Go over the isolated vertices in the face. for (auto iso_verts_it = face->isolated_vertices_begin(); From 01e072270fc7932be62e4b6f524d55789a01a6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Sep 2022 10:21:46 +0200 Subject: [PATCH 015/426] Misc minor fixes --- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 4 ++-- Surface_mesh/benchmark/CMakeLists.txt | 6 +++--- .../demo/Surface_mesh_deformation/CMakeLists.txt | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 31f3a4f2d51..9fbe55b6e75 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -14,14 +14,14 @@ create_single_source_cgal_program("kruskal_with_stored_id.cpp") create_single_source_cgal_program("normals.cpp") create_single_source_cgal_program("range.cpp") create_single_source_cgal_program("transform_iterator.cpp") +create_single_source_cgal_program("copy_polyhedron.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - create_single_source_cgal_program("copy_polyhedron.cpp") target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) else() - message(STATUS "NOTICE: The example 'copy_polyhedron' requires OpenMesh, and will not be compiled.") + message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.") endif() find_package(METIS QUIET) diff --git a/Surface_mesh/benchmark/CMakeLists.txt b/Surface_mesh/benchmark/CMakeLists.txt index 841e9b4bea9..33ae6c84569 100644 --- a/Surface_mesh/benchmark/CMakeLists.txt +++ b/Surface_mesh/benchmark/CMakeLists.txt @@ -12,12 +12,12 @@ add_definitions("-std=c++1y") # Polyhedron add_executable(polyhedron_performance performance_2.h polyhedron_performance.h polyhedron_performance.cpp) -target_link_libraries(polyhedron_performance ${CGAL_LIBRARIES}) +target_link_libraries(polyhedron_performance PRIVATE ${CGAL_LIBRARIES}) # LCC_2 add_executable(lcc_performance_2 performance_2.h lcc_performance_2.h lcc_performance_2.cpp) -target_link_libraries(lcc_performance_2 ${CGAL_LIBRARIES}) +target_link_libraries(lcc_performance_2 PRIVATE ${CGAL_LIBRARIES}) # Surface_mesh add_executable( @@ -29,7 +29,7 @@ add_executable( performance_2 performance_2.cpp performance_2.h polyhedron_performance.h surface_mesh_performance.h lcc_performance_2.h) -target_link_libraries(performance_2 ${CGAL_LIBRARIES}) +target_link_libraries(performance_2 PRIVATE ${CGAL_LIBRARIES}) create_single_source_cgal_program("sm_sms.cpp") create_single_source_cgal_program("poly_sms.cpp") diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index d0e7ddae9bb..c5805ce92f7 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -17,8 +17,7 @@ find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") - target_link_libraries(deform_mesh_for_botsch08_format - PUBLIC CGAL::Eigen3_support) + target_link_libraries(deform_mesh_for_botsch08_format PUBLIC CGAL::Eigen3_support) else() message("NOTICE: This program requires requires Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() From 1e485113e8a90685519d09d5dbeece4ccb7b4e86 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 7 Sep 2022 10:30:01 +0200 Subject: [PATCH 016/426] Add an important comment --- Filtered_kernel/include/CGAL/Filtered_predicate.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index 3a89ad244ec..f9868b05c7a 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -135,6 +135,13 @@ public: enum { value = std::is_same>::value }; }; + // ## Important note + // + // If you want to remove of rename that member function template `needs_ft`, + // please also change the lines with + // `CGAL_GENERATE_MEMBER_DETECTOR(needs_ft);` + // or `has_needs_ft` in + // the file `Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h`. template bool needs_ft(const Args&...) const { return Call_operator_needs_FT::value; From 4b660d9ec9f6a2f7634ff24a0f873a0548af2248 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 7 Sep 2022 11:10:13 +0200 Subject: [PATCH 017/426] Another proposal for Filtered_predicate_RT_FT Instead of having the return type wrapped in a `Needs_FT` tag, not the call operator overloads that can be called with `RT` are "tagged" by adding a last argument of type `RT_sufficient` with a default value. --- .../include/CGAL/Cartesian/function_objects.h | 12 +++++------ .../include/CGAL/Filtered_predicate.h | 20 ++++++++++++++----- .../include/CGAL/Kernel/interface_macros.h | 5 +++-- .../test/Kernel_23/include/CGAL/_test_new_3.h | 11 +++++++--- STL_Extension/include/CGAL/tags.h | 18 ++--------------- 5 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 7e831f8bd40..718e8f2e5e5 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -566,7 +566,7 @@ namespace CartesianKernelFunctors { typedef typename K::Comparison_result result_type; result_type - operator()(const Point_3& p, const Point_3& q, const Point_3& r) const + operator()(const Point_3& p, const Point_3& q, const Point_3& r, RT_sufficient = {}) const { return cmp_dist_to_pointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -574,32 +574,32 @@ namespace CartesianKernelFunctors { } result_type - operator()(const Point_3& p1, const Segment_3& s1, const Segment_3& s2) const + operator()(const Point_3& p1, const Segment_3& s1, const Segment_3& s2, RT_sufficient = {}) const { return internal::compare_distance_pssC3(p1,s1,s2, K()); } result_type - operator()(const Point_3& p1, const Point_3& p2, const Segment_3& s2) const + operator()(const Point_3& p1, const Point_3& p2, const Segment_3& s2, RT_sufficient = {}) const { return internal::compare_distance_ppsC3(p1,p2,s2, K()); } result_type - operator()(const Point_3& p1, const Segment_3& s2, const Point_3& p2) const + operator()(const Point_3& p1, const Segment_3& s2, const Point_3& p2, RT_sufficient = {}) const { return opposite(internal::compare_distance_ppsC3(p1,p2,s2, K())); } template - Needs_FT + result_type operator()(const T1& p, const T2& q, const T3& r) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - Needs_FT + std::enable_if_t< !std::is_same::value, result_type > operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index f9868b05c7a..9e551c23994 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -123,16 +123,26 @@ class Filtered_predicate_RT_FT EP_FT ep_ft; AP ap; - using Ares = typename Remove_needs_FT::Type; + using Ares = typename AP::result_type; public: - using result_type = typename Remove_needs_FT::Type; + using result_type = typename EP_FT::result_type; template struct Call_operator_needs_FT { - using Actual_approx_res = decltype(ap(c2a(std::declval())...)); - using Approx_res = std::remove_cv_t>; - enum { value = std::is_same>::value }; + // This type traits class checks if the call operator can be called with + // `(const Args&..., RT_sufficient())`. + using ArrayOfOne = char[1]; + using ArrayOfTwo = char[2]; + + static ArrayOfOne& test(...); + + template + static auto test(const Args2 &...args) + -> decltype(ap(c2a(args)..., RT_sufficient()), + std::declval()); + + enum { value = sizeof(test(std::declval()...)) == sizeof(ArrayOfOne) }; }; // ## Important note diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index 04b9639a91b..d086ffb920d 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -33,8 +33,9 @@ #endif // Those predicates for which Simple_cartesian maybe use division of not. -// Predicates using division must have Needs_FT as actual return -// type. +// Predicates that do not require the division must have `RT_sufficient` as last +// argument, with a default. See for example `Compare_distance_3` in the file +// Cartesian_kernel/include/CGAL/Cartesian/function_objects.h #ifndef CGAL_Kernel_pred_RT_or_FT # define CGAL_Kernel_pred_RT_or_FT(X, Y) CGAL_Kernel_pred(X, Y) #endif diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h index 993b9ce57ca..d380a39d697 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h @@ -606,17 +606,22 @@ test_new_3(const R& rep) typename R::Compare_distance_3 compare_dist = rep.compare_distance_3_object(); Comparison_result tmp34ab = compare_dist(p2,p3,p4); + tmp34ab = compare_dist(p1, s2, s2); + tmp34ab = compare_dist(p1, p2, s2); + tmp34ab = compare_dist(p1, s2, p2); tmp34ab = compare_dist(p2,p3,p2,p3); tmp34ab = compare_dist(p1, p2, p3, p4); tmp34ab = compare_dist(l2, p1, p1); - tmp34ab = compare_dist(p1, p2, s2); if constexpr (R::Has_filtered_predicates && has_needs_ft::value) { + assert(!compare_dist.needs_ft(p1, p2, p3)); + assert(!compare_dist.needs_ft(p2, s2, s2)); + assert(!compare_dist.needs_ft(p2, p2, s2)); + assert(!compare_dist.needs_ft(p1, s2, p2)); assert(compare_dist.needs_ft(l1, p1, p1)); assert(compare_dist.needs_ft(p2, p3, p2, p3)); - assert(!compare_dist.needs_ft(p1, p2, p3)); - assert(!compare_dist.needs_ft(p2, p2, s2)); + assert(compare_dist.needs_ft(p2, s2, l1, s2)); } (void) tmp34ab; diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index dbacc57b2d3..d0dca45ac86 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -81,22 +81,8 @@ Assert_compile_time_tag( const Tag&, const Derived& b) x.match_compile_time_tag(b); } -template -struct Needs_FT { - T value; - Needs_FT(T v) : value(v) {} - operator T() const { return value; } -}; - -template -struct Remove_needs_FT { - using Type = T; -}; - -template -struct Remove_needs_FT> { - using Type = T; -}; +// for Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +struct RT_sufficient {}; } //namespace CGAL From b78da384906a94e7960a4cd52b26d8bbf2cdd2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Sep 2022 11:42:44 +0200 Subject: [PATCH 018/426] Add 'REQUIRED' in the documentation's `find_package(CGAL)` usages --- .../Developer_manual/create_and_use_a_cmakelist.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index 68318652bdc..02ff32da6bc 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -6,7 +6,7 @@ A base can be created using the script `cgal_create_CMakeLists`. Its usage is de \section seclink Linking with CGAL To link with the \cgal library, use the following: \code -find_package(CGAL) +find_package(CGAL REQUIRED) add_executable(my_executable my_source_file.cpp) target_link_libraries(my_executable CGAL::CGAL) \endcode @@ -14,7 +14,7 @@ target_link_libraries(my_executable CGAL::CGAL) Other \cgal libraries are linked similarly. For example, with `CGAL_Core`: \code -find_package(CGAL COMPONENTS Core) +find_package(CGAL REQUIRED COMPONENTS Core) target_link_libraries(my_executable CGAL::CGAL CGAL::CGAL_Core) \endcode From dcca65b7403f7322bfb473a894f49eea549b96ed Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 7 Sep 2022 14:48:45 +0200 Subject: [PATCH 019/426] Spelling typo --- Kernel_23/include/CGAL/Kernel/interface_macros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index 04b9639a91b..5da0e0c0052 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -18,7 +18,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred, CGAL_Kernel_cons and CGAL_Kernel_obj. // And they are #undefed at the end of this file. From 8521c44c6f7ec9bb0096b3b74af4547ef41bf1c4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 7 Sep 2022 15:10:39 +0200 Subject: [PATCH 020/426] Add a constexpr, because I can --- Filtered_kernel/include/CGAL/Filtered_predicate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index 9e551c23994..f7ea91355aa 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -153,7 +153,7 @@ public: // or `has_needs_ft` in // the file `Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h`. template - bool needs_ft(const Args&...) const { + constexpr bool needs_ft(const Args&...) const { return Call_operator_needs_FT::value; } From f52298a8c5012bdddc33a29919df0aec8fb1821e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 8 Sep 2022 17:30:14 +0200 Subject: [PATCH 021/426] WIP: try to always use Filtered_predicate_RT_FT --- .../include/CGAL/Cartesian/function_objects.h | 66 +++++++++++-------- .../include/CGAL/Filtered_kernel.h | 14 ++-- .../include/CGAL/Kernel/function_objects.h | 56 +++++++++------- .../Kernel_23/internal/Projection_traits_3.h | 4 +- .../test/Kernel_23/test_projection_traits.cpp | 1 + 5 files changed, 84 insertions(+), 57 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 718e8f2e5e5..6c74a59a930 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -398,7 +398,7 @@ namespace CartesianKernelFunctors { Collinear_2(const Orientation_2 o_) : o(o_) {} result_type - operator()(const Point_2& p, const Point_2& q, const Point_2& r) const + operator()(const Point_2& p, const Point_2& q, const Point_2& r, RT_sufficient = {}) const { return o(p, q, r) == COLLINEAR; } }; @@ -410,7 +410,7 @@ namespace CartesianKernelFunctors { typedef typename K::Boolean result_type; result_type - operator()(const Point_3& p, const Point_3& q, const Point_3& r) const + operator()(const Point_3& p, const Point_3& q, const Point_3& r, RT_sufficient = {}) const { return collinearC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -453,7 +453,7 @@ namespace CartesianKernelFunctors { } template - result_type + std::enable_if_t< !std::is_same::value, result_type > operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); @@ -618,7 +618,7 @@ namespace CartesianKernelFunctors { Comparison_result operator()(const Point_2& r, const Weighted_point_2& p, - const Weighted_point_2& q) const + const Weighted_point_2& q, RT_sufficient = {}) const { return CGAL::compare_power_distanceC2(p.x(), p.y(), p.weight(), q.x(), q.y(), q.weight(), @@ -3769,7 +3769,8 @@ namespace CartesianKernelFunctors { #endif // CGAL_kernel_exactness_preconditions result_type - operator()(const Point_3& p, const Point_3& q, const Point_3& r) const + operator()(const Point_3& p, const Point_3& q, const Point_3& r, + RT_sufficient = {}) const { return coplanar_orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -3778,7 +3779,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& s) const + const Point_3& r, const Point_3& s, + RT_sufficient = {}) const { // p,q,r,s supposed to be coplanar // p,q,r supposed to be non collinear @@ -3819,7 +3821,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& t) const + const Point_3& r, const Point_3& t, + RT_sufficient = {}) const { // p,q,r,t are supposed to be coplanar. // p,q,r determine an orientation of this plane (not collinear). @@ -4206,20 +4209,20 @@ namespace CartesianKernelFunctors { public: typedef typename K::Orientation result_type; - result_type - operator()(const Point_2& p, const Point_2& q, const Point_2& r) const + result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, + RT_sufficient = {}) const { return orientationC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } result_type - operator()(const Vector_2& u, const Vector_2& v) const + operator()(const Vector_2& u, const Vector_2& v, RT_sufficient = {}) const { return orientationC2(u.x(), u.y(), v.x(), v.y()); } result_type - operator()(const Circle_2& c) const + operator()(const Circle_2& c, RT_sufficient = {}) const { return c.rep().orientation(); } @@ -4237,7 +4240,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& s) const + const Point_3& r, const Point_3& s, RT_sufficient = {}) const { return orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4246,7 +4249,8 @@ namespace CartesianKernelFunctors { } result_type - operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const + operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w, + RT_sufficient = {}) const { return orientationC3(u.x(), u.y(), u.z(), v.x(), v.y(), v.z(), @@ -4255,7 +4259,7 @@ namespace CartesianKernelFunctors { result_type operator()( Origin, const Point_3& u, - const Point_3& v, const Point_3& w) const + const Point_3& v, const Point_3& w, RT_sufficient = {}) const { return orientationC3(u.x(), u.y(), u.z(), v.x(), v.y(), v.z(), @@ -4263,13 +4267,13 @@ namespace CartesianKernelFunctors { } result_type - operator()( const Tetrahedron_3& t) const + operator()( const Tetrahedron_3& t, RT_sufficient = {}) const { return t.rep().orientation(); } result_type - operator()(const Sphere_3& s) const + operator()(const Sphere_3& s, RT_sufficient = {}) const { return s.rep().orientation(); } @@ -4287,7 +4291,8 @@ namespace CartesianKernelFunctors { Oriented_side operator()(const Weighted_point_2& p, const Weighted_point_2& q, const Weighted_point_2& r, - const Weighted_point_2& t) const + const Weighted_point_2& t, + RT_sufficient = {}) const { //CGAL_kernel_precondition( ! collinear(p, q, r) ); return power_side_of_oriented_power_circleC2(p.x(), p.y(), p.weight(), @@ -4308,7 +4313,8 @@ namespace CartesianKernelFunctors { Oriented_side operator()(const Weighted_point_2& p, const Weighted_point_2& q, - const Weighted_point_2& t) const + const Weighted_point_2& t, + RT_sufficient = {}) const { //CGAL_kernel_precondition( collinear(p, q, r) ); //CGAL_kernel_precondition( p.point() != q.point() ); @@ -4318,7 +4324,8 @@ namespace CartesianKernelFunctors { } Oriented_side operator()(const Weighted_point_2& p, - const Weighted_point_2& t) const + const Weighted_point_2& t, + RT_sufficient = {}) const { //CGAL_kernel_precondition( p.point() == r.point() ); Comparison_result r = CGAL::compare(p.weight(), t.weight()); @@ -4407,7 +4414,8 @@ namespace CartesianKernelFunctors { typedef typename K::Bounded_side result_type; result_type - operator()( const Point_2& p, const Point_2& q, const Point_2& t) const + operator()( const Point_2& p, const Point_2& q, const Point_2& t, + RT_sufficient = {}) const { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), @@ -4416,7 +4424,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q, - const Point_2& r, const Point_2& t) const + const Point_2& r, const Point_2& t, + RT_sufficient = {}) const { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), t.x(), t.y()); @@ -4431,7 +4440,8 @@ namespace CartesianKernelFunctors { typedef typename K::Bounded_side result_type; result_type - operator()( const Point_3& p, const Point_3& q, const Point_3& test) const + operator()( const Point_3& p, const Point_3& q, const Point_3& test, + RT_sufficient = {}) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4440,7 +4450,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& test) const + const Point_3& r, const Point_3& test, + RT_sufficient = {}) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4450,7 +4461,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, - const Point_3& s, const Point_3& test) const + const Point_3& s, const Point_3& test, + RT_sufficient = {}) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4469,7 +4481,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q, - const Point_2& r, const Point_2& t) const + const Point_2& r, const Point_2& t, + RT_sufficient = {}) const { return side_of_oriented_circleC2(p.x(), p.y(), q.x(), q.y(), @@ -4487,7 +4500,8 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, - const Point_3& s, const Point_3& test) const + const Point_3& s, const Point_3& test, + RT_sufficient = {}) const { return side_of_oriented_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel.h b/Filtered_kernel/include/CGAL/Filtered_kernel.h index 372295066cf..9d7493d68a3 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel.h @@ -81,13 +81,13 @@ struct Filtered_kernel_base Approximate_kernel approximate_kernel() const { return {}; } // We change the predicates. -#define CGAL_Kernel_pred(P, Pf) \ - typedef Filtered_predicate P; \ - P Pf() const { return P(); } +// #define CGAL_Kernel_pred(P, Pf) \ +// typedef Filtered_predicate P; \ +// P Pf() const { return P(); } -#define CGAL_Kernel_pred_RT(P, Pf) \ - typedef Filtered_predicate P; \ - P Pf() const { return P(); } +// #define CGAL_Kernel_pred_RT(P, Pf) \ +// typedef Filtered_predicate P; \ +// P Pf() const { return P(); } #define CGAL_Kernel_pred_RT_or_FT(P, Pf) \ typedef Filtered_predicate_RT_FT P; \ P Pf() const { return P(); } +#define CGAL_Kernel_pred_RT(P, Pf) CGAL_Kernel_pred_RT_or_FT(P, Pf) +#define CGAL_Kernel_pred(P, Pf) CGAL_Kernel_pred_RT_or_FT(P, Pf) // We don't touch the constructions. #define CGAL_Kernel_cons(Y,Z) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index ead2582c6bc..9966fad0a1f 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -20,6 +20,7 @@ #ifndef CGAL_KERNEL_FUNCTION_OBJECTS_H #define CGAL_KERNEL_FUNCTION_OBJECTS_H +#include #include #include #include @@ -30,7 +31,7 @@ #include #include - +#include // for std::is_same and std::enable_if #include // for Compute_dihedral_angle namespace CGAL { @@ -338,7 +339,8 @@ namespace CommonKernelFunctors { Comparison_result operator()(const Point_3 & p, const Weighted_point_3 & q, - const Weighted_point_3 & r) const + const Weighted_point_3 & r, + RT_sufficient = {}) const { return compare_power_distanceC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), q.weight(), @@ -513,7 +515,8 @@ namespace CommonKernelFunctors { const Weighted_point_3 & q, const Weighted_point_3 & r, const Weighted_point_3 & s, - const Weighted_point_3 & t) const + const Weighted_point_3 & t, + RT_sufficient = {}) const { return power_side_of_oriented_power_sphereC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -535,7 +538,8 @@ namespace CommonKernelFunctors { Oriented_side operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, const Weighted_point_3 & r, - const Weighted_point_3 & s) const + const Weighted_point_3 & s, + RT_sufficient = {}) const { //CGAL_kernel_precondition( coplanar(p, q, r, s) ); //CGAL_kernel_precondition( !collinear(p, q, r) ); @@ -547,7 +551,8 @@ namespace CommonKernelFunctors { Oriented_side operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, - const Weighted_point_3 & r) const + const Weighted_point_3 & r, + RT_sufficient = {}) const { //CGAL_kernel_precondition( collinear(p, q, r) ); //CGAL_kernel_precondition( p.point() != q.point() ); @@ -557,7 +562,8 @@ namespace CommonKernelFunctors { } Oriented_side operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q) const + const Weighted_point_3 & q, + RT_sufficient = {}) const { //CGAL_kernel_precondition( p.point() == r.point() ); return power_side_of_oriented_power_sphereC3(p.weight(),q.weight()); @@ -824,7 +830,7 @@ namespace CommonKernelFunctors { } template - result_type + std::enable_if_t< !std::is_same::value, result_type > operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); @@ -846,7 +852,7 @@ namespace CommonKernelFunctors { } template - result_type + std::enable_if_t< !std::is_same::value, result_type > operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); @@ -2988,7 +2994,8 @@ namespace CommonKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& s) const + const Point_3& r, const Point_3& s, + RT_sufficient = {}) const { return o(p, q, r, s) == COPLANAR; } @@ -3032,13 +3039,16 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& t1, const T2& t2) const + operator()(const T1& t1, const T2& t2, RT_sufficient = {}) const { return Intersections::internal::do_intersect(t1, t2, K()); } - result_type - operator()(const typename K::Plane_3& pl1, const typename K::Plane_3& pl2, const typename K::Plane_3& pl3) const - { return Intersections::internal::do_intersect(pl1, pl2, pl3, K() ); } - + result_type operator()(const typename K::Plane_3& pl1, + const typename K::Plane_3& pl2, + const typename K::Plane_3& pl3, + RT_sufficient = {}) const + { + return Intersections::internal::do_intersect(pl1, pl2, pl3, K()); + } }; template @@ -3656,39 +3666,39 @@ namespace CommonKernelFunctors { typedef typename K::Boolean result_type; result_type - operator()( const Iso_cuboid_3& c) const + operator()( const Iso_cuboid_3& c, RT_sufficient = {}) const { return c.rep().is_degenerate(); } result_type - operator()( const Line_3& l) const + operator()( const Line_3& l, RT_sufficient = {}) const { return l.rep().is_degenerate(); } result_type - operator()( const Plane_3& pl) const + operator()( const Plane_3& pl, RT_sufficient = {}) const { return pl.rep().is_degenerate(); } result_type - operator()( const Ray_3& r) const + operator()( const Ray_3& r, RT_sufficient = {}) const { return r.rep().is_degenerate(); } result_type - operator()( const Segment_3& s) const + operator()( const Segment_3& s, RT_sufficient = {}) const { return s.rep().is_degenerate(); } result_type - operator()( const Sphere_3& s) const + operator()( const Sphere_3& s, RT_sufficient = {}) const { return s.rep().is_degenerate(); } result_type - operator()( const Triangle_3& t) const + operator()( const Triangle_3& t, RT_sufficient = {}) const { return t.rep().is_degenerate(); } result_type - operator()( const Tetrahedron_3& t) const + operator()( const Tetrahedron_3& t, RT_sufficient = {}) const { return t.rep().is_degenerate(); } result_type - operator()( const Circle_3& t) const + operator()( const Circle_3& t, RT_sufficient = {}) const { return t.rep().is_degenerate(); } }; diff --git a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h index 120fa052a85..353bcaea13d 100644 --- a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h @@ -13,7 +13,7 @@ #define CGAL_INTERNAL_PROJECTION_TRAITS_3_H #include - +#include #include #include #include @@ -1021,7 +1021,7 @@ public: struct Collinear_2 { typedef typename R::Boolean result_type; - bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const + bool operator()(const Point_2& p, const Point_2& q, const Point_2& r, RT_sufficient = {}) const { Orientation_2 ori; return ori(p,q,r) == COLLINEAR; diff --git a/Kernel_23/test/Kernel_23/test_projection_traits.cpp b/Kernel_23/test/Kernel_23/test_projection_traits.cpp index 50171ee754d..6929698c39d 100644 --- a/Kernel_23/test/Kernel_23/test_projection_traits.cpp +++ b/Kernel_23/test/Kernel_23/test_projection_traits.cpp @@ -1,3 +1,4 @@ +#define CGAL_NO_MPZF_DIVISION_OPERATOR 1 #include #include From 6f187f332cbb592c95a250b6a66beadfc5ac8766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 14 Sep 2022 14:08:23 +0200 Subject: [PATCH 022/426] Misc minor fixes/improvements --- .../examples/Algebraic_kernel_d/CMakeLists.txt | 2 +- Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt | 2 ++ Box_intersection_d/test/Box_intersection_d/CMakeLists.txt | 2 +- CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 2 +- Classification/examples/Classification/CMakeLists.txt | 4 +++- Classification/test/Classification/CMakeLists.txt | 2 +- Combinatorial_map/test/Combinatorial_map/CMakeLists.txt | 2 ++ Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt | 1 + GraphicsView/demo/Polygon/CMakeLists.txt | 2 +- Heat_method_3/examples/Heat_method_3/CMakeLists.txt | 2 +- Heat_method_3/test/Heat_method_3/CMakeLists.txt | 2 +- Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt | 2 +- Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt | 2 +- Mesh_3/test/Mesh_3/CMakeLists.txt | 2 +- NewKernel_d/test/NewKernel_d/CMakeLists.txt | 2 +- Number_types/test/Number_types/CMakeLists.txt | 4 ++-- .../benchmark/Optimal_bounding_box/CMakeLists.txt | 2 +- .../examples/Optimal_bounding_box/CMakeLists.txt | 2 +- .../test/Optimal_bounding_box/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 2 +- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 2 +- Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt | 2 +- .../Poisson_surface_reconstruction_3/CMakeLists.txt | 2 +- .../test/Poisson_surface_reconstruction_3/CMakeLists.txt | 2 +- .../benchmark/Polygon_mesh_processing/CMakeLists.txt | 2 +- .../Polygonal_surface_reconstruction/CMakeLists.txt | 6 +++--- .../test/Polygonal_surface_reconstruction/CMakeLists.txt | 2 +- Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 +- .../demo/Principal_component_analysis/CMakeLists.txt | 2 +- .../examples/Principal_component_analysis/CMakeLists.txt | 2 +- .../test/Principal_component_analysis/CMakeLists.txt | 2 +- Property_map/examples/Property_map/CMakeLists.txt | 2 +- Property_map/test/Property_map/CMakeLists.txt | 1 + Ridges_3/examples/Ridges_3/CMakeLists.txt | 2 +- Ridges_3/test/Ridges_3/CMakeLists.txt | 2 +- SMDS_3/test/SMDS_3/CMakeLists.txt | 2 +- .../benchmark/compact_container_benchmark/CMakeLists.txt | 5 ++++- STL_Extension/test/STL_Extension/CMakeLists.txt | 3 +++ .../examples/Scale_space_reconstruction_3/CMakeLists.txt | 4 +++- Shape_detection/benchmark/Shape_detection/CMakeLists.txt | 2 +- Shape_detection/test/Shape_detection/CMakeLists.txt | 1 + .../benchmark/Shape_regularization/CMakeLists.txt | 2 ++ .../examples/Shape_regularization/CMakeLists.txt | 1 + Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt | 1 + Solver_interface/examples/Solver_interface/CMakeLists.txt | 8 +++++++- .../benchmark/Spatial_searching/CMakeLists.txt | 2 +- .../examples/Spatial_searching/CMakeLists.txt | 2 ++ Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt | 1 + Spatial_sorting/test/Spatial_sorting/CMakeLists.txt | 1 + .../examples/Surface_mesh_approximation/CMakeLists.txt | 2 +- .../test/Surface_mesh_approximation/CMakeLists.txt | 2 +- .../optimal_rotation/CMakeLists.txt | 2 +- .../demo/Surface_mesh_deformation/CMakeLists.txt | 2 +- .../examples/Surface_mesh_deformation/CMakeLists.txt | 4 +++- .../test/Surface_mesh_deformation/CMakeLists.txt | 4 +++- .../examples/Surface_mesh_parameterization/CMakeLists.txt | 2 +- .../test/Surface_mesh_parameterization/CMakeLists.txt | 2 +- .../examples/Surface_mesh_segmentation/CMakeLists.txt | 2 ++ .../examples/Surface_mesh_shortest_path/CMakeLists.txt | 2 ++ .../test/Surface_mesh_shortest_path/CMakeLists.txt | 4 ++++ .../examples/Surface_mesh_simplification/CMakeLists.txt | 4 ++++ .../benchmark/Surface_mesh_skeletonization/CMakeLists.txt | 2 +- .../examples/Surface_mesh_skeletonization/CMakeLists.txt | 5 ++++- .../test/Surface_mesh_skeletonization/CMakeLists.txt | 2 +- TDS_3/test/TDS_3/CMakeLists.txt | 3 +++ Testsuite/test/collect_cgal_testresults_from_cmake | 2 +- .../examples/Tetrahedral_remeshing/CMakeLists.txt | 2 ++ Triangulation/applications/Triangulation/CMakeLists.txt | 2 +- Triangulation/benchmark/Triangulation/CMakeLists.txt | 3 ++- Triangulation/examples/Triangulation/CMakeLists.txt | 2 +- Triangulation/test/Triangulation/CMakeLists.txt | 2 +- Triangulation_3/examples/Triangulation_3/CMakeLists.txt | 2 ++ Triangulation_3/test/Triangulation_3/CMakeLists.txt | 3 +++ .../demo/Triangulation_on_sphere_2/CMakeLists.txt | 2 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 75 files changed, 119 insertions(+), 58 deletions(-) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index c1fd8d009f6..696fdabc10a 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -3,7 +3,7 @@ project(Algebraic_kernel_d_Examples) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(MPFI) +find_package(MPFI QUIET) if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) include(${MPFI_USE_FILE}) create_single_source_cgal_program("Compare_1.cpp") diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index aafb87f5217..33e96b365e9 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -6,11 +6,13 @@ find_package(CGAL REQUIRED COMPONENTS Core) find_package(MPFI QUIET) if(MPFI_FOUND) + message(STATUS "Found MPFI") include(${MPFI_USE_FILE}) endif() find_package(RS3 QUIET) if(RS3_FOUND) + message(STATUS "Found RS3") include(${RS3_USE_FILE}) endif() diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 0a032673863..56fa8d95856 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -17,5 +17,5 @@ include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() - message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") + message(STATUS "NOTICE: Intel TBB was not found. Parallel code will not be used.") endif() diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 8944aae476d..f017575dd85 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -22,7 +22,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) include(${CGAL_USE_FILE}) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 3901b756407..daf1223226e 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") @@ -49,6 +49,8 @@ create_single_source_cgal_program( "example_deprecated_conversion.cpp" ) find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning include(CGAL_OpenCV_support) if(TARGET CGAL::OpenCV_support) + message(STATUS "Found OpenCV") + create_single_source_cgal_program( "example_opencv_random_forest.cpp" ) target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support) else() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index c2a8f3211dc..6e179f78144 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 898951705f9..f38888d60e5 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -27,6 +27,8 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) # Link with OpenMesh if possible find_package(OpenMesh QUIET) if(TARGET OpenMesh::OpenMesh) + message(STATUS "Found OpenMesh") + target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh) diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index bfb1068c315..2b436e6ea29 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -22,6 +22,7 @@ create_single_source_cgal_program("extreme_indices_3.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") create_single_source_cgal_program("quickhull_OM_3.cpp") target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 5aa21d3880b..8314d618d2f 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 Core) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This demo requires the Eigen library, and will not be compiled.") diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index a2ca12fbc65..42c7c498369 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Heat_method_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.3.0) +find_package(Eigen3 3.3.0 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.") diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index f57897dc07b..bd1f923430e 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Heat_method_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.3.0) +find_package(Eigen3 3.3.0 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.") diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index 844f51f4331..b68d6a52fd0 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Jet_fitting_3_Examples) find_package(CGAL REQUIRED) # use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index c371969ef24..008acda4622 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Jet_fitting_3_Tests) find_package(CGAL REQUIRED) # use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("blind_1pt.cpp") diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 58fb91a6bb9..471906677c7 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -7,7 +7,7 @@ project( Mesh_3_Tests ) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if (NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/NewKernel_d/test/NewKernel_d/CMakeLists.txt b/NewKernel_d/test/NewKernel_d/CMakeLists.txt index 103bcabd9ca..bb66aa77eb3 100644 --- a/NewKernel_d/test/NewKernel_d/CMakeLists.txt +++ b/NewKernel_d/test/NewKernel_d/CMakeLists.txt @@ -12,7 +12,7 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) file( diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index a637db06486..1fb8b4aff34 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -66,7 +66,7 @@ create_single_source_cgal_program("utilities.cpp") find_package( GMP ) if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" ) - find_package( MPFI ) + find_package(MPFI QUIET) if( MPFI_FOUND ) include( ${MPFI_USE_FILE} ) endif() #MPFI_FOUND @@ -76,7 +76,7 @@ if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program( "Gmpfi.cpp" ) create_single_source_cgal_program( "Gmpfr_bug.cpp" ) create_single_source_cgal_program( "test_eigen.cpp" ) - find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) + find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if (TARGET CGAL::Eigen3_support) target_link_libraries(test_eigen PUBLIC CGAL::Eigen3_support) diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index 31b92ab56e6..0bbc27d0aa8 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,7 +7,7 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 8c8dbb8a6e2..d771e4440e4 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index db5e5b0a874..0bbca049598 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index b4e92f36ee9..432d99b21c4 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -16,7 +16,7 @@ create_single_source_cgal_program("octree_traversal_preorder.cpp") create_single_source_cgal_program("octree_grade.cpp") create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen_support) if (TARGET CGAL::Eigen_support) create_single_source_cgal_program("orthtree_build.cpp") diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 70027d80b08..e27c0b7afff 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -8,7 +8,7 @@ project(Periodic_3_mesh_3_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index b962e56be41..9f8d277a28a 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Periodic_3_mesh_3_Tests) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 40694e9e5d1..d62b4bccd03 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -19,7 +19,7 @@ if(MSVC) endif() # Find Eigen3 (requires 3.1.0 or greater) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 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 347a37eeab9..efd978ee3a3 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 @@ -18,7 +18,7 @@ if(MSVC) message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +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 diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index fd77f8a046d..5fcd1fc630a 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -7,7 +7,7 @@ project(Polygon_mesh_processing) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: Benchmarks require Eigen 3.2 (or greater), and will not be compiled") diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index a5bd6e2c6a4..32d10eb1480 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,17 +8,17 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() -find_package(SCIP) +find_package(SCIP QUIET) include(CGAL_SCIP_support) if(NOT TARGET CGAL::SCIP_support) - find_package(GLPK) + find_package(GLPK QUIET) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 78198bdec86..790da0f2757 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 563deff8f5c..1b967c1d5af 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -63,7 +63,7 @@ if(NOT TARGET CGAL::Eigen3_support) message(STATUS "NOTICE: Eigen was not found.") endif() -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) set_package_properties( METIS PROPERTIES diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index 60b1475d431..6ec0024f3a5 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -17,7 +17,7 @@ include_directories(./) # Find CGAL and CGAL Qt5 find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt index 6ba4150b812..5eaeeee35a3 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt @@ -7,7 +7,7 @@ project(Principal_component_analysis_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt index 9fb9d3a75db..8a4078ffd37 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt @@ -7,7 +7,7 @@ project(Principal_component_analysis_Tests) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index 771f98f63ed..4cc28458f81 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -6,7 +6,7 @@ find_package(CGAL REQUIRED) create_single_source_cgal_program("dynamic_properties.cpp") -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("custom_property_map.cpp") diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index ab38886b812..b0480bfa209 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -11,6 +11,7 @@ create_single_source_cgal_program("kernel_converter_properties_test.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + message(STATUS "Found OpenMesh") include(UseOpenMesh) target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index f310a7f98f0..fa1c4c35ff6 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -4,7 +4,7 @@ project(Ridges_3_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index 4ec3de72518..f47bdeca10a 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -6,7 +6,7 @@ project(Ridges_3_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("ridge_test.cpp") diff --git a/SMDS_3/test/SMDS_3/CMakeLists.txt b/SMDS_3/test/SMDS_3/CMakeLists.txt index 2baa66ee018..7124b808434 100644 --- a/SMDS_3/test/SMDS_3/CMakeLists.txt +++ b/SMDS_3/test/SMDS_3/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(CGAL REQUIRED) create_single_source_cgal_program( "test_simplicial_cb_vb.cpp") -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "test_c3t3.cpp" ) diff --git a/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt b/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt index 29f55d23097..4771b63fe10 100644 --- a/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt +++ b/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt @@ -3,9 +3,12 @@ project(Compact_container_benchmark) find_package(CGAL REQUIRED) -find_package(TBB) +find_package(TBB QUIET) include(CGAL_TBB_support) + create_single_source_cgal_program("cc_benchmark.cpp") + if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(cc_benchmark PUBLIC CGAL::TBB_support) endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index a295d487ca3..d2590609109 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -51,12 +51,15 @@ create_single_source_cgal_program("test_vector.cpp") create_single_source_cgal_program("test_join_iterators.cpp") create_single_source_cgal_program("test_for_each.cpp") if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + message(STATUS "Found OpenMesh") include(UseOpenMesh) + create_single_source_cgal_program("test_hash_OpenMesh.cpp") target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() 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 8aec35e8e15..8a7397b76d3 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 @@ -14,7 +14,7 @@ if(ACTIVATE_CONCURRENCY) endif() endif() -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("scale_space.cpp") @@ -27,6 +27,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(scale_space_advancing_front PUBLIC CGAL::Eigen3_support) if(ACTIVATE_CONCURRENCY AND TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + target_link_libraries(scale_space PUBLIC CGAL::TBB_support) target_link_libraries(scale_space_incremental PUBLIC CGAL::TBB_support) target_link_libraries(scale_space_manifold PUBLIC CGAL::TBB_support) diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 8b7bd020dd3..eb5185726dc 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -6,7 +6,7 @@ project(Shape_detection_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) # (3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_region_growing_on_point_set_2.cpp") diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 5250b7a6a4b..e625c9f8b83 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -30,6 +30,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_region_growing_on_point_set_3_with_sorting.cpp") create_single_source_cgal_program("test_region_growing_on_polygon_mesh_with_sorting.cpp") create_single_source_cgal_program("test_region_growing_on_degenerated_mesh.cpp") + foreach( target test_region_growing_basic diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 6ad0b25d29e..06073318cbc 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -11,6 +11,8 @@ find_package(CGAL REQUIRED COMPONENTS Core) find_package(OSQP QUIET) include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) + message(STATUS "Found OSQP") + set(osqp_targets benchmark_contours benchmark_qp_segments) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index d01c9585a16..78cd7bfe429 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -31,6 +31,7 @@ if(TARGET CGAL::OSQP_support) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen") + create_single_source_cgal_program("regularize_real_data_2.cpp") target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support) else() diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index 24e5253b5ea..f637565bc51 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -22,6 +22,7 @@ create_single_source_cgal_program("union_of_balls_subdiv.cpp") find_package(ESBTL QUIET) if(ESBTL_FOUND) + message(STATUS "Found ESBTL") include_directories(${ESBTL_INCLUDE_DIR}) create_single_source_cgal_program("skin_surface_pdb_reader.cpp") else(ESBTL_FOUND) diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index b269af2e059..cf7fafadd89 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -7,7 +7,7 @@ project(Solver_interface_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("singular_value_decomposition.cpp") @@ -23,6 +23,8 @@ endif() find_package(OSQP QUIET) include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) + message(STATUS "Found OSQP") + create_single_source_cgal_program("osqp_quadratic_program.cpp") target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) message(STATUS "OSQP found and used") @@ -33,6 +35,8 @@ endif() find_package(SCIP QUIET) include(CGAL_SCIP_support) if(TARGET CGAL::SCIP_support) + message(STATUS "Found SCIP") + create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) message(STATUS "SCIP found and used") @@ -40,6 +44,8 @@ else() find_package(GLPK QUIET) include(CGAL_GLPK_support) if(TARGET CGAL::GLPK_support) + message(STATUS "Found GLPK") + create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) message(STATUS "GLPK found and used") diff --git a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt index 239b7f03600..cc0ac42097f 100644 --- a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) include_directories(BEFORE "include") -find_package(Eigen3 3.1.91) # (requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) # (requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These benchmarks require Eigen 3.1.91 (or greater), and will not be compiled.") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 53661afd8bb..df150df4c8d 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -43,6 +43,8 @@ endif() find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + create_single_source_cgal_program("parallel_kdtree.cpp") target_link_libraries(parallel_kdtree PUBLIC CGAL::TBB_support) else() diff --git a/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt index e1fd380977a..e8cd7e05df7 100644 --- a/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt @@ -17,5 +17,6 @@ endforeach() find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(parallel_spatial_sort_3 PUBLIC CGAL::TBB_support) endif() diff --git a/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt index 7ac68ead263..e7f809cb086 100644 --- a/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt @@ -12,5 +12,6 @@ create_single_source_cgal_program("test_multiscale.cpp") find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(test_hilbert PUBLIC CGAL::TBB_support) endif() diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 7748468d634..e61a9141b62 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Examples) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index d1acae25bf2..0c269600668 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Tests) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index 6e3106ff9f4..15ec2c40838 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -3,7 +3,7 @@ project(benchmark_for_closest_rotation) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_for_concept_models.cpp") diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index c5805ce92f7..33263a81543 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -13,7 +13,7 @@ set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 19989c9654d..e61a3546eb2 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") @@ -34,6 +34,8 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") target_link_libraries(all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index cc33b2b8f22..b903ca3bcf0 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Cactus_deformation_session.cpp") @@ -19,6 +19,8 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("Cactus_deformation_session_OpenMesh.cpp") target_link_libraries(Cactus_deformation_session_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 7c2d1fb9dc8..78a9f87f083 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -5,7 +5,7 @@ project(Surface_mesh_parameterization_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +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 diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index bf1a08432cd..ab08e517ccd 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_parameterization_Tests) # Find CGAL find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("extensive_parameterization_test.cpp") diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 6f8460fec27..b319050e6a5 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -18,6 +18,8 @@ create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("segmentation_from_sdf_values_OpenMesh_example.cpp") target_link_libraries(segmentation_from_sdf_values_OpenMesh_example PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt index 67c248833c6..763fb37b61a 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt @@ -16,6 +16,8 @@ create_single_source_cgal_program("shortest_path_with_locate.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("shortest_paths_OpenMesh.cpp") target_link_libraries(shortest_paths_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt index b1f2e05b69e..f3184c37609 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -14,10 +14,14 @@ create_single_source_cgal_program("Surface_mesh_shortest_path_test_6.cpp") create_single_source_cgal_program("Surface_mesh_shortest_path_traits_test.cpp") find_package(LEDA QUIET) +if(LEDA_FOUND) + message(STATUS "Found LEDA") +endif() # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) + message(STATUS "Found Boost program_options") if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("TestMesh.cpp") if(TARGET Boost::program_options) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index e082b7e942a..4b2c37925e1 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -31,6 +31,8 @@ endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() @@ -43,6 +45,8 @@ include(CGAL_METIS_support) find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) + message(STATUS "Found METIS & TBB") + create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") target_link_libraries(collapse_small_edges_in_parallel PUBLIC CGAL::TBB_support CGAL::METIS_support) else() diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index e61824ac4f5..280cc828112 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -7,7 +7,7 @@ project(Mean_curvature_skeleton) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("solver_benchmark.cpp") diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index a2916b9e2a0..798977cdd1b 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_skeletonization_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("simple_mcfskel_example.cpp") @@ -16,6 +16,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_sm_example.cpp") create_single_source_cgal_program("MCF_Skeleton_LCC_example.cpp") create_single_source_cgal_program("segmentation_example.cpp") + foreach( target simple_mcfskel_example @@ -31,6 +32,8 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("MCF_Skeleton_om_example.cpp") target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 758f2f8bd87..a44eb1af3eb 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_skeletonization_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0 REQUIRED) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") diff --git a/TDS_3/test/TDS_3/CMakeLists.txt b/TDS_3/test/TDS_3/CMakeLists.txt index 1e2256ba348..a80cd824ea3 100644 --- a/TDS_3/test/TDS_3/CMakeLists.txt +++ b/TDS_3/test/TDS_3/CMakeLists.txt @@ -7,8 +7,11 @@ include_directories(BEFORE "./include") find_package(TBB QUIET) include(CGAL_TBB_support) + create_single_source_cgal_program("test_triangulation_tds_3.cpp") create_single_source_cgal_program("test_io_tds3.cpp") + if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(test_triangulation_tds_3 PUBLIC CGAL::TBB_support) endif() diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index a7098c435e0..b8e3370abee 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -60,7 +60,7 @@ print_testresult() RESULT="t" fi else - if grep -E -q 'NOTICE: .*(need|require|incompatible).*will not be' CompilerOutput_$1 + if grep -E -q 'NOTICE: .*(need|require|incompatible|not found).*will not be' CompilerOutput_$1 then RESULT="r" else diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index 9e89831fc98..b5c4c1da2ab 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -30,7 +30,9 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) + if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::TBB_support) endif() else() diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 2b0d8c131ed..8ec8183570c 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -7,7 +7,7 @@ project(Triangulation_apps) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: Applications require Eigen 3.1 (or greater), and will not be compiled") diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index b47bea021e1..ab384682f8e 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -6,10 +6,11 @@ project(Triangulation_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") + create_single_source_cgal_program("delaunay.cpp") target_link_libraries(delaunay PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("Td_vs_T2_and_T3.cpp") diff --git a/Triangulation/examples/Triangulation/CMakeLists.txt b/Triangulation/examples/Triangulation/CMakeLists.txt index 0574b70126e..3ad27172e58 100644 --- a/Triangulation/examples/Triangulation/CMakeLists.txt +++ b/Triangulation/examples/Triangulation/CMakeLists.txt @@ -11,7 +11,7 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("barycentric_subdivision.cpp") diff --git a/Triangulation/test/Triangulation/CMakeLists.txt b/Triangulation/test/Triangulation/CMakeLists.txt index 292869eee6c..aeb3d8a5e50 100644 --- a/Triangulation/test/Triangulation/CMakeLists.txt +++ b/Triangulation/test/Triangulation/CMakeLists.txt @@ -11,7 +11,7 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index f69ece8b238..4519992969f 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -33,6 +33,8 @@ find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + create_single_source_cgal_program("parallel_insertion_and_removal_in_regular_3.cpp") create_single_source_cgal_program("parallel_insertion_in_delaunay_3.cpp") create_single_source_cgal_program("sequential_parallel.cpp") diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 19983c752f3..c87f341eb25 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -30,10 +30,13 @@ create_single_source_cgal_program("test_triangulation_3.cpp") create_single_source_cgal_program("test_io_triangulation_3.cpp") if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + foreach(target test_delaunay_3 test_regular_3 test_regular_insert_range_with_info) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endforeach() + if(BUILD_TESTING) set_property(TEST execution___of__test_delaunay_3 diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index a06979d869f..6833911fa0c 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -31,8 +31,8 @@ include(CGAL_Eigen3_support) if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) # Include this package's headers first - include_directories(BEFORE ./ ./include) + # ui file, created wih Qt Designer qt5_wrap_ui( uis Mainwindow.ui ) diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index bfa7a57734b..26748ec7233 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -17,5 +17,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") target_link_libraries(weighted_laplacian PUBLIC CGAL::Eigen3_support) else() - message(STATUS "NOTICE: The Eigen library was not found. The example 'weighted_laplacian' will not be compiled.") + message(STATUS "NOTICE: The example 'weighted_laplacian' requires the Eigen library, and will not be compiled.") endif() From 36c0a779d744f856d50ad79de6c9d289ef4b6693 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Sep 2022 11:10:04 +0200 Subject: [PATCH 023/426] WIP: how to detect the arity of a predicate --- .../kernel_detect_predicates_arity.cpp | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp diff --git a/Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp b/Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp new file mode 100644 index 00000000000..aca12aa1b2a --- /dev/null +++ b/Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp @@ -0,0 +1,94 @@ +#define CGAL_NO_MPZF_DIVISION_OPERATOR 1 + +#include +#include + +using SCK = CGAL::Simple_cartesian; + +struct Any { + template operator const T&(); +}; + +template +void check_pred() { + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + std::cerr << std::is_invocable_v; + + // The following asserts that no predicate from the kernel has more than + // 8 arguments (actually the assertions are only from 9 to 12 arguments). + static_assert(!std::is_invocable_v); + static_assert(!std::is_invocable_v); + static_assert(!std::is_invocable_v); + static_assert(!std::is_invocable_v); + std::cerr << '\n'; +} + +int main() +{ +#define CGAL_Kernel_pred(P, Pf) \ + std::cerr << #P << ": "; \ + check_pred(); +#include + + // Bug with predicates with multiple overload of the call operator with the + // same number of arguments: the call with `Any` is ambiguous. + static_assert(std::is_invocable_v); + static_assert(!std::is_invocable_v); // AMBIGUOUS CALL + static_assert(!std::is_invocable_v); // AMBIGUOUS CALL + return 0; +} + + +/* + +WORK IN PROGRESS: + +In the CGAL Kernel: + - 2D: 49 predicates + - 3D: 50 predicates + + +## Try to detect all possible types of arguments of predicates, from the doc + +``` +[lrineau@fernand]~/Git/cgal-master/build-doc/doc_output/Kernel_23/xml% grep -h ' ' classKernel_1_1(^(Construct|Compute|Assign)*).xml | sed 's/]*>//; s|||; s| &|\&|' | sed 's/Kernel::/K::/'| sort | uniq -c | sort -n | grep -v _3 +``` + +3D: (14 types of arguments) + +const K::Direction_3& +const K::Triangle_3& +const K::Circle_3& +const K::Ray_3& +const K::Segment_3& +const K::Iso_cuboid_3& +const K::Line_3& +const K::Tetrahedron_3& +const K::FT& +const K::Plane_3& +const K::Sphere_3& +const K::Vector_3& +const K::Weighted_point_3& +const K::Point_3& + +2D: (10 types arguments) + +const K::Vector_2& +const K::Direction_2& +const K::Iso_rectangle_2& +const K::Ray_2& +const K::Circle_2& +const K::Triangle_2& +const K::FT& +const K::Segment_2& +const K::Weighted_point_2& +const K::Line_2& +const K::Point_2& + +*/ From a267cee598d5e757cffe7e5882d878fc172b771f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 15 Sep 2022 16:05:35 +0200 Subject: [PATCH 024/426] Avoid one intermediate call to the global (non-internal) function --- Kernel_23/include/CGAL/Kernel/function_objects.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 9966fad0a1f..2e8530166d9 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -826,14 +826,15 @@ namespace CommonKernelFunctors { result_type operator()(const T1& p, const T2& q, const FT& d2) const { - return CGAL::compare(squared_distance(p, q), d2); + return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template std::enable_if_t< !std::is_same::value, result_type > operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { - return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); + return CGAL::compare(internal::squared_distance(p, q, K()), + internal::squared_distance(r, s, K())); } }; @@ -848,14 +849,15 @@ namespace CommonKernelFunctors { result_type operator()(const T1& p, const T2& q, const FT& d2) const { - return CGAL::compare(squared_distance(p, q), d2); + return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template std::enable_if_t< !std::is_same::value, result_type > operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { - return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); + return CGAL::compare(internal::squared_distance(p, q, K()), + internal::squared_distance(r, s, K())); } }; From 04a7b31a078caa98b9428ff4c07a88d4d4c90eef Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 15 Sep 2022 16:06:28 +0200 Subject: [PATCH 025/426] WIP: test one predicate with a set of arguments with RT --- .../test/Kernel_23/test_predicate_with_RT.cpp | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp diff --git a/Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp b/Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp new file mode 100644 index 00000000000..68b833ece67 --- /dev/null +++ b/Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp @@ -0,0 +1,35 @@ +#define CGAL_NO_MPZF_DIVISION_OPERATOR 1 + +#include +#include + +template +void test(const R& rep) { + using Point_3 = typename R::Point_3; + using Segment_3 = typename R::Segment_3; + using Line_3 = typename R::Line_3; + + auto construct_point = rep.construct_point_3_object(); + Point_3 p2 = construct_point(CGAL::ORIGIN); + Point_3 p3 = construct_point(1,1,1); + Point_3 p4 = construct_point(1,1,2); + Point_3 p5 = construct_point(1,2,3); + Point_3 p6 = construct_point(4,2,1); + + auto construct_segment = rep.construct_segment_3_object(); + Segment_3 s2 = construct_segment(p2,p3), s1 = s2; + + auto construct_line = rep.construct_line_3_object(); + Line_3 l2 = construct_line(p5,p6); + + auto compare_distance = rep.compare_distance_3_object(); + // compare_distance(p2, p2, p2); + compare_distance(p2, s2, p2); + // compare_distance(p2, l2, p2); +} + +int main() +{ + test(CGAL::Simple_cartesian()); + return 0; +} From 01af5bce52137c4d26127f6ab292d8dc5d8e37e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 21 Sep 2022 14:54:18 +0200 Subject: [PATCH 026/426] Add an automatic test to detect correct presence/absence of RT_sufficient --- Kernel_23/test/Kernel_23/CMakeLists.txt | 48 +- .../Kernel_23/atomic_compilation_test.cpp | 1 + .../include/atomic_RT_FT_predicate_headers.h | 25 + .../Kernel_23/test_RT_or_FT_predicates.cpp | 497 ++++++++++++++++++ 4 files changed, 560 insertions(+), 11 deletions(-) create mode 100644 Kernel_23/test/Kernel_23/atomic_compilation_test.cpp create mode 100644 Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h create mode 100644 Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index 24b2ddfc339..0d413d701ff 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -1,6 +1,3 @@ -# Created by the script cgal_create_cmake_script -# This is the CMake script for compiling a CGAL application. - cmake_minimum_required(VERSION 3.1...3.23) project(Kernel_23_Tests) @@ -8,11 +5,40 @@ find_package(CGAL REQUIRED COMPONENTS Core) include_directories(BEFORE "include") -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") -endforeach() +create_single_source_cgal_program("Cartesian.cpp") +create_single_source_cgal_program("determinant_77.cpp") +create_single_source_cgal_program("Dimension.cpp") +create_single_source_cgal_program("Exact_predicates_exact_constructions_kernel.cpp") +create_single_source_cgal_program("Filtered_cartesian.cpp") +create_single_source_cgal_program("Filtered_homogeneous.cpp") +create_single_source_cgal_program("Homogeneous.cpp") +create_single_source_cgal_program("issue_129.cpp") +create_single_source_cgal_program("issue_3301.cpp") +create_single_source_cgal_program("Kernel_checker.cpp") +create_single_source_cgal_program("kernel_detect_predicates_arity.cpp") +create_single_source_cgal_program("Lazy_kernel.cpp") +create_single_source_cgal_program("origin_3.cpp") +create_single_source_cgal_program("overload_bug.cpp") +create_single_source_cgal_program("rank.cpp") +create_single_source_cgal_program("Simple_cartesian.cpp") +create_single_source_cgal_program("Simple_homogeneous.cpp") +create_single_source_cgal_program("test_all_linear_intersections.cpp") +create_single_source_cgal_program("test_approximate_dihedral_angle_3.cpp") +create_single_source_cgal_program("test_bbox.cpp") +create_single_source_cgal_program("test_converter.cpp") +create_single_source_cgal_program("test_Has_conversion.cpp") +create_single_source_cgal_program("test_hash_functions.cpp") +create_single_source_cgal_program("test_kernel__.cpp") +create_single_source_cgal_program("test_predicate_with_RT.cpp") +create_single_source_cgal_program("test_projection_traits.cpp") +create_single_source_cgal_program("test_Projection_traits_xy_3_Intersect_2.cpp") + +set(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS ON) +if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) + # expensive because of templated operators creating a lot of possible combinations + add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES) + + create_single_source_cgal_program("atomic_compilation_test.cpp") + create_single_source_cgal_program("test_RT_or_FT_predicates.cpp") + target_precompile_headers(atomic_compilation_test PUBLIC [["atomic_RT_FT_predicate_headers.h"]]) +endif() diff --git a/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp b/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp new file mode 100644 index 00000000000..80c7b4bd8dd --- /dev/null +++ b/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp @@ -0,0 +1 @@ +int main(int, char**) { } diff --git a/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h b/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h new file mode 100644 index 00000000000..f3d3b43a485 --- /dev/null +++ b/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h @@ -0,0 +1,25 @@ +#ifndef CGAL_KERNEL_23_TEST_ATOMIC_HEADERS_H +#define CGAL_KERNEL_23_TEST_ATOMIC_HEADERS_H + +#define CGAL_NO_MPZF_DIVISION_OPERATOR + +#include +#include +#include + +#include + +namespace CGAL { +namespace Kernel_23_tests { + +struct Any { + + template ::value>::type> + operator T(); +}; + +} // namespace Kernel_23_tests +} // namespace CGAL + +#endif // CGAL_KERNEL_23_TEST_ATOMIC_HEADERS_H diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp new file mode 100644 index 00000000000..322c7752300 --- /dev/null +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -0,0 +1,497 @@ +#include +#include + +#include +#include +#include +#include +#include +#include + +// 0, nothing +// > 0, print RT_sufficient errors and successes +// > 1, same as above + predicate being tested +// > 2, same as above + some general indications on what is going on +// > 4, same as above + even more indications on what is going on +// > 8, everything +#define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 8 + +std::vector predicates_types = { }; + +// @todo, technically somebody might in the future create predicates with non kernel objects (nor FT). +// In that case, they'd have to be added to these lists since there is no scrapping of the predicate +// arguments but rather try all combinations of objects from these lists. +std::vector object_types_2 = { "FT" }; +std::vector object_types_3 = { "FT" }; + +// @todo potential operator()s with more than MAX_ARITY are not tested +constexpr std::size_t MIN_ARITY = 0; +constexpr std::size_t MAX_ARITY = 12; + +const std::string kernel_name = "Simple_cartesian"; +const std::string FT_div = "double"; +const std::string RT_no_div = "CGAL::Mpzf"; + +enum Compilation_result +{ + SUCCESSFUL = 0, // if it got to linking, it is also a successful compilation + FAILED_NO_MATCH, + FAILED_AMBIGUOUS_CALL, // ambiguous calls means the arity is valid + FAILED_NO_DIVISION_OPERATOR, // used to detect if a valid compilation can be done with RT + UNKNOWN +}; + +enum class Arity_test_result +{ + EXPLORATION_REQUIRED = 0, + RT_SUFFICIENT, + FT_NECESSARY, + NO_MATCH +}; + +inline const char* get_error_message(int error_code) +{ + // Messages corresponding to Error_code list above. Must be kept in sync! + static const char* error_message[UNKNOWN+1] = + { + "Success!", + "Failed: no match!", + "Failed: ambiguous call!", + "Failed: called division operator!", + "Unexpected error!" + }; + + if(error_code > UNKNOWN || error_code < 0) + return "Doubly unexpected error!!"; + else + return error_message[error_code]; +} + +std::string kernel_with_FT(const std::string& FT_name) +{ + return "CGAL::" + kernel_name + "<" + FT_name + ">"; +} + +// convert from e.g. Point_2 to CGAL::Point_2 +std::string parameter_with_namespace(const std::string& FT_name, + const std::string& o) +{ + if(o == "Any") + return "CGAL::Kernel_23_tests::Any"; + else if(o == "RT_sufficient") + return "CGAL::RT_sufficient"; + else if(o == "FT") + return "K::FT"; + else + return "CGAL::" + o + "<" + kernel_with_FT(FT_name) + " >"; +} + +void compile() +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << "====== Compiling atomic file... ======" << std::endl; +#endif + + std::system("make atomic_compilation_test > log.txt 2>&1"); +} + +Compilation_result parse_output(const std::string& predicate_name, + const std::string& FT_name = {}, + const std::vector& parameters = {}) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << "====== Parsing compilation log... ======" << std::endl; +#endif + Compilation_result res = UNKNOWN; + + std::ifstream in("log.txt"); + if(!in) + { +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 0) + std::cerr << "Error: failed to open log file" << std::endl; +#endif + return UNKNOWN; + } + +#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES + // Compare_(squared)_distance_23 have templated operator()s, which are a lot of combinations to test. + // In templated operator()s, the compare is simply a call to squared_distance()s and a CGAL::compare(). + // Below prunes some exploration branches in case the first squared_distance() call does not even compile. + bool prune_compare_distance_branches = false; + if(predicate_name == "Compare_distance_2" || predicate_name == "Compare_distance_3" || + predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3") + { + prune_compare_distance_branches = true; + } +#else + CGAL_USE(predicate_name); + CGAL_USE(FT_name); + CGAL_USE(parameters); +#endif + + std::string line; + while(getline(in, line)) + { +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 8) + std::cout << line << std::endl; +#endif + + if(line.find("no match for call") != std::string::npos) { + res = FAILED_NO_MATCH; + break; + } else if(line.find("too many arguments") != std::string::npos) { // @todo what is that exact error? + res = FAILED_NO_MATCH; + break; +#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES + } else if(prune_compare_distance_branches && parameters.size() > 1 && + parameters[0] != "Any" && parameters[1] != "Any" && + line.find(std::string{"no matching function for call to ‘squared_distance(const " + + parameter_with_namespace(FT_name, parameters[0]) + "&, const " + + parameter_with_namespace(FT_name, parameters[1])}) != std::string::npos) { + res = FAILED_NO_MATCH; + break; +#endif + } else if(line.find("ambiguous") != std::string::npos) { + res = FAILED_AMBIGUOUS_CALL; + break; + } else if(line.find("candidate") != std::string::npos) { + res = FAILED_AMBIGUOUS_CALL; + break; + } else if(line.find("call to deleted") != std::string::npos) { + // @todo unused since the macro makes it so no operator is defined at all + res = FAILED_NO_DIVISION_OPERATOR; + break; + } else if(line.find("no match for ‘operator/’") != std::string::npos) { + res = FAILED_NO_DIVISION_OPERATOR; + break; + } else if(line.find("Built") != std::string::npos) { + res = SUCCESSFUL; + break; + } else if(line.find("undefined reference") != std::string::npos) { + res = SUCCESSFUL; // @todo should it be a different value? + break; + } + } + +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << "Result of atomic test file is: " << get_error_message(res) << std::endl; +#endif + CGAL_postcondition(res != UNKNOWN); + + return res; +} + +void generate_atomic_file(const std::string& FT_name, + const std::string& predicate_name, + const std::vector& parameters) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << "====== Generate atomic file... ======" << std::endl; +#endif + +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 2) + std::cout << "\n===== Checking potential arity " << arity << "... =====" << std::endl; +#endif + + std::vector parameters(arity, "Any"); + + generate_atomic_file(RT_no_div, predicate_name, parameters); + compile(); + Compilation_result res = parse_output(predicate_name); + + if(res == SUCCESSFUL) + return Arity_test_result::RT_SUFFICIENT; + else if(res == FAILED_NO_DIVISION_OPERATOR) + return Arity_test_result::FT_NECESSARY; + else if(res == FAILED_AMBIGUOUS_CALL) + return Arity_test_result::EXPLORATION_REQUIRED; + else // FAILED_NO_MATCH and UNKNOWN + return Arity_test_result::NO_MATCH; +} + +bool ensure_RT_sufficient_is_present(const std::string& predicate_name, + // intentional copy, don't want to pollute the parameters with `RT_sufficient` + std::vector parameters) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size() - 1; j 0) + std::cerr << "Error: this predicate is RT_sufficient, but the tag is missing!\n" << std::endl; +#endif + return false; + } + else + { +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 0) + std::cout << "... and the tag is properly set!\n" << std::endl; +#endif + return true; + } +} + +bool ensure_RT_sufficient_is_NOT_present(const std::string& predicate_name, + // intentional copy, don't want to pollute the parameters with `RT_sufficient` + std::vector parameters) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size() - 1; j 0) + std::cerr << "Error: this predicate is NOT RT_sufficient, but the tag is present!\n" << std::endl; +#endif + return false; + } + else + { +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 0) + std::cout << "... and the tag is (correctly) absent!\n" << std::endl; +#endif + return true; + } +} + +void test_predicate(const std::string& predicate_name, + const std::size_t object_pos, + const std::size_t arity, + // intentional copy, each sub-branch gets its own parameter list + std::vector parameters) +{ + const std::size_t last = arity - 1; + CGAL_precondition(object_pos <= last); + + CGAL_precondition(predicate_name.back() == '2' || predicate_name.back() == '3'); + const auto& object_types = (predicate_name.back() == '2') ? object_types_2 : object_types_3; + + for(const std::string& object_type : object_types) + { +#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES + // This pruning could be done for other predicates, but they're not as expensive so it doesn't matter + if((predicate_name == "Compare_distance_2" || predicate_name == "Compare_distance_3" || + predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3") && + object_type == "FT") + { + continue; + } +#endif + + parameters[object_pos] = object_type; + generate_atomic_file(RT_no_div, predicate_name, parameters); + compile(); + Compilation_result res = parse_output(predicate_name, RT_no_div, parameters); + + // See if we can already conclude on the current parameter list + // - if that successful compiles, then it is RT_sufficient + // - call to deleted operator, this means FT_necessary + // - any other error, this combination of parameters was not a valid input for the predicate + if(res == SUCCESSFUL) + { + ensure_RT_sufficient_is_present(predicate_name, parameters); + } + else if(res == FAILED_NO_DIVISION_OPERATOR) + { + ensure_RT_sufficient_is_NOT_present(predicate_name, parameters); + } + + if(res == FAILED_AMBIGUOUS_CALL && object_pos != last) + { + // The object at the current position does not invalid the call, explore further this list + test_predicate(predicate_name, object_pos + 1, arity, parameters); + } + else + { + // The object at the current position yields a compilation error, do not explore any further + } + } +} + +void test_predicate(const std::string& predicate_name, + const std::size_t arity) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 2) + std::cout << "===== Test predicate with arity " << arity << "... =====" << std::endl; +#endif + CGAL_precondition(arity > 0); + + // Use "Any" to prune early: + // 1st try "Object_1, Any, ..., Any" (i - 1 "Any") + // -> if that doesn't compile, we're done with Object_1 and try "Object_2, Any, ..., Any" (i-1 "Any") + // -> if that compiles, try "Object_1, Object_1, Any, ..., Any" (i-2 "Any") + // etc. + + // the position of the object being changed/tested, when object_pos == arity - 1, + // then this is a call with full objects on which we can do the RT test + std::vector parameters(arity, "Any"); + std::size_t object_pos = 0; + test_predicate(predicate_name, object_pos, arity, parameters); +} + +void test_predicate(const std::string& predicate_name) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 1) + std::cout << "\n\n=== Test predicate: " << predicate_name << "... ===" << std::endl; +#endif + +#ifndef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES + if(predicate_name == "Compare_distance_2" || predicate_name == "Compare_distance_3" || + predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3") + { +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 1) + std::cout << "Skipping because 'CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES' is not defined!" << std::endl; +#endif + return; + } +#endif + + for(std::size_t i=MIN_ARITY; i<=MAX_ARITY; ++i) + { + Arity_test_result res = test_arity(predicate_name, i); + if(res == Arity_test_result::RT_SUFFICIENT) + { + std::vector parameters(i, "Any"); + ensure_RT_sufficient_is_present(predicate_name, parameters); + } + else if(res == Arity_test_result::FT_NECESSARY) + { + std::vector parameters(i, "Any"); + ensure_RT_sufficient_is_NOT_present(predicate_name, parameters); + } + else if(res == Arity_test_result::EXPLORATION_REQUIRED) + { + test_predicate(predicate_name, i); + } + } +} + +int main(int , char** ) +{ + // Get the predicates + #define CGAL_Kernel_pred(X, Y) predicates_types.push_back(#X); + #define CGAL_Kernel_pred_RT(X, Y) predicates_types.push_back(#X); + #define CGAL_Kernel_pred_RT_or_FT(X, Y) predicates_types.push_back(#X); + #include + + // Get the objects + #define CGAL_Kernel_obj(X) { const std::string O = #X; \ + CGAL_precondition(O.back() == '2' || O.back() == '3'); \ + if(O.back() == ('2')) \ + object_types_2.push_back(#X); \ + else \ + object_types_3.push_back(#X); } + #include + +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 1) + std::cout << predicates_types.size() << " predicates:" << std::endl; + for(const std::string& s : predicates_types) + std::cout << s << "\n"; + std::cout << std::endl; + + std::cout << object_types_2.size() << " 2D objects:" << std::endl; + for(const std::string& o : object_types_2) + std::cout << o << "\n"; + std::cout << std::endl; + + std::cout << object_types_3.size() << " 3D objects:" << std::endl; + for(const std::string& o : object_types_3) + std::cout << o << "\n"; + std::cout << std::endl; +#endif + + // Actual tests + for(const std::string& predicate_name : predicates_types) + { + test_predicate(predicate_name); + } + + restore_atomic_file(); + + return EXIT_SUCCESS; +} From 214e072959a2f0782de8a195a2643ff8ecc3b27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 22 Sep 2022 12:02:53 +0200 Subject: [PATCH 027/426] Switch from RT_sufficient to FT_necessary --- .../include/CGAL/Cartesian/function_objects.h | 83 +++++-------- .../include/CGAL/Filtered_predicate.h | 17 +-- .../include/CGAL/Kernel/function_objects.h | 49 ++++---- .../Kernel_23/internal/Projection_traits_3.h | 2 +- .../test/Kernel_23/Filtered_cartesian.cpp | 5 +- .../test/Kernel_23/include/CGAL/_test_new_3.h | 18 +-- .../include/atomic_RT_FT_predicate_headers.h | 2 +- .../Kernel_23/test_RT_or_FT_predicates.cpp | 116 +++++++++--------- STL_Extension/include/CGAL/tags.h | 4 +- 9 files changed, 137 insertions(+), 159 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 6c74a59a930..46a1798d7da 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -398,7 +398,7 @@ namespace CartesianKernelFunctors { Collinear_2(const Orientation_2 o_) : o(o_) {} result_type - operator()(const Point_2& p, const Point_2& q, const Point_2& r, RT_sufficient = {}) const + operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return o(p, q, r) == COLLINEAR; } }; @@ -410,7 +410,7 @@ namespace CartesianKernelFunctors { typedef typename K::Boolean result_type; result_type - operator()(const Point_3& p, const Point_3& q, const Point_3& r, RT_sufficient = {}) const + operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return collinearC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -447,14 +447,14 @@ namespace CartesianKernelFunctors { template result_type - operator()(const T1& p, const T2& q, const T3& r) const + operator()(const T1& p, const T2& q, const T3& r, FT_necessary = {}) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - std::enable_if_t< !std::is_same::value, result_type > - operator()(const T1& p, const T2& q, const T3& r, const T4& s) const + std::enable_if_t::value, result_type> + operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); } @@ -566,7 +566,7 @@ namespace CartesianKernelFunctors { typedef typename K::Comparison_result result_type; result_type - operator()(const Point_3& p, const Point_3& q, const Point_3& r, RT_sufficient = {}) const + operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return cmp_dist_to_pointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -574,33 +574,33 @@ namespace CartesianKernelFunctors { } result_type - operator()(const Point_3& p1, const Segment_3& s1, const Segment_3& s2, RT_sufficient = {}) const + operator()(const Point_3& p1, const Segment_3& s1, const Segment_3& s2) const { return internal::compare_distance_pssC3(p1,s1,s2, K()); } result_type - operator()(const Point_3& p1, const Point_3& p2, const Segment_3& s2, RT_sufficient = {}) const + operator()(const Point_3& p1, const Point_3& p2, const Segment_3& s2) const { return internal::compare_distance_ppsC3(p1,p2,s2, K()); } result_type - operator()(const Point_3& p1, const Segment_3& s2, const Point_3& p2, RT_sufficient = {}) const + operator()(const Point_3& p1, const Segment_3& s2, const Point_3& p2) const { return opposite(internal::compare_distance_ppsC3(p1,p2,s2, K())); } template result_type - operator()(const T1& p, const T2& q, const T3& r) const + operator()(const T1& p, const T2& q, const T3& r, FT_necessary = {}) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - std::enable_if_t< !std::is_same::value, result_type > - operator()(const T1& p, const T2& q, const T3& r, const T4& s) const + std::enable_if_t::value, result_type> + operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); } @@ -618,7 +618,7 @@ namespace CartesianKernelFunctors { Comparison_result operator()(const Point_2& r, const Weighted_point_2& p, - const Weighted_point_2& q, RT_sufficient = {}) const + const Weighted_point_2& q) const { return CGAL::compare_power_distanceC2(p.x(), p.y(), p.weight(), q.x(), q.y(), q.weight(), @@ -3769,8 +3769,7 @@ namespace CartesianKernelFunctors { #endif // CGAL_kernel_exactness_preconditions result_type - operator()(const Point_3& p, const Point_3& q, const Point_3& r, - RT_sufficient = {}) const + operator()(const Point_3& p, const Point_3& q, const Point_3& r) const { return coplanar_orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -3779,8 +3778,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& s, - RT_sufficient = {}) const + const Point_3& r, const Point_3& s) const { // p,q,r,s supposed to be coplanar // p,q,r supposed to be non collinear @@ -3821,8 +3819,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& t, - RT_sufficient = {}) const + const Point_3& r, const Point_3& t) const { // p,q,r,t are supposed to be coplanar. // p,q,r determine an orientation of this plane (not collinear). @@ -4209,20 +4206,19 @@ namespace CartesianKernelFunctors { public: typedef typename K::Orientation result_type; - result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, - RT_sufficient = {}) const + result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { return orientationC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } result_type - operator()(const Vector_2& u, const Vector_2& v, RT_sufficient = {}) const + operator()(const Vector_2& u, const Vector_2& v) const { return orientationC2(u.x(), u.y(), v.x(), v.y()); } result_type - operator()(const Circle_2& c, RT_sufficient = {}) const + operator()(const Circle_2& c) const { return c.rep().orientation(); } @@ -4240,7 +4236,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& s, RT_sufficient = {}) const + const Point_3& r, const Point_3& s) const { return orientationC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4249,8 +4245,7 @@ namespace CartesianKernelFunctors { } result_type - operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w, - RT_sufficient = {}) const + operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const { return orientationC3(u.x(), u.y(), u.z(), v.x(), v.y(), v.z(), @@ -4259,7 +4254,7 @@ namespace CartesianKernelFunctors { result_type operator()( Origin, const Point_3& u, - const Point_3& v, const Point_3& w, RT_sufficient = {}) const + const Point_3& v, const Point_3& w) const { return orientationC3(u.x(), u.y(), u.z(), v.x(), v.y(), v.z(), @@ -4267,13 +4262,13 @@ namespace CartesianKernelFunctors { } result_type - operator()( const Tetrahedron_3& t, RT_sufficient = {}) const + operator()( const Tetrahedron_3& t) const { return t.rep().orientation(); } result_type - operator()(const Sphere_3& s, RT_sufficient = {}) const + operator()(const Sphere_3& s) const { return s.rep().orientation(); } @@ -4291,8 +4286,7 @@ namespace CartesianKernelFunctors { Oriented_side operator()(const Weighted_point_2& p, const Weighted_point_2& q, const Weighted_point_2& r, - const Weighted_point_2& t, - RT_sufficient = {}) const + const Weighted_point_2& t) const { //CGAL_kernel_precondition( ! collinear(p, q, r) ); return power_side_of_oriented_power_circleC2(p.x(), p.y(), p.weight(), @@ -4313,8 +4307,7 @@ namespace CartesianKernelFunctors { Oriented_side operator()(const Weighted_point_2& p, const Weighted_point_2& q, - const Weighted_point_2& t, - RT_sufficient = {}) const + const Weighted_point_2& t) const { //CGAL_kernel_precondition( collinear(p, q, r) ); //CGAL_kernel_precondition( p.point() != q.point() ); @@ -4324,8 +4317,7 @@ namespace CartesianKernelFunctors { } Oriented_side operator()(const Weighted_point_2& p, - const Weighted_point_2& t, - RT_sufficient = {}) const + const Weighted_point_2& t) const { //CGAL_kernel_precondition( p.point() == r.point() ); Comparison_result r = CGAL::compare(p.weight(), t.weight()); @@ -4414,8 +4406,7 @@ namespace CartesianKernelFunctors { typedef typename K::Bounded_side result_type; result_type - operator()( const Point_2& p, const Point_2& q, const Point_2& t, - RT_sufficient = {}) const + operator()( const Point_2& p, const Point_2& q, const Point_2& t) const { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), @@ -4424,8 +4415,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q, - const Point_2& r, const Point_2& t, - RT_sufficient = {}) const + const Point_2& r, const Point_2& t) const { return side_of_bounded_circleC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y(), t.x(), t.y()); @@ -4440,8 +4430,7 @@ namespace CartesianKernelFunctors { typedef typename K::Bounded_side result_type; result_type - operator()( const Point_3& p, const Point_3& q, const Point_3& test, - RT_sufficient = {}) const + operator()( const Point_3& p, const Point_3& q, const Point_3& test) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4450,8 +4439,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& test, - RT_sufficient = {}) const + const Point_3& r, const Point_3& test) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4461,8 +4449,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, - const Point_3& s, const Point_3& test, - RT_sufficient = {}) const + const Point_3& s, const Point_3& test) const { return side_of_bounded_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -4481,8 +4468,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_2& p, const Point_2& q, - const Point_2& r, const Point_2& t, - RT_sufficient = {}) const + const Point_2& r, const Point_2& t) const { return side_of_oriented_circleC2(p.x(), p.y(), q.x(), q.y(), @@ -4500,8 +4486,7 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, - const Point_3& s, const Point_3& test, - RT_sufficient = {}) const + const Point_3& s, const Point_3& test) const { return side_of_oriented_sphereC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index f7ea91355aa..bf3cfdcf21c 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -129,9 +129,10 @@ public: using result_type = typename EP_FT::result_type; template - struct Call_operator_needs_FT { + struct Call_operator_needs_FT + { // This type traits class checks if the call operator can be called with - // `(const Args&..., RT_sufficient())`. + // `(const Args&..., FT_necessary())`. using ArrayOfOne = char[1]; using ArrayOfTwo = char[2]; @@ -139,21 +140,21 @@ public: template static auto test(const Args2 &...args) - -> decltype(ap(c2a(args)..., RT_sufficient()), + -> decltype(ap(c2a(args)..., FT_necessary()), std::declval()); - enum { value = sizeof(test(std::declval()...)) == sizeof(ArrayOfOne) }; + enum { value = sizeof(test(std::declval()...)) == sizeof(ArrayOfTwo) }; }; // ## Important note // - // If you want to remove of rename that member function template `needs_ft`, + // If you want to remove of rename that member function template `needs_FT`, // please also change the lines with - // `CGAL_GENERATE_MEMBER_DETECTOR(needs_ft);` - // or `has_needs_ft` in + // `CGAL_GENERATE_MEMBER_DETECTOR(needs_FT);` + // or `has_needs_FT` in // the file `Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h`. template - constexpr bool needs_ft(const Args&...) const { + constexpr bool needs_FT(const Args&...) const { return Call_operator_needs_FT::value; } diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 2e8530166d9..417bab778d8 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -339,8 +339,7 @@ namespace CommonKernelFunctors { Comparison_result operator()(const Point_3 & p, const Weighted_point_3 & q, - const Weighted_point_3 & r, - RT_sufficient = {}) const + const Weighted_point_3 & r) const { return compare_power_distanceC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), q.weight(), @@ -515,8 +514,7 @@ namespace CommonKernelFunctors { const Weighted_point_3 & q, const Weighted_point_3 & r, const Weighted_point_3 & s, - const Weighted_point_3 & t, - RT_sufficient = {}) const + const Weighted_point_3 & t) const { return power_side_of_oriented_power_sphereC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -538,8 +536,7 @@ namespace CommonKernelFunctors { Oriented_side operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, const Weighted_point_3 & r, - const Weighted_point_3 & s, - RT_sufficient = {}) const + const Weighted_point_3 & s) const { //CGAL_kernel_precondition( coplanar(p, q, r, s) ); //CGAL_kernel_precondition( !collinear(p, q, r) ); @@ -551,8 +548,7 @@ namespace CommonKernelFunctors { Oriented_side operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, - const Weighted_point_3 & r, - RT_sufficient = {}) const + const Weighted_point_3 & r) const { //CGAL_kernel_precondition( collinear(p, q, r) ); //CGAL_kernel_precondition( p.point() != q.point() ); @@ -562,8 +558,7 @@ namespace CommonKernelFunctors { } Oriented_side operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - RT_sufficient = {}) const + const Weighted_point_3 & q) const { //CGAL_kernel_precondition( p.point() == r.point() ); return power_side_of_oriented_power_sphereC3(p.weight(),q.weight()); @@ -824,14 +819,14 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& p, const T2& q, const FT& d2) const + operator()(const T1& p, const T2& q, const FT& d2, FT_necessary = {}) const { return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - std::enable_if_t< !std::is_same::value, result_type > - operator()(const T1& p, const T2& q, const T3& r, const T4& s) const + std::enable_if_t::value, result_type> + operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const { return CGAL::compare(internal::squared_distance(p, q, K()), internal::squared_distance(r, s, K())); @@ -853,7 +848,7 @@ namespace CommonKernelFunctors { } template - std::enable_if_t< !std::is_same::value, result_type > + result_type operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(internal::squared_distance(p, q, K()), @@ -2996,8 +2991,7 @@ namespace CommonKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q, - const Point_3& r, const Point_3& s, - RT_sufficient = {}) const + const Point_3& r, const Point_3& s) const { return o(p, q, r, s) == COPLANAR; } @@ -3041,13 +3035,12 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& t1, const T2& t2, RT_sufficient = {}) const + operator()(const T1& t1, const T2& t2) const { return Intersections::internal::do_intersect(t1, t2, K()); } result_type operator()(const typename K::Plane_3& pl1, const typename K::Plane_3& pl2, - const typename K::Plane_3& pl3, - RT_sufficient = {}) const + const typename K::Plane_3& pl3) const { return Intersections::internal::do_intersect(pl1, pl2, pl3, K()); } @@ -3668,39 +3661,39 @@ namespace CommonKernelFunctors { typedef typename K::Boolean result_type; result_type - operator()( const Iso_cuboid_3& c, RT_sufficient = {}) const + operator()( const Iso_cuboid_3& c) const { return c.rep().is_degenerate(); } result_type - operator()( const Line_3& l, RT_sufficient = {}) const + operator()( const Line_3& l) const { return l.rep().is_degenerate(); } result_type - operator()( const Plane_3& pl, RT_sufficient = {}) const + operator()( const Plane_3& pl) const { return pl.rep().is_degenerate(); } result_type - operator()( const Ray_3& r, RT_sufficient = {}) const + operator()( const Ray_3& r) const { return r.rep().is_degenerate(); } result_type - operator()( const Segment_3& s, RT_sufficient = {}) const + operator()( const Segment_3& s) const { return s.rep().is_degenerate(); } result_type - operator()( const Sphere_3& s, RT_sufficient = {}) const + operator()( const Sphere_3& s) const { return s.rep().is_degenerate(); } result_type - operator()( const Triangle_3& t, RT_sufficient = {}) const + operator()( const Triangle_3& t) const { return t.rep().is_degenerate(); } result_type - operator()( const Tetrahedron_3& t, RT_sufficient = {}) const + operator()( const Tetrahedron_3& t) const { return t.rep().is_degenerate(); } result_type - operator()( const Circle_3& t, RT_sufficient = {}) const + operator()( const Circle_3& t) const { return t.rep().is_degenerate(); } }; diff --git a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h index 353bcaea13d..9f9896ac7eb 100644 --- a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_3.h @@ -1021,7 +1021,7 @@ public: struct Collinear_2 { typedef typename R::Boolean result_type; - bool operator()(const Point_2& p, const Point_2& q, const Point_2& r, RT_sufficient = {}) const + bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const { Orientation_2 ori; return ori(p,q,r) == COLLINEAR; diff --git a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp index 0434a8f8a3c..b47ac7e12e3 100644 --- a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp +++ b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp @@ -14,9 +14,8 @@ // // Author(s) : Sylvain Pion -// This defines removes the operator/ from CGAL::Mpzf, to check that functors -// declared with CGAL_Kernel_pred_RT in interface_macros.h really only need -// a RT (ring type), without division. +// This defines removes the operator/ from CGAL::Mpzf to check that functors not using +// the tag`FT_necessary` really only need a RT (ring type) without division. #define CGAL_NO_MPZF_DIVISION_OPERATOR 1 #include diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h index d380a39d697..4daf22f0f3d 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h @@ -26,7 +26,7 @@ #include -CGAL_GENERATE_MEMBER_DETECTOR(needs_ft); +CGAL_GENERATE_MEMBER_DETECTOR(needs_FT); using CGAL::internal::use; @@ -613,15 +613,15 @@ test_new_3(const R& rep) tmp34ab = compare_dist(p1, p2, p3, p4); tmp34ab = compare_dist(l2, p1, p1); if constexpr (R::Has_filtered_predicates && - has_needs_ft::value) + has_needs_FT::value) { - assert(!compare_dist.needs_ft(p1, p2, p3)); - assert(!compare_dist.needs_ft(p2, s2, s2)); - assert(!compare_dist.needs_ft(p2, p2, s2)); - assert(!compare_dist.needs_ft(p1, s2, p2)); - assert(compare_dist.needs_ft(l1, p1, p1)); - assert(compare_dist.needs_ft(p2, p3, p2, p3)); - assert(compare_dist.needs_ft(p2, s2, l1, s2)); + assert(!compare_dist.needs_FT(p1, p2, p3)); + assert(!compare_dist.needs_FT(p2, s2, s2)); + assert(!compare_dist.needs_FT(p2, p2, s2)); + assert(!compare_dist.needs_FT(p1, s2, p2)); + assert(compare_dist.needs_FT(l1, p1, p1)); + assert(compare_dist.needs_FT(p2, p3, p2, p3)); + assert(compare_dist.needs_FT(p2, s2, l1, s2)); } (void) tmp34ab; diff --git a/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h b/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h index f3d3b43a485..85d4dcb8c49 100644 --- a/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h +++ b/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h @@ -15,7 +15,7 @@ namespace Kernel_23_tests { struct Any { template ::value>::type> + typename = typename std::enable_if::value>::type> operator T(); }; diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index 322c7752300..31f76e6aa6e 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -9,7 +9,7 @@ #include // 0, nothing -// > 0, print RT_sufficient errors and successes +// > 0, print RT_sufficient/FT_necessary errors and successes // > 1, same as above + predicate being tested // > 2, same as above + some general indications on what is going on // > 4, same as above + even more indications on what is going on @@ -78,8 +78,8 @@ std::string parameter_with_namespace(const std::string& FT_name, { if(o == "Any") return "CGAL::Kernel_23_tests::Any"; - else if(o == "RT_sufficient") - return "CGAL::RT_sufficient"; + else if(o == "FT_necessary") + return "CGAL::FT_necessary"; else if(o == "FT") return "K::FT"; else @@ -259,81 +259,81 @@ Arity_test_result test_arity(const std::string& predicate_name, return Arity_test_result::NO_MATCH; } -bool ensure_RT_sufficient_is_present(const std::string& predicate_name, - // intentional copy, don't want to pollute the parameters with `RT_sufficient` - std::vector parameters) +bool ensure_FT_necessary_is_present(const std::string& predicate_name, + // intentional copy, don't want to pollute the parameters with `FT_necessary` + std::vector parameters) { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) std::cout << predicate_name << "("; for(std::size_t j=0, i=parameters.size(); j 0) - std::cout << predicate_name << "("; - for(std::size_t j=0, i=parameters.size() - 1; j 0) - std::cerr << "Error: this predicate is RT_sufficient, but the tag is missing!\n" << std::endl; -#endif - return false; - } - else - { -#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 0) - std::cout << "... and the tag is properly set!\n" << std::endl; -#endif - return true; - } -} - -bool ensure_RT_sufficient_is_NOT_present(const std::string& predicate_name, - // intentional copy, don't want to pollute the parameters with `RT_sufficient` - std::vector parameters) -{ -#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) - std::cout << predicate_name << "("; - for(std::size_t j=0, i=parameters.size(); j 0) std::cout << predicate_name << "("; - for(std::size_t j=0, i=parameters.size() - 1; j 0) - std::cerr << "Error: this predicate is NOT RT_sufficient, but the tag is present!\n" << std::endl; + std::cerr << "Error: this predicate is `FT_necessary`, but the tag is missing!\n" << std::endl; #endif return false; } else { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 0) - std::cout << "... and the tag is (correctly) absent!\n" << std::endl; + std::cout << "... and the tag `FT_necessary` is correctly present!\n" << std::endl; +#endif + return true; + } +} + +bool ensure_FT_necessary_is_NOT_present(const std::string& predicate_name, + // intentional copy, don't want to pollute the parameters with `RT_sufficient` + std::vector parameters) +{ +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size() - 1; j 0) + std::cerr << "Error: this predicate is NOT 'FT_necessary', but the tag is present!\n" << std::endl; +#endif + return false; + } + else + { +#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 0) + std::cout << "... and the tag `FT_necessary` is (correctly) absent!\n" << std::endl; #endif return true; } @@ -370,15 +370,15 @@ void test_predicate(const std::string& predicate_name, // See if we can already conclude on the current parameter list // - if that successful compiles, then it is RT_sufficient - // - call to deleted operator, this means FT_necessary + // - call to deleted or missing division operator, this means FT_necessary // - any other error, this combination of parameters was not a valid input for the predicate if(res == SUCCESSFUL) { - ensure_RT_sufficient_is_present(predicate_name, parameters); + ensure_FT_necessary_is_NOT_present(predicate_name, parameters); } else if(res == FAILED_NO_DIVISION_OPERATOR) { - ensure_RT_sufficient_is_NOT_present(predicate_name, parameters); + ensure_FT_necessary_is_present(predicate_name, parameters); } if(res == FAILED_AMBIGUOUS_CALL && object_pos != last) @@ -437,12 +437,12 @@ void test_predicate(const std::string& predicate_name) if(res == Arity_test_result::RT_SUFFICIENT) { std::vector parameters(i, "Any"); - ensure_RT_sufficient_is_present(predicate_name, parameters); + ensure_FT_necessary_is_NOT_present(predicate_name, parameters); } else if(res == Arity_test_result::FT_NECESSARY) { std::vector parameters(i, "Any"); - ensure_RT_sufficient_is_NOT_present(predicate_name, parameters); + ensure_FT_necessary_is_present(predicate_name, parameters); } else if(res == Arity_test_result::EXPLORATION_REQUIRED) { diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index d0dca45ac86..dd13818aae9 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -81,8 +81,8 @@ Assert_compile_time_tag( const Tag&, const Derived& b) x.match_compile_time_tag(b); } -// for Cartesian_kernel/include/CGAL/Cartesian/function_objects.h -struct RT_sufficient {}; +// for kernel predicates, to indicate a FT providing a division operator is required +struct FT_necessary {}; } //namespace CGAL From 873cc884b50c4df92577825732dbbb560f3ec745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 22 Sep 2022 12:03:25 +0200 Subject: [PATCH 028/426] Get rid of _RT / _RT_FT kernel interface macros --- .../include/CGAL/Filtered_kernel.h | 10 +-- .../include/CGAL/Kernel/interface_macros.h | 86 ++++++++----------- .../Kernel_23/test_RT_or_FT_predicates.cpp | 2 - 3 files changed, 36 insertions(+), 62 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel.h b/Filtered_kernel/include/CGAL/Filtered_kernel.h index 9d7493d68a3..182ba3c4d99 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel.h @@ -81,14 +81,6 @@ struct Filtered_kernel_base Approximate_kernel approximate_kernel() const { return {}; } // We change the predicates. -// #define CGAL_Kernel_pred(P, Pf) \ -// typedef Filtered_predicate P; \ -// P Pf() const { return P(); } - -// #define CGAL_Kernel_pred_RT(P, Pf) \ -// typedef Filtered_predicate P; \ -// P Pf() const { return P(); } - #define CGAL_Kernel_pred_RT_or_FT(P, Pf) \ typedef Filtered_predicate_RT_FT P; \ P Pf() const { return P(); } -#define CGAL_Kernel_pred_RT(P, Pf) CGAL_Kernel_pred_RT_or_FT(P, Pf) + #define CGAL_Kernel_pred(P, Pf) CGAL_Kernel_pred_RT_or_FT(P, Pf) // We don't touch the constructions. diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index a6e04b7fe95..9c85643a977 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -26,20 +26,6 @@ # define CGAL_Kernel_pred(X, Y) #endif -// Those predicates for which Simple_cartesian is guaranteed not to use -// any division. -#ifndef CGAL_Kernel_pred_RT -# define CGAL_Kernel_pred_RT(X, Y) CGAL_Kernel_pred(X, Y) -#endif - -// Those predicates for which Simple_cartesian maybe use division of not. -// Predicates that do not require the division must have `RT_sufficient` as last -// argument, with a default. See for example `Compare_distance_3` in the file -// Cartesian_kernel/include/CGAL/Cartesian/function_objects.h -#ifndef CGAL_Kernel_pred_RT_or_FT -# define CGAL_Kernel_pred_RT_or_FT(X, Y) CGAL_Kernel_pred(X, Y) -#endif - #ifndef CGAL_Kernel_cons # define CGAL_Kernel_cons(X, Y) #endif @@ -108,22 +94,22 @@ CGAL_Kernel_pred(Collinear_are_strictly_ordered_along_line_3, collinear_are_strictly_ordered_along_line_3_object) CGAL_Kernel_pred(Collinear_has_on_2, collinear_has_on_2_object) -CGAL_Kernel_pred_RT(Collinear_2, - collinear_2_object) -CGAL_Kernel_pred_RT(Collinear_3, - collinear_3_object) +CGAL_Kernel_pred(Collinear_2, + collinear_2_object) +CGAL_Kernel_pred(Collinear_3, + collinear_3_object) CGAL_Kernel_pred(Compare_angle_with_x_axis_2, compare_angle_with_x_axis_2_object) CGAL_Kernel_pred(Compare_dihedral_angle_3, compare_dihedral_angle_3_object) CGAL_Kernel_pred(Compare_distance_2, compare_distance_2_object) -CGAL_Kernel_pred_RT_or_FT(Compare_distance_3, - compare_distance_3_object) -CGAL_Kernel_pred_RT(Compare_power_distance_2, - compare_power_distance_2_object) -CGAL_Kernel_pred_RT(Compare_power_distance_3, - compare_power_distance_3_object) +CGAL_Kernel_pred(Compare_distance_3, + compare_distance_3_object) +CGAL_Kernel_pred(Compare_power_distance_2, + compare_power_distance_2_object) +CGAL_Kernel_pred(Compare_power_distance_3, + compare_power_distance_3_object) CGAL_Kernel_pred(Compare_signed_distance_to_line_2, compare_signed_distance_to_line_2_object) CGAL_Kernel_pred(Compare_slope_2, @@ -494,18 +480,18 @@ CGAL_Kernel_cons(Construct_cartesian_const_iterator_2, construct_cartesian_const_iterator_2_object) CGAL_Kernel_cons(Construct_cartesian_const_iterator_3, construct_cartesian_const_iterator_3_object) -CGAL_Kernel_pred_RT(Coplanar_orientation_3, - coplanar_orientation_3_object) -CGAL_Kernel_pred_RT(Coplanar_side_of_bounded_circle_3, - coplanar_side_of_bounded_circle_3_object) -CGAL_Kernel_pred_RT(Coplanar_3, +CGAL_Kernel_pred(Coplanar_orientation_3, + coplanar_orientation_3_object) +CGAL_Kernel_pred(Coplanar_side_of_bounded_circle_3, + coplanar_side_of_bounded_circle_3_object) +CGAL_Kernel_pred(Coplanar_3, coplanar_3_object) CGAL_Kernel_pred(Counterclockwise_in_between_2, counterclockwise_in_between_2_object) CGAL_Kernel_pred(Do_intersect_2, do_intersect_2_object) -CGAL_Kernel_pred_RT(Do_intersect_3, - do_intersect_3_object) +CGAL_Kernel_pred(Do_intersect_3, + do_intersect_3_object) CGAL_Kernel_pred(Equal_xy_3, equal_xy_3_object) CGAL_Kernel_pred(Equal_x_2, @@ -554,8 +540,8 @@ CGAL_Kernel_cons(Intersect_point_3_for_polyhedral_envelope, intersect_point_3_for_polyhedral_envelope_object) CGAL_Kernel_pred(Is_degenerate_2, is_degenerate_2_object) -CGAL_Kernel_pred_RT(Is_degenerate_3, - is_degenerate_3_object) +CGAL_Kernel_pred(Is_degenerate_3, + is_degenerate_3_object) CGAL_Kernel_pred(Is_horizontal_2, is_horizontal_2_object) CGAL_Kernel_pred(Is_vertical_2, @@ -592,10 +578,10 @@ CGAL_Kernel_pred(Less_z_3, less_z_3_object) CGAL_Kernel_pred(Non_zero_coordinate_index_3, non_zero_coordinate_index_3_object) -CGAL_Kernel_pred_RT(Orientation_2, - orientation_2_object) -CGAL_Kernel_pred_RT(Orientation_3, - orientation_3_object) +CGAL_Kernel_pred(Orientation_2, + orientation_2_object) +CGAL_Kernel_pred(Orientation_3, + orientation_3_object) CGAL_Kernel_pred(Oriented_side_2, oriented_side_2_object) CGAL_Kernel_pred(Oriented_side_3, @@ -604,21 +590,19 @@ CGAL_Kernel_pred(Power_side_of_bounded_power_circle_2, power_side_of_bounded_power_circle_2_object) CGAL_Kernel_pred(Power_side_of_bounded_power_sphere_3, power_side_of_bounded_power_sphere_3_object) -CGAL_Kernel_pred_RT(Power_side_of_oriented_power_circle_2, - power_side_of_oriented_power_circle_2_object) -CGAL_Kernel_pred_RT(Power_side_of_oriented_power_sphere_3, - power_side_of_oriented_power_sphere_3_object) -CGAL_Kernel_pred_RT(Side_of_bounded_circle_2, - side_of_bounded_circle_2_object) -CGAL_Kernel_pred_RT(Side_of_bounded_sphere_3, - side_of_bounded_sphere_3_object) -CGAL_Kernel_pred_RT(Side_of_oriented_circle_2, - side_of_oriented_circle_2_object) -CGAL_Kernel_pred_RT(Side_of_oriented_sphere_3, - side_of_oriented_sphere_3_object) +CGAL_Kernel_pred(Power_side_of_oriented_power_circle_2, + power_side_of_oriented_power_circle_2_object) +CGAL_Kernel_pred(Power_side_of_oriented_power_sphere_3, + power_side_of_oriented_power_sphere_3_object) +CGAL_Kernel_pred(Side_of_bounded_circle_2, + side_of_bounded_circle_2_object) +CGAL_Kernel_pred(Side_of_bounded_sphere_3, + side_of_bounded_sphere_3_object) +CGAL_Kernel_pred(Side_of_oriented_circle_2, + side_of_oriented_circle_2_object) +CGAL_Kernel_pred(Side_of_oriented_sphere_3, + side_of_oriented_sphere_3_object) -#undef CGAL_Kernel_pred_RT_or_FT -#undef CGAL_Kernel_pred_RT #undef CGAL_Kernel_pred #undef CGAL_Kernel_cons #undef CGAL_Kernel_obj diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index 31f76e6aa6e..ed0d63f7eef 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -455,8 +455,6 @@ int main(int , char** ) { // Get the predicates #define CGAL_Kernel_pred(X, Y) predicates_types.push_back(#X); - #define CGAL_Kernel_pred_RT(X, Y) predicates_types.push_back(#X); - #define CGAL_Kernel_pred_RT_or_FT(X, Y) predicates_types.push_back(#X); #include // Get the objects From c93e33c731d0032425dfa3e3ec6dab7115fa12f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 22 Sep 2022 12:06:09 +0200 Subject: [PATCH 029/426] Misc minor cleaning/improvements to RT|FT kernel test --- Kernel_23/test/Kernel_23/CMakeLists.txt | 4 +-- .../Kernel_23/test_RT_or_FT_predicates.cpp | 35 +++++++++++-------- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index 0d413d701ff..c194a833079 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -35,8 +35,8 @@ create_single_source_cgal_program("test_Projection_traits_xy_3_Intersect_2.cpp") set(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS ON) if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) - # expensive because of templated operators creating a lot of possible combinations - add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES) + # templated operators create a lot of possible combinations, which is expensive to test + add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) create_single_source_cgal_program("atomic_compilation_test.cpp") create_single_source_cgal_program("test_RT_or_FT_predicates.cpp") diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index ed0d63f7eef..d1e3eb3b585 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -16,15 +16,15 @@ // > 8, everything #define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 8 -std::vector predicates_types = { }; +std::vector predicates_types = { "Angle_2" }; -// @todo, technically somebody might in the future create predicates with non kernel objects (nor FT). -// In that case, they'd have to be added to these lists since there is no scrapping of the predicate -// arguments but rather try all combinations of objects from these lists. -std::vector object_types_2 = { "FT" }; -std::vector object_types_3 = { "FT" }; +// @todo, technically somebody could create predicates with non-kernel objects (nor FT/Origin), e.g. `int`. +// In that case, these arguments would have to be added to the lists below since there is no scrapping +// of the predicate arguments, but simply trying all combinations of objects from these lists. +std::vector object_types_2 = { "FT", "Origin" }; +std::vector object_types_3 = { "FT", "Origin" }; -// @todo potential operator()s with more than MAX_ARITY are not tested +// @todo potential operator()s with fewer than MIN_ARITY and more than MAX_ARITY are not tested constexpr std::size_t MIN_ARITY = 0; constexpr std::size_t MAX_ARITY = 12; @@ -82,6 +82,8 @@ std::string parameter_with_namespace(const std::string& FT_name, return "CGAL::FT_necessary"; else if(o == "FT") return "K::FT"; + else if(o == "Origin") + return "CGAL::Origin"; else return "CGAL::" + o + "<" + kernel_with_FT(FT_name) + " >"; } @@ -113,7 +115,7 @@ Compilation_result parse_output(const std::string& predicate_name, return UNKNOWN; } -#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES +#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS // Compare_(squared)_distance_23 have templated operator()s, which are a lot of combinations to test. // In templated operator()s, the compare is simply a call to squared_distance()s and a CGAL::compare(). // Below prunes some exploration branches in case the first squared_distance() call does not even compile. @@ -142,7 +144,7 @@ Compilation_result parse_output(const std::string& predicate_name, } else if(line.find("too many arguments") != std::string::npos) { // @todo what is that exact error? res = FAILED_NO_MATCH; break; -#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES +#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS } else if(prune_compare_distance_branches && parameters.size() > 1 && parameters[0] != "Any" && parameters[1] != "Any" && line.find(std::string{"no matching function for call to ‘squared_distance(const " + @@ -168,7 +170,8 @@ Compilation_result parse_output(const std::string& predicate_name, res = SUCCESSFUL; break; } else if(line.find("undefined reference") != std::string::npos) { - res = SUCCESSFUL; // @todo should it be a different value? + // Can happen because the conversion Any -> kernel object is not implemented + res = SUCCESSFUL; break; } } @@ -353,10 +356,11 @@ void test_predicate(const std::string& predicate_name, for(const std::string& object_type : object_types) { -#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES +#ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS // This pruning could be done for other predicates, but they're not as expensive so it doesn't matter if((predicate_name == "Compare_distance_2" || predicate_name == "Compare_distance_3" || - predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3") && + predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3" || + predicate_name == "Do_intersect_2" || predicate_name == "Do_intersect_3") && object_type == "FT") { continue; @@ -420,12 +424,13 @@ void test_predicate(const std::string& predicate_name) std::cout << "\n\n=== Test predicate: " << predicate_name << "... ===" << std::endl; #endif -#ifndef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES +#ifndef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS if(predicate_name == "Compare_distance_2" || predicate_name == "Compare_distance_3" || - predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3") + predicate_name == "Compare_squared_distance_2" || predicate_name == "Compare_squared_distance_3" || + predicate_name == "Do_intersect_2" || predicate_name == "Do_intersect_3") { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 1) - std::cout << "Skipping because 'CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_COMPARE_DISTANCES' is not defined!" << std::endl; + std::cout << "Skipping because 'CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS' is not defined!" << std::endl; #endif return; } From ae30bcf8190e11d60706846b6dea5fb7b2aea7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 22 Sep 2022 12:25:25 +0200 Subject: [PATCH 030/426] Remove obsolete RT/FT tests --- Kernel_23/test/Kernel_23/CMakeLists.txt | 2 - .../kernel_detect_predicates_arity.cpp | 94 ------------------- .../test/Kernel_23/test_predicate_with_RT.cpp | 35 ------- 3 files changed, 131 deletions(-) delete mode 100644 Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp delete mode 100644 Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index c194a833079..4f1021c49c4 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -15,7 +15,6 @@ create_single_source_cgal_program("Homogeneous.cpp") create_single_source_cgal_program("issue_129.cpp") create_single_source_cgal_program("issue_3301.cpp") create_single_source_cgal_program("Kernel_checker.cpp") -create_single_source_cgal_program("kernel_detect_predicates_arity.cpp") create_single_source_cgal_program("Lazy_kernel.cpp") create_single_source_cgal_program("origin_3.cpp") create_single_source_cgal_program("overload_bug.cpp") @@ -29,7 +28,6 @@ create_single_source_cgal_program("test_converter.cpp") create_single_source_cgal_program("test_Has_conversion.cpp") create_single_source_cgal_program("test_hash_functions.cpp") create_single_source_cgal_program("test_kernel__.cpp") -create_single_source_cgal_program("test_predicate_with_RT.cpp") create_single_source_cgal_program("test_projection_traits.cpp") create_single_source_cgal_program("test_Projection_traits_xy_3_Intersect_2.cpp") diff --git a/Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp b/Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp deleted file mode 100644 index aca12aa1b2a..00000000000 --- a/Kernel_23/test/Kernel_23/kernel_detect_predicates_arity.cpp +++ /dev/null @@ -1,94 +0,0 @@ -#define CGAL_NO_MPZF_DIVISION_OPERATOR 1 - -#include -#include - -using SCK = CGAL::Simple_cartesian; - -struct Any { - template operator const T&(); -}; - -template -void check_pred() { - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - std::cerr << std::is_invocable_v; - - // The following asserts that no predicate from the kernel has more than - // 8 arguments (actually the assertions are only from 9 to 12 arguments). - static_assert(!std::is_invocable_v); - static_assert(!std::is_invocable_v); - static_assert(!std::is_invocable_v); - static_assert(!std::is_invocable_v); - std::cerr << '\n'; -} - -int main() -{ -#define CGAL_Kernel_pred(P, Pf) \ - std::cerr << #P << ": "; \ - check_pred(); -#include - - // Bug with predicates with multiple overload of the call operator with the - // same number of arguments: the call with `Any` is ambiguous. - static_assert(std::is_invocable_v); - static_assert(!std::is_invocable_v); // AMBIGUOUS CALL - static_assert(!std::is_invocable_v); // AMBIGUOUS CALL - return 0; -} - - -/* - -WORK IN PROGRESS: - -In the CGAL Kernel: - - 2D: 49 predicates - - 3D: 50 predicates - - -## Try to detect all possible types of arguments of predicates, from the doc - -``` -[lrineau@fernand]~/Git/cgal-master/build-doc/doc_output/Kernel_23/xml% grep -h ' ' classKernel_1_1(^(Construct|Compute|Assign)*).xml | sed 's/]*>//; s|||; s| &|\&|' | sed 's/Kernel::/K::/'| sort | uniq -c | sort -n | grep -v _3 -``` - -3D: (14 types of arguments) - -const K::Direction_3& -const K::Triangle_3& -const K::Circle_3& -const K::Ray_3& -const K::Segment_3& -const K::Iso_cuboid_3& -const K::Line_3& -const K::Tetrahedron_3& -const K::FT& -const K::Plane_3& -const K::Sphere_3& -const K::Vector_3& -const K::Weighted_point_3& -const K::Point_3& - -2D: (10 types arguments) - -const K::Vector_2& -const K::Direction_2& -const K::Iso_rectangle_2& -const K::Ray_2& -const K::Circle_2& -const K::Triangle_2& -const K::FT& -const K::Segment_2& -const K::Weighted_point_2& -const K::Line_2& -const K::Point_2& - -*/ diff --git a/Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp b/Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp deleted file mode 100644 index 68b833ece67..00000000000 --- a/Kernel_23/test/Kernel_23/test_predicate_with_RT.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#define CGAL_NO_MPZF_DIVISION_OPERATOR 1 - -#include -#include - -template -void test(const R& rep) { - using Point_3 = typename R::Point_3; - using Segment_3 = typename R::Segment_3; - using Line_3 = typename R::Line_3; - - auto construct_point = rep.construct_point_3_object(); - Point_3 p2 = construct_point(CGAL::ORIGIN); - Point_3 p3 = construct_point(1,1,1); - Point_3 p4 = construct_point(1,1,2); - Point_3 p5 = construct_point(1,2,3); - Point_3 p6 = construct_point(4,2,1); - - auto construct_segment = rep.construct_segment_3_object(); - Segment_3 s2 = construct_segment(p2,p3), s1 = s2; - - auto construct_line = rep.construct_line_3_object(); - Line_3 l2 = construct_line(p5,p6); - - auto compare_distance = rep.compare_distance_3_object(); - // compare_distance(p2, p2, p2); - compare_distance(p2, s2, p2); - // compare_distance(p2, l2, p2); -} - -int main() -{ - test(CGAL::Simple_cartesian()); - return 0; -} From 35295887967179e5f3040b7b09dc4fe95967b73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 22 Sep 2022 21:41:02 +0200 Subject: [PATCH 031/426] Partial revert of 7c92341be777d7c295d3fa8010c34dc8b35eab16 (no C++17) --- Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 03dd6682c70..cf1a3bb37d4 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -97,9 +97,8 @@ function(CGAL_setup_CGAL_dependencies target) target_compile_definitions(${target} INTERFACE CGAL_TEST_SUITE=1) endif() - # CGAL now requires C++14. `decltype(auto)` is used as a marker of - # C++14. - target_compile_features(${target} INTERFACE cxx_std_17) + # CGAL now requires C++14. `decltype(auto)` is used as a marker of C++14. + target_compile_features(${target} INTERFACE cxx_decltype_auto) use_CGAL_Boost_support(${target} INTERFACE) From 24067447af55fcccb1d73c798a478b23b941aac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 23 Sep 2022 11:34:49 +0200 Subject: [PATCH 032/426] Make some predicates division-free --- .../include/CGAL/Cartesian/function_objects.h | 57 +++++++++++------- .../include/CGAL/constructions/kernel_ftC3.h | 60 ++++++++++--------- .../include/CGAL/predicates/kernel_ftC3.h | 11 ++-- 3 files changed, 73 insertions(+), 55 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 46a1798d7da..ac1b8814f88 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -669,28 +669,34 @@ namespace CartesianKernelFunctors { result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s, const FT& ft) const { - return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z(), - s.x(), s.y(), s.z() ), - ft); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + s.x(), s.y(), s.z(), + num, den); + return CGAL::compare(num, den * ft); } result_type operator()(const Point_3& p, const Point_3& q, const Point_3& r, const FT& ft) const { - return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z()), - ft); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + num, den); + return CGAL::compare(num, den * ft); } result_type operator()(const Point_3& p, const Point_3& q, const FT& ft) const { - return CGAL::compare(squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z() ), - ft); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + num, den); + return CGAL::compare(num, den * ft); } result_type @@ -1235,26 +1241,35 @@ namespace CartesianKernelFunctors { result_type operator()( const Point_3& p, const Point_3& q) const { - return squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z()); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + num, den); + return num / den; } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r) const { - return squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z()); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + num, den); + return num / den; } result_type operator()( const Point_3& p, const Point_3& q, const Point_3& r, const Point_3& s) const { - return squared_radiusC3(p.x(), p.y(), p.z(), - q.x(), q.y(), q.z(), - r.x(), r.y(), r.z(), - s.x(), s.y(), s.z()); + FT num, den; + squared_radiusC3(p.x(), p.y(), p.z(), + q.x(), q.y(), q.z(), + r.x(), r.y(), r.z(), + s.x(), s.y(), s.z(), + num, den); + return num / den; } }; diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h index 77fe5d05e7c..dbc973138c5 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h @@ -142,11 +142,12 @@ centroidC3( const FT &px, const FT &py, const FT &pz, template < class FT > CGAL_KERNEL_MEDIUM_INLINE -FT +void squared_radiusC3(const FT &px, const FT &py, const FT &pz, - const FT &qx, const FT &qy, const FT &qz, - const FT &rx, const FT &ry, const FT &rz, - const FT &sx, const FT &sy, const FT &sz) + const FT &qx, const FT &qy, const FT &qz, + const FT &rx, const FT &ry, const FT &rz, + const FT &sx, const FT &sy, const FT &sz, + FT &num, FT &den) { // Translate p to origin to simplify the expression. FT qpx = qx-px; @@ -163,29 +164,30 @@ squared_radiusC3(const FT &px, const FT &py, const FT &pz, FT sp2 = CGAL_NTS square(spx) + CGAL_NTS square(spy) + CGAL_NTS square(spz); FT num_x = determinant(qpy,qpz,qp2, - rpy,rpz,rp2, - spy,spz,sp2); + rpy,rpz,rp2, + spy,spz,sp2); FT num_y = determinant(qpx,qpz,qp2, - rpx,rpz,rp2, - spx,spz,sp2); + rpx,rpz,rp2, + spx,spz,sp2); FT num_z = determinant(qpx,qpy,qp2, - rpx,rpy,rp2, - spx,spy,sp2); - FT den = determinant(qpx,qpy,qpz, - rpx,rpy,rpz, - spx,spy,spz); - CGAL_kernel_assertion( ! CGAL_NTS is_zero(den) ); + rpx,rpy,rp2, + spx,spy,sp2); + FT dden = determinant(qpx,qpy,qpz, + rpx,rpy,rpz, + spx,spy,spz); + CGAL_kernel_assertion( ! CGAL_NTS is_zero(dden) ); - return (CGAL_NTS square(num_x) + CGAL_NTS square(num_y) - + CGAL_NTS square(num_z)) / CGAL_NTS square(2 * den); + num = CGAL_NTS square(num_x) + CGAL_NTS square(num_y) + CGAL_NTS square(num_z); + den = CGAL_NTS square(2 * dden); } template < class FT > CGAL_KERNEL_MEDIUM_INLINE -FT +void squared_radiusC3(const FT &px, const FT &py, const FT &pz, - const FT &qx, const FT &qy, const FT &qz, - const FT &sx, const FT &sy, const FT &sz) + const FT &qx, const FT &qy, const FT &qz, + const FT &sx, const FT &sy, const FT &sz, + FT &num, FT &den) { // Translate s to origin to simplify the expression. FT psx = px-sx; @@ -207,14 +209,14 @@ squared_radiusC3(const FT &px, const FT &py, const FT &pz, FT num_z = ps2 * determinant(qsx,qsy,rsx,rsy) - qs2 * determinant(psx,psy,rsx,rsy); - FT den = determinant(psx,psy,psz, - qsx,qsy,qsz, - rsx,rsy,rsz); + FT dden = determinant(psx,psy,psz, + qsx,qsy,qsz, + rsx,rsy,rsz); - CGAL_kernel_assertion( den != 0 ); + CGAL_kernel_assertion( dden != 0 ); - return (CGAL_NTS square(num_x) + CGAL_NTS square(num_y) - + CGAL_NTS square(num_z)) / CGAL_NTS square(2 * den); + num = CGAL_NTS square(num_x) + CGAL_NTS square(num_y) + CGAL_NTS square(num_z); + den = CGAL_NTS square(2 * dden); } template @@ -305,11 +307,13 @@ squared_distanceC3( const FT &px, const FT &py, const FT &pz, template < class FT > CGAL_KERNEL_INLINE -FT +void squared_radiusC3( const FT &px, const FT &py, const FT &pz, - const FT &qx, const FT &qy, const FT &qz) + const FT &qx, const FT &qy, const FT &qz, + FT &num, FT &den) { - return squared_distanceC3(px, py, pz, qx, qy, qz) / 4; + num = squared_distanceC3(px, py, pz, qx, qy, qz); + den = FT(4); } template < class FT > diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h index 8917cfaf36e..0bb67083388 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h @@ -764,20 +764,19 @@ power_side_of_bounded_power_sphereC3( const FT &rx, const FT &ry, const FT &rz, const FT &rw) { FT FT2(2); - FT FT4(4); FT dpx = px - qx; FT dpy = py - qy; FT dpz = pz - qz; FT dpw = pw - qw; FT dp2 = CGAL_NTS square(dpx) + CGAL_NTS square(dpy) + CGAL_NTS square(dpz); - FT drx = rx - (px + qx)/FT2; - FT dry = ry - (py + qy)/FT2; - FT drz = rz - (pz + qz)/FT2; - FT drw = rw - (pw + qw)/FT2; + FT drx = FT2 * rx - (px + qx); + FT dry = FT2 * ry - (py + qy); + FT drz = FT2 * rz - (pz + qz); + FT drw = FT2 * rw - (pw + qw); FT dr2 = CGAL_NTS square(drx) + CGAL_NTS square(dry) + CGAL_NTS square(drz); FT dpr = dpx*drx + dpy*dry +dpz*drz; return enum_cast( - - CGAL_NTS sign (dr2 - dp2/FT4 + dpr*dpw/dp2 - drw )); + - CGAL_NTS sign (dr2*dp2 - dp2*dp2 + FT2*dpr*dpw - FT2*drw*dp2 )); } } // namespace CGAL From d0fe75e908a11f8399f0c914583150adb57cff25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 23 Sep 2022 11:35:12 +0200 Subject: [PATCH 033/426] Add missing FT_necessary tags --- .../include/CGAL/Cartesian/function_objects.h | 6 +++- .../include/CGAL/Kernel/function_objects.h | 29 ++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index ac1b8814f88..92aa3d6b4eb 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -445,6 +445,10 @@ namespace CartesianKernelFunctors { return cmp_dist_to_pointC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } + // Slightly wkward, but not to get a false positive in the `test_RT_or_FT_predicate` + // as otherwise trying to compile P2,P2,P2,FT_necessary would match the T1,T2,T3 templated operator() + result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, FT_necessary) = delete; + template result_type operator()(const T1& p, const T2& q, const T3& r, FT_necessary = {}) const @@ -3978,7 +3982,7 @@ namespace CartesianKernelFunctors { { return a.rep().has_on(p); } result_type - operator()(const Sphere_3 &a, const Circle_3 &p) const + operator()(const Sphere_3 &a, const Circle_3 &p, FT_necessary = {}) const { return a.rep().has_on(p); } result_type diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 417bab778d8..4bcec963285 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -741,7 +741,8 @@ namespace CommonKernelFunctors { const Weighted_point_3 & q, const Weighted_point_3 & r, const Weighted_point_3 & s, - const FT& w) const + const FT& w, + FT_necessary = {}) const { return CGAL::compare(squared_radius_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -754,7 +755,8 @@ namespace CommonKernelFunctors { result_type operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, const Weighted_point_3 & r, - const FT& w) const + const FT& w, + FT_necessary = {}) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -765,7 +767,8 @@ namespace CommonKernelFunctors { result_type operator()(const Weighted_point_3 & p, const Weighted_point_3 & q, - const FT& w) const + const FT& w, + FT_necessary = {}) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -842,14 +845,14 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& p, const T2& q, const FT& d2) const + operator()(const T1& p, const T2& q, const FT& d2, FT_necessary = {}) const { return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - result_type - operator()(const T1& p, const T2& q, const T3& r, const T4& s) const + std::enable_if_t::value, result_type> + operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const { return CGAL::compare(internal::squared_distance(p, q, K()), internal::squared_distance(r, s, K())); @@ -3023,7 +3026,7 @@ namespace CommonKernelFunctors { template result_type - operator()(const T1& t1, const T2& t2) const + operator()(const T1& t1, const T2& t2, FT_necessary = {}) const { return Intersections::internal::do_intersect(t1, t2, K()); } }; @@ -3333,8 +3336,10 @@ namespace CommonKernelFunctors { return c.rep().has_on_bounded_side(p); } + // returns true iff the line segment ab is inside the union of the bounded sides of s1 and s2. result_type operator()(const Sphere_3& s1, const Sphere_3& s2, - const Point_3& a, const Point_3& b) const + const Point_3& a, const Point_3& b, + FT_necessary = {}) const { typedef typename K::Circle_3 Circle_3; typedef typename K::Point_3 Point_3; @@ -3360,13 +3365,9 @@ namespace CommonKernelFunctors { const Circle_3 circ(s1, s2); const Plane_3& plane = circ.supporting_plane(); const auto optional = K().intersect_3_object()(plane, Segment_3(a, b)); - CGAL_kernel_assertion_msg(bool(optional) == true, - "the segment does not intersect the supporting" - " plane"); + CGAL_kernel_assertion_msg(bool(optional) == true, "the segment does not intersect the supporting plane"); const Point_3* p = boost::get(&*optional); - CGAL_kernel_assertion_msg(p != 0, - "the segment intersection with the plane is " - "not a point"); + CGAL_kernel_assertion_msg(p != 0, "the segment intersection with the plane is not a point"); return squared_distance(circ.center(), *p) < circ.squared_radius(); } From f417495a0e62695c5b898909df63c13877fc2e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 23 Sep 2022 11:35:29 +0200 Subject: [PATCH 034/426] Handle deleted functions in RT/FT test --- Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index d1e3eb3b585..b612af490d8 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -16,7 +16,7 @@ // > 8, everything #define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 8 -std::vector predicates_types = { "Angle_2" }; +std::vector predicates_types = { }; // @todo, technically somebody could create predicates with non-kernel objects (nor FT/Origin), e.g. `int`. // In that case, these arguments would have to be added to the lists below since there is no scrapping @@ -141,7 +141,7 @@ Compilation_result parse_output(const std::string& predicate_name, if(line.find("no match for call") != std::string::npos) { res = FAILED_NO_MATCH; break; - } else if(line.find("too many arguments") != std::string::npos) { // @todo what is that exact error? + } else if(line.find("use of deleted function") != std::string::npos) { res = FAILED_NO_MATCH; break; #ifdef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS @@ -159,10 +159,6 @@ Compilation_result parse_output(const std::string& predicate_name, } else if(line.find("candidate") != std::string::npos) { res = FAILED_AMBIGUOUS_CALL; break; - } else if(line.find("call to deleted") != std::string::npos) { - // @todo unused since the macro makes it so no operator is defined at all - res = FAILED_NO_DIVISION_OPERATOR; - break; } else if(line.find("no match for ‘operator/’") != std::string::npos) { res = FAILED_NO_DIVISION_OPERATOR; break; From 9d40a225ff8365edebc6cc3fa4a4b3ebc6e4d332 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 23 Sep 2022 15:32:52 +0200 Subject: [PATCH 035/426] Update Kernel_23/test/Kernel_23/Filtered_cartesian.cpp --- Kernel_23/test/Kernel_23/Filtered_cartesian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp index b47ac7e12e3..6a9c564882d 100644 --- a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp +++ b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp @@ -15,7 +15,7 @@ // Author(s) : Sylvain Pion // This defines removes the operator/ from CGAL::Mpzf to check that functors not using -// the tag`FT_necessary` really only need a RT (ring type) without division. +// the tag `FT_necessary` really only need a RT (ring type) without division. #define CGAL_NO_MPZF_DIVISION_OPERATOR 1 #include From 08cf03e3498cb351831a2dbdcaff8927f87b4b49 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 26 Sep 2022 08:59:34 +0200 Subject: [PATCH 036/426] null vector for degenerate faces is only expected for EPECK can be non-null for other kernels --- .../Polygon_mesh_processing/pmp_compute_normals_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp index f0dc91bd25e..88a70ee95c0 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/pmp_compute_normals_test.cpp @@ -98,8 +98,11 @@ void test(const Mesh& mesh, // tests on non triangular meshes are @todo if(CGAL::is_triangle(halfedge(f, mesh), mesh)) { - if(PMP::is_degenerate_triangle_face(f, mesh)) - assert(get(fnormals, f) == CGAL::NULL_VECTOR); + if (PMP::is_degenerate_triangle_face(f, mesh)) + { + if (std::is_same()) + assert(get(fnormals, f) == CGAL::NULL_VECTOR); + } else assert(get(fnormals, f) != CGAL::NULL_VECTOR); } From a01c1e64d268306124c4b2ee929416be2071f405 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 26 Sep 2022 09:03:12 +0200 Subject: [PATCH 037/426] several predicates are only tested for EPECK as other kernels are inexact and may fail in certain cases/on certain architectures --- .../test_pmp_locate.cpp | 189 ++++++++++++------ 1 file changed, 128 insertions(+), 61 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 9102d733047..bce88097a96 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -172,15 +172,25 @@ void test_constructions(const G& g, // --------------------------------------------------------------------------- bar = PMP::barycentric_coordinates(p, q, r, p, K()); - assert(is_equal(bar[0], FT(1)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(0))); + if (std::is_same()) { + assert(is_equal(bar[0], FT(1)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(0))); + } + bar = PMP::barycentric_coordinates(p, q, r, q, K()); - assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(1)) && is_equal(bar[2], FT(0))); + if (std::is_same()) { + assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(1)) && is_equal(bar[2], FT(0))); + } + bar = PMP::barycentric_coordinates(p, q, r, r, K()); - assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(1))); + if (std::is_same()) { + assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(1))); + } Point mp = Point(CGAL::midpoint(bp, bq)); bar = PMP::barycentric_coordinates(p, q, r, mp); - assert(is_equal(bar[0], FT(0.5)) && is_equal(bar[1], FT(0.5)) && is_equal(bar[2], FT(0))); + if (std::is_same()) { + assert(is_equal(bar[0], FT(0.5)) && is_equal(bar[1], FT(0.5)) && is_equal(bar[2], FT(0))); + } int n = 100; while(n --> 0) // :) @@ -192,7 +202,9 @@ void test_constructions(const G& g, // Point to location and inversely Bare_point barycentric_pt = CGAL::barycenter(bp, a, bq, b, br, c); bar = PMP::barycentric_coordinates(p, q, r, Point(barycentric_pt)); - assert(is_equal(bar[0], a) && is_equal(bar[1], b) && is_equal(bar[2], c)); + if (std::is_same()) { + assert(is_equal(bar[0], a) && is_equal(bar[1], b) && is_equal(bar[2], c)); + } loc.second = bar; const Bare_point barycentric_pt_2 = @@ -201,22 +213,31 @@ void test_constructions(const G& g, .geom_traits(K()))); const FT sq_dist = CGAL::squared_distance(barycentric_pt, barycentric_pt_2); - assert(is_equal(sq_dist, FT(0))); + if (std::is_same()) { + assert(is_equal(sq_dist, FT(0))); + } } // --------------------------------------------------------------------------- loc = std::make_pair(f, CGAL::make_array(FT(0.3), FT(0.4), FT(0.3))); descriptor_variant dv = PMP::get_descriptor_from_location(loc, g); const face_descriptor* fd = boost::get(&dv); - assert(fd); + if (std::is_same()) { + assert(fd); + } loc = std::make_pair(f, CGAL::make_array(FT(0.5), FT(0.5), FT(0))); dv = PMP::get_descriptor_from_location(loc, g); const halfedge_descriptor* hd = boost::get(&dv); - assert(hd); + if (std::is_same()) { + assert(hd); + } loc = std::make_pair(f, CGAL::make_array(FT(1), FT(0), FT(0))); - assert(PMP::is_on_vertex(loc, source(halfedge(f, g), g), g)); + if (std::is_same()) { + assert(PMP::is_on_vertex(loc, source(halfedge(f, g), g), g)); + } + dv = PMP::get_descriptor_from_location(loc, g); if(const vertex_descriptor* v = boost::get(&dv)) { } else { assert(false); } @@ -249,24 +270,33 @@ void test_random_entities(const G& g, CGAL::Random& rnd) while(nn --> 0) // the infamous 'go to zero' operator { loc = PMP::random_location_on_mesh(g, rnd); - assert(loc.first != boost::graph_traits::null_face()); - assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && - loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && - loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); + if (std::is_same()) { + assert(loc.first != boost::graph_traits::null_face()); + assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && + loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && + loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); + } loc = PMP::random_location_on_face(f, g, rnd); - assert(loc.first == f); - assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && - loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && - loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); + if (std::is_same()) { + assert(loc.first == f); + assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && + loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && + loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); + } loc = PMP::random_location_on_halfedge(h, g, rnd); - assert(loc.first == face(h, g)); - assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && - loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && - loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); + if (std::is_same()) { + assert(loc.first == face(h, g)); + assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && + loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && + loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); + } int h_id = CGAL::halfedge_index_in_face(h, g); - assert(loc.second[(h_id+2)%3] == FT(0)); + + if (std::is_same()) { + assert(loc.second[(h_id + 2) % 3] == FT(0)); + } } } @@ -307,14 +337,18 @@ void test_helpers(const G& g, CGAL::Random& rnd) Face_location loc = PMP::random_location_on_face(f, g, rnd); std::set s; PMP::internal::incident_faces(loc, g, std::inserter(s, s.begin())); - assert(PMP::is_on_face_border(loc, g) || s.size() == 1); + if (std::is_same()) { + assert(PMP::is_on_face_border(loc, g) || s.size() == 1); + } loc = PMP::random_location_on_halfedge(h, g, rnd); std::vector vec; PMP::internal::incident_faces(loc, g, std::back_inserter(vec)); - assert(PMP::is_on_vertex(loc, source(h, g), g) || - PMP::is_on_vertex(loc, target(h, g), g) || - vec.size() == 2); + if (std::is_same()) { + assert(PMP::is_on_vertex(loc, source(h, g), g) || + PMP::is_on_vertex(loc, target(h, g), g) || + vec.size() == 2); + } } template @@ -432,28 +466,39 @@ void test_locate_in_face(const G& g, Point_reference p = get(vpm, v); loc = PMP::locate_vertex(v, g); - assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g)+1)%3], FT(0))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g)+2)%3], FT(0))); + + if (std::is_same()) { + assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); + } loc = PMP::locate_vertex(v, f, g); - assert(loc.first == f); - assert(is_equal(loc.second[0], FT(0)) && is_equal(loc.second[1], FT(1)) && is_equal(loc.second[2], FT(0))); + if (std::is_same()) { + assert(loc.first == f); + assert(is_equal(loc.second[0], FT(0)) && is_equal(loc.second[1], FT(1)) && is_equal(loc.second[2], FT(0))); + } loc = PMP::locate_on_halfedge(h, a, g); const int h_id = CGAL::halfedge_index_in_face(h, g); - assert(loc.first == f && is_equal(loc.second[(h_id+2)%3], FT(0))); + if (std::is_same()) { + assert(loc.first == f && is_equal(loc.second[(h_id + 2) % 3], FT(0))); + } loc = PMP::locate_in_face(p, f, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K())); int v_id = CGAL::vertex_index_in_face(v, f, g); - assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); + if (std::is_same()) { + assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); + } // Internal vertex point pmap typedef typename boost::property_map_value::type Point; Point p2 = get(CGAL::vertex_point, g, v); PMP::locate_in_face(p2, f, g); - assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); + if (std::is_same()) { + assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); + } // --------------------------------------------------------------------------- loc.second[0] = FT(0.2); @@ -475,11 +520,12 @@ void test_locate_in_face(const G& g, neigh_loc.second[(neigh_hd_id+2)%3] = FT(0); PMP::locate_in_adjacent_face(loc, neigh_f, g); + if (std::is_same()) { + assert(PMP::locate_in_common_face(loc, neigh_loc, g)); - assert(PMP::locate_in_common_face(loc, neigh_loc, g)); - - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); + } } } @@ -537,33 +583,44 @@ struct Locate_with_AABB_tree_Tester // 2D case // sanitize otherwise some test platforms fail PMP::internal::snap_location_to_border(loc, g, FT(1e-7)); - assert(PMP::is_on_vertex(loc, v, g)); // might fail du to precision issues... - assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g)+1)%3], FT(0))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g)+2)%3], FT(0))); - assert(is_equal(CGAL::squared_distance(to_p3( - PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); + if (std::is_same()) { + assert(PMP::is_on_vertex(loc, v, g)); // might fail due to precision issues... + assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); + assert(is_equal(CGAL::squared_distance(to_p3( + PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); + } loc = PMP::locate_with_AABB_tree(p_a, tree_a, g, CGAL::parameters::vertex_point_map(vpm)); - assert(is_equal(CGAL::squared_distance(to_p3( - PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); + if (std::is_same()) { + assert(is_equal(CGAL::squared_distance(to_p3( + PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); + } // --------------------------------------------------------------------------- loc = PMP::locate(p_a, g, CGAL::parameters::vertex_point_map(vpm)); - assert(is_equal(CGAL::squared_distance(to_p3( - PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(is_equal(CGAL::squared_distance(to_p3( + PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); + + assert(PMP::is_in_face(loc, g)); + } loc = PMP::locate_with_AABB_tree(CGAL::ORIGIN, tree_b, g, CGAL::parameters::vertex_point_map(vpm_b)); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } loc = PMP::locate(CGAL::ORIGIN, g, CGAL::parameters::vertex_point_map(vpm_b)); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } // --------------------------------------------------------------------------- Ray_2 r2 = random_2D_ray >(tree_a, rnd); loc = PMP::locate_with_AABB_tree(r2, tree_a, g, CGAL::parameters::vertex_point_map(vpm)); - if(loc.first != boost::graph_traits::null_face()) + if(loc.first != boost::graph_traits::null_face() && std::is_same()) assert(PMP::is_in_face(loc, g)); Ray_3 r3 = random_3D_ray >(tree_b, rnd); @@ -654,25 +711,35 @@ struct Locate_with_AABB_tree_Tester // 3D assert(tree_b.size() == num_faces(g)); Face_location loc = PMP::locate_with_AABB_tree(p3_a, tree_a, g, CGAL::parameters::vertex_point_map(vpm)); - assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g)+1)%3], FT(0))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g)+2)%3], FT(0))); - assert(is_equal(CGAL::squared_distance(PMP::construct_point(loc, g), p3_a), FT(0))); + if (std::is_same()) { + assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); + assert(is_equal(CGAL::squared_distance(PMP::construct_point(loc, g), p3_a), FT(0))); + } loc = PMP::locate_with_AABB_tree(p3_a, tree_a, g, CGAL::parameters::vertex_point_map(vpm)); - assert(is_equal(CGAL::squared_distance(PMP::construct_point(loc, g), p3_a), FT(0))); + if (std::is_same()) { + assert(is_equal(CGAL::squared_distance(PMP::construct_point(loc, g), p3_a), FT(0))); + } // --------------------------------------------------------------------------- loc = PMP::locate(p3_a, g, CGAL::parameters::snapping_tolerance(1e-7)); - assert(is_equal(CGAL::squared_distance(PMP::construct_point(loc, g), p3_a), FT(0))); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(is_equal(CGAL::squared_distance(PMP::construct_point(loc, g), p3_a), FT(0))); + assert(PMP::is_in_face(loc, g)); + } loc = PMP::locate_with_AABB_tree(CGAL::ORIGIN, tree_b, g, CGAL::parameters::vertex_point_map(custom_vpm_3D)); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } // Doesn't necessarily have to wrap with a P_to_P3: it can be done automatically internally loc = PMP::locate(CGAL::ORIGIN, g, CGAL::parameters::vertex_point_map(custom_vpm)); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } // --------------------------------------------------------------------------- Ray_3 r3 = random_3D_ray >(tree_b, rnd); From 5924d196ae38ad322b36c987cfdbfaf4457bbcc2 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Tue, 27 Sep 2022 18:38:12 +0200 Subject: [PATCH 038/426] removed unnecessary restrictions of tests to epeck --- .../test_pmp_locate.cpp | 71 +++++++------------ 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index bce88097a96..16ef668bb5e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -286,17 +286,13 @@ void test_random_entities(const G& g, CGAL::Random& rnd) } loc = PMP::random_location_on_halfedge(h, g, rnd); - if (std::is_same()) { - assert(loc.first == face(h, g)); - assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && - loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && - loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); - } + assert(loc.first == face(h, g)); + assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && + loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && + loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); int h_id = CGAL::halfedge_index_in_face(h, g); - if (std::is_same()) { - assert(loc.second[(h_id + 2) % 3] == FT(0)); - } + assert(loc.second[(h_id + 2) % 3] == FT(0)); } } @@ -337,18 +333,14 @@ void test_helpers(const G& g, CGAL::Random& rnd) Face_location loc = PMP::random_location_on_face(f, g, rnd); std::set s; PMP::internal::incident_faces(loc, g, std::inserter(s, s.begin())); - if (std::is_same()) { - assert(PMP::is_on_face_border(loc, g) || s.size() == 1); - } + assert(PMP::is_on_face_border(loc, g) || s.size() == 1); loc = PMP::random_location_on_halfedge(h, g, rnd); std::vector vec; PMP::internal::incident_faces(loc, g, std::back_inserter(vec)); - if (std::is_same()) { - assert(PMP::is_on_vertex(loc, source(h, g), g) || - PMP::is_on_vertex(loc, target(h, g), g) || - vec.size() == 2); - } + assert(PMP::is_on_vertex(loc, source(h, g), g) || + PMP::is_on_vertex(loc, target(h, g), g) || + vec.size() == 2); } template @@ -520,12 +512,10 @@ void test_locate_in_face(const G& g, neigh_loc.second[(neigh_hd_id+2)%3] = FT(0); PMP::locate_in_adjacent_face(loc, neigh_f, g); - if (std::is_same()) { - assert(PMP::locate_in_common_face(loc, neigh_loc, g)); + assert(PMP::locate_in_common_face(loc, neigh_loc, g)); - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); - } + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); } } @@ -582,40 +572,29 @@ struct Locate_with_AABB_tree_Tester // 2D case // sanitize otherwise some test platforms fail PMP::internal::snap_location_to_border(loc, g, FT(1e-7)); - - if (std::is_same()) { - assert(PMP::is_on_vertex(loc, v, g)); // might fail due to precision issues... - assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); - assert(is_equal(CGAL::squared_distance(to_p3( - PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); - } + assert(PMP::is_on_vertex(loc, v, g)); // might fail due to precision issues... + assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); + assert(is_equal(CGAL::squared_distance(to_p3( + PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); loc = PMP::locate_with_AABB_tree(p_a, tree_a, g, CGAL::parameters::vertex_point_map(vpm)); - if (std::is_same()) { - assert(is_equal(CGAL::squared_distance(to_p3( - PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); - } + assert(is_equal(CGAL::squared_distance(to_p3( + PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); // --------------------------------------------------------------------------- loc = PMP::locate(p_a, g, CGAL::parameters::vertex_point_map(vpm)); - if (std::is_same()) { - assert(is_equal(CGAL::squared_distance(to_p3( - PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); + assert(is_equal(CGAL::squared_distance(to_p3( + PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); - assert(PMP::is_in_face(loc, g)); - } + assert(PMP::is_in_face(loc, g)); loc = PMP::locate_with_AABB_tree(CGAL::ORIGIN, tree_b, g, CGAL::parameters::vertex_point_map(vpm_b)); - if (std::is_same()) { - assert(PMP::is_in_face(loc, g)); - } + assert(PMP::is_in_face(loc, g)); loc = PMP::locate(CGAL::ORIGIN, g, CGAL::parameters::vertex_point_map(vpm_b)); - if (std::is_same()) { - assert(PMP::is_in_face(loc, g)); - } + assert(PMP::is_in_face(loc, g)); // --------------------------------------------------------------------------- Ray_2 r2 = random_2D_ray >(tree_a, rnd); From fb36bde04562e2c6ed0ff6a9de24e0e971a46e66 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 28 Sep 2022 10:59:25 +0300 Subject: [PATCH 039/426] Declared an isolated-vertex iterator to pacify MSVC. Without it the implicit conversion from the iterator to the corresponding handle fails! --- .../CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index e618f3a37fa..5ad5f86b400 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -341,7 +341,10 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, halfedge_found->face(); // Go over the isolated vertices in the face. - for (auto iso_verts_it = face->isolated_vertices_begin(); + // The following statement pacifies MSVC. Without it the implicit conversion + // from the iterator to the corresponding handle fails! + Isolated_vertex_const_iterator iso_verts_it; + for (iso_verts_it = face->isolated_vertices_begin(); iso_verts_it != face->isolated_vertices_end(); ++iso_verts_it) { // The current isolated vertex should have the same x-coordinate as the From 680e144ad11a7203d44d2f28a4761896117bf059 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 29 Sep 2022 18:08:53 +0200 Subject: [PATCH 040/426] issue 6891 Kernel_23: inconsistent documentation Made preconditions in the C++ form. --- .../doc/Kernel_23/CGAL/Aff_transformation_2.h | 4 +-- Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h | 4 +-- Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h | 4 +-- Kernel_23/doc/Kernel_23/CGAL/Circle_2.h | 6 ++--- Kernel_23/doc/Kernel_23/CGAL/Circle_3.h | 4 +-- Kernel_23/doc/Kernel_23/CGAL/Direction_2.h | 2 +- Kernel_23/doc/Kernel_23/CGAL/Direction_3.h | 2 +- Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h | 8 +++--- .../doc/Kernel_23/CGAL/Iso_rectangle_2.h | 6 ++--- .../Kernel_23/CGAL/Kernel/global_functions.h | 6 ++--- Kernel_23/doc/Kernel_23/CGAL/Point_2.h | 8 +++--- Kernel_23/doc/Kernel_23/CGAL/Point_3.h | 8 +++--- Kernel_23/doc/Kernel_23/CGAL/Ray_2.h | 2 +- Kernel_23/doc/Kernel_23/CGAL/Ray_3.h | 2 +- Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h | 8 +++--- Kernel_23/doc/Kernel_23/CGAL/Vector_2.h | 8 +++--- Kernel_23/doc/Kernel_23/CGAL/Vector_3.h | 6 ++--- .../doc/Kernel_23/CGAL/Weighted_point_2.h | 6 ++--- .../doc/Kernel_23/CGAL/Weighted_point_3.h | 6 ++--- .../doc/Kernel_23/CGAL/rational_rotation.h | 2 +- .../Concepts/FunctionObjectConcepts.h | 27 +++++++++---------- 21 files changed, 64 insertions(+), 65 deletions(-) diff --git a/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h b/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h index 0300279b5ee..4bd99fa3771 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h @@ -107,7 +107,7 @@ approximates the rotation over the angle indicated by direction `d`, such that the differences between the sines and cosines of the rotation given by d and the approximating rotation are at most \f$ num/den\f$ each. -\pre \f$ num/den>0\f$ and \f$ d != 0\f$. +\pre `num/den > 0` and `d != 0`. */ Aff_transformation_2(const Rotation, const Direction_2 &d, @@ -116,7 +116,7 @@ const Kernel::RT &den = RT(1)); /*! introduces a rotation by the angle `rho`. -\pre \f$ sine\_rho^2 + cosine\_rho^2 == hw^2\f$. +\pre sine\_rho2 + cosine\_rho2 == hw2. */ Aff_transformation_2(const Rotation, const Kernel::RT &sine_rho, diff --git a/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h b/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h index 61267300f39..ec861b9cb72 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h @@ -77,13 +77,13 @@ double ymax() const; /*! Returns `xmin()` if `i==0` or `ymin()` if `i==1`. -\pre i==0 or i==1 +\pre `i==0` or `i==1` */ double min(int i) const; /*! Returns `xmax()` if `i==0` or `ymax()` if `i==1`. -\pre i==0 or i==1 +\pre `i==0` or `i==1` */ double max(int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h b/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h index ad69f1d00aa..a61d5e339af 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h @@ -90,14 +90,14 @@ double zmax() const; /*! Returns `xmin()` if `i==0` or `ymin()` if `i==1` or `zmin()` if `i==2`. -\pre i>=0 and i<=2 +\pre `i>=0` and `i<=2` */ double min(int i) const; /*! Returns `xmax()` if `i==0` or `ymax()` if `i==1` or `zmax()` if `i==2`. -\pre i>=0 and i<=2 +\pre `i>=0` and `i<=2` */ double max(int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h b/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h index 01238a5f044..1e9eacdeb0e 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h @@ -28,7 +28,7 @@ introduces a variable `c` of type `Circle_2`. It is initialized to the circle with center `center`, squared radius `squared_radius` and orientation `ori`. -\pre `ori` \f$ \neq\f$ `COLLINEAR`, and further, `squared_radius` \f$ \geq\f$ 0. +\pre `ori != COLLINEAR` and `squared_radius >= 0`. */ Circle_2(const Point_2 ¢er, const Kernel::FT &squared_radius, @@ -52,7 +52,7 @@ const Point_2 &r); introduces a variable `c` of type `Circle_2`. It is initialized to the circle with diameter \f$ \overline{pq}\f$ and orientation `ori`. -\pre `ori` \f$ \neq\f$ `COLLINEAR`. +\pre `ori != COLLINEAR`. */ Circle_2( const Point_2 &p, const Point_2 &q, @@ -63,7 +63,7 @@ const Orientation &ori = COUNTERCLOCKWISE); introduces a variable `c` of type `Circle_2`. It is initialized to the circle with center `center`, squared radius zero and orientation `ori`. -\pre `ori` \f$ \neq\f$ `COLLINEAR`. +\pre `ori != COLLINEAR`. \post `c.is_degenerate()` = `true`. */ Circle_2( const Point_2 ¢er, diff --git a/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h b/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h index 96063004383..1fcdcab6e68 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h @@ -21,7 +21,7 @@ public: introduces a variable `c` of type `Circle_3`. It is initialized to the circle of center `center` and squared radius `sq_r` in plane `plane`. -\pre `center` lies in `plane` and `sq_r` \f$ \geq\f$ 0. +\pre `center` lies in `plane` and `sq_r >= 0`. */ Circle_3(const Point_3 ¢er, const Kernel::FT &sq_r, @@ -32,7 +32,7 @@ introduces a variable `c` of type `Circle_3`. It is initialized to the circle of center `center` and squared radius `sq_r` in a plane normal to the vector `n`. -\pre `sq_r` \f$ \geq\f$ 0. +\pre `sq_r >= 0`. */ Circle_3(const Point_3 & center, const Kernel::FT & sq_r, diff --git a/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h b/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h index 5b2843b994e..00a2e8d74a5 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h @@ -60,7 +60,7 @@ Direction_2(const Kernel::RT &x, const Kernel::RT &y); /*! returns values, such that `d``== Direction_2(delta(0),delta(1))`. -\pre \f$ 0 \leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::RT delta(int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h b/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h index f11bf023cb3..81b096ac359 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h @@ -57,7 +57,7 @@ Direction_3(const Kernel::RT &x, const Kernel::RT &y, const Kernel::RT &z); /*! returns values, such that `d``== Direction_3(delta(0),delta(1),delta(2))`. -\pre \f$ 0 \leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::RT delta(int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h b/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h index 8cbbd395085..a32da1d2490 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h @@ -39,7 +39,7 @@ const Point_3 &q); introduces an iso-oriented cuboid `c` with diagonal opposite vertices `p` and `q`. The `int` argument value is only used to distinguish the two overloaded functions. -\pre `p.x()<=q.x()`, `p.y()<=q.y()`and `p.z()<=q.z()`. +\pre `p.x()<=q.x()`, `p.y()<=q.y()` and `p.z()<=q.z()`. */ Iso_cuboid_3(const Point_3 &p, const Point_3 &q, int); @@ -65,7 +65,7 @@ introduces an iso-oriented cuboid `c` with diagonal opposite vertices (`min_hx/hw`, `min_hy/hw`, `min_hz/hw`) and (`max_hx/hw`, `max_hy/hw`, `max_hz/hw`). -\pre `hw` \f$ \neq\f$ 0. +\pre `hw != 0`. */ Iso_cuboid_3( const Kernel::RT& min_hx, const Kernel::RT& min_hy, const Kernel::RT& min_hz, @@ -156,14 +156,14 @@ Kernel::FT zmax() const; /*! returns `i`-th %Cartesian coordinate of the smallest vertex of `c`. -\pre \f$ 0 \leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::FT min_coord(int i) const; /*! returns `i`-th %Cartesian coordinate of the largest vertex of `c`. -\pre \f$ 0 \leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::FT max_coord(int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h b/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h index 175d1261bea..d7228803e0e 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h @@ -62,7 +62,7 @@ const Point_2 &top); introduces an iso-oriented rectangle `r` with diagonal opposite vertices (`min_hx/hw`, `min_hy/hw`) and (`max_hx/hw`, `max_hy/hw`). -\pre `hw` \f$ \neq\f$ 0. +\pre `hw != 0`. */ Iso_rectangle_2(const Kernel::RT& min_hx, const Kernel::RT& min_hy, const Kernel::RT& max_hx, const Kernel::RT& max_hy, @@ -134,14 +134,14 @@ Kernel::FT ymax() const; /*! returns the `i`'th %Cartesian coordinate of the lower left vertex of `r`. -\pre \f$ 0 \leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::FT min_coord(int i) const; /*! returns the `i`'th %Cartesian coordinate of the upper right vertex of `r`. -\pre \f$ 0 \leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::FT max_coord(int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h index 3e4bba13a43..45c56fe7710 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h @@ -89,7 +89,7 @@ Angle angle(const CGAL::Point_3&p, /*! returns an approximation of the angle between `p-q` and `r-q`. The angle is given in degrees. -\pre `p` and `r` are not equal to `q`. +\pre `p != q` and `r != q`. */ template Kernel::FT approximate_angle(const CGAL::Point_3& p, @@ -341,7 +341,7 @@ const CGAL::Point_3& p4, const Kernel::FT&w4); /*! constructs the bisector line of the two points `p` and `q`. The bisector is oriented in such a way that `p` lies on its -positive side. \pre `p` and `q` are not equal. +positive side. \pre `p != q`. */ template CGAL::Line_2 bisector(const CGAL::Point_2 &p, @@ -367,7 +367,7 @@ const CGAL::Line_2 &l2); /*! constructs the bisector plane of the two points `p` and `q`. The bisector is oriented in such a way that `p` lies on its -positive side. \pre `p` and `q` are not equal. +positive side. \pre `p != q'. */ template CGAL::Plane_3 bisector(const CGAL::Point_3 &p, diff --git a/Kernel_23/doc/Kernel_23/CGAL/Point_2.h b/Kernel_23/doc/Kernel_23/CGAL/Point_2.h index 8ac3eff82d6..00ea07ef2fb 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Point_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Point_2.h @@ -71,7 +71,7 @@ Point_2(double x, double y); /*! introduces a point `p` initialized to `(hx/hw,hy/hw)`. -\pre `hw` \f$ \neq\f$ `Kernel::RT(0)`. +\pre `hw != Kernel::RT(0)`. */ Point_2(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hw = RT(1)); @@ -159,19 +159,19 @@ Kernel::FT y() const; /*! returns the i'th homogeneous coordinate of `p`. -\pre \f$ 0\leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::RT homogeneous(int i) const; /*! returns the i'th %Cartesian coordinate of `p`. -\pre \f$ 0\leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::FT cartesian(int i) const; /*! returns `cartesian(i)`. -\pre \f$ 0\leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::FT operator[](int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Point_3.h b/Kernel_23/doc/Kernel_23/CGAL/Point_3.h index deed3e522d7..0babd70a4c8 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Point_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Point_3.h @@ -56,7 +56,7 @@ Point_3(double x, double y, double z); /*! introduces a point `p` initialized to `(hx/hw,hy/hw, hz/hw)`. -\pre `hw` \f$ \neq\f$ 0. +\pre `hw != 0`. */ Point_3(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hz, const Kernel::RT &hw = RT(1)); @@ -154,19 +154,19 @@ Kernel::FT z() const; /*! returns the i'th homogeneous coordinate of `p`. -\pre \f$ 0\leq i \leq3\f$. +\pre `0 <= i <= 3`. */ Kernel::RT homogeneous(int i) const; /*! returns the i'th %Cartesian coordinate of `p`. -\pre \f$ 0\leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::FT cartesian(int i) const; /*! returns `cartesian(i)`. -\pre \f$ 0\leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::FT operator[](int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h b/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h index 87cd676cde9..c153b0f9ee3 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h @@ -65,7 +65,7 @@ Point_2 source() const; /*! returns a point on `r`. `point(0)` is the source, `point(i)`, with `i>0`, is different from the -source. \pre \f$ i \geq0\f$. +source. \pre `i >= 0`. */ Point_2 point(const Kernel::FT i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h b/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h index dd6926c3565..86e6efce248 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h @@ -65,7 +65,7 @@ Point_3 source() const; /*! returns a point on `r`. `point(0)` is the source. `point(i)`, with `i>0`, is different from the -source. \pre \f$ i \geq0\f$. +source. \pre `i >= 0`. */ Point_3 point(const Kernel::FT i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h b/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h index 053bac81119..f8541de6dd3 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h @@ -28,7 +28,7 @@ introduces a variable `c` of type `Sphere_3`. It is initialized to the sphere with center `center`, squared radius `squared_radius` and orientation `orientation`. -\pre `orientation` \f$ \neq\f$ \ref COPLANAR, and furthermore, `squared_radius` \f$ \geq\f$ 0. +\pre `orientation != COPLANAR` and `squared_radius >= 0`. */ Sphere_3( const Point_3 & center, const Kernel::FT & squared_radius, @@ -53,7 +53,7 @@ const Point_3 & s); introduces a variable `c` of type `Sphere_3`. It is initialized to the smallest sphere which passes through the points `p`, `q`, and `r`. The orientation of -the sphere is `o`. \pre `o` is not \ref COPLANAR. +the sphere is `o`. \pre `o != COPLANAR`. */ Sphere_3( const Point_3 & p, const Point_3 & q, @@ -65,7 +65,7 @@ const Orientation& o = COUNTERCLOCKWISE); introduces a variable `c` of type `Sphere_3`. It is initialized to the smallest sphere which passes through the points `p` and `q`. The orientation of -the sphere is `o`. \pre `o` is not \ref COPLANAR. +the sphere is `o`. \pre `o != COPLANAR`. */ Sphere_3( const Point_3 & p, const Point_3 & q, @@ -76,7 +76,7 @@ const Orientation& o = COUNTERCLOCKWISE); introduces a variable `c` of type `Sphere_3`. It is initialized to the sphere with center `center`, squared radius zero and orientation `orientation`. -\pre `orientation` \f$ \neq\f$ \ref COPLANAR. +\pre `orientation != COPLANAR`. \post `c.is_degenerate()` = `true`. */ Sphere_3( const Point_3 & center, diff --git a/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h b/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h index 42176a6daed..eaeab03a882 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h @@ -71,7 +71,7 @@ Vector_2(double x, double y); /*! introduces a vector `v` initialized to `(hx/hw,hy/hw)`. -\pre \f$ hw\neq0\f$. +\pre `hw != 0`. */ Vector_2(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hw = RT(1)); @@ -126,19 +126,19 @@ Kernel::FT y() const; /*! returns the i'th homogeneous coordinate of `v`. -\pre \f$ 0\leq i \leq2\f$. +\pre `0 <= i <= 2`. */ Kernel::RT homogeneous(int i) const; /*! returns the i'th Cartesian coordinate of `v`. -\pre \f$ 0\leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::FT cartesian(int i) const; /*! returns `cartesian(i)`. -\pre \f$ 0\leq i \leq1\f$. +\pre `0 <= i <= 1`. */ Kernel::FT operator[](int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h b/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h index 036dafdc8f2..d126bd97740 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h @@ -137,19 +137,19 @@ Kernel::FT z() const; /*! returns the i'th homogeneous coordinate of `v`. -\pre \f$ 0\leq i \leq3\f$. +\pre `0 <= i <= 3`. */ Kernel::RT homogeneous(int i) const; /*! returns the i'th %Cartesian coordinate of `v`. -\pre \f$ 0\leq i \leq2\f$. +\pre `0 <= i <= 2` */ Kernel::FT cartesian(int i) const; /*! returns `cartesian(i)`. -\pre \f$ 0\leq i \leq2\f$. +\pre `0 <= i <= 2` */ Kernel::FT operator[](int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_2.h b/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_2.h index 4c2d0a15cbc..01a147e6d64 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_2.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_2.h @@ -147,19 +147,19 @@ public: /*! returns the i'th homogeneous coordinate of `p`. - \pre \f$ 0\leq i \leq2\f$. + \pre `0 <= i <= 2` */ Kernel::RT homogeneous(int i) const; /*! returns the i'th %Cartesian coordinate of `p`. - \pre \f$ 0\leq i \leq1\f$. + \pre `0 <= i <= 1` */ Kernel::FT cartesian(int i) const; /*! returns `cartesian(i)`. - \pre \f$ 0\leq i \leq1\f$. + \pre `0 <= i <= 1` */ Kernel::FT operator[](int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_3.h b/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_3.h index e652a47049d..3dcb39e1786 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_3.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Weighted_point_3.h @@ -157,19 +157,19 @@ public: /*! returns the i'th homogeneous coordinate of `p`. - \pre \f$ 0\leq i \leq3\f$. + \pre `0 <= i <= 3` */ Kernel::RT homogeneous(int i) const; /*! returns the i'th %Cartesian coordinate of `p`. - \pre \f$ 0\leq i \leq2\f$. + \pre `0 <= i <= 2` */ Kernel::FT cartesian(int i) const; /*! returns `cartesian(i)`. - \pre \f$ 0\leq i \leq2\f$. + \pre `0 <= i <= 2` */ Kernel::FT operator[](int i) const; diff --git a/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h b/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h index 38dab692034..c56d44465fe 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h +++ b/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h @@ -7,7 +7,7 @@ computes integers `sin_num`, `cos_num` and `denom`, such that `sin_num`/`denom` approximates the sine of direction \f$ (\f$`dirx`,`diry`\f$ )\f$. The difference between the sine and the approximating rational is bounded by `eps_num`/`eps_den`. -\pre `eps_num` \f$ \neq0\f$. +\pre `eps_num != 0`. \cgalHeading{Implementation} diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 566d7643bcd..b837222dca1 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -3879,7 +3879,7 @@ public: /*! constructs the bisector of `p` and `q`. The bisector is oriented in such a way that `p` lies on its - positive side. \pre `p` and `q` are not equal. + positive side. \pre `p != q`. */ Kernel::Line_2 operator()(const Kernel::Point_2&p, const Kernel::Point_2&q ); @@ -3920,7 +3920,7 @@ public: /*! constructs the bisector plane of `p` and `q`. The bisector is oriented in such a way that `p` lies on its - positive side. \pre `p` and `q` are not equal. + positive side. \pre `p != q`. */ Kernel::Plane_3 operator()(const Kernel::Point_3&p, const Kernel::Point_3&q ); @@ -4200,7 +4200,7 @@ public: It is initialized to the circle with center `center`, squared radius `squared_radius` and orientation `orientation`. - \pre `orientation` \f$ \neq\f$ \ref CGAL::COLLINEAR, and further, `squared_radius` \f$ \geq\f$ 0. + \pre `orientation != CGAL::COLLINEAR` and `squared_radius >= 0`. */ Kernel::Circle_2 operator()( Kernel::Point_2 const& center, Kernel::FT const& squared_radius, @@ -4225,7 +4225,7 @@ public: introduces a variable of type `Kernel::Circle_2`. It is initialized to the circle with diameter `pq` and orientation `orientation`. - \pre `orientation` \f$ \neq\f$ \ref CGAL::COLLINEAR. + \pre `orientation != CGAL::COLLINEAR`. */ Kernel::Circle_2 operator()( Kernel::Point_2 const& p, Kernel::Point_2 const& q, @@ -4237,7 +4237,7 @@ public: introduces a variable of type `Kernel::Circle_2`. It is initialized to the circle with center `center`, squared radius zero and orientation `orientation`. - \pre `orientation` \f$ \neq\f$ \ref CGAL::COLLINEAR. + \pre `orientation != CGAL::COLLINEAR`. \post .`is_degenerate()` = `true`. */ Kernel::Circle_2 operator()( Kernel::Point_2 const& center, @@ -4269,7 +4269,7 @@ public: introduces a variable of type `Kernel::Circle_3`. It is initialized to the circle with center `center`, and squared radius `sq_r` in the plane `plane`. - \pre `center` lies in `plane` and `sq_r` \f$ \geq\f$ 0. + \pre `center` lies in `plane` and `sq_r >= 0`. */ Kernel::Circle_3 operator() ( Kernel::Point_3 const& center, @@ -4281,7 +4281,7 @@ public: It is initialized to the circle with center `center`, and squared radius `sq_r` in the plane containing `center` and normal to `n`. - \pre `sq_r` \f$ \geq\f$ 0. + \pre `sq_r >= 0`. */ Kernel::Circle_3 operator() ( Kernel::Point_3 const& center, @@ -5637,7 +5637,7 @@ public: introduces a direction orthogonal to `d`. If `o` is \ref CGAL::CLOCKWISE, `d` is rotated clockwise; if `o` is \ref CGAL::COUNTERCLOCKWISE, `d` is rotated counterclockwise. - \pre `o` is not \ref CGAL::COLLINEAR. + \pre `o != CGAL::COLLINEAR.` */ Kernel::Direction_2 operator()(const Kernel::Direction_2& d, Orientation o); @@ -5753,8 +5753,7 @@ public: /*! returns `v` rotated clockwise by 90 degrees, if `o` is \ref CGAL::CLOCKWISE, and rotated counterclockwise otherwise. - \pre `o` is not \ref CGAL::COLLINEAR. - + \pre `o != CGAL::COLLINEAR`. */ Kernel::Vector_2 operator()(const Kernel::Vector_2& v, Orientation o); @@ -6561,7 +6560,7 @@ public: introduces a sphere initialized to the sphere with center `center`, squared radius `squared_radius` and orientation `orientation`. - \pre `orientation` \f$ \neq\f$ \ref CGAL::COPLANAR, and furthermore, `squared_radius` \f$ \geq\f$ 0. + \pre `orientation != CGAL::COPLANAR` and `squared_radius >= 0`. */ Kernel::Sphere_3 operator()(const Kernel::Point_3 & center, const Kernel::FT & squared_radius, @@ -6582,7 +6581,7 @@ public: /*! introduces a sphere initialized to the smallest sphere which passes through the points `p`, `q`, and `r`. The orientation of - the sphere is `o`. \pre `o` is not \ref CGAL::COPLANAR. + the sphere is `o`. \pre `o != CGAL::COPLANAR`. */ Kernel::Sphere_3 operator()(const Kernel::Point_3 & p, const Kernel::Point_3 & q, @@ -6592,7 +6591,7 @@ public: /*! introduces a sphere initialized to the smallest sphere which passes through the points `p` and `q`. The orientation of - the sphere is `o`. \pre `o` is not \ref CGAL::COPLANAR. + the sphere is `o`. \pre `o != CGAL::COPLANAR`. */ Kernel::Sphere_3 operator()(const Kernel::Point_3 & p, const Kernel::Point_3 & q, @@ -6601,7 +6600,7 @@ public: /*! introduces a sphere `s` initialized to the sphere with center `center`, squared radius zero and orientation `orientation`. - \pre `orientation` \f$ \neq\f$ \ref CGAL::COPLANAR. + \pre `orientation != CGAL::COPLANAR`. \post `s.is_degenerate()` = `true`. */ Kernel::Sphere_3 operator()( const Kernel::Point_3 & center, From 28a8f25186d94b797442abc1ea22e0e735b345fb Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Sat, 1 Oct 2022 16:05:56 +0200 Subject: [PATCH 041/426] some more epeck-only tests in pmp_locate --- .../test_pmp_locate.cpp | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 16ef668bb5e..3997ade8a77 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -514,8 +514,10 @@ void test_locate_in_face(const G& g, PMP::locate_in_adjacent_face(loc, neigh_f, g); assert(PMP::locate_in_common_face(loc, neigh_loc, g)); - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); + if (std::is_same()) { + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); + } } } @@ -588,13 +590,19 @@ struct Locate_with_AABB_tree_Tester // 2D case assert(is_equal(CGAL::squared_distance(to_p3( PMP::construct_point(loc, g, CGAL::parameters::vertex_point_map(vpm))), p3_a), FT(0))); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } loc = PMP::locate_with_AABB_tree(CGAL::ORIGIN, tree_b, g, CGAL::parameters::vertex_point_map(vpm_b)); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } loc = PMP::locate(CGAL::ORIGIN, g, CGAL::parameters::vertex_point_map(vpm_b)); - assert(PMP::is_in_face(loc, g)); + if (std::is_same()) { + assert(PMP::is_in_face(loc, g)); + } // --------------------------------------------------------------------------- Ray_2 r2 = random_2D_ray >(tree_a, rnd); @@ -894,7 +902,7 @@ void test(CGAL::Random& rnd) { test_2D_triangulation("data/stair.xy", rnd); // test_2D_surface_mesh("data/blobby_2D.off", rnd); // temporarily disabled, until Surface_mesh's IO is "fixed" - test_surface_mesh_3D(CGAL::data_file_path("meshes/mech-holes-shark.off"), rnd); + test_surface_mesh_3D("meshes/mech-holes-shark.off", rnd); test_surface_mesh_projection("data/unit-grid.off", rnd); test_polyhedron("data-coref/elephant_split_2.off", rnd); } From 2c9b5ed5287ac800de2a4b8e7a0c1a80738c88f2 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Sat, 1 Oct 2022 16:07:03 +0200 Subject: [PATCH 042/426] more tests only for exact kernels in Kernel_23 --- .../include/CGAL/_test_cls_aff_transformation_2.h | 14 +++++++------- .../Kernel_23/include/CGAL/_test_cls_sphere_3.h | 6 +++--- .../CGAL/_test_fct_points_implicit_sphere.h | 2 +- .../include/CGAL/_test_mf_plane_3_to_2d.h | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_aff_transformation_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_aff_transformation_2.h index 4db9a3f3baf..98c2f96b0af 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_aff_transformation_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_aff_transformation_2.h @@ -268,7 +268,7 @@ _test_cls_aff_transformation_2(const R& ) assert( pnt.transform(gat3).transform(gat2) == pnt.transform(co1) ); assert( dir.transform(gat3).transform(gat2) == dir.transform(co1) ); assert( vec.transform(gat3).transform(gat2) == vec.transform(co1) ); - assert( lin.transform(gat3).transform(gat2) == lin.transform(co1) ); + assert( lin.transform(gat3).transform(gat2) == lin.transform(co1) || nonexact); co1 = ident * gat1; assert( vec.transform(gat1) == vec.transform(co1) ); assert( dir.transform(gat1) == dir.transform(co1) ); @@ -281,7 +281,7 @@ _test_cls_aff_transformation_2(const R& ) assert( lin.transform(gat1) == lin.transform(co1) ); co1 = gat1 * gat1.inverse() ; assert( vec == vec.transform(co1) ); - assert( pnt == pnt.transform(co1) ); + assert( pnt == pnt.transform(co1) || nonexact); assert( dir == dir.transform(co1) ); assert( lin == lin.transform(co1) ); @@ -619,7 +619,7 @@ _test_cls_aff_transformation_2(const R& ) CGAL::Point_2(1,3), CGAL::Point_2(2,1))); CGAL::Point_2 p(4,2); - assert(p.transform(refl) == CGAL::Point_2(0,0)); + assert(p.transform(refl) == CGAL::Point_2(0,0) || nonexact); //with translation @@ -642,7 +642,7 @@ _test_cls_aff_transformation_2(const R& ) assert(p1 == p.transform(comp1)); p1 = p.transform(refl); p1 = p1.transform(scal); - assert(p1 == p.transform(comp2)); + assert(p1 == p.transform(comp2) || nonexact); //with rotation CGAL::Aff_transformation_2 rot(CGAL::ROTATION, 1, 0); comp1 = refl*rot; @@ -652,7 +652,7 @@ _test_cls_aff_transformation_2(const R& ) assert(p1 == p.transform(comp1)); p1 = p.transform(refl); p1 = p1.transform(rot); - assert(p1 == p.transform(comp2)); + assert(p1 == p.transform(comp2) || nonexact); //with reflection CGAL::Aff_transformation_2 refl2(CGAL::REFLECTION, CGAL::Line_2( CGAL::Point_2(0,0), @@ -664,7 +664,7 @@ _test_cls_aff_transformation_2(const R& ) assert(p1 == p.transform(comp1)); p1 = p.transform(refl); p1 = p1.transform(refl2); - assert(p1 == p.transform(comp2)); + assert(p1 == p.transform(comp2) || nonexact); //with transformation CGAL::Aff_transformation_2 afft(1,2,3,4,5,6); comp1 = refl*afft; @@ -674,7 +674,7 @@ _test_cls_aff_transformation_2(const R& ) assert(p1 == p.transform(comp1)); p1 = p.transform(refl); p1 = p1.transform(afft); - assert(p1 == p.transform(comp2)); + assert(p1 == p.transform(comp2) || nonexact); //equality CGAL::Aff_transformation_2 a2(0,1,0,1), diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_sphere_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_sphere_3.h index c71651a9439..bf825032dcc 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_sphere_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_sphere_3.h @@ -88,11 +88,11 @@ _test_cls_sphere_3(const R& ) assert( cc != c8 ); assert( cc == c7 ); - assert( c5.center() == p3 ); + assert( c5.center() == p3 || nonexact); assert( cc.center() == p3 ); assert( c5.squared_radius() == FT( n9 ) ); assert( c4.squared_radius() == cc.squared_radius() ); - assert( c4 == c5 ); + assert( c4 == c5 || nonexact); assert( c4 == c7 ); assert( c4 != c8 ); assert( cn == cp.opposite() ); @@ -114,7 +114,7 @@ _test_cls_sphere_3(const R& ) std::cout << '.'; assert( c4.center() == p3 ); - assert( c5.center() == p3 ); + assert( c5.center() == p3 || nonexact); assert( c4.squared_radius() == FT( n9 ) ); assert( c5.squared_radius() == FT( n9 ) ); assert( c8.squared_radius() == FT( n9 ) ); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_points_implicit_sphere.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_points_implicit_sphere.h index 137c092f1c7..b67aa0330ac 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_points_implicit_sphere.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_points_implicit_sphere.h @@ -92,7 +92,7 @@ _test_fct_points_implicit_sphere(const R&) assert( CGAL::squared_distance( r, org ) == FT1 ); tpt = r.transform(rot_z); - assert( CGAL::squared_distance( tpt, org ) == FT1 ); + assert( CGAL::squared_distance( tpt, org ) == FT1 || nonexact); r = tpt.transform(rot_y); assert( CGAL::squared_distance( r, org ) == FT1 || nonexact ); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_mf_plane_3_to_2d.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_mf_plane_3_to_2d.h index 15ec54556b8..a9dfa26d2f4 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_mf_plane_3_to_2d.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_mf_plane_3_to_2d.h @@ -68,11 +68,11 @@ _test_mf_plane_3_to_2d(const R& ) Point_3 p6( n4, n5, n0, n8); Plane_3 pl3( p4, p5, p6); assert( p4 == pl3.to_3d( pl3.to_2d( p4)) || nonexact ); - assert( p5 == pl3.to_3d( pl3.to_2d( p5)) ); + assert( p5 == pl3.to_3d( pl3.to_2d( p5)) || nonexact); assert( p6 == pl3.to_3d( pl3.to_2d( p6)) || nonexact ); Plane_3 pl4( p4, p6, p5); assert( p4 == pl4.to_3d( pl4.to_2d( p4)) || nonexact ); - assert( p5 == pl4.to_3d( pl4.to_2d( p5)) ); + assert( p5 == pl4.to_3d( pl4.to_2d( p5)) || nonexact); assert( p6 == pl4.to_3d( pl4.to_2d( p6)) || nonexact ); Point_3 p7 = CGAL::midpoint( p1, p2); From cd3d7528eca1e8964902852302f0fbf5d8a684e4 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Sat, 1 Oct 2022 16:08:26 +0200 Subject: [PATCH 043/426] intersection is only validated for exact construction kernels --- .../test/Intersections_3/intersection_test_helper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Intersections_3/test/Intersections_3/intersection_test_helper.h b/Intersections_3/test/Intersections_3/intersection_test_helper.h index 7a57839f3df..a38e2bad55f 100644 --- a/Intersections_3/test/Intersections_3/intersection_test_helper.h +++ b/Intersections_3/test/Intersections_3/intersection_test_helper.h @@ -237,8 +237,8 @@ public: const auto ires12 = CGAL::intersection(o1, o2); - Res tmp; - if(has_exact_p) + Res tmp; + if(has_exact_c) { assert(CGAL::assign(tmp, ires12)); assert(approx_equal(tmp, result)); @@ -246,7 +246,7 @@ public: else { if(CGAL::assign(tmp, ires12)) - assert(approx_equal(tmp, result)); + CGAL_warning(approx_equal(tmp, result)); else CGAL_warning_msg(false, "Expected an intersection, but it was not found!"); } From 9611c8f3c0ec43c5c4f1e60fe7035afbfbf5e7ad Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Sat, 1 Oct 2022 16:09:30 +0200 Subject: [PATCH 044/426] using epsilon tolerance for Simple_cartesian instead of exact comparison --- .../Orthogonal_incremental_neighbor_search.cpp | 9 +++++---- .../test/Spatial_searching/Splitters.cpp | 11 +++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp b/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp index 58e8febe495..ddce5124c4e 100644 --- a/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp +++ b/Spatial_searching/test/Spatial_searching/Orthogonal_incremental_neighbor_search.cpp @@ -71,21 +71,21 @@ void run() typename K_search::iterator it = oins.begin(); typename K_search::Point_with_transformed_distance pd = *it; points2.push_back(get_point(pd.first)); - if(CGAL::squared_distance(query,get_point(pd.first)) != pd.second){ + if(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) >= 0.000000001){ std::cout << "different distances: " << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL_IA_FORCE_TO_DOUBLE(CGAL::squared_distance(query,get_point(pd.first))) == pd.second); + assert(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) < 0.000000001); it++; for(; it != oins.end();it++){ typename K_search::Point_with_transformed_distance qd = *it; assert(pd.second <= qd.second); pd = qd; points2.push_back(get_point(pd.first)); - if(CGAL_IA_FORCE_TO_DOUBLE(CGAL::squared_distance(query,get_point(pd.first))) != pd.second){ + if(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) >= 0.000000001){ std::cout << "different distances: " << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL_IA_FORCE_TO_DOUBLE(CGAL::squared_distance(query,get_point(pd.first))) == pd.second); + assert(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) < 0.000000001); } @@ -176,6 +176,7 @@ bool search(bool nearest) int main() { + std::cout << std::setprecision(17); bool OK=true; std::cout << "Testing Incremental_neighbor_search\n"; run(); diff --git a/Spatial_searching/test/Spatial_searching/Splitters.cpp b/Spatial_searching/test/Spatial_searching/Splitters.cpp index eb79416c6ca..9bde600fefa 100644 --- a/Spatial_searching/test/Spatial_searching/Splitters.cpp +++ b/Spatial_searching/test/Spatial_searching/Splitters.cpp @@ -60,20 +60,23 @@ struct Splitter_test { typename Orthogonal_incremental_neighbor_search::iterator it = oins.begin(); Point_with_transformed_distance pd = *it; points2.push_back(get_point(pd.first)); - if(CGAL::squared_distance(query,get_point(pd.first)) != pd.second){ + + std::cout << std::setprecision(17); + + if(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) >= 0.000000001){ std::cout << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL_IA_FORCE_TO_DOUBLE(CGAL::squared_distance(query,get_point(pd.first))) == pd.second); + assert(abs(CGAL::squared_distance(query,get_point(pd.first)) - pd.second) < 0.000000001); it++; for(; it != oins.end();it++){ Point_with_transformed_distance qd = *it; assert(pd.second <= qd.second); pd = qd; points2.push_back(get_point(pd.first)); - if(CGAL_IA_FORCE_TO_DOUBLE(CGAL::squared_distance(query,get_point(pd.first))) != pd.second){ + if(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) >= 0.000000001){ std::cout << CGAL::squared_distance(query,get_point(pd.first)) << " != " << pd.second << std::endl; } - assert(CGAL_IA_FORCE_TO_DOUBLE(CGAL::squared_distance(query,get_point(pd.first))) == pd.second); + assert(abs(CGAL::squared_distance(query, get_point(pd.first)) - pd.second) < 0.000000001); } std::sort(points.begin(),points.end()); std::sort(points2.begin(),points2.end()); From ea35fa8f88dbcabb24fca6d5fe0b5b76fe602227 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 5 Oct 2022 15:01:56 +0200 Subject: [PATCH 045/426] Fix autotest_cgal_with_ctest That commit makes the CMake variables `CGAL_TEST_SUITE` (the new one) and `RUNNING_CGAL_AUTO_TEST` (the legacy one) completely equivalent. --- Installation/CMakeLists.txt | 12 ++++++------ Installation/cmake/modules/CGAL_Common.cmake | 2 +- .../cmake/modules/CGAL_SetupCGALDependencies.cmake | 2 +- Installation/cmake/modules/CGAL_SetupFlags.cmake | 2 +- .../CGAL_enable_end_of_configuration_hook.cmake | 2 +- Installation/cmake/modules/UseCGAL.cmake | 2 +- Installation/lib/cmake/CGAL/CGALConfig.cmake | 4 ++-- .../Polyhedron/Plugins/Three_examples/CMakeLists.txt | 2 +- .../test/Set_movable_separability_2/CMakeLists.txt | 2 +- .../examples/Surface_mesher/CMakeLists.txt | 2 +- Three/doc/Three/Three.txt | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index e050c6b9c2b..c10bcd3b1f5 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -354,7 +354,7 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) cgal_setup_module_path() -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) message(STATUS "Operating system:") execute_process( COMMAND uname -a @@ -394,7 +394,7 @@ if(MSVC) )# Suppress warnings C4503 about "decorated name length exceeded" uniquely_add_flags(CGAL_CXX_FLAGS "/bigobj") # Use /bigobj by default - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) set(CMAKE_CXX_WARNING_LEVEL 2 CACHE STRING "MSVC C++ compiler warning level" FORCE) @@ -447,7 +447,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) if(GCC_FOUND) - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) uniquely_add_flags(CGAL_CXX_FLAGS "-Wall") # Remove -g from the relevant CMAKE_CXX_FLAGS. This will also # propagate to the rest of the tests, since we overwrite those @@ -484,7 +484,7 @@ message("== Generate version files (DONE) ==\n") # #-------------------------------------------------------------------------------------------------- -if(CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST) +if(CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) message("== Set up flags ==") # Ugly hack to be compatible with current CGAL testsuite process (as of @@ -842,7 +842,7 @@ endmacro() # This allows programs to locate CGALConfig.cmake set(CGAL_DIR ${CGAL_BINARY_DIR}) -if(NOT RUNNING_CGAL_AUTO_TEST) +if(NOT RUNNING_CGAL_AUTO_TEST AND NOT CGAL_TEST_SUITE) add_programs(examples examples OFF) add_programs(demo demos OFF) @@ -1258,4 +1258,4 @@ if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if(Qt5_FOUND) message(STATUS "USING Qt5_VERSION = '${Qt5Core_VERSION_STRING}'") endif()#Qt5_FOUND -endif()#RUNNING_CGAL_AUTO_TEST +endif()#RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index c9c61644d23..d6026c6cdf0 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -4,7 +4,7 @@ option(CGAL_DEV_MODE "Activate the CGAL developers mode. See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE" $ENV{CGAL_DEV_MODE}) -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # Just to avoid a warning from CMake if that variable is set on the command line... endif() diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index cb16e161fc7..da1f1d7a268 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -152,7 +152,7 @@ function(CGAL_setup_CGAL_dependencies target) "-features=extensions;-library=stlport4;-D_GNU_SOURCE") target_link_libraries(${target} INTERFACE "-library=stlport4") elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - if ( RUNNING_CGAL_AUTO_TEST ) + if ( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) target_compile_options(${target} INTERFACE "-Wall") endif() if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3) diff --git a/Installation/cmake/modules/CGAL_SetupFlags.cmake b/Installation/cmake/modules/CGAL_SetupFlags.cmake index 514ad5c58c8..3693e29724e 100644 --- a/Installation/cmake/modules/CGAL_SetupFlags.cmake +++ b/Installation/cmake/modules/CGAL_SetupFlags.cmake @@ -46,7 +46,7 @@ uniquely_add_flags( CMAKE_EXE_LINKER_FLAGS_DEBUG ${CGAL_EXE_LINKER_FLAGS_DE # Set a default build type if none is given if ( NOT CMAKE_BUILD_TYPE ) - if( RUNNING_CGAL_AUTO_TEST ) + if( RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Debug ) else () typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Release ) diff --git a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake index 5909d3fc525..9710c8dbd90 100644 --- a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake +++ b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake @@ -90,7 +90,7 @@ function(CGAL_run_at_the_end_of_configuration variable access value current_list if(DEFINED CMAKE_BUILD_TYPE AND ( NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "Debug") ) set(keyword WARNING) set(type warning) - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # No warning in the CMake test suite, but a status message set(keyword) set(type notice) diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 4d44ca90219..43449b85e51 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -13,7 +13,7 @@ if(NOT USE_CGAL_FILE_INCLUDED) set(USE_CGAL_FILE_INCLUDED 1) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake) - if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) + if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake) else() include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index 6edefb1810f..6f72b2cc2e4 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -89,7 +89,7 @@ if (NOT CGAL_DATA_DIR) if (EXISTS "${CMAKE_SOURCE_DIR}/../../data") set(CGAL_DATA_DIR "${CMAKE_SOURCE_DIR}/../../data") else() - if(CGAL_TEST_SUITE) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) message(WARNING "CGAL_DATA_DIR cannot be deduced, set the variable CGAL_DATA_DIR to set the default value of CGAL::data_file_path()") endif() endif() @@ -195,7 +195,7 @@ cgal_setup_module_path() set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) -if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) # Do not use -isystem for CGAL include paths set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt index a903de94ce5..bce67cbef7f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt @@ -17,7 +17,7 @@ find_package( COMPONENTS OpenGL Script Svg OPTIONAL_COMPONENTS ScriptTools WebSockets) -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) if(Qt5_FOUND) include(${CGAL_USE_FILE}) endif() diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index ae9419d4515..3beb5b93cd8 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.22) project(Set_movable_separability_2_Tests) -if(RUNNING_CGAL_AUTO_TEST) +if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # Just to avoid a warning from CMake when that variable is set on the command line... endif() if(CGAL_DIR) diff --git a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt index 5477ae22041..02e14ed5b1b 100644 --- a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt @@ -11,7 +11,7 @@ if(CGAL_ImageIO_FOUND) create_single_source_cgal_program("mesh_an_implicit_function.cpp") else() - if(RUNNING_CGAL_AUTO_TEST) + if(RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE) # Just to avoid a warning from CMake if that variable is set on the command line... endif() diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index 99a29c67242..de50c0a1d09 100644 --- a/Three/doc/Three/Three.txt +++ b/Three/doc/Three/Three.txt @@ -392,7 +392,7 @@ Notice that an external plugin will not be automatically loaded in the Polyhedro \section example Examples -All the examples are de-activated in the cmake list outside of our testsuite. To tesr them, one must add `-DRUNNING_CGAL_AUTO_TEST=ON` to the cmake call. +All the examples are de-activated in the cmake list outside of our testsuite. To test them, one must add `-DCGAL_TEST_SUITE=ON` to the cmake call. \subsection example1 Creating a Basic Plugin \cgalExample{Three_examples/Basic_plugin.cpp} From badfc7d5de6038c7b1ce115d4948f5641641b9bf Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 11 Oct 2022 09:58:02 +0200 Subject: [PATCH 046/426] add VERY_VERBOSE macro for global optimizers VERBOSE should not cout all the moves, the log is too long --- Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h | 2 +- Mesh_3/include/CGAL/Mesh_3/config.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h index adf53d159c5..f8925c41a0f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -974,7 +974,7 @@ update_mesh(const Moves_vector& moves, { FT size = std::get<2>(*it); -#ifdef CGAL_MESH_3_OPTIMIZER_VERBOSE +#ifdef CGAL_MESH_3_OPTIMIZER_VERY_VERBOSE std::cerr << "Moving #" << it - moves.begin() << " addr: " << &*v << " pt: " << tr_.point(v) diff --git a/Mesh_3/include/CGAL/Mesh_3/config.h b/Mesh_3/include/CGAL/Mesh_3/config.h index 6fc06788902..cc2e5187f9b 100644 --- a/Mesh_3/include/CGAL/Mesh_3/config.h +++ b/Mesh_3/include/CGAL/Mesh_3/config.h @@ -57,4 +57,10 @@ # endif #endif +#ifdef CGAL_MESH_3_VERY_VERBOSE +# ifndef CGAL_MESH_3_OPTIMIZER_VERY_VERBOSE +# define CGAL_MESH_3_OPTIMIZER_VERY_VERBOSE 1 +# endif +#endif + #endif // CGAL_MESH_3_CONFIG_H From b499178f7b1c2becaa114c9953be833f0d34f43e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 11 Oct 2022 09:58:47 +0200 Subject: [PATCH 047/426] dump_after_refine_surface must happen after scan_triangulation() to have c3t3 cells selected as they should --- Mesh_3/include/CGAL/Mesh_3/Mesher_3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index 1a13e725a44..08f5f11bbbf 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -575,7 +575,7 @@ refine_mesh(std::string dump_after_refine_surface_prefix) nbsteps = 0; facets_visitor_.activate(); - dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix); + std::cerr << "Start volume scan..."; CGAL_MESH_3_TASK_BEGIN(scan_cells_task_handle); cells_mesher_.scan_triangulation(); @@ -584,6 +584,7 @@ refine_mesh(std::string dump_after_refine_surface_prefix) std::cerr << "end scan. [Bad tets:" << cells_mesher_.size() << "]"; std::cerr << std::endl << std::endl; elapsed_time += timer.time(); + dump_c3t3(r_c3t3_, dump_after_refine_surface_prefix); timer.stop(); timer.reset(); timer.start(); std::cerr << "Refining...\n"; From 2c23a6d5c5d42fb08cd32fa64c144ff074a24acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 12 Oct 2022 21:24:59 +0200 Subject: [PATCH 048/426] Revert back to wrapping result_type to distinguish FT-necessary operator()s --- .../include/CGAL/Cartesian/function_objects.h | 24 ++++---- .../include/CGAL/Filtered_predicate.h | 36 +++-------- .../include/CGAL/Kernel/function_objects.h | 59 ++++++++++--------- .../test/Kernel_23/Filtered_cartesian.cpp | 2 +- STL_Extension/include/CGAL/tags.h | 24 +++++++- 5 files changed, 71 insertions(+), 74 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 92aa3d6b4eb..737a52dfc14 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -445,20 +445,16 @@ namespace CartesianKernelFunctors { return cmp_dist_to_pointC2(p.x(), p.y(), q.x(), q.y(), r.x(), r.y()); } - // Slightly wkward, but not to get a false positive in the `test_RT_or_FT_predicate` - // as otherwise trying to compile P2,P2,P2,FT_necessary would match the T1,T2,T3 templated operator() - result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, FT_necessary) = delete; - template - result_type - operator()(const T1& p, const T2& q, const T3& r, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const T3& r) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - std::enable_if_t::value, result_type> - operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); } @@ -596,15 +592,15 @@ namespace CartesianKernelFunctors { } template - result_type - operator()(const T1& p, const T2& q, const T3& r, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const T3& r) const { return CGAL::compare(squared_distance(p, q), squared_distance(p, r)); } template - std::enable_if_t::value, result_type> - operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(squared_distance(p, q), squared_distance(r, s)); } @@ -3981,8 +3977,8 @@ namespace CartesianKernelFunctors { operator()(const Circle_3 &a, const Point_3 &p) const { return a.rep().has_on(p); } - result_type - operator()(const Sphere_3 &a, const Circle_3 &p, FT_necessary = {}) const + Needs_FT + operator()(const Sphere_3 &a, const Circle_3 &p) const { return a.rep().has_on(p); } result_type diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index bf3cfdcf21c..90e9a554f75 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -86,15 +86,8 @@ public: template result_type - operator()(const Args&... args) const; -}; - -template - template -typename Filtered_predicate::result_type -Filtered_predicate:: operator()(const Args&... args) const -{ + { CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); // Protection is outside the try block as VC8 has the CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG { @@ -111,7 +104,8 @@ Filtered_predicate:: Protect_FPU_rounding p(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); return ep(c2e(args)...); -} + } +}; template class Filtered_predicate_RT_FT @@ -123,27 +117,17 @@ class Filtered_predicate_RT_FT EP_FT ep_ft; AP ap; - using Ares = typename AP::result_type; + using Ares = typename Remove_needs_FT::Type; public: - using result_type = typename EP_FT::result_type; + using result_type = typename Remove_needs_FT::Type; template struct Call_operator_needs_FT { - // This type traits class checks if the call operator can be called with - // `(const Args&..., FT_necessary())`. - using ArrayOfOne = char[1]; - using ArrayOfTwo = char[2]; - - static ArrayOfOne& test(...); - - template - static auto test(const Args2 &...args) - -> decltype(ap(c2a(args)..., FT_necessary()), - std::declval()); - - enum { value = sizeof(test(std::declval()...)) == sizeof(ArrayOfTwo) }; + using Actual_approx_res = decltype(ap(c2a(std::declval())...)); + using Approx_res = std::remove_cv_t >; + enum { value = std::is_same >::value }; }; // ## Important note @@ -154,9 +138,7 @@ public: // or `has_needs_FT` in // the file `Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h`. template - constexpr bool needs_FT(const Args&...) const { - return Call_operator_needs_FT::value; - } + bool needs_FT(const Args&...) const { return Call_operator_needs_FT::value; } template result_type diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 4bcec963285..1a7065e1a59 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -737,12 +737,12 @@ namespace CommonKernelFunctors { typedef Comparison_result result_type; - result_type operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const Weighted_point_3 & r, - const Weighted_point_3 & s, - const FT& w, - FT_necessary = {}) const + Needs_FT + operator()(const Weighted_point_3 & p, + const Weighted_point_3 & q, + const Weighted_point_3 & r, + const Weighted_point_3 & s, + const FT& w) const { return CGAL::compare(squared_radius_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -752,11 +752,11 @@ namespace CommonKernelFunctors { w); } - result_type operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const Weighted_point_3 & r, - const FT& w, - FT_necessary = {}) const + Needs_FT + operator()(const Weighted_point_3 & p, + const Weighted_point_3 & q, + const Weighted_point_3 & r, + const FT& w) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -765,10 +765,10 @@ namespace CommonKernelFunctors { w); } - result_type operator()(const Weighted_point_3 & p, - const Weighted_point_3 & q, - const FT& w, - FT_necessary = {}) const + Needs_FT + operator()(const Weighted_point_3 & p, + const Weighted_point_3 & q, + const FT& w) const { return CGAL::compare(squared_radius_smallest_orthogonal_sphereC3( p.x(),p.y(),p.z(),p.weight(), @@ -821,15 +821,15 @@ namespace CommonKernelFunctors { typedef typename K::Comparison_result result_type; template - result_type - operator()(const T1& p, const T2& q, const FT& d2, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const FT& d2) const { return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - std::enable_if_t::value, result_type> - operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(internal::squared_distance(p, q, K()), internal::squared_distance(r, s, K())); @@ -844,15 +844,15 @@ namespace CommonKernelFunctors { typedef typename K::Comparison_result result_type; template - result_type - operator()(const T1& p, const T2& q, const FT& d2, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const FT& d2) const { return CGAL::compare(internal::squared_distance(p, q, K()), d2); } template - std::enable_if_t::value, result_type> - operator()(const T1& p, const T2& q, const T3& r, const T4& s, FT_necessary = {}) const + Needs_FT + operator()(const T1& p, const T2& q, const T3& r, const T4& s) const { return CGAL::compare(internal::squared_distance(p, q, K()), internal::squared_distance(r, s, K())); @@ -3024,10 +3024,11 @@ namespace CommonKernelFunctors { public: typedef typename K::Boolean result_type; + // Needs FT because Line/Line (and variations) and Circle_2/X compute intersections template - result_type - operator()(const T1& t1, const T2& t2, FT_necessary = {}) const - { return Intersections::internal::do_intersect(t1, t2, K()); } + Needs_FT + operator()(const T1& t1, const T2& t2) const + { return { Intersections::internal::do_intersect(t1, t2, K())}; } }; template @@ -3337,9 +3338,9 @@ namespace CommonKernelFunctors { } // returns true iff the line segment ab is inside the union of the bounded sides of s1 and s2. - result_type operator()(const Sphere_3& s1, const Sphere_3& s2, - const Point_3& a, const Point_3& b, - FT_necessary = {}) const + Needs_FT + operator()(const Sphere_3& s1, const Sphere_3& s2, + const Point_3& a, const Point_3& b) const { typedef typename K::Circle_3 Circle_3; typedef typename K::Point_3 Point_3; diff --git a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp index 6a9c564882d..3c56a17f44b 100644 --- a/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp +++ b/Kernel_23/test/Kernel_23/Filtered_cartesian.cpp @@ -15,7 +15,7 @@ // Author(s) : Sylvain Pion // This defines removes the operator/ from CGAL::Mpzf to check that functors not using -// the tag `FT_necessary` really only need a RT (ring type) without division. +// the tag `Needs_FT<>` really only need a RT (ring type) without division. #define CGAL_NO_MPZF_DIVISION_OPERATOR 1 #include diff --git a/STL_Extension/include/CGAL/tags.h b/STL_Extension/include/CGAL/tags.h index dd13818aae9..6aa1988e1cc 100644 --- a/STL_Extension/include/CGAL/tags.h +++ b/STL_Extension/include/CGAL/tags.h @@ -81,9 +81,27 @@ Assert_compile_time_tag( const Tag&, const Derived& b) x.match_compile_time_tag(b); } -// for kernel predicates, to indicate a FT providing a division operator is required -struct FT_necessary {}; +// To distinguish between kernel predicates for which a division-less FT is sufficient +template +struct Needs_FT +{ + T value; + Needs_FT(T v) : value(v) {} + operator T() const { return value; } +}; -} //namespace CGAL +template +struct Remove_needs_FT +{ + using Type = T; +}; + +template +struct Remove_needs_FT > +{ + using Type = T; +}; + +} // namespace CGAL #endif // CGAL_TAGS_H From 296d9e5cc0b17e1170de4602bda16294572cf0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 12 Oct 2022 21:28:40 +0200 Subject: [PATCH 049/426] Update RTFT test --- Kernel_23/test/Kernel_23/CMakeLists.txt | 7 +- .../include/atomic_RT_FT_predicate_headers.h | 12 +- .../Kernel_23/test_RT_or_FT_predicates.cpp | 257 +++++++++--------- 3 files changed, 140 insertions(+), 136 deletions(-) diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index 4f1021c49c4..fc53a665596 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -33,8 +33,11 @@ create_single_source_cgal_program("test_Projection_traits_xy_3_Intersect_2.cpp") set(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS ON) if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) - # templated operators create a lot of possible combinations, which is expensive to test - add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) + # Templated operators: + # - create a lot of possible combinations, which is expensive to test + # - create issues because some combinations might be RT-sufficient whereas others will require FT + # + # add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) create_single_source_cgal_program("atomic_compilation_test.cpp") create_single_source_cgal_program("test_RT_or_FT_predicates.cpp") diff --git a/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h b/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h index 85d4dcb8c49..81e656adb64 100644 --- a/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h +++ b/Kernel_23/test/Kernel_23/include/atomic_RT_FT_predicate_headers.h @@ -3,19 +3,21 @@ #define CGAL_NO_MPZF_DIVISION_OPERATOR +// These includes are there because this header is precompiled + #include -#include #include +#include #include +#include namespace CGAL { namespace Kernel_23_tests { -struct Any { - - template ::value>::type> +struct Any +{ + template operator T(); }; diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index b612af490d8..d9902dd34f7 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -14,7 +14,7 @@ // > 2, same as above + some general indications on what is going on // > 4, same as above + even more indications on what is going on // > 8, everything -#define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 8 +#define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 4 std::vector predicates_types = { }; @@ -32,23 +32,23 @@ const std::string kernel_name = "Simple_cartesian"; const std::string FT_div = "double"; const std::string RT_no_div = "CGAL::Mpzf"; +enum Needs_FT_checks +{ + NO_CHECK = 0, + CHECK_NEEDS_FT, + CHECK_NO_NEEDS_FT +}; + enum Compilation_result { SUCCESSFUL = 0, // if it got to linking, it is also a successful compilation FAILED_NO_MATCH, FAILED_AMBIGUOUS_CALL, // ambiguous calls means the arity is valid FAILED_NO_DIVISION_OPERATOR, // used to detect if a valid compilation can be done with RT + FAILED_STATIC_ASSERTION, // used to detect failures in the result type checks UNKNOWN }; -enum class Arity_test_result -{ - EXPLORATION_REQUIRED = 0, - RT_SUFFICIENT, - FT_NECESSARY, - NO_MATCH -}; - inline const char* get_error_message(int error_code) { // Messages corresponding to Error_code list above. Must be kept in sync! @@ -58,6 +58,7 @@ inline const char* get_error_message(int error_code) "Failed: no match!", "Failed: ambiguous call!", "Failed: called division operator!", + "Failed: static assertion violated!", "Unexpected error!" }; @@ -78,8 +79,6 @@ std::string parameter_with_namespace(const std::string& FT_name, { if(o == "Any") return "CGAL::Kernel_23_tests::Any"; - else if(o == "FT_necessary") - return "CGAL::FT_necessary"; else if(o == "FT") return "K::FT"; else if(o == "Origin") @@ -162,6 +161,12 @@ Compilation_result parse_output(const std::string& predicate_name, } else if(line.find("no match for ‘operator/’") != std::string::npos) { res = FAILED_NO_DIVISION_OPERATOR; break; + } else if(line.find("no match for ‘operator/=’") != std::string::npos) { + res = FAILED_NO_DIVISION_OPERATOR; + break; + } else if(line.find("static assertion failed") != std::string::npos) { + res = FAILED_STATIC_ASSERTION; + break; } else if(line.find("Built") != std::string::npos) { res = SUCCESSFUL; break; @@ -180,16 +185,17 @@ Compilation_result parse_output(const std::string& predicate_name, return res; } -void generate_atomic_file(const std::string& FT_name, - const std::string& predicate_name, - const std::vector& parameters) +void generate_atomic_compilation_test(const std::string& FT_name, + const std::string& predicate_name, + const std::vector& parameters, + const Needs_FT_checks check = NO_CHECK) { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) - std::cout << "====== Generate atomic file... ======" << std::endl; + std::cout << "\n====== Generate atomic compilation test... ======" << std::endl; #endif #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) - std::cout << predicate_name << "("; + std::cout << "\t" << predicate_name << "("; for(std::size_t j=0, i=parameters.size(); j;\n"; out << "int main(int, char**)\n"; out << "{\n"; - out << " P p;\n"; + + out << " P p{};\n"; for(std::size_t j=0, i=parameters.size(); j::value));\n"; + else if(check == CHECK_NEEDS_FT) + out << ", NFT_B>::value));\n"; + } + out << " return EXIT_SUCCESS;\n"; out << "}\n"; out.close(); } -// Just to not get a diff at the end of the test -void restore_atomic_file() -{ - std::ofstream out("../atomic_compilation_test.cpp"); - if(!out) - { - std::cerr << "Error: could not write into atomic compilation test" << std::endl; - std::exit(1); - } - - out << "int main(int, char**) { }\n"; - out.close(); -} - -Arity_test_result test_arity(const std::string& predicate_name, - const std::size_t arity) -{ -#if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 2) - std::cout << "\n===== Checking potential arity " << arity << "... =====" << std::endl; -#endif - - std::vector parameters(arity, "Any"); - - generate_atomic_file(RT_no_div, predicate_name, parameters); - compile(); - Compilation_result res = parse_output(predicate_name); - - if(res == SUCCESSFUL) - return Arity_test_result::RT_SUFFICIENT; - else if(res == FAILED_NO_DIVISION_OPERATOR) - return Arity_test_result::FT_NECESSARY; - else if(res == FAILED_AMBIGUOUS_CALL) - return Arity_test_result::EXPLORATION_REQUIRED; - else // FAILED_NO_MATCH and UNKNOWN - return Arity_test_result::NO_MATCH; -} - -bool ensure_FT_necessary_is_present(const std::string& predicate_name, - // intentional copy, don't want to pollute the parameters with `FT_necessary` - std::vector parameters) +void ensure_NO_Needs_FT(const std::string& predicate_name, + const std::vector& parameters) { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) std::cout << predicate_name << "("; for(std::size_t j=0, i=parameters.size(); j 0) - std::cout << predicate_name << "("; - for(std::size_t j=0, i=parameters.size() - 1; j 0) - std::cerr << "Error: this predicate is `FT_necessary`, but the tag is missing!\n" << std::endl; + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) + std::cout << "Error: " << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) - std::cout << "... and the tag `FT_necessary` is correctly present!\n" << std::endl; + std::cerr << "Unexpected error during Needs_FT checks" << std::endl; #endif - return true; + assert(false); } } -bool ensure_FT_necessary_is_NOT_present(const std::string& predicate_name, - // intentional copy, don't want to pollute the parameters with `RT_sufficient` - std::vector parameters) +void ensure_Needs_FT(const std::string& predicate_name, + const std::vector& parameters) { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) std::cout << predicate_name << "("; for(std::size_t j=0, i=parameters.size(); j 0) - std::cout << predicate_name << "("; - for(std::size_t j=0, i=parameters.size() - 1; j 0) - std::cerr << "Error: this predicate is NOT 'FT_necessary', but the tag is present!\n" << std::endl; + std::cout << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) + std::cout << "Error: " << predicate_name << "("; + for(std::size_t j=0, i=parameters.size(); j 0) - std::cout << "... and the tag `FT_necessary` is (correctly) absent!\n" << std::endl; + std::cerr << "Unexpected error during Needs_FT checks" << std::endl; #endif - return true; + assert(false); } } @@ -364,31 +357,31 @@ void test_predicate(const std::string& predicate_name, #endif parameters[object_pos] = object_type; - generate_atomic_file(RT_no_div, predicate_name, parameters); + generate_atomic_compilation_test(RT_no_div, predicate_name, parameters); compile(); Compilation_result res = parse_output(predicate_name, RT_no_div, parameters); - // See if we can already conclude on the current parameter list - // - if that successful compiles, then it is RT_sufficient - // - call to deleted or missing division operator, this means FT_necessary - // - any other error, this combination of parameters was not a valid input for the predicate - if(res == SUCCESSFUL) + // See if we can already (i.e., possibly with `Any`s) conclude on the current parameter list + if(res == FAILED_NO_MATCH) { - ensure_FT_necessary_is_NOT_present(predicate_name, parameters); + // The object at the current position yields a compilation error, do not explore any further + continue; } - else if(res == FAILED_NO_DIVISION_OPERATOR) + else if(object_pos == last) { - ensure_FT_necessary_is_present(predicate_name, parameters); - } - - if(res == FAILED_AMBIGUOUS_CALL && object_pos != last) - { - // The object at the current position does not invalid the call, explore further this list - test_predicate(predicate_name, object_pos + 1, arity, parameters); + if(res == SUCCESSFUL) + { + ensure_NO_Needs_FT(predicate_name, parameters); + } + else if(res == FAILED_NO_DIVISION_OPERATOR) + { + ensure_Needs_FT(predicate_name, parameters); + } } else { - // The object at the current position yields a compilation error, do not explore any further + // The object at the current position does not invalid the call, explore further this list + test_predicate(predicate_name, object_pos + 1, arity, parameters); } } } @@ -397,9 +390,8 @@ void test_predicate(const std::string& predicate_name, const std::size_t arity) { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 2) - std::cout << "===== Test predicate with arity " << arity << "... =====" << std::endl; + std::cout << "\n\n==== Test predicate with arity " << arity << "... ====" << std::endl; #endif - CGAL_precondition(arity > 0); // Use "Any" to prune early: // 1st try "Object_1, Any, ..., Any" (i - 1 "Any") @@ -410,6 +402,14 @@ void test_predicate(const std::string& predicate_name, // the position of the object being changed/tested, when object_pos == arity - 1, // then this is a call with full objects on which we can do the RT test std::vector parameters(arity, "Any"); + + // Quick try to see if it even matches anything + generate_atomic_compilation_test(RT_no_div, predicate_name, parameters); + compile(); + Compilation_result res = parse_output(predicate_name); + if(res == FAILED_NO_MATCH) // No point with this current arity + return; + std::size_t object_pos = 0; test_predicate(predicate_name, object_pos, arity, parameters); } @@ -417,7 +417,7 @@ void test_predicate(const std::string& predicate_name, void test_predicate(const std::string& predicate_name) { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 1) - std::cout << "\n\n=== Test predicate: " << predicate_name << "... ===" << std::endl; + std::cout << "\n\n\n== Test predicate: " << predicate_name << "... ==" << std::endl; #endif #ifndef CGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS @@ -433,26 +433,25 @@ void test_predicate(const std::string& predicate_name) #endif for(std::size_t i=MIN_ARITY; i<=MAX_ARITY; ++i) - { - Arity_test_result res = test_arity(predicate_name, i); - if(res == Arity_test_result::RT_SUFFICIENT) - { - std::vector parameters(i, "Any"); - ensure_FT_necessary_is_NOT_present(predicate_name, parameters); - } - else if(res == Arity_test_result::FT_NECESSARY) - { - std::vector parameters(i, "Any"); - ensure_FT_necessary_is_present(predicate_name, parameters); - } - else if(res == Arity_test_result::EXPLORATION_REQUIRED) - { - test_predicate(predicate_name, i); - } - } + test_predicate(predicate_name, i); } -int main(int , char** ) +// Just to not get a diff at the end of the test +void restore_atomic_file() +{ + std::ofstream out("../atomic_compilation_test.cpp"); + if(!out) + { + std::cerr << "Error: could not write into atomic compilation test" << std::endl; + std::exit(1); + } + + out << "// This executable is used by test_RT_or_FT_predicates.cpp\n"; + out << "int main(int, char**) { }\n"; + out.close(); +} + +int main(int , char**) { // Get the predicates #define CGAL_Kernel_pred(X, Y) predicates_types.push_back(#X); From 73de5e49f4f147658b1d733eee909b6ce793d631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 12 Oct 2022 21:32:30 +0200 Subject: [PATCH 050/426] Remove unnecessary include --- Kernel_23/include/CGAL/Kernel/function_objects.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 1a7065e1a59..f8f5817c522 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -31,7 +31,6 @@ #include #include -#include // for std::is_same and std::enable_if #include // for Compute_dihedral_angle namespace CGAL { From 3745073df6a71da0e43dd7190ba3d19a6add2f9c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 13 Oct 2022 18:25:58 +0200 Subject: [PATCH 051/426] Fix a compilation error --- Kernel_23/include/CGAL/Kernel/function_objects.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index f8f5817c522..c9a7391f225 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -3351,17 +3351,17 @@ namespace CommonKernelFunctors { const bool a_in_s1 = has_on_bounded_side(s1, a); const bool a_in_s2 = has_on_bounded_side(s2, a); - if(!(a_in_s1 || a_in_s2)) return false; + if(!(a_in_s1 || a_in_s2)) return {false}; const bool b_in_s1 = has_on_bounded_side(s1, b); const bool b_in_s2 = has_on_bounded_side(s2, b); - if(!(b_in_s1 || b_in_s2)) return false; + if(!(b_in_s1 || b_in_s2)) return {false}; - if(a_in_s1 && b_in_s1) return true; - if(a_in_s2 && b_in_s2) return true; + if(a_in_s1 && b_in_s1) return {true}; + if(a_in_s2 && b_in_s2) return {true}; - if(!K().do_intersect_3_object()(s1, s2)) return false; + if(!K().do_intersect_3_object()(s1, s2)) return {false}; const Circle_3 circ(s1, s2); const Plane_3& plane = circ.supporting_plane(); const auto optional = K().intersect_3_object()(plane, Segment_3(a, b)); From f83b9704616b06253c5ad85eece7101d89e9b3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 13 Oct 2022 21:24:05 +0200 Subject: [PATCH 052/426] Add a comment explaining the purpose of atomic_compilation_test.cpp --- Kernel_23/test/Kernel_23/atomic_compilation_test.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp b/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp index 80c7b4bd8dd..be26c19f042 100644 --- a/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp +++ b/Kernel_23/test/Kernel_23/atomic_compilation_test.cpp @@ -1 +1,2 @@ +// This executable is used by test_RT_or_FT_predicates.cpp int main(int, char**) { } From 10eb694d380fffce2914c511c5f99893dc3d0256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 13 Oct 2022 23:11:05 +0200 Subject: [PATCH 053/426] Replace if constexpr with C++14 compatible code --- .../include/CGAL/Filtered_predicate.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Filtered_predicate.h b/Filtered_kernel/include/CGAL/Filtered_predicate.h index 90e9a554f75..8cbcaa2835a 100644 --- a/Filtered_kernel/include/CGAL/Filtered_predicate.h +++ b/Filtered_kernel/include/CGAL/Filtered_predicate.h @@ -122,6 +122,7 @@ class Filtered_predicate_RT_FT public: using result_type = typename Remove_needs_FT::Type; +private: template struct Call_operator_needs_FT { @@ -130,6 +131,15 @@ public: enum { value = std::is_same >::value }; }; + template ::value>* = nullptr> + result_type call(const Args&... args) const { return ep_ft(c2e_ft(args)...); } + + template ::value>* = nullptr> + result_type call(const Args&... args) const { return ep_rt(c2e_rt(args)...); } + +public: // ## Important note // // If you want to remove of rename that member function template `needs_FT`, @@ -159,14 +169,11 @@ public: CGAL_BRANCH_PROFILER_BRANCH(tmp); Protect_FPU_rounding p(CGAL_FE_TONEAREST); CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); - if constexpr (Call_operator_needs_FT::value) - return ep_ft(c2e_ft(args)...); - else - return ep_rt(c2e_rt(args)...); + + return call(args...); } }; - -} //namespace CGAL +} // namespace CGAL #endif // CGAL_FILTERED_PREDICATE_H From a46a6db2bb4fe6bbe138ac4c0ff331be1976728c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Oct 2022 12:15:48 +0200 Subject: [PATCH 054/426] Allow to use test_RT_or_FT_predicates with ninja, and ctest --- Kernel_23/test/Kernel_23/CMakeLists.txt | 6 +++- .../Kernel_23/test_RT_or_FT_predicates.cpp | 32 ++++++++++++------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index fc53a665596..a27b9eb2978 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -40,6 +40,10 @@ if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) # add_definitions(-DCGAL_KERNEL_23_TEST_RT_FT_PREDICATES_TEST_PREDICATES_WITH_TEMPLATED_OPERATORS) create_single_source_cgal_program("atomic_compilation_test.cpp") - create_single_source_cgal_program("test_RT_or_FT_predicates.cpp") target_precompile_headers(atomic_compilation_test PUBLIC [["atomic_RT_FT_predicate_headers.h"]]) + + create_single_source_cgal_program("test_RT_or_FT_predicates.cpp") + target_compile_definitions(test_RT_or_FT_predicates PRIVATE + "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}" + "CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}") endif() diff --git a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp index d9902dd34f7..03b2787cc0b 100644 --- a/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp +++ b/Kernel_23/test/Kernel_23/test_RT_or_FT_predicates.cpp @@ -14,7 +14,7 @@ // > 2, same as above + some general indications on what is going on // > 4, same as above + even more indications on what is going on // > 8, everything -#define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 4 +#define CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY 2 std::vector predicates_types = { }; @@ -87,13 +87,13 @@ std::string parameter_with_namespace(const std::string& FT_name, return "CGAL::" + o + "<" + kernel_with_FT(FT_name) + " >"; } -void compile() +int compile() { #if (CGAL_KERNEL_23_TEST_RT_FT_VERBOSITY > 4) std::cout << "====== Compiling atomic file... ======" << std::endl; #endif - std::system("make atomic_compilation_test > log.txt 2>&1"); + return std::system("cmake --build " CGAL_STRINGIZE(CMAKE_BINARY_DIR) " -t atomic_compilation_test > log.txt 2>&1"); } Compilation_result parse_output(const std::string& predicate_name, @@ -201,7 +201,7 @@ void generate_atomic_compilation_test(const std::string& FT_name, std::cout << ")" << std::endl; #endif - std::ofstream out("../atomic_compilation_test.cpp"); + std::ofstream out(CGAL_STRINGIZE(CMAKE_CURRENT_SOURCE_DIR) "/atomic_compilation_test.cpp"); if(!out) { std::cerr << "Error: could not write into atomic compilation test" << std::endl; @@ -259,8 +259,10 @@ void ensure_NO_Needs_FT(const std::string& predicate_name, // RT is sufficient, check that `Needs_FT` is not in the operator()'s return type generate_atomic_compilation_test(RT_no_div, predicate_name, parameters, CHECK_NO_NEEDS_FT); - compile(); - Compilation_result res = parse_output(predicate_name); + auto compilation_result = compile(); + Compilation_result res = compilation_result == 0 ? + SUCCESSFUL : + parse_output(predicate_name); if(res == SUCCESSFUL) { @@ -301,8 +303,10 @@ void ensure_Needs_FT(const std::string& predicate_name, // The predicate requires a FT with division, ensure that Needs_FT is present in the operator()'s return type generate_atomic_compilation_test(FT_div, predicate_name, parameters, CHECK_NEEDS_FT); - compile(); - Compilation_result res = parse_output(predicate_name); + auto compilation_result = compile(); + Compilation_result res = compilation_result == 0 ? + SUCCESSFUL : + parse_output(predicate_name); if(res == SUCCESSFUL) { @@ -358,8 +362,10 @@ void test_predicate(const std::string& predicate_name, parameters[object_pos] = object_type; generate_atomic_compilation_test(RT_no_div, predicate_name, parameters); - compile(); - Compilation_result res = parse_output(predicate_name, RT_no_div, parameters); + auto compilation_result = compile(); + Compilation_result res = compilation_result == 0 ? + SUCCESSFUL : + parse_output(predicate_name, RT_no_div, parameters); // See if we can already (i.e., possibly with `Any`s) conclude on the current parameter list if(res == FAILED_NO_MATCH) @@ -405,8 +411,10 @@ void test_predicate(const std::string& predicate_name, // Quick try to see if it even matches anything generate_atomic_compilation_test(RT_no_div, predicate_name, parameters); - compile(); - Compilation_result res = parse_output(predicate_name); + auto compilation_result = compile(); + Compilation_result res = compilation_result == 0 ? + SUCCESSFUL : + parse_output(predicate_name); if(res == FAILED_NO_MATCH) // No point with this current arity return; From fd6745af6248576b0aabc21698a4dfd843475d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 16:20:48 +0200 Subject: [PATCH 055/426] Use a more standard indentation in Weights/include --- .../include/CGAL/Weights/authalic_weights.h | 265 ++-- .../CGAL/Weights/barycentric_region_weights.h | 166 +-- .../include/CGAL/Weights/cotangent_weights.h | 829 ++++++----- .../CGAL/Weights/discrete_harmonic_weights.h | 717 +++++---- .../Weights/internal/pmp_weights_deprecated.h | 320 ++-- .../CGAL/Weights/internal/polygon_utils_2.h | 584 ++++---- Weights/include/CGAL/Weights/internal/utils.h | 1326 ++++++++--------- .../CGAL/Weights/inverse_distance_weights.h | 230 ++- .../include/CGAL/Weights/mean_value_weights.h | 852 +++++------ .../Weights/mixed_voronoi_region_weights.h | 206 ++- .../include/CGAL/Weights/shepard_weights.h | 339 +++-- .../include/CGAL/Weights/tangent_weights.h | 836 +++++------ .../CGAL/Weights/three_point_family_weights.h | 221 ++- .../CGAL/Weights/triangular_region_weights.h | 132 +- .../CGAL/Weights/uniform_region_weights.h | 135 +- .../include/CGAL/Weights/uniform_weights.h | 102 +- Weights/include/CGAL/Weights/utils.h | 303 ++-- .../CGAL/Weights/voronoi_region_weights.h | 168 +-- .../include/CGAL/Weights/wachspress_weights.h | 681 ++++----- 19 files changed, 4089 insertions(+), 4323 deletions(-) diff --git a/Weights/include/CGAL/Weights/authalic_weights.h b/Weights/include/CGAL/Weights/authalic_weights.h index 5b76f7a9480..25d38e60f26 100644 --- a/Weights/include/CGAL/Weights/authalic_weights.h +++ b/Weights/include/CGAL/Weights/authalic_weights.h @@ -14,186 +14,185 @@ #ifndef CGAL_AUTHALIC_WEIGHTS_H #define CGAL_AUTHALIC_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace authalic_ns { +/// \cond SKIP_IN_MANUAL +namespace authalic_ns { - template - FT half_weight(const FT cot, const FT r2) { - - FT w = FT(0); - CGAL_precondition(r2 != FT(0)); - if (r2 != FT(0)) { - const FT inv = FT(2) / r2; - w = cot * inv; - } - return w; - } - - template - FT weight(const FT cot_gamma, const FT cot_beta, const FT r2) { - - FT w = FT(0); - CGAL_precondition(r2 != FT(0)); - if (r2 != FT(0)) { - const FT inv = FT(2) / r2; - w = (cot_gamma + cot_beta) * inv; - } - return w; - } +template +FT half_weight(const FT cot, const FT r2) +{ + FT w = FT(0); + CGAL_precondition(r2 != FT(0)); + if (r2 != FT(0)) { + const FT inv = FT(2) / r2; + w = cot * inv; } - /// \endcond + return w; +} - /*! - \ingroup PkgWeightsRefAuthalicWeights - - \brief computes the half value of the authalic weight. - - This function constructs the half of the authalic weight using the precomputed - cotangent and squared distance values. The returned value is - \f$\frac{2\textbf{cot}}{\textbf{d2}}\f$. - - \tparam FT - a model of `FieldNumberType` - - \param cot - the cotangent value - - \param d2 - the squared distance value - - \pre d2 != 0 - - \sa `authalic_weight()` - */ - template - FT half_authalic_weight(const FT cot, const FT d2) { - return authalic_ns::half_weight(cot, d2); +template +FT weight(const FT cot_gamma, const FT cot_beta, const FT r2) +{ + FT w = FT(0); + CGAL_precondition(r2 != FT(0)); + if (r2 != FT(0)) + { + const FT inv = FT(2) / r2; + w = (cot_gamma + cot_beta) * inv; } - #if defined(DOXYGEN_RUNNING) + return w; +} - /*! - \ingroup PkgWeightsRefAuthalicWeights +} // namespace authalic_ns - \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT authalic_weight( +/// \endcond + +/*! + \ingroup PkgWeightsRefAuthalicWeights + + \brief computes the half value of the authalic weight. + + This function constructs the half of the authalic weight using the precomputed + cotangent and squared distance values. The returned value is + \f$\frac{2\textbf{cot}}{\textbf{d2}}\f$. + + \tparam FT a model of `FieldNumberType` + + \param cot the cotangent value + \param d2 the squared distance value + + \pre d2 != 0 + + \sa `authalic_weight()` +*/ +template +FT half_authalic_weight(const FT cot, const FT d2) +{ + return authalic_ns::half_weight(cot, d2); +} + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefAuthalicWeights + + \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT authalic_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefAuthalicWeights +/*! + \ingroup PkgWeightsRefAuthalicWeights - \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT authalic_weight( + \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT authalic_weight( const typename GeomTraits::Point_3& p0, const typename GeomTraits::Point_3& p1, const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefAuthalicWeights +/*! + \ingroup PkgWeightsRefAuthalicWeights - \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT authalic_weight( + \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT authalic_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q) { } - /*! - \ingroup PkgWeightsRefAuthalicWeights +/*! + \ingroup PkgWeightsRefAuthalicWeights - \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT authalic_weight( + \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT authalic_weight( const CGAL::Point_3& p0, const CGAL::Point_3& p1, const CGAL::Point_3& p2, const CGAL::Point_3& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - // Overloads! - template - typename GeomTraits::FT authalic_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +// Overloads! +template +typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const FT cot_gamma = internal::cotangent_2(traits, t, r, q); - const FT cot_beta = internal::cotangent_2(traits, q, r, p); + const auto squared_distance_2 = traits.compute_squared_distance_2_object(); - const auto squared_distance_2 = - traits.compute_squared_distance_2_object(); - const FT d2 = squared_distance_2(q, r); - return authalic_ns::weight(cot_gamma, cot_beta, d2); - } + const FT cot_gamma = internal::cotangent_2(traits, t, r, q); + const FT cot_beta = internal::cotangent_2(traits, q, r, p); - template - typename GeomTraits::FT authalic_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { + const FT d2 = squared_distance_2(q, r); + return authalic_ns::weight(cot_gamma, cot_beta, d2); +} - const GeomTraits traits; - return authalic_weight(t, r, p, q, traits); - } +template +typename GeomTraits::FT authalic_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return authalic_weight(t, r, p, q, traits); +} - template - typename GeomTraits::FT authalic_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { +template +typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const FT cot_gamma = internal::cotangent_3(traits, t, r, q); - const FT cot_beta = internal::cotangent_3(traits, q, r, p); + const auto squared_distance_3 = traits.compute_squared_distance_3_object(); - const auto squared_distance_3 = - traits.compute_squared_distance_3_object(); - const FT d2 = squared_distance_3(q, r); - return authalic_ns::weight(cot_gamma, cot_beta, d2); - } + const FT cot_gamma = internal::cotangent_3(traits, t, r, q); + const FT cot_beta = internal::cotangent_3(traits, q, r, p); + const FT d2 = squared_distance_3(q, r); - template - typename GeomTraits::FT authalic_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { + return authalic_ns::weight(cot_gamma, cot_beta, d2); +} - const GeomTraits traits; - return authalic_weight(t, r, p, q, traits); - } - /// \endcond +template +typename GeomTraits::FT authalic_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return authalic_weight(t, r, p, q, traits); +} + +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/barycentric_region_weights.h b/Weights/include/CGAL/Weights/barycentric_region_weights.h index 46fe69bcfa4..c095bd8c520 100644 --- a/Weights/include/CGAL/Weights/barycentric_region_weights.h +++ b/Weights/include/CGAL/Weights/barycentric_region_weights.h @@ -14,131 +14,125 @@ #ifndef CGAL_BARYCENTRIC_REGION_WEIGHTS_H #define CGAL_BARYCENTRIC_REGION_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - #if defined(DOXYGEN_RUNNING) +#if defined(DOXYGEN_RUNNING) - /*! - \ingroup PkgWeightsRefBarycentricRegionWeights +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights - \brief computes the area of the barycentric cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT barycentric_area( + \brief computes the area of the barycentric cell in 2D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT barycentric_area( const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefBarycentricRegionWeights +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights - \brief computes the area of the barycentric cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT barycentric_area( + \brief computes the area of the barycentric cell in 3D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT barycentric_area( const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefBarycentricRegionWeights +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights - \brief computes the area of the barycentric cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT barycentric_area( + \brief computes the area of the barycentric cell in 2D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT barycentric_area( const CGAL::Point_2& p, const CGAL::Point_2& q, const CGAL::Point_2& r) { } - /*! - \ingroup PkgWeightsRefBarycentricRegionWeights +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights - \brief computes the area of the barycentric cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT barycentric_area( + \brief computes the area of the barycentric cell in 3D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT barycentric_area( const CGAL::Point_3& p, const CGAL::Point_3& q, const CGAL::Point_3& r) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT barycentric_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const auto midpoint_2 = - traits.construct_midpoint_2_object(); - const auto centroid_2 = - traits.construct_centroid_2_object(); + const auto midpoint_2 = traits.construct_midpoint_2_object(); + const auto centroid_2 = traits.construct_centroid_2_object(); - const auto center = centroid_2(p, q, r); - const auto m1 = midpoint_2(q, r); - const auto m2 = midpoint_2(q, p); + const auto center = centroid_2(p, q, r); + const auto m1 = midpoint_2(q, r); + const auto m2 = midpoint_2(q, p); - const FT A1 = internal::positive_area_2(traits, q, m1, center); - const FT A2 = internal::positive_area_2(traits, q, center, m2); - return A1 + A2; - } + const FT A1 = internal::positive_area_2(traits, q, m1, center); + const FT A2 = internal::positive_area_2(traits, q, center, m2); + return A1 + A2; +} - template - typename GeomTraits::FT barycentric_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT barycentric_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return barycentric_area(p, q, r, traits); +} - const GeomTraits traits; - return barycentric_area(p, q, r, traits); - } +template +typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - template - typename GeomTraits::FT barycentric_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { + const auto midpoint_3 = traits.construct_midpoint_3_object(); + const auto centroid_3 = traits.construct_centroid_3_object(); - using FT = typename GeomTraits::FT; - const auto midpoint_3 = - traits.construct_midpoint_3_object(); - const auto centroid_3 = - traits.construct_centroid_3_object(); + const auto center = centroid_3(p, q, r); + const auto m1 = midpoint_3(q, r); + const auto m2 = midpoint_3(q, p); - const auto center = centroid_3(p, q, r); - const auto m1 = midpoint_3(q, r); - const auto m2 = midpoint_3(q, p); + const FT A1 = internal::positive_area_3(traits, q, m1, center); + const FT A2 = internal::positive_area_3(traits, q, center, m2); + return A1 + A2; +} - const FT A1 = internal::positive_area_3(traits, q, m1, center); - const FT A2 = internal::positive_area_3(traits, q, center, m2); - return A1 + A2; - } +template +typename GeomTraits::FT barycentric_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return barycentric_area(p, q, r, traits); +} - template - typename GeomTraits::FT barycentric_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - return barycentric_area(p, q, r, traits); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index 0591d105d0d..5b8a5617fa7 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -14,482 +14,505 @@ #ifndef CGAL_COTANGENT_WEIGHTS_H #define CGAL_COTANGENT_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace cotangent_ns { +/// \cond SKIP_IN_MANUAL - template - FT half_weight(const FT cot) { - return FT(2) * cot; - } +namespace cotangent_ns { - template - FT weight(const FT cot_beta, const FT cot_gamma) { - return FT(2) * (cot_beta + cot_gamma); - } - } - /// \endcond +template +FT half_weight(const FT cot) +{ + return FT(2) * cot; +} - /*! - \ingroup PkgWeightsRefCotangentWeights +template +FT weight(const FT cot_beta, const FT cot_gamma) +{ + return FT(2) * (cot_beta + cot_gamma); +} - \brief computes the half value of the cotangent weight. +} // namespace cotangent_ns - This function constructs the half of the cotangent weight using the precomputed - cotangent value. The returned value is - \f$2\textbf{cot}\f$. +/// \endcond - \tparam FT - a model of `FieldNumberType` +/*! + \ingroup PkgWeightsRefCotangentWeights - \param cot - the cotangent value + \brief computes the half value of the cotangent weight. - \sa `cotangent_weight()` - */ - template - FT half_cotangent_weight(const FT cot) { - return cotangent_ns::half_weight(cot); - } + This function constructs the half of the cotangent weight using the precomputed + cotangent value. The returned value is \f$2\textbf{cot}\f$. - #if defined(DOXYGEN_RUNNING) + \tparam FT a model of `FieldNumberType` - /*! - \ingroup PkgWeightsRefCotangentWeights + \param cot the cotangent value - \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT cotangent_weight( + \sa `cotangent_weight()` +*/ +template +FT half_cotangent_weight(const FT cot) +{ + return cotangent_ns::half_weight(cot); +} + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefCotangentWeights + + \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT cotangent_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefCotangentWeights +/*! + \ingroup PkgWeightsRefCotangentWeights - \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT cotangent_weight( + \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT cotangent_weight( const typename GeomTraits::Point_3& p0, const typename GeomTraits::Point_3& p1, const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefCotangentWeights +/*! + \ingroup PkgWeightsRefCotangentWeights - \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT cotangent_weight( + \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT cotangent_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q) { } - /*! - \ingroup PkgWeightsRefCotangentWeights +/*! + \ingroup PkgWeightsRefCotangentWeights - \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT cotangent_weight( + \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT cotangent_weight( const CGAL::Point_3& p0, const CGAL::Point_3& p1, const CGAL::Point_3& p2, const CGAL::Point_3& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT cotangent_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const FT cot_beta = internal::cotangent_2(traits, q, t, r); - const FT cot_gamma = internal::cotangent_2(traits, r, p, q); - return cotangent_ns::weight(cot_beta, cot_gamma); - } + const FT cot_beta = internal::cotangent_2(traits, q, t, r); + const FT cot_gamma = internal::cotangent_2(traits, r, p, q); - template - typename GeomTraits::FT cotangent_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { - GeomTraits traits; - return cotangent_weight(t, r, p, q, traits); - } + return cotangent_ns::weight(cot_beta, cot_gamma); +} - template - typename GeomTraits::FT cotangent_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { +template +typename GeomTraits::FT cotangent_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + GeomTraits traits; + return cotangent_weight(t, r, p, q, traits); +} - using FT = typename GeomTraits::FT; - const FT cot_beta = internal::cotangent_3(traits, q, t, r); - const FT cot_gamma = internal::cotangent_3(traits, r, p, q); - return cotangent_ns::weight(cot_beta, cot_gamma); - } +template +typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - template - typename GeomTraits::FT cotangent_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { + const FT cot_beta = internal::cotangent_3(traits, q, t, r); + const FT cot_gamma = internal::cotangent_3(traits, r, p, q); - GeomTraits traits; - return cotangent_weight(t, r, p, q, traits); - } + return cotangent_ns::weight(cot_beta, cot_gamma); +} - // Undocumented cotangent weight class. - // Its constructor takes a polygon mesh and a vertex to point map - // and its operator() is defined based on the halfedge_descriptor only. - // This version is currently used in: - // Polygon_mesh_processing -> curvature_flow_impl.h - template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> - class Edge_cotangent_weight { +template +typename GeomTraits::FT cotangent_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + GeomTraits traits; + return cotangent_weight(t, r, p, q, traits); +} - using GeomTraits = typename CGAL::Kernel_traits< - typename boost::property_traits::value_type>::type; - using FT = typename GeomTraits::FT; +// Undocumented cotangent weight class. +// Its constructor takes a polygon mesh and a vertex to point map +// and its operator() is defined based on the halfedge_descriptor only. +// This version is currently used in: +// Polygon_mesh_processing -> curvature_flow_impl.h +template< + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> +class Edge_cotangent_weight +{ + using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; + using FT = typename GeomTraits::FT; - const PolygonMesh& m_pmesh; - const VertexPointMap m_pmap; - GeomTraits m_traits; + const PolygonMesh& m_pmesh; + const VertexPointMap m_pmap; + GeomTraits m_traits; - public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; +public: + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - Edge_cotangent_weight(const PolygonMesh& pmesh, const VertexPointMap pmap) : - m_pmesh(pmesh), m_pmap(pmap), m_traits() { } + Edge_cotangent_weight(const PolygonMesh& pmesh, const VertexPointMap pmap) + : m_pmesh(pmesh), m_pmap(pmap), m_traits() + { } - FT operator()(const halfedge_descriptor he) const { + FT operator()(const halfedge_descriptor he) const + { - FT weight = FT(0); - if (is_border_edge(he, m_pmesh)) { - const auto h1 = next(he, m_pmesh); - - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - - weight = internal::cotangent_3(m_traits, p0, p2, p1); - - } else { - const auto h1 = next(he, m_pmesh); - const auto h2 = prev(opposite(he, m_pmesh), m_pmesh); - - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); - const auto v3 = source(h2, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - const auto& p3 = get(m_pmap, v3); - - weight = cotangent_weight(p2, p1, p3, p0) / FT(2); - } - return weight; - } - }; - - // Undocumented cotangent weight class. - // Returns a single cotangent weight, its operator() is defined based on the - // halfedge_descriptor, polygon mesh, and vertex to point map. - // For border edges it returns zero. - // This version is currently used in: - // Surface_mesh_deformation -> Surface_mesh_deformation.h - template - class Single_cotangent_weight { - - public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - - template - decltype(auto) operator()(const halfedge_descriptor he, - const PolygonMesh& pmesh, const VertexPointMap pmap) const { - - using GeomTraits = typename CGAL::Kernel_traits< - typename boost::property_traits::value_type>::type; - using FT = typename GeomTraits::FT; - GeomTraits traits; - - if (is_border(he, pmesh)) { - return FT(0); - } - - const vertex_descriptor v0 = target(he, pmesh); - const vertex_descriptor v1 = source(he, pmesh); - const vertex_descriptor v2 = target(next(he, pmesh), pmesh); - - const auto& p0 = get(pmap, v0); - const auto& p1 = get(pmap, v1); - const auto& p2 = get(pmap, v2); - - return internal::cotangent_3(traits, p0, p2, p1); - } - }; - - // Undocumented cotangent weight class. - // Its constructor takes a boolean flag to choose between default and clamped - // versions of the cotangent weights and its operator() is defined based on the - // halfedge_descriptor, polygon mesh, and vertex to point map. - // This version is currently used in: - // Surface_mesh_deformation -> Surface_mesh_deformation.h (default version) - // Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h (default version) - // Surface_mesh_skeletonization -> Mean_curvature_flow_skeletonization.h (clamped version) - template - class Cotangent_weight { - bool m_use_clamped_version; - - public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - - Cotangent_weight(const bool use_clamped_version = false) : - m_use_clamped_version(use_clamped_version) { } - - template - decltype(auto) operator()(const halfedge_descriptor he, - const PolygonMesh& pmesh, const VertexPointMap pmap) const { - - using GeomTraits = typename CGAL::Kernel_traits< - typename boost::property_traits::value_type>::type; - using FT = typename GeomTraits::FT; - GeomTraits traits; - - const auto v0 = target(he, pmesh); - const auto v1 = source(he, pmesh); - - const auto& p0 = get(pmap, v0); - const auto& p1 = get(pmap, v1); - - FT weight = FT(0); - if (is_border_edge(he, pmesh)) { - const auto he_cw = opposite(next(he, pmesh), pmesh); - auto v2 = source(he_cw, pmesh); - - if (is_border_edge(he_cw, pmesh)) { - const auto he_ccw = prev(opposite(he, pmesh), pmesh); - v2 = source(he_ccw, pmesh); - - const auto& p2 = get(pmap, v2); - if (m_use_clamped_version) { - weight = internal::cotangent_3_clamped(traits, p1, p2, p0); - } else { - weight = internal::cotangent_3(traits, p1, p2, p0); - } - weight = (CGAL::max)(FT(0), weight); - weight /= FT(2); - } else { - const auto& p2 = get(pmap, v2); - if (m_use_clamped_version) { - weight = internal::cotangent_3_clamped(traits, p0, p2, p1); - } else { - weight = internal::cotangent_3(traits, p0, p2, p1); - } - weight = (CGAL::max)(FT(0), weight); - weight /= FT(2); - } - - } else { - const auto he_cw = opposite(next(he, pmesh), pmesh); - const auto v2 = source(he_cw, pmesh); - const auto he_ccw = prev(opposite(he, pmesh), pmesh); - const auto v3 = source(he_ccw, pmesh); - - const auto& p2 = get(pmap, v2); - const auto& p3 = get(pmap, v3); - FT cot_beta = FT(0), cot_gamma = FT(0); - - if (m_use_clamped_version) { - cot_beta = internal::cotangent_3_clamped(traits, p0, p2, p1); - } else { - cot_beta = internal::cotangent_3(traits, p0, p2, p1); - } - - if (m_use_clamped_version) { - cot_gamma = internal::cotangent_3_clamped(traits, p1, p3, p0); - } else { - cot_gamma = internal::cotangent_3(traits, p1, p3, p0); - } - - cot_beta = (CGAL::max)(FT(0), cot_beta); cot_beta /= FT(2); - cot_gamma = (CGAL::max)(FT(0), cot_gamma); cot_gamma /= FT(2); - weight = cot_beta + cot_gamma; - } - return weight; - } - }; - - // Undocumented cotangent weight class. - // Its constructor takes a polygon mesh and a vertex to point map - // and its operator() is defined based on the halfedge_descriptor only. - // This class is using a special clamped version of the cotangent weights. - // This version is currently used in: - // Polygon_mesh_processing -> fair.h - // Polyhedron demo -> Hole_filling_plugin.cpp - template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> - class Secure_cotangent_weight_with_voronoi_area { - - using GeomTraits = typename CGAL::Kernel_traits< - typename boost::property_traits::value_type>::type; - using FT = typename GeomTraits::FT; - - const PolygonMesh& m_pmesh; - const VertexPointMap m_pmap; - GeomTraits m_traits; - - public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - - Secure_cotangent_weight_with_voronoi_area(const PolygonMesh& pmesh, const VertexPointMap pmap) : - m_pmesh(pmesh), m_pmap(pmap), m_traits() { } - - FT w_i(const vertex_descriptor v_i) const { - return FT(1) / (FT(2) * voronoi(v_i)); - } - - FT w_ij(const halfedge_descriptor he) const { - return cotangent_clamped(he); - } - - private: - FT cotangent_clamped(const halfedge_descriptor he) const { + FT weight = FT(0); + if (is_border_edge(he, m_pmesh)) + { + const auto h1 = next(he, m_pmesh); const auto v0 = target(he, m_pmesh); const auto v1 = source(he, m_pmesh); + const auto v2 = target(h1, m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); + const auto& p2 = get(m_pmap, v2); - FT weight = FT(0); - if (is_border_edge(he, m_pmesh)) { - const auto he_cw = opposite(next(he, m_pmesh), m_pmesh); - auto v2 = source(he_cw, m_pmesh); + weight = internal::cotangent_3(m_traits, p0, p2, p1); - if (is_border_edge(he_cw, m_pmesh)) { - const auto he_ccw = prev(opposite(he, m_pmesh), m_pmesh); - v2 = source(he_ccw, m_pmesh); + } + else + { + const auto h1 = next(he, m_pmesh); + const auto h2 = prev(opposite(he, m_pmesh), m_pmesh); - const auto& p2 = get(m_pmap, v2); - weight = internal::cotangent_3_clamped(m_traits, p1, p2, p0); - } else { - const auto& p2 = get(m_pmap, v2); - weight = internal::cotangent_3_clamped(m_traits, p0, p2, p1); - } + const auto v0 = target(he, m_pmesh); + const auto v1 = source(he, m_pmesh); + const auto v2 = target(h1, m_pmesh); + const auto v3 = source(h2, m_pmesh); - } else { - const auto he_cw = opposite(next(he, m_pmesh), m_pmesh); - const auto v2 = source(he_cw, m_pmesh); + const auto& p0 = get(m_pmap, v0); + const auto& p1 = get(m_pmap, v1); + const auto& p2 = get(m_pmap, v2); + const auto& p3 = get(m_pmap, v3); + + weight = cotangent_weight(p2, p1, p3, p0) / FT(2); + } + return weight; + } +}; + +// Undocumented cotangent weight class. +// +// Returns a single cotangent weight, its operator() is defined based on the +// halfedge_descriptor, polygon mesh, and vertex to point map. +// For border edges it returns zero. +// This version is currently used in: +// Surface_mesh_deformation -> Surface_mesh_deformation.h +template +class Single_cotangent_weight +{ +public: + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + + template + decltype(auto) operator()(const halfedge_descriptor he, + const PolygonMesh& pmesh, + const VertexPointMap pmap) const + { + using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; + using FT = typename GeomTraits::FT; + GeomTraits traits; + + if (is_border(he, pmesh)) + return FT(0); + + const vertex_descriptor v0 = target(he, pmesh); + const vertex_descriptor v1 = source(he, pmesh); + const vertex_descriptor v2 = target(next(he, pmesh), pmesh); + + const auto& p0 = get(pmap, v0); + const auto& p1 = get(pmap, v1); + const auto& p2 = get(pmap, v2); + + return internal::cotangent_3(traits, p0, p2, p1); + } +}; + +// Undocumented cotangent weight class. +// Its constructor takes a boolean flag to choose between default and clamped +// versions of the cotangent weights and its operator() is defined based on the +// halfedge_descriptor, polygon mesh, and vertex to point map. +// This version is currently used in: +// Surface_mesh_deformation -> Surface_mesh_deformation.h (default version) +// Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h (default version) +// Surface_mesh_skeletonization -> Mean_curvature_flow_skeletonization.h (clamped version) +template +class Cotangent_weight +{ + bool m_use_clamped_version; + +public: + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + + Cotangent_weight(const bool use_clamped_version = false) + : m_use_clamped_version(use_clamped_version) + { } + + template + decltype(auto) operator()(const halfedge_descriptor he, + const PolygonMesh& pmesh, + const VertexPointMap pmap) const + { + using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; + using FT = typename GeomTraits::FT; + + GeomTraits traits; + + const auto v0 = target(he, pmesh); + const auto v1 = source(he, pmesh); + + const auto& p0 = get(pmap, v0); + const auto& p1 = get(pmap, v1); + + FT weight = FT(0); + if (is_border_edge(he, pmesh)) + { + const auto he_cw = opposite(next(he, pmesh), pmesh); + auto v2 = source(he_cw, pmesh); + + if (is_border_edge(he_cw, pmesh)) + { + const auto he_ccw = prev(opposite(he, pmesh), pmesh); + v2 = source(he_ccw, pmesh); + + const auto& p2 = get(pmap, v2); + if (m_use_clamped_version) + weight = internal::cotangent_3_clamped(traits, p1, p2, p0); + else + weight = internal::cotangent_3(traits, p1, p2, p0); + + weight = (CGAL::max)(FT(0), weight); + weight /= FT(2); + } + else + { + const auto& p2 = get(pmap, v2); + if (m_use_clamped_version) + weight = internal::cotangent_3_clamped(traits, p0, p2, p1); + else + weight = internal::cotangent_3(traits, p0, p2, p1); + + weight = (CGAL::max)(FT(0), weight); + weight /= FT(2); + } + } + else + { + const auto he_cw = opposite(next(he, pmesh), pmesh); + const auto v2 = source(he_cw, pmesh); + const auto he_ccw = prev(opposite(he, pmesh), pmesh); + const auto v3 = source(he_ccw, pmesh); + + const auto& p2 = get(pmap, v2); + const auto& p3 = get(pmap, v3); + FT cot_beta = FT(0), cot_gamma = FT(0); + + if (m_use_clamped_version) + cot_beta = internal::cotangent_3_clamped(traits, p0, p2, p1); + else + cot_beta = internal::cotangent_3(traits, p0, p2, p1); + + if (m_use_clamped_version) + cot_gamma = internal::cotangent_3_clamped(traits, p1, p3, p0); + else + cot_gamma = internal::cotangent_3(traits, p1, p3, p0); + + cot_beta = (CGAL::max)(FT(0), cot_beta); cot_beta /= FT(2); + cot_gamma = (CGAL::max)(FT(0), cot_gamma); cot_gamma /= FT(2); + weight = cot_beta + cot_gamma; + } + + return weight; + } +}; + +// Undocumented cotangent weight class. +// Its constructor takes a polygon mesh and a vertex to point map +// and its operator() is defined based on the halfedge_descriptor only. +// This class is using a special clamped version of the cotangent weights. +// This version is currently used in: +// Polygon_mesh_processing -> fair.h +// Polyhedron demo -> Hole_filling_plugin.cpp +template< + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> +class Secure_cotangent_weight_with_voronoi_area +{ + using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; + using FT = typename GeomTraits::FT; + + const PolygonMesh& m_pmesh; + const VertexPointMap m_pmap; + GeomTraits m_traits; + +public: + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + + Secure_cotangent_weight_with_voronoi_area(const PolygonMesh& pmesh, + const VertexPointMap pmap) + : m_pmesh(pmesh), m_pmap(pmap), m_traits() + { } + + FT w_i(const vertex_descriptor v_i) const + { + return FT(1) / (FT(2) * voronoi(v_i)); + } + + FT w_ij(const halfedge_descriptor he) const + { + return cotangent_clamped(he); + } + +private: + FT cotangent_clamped(const halfedge_descriptor he) const + { + + const auto v0 = target(he, m_pmesh); + const auto v1 = source(he, m_pmesh); + + const auto& p0 = get(m_pmap, v0); + const auto& p1 = get(m_pmap, v1); + + FT weight = FT(0); + if (is_border_edge(he, m_pmesh)) + { + const auto he_cw = opposite(next(he, m_pmesh), m_pmesh); + auto v2 = source(he_cw, m_pmesh); + + if (is_border_edge(he_cw, m_pmesh)) + { const auto he_ccw = prev(opposite(he, m_pmesh), m_pmesh); - const auto v3 = source(he_ccw, m_pmesh); + v2 = source(he_ccw, m_pmesh); const auto& p2 = get(m_pmap, v2); - const auto& p3 = get(m_pmap, v3); - - const FT cot_beta = internal::cotangent_3_clamped(m_traits, p0, p2, p1); - const FT cot_gamma = internal::cotangent_3_clamped(m_traits, p1, p3, p0); - weight = cot_beta + cot_gamma; + weight = internal::cotangent_3_clamped(m_traits, p1, p2, p0); } - return weight; - } - - FT voronoi(const vertex_descriptor v0) const { - - const auto squared_length_3 = - m_traits.compute_squared_length_3_object(); - const auto construct_vector_3 = - m_traits.construct_vector_3_object(); - - FT voronoi_area = FT(0); - CGAL_assertion(CGAL::is_triangle_mesh(m_pmesh)); - for (const auto& he : halfedges_around_target(halfedge(v0, m_pmesh), m_pmesh)) { - CGAL_assertion(v0 == target(he, m_pmesh)); - if (is_border(he, m_pmesh)) { - continue; - } - - const auto v1 = source(he, m_pmesh); - const auto v2 = target(next(he, m_pmesh), m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); + else + { const auto& p2 = get(m_pmap, v2); - - const auto angle0 = CGAL::angle(p1, p0, p2); - const auto angle1 = CGAL::angle(p2, p1, p0); - const auto angle2 = CGAL::angle(p0, p2, p1); - - const bool obtuse = - (angle0 == CGAL::OBTUSE) || - (angle1 == CGAL::OBTUSE) || - (angle2 == CGAL::OBTUSE); - - if (!obtuse) { - const FT cot_p1 = internal::cotangent_3(m_traits, p2, p1, p0); - const FT cot_p2 = internal::cotangent_3(m_traits, p0, p2, p1); - - const auto v1 = construct_vector_3(p0, p1); - const auto v2 = construct_vector_3(p0, p2); - - const FT t1 = cot_p1 * squared_length_3(v2); - const FT t2 = cot_p2 * squared_length_3(v1); - voronoi_area += (t1 + t2) / FT(8); - - } else { - - const FT A = internal::positive_area_3(m_traits, p0, p1, p2); - if (angle0 == CGAL::OBTUSE) { - voronoi_area += A / FT(2); - } else { - voronoi_area += A / FT(4); - } - } + weight = internal::cotangent_3_clamped(m_traits, p0, p2, p1); } - CGAL_assertion(voronoi_area != FT(0)); - return voronoi_area; } - }; + else + { + const auto he_cw = opposite(next(he, m_pmesh), m_pmesh); + const auto v2 = source(he_cw, m_pmesh); + const auto he_ccw = prev(opposite(he, m_pmesh), m_pmesh); + const auto v3 = source(he_ccw, m_pmesh); - /// \endcond + const auto& p2 = get(m_pmap, v2); + const auto& p3 = get(m_pmap, v3); + + const FT cot_beta = internal::cotangent_3_clamped(m_traits, p0, p2, p1); + const FT cot_gamma = internal::cotangent_3_clamped(m_traits, p1, p3, p0); + weight = cot_beta + cot_gamma; + } + + return weight; + } + + FT voronoi(const vertex_descriptor v0) const + { + const auto squared_length_3 = m_traits.compute_squared_length_3_object(); + const auto construct_vector_3 = m_traits.construct_vector_3_object(); + + FT voronoi_area = FT(0); + CGAL_assertion(CGAL::is_triangle_mesh(m_pmesh)); + for (const auto& he : halfedges_around_target(halfedge(v0, m_pmesh), m_pmesh)) + { + CGAL_assertion(v0 == target(he, m_pmesh)); + if (is_border(he, m_pmesh)) + continue; + + const auto v1 = source(he, m_pmesh); + const auto v2 = target(next(he, m_pmesh), m_pmesh); + + const auto& p0 = get(m_pmap, v0); + const auto& p1 = get(m_pmap, v1); + const auto& p2 = get(m_pmap, v2); + + const auto angle0 = CGAL::angle(p1, p0, p2); + const auto angle1 = CGAL::angle(p2, p1, p0); + const auto angle2 = CGAL::angle(p0, p2, p1); + + const bool obtuse = (angle0 == CGAL::OBTUSE) || + (angle1 == CGAL::OBTUSE) || + (angle2 == CGAL::OBTUSE); + + if (!obtuse) + { + const FT cot_p1 = internal::cotangent_3(m_traits, p2, p1, p0); + const FT cot_p2 = internal::cotangent_3(m_traits, p0, p2, p1); + + const auto v1 = construct_vector_3(p0, p1); + const auto v2 = construct_vector_3(p0, p2); + + const FT t1 = cot_p1 * squared_length_3(v2); + const FT t2 = cot_p2 * squared_length_3(v1); + voronoi_area += (t1 + t2) / FT(8); + + } + else + { + const FT A = internal::positive_area_3(m_traits, p0, p1, p2); + if (angle0 == CGAL::OBTUSE) + voronoi_area += A / FT(2); + else + voronoi_area += A / FT(4); + } + } + + CGAL_assertion(voronoi_area != FT(0)); + return voronoi_area; + } +}; + +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h index 42a7056afc2..170b73a67b3 100644 --- a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h @@ -14,429 +14,396 @@ #ifndef CGAL_DISCRETE_HARMONIC_WEIGHTS_H #define CGAL_DISCRETE_HARMONIC_WEIGHTS_H -// Internal includes. #include #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace discrete_harmonic_ns { +/// \cond SKIP_IN_MANUAL - template - FT weight( - const FT r1, const FT r2, const FT r3, - const FT A1, const FT A2, const FT B) { +namespace discrete_harmonic_ns { - FT w = FT(0); - CGAL_precondition(A1 != FT(0) && A2 != FT(0)); - const FT prod = A1 * A2; - if (prod != FT(0)) { - const FT inv = FT(1) / prod; - w = (r3 * A1 - r2 * B + r1 * A2) * inv; - } - return w; - } +template +FT weight(const FT r1, const FT r2, const FT r3, + const FT A1, const FT A2, const FT B) +{ + FT w = FT(0); + CGAL_precondition(A1 != FT(0) && A2 != FT(0)); + const FT prod = A1 * A2; + if (prod != FT(0)) + { + const FT inv = FT(1) / prod; + w = (r3 * A1 - r2 * B + r1 * A2) * inv; } - /// \endcond - #if defined(DOXYGEN_RUNNING) + return w; +} - /*! - \ingroup PkgWeightsRefDiscreteHarmonicWeights +} // namespace discrete_harmonic_ns - \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT discrete_harmonic_weight( +/// \endcond + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefDiscreteHarmonicWeights + + \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT discrete_harmonic_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefDiscreteHarmonicWeights +/*! + \ingroup PkgWeightsRefDiscreteHarmonicWeights - \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT discrete_harmonic_weight( + \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT discrete_harmonic_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING + +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + + const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + + const FT d1 = squared_distance_2(q, t); + const FT d2 = squared_distance_2(q, r); + const FT d3 = squared_distance_2(q, p); + + const FT A1 = internal::area_2(traits, r, q, t); + const FT A2 = internal::area_2(traits, p, q, r); + const FT B = internal::area_2(traits, p, q, t); + + return discrete_harmonic_ns::weight(d1, d2, d3, A1, A2, B); +} + +template +typename GeomTraits::FT discrete_harmonic_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return discrete_harmonic_weight(t, r, p, q, traits); +} + +namespace internal { + +template +typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using Point_2 = typename GeomTraits::Point_2; + + Point_2 tf, rf, pf, qf; + internal::flatten(traits, + t, r, p, q, + tf, rf, pf, qf); + return CGAL::Weights::discrete_harmonic_weight(tf, rf, pf, qf, traits); +} + +template +typename GeomTraits::FT discrete_harmonic_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return discrete_harmonic_weight(t, r, p, q, traits); +} + +} // namespace internal + +/// \endcond + +/*! + \ingroup PkgWeightsRefBarycentricDiscreteHarmonicWeights + + \brief 2D discrete harmonic weights for polygons. + + This class implements 2D discrete harmonic weights (\cite cgal:bc:eddhls-maam-95, + \cite cgal:bc:fhk-gcbcocp-06, \cite cgal:pp-cdmsc-93) which can be computed + at any point inside a strictly convex polygon. + + Discrete harmonic weights are well-defined inside a strictly convex polygon + but they are not necessarily positive. These weights are computed analytically + using the formulation from the `discrete_harmonic_weight()`. + + \tparam VertexRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` + \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and + value type is `Point_2`. The default is `CGAL::Identity_property_map`. + + \cgalModels `BarycentricWeights_2` +*/ +template > +class Discrete_harmonic_weights_2 +{ +public: + /// \name Types + /// @{ /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT discrete_harmonic_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { - - using FT = typename GeomTraits::FT; - const auto squared_distance_2 = - traits.compute_squared_distance_2_object(); - - const FT d1 = squared_distance_2(q, t); - const FT d2 = squared_distance_2(q, r); - const FT d3 = squared_distance_2(q, p); - - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT B = internal::area_2(traits, p, q, t); - - return discrete_harmonic_ns::weight( - d1, d2, d3, A1, A2, B); - } - - template - typename GeomTraits::FT discrete_harmonic_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { - - const GeomTraits traits; - return discrete_harmonic_weight(t, r, p, q, traits); - } - - namespace internal { - - template - typename GeomTraits::FT discrete_harmonic_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten( - traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights:: - discrete_harmonic_weight(tf, rf, pf, qf, traits); - } - - template - typename GeomTraits::FT discrete_harmonic_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - - const GeomTraits traits; - return discrete_harmonic_weight(t, r, p, q, traits); - } - - } // namespace internal + using Vertex_range = VertexRange; + using Geom_traits = GeomTraits; + using Point_map = PointMap; + using Area_2 = typename GeomTraits::Compute_area_2; + using Squared_distance_2 = typename GeomTraits::Compute_squared_distance_2; /// \endcond - /*! - \ingroup PkgWeightsRefBarycentricDiscreteHarmonicWeights + /// Number type. + typedef typename GeomTraits::FT FT; - \brief 2D discrete harmonic weights for polygons. + /// Point type. + typedef typename GeomTraits::Point_2 Point_2; - This class implements 2D discrete harmonic weights ( \cite cgal:bc:fhk-gcbcocp-06, - \cite cgal:pp-cdmsc-93, \cite cgal:bc:eddhls-maam-95 ) which can be computed - at any point inside a strictly convex polygon. + /// @} - Discrete harmonic weights are well-defined inside a strictly convex polygon - but they are not necessarily positive. These weights are computed analytically - using the formulation from the `discrete_harmonic_weight()`. - - \tparam VertexRange - a model of `ConstRange` whose iterator type is `RandomAccessIterator` - - \tparam GeomTraits - a model of `AnalyticWeightTraits_2` - - \tparam PointMap - a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and - value type is `Point_2`. The default is `CGAL::Identity_property_map`. - - \cgalModels `BarycentricWeights_2` - */ - template< - typename VertexRange, - typename GeomTraits, - typename PointMap = CGAL::Identity_property_map > - class Discrete_harmonic_weights_2 { - - public: - - /// \name Types - /// @{ - - /// \cond SKIP_IN_MANUAL - using Vertex_range = VertexRange; - using Geom_traits = GeomTraits; - using Point_map = PointMap; - - using Area_2 = typename GeomTraits::Compute_area_2; - using Squared_distance_2 = typename GeomTraits::Compute_squared_distance_2; - /// \endcond - - /// Number type. - typedef typename GeomTraits::FT FT; - - /// Point type. - typedef typename GeomTraits::Point_2 Point_2; - - /// @} - - /// \name Initialization - /// @{ - - /*! - \brief initializes all internal data structures. - - This class implements the behavior of discrete harmonic weights - for 2D query points inside strictly convex polygons. - - \param polygon - an instance of `VertexRange` with the vertices of a strictly convex polygon - - \param traits - a traits class with geometric objects, predicates, and constructions; - the default initialization is provided - - \param point_map - an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; - the default initialization is provided - - \pre polygon.size() >= 3 - \pre polygon is simple - \pre polygon is strictly convex - */ - Discrete_harmonic_weights_2( - const VertexRange& polygon, - const GeomTraits traits = GeomTraits(), - const PointMap point_map = PointMap()) : - m_polygon(polygon), - m_traits(traits), - m_point_map(point_map), - m_area_2(m_traits.compute_area_2_object()), - m_squared_distance_2(m_traits.compute_squared_distance_2_object()) { - - CGAL_precondition( - polygon.size() >= 3); - CGAL_precondition( - internal::is_simple_2(polygon, traits, point_map)); - CGAL_precondition( - internal::polygon_type_2(polygon, traits, point_map) == - internal::Polygon_type::STRICTLY_CONVEX); - resize(); - } - - /// @} - - /// \name Access - /// @{ - - /*! - \brief computes 2D discrete harmonic weights. - - This function fills a destination range with 2D discrete harmonic weights - computed at the `query` point with respect to the vertices of the input polygon. - - The number of computed weights is equal to the number of polygon vertices. - - \tparam OutIterator - a model of `OutputIterator` whose value type is `FT` - - \param query - a query point - - \param w_begin - the beginning of the destination range with the computed weights - - \return an output iterator to the element in the destination range, - one past the last weight stored - */ - template - OutIterator operator()(const Point_2& query, OutIterator w_begin) { - const bool normalize = false; - return operator()(query, w_begin, normalize); - } - - /// @} - - /// \cond SKIP_IN_MANUAL - template - OutIterator operator()(const Point_2& query, OutIterator w_begin, const bool normalize) { - return optimal_weights(query, w_begin, normalize); - } - /// \endcond - - private: - - // Fields. - const VertexRange& m_polygon; - const GeomTraits m_traits; - const PointMap m_point_map; - - const Area_2 m_area_2; - const Squared_distance_2 m_squared_distance_2; - - std::vector r; - std::vector A; - std::vector B; - std::vector w; - - // Functions. - void resize() { - r.resize(m_polygon.size()); - A.resize(m_polygon.size()); - B.resize(m_polygon.size()); - w.resize(m_polygon.size()); - } - - template - OutputIterator optimal_weights( - const Point_2& query, OutputIterator weights, const bool normalize) { - - // Get the number of vertices in the polygon. - const std::size_t n = m_polygon.size(); - - // Compute areas A, B, and distances r following the notation from [1]. - // Split the loop to make this computation faster. - const auto& p1 = get(m_point_map, *(m_polygon.begin() + 0)); - const auto& p2 = get(m_point_map, *(m_polygon.begin() + 1)); - const auto& pn = get(m_point_map, *(m_polygon.begin() + (n - 1))); - - r[0] = m_squared_distance_2(p1, query); - A[0] = m_area_2(p1, p2, query); - B[0] = m_area_2(pn, p2, query); - - for (std::size_t i = 1; i < n - 1; ++i) { - const auto& pi0 = get(m_point_map, *(m_polygon.begin() + (i - 1))); - const auto& pi1 = get(m_point_map, *(m_polygon.begin() + (i + 0))); - const auto& pi2 = get(m_point_map, *(m_polygon.begin() + (i + 1))); - - r[i] = m_squared_distance_2(pi1, query); - A[i] = m_area_2(pi1, pi2, query); - B[i] = m_area_2(pi0, pi2, query); - } - - const auto& pm = get(m_point_map, *(m_polygon.begin() + (n - 2))); - r[n - 1] = m_squared_distance_2(pn, query); - A[n - 1] = m_area_2(pn, p1, query); - B[n - 1] = m_area_2(pm, p1, query); - - // Compute unnormalized weights following the formula (25) with p = 2 from [1]. - CGAL_assertion(A[n - 1] != FT(0) && A[0] != FT(0)); - w[0] = (r[1] * A[n - 1] - r[0] * B[0] + r[n - 1] * A[0]) / (A[n - 1] * A[0]); - - for (std::size_t i = 1; i < n - 1; ++i) { - CGAL_assertion(A[i - 1] != FT(0) && A[i] != FT(0)); - w[i] = (r[i + 1] * A[i - 1] - r[i] * B[i] + r[i - 1] * A[i]) / (A[i - 1] * A[i]); - } - - CGAL_assertion(A[n - 2] != FT(0) && A[n - 1] != FT(0)); - w[n - 1] = (r[0] * A[n - 2] - r[n - 1] * B[n - 1] + r[n - 2] * A[n - 1]) / (A[n - 2] * A[n - 1]); - - // Normalize if necessary. - if (normalize) { - internal::normalize(w); - } - - // Return weights. - for (std::size_t i = 0; i < n; ++i) { - *(weights++) = w[i]; - } - return weights; - } - }; + /// \name Initialization + /// @{ /*! - \ingroup PkgWeightsRefBarycentricDiscreteHarmonicWeights + \brief initializes all internal data structures. - \brief computes 2D discrete harmonic weights for polygons. + This class implements the behavior of discrete harmonic weights + for 2D query points inside strictly convex polygons. - This function computes 2D discrete harmonic weights at a given `query` point - with respect to the vertices of a strictly convex `polygon`, that is one - weight per vertex. The weights are stored in a destination range - beginning at `w_begin`. - - Internally, the class `Discrete_harmonic_weights_2` is used. If one wants to process - multiple query points, it is better to use that class. When using the free function, - internal memory is allocated for each query point, while when using the class, - it is allocated only once which is much more efficient. However, for a few query - points, it is easier to use this function. It can also be used when the processing - time is not a concern. - - \tparam PointRange - a model of `ConstRange` whose iterator type is `RandomAccessIterator` - and value type is `GeomTraits::Point_2` - - \tparam OutIterator - a model of `OutputIterator` whose value type is `GeomTraits::FT` - - \tparam GeomTraits - a model of `AnalyticWeightTraits_2` - - \param polygon - an instance of `PointRange` with 2D points which form a strictly convex polygon - - \param query - a query point - - \param w_begin - the beginning of the destination range with the computed weights - - \param traits - a traits class with geometric objects, predicates, and constructions; - this parameter can be omitted if the traits class can be deduced from the point type - - \return an output iterator to the element in the destination range, - one past the last weight stored + \param polygon an instance of `VertexRange` with the vertices of a strictly convex polygon + \param traits a traits class with geometric objects, predicates, and constructions; + the default initialization is provided + \param point_map an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; + the default initialization is provided \pre polygon.size() >= 3 \pre polygon is simple \pre polygon is strictly convex */ - template< - typename PointRange, - typename OutIterator, - typename GeomTraits> - OutIterator discrete_harmonic_weights_2( - const PointRange& polygon, const typename GeomTraits::Point_2& query, - OutIterator w_begin, const GeomTraits& traits) { + Discrete_harmonic_weights_2(const VertexRange& polygon, + const GeomTraits traits = GeomTraits(), + const PointMap point_map = PointMap()) + : m_polygon(polygon), + m_traits(traits), + m_point_map(point_map), + m_area_2(m_traits.compute_area_2_object()), + m_squared_distance_2(m_traits.compute_squared_distance_2_object()) + { + CGAL_precondition(polygon.size() >= 3); + CGAL_precondition(internal::is_simple_2(polygon, traits, point_map)); + CGAL_precondition(internal::polygon_type_2(polygon, traits, point_map) == internal::Polygon_type::STRICTLY_CONVEX); - Discrete_harmonic_weights_2 - discrete_harmonic(polygon, traits); - return discrete_harmonic(query, w_begin); + resize(); } + /// @} + + /// \name Access + /// @{ + + /*! + \brief computes 2D discrete harmonic weights. + + This function fills a destination range with 2D discrete harmonic weights + computed at the `query` point with respect to the vertices of the input polygon. + + The number of computed weights is equal to the number of polygon vertices. + + \tparam OutIterator a model of `OutputIterator` whose value type is `FT` + + \param query a query point + \param w_begin the beginning of the destination range with the computed weights + + \return an output iterator to the element in the destination range, one past the last weight stored + */ + template + OutIterator operator()(const Point_2& query, + OutIterator w_begin) + { + const bool normalize = false; + return operator()(query, w_begin, normalize); + } + + /// @} + /// \cond SKIP_IN_MANUAL - template< - typename PointRange, - typename OutIterator> - OutIterator discrete_harmonic_weights_2( - const PointRange& polygon, - const typename PointRange::value_type& query, - OutIterator w_begin) { - - using Point_2 = typename PointRange::value_type; - using GeomTraits = typename Kernel_traits::Kernel; - const GeomTraits traits; - return discrete_harmonic_weights_2( - polygon, query, w_begin, traits); + template + OutIterator operator()(const Point_2& query, + OutIterator w_begin, + const bool normalize) + { + return optimal_weights(query, w_begin, normalize); } + /// \endcond +private: + const VertexRange& m_polygon; + const GeomTraits m_traits; + const PointMap m_point_map; + + const Area_2 m_area_2; + const Squared_distance_2 m_squared_distance_2; + + std::vector r; + std::vector A; + std::vector B; + std::vector w; + + void resize() + { + r.resize(m_polygon.size()); + A.resize(m_polygon.size()); + B.resize(m_polygon.size()); + w.resize(m_polygon.size()); + } + + template + OutputIterator optimal_weights(const Point_2& query, + OutputIterator weights, + const bool normalize) + { + // Get the number of vertices in the polygon. + const std::size_t n = m_polygon.size(); + + // Compute areas A, B, and distances r following the notation from [1]. + // Split the loop to make this computation faster. + const auto& p1 = get(m_point_map, *(m_polygon.begin() + 0)); + const auto& p2 = get(m_point_map, *(m_polygon.begin() + 1)); + const auto& pn = get(m_point_map, *(m_polygon.begin() + (n - 1))); + + r[0] = m_squared_distance_2(p1, query); + A[0] = m_area_2(p1, p2, query); + B[0] = m_area_2(pn, p2, query); + + for (std::size_t i = 1; i < n - 1; ++i) + { + const auto& pi0 = get(m_point_map, *(m_polygon.begin() + (i - 1))); + const auto& pi1 = get(m_point_map, *(m_polygon.begin() + (i + 0))); + const auto& pi2 = get(m_point_map, *(m_polygon.begin() + (i + 1))); + + r[i] = m_squared_distance_2(pi1, query); + A[i] = m_area_2(pi1, pi2, query); + B[i] = m_area_2(pi0, pi2, query); + } + + const auto& pm = get(m_point_map, *(m_polygon.begin() + (n - 2))); + r[n - 1] = m_squared_distance_2(pn, query); + A[n - 1] = m_area_2(pn, p1, query); + B[n - 1] = m_area_2(pm, p1, query); + + // Compute unnormalized weights following the formula (25) with p = 2 from [1]. + CGAL_assertion(A[n - 1] != FT(0) && A[0] != FT(0)); + w[0] = (r[1] * A[n - 1] - r[0] * B[0] + r[n - 1] * A[0]) / (A[n - 1] * A[0]); + + for (std::size_t i = 1; i < n - 1; ++i) + { + CGAL_assertion(A[i - 1] != FT(0) && A[i] != FT(0)); + w[i] = (r[i + 1] * A[i - 1] - r[i] * B[i] + r[i - 1] * A[i]) / (A[i - 1] * A[i]); + } + + CGAL_assertion(A[n - 2] != FT(0) && A[n - 1] != FT(0)); + w[n - 1] = (r[0] * A[n - 2] - r[n - 1] * B[n - 1] + r[n - 2] * A[n - 1]) / (A[n - 2] * A[n - 1]); + + // Normalize if necessary. + if (normalize) + internal::normalize(w); + + // Return weights. + for (std::size_t i = 0; i < n; ++i) + *(weights++) = w[i]; + + return weights; + } +}; + +/*! + \ingroup PkgWeightsRefBarycentricDiscreteHarmonicWeights + + \brief computes 2D discrete harmonic weights for polygons. + + This function computes 2D discrete harmonic weights at a given `query` point + with respect to the vertices of a strictly convex `polygon`, that is one + weight per vertex. The weights are stored in a destination range + beginning at `w_begin`. + + Internally, the class `Discrete_harmonic_weights_2` is used. If one wants to process + multiple query points, it is better to use that class. When using the free function, + internal memory is allocated for each query point, while when using the class, + it is allocated only once which is much more efficient. However, for a few query + points, it is easier to use this function. It can also be used when the processing + time is not a concern. + + \tparam PointRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` + and value type is `GeomTraits::Point_2` + \tparam OutIterator a model of `OutputIterator` whose value type is `GeomTraits::FT` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` + + \param polygon an instance of `PointRange` with 2D points which form a strictly convex polygon + \param query a query point + \param w_begin the beginning of the destination range with the computed weights + \param traits a traits class with geometric objects, predicates, and constructions; + this parameter can be omitted if the traits class can be deduced from the point type + + \return an output iterator to the element in the destination range, one past the last weight stored + + \pre polygon.size() >= 3 + \pre polygon is simple + \pre polygon is strictly convex +*/ +template +OutIterator discrete_harmonic_weights_2(const PointRange& polygon, + const typename GeomTraits::Point_2& query, + OutIterator w_begin, + const GeomTraits& traits) +{ + Discrete_harmonic_weights_2 discrete_harmonic(polygon, traits); + return discrete_harmonic(query, w_begin); +} + +/// \cond SKIP_IN_MANUAL + +template +OutIterator discrete_harmonic_weights_2(const PointRange& polygon, + const typename PointRange::value_type& query, + OutIterator w_begin) +{ + using Point_2 = typename PointRange::value_type; + using GeomTraits = typename Kernel_traits::Kernel; + + const GeomTraits traits; + return discrete_harmonic_weights_2(polygon, query, w_begin, traits); +} +/// \endcond + } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h index 0170e812d1f..942ad0dc8d5 100644 --- a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h +++ b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h @@ -20,7 +20,7 @@ #include // README: -// This header collects all weights, which have been in CGAL before unifying them +// This header collects all weights which have been in CGAL before unifying them // into the new package Weights. This header is for information purpose only. It // will be removed in the next release. @@ -47,13 +47,13 @@ struct Cotangent_value_Meyer_impl { template double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2, - const VertexPointMap& ppmap) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2, + const VertexPointMap& ppmap) { typedef typename Kernel_traits< - typename boost::property_traits::value_type >::Kernel::Vector_3 Vector; + typename boost::property_traits::value_type >::Kernel::Vector_3 Vector; const Vector a = get(ppmap, v0) - get(ppmap, v1); const Vector b = get(ppmap, v2) - get(ppmap, v1); @@ -67,16 +67,16 @@ struct Cotangent_value_Meyer_impl { const Vector cross_ab = CGAL::cross_product(a, b); const double divider = CGAL::to_double( - CGAL::approximate_sqrt(cross_ab * cross_ab)); + CGAL::approximate_sqrt(cross_ab * cross_ab)); if (divider == 0.0 /* || divider != divider */) { CGAL::collinear(get(ppmap, v0), get(ppmap, v1), get(ppmap, v2)) ? - CGAL_warning_msg(false, "Infinite Cotangent value with the degenerate triangle!") : - CGAL_warning_msg(false, "Infinite Cotangent value due to the floating point arithmetic!"); + CGAL_warning_msg(false, "Infinite Cotangent value with the degenerate triangle!") : + CGAL_warning_msg(false, "Infinite Cotangent value due to the floating point arithmetic!"); return dot_ab > 0.0 ? - (std::numeric_limits::max)() : - -(std::numeric_limits::max)(); + (std::numeric_limits::max)() : + -(std::numeric_limits::max)(); } return dot_ab / divider; } @@ -84,8 +84,8 @@ struct Cotangent_value_Meyer_impl { // Same as above but with a different API. template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type> + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> class Cotangent_value_Meyer { protected: @@ -99,10 +99,10 @@ protected: public: Cotangent_value_Meyer( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - pmesh_(pmesh_), - ppmap_(vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + pmesh_(pmesh_), + ppmap_(vpmap_) { } PolygonMesh& pmesh() { @@ -114,9 +114,9 @@ public: } double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { return Cotangent_value_Meyer_impl()(v0, v1, v2, ppmap()); } @@ -124,8 +124,8 @@ public: // Imported from skeletonization. template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type> + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> class Cotangent_value_Meyer_secure { typedef VertexPointMap Point_property_map; @@ -138,10 +138,10 @@ class Cotangent_value_Meyer_secure { public: Cotangent_value_Meyer_secure( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - pmesh_(pmesh_), - ppmap_(vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + pmesh_(pmesh_), + ppmap_(vpmap_) { } PolygonMesh& pmesh() { @@ -153,9 +153,9 @@ public: } double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { const Vector a = get(ppmap(), v0) - get(ppmap(), v1); const Vector b = get(ppmap(), v2) - get(ppmap(), v1); @@ -175,9 +175,9 @@ public: // Returns the cotangent value of the half angle [v0, v1, v2] by clamping between // [1, 89] degrees as suggested by -[Friedel] Unconstrained Spherical Parameterization-. template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Cotangent_value_clamped : CotangentValue { Cotangent_value_clamped() @@ -185,9 +185,9 @@ class Cotangent_value_clamped : CotangentValue { public: Cotangent_value_clamped( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -201,9 +201,9 @@ public: typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { const double cot_1 = 57.289962; const double cot_89 = 0.017455; @@ -213,9 +213,9 @@ public: }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Cotangent_value_clamped_2 : CotangentValue { Cotangent_value_clamped_2() @@ -223,9 +223,9 @@ class Cotangent_value_clamped_2 : CotangentValue { public: Cotangent_value_clamped_2( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -239,9 +239,9 @@ public: typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { const double cot_5 = 5.671282; const double cot_175 = -cot_5; @@ -251,18 +251,18 @@ public: }; template< -typename PolygonMesh, -typename CotangentValue = Cotangent_value_Meyer_impl > + typename PolygonMesh, + typename CotangentValue = Cotangent_value_Meyer_impl > struct Cotangent_value_minimum_zero_impl : CotangentValue { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; template double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2, - const VertexPointMap ppmap) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2, + const VertexPointMap ppmap) { const double value = CotangentValue::operator()(v0, v1, v2, ppmap); return (std::max)(0.0, value); @@ -270,9 +270,9 @@ struct Cotangent_value_minimum_zero_impl : CotangentValue { }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Cotangent_value_minimum_zero : CotangentValue { Cotangent_value_minimum_zero() @@ -280,9 +280,9 @@ class Cotangent_value_minimum_zero : CotangentValue { public: Cotangent_value_minimum_zero( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -296,25 +296,25 @@ public: typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { const double value = CotangentValue::operator()(v0, v1, v2); return (std::max)(0.0, value); } }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Voronoi_area : CotangentValue { public: Voronoi_area( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -338,7 +338,7 @@ public: // return 1.0; double voronoi_area = 0.0; for (const halfedge_descriptor he : - halfedges_around_target(halfedge(v0, pmesh()), pmesh())) { + halfedges_around_target(halfedge(v0, pmesh()), pmesh())) { if (is_border(he, pmesh()) ) { continue; } @@ -357,9 +357,9 @@ public: const CGAL::Angle angle_op = CGAL::angle(v0_p, v_op_p, v1_p); bool obtuse = - (angle0 == CGAL::OBTUSE) || - (angle1 == CGAL::OBTUSE) || - (angle_op == CGAL::OBTUSE); + (angle0 == CGAL::OBTUSE) || + (angle1 == CGAL::OBTUSE) || + (angle_op == CGAL::OBTUSE); if (!obtuse) { const double cot_v1 = CotangentValue::operator()(v_op, v1, v0); @@ -371,8 +371,8 @@ public: } else { const double area_t = to_double( - CGAL::approximate_sqrt( - CGAL::squared_area(v0_p, v1_p, v_op_p))); + CGAL::approximate_sqrt( + CGAL::squared_area(v0_p, v1_p, v_op_p))); if (angle0 == CGAL::OBTUSE) { voronoi_area += area_t / 2.0; @@ -389,9 +389,9 @@ public: // Returns the cotangent value of the half angle [v0, v1, v2] by dividing the triangle area // as suggested by -[Mullen08] Spectral Conformal Parameterization-. template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Cotangent_value_area_weighted : CotangentValue { Cotangent_value_area_weighted() @@ -399,9 +399,9 @@ class Cotangent_value_area_weighted : CotangentValue { public: Cotangent_value_area_weighted( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -415,15 +415,15 @@ public: typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { return CotangentValue::operator()(v0, v1, v2) / - CGAL::sqrt(CGAL::squared_area( - get(this->ppmap(), v0), - get(this->ppmap(), v1), - get(this->ppmap(), v2))); + CGAL::sqrt(CGAL::squared_area( + get(this->ppmap(), v0), + get(this->ppmap(), v1), + get(this->ppmap(), v2))); } }; @@ -431,8 +431,8 @@ public: // Cotangent_value: as suggested by -[Sorkine07] ARAP Surface Modeling-. // Cotangent_value_area_weighted: as suggested by -[Mullen08] Spectral Conformal Parameterization-. template< -typename PolygonMesh, -typename CotangentValue = Cotangent_value_minimum_zero_impl > + typename PolygonMesh, + typename CotangentValue = Cotangent_value_minimum_zero_impl > struct Cotangent_weight_impl : CotangentValue { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -442,9 +442,9 @@ struct Cotangent_weight_impl : CotangentValue { // Edge orientation is trivial. template double operator()( - halfedge_descriptor he, - PolygonMesh& pmesh, - const VertexPointMap& ppmap) { + halfedge_descriptor he, + PolygonMesh& pmesh, + const VertexPointMap& ppmap) { const vertex_descriptor v0 = target(he, pmesh); const vertex_descriptor v1 = source(he, pmesh); @@ -467,16 +467,16 @@ struct Cotangent_weight_impl : CotangentValue { const vertex_descriptor v3 = source(he_ccw, pmesh); return ( - CotangentValue::operator()(v0, v2, v1, ppmap) / 2.0 + - CotangentValue::operator()(v0, v3, v1, ppmap) / 2.0 ); + CotangentValue::operator()(v0, v2, v1, ppmap) / 2.0 + + CotangentValue::operator()(v0, v3, v1, ppmap) / 2.0 ); } } }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_minimum_zero > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_minimum_zero > class Cotangent_weight : CotangentValue { Cotangent_weight() @@ -484,13 +484,13 @@ class Cotangent_weight : CotangentValue { public: Cotangent_weight( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } Cotangent_weight(PolygonMesh& pmesh_) : - CotangentValue(pmesh_, get(CGAL::vertex_point, pmesh_)) + CotangentValue(pmesh_, get(CGAL::vertex_point, pmesh_)) { } PolygonMesh& pmesh() { @@ -532,16 +532,16 @@ public: const vertex_descriptor v3 = source(he_ccw, pmesh()); return ( - CotangentValue::operator()(v0, v2, v1) / 2.0 + - CotangentValue::operator()(v0, v3, v1) / 2.0 ); - } + CotangentValue::operator()(v0, v2, v1) / 2.0 + + CotangentValue::operator()(v0, v3, v1) / 2.0 ); + } } }; // Single cotangent from -[Chao10] Simple Geometric Model for Elastic Deformation. template< -typename PolygonMesh, -typename CotangentValue = Cotangent_value_Meyer_impl > + typename PolygonMesh, + typename CotangentValue = Cotangent_value_Meyer_impl > struct Single_cotangent_weight_impl : CotangentValue { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -551,9 +551,9 @@ struct Single_cotangent_weight_impl : CotangentValue { // 0 for border edges (which does not have an opposite angle). template double operator()( - halfedge_descriptor he, - PolygonMesh& pmesh, - const VertexPointMap& ppmap) { + halfedge_descriptor he, + PolygonMesh& pmesh, + const VertexPointMap& ppmap) { if (is_border(he, pmesh)) { return 0.0; } @@ -565,9 +565,9 @@ struct Single_cotangent_weight_impl : CotangentValue { }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Single_cotangent_weight : CotangentValue { Single_cotangent_weight() @@ -575,9 +575,9 @@ class Single_cotangent_weight : CotangentValue { public: Single_cotangent_weight( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -609,9 +609,9 @@ public: }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type, -typename CotangentValue = Cotangent_value_Meyer > + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type, + typename CotangentValue = Cotangent_value_Meyer > class Cotangent_weight_with_triangle_area : CotangentValue { typedef PolygonMesh PM; @@ -626,9 +626,9 @@ class Cotangent_weight_with_triangle_area : CotangentValue { public: Cotangent_weight_with_triangle_area( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + PolygonMesh& pmesh_, + VertexPointMap vpmap_) : + CotangentValue(pmesh_, vpmap_) { } PolygonMesh& pmesh() { @@ -656,7 +656,7 @@ public: const Point& v1_p = get(ppmap(), v1); const Point& v2_p = get(ppmap(), v2); const double area_t = to_double( - CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v2_p))); + CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v2_p))); return (CotangentValue::operator()(v0, v2, v1) / area_t); } else { @@ -673,8 +673,8 @@ public: const double area_t2 = to_double(CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v3_p))); return ( - CotangentValue::operator()(v0, v2, v1) / area_t1 + - CotangentValue::operator()(v0, v3, v1) / area_t2 ); + CotangentValue::operator()(v0, v2, v1) / area_t1 + + CotangentValue::operator()(v0, v3, v1) / area_t2 ); } return 0.0; } @@ -682,8 +682,8 @@ public: // Mean value calculator described in -[Floater04] Mean Value Coordinates- template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type> + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> class Mean_value_weight { // Mean_value_weight() @@ -694,10 +694,10 @@ class Mean_value_weight { public: Mean_value_weight( - PolygonMesh& pmesh_, - VertexPointMap vpmap) : - pmesh_(pmesh_), - vpmap_(vpmap) + PolygonMesh& pmesh_, + VertexPointMap vpmap) : + pmesh_(pmesh_), + vpmap_(vpmap) { } PolygonMesh& pmesh() { @@ -738,17 +738,17 @@ public: const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); const vertex_descriptor v3 = source(he_ccw, pmesh()); return ( - half_tan_value_2(v1, v0, v2) / norm + - half_tan_value_2(v1, v0, v3) / norm); + half_tan_value_2(v1, v0, v2) / norm + + half_tan_value_2(v1, v0, v3) / norm); } } private: // Returns the tangent value of the half angle v0_v1_v2 / 2. double half_tan_value( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { const Vector vec0 = get(vpmap_, v1) - get(vpmap_, v2); const Vector vec1 = get(vpmap_, v2) - get(vpmap_, v0); @@ -766,9 +766,9 @@ private: // My deviation built on Meyer_02. double half_tan_value_2( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) { const Vector a = get(vpmap_, v0) - get(vpmap_, v1); const Vector b = get(vpmap_, v2) - get(vpmap_, v1); @@ -788,9 +788,9 @@ private: }; template< -typename PolygonMesh, -typename PrimaryWeight = Cotangent_weight, -typename SecondaryWeight = Mean_value_weight > + typename PolygonMesh, + typename PrimaryWeight = Cotangent_weight, + typename SecondaryWeight = Mean_value_weight > class Hybrid_weight : public PrimaryWeight, SecondaryWeight { PrimaryWeight primary; @@ -801,8 +801,8 @@ class Hybrid_weight : public PrimaryWeight, SecondaryWeight { public: Hybrid_weight(PolygonMesh& pmesh_) : - primary(pmesh_), - secondary(pmesh_) + primary(pmesh_), + secondary(pmesh_) { } PolygonMesh& pmesh() { @@ -836,7 +836,7 @@ class Scale_dependent_weight_fairing { public: Scale_dependent_weight_fairing(PolygonMesh& pmesh_) : - pmesh_(pmesh_) + pmesh_(pmesh_) { } PolygonMesh& pmesh() { @@ -865,8 +865,8 @@ public: }; template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type> + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> class Cotangent_weight_with_voronoi_area_fairing { typedef PolygonMesh PM; @@ -876,15 +876,15 @@ class Cotangent_weight_with_voronoi_area_fairing { public: Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_) : - voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), - cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) + voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), + cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) { } Cotangent_weight_with_voronoi_area_fairing( - PM& pmesh_, - VPMap vpmap_) : - voronoi_functor(pmesh_, vpmap_), - cotangent_functor(pmesh_, vpmap_) + PM& pmesh_, + VPMap vpmap_) : + voronoi_functor(pmesh_, vpmap_), + cotangent_functor(pmesh_, vpmap_) { } PM& pmesh() { @@ -907,8 +907,8 @@ public: // Cotangent_value_Meyer_secure to avoid imprecisions from // the issue #4706 - https://github.com/CGAL/cgal/issues/4706. template< -typename PolygonMesh, -typename VertexPointMap = typename boost::property_map::type> + typename PolygonMesh, + typename VertexPointMap = typename boost::property_map::type> class Cotangent_weight_with_voronoi_area_fairing_secure { typedef PolygonMesh PM; @@ -918,15 +918,15 @@ class Cotangent_weight_with_voronoi_area_fairing_secure { public: Cotangent_weight_with_voronoi_area_fairing_secure(PM& pmesh_) : - voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), - cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) + voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), + cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) { } Cotangent_weight_with_voronoi_area_fairing_secure( - PM& pmesh_, - VPMap vpmap_) : - voronoi_functor(pmesh_, vpmap_), - cotangent_functor(pmesh_, vpmap_) + PM& pmesh_, + VPMap vpmap_) : + voronoi_functor(pmesh_, vpmap_), + cotangent_functor(pmesh_, vpmap_) { } PM& pmesh() { diff --git a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h index b65ed49828c..c52388c7559 100644 --- a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h +++ b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h @@ -14,7 +14,12 @@ #ifndef CGAL_WEIGHTS_INTERNAL_POLYGON_UTILS_2_H #define CGAL_WEIGHTS_INTERNAL_POLYGON_UTILS_2_H -// STL includes. +#include +#include +#include +#include +#include + #include #include #include @@ -23,345 +28,328 @@ #include #include -// CGAL includes. -#include -#include -#include -#include -#include - namespace CGAL { namespace Weights { namespace internal { - enum class Edge_case { +enum class Edge_case { - EXTERIOR = 0, // exterior part of the polygon - BOUNDARY = 1, // boundary part of the polygon - INTERIOR = 2 // interior part of the polygon - }; + EXTERIOR = 0, // exterior part of the polygon + BOUNDARY = 1, // boundary part of the polygon + INTERIOR = 2 // interior part of the polygon +}; - // VertexRange type enum. - enum class Polygon_type { +// VertexRange type enum. +enum class Polygon_type +{ + CONCAVE = 0, // Concave polygon = non-convex polygon. + WEAKLY_CONVEX = 1, // This is a convex polygon with collinear vertices. + STRICTLY_CONVEX = 2 // This is a convex polygon without collinear vertices. +}; - // Concave polygon = non-convex polygon. - CONCAVE = 0, +// This function is taken from the Polygon_2_algorithms.h header. +// But it is updated to support property maps. +template +int which_side_in_slab_2(const Point_2& query, + const Point_2& low, const Point_2& high, + const Orientation_2& orientation_2, + const CompareX_2& compare_x_2) +{ + const Comparison_result low_x_comp_res = compare_x_2(query, low); + const Comparison_result high_x_comp_res = compare_x_2(query, high); - // This is a convex polygon with collinear vertices. - WEAKLY_CONVEX = 1, - - // This is a convex polygon without collinear vertices. - STRICTLY_CONVEX = 2 - }; - - // This function is taken from the Polygon_2_algorithms.h header. - // But it is updated to support property maps. - template< - class Point_2, - class Orientation_2, - class CompareX_2> - int which_side_in_slab_2( - const Point_2& query, const Point_2& low, const Point_2& high, - const Orientation_2& orientation_2, const CompareX_2& compare_x_2) { - - const auto low_x_comp_res = compare_x_2(query, low); - const auto high_x_comp_res = compare_x_2(query, high); - if (low_x_comp_res == CGAL::SMALLER) { - if (high_x_comp_res == CGAL::SMALLER) { - return -1; - } - } else { - switch (high_x_comp_res) { - case CGAL::LARGER: return 1; - case CGAL::SMALLER: break; - case CGAL::EQUAL: return (low_x_comp_res == CGAL::EQUAL) ? 0 : 1; - } + if (low_x_comp_res == CGAL::SMALLER) { + if (high_x_comp_res == CGAL::SMALLER) { + return -1; } - switch (orientation_2(low, query, high)) { - case CGAL::LEFT_TURN: return 1; - case CGAL::RIGHT_TURN: return -1; - default: return 0; + } else { + switch (high_x_comp_res) { + case CGAL::LARGER: return 1; + case CGAL::SMALLER: break; + case CGAL::EQUAL: return (low_x_comp_res == CGAL::EQUAL) ? 0 : 1; } } - // This function is taken from the Polygon_2_algorithms.h header. - // But it is updated to support property maps. - template< - typename VertexRange, - typename GeomTraits, - typename PointMap> - Edge_case bounded_side_2( - const VertexRange& polygon, const typename GeomTraits::Point_2& query, - const GeomTraits& traits, const PointMap point_map) { - - const auto first = polygon.begin(); - const auto last = polygon.end(); - - auto curr = first; - if (curr == last) { - return Edge_case::EXTERIOR; - } - - auto next = curr; ++next; - if (next == last) { - return Edge_case::EXTERIOR; - } - - const auto compare_x_2 = traits.compare_x_2_object(); - const auto compare_y_2 = traits.compare_y_2_object(); - const auto orientation_2 = traits.orientation_2_object(); - - bool is_inside = false; - auto curr_y_comp_res = compare_y_2(get(point_map, *curr), query); - - // Check if the segment (curr, next) intersects - // the ray { (t, query.y()) | t >= query.x() }. - do { - const auto& currp = get(point_map, *curr); - const auto& nextp = get(point_map, *next); - - auto next_y_comp_res = compare_y_2(nextp, query); - switch (curr_y_comp_res) { - case CGAL::SMALLER: - switch (next_y_comp_res) { - case CGAL::SMALLER: - break; - case CGAL::EQUAL: - switch (compare_x_2(query, nextp)) { - case CGAL::SMALLER: is_inside = !is_inside; break; - case CGAL::EQUAL: return Edge_case::BOUNDARY; - case CGAL::LARGER: break; - } - break; - case CGAL::LARGER: - switch (which_side_in_slab_2( - query, currp, nextp, orientation_2, compare_x_2)) { - case -1: is_inside = !is_inside; break; - case 0: return Edge_case::BOUNDARY; - } - break; - } - break; - case CGAL::EQUAL: - switch (next_y_comp_res) { - case CGAL::SMALLER: - switch (compare_x_2(query, currp)) { - case CGAL::SMALLER: is_inside = !is_inside; break; - case CGAL::EQUAL: return Edge_case::BOUNDARY; - case CGAL::LARGER: break; - } - break; - case CGAL::EQUAL: - switch (compare_x_2(query, currp)) { - case CGAL::SMALLER: - if (compare_x_2(query, nextp) != CGAL::SMALLER) { - return Edge_case::BOUNDARY; - } - break; - case CGAL::EQUAL: return Edge_case::BOUNDARY; - case CGAL::LARGER: - if (compare_x_2(query, nextp) != CGAL::LARGER) { - return Edge_case::BOUNDARY; - } - break; - } - break; - case CGAL::LARGER: - if (compare_x_2(query, currp) == CGAL::EQUAL) { - return Edge_case::BOUNDARY; - } - break; - } - break; - case CGAL::LARGER: - switch (next_y_comp_res) { - case CGAL::SMALLER: - switch (which_side_in_slab_2( - query, nextp, currp, orientation_2, compare_x_2)) { - case -1: is_inside = !is_inside; break; - case 0: return Edge_case::BOUNDARY; - } - break; - case CGAL::EQUAL: - if (compare_x_2(query, nextp) == CGAL::EQUAL) { - return Edge_case::BOUNDARY; - } - break; - case CGAL::LARGER: - break; - } - break; - } - - curr = next; - curr_y_comp_res = next_y_comp_res; - ++next; - if (next == last) { - next = first; - } - } while (curr != first); - return is_inside ? Edge_case::INTERIOR : Edge_case::EXTERIOR; + switch (orientation_2(low, query, high)) { + case CGAL::LEFT_TURN: return 1; + case CGAL::RIGHT_TURN: return -1; + default: return 0; } +} - // This function is taken from the Polygon_2_algorithms.h header. - // But it is updated to support property maps. - template< - typename VertexRange, - typename GeomTraits, - typename PointMap> - bool is_convex_2( - const VertexRange& polygon, const GeomTraits traits, const PointMap point_map) { +// This function is taken from the Polygon_2_algorithms.h header. +// But it is updated to support property maps. +template +Edge_case bounded_side_2(const VertexRange& polygon, + const typename GeomTraits::Point_2& query, + const GeomTraits& traits, + const PointMap point_map) +{ + const auto first = polygon.begin(); + const auto last = polygon.end(); - auto first = polygon.begin(); - const auto last = polygon.end(); + auto curr = first; + if (curr == last) + return Edge_case::EXTERIOR; - auto prev = first; - if (prev == last) { - return true; - } + auto next = curr; + ++next; + if (next == last) + return Edge_case::EXTERIOR; - auto curr = prev; ++curr; - if (curr == last) { - return true; - } + const auto compare_x_2 = traits.compare_x_2_object(); + const auto compare_y_2 = traits.compare_y_2_object(); + const auto orientation_2 = traits.orientation_2_object(); - auto next = curr; ++next; - if (next == last) { - return true; - } + bool is_inside = false; + auto curr_y_comp_res = compare_y_2(get(point_map, *curr), query); - const auto equal_2 = traits.equal_2_object(); - while (equal_2(get(point_map, *prev), get(point_map, *curr))) { - curr = next; ++next; - if (next == last) { - return true; - } - } + // Check if the segment (curr, next) intersects + // the ray { (t, query.y()) | t >= query.x() }. + do { + const auto& currp = get(point_map, *curr); + const auto& nextp = get(point_map, *next); - const auto less_xy_2 = traits.less_xy_2_object(); - const auto orientation_2 = traits.orientation_2_object(); - - bool has_clockwise_triplets = false; - bool has_counterclockwise_triplets = false; - bool order = less_xy_2( - get(point_map, *prev), get(point_map, *curr)); - int num_order_changes = 0; - - do { - switch_orient: - switch (orientation_2( - get(point_map, *prev), get(point_map, *curr), get(point_map, *next))) { - - case CGAL::CLOCKWISE: - has_clockwise_triplets = true; - break; - case CGAL::COUNTERCLOCKWISE: - has_counterclockwise_triplets = true; - break; - case CGAL::ZERO: { - if (equal_2( - get(point_map, *curr), - get(point_map, *next))) { - - if (next == first) { - first = curr; + auto next_y_comp_res = compare_y_2(nextp, query); + switch (curr_y_comp_res) { + case CGAL::SMALLER: + switch (next_y_comp_res) { + case CGAL::SMALLER: + break; + case CGAL::EQUAL: + switch (compare_x_2(query, nextp)) { + case CGAL::SMALLER: is_inside = !is_inside; break; + case CGAL::EQUAL: return Edge_case::BOUNDARY; + case CGAL::LARGER: break; } - ++next; - if (next == last) { - next = first; + break; + case CGAL::LARGER: + switch (which_side_in_slab_2( + query, currp, nextp, orientation_2, compare_x_2)) { + case -1: is_inside = !is_inside; break; + case 0: return Edge_case::BOUNDARY; } - goto switch_orient; - } - break; + break; } - } + break; + case CGAL::EQUAL: + switch (next_y_comp_res) { + case CGAL::SMALLER: + switch (compare_x_2(query, currp)) { + case CGAL::SMALLER: is_inside = !is_inside; break; + case CGAL::EQUAL: return Edge_case::BOUNDARY; + case CGAL::LARGER: break; + } + break; + case CGAL::EQUAL: + switch (compare_x_2(query, currp)) { + case CGAL::SMALLER: + if (compare_x_2(query, nextp) != CGAL::SMALLER) { + return Edge_case::BOUNDARY; + } + break; + case CGAL::EQUAL: return Edge_case::BOUNDARY; + case CGAL::LARGER: + if (compare_x_2(query, nextp) != CGAL::LARGER) { + return Edge_case::BOUNDARY; + } + break; + } + break; + case CGAL::LARGER: + if (compare_x_2(query, currp) == CGAL::EQUAL) { + return Edge_case::BOUNDARY; + } + break; + } + break; + case CGAL::LARGER: + switch (next_y_comp_res) { + case CGAL::SMALLER: + switch (which_side_in_slab_2( + query, nextp, currp, orientation_2, compare_x_2)) { + case -1: is_inside = !is_inside; break; + case 0: return Edge_case::BOUNDARY; + } + break; + case CGAL::EQUAL: + if (compare_x_2(query, nextp) == CGAL::EQUAL) { + return Edge_case::BOUNDARY; + } + break; + case CGAL::LARGER: + break; + } + break; + } - const bool new_order = less_xy_2( - get(point_map, *curr), get(point_map, *next)); + curr = next; + curr_y_comp_res = next_y_comp_res; + ++next; + if (next == last) { + next = first; + } + } while (curr != first); - if (order != new_order) { - num_order_changes++; - } + return is_inside ? Edge_case::INTERIOR : Edge_case::EXTERIOR; +} - if (num_order_changes > 2) { - return false; - } +// This function is taken from the Polygon_2_algorithms.h header. +// But it is updated to support property maps. +template +bool is_convex_2(const VertexRange& polygon, + const GeomTraits traits, + const PointMap point_map) +{ + auto first = polygon.begin(); + const auto last = polygon.end(); - if (has_clockwise_triplets && has_counterclockwise_triplets) { - return false; - } - - prev = curr; - curr = next; - ++next; - if (next == last) { - next = first; - } - order = new_order; - } while (prev != first); + auto prev = first; + if (prev == last) return true; - } - // This function is taken from the Polygon_2_algorithms.h header. - // But it is updated to support property maps. - template< - typename VertexRange, - typename GeomTraits, - typename PointMap> - bool is_simple_2( - const VertexRange& polygon, const GeomTraits traits, const PointMap point_map) { + auto curr = prev; + ++curr; + if (curr == last) + return true; - const auto first = polygon.begin(); - const auto last = polygon.end(); - if (first == last) { + auto next = curr; + ++next; + if (next == last) + return true; + + const auto equal_2 = traits.equal_2_object(); + while (equal_2(get(point_map, *prev), get(point_map, *curr))) { + curr = next; ++next; + if (next == last) return true; - } - - std::vector poly; - poly.reserve(polygon.size()); - for (const auto& vertex : polygon) { - poly.push_back(get(point_map, vertex)); - } - return CGAL::is_simple_2(poly.begin(), poly.end(), traits); } - template< - typename VertexRange, - typename GeomTraits, - typename PointMap> - Polygon_type polygon_type_2( - const VertexRange& polygon, const GeomTraits traits, const PointMap point_map) { + const auto less_xy_2 = traits.less_xy_2_object(); + const auto orientation_2 = traits.orientation_2_object(); - const auto collinear_2 = - traits.collinear_2_object(); - CGAL_precondition(polygon.size() >= 3); + bool has_clockwise_triplets = false; + bool has_counterclockwise_triplets = false; + bool order = less_xy_2(get(point_map, *prev), get(point_map, *curr)); + int num_order_changes = 0; - // First, test the polygon on convexity. - if (is_convex_2(polygon, traits, point_map)) { + do + { +switch_orient: + switch (orientation_2(get(point_map, *prev), get(point_map, *curr), get(point_map, *next))) + { + case CGAL::CLOCKWISE: + has_clockwise_triplets = true; + break; + case CGAL::COUNTERCLOCKWISE: + has_counterclockwise_triplets = true; + break; + case CGAL::ZERO: { + if (equal_2(get(point_map, *curr), + get(point_map, *next))) + { + if (next == first) + first = curr; - // Test all the consequent triplets of polygon vertices on collinearity. - // In case we find at least one, return WEAKLY_CONVEX polygon. - const std::size_t n = polygon.size(); - for (std::size_t i = 0; i < n; ++i) { - const auto& p1 = get(point_map, *(polygon.begin() + i)); + ++next; + if (next == last) + next = first; - const std::size_t im = (i + n - 1) % n; - const std::size_t ip = (i + 1) % n; - - const auto& p0 = get(point_map, *(polygon.begin() + im)); - const auto& p2 = get(point_map, *(polygon.begin() + ip)); - - if (collinear_2(p0, p1, p2)) { - return Polygon_type::WEAKLY_CONVEX; + goto switch_orient; } + break; } - // Otherwise, return STRICTLY_CONVEX polygon. - return Polygon_type::STRICTLY_CONVEX; } - // Otherwise, return CONCAVE polygon. - return Polygon_type::CONCAVE; + + const bool new_order = less_xy_2(get(point_map, *curr), get(point_map, *next)); + + if (order != new_order) + num_order_changes++; + + if (num_order_changes > 2) + return false; + + if (has_clockwise_triplets && has_counterclockwise_triplets) + return false; + + prev = curr; + curr = next; + ++next; + if (next == last) + next = first; + + order = new_order; + } while (prev != first); + + return true; +} + +// This function is taken from the Polygon_2_algorithms.h header. +// But it is updated to support property maps. +template +bool is_simple_2(const VertexRange& polygon, + const GeomTraits traits, + const PointMap point_map) +{ + const auto first = polygon.begin(); + const auto last = polygon.end(); + if (first == last) + return true; + + std::vector poly; + poly.reserve(polygon.size()); + for (const auto& vertex : polygon) + poly.push_back(get(point_map, vertex)); + + return CGAL::is_simple_2(poly.begin(), poly.end(), traits); +} + +template +Polygon_type polygon_type_2(const VertexRange& polygon, + const GeomTraits traits, + const PointMap point_map) +{ + auto collinear_2 = traits.collinear_2_object(); + CGAL_precondition(polygon.size() >= 3); + + // First, test the polygon on convexity. + if (is_convex_2(polygon, traits, point_map)) + { + // Test all the consequent triplets of polygon vertices on collinearity. + // In case we find at least one, return WEAKLY_CONVEX polygon. + const std::size_t n = polygon.size(); + for (std::size_t i = 0; i < n; ++i) + { + const auto& p1 = get(point_map, *(polygon.begin() + i)); + + const std::size_t im = (i + n - 1) % n; + const std::size_t ip = (i + 1) % n; + + const auto& p0 = get(point_map, *(polygon.begin() + im)); + const auto& p2 = get(point_map, *(polygon.begin() + ip)); + + if (collinear_2(p0, p1, p2)) + return Polygon_type::WEAKLY_CONVEX; + } + + // Otherwise, return STRICTLY_CONVEX polygon. + return Polygon_type::STRICTLY_CONVEX; } + // Otherwise, return CONCAVE polygon. + return Polygon_type::CONCAVE; +} + } // namespace internal } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 4e6ef42f96c..58eed2cd389 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -14,722 +14,650 @@ #ifndef CGAL_WEIGHTS_INTERNAL_UTILS_H #define CGAL_WEIGHTS_INTERNAL_UTILS_H -// STL includes. -#include -#include -#include -#include -#include -#include -#include -#include - -// Boost headers. -#include -#include - -// CGAL includes. -#include #include -#include +#include #include +#include #include -#include -#include +#include + +#include + +#include +#include +#include +#include +#include namespace CGAL { namespace Weights { namespace internal { - // Sqrt helpers. - template - class Default_sqrt { +// Sqrt helpers. +template +class Default_sqrt +{ +private: + using Traits = GeomTraits; + using FT = typename Traits::FT; - private: - using Traits = GeomTraits; - using FT = typename Traits::FT; - - public: - FT operator()(const FT value) const { - return static_cast( - CGAL::sqrt(CGAL::to_double(CGAL::abs(value)))); - } - }; - - BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_type_Sqrt, Sqrt, false) - - // Case: do_not_use_default = false. - template::value> - class Get_sqrt { - - public: - using Traits = GeomTraits; - using Sqrt = Default_sqrt; - - static Sqrt sqrt_object(const Traits& ) { - return Sqrt(); - } - }; - - // Case: do_not_use_default = true. - template - class Get_sqrt { - - public: - using Traits = GeomTraits; - using Sqrt = typename Traits::Sqrt; - - static Sqrt sqrt_object(const Traits& traits) { - return traits.sqrt_object(); - } - }; - - // Normalize values. - template - void normalize(std::vector& values) { - - FT sum = FT(0); - for (const FT& value : values) { - sum += value; - } - - CGAL_assertion(sum != FT(0)); - if (sum == FT(0)) { - return; - } - - const FT inv_sum = FT(1) / sum; - for (FT& value : values) { - value *= inv_sum; - } +public: + FT operator()(const FT value) const + { + return static_cast(CGAL::sqrt(CGAL::to_double(CGAL::abs(value)))); } +}; - // Raises value to the power. - template - typename GeomTraits::FT power( - const GeomTraits&, - const typename GeomTraits::FT value, - const typename GeomTraits::FT p) { +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(Has_nested_type_Sqrt, Sqrt, false) - using FT = typename GeomTraits::FT; - const double base = CGAL::to_double(value); - const double exp = CGAL::to_double(p); - return static_cast(std::pow(base, exp)); +// Case: do_not_use_default = false. +template::value> +class Get_sqrt +{ +public: + using Traits = GeomTraits; + using Sqrt = Default_sqrt; + + static Sqrt sqrt_object(const Traits&) + { + return Sqrt(); } +}; - // Computes distance between two 2D points. - template - typename GeomTraits::FT distance_2( - const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q) { +// Case: do_not_use_default = true. +template +class Get_sqrt +{ +public: + using Traits = GeomTraits; + using Sqrt = typename Traits::Sqrt; - using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); - - const auto squared_distance_2 = - traits.compute_squared_distance_2_object(); - return sqrt(squared_distance_2(p, q)); + static Sqrt sqrt_object(const Traits& traits) + { + return traits.sqrt_object(); } - - // Computes length of a 2D vector. - template - typename GeomTraits::FT length_2( - const GeomTraits& traits, - const typename GeomTraits::Vector_2& v) { - - using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); - - const auto squared_length_2 = - traits.compute_squared_length_2_object(); - return sqrt(squared_length_2(v)); - } - - // Normalizes a 2D vector. - template - void normalize_2( - const GeomTraits& traits, - typename GeomTraits::Vector_2& v) { - - using FT = typename GeomTraits::FT; - const FT length = length_2(traits, v); - CGAL_assertion(length != FT(0)); - if (length == FT(0)) { - return; - } - v /= length; - } - - // Computes cotanget between two 2D vectors. - template - typename GeomTraits::FT cotangent_2( - const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) { - - using FT = typename GeomTraits::FT; - const auto dot_product_2 = - traits.compute_scalar_product_2_object(); - const auto cross_product_2 = - traits.compute_determinant_2_object(); - const auto construct_vector_2 = - traits.construct_vector_2_object(); - - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); - - const FT dot = dot_product_2(v1, v2); - const FT cross = cross_product_2(v1, v2); - - const FT length = CGAL::abs(cross); - // CGAL_assertion(length != FT(0)); not really necessary - if (length != FT(0)) { - return dot / length; - } else { - return FT(0); // undefined - } - } - - // Computes tanget between two 2D vectors. - template - typename GeomTraits::FT tangent_2( - const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) { - - using FT = typename GeomTraits::FT; - const auto dot_product_2 = - traits.compute_scalar_product_2_object(); - const auto cross_product_2 = - traits.compute_determinant_2_object(); - const auto construct_vector_2 = - traits.construct_vector_2_object(); - - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); - - const FT dot = dot_product_2(v1, v2); - const FT cross = cross_product_2(v1, v2); - - const FT length = CGAL::abs(cross); - // CGAL_assertion(dot != FT(0)); not really necessary - if (dot != FT(0)) { - return length / dot; - } else { - return FT(0); // undefined - } - } - - // Computes distance between two 3D points. - template - typename GeomTraits::FT distance_3( - const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q) { - - using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); - - const auto squared_distance_3 = - traits.compute_squared_distance_3_object(); - return sqrt(squared_distance_3(p, q)); - } - - // Computes length of a 3D vector. - template - typename GeomTraits::FT length_3( - const GeomTraits& traits, - const typename GeomTraits::Vector_3& v) { - - using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); - - const auto squared_length_3 = - traits.compute_squared_length_3_object(); - return sqrt(squared_length_3(v)); - } - - // Normalizes a 3D vector. - template - void normalize_3( - const GeomTraits& traits, - typename GeomTraits::Vector_3& v) { - - using FT = typename GeomTraits::FT; - const FT length = length_3(traits, v); - CGAL_assertion(length != FT(0)); - if (length == FT(0)) { - return; - } - v /= length; - } - - // Computes cotanget between two 3D vectors. - template - typename GeomTraits::FT cotangent_3( - const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) { - - using FT = typename GeomTraits::FT; - const auto dot_product_3 = - traits.compute_scalar_product_3_object(); - const auto cross_product_3 = - traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); - - const FT dot = dot_product_3(v1, v2); - const auto cross = cross_product_3(v1, v2); - - const FT length = length_3(traits, cross); - // TODO: - // Not really necessary: since we handle case length = 0. Does this case happen? - // Yes, e.g. in Surface Parameterization tests. Does it affect the results? - // In current applications, not really. - // CGAL_assertion(length != FT(0)); - if (length != FT(0)) { - return dot / length; - } else { - return FT(0); // undefined - } - } - - // Computes tanget between two 3D vectors. - template - typename GeomTraits::FT tangent_3( - const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) { - - using FT = typename GeomTraits::FT; - const auto dot_product_3 = - traits.compute_scalar_product_3_object(); - const auto cross_product_3 = - traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); - - const FT dot = dot_product_3(v1, v2); - const auto cross = cross_product_3(v1, v2); - - const FT length = length_3(traits, cross); - // CGAL_assertion(dot != FT(0)); not really necessary - if (dot != FT(0)) { - return length / dot; - } else { - return FT(0); // undefined - } - } - - // Computes 3D angle between two vectors. - template - double angle_3( - const GeomTraits& traits, - const typename GeomTraits::Vector_3& v1, - const typename GeomTraits::Vector_3& v2) { - - const auto dot_product_3 = - traits.compute_scalar_product_3_object(); - const double dot = - CGAL::to_double(dot_product_3(v1, v2)); - - double angle_rad = 0.0; - if (dot < -1.0) { - angle_rad = std::acos(-1.0); - } else if (dot > 1.0) { - angle_rad = std::acos(+1.0); - } else { - angle_rad = std::acos(dot); - } - return angle_rad; - } - - // Rotates a 3D point around axis. - template - typename GeomTraits::Point_3 rotate_point_3( - const GeomTraits&, - const double angle_rad, - const typename GeomTraits::Vector_3& axis, - const typename GeomTraits::Point_3& query) { - - using FT = typename GeomTraits::FT; - using Point_3 = typename GeomTraits::Point_3; - - const FT c = static_cast(std::cos(angle_rad)); - const FT s = static_cast(std::sin(angle_rad)); - const FT C = FT(1) - c; - - const auto x = axis.x(); - const auto y = axis.y(); - const auto z = axis.z(); - - return Point_3( - (x * x * C + c) * query.x() + - (x * y * C - z * s) * query.y() + - (x * z * C + y * s) * query.z(), - (y * x * C + z * s) * query.x() + - (y * y * C + c) * query.y() + - (y * z * C - x * s) * query.z(), - (z * x * C - y * s) * query.x() + - (z * y * C + x * s) * query.y() + - (z * z * C + c) * query.z()); - } - - // Computes two 3D orthogonal base vectors wrt a given normal. - template - void orthogonal_bases_3( - const GeomTraits& traits, - const typename GeomTraits::Vector_3& normal, - typename GeomTraits::Vector_3& b1, - typename GeomTraits::Vector_3& b2) { - - using Vector_3 = typename GeomTraits::Vector_3; - const auto cross_product_3 = - traits.construct_cross_product_vector_3_object(); - - const auto nx = normal.x(); - const auto ny = normal.y(); - const auto nz = normal.z(); - - if (CGAL::abs(nz) >= CGAL::abs(ny)) { - b1 = Vector_3(nz, 0, -nx); - } else { - b1 = Vector_3(ny, -nx, 0); - } - b2 = cross_product_3(normal, b1); - - normalize_3(traits, b1); - normalize_3(traits, b2); - } - - // Converts a 3D point into a 2D point wrt to a given plane. - template - typename GeomTraits::Point_2 to_2d( - const GeomTraits& traits, - const typename GeomTraits::Vector_3& b1, - const typename GeomTraits::Vector_3& b2, - const typename GeomTraits::Point_3& origin, - const typename GeomTraits::Point_3& query) { - - using Point_2 = typename GeomTraits::Point_2; - const auto dot_product_3 = - traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v = construct_vector_3(origin, query); - const auto x = dot_product_3(b1, v); - const auto y = dot_product_3(b2, v); - return Point_2(x, y); - } - - // Flattening. - - // \cgalFigureBegin{flattening, flattening.svg} - // The non-planar configuration (top) is flattened to the planar configuration (bottom). - // \cgalFigureEnd - - // When computing weights for a query point \f$q\f$ with respect to its neighbors - // \f$p_0\f$, \f$p_1\f$, and \f$p_2\f$, the local configuration is a quadrilateral - // [\f$p_0\f$, \f$p_1\f$, \f$p_2\f$, \f$q\f$] or two connected triangles [\f$q\f$, \f$p_0\f$, \f$p_1\f$] - // and [\f$q\f$, \f$p_1\f$, \f$p_2\f$]. When working in 3D, these triangles are not - // necessarily coplanar, in other words, they do not belong to the same common plane. - // When they are not coplanar, they can be made coplanar through the process called *flattening* (see the Figure above), - // however the latter introduces a distortion because the weights are computed with respect to the - // flattened configuration rather than to the original non-flat configuration. - - // \subsection Weights_Examples_ProjectionTraits Computing 2D Weights in 3D - - // If you have a 2D polygon in 3D plane that is not an XY plane, you can still compute - // the 2D weights, however you need to provide a special projection traits class. - // The common plane that is used in this example is projectable to the XY plane. We first - // compute `Mean_value_weights_2` for a 3D polygon in this plane. We then also show how to use - // the projection traits to compute the \ref PkgWeightsRefWachspressWeights "2D Wachspress weight" - // for 3D points which are not strictly coplanar. - - // \cgalExample{Weights/projection_traits.cpp} - - // Example of flattening: - - // 3D configuration. - // const Point_3 p0(0, 1, 1); - // const Point_3 p1(2, 0, 1); - // const Point_3 p2(7, 1, 1); - // const Point_3 q0(3, 1, 1); - - // Choose a type of the weight: - // e.g. 0 - Wachspress (WP) weight. - // const FT wp = FT(0); - - // Compute WP weights for q1 which is not on the plane [p0, p1, p2]. - - // Point_3 q1(3, 1, 2); - // std::cout << "3D wachspress (WP, q1): "; - // std::cout << CGAL::Weights::three_point_family_weight(p0, p1, p2, q1, wp) << std::endl; - - // Converge q1 towards q0 that is we flatten the configuration. - // We also compare the result with the authalic weight. - - // std::cout << "Converge q1 to q0: " << std::endl; - // for (FT x = FT(0); x <= FT(1); x += step) { - // std::cout << "3D wachspress/authalic: "; - // q1 = Point_3(3, 1, FT(2) - x); - // std::cout << CGAL::Weights::three_point_family_weight(p0, p1, p2, q1, wp) << "/"; - // std::cout << CGAL::Weights::authalic_weight(p0, p1, p2, q1) << std::endl; - // } - - // Flattens an arbitrary quad into a planar quad. - template - void flatten( - const GeomTraits& traits, - const typename GeomTraits::Point_3& t, // prev neighbor/vertex/point - const typename GeomTraits::Point_3& r, // curr neighbor/vertex/point - const typename GeomTraits::Point_3& p, // next neighbor/vertex/point - const typename GeomTraits::Point_3& q, // query point - typename GeomTraits::Point_2& tf, - typename GeomTraits::Point_2& rf, - typename GeomTraits::Point_2& pf, - typename GeomTraits::Point_2& qf) { - - // std::cout << std::endl; - using Point_3 = typename GeomTraits::Point_3; - using Vector_3 = typename GeomTraits::Vector_3; - - const auto cross_product_3 = - traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - const auto centroid_3 = - traits.construct_centroid_3_object(); - - // Compute centroid. - const auto center = centroid_3(t, r, p, q); - // std::cout << "centroid: " << center << std::endl; - - // Translate. - const Point_3 t1 = Point_3( - t.x() - center.x(), t.y() - center.y(), t.z() - center.z()); - const Point_3 r1 = Point_3( - r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); - const Point_3 p1 = Point_3( - p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); - const Point_3 q1 = Point_3( - q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); - - // std::cout << "translated t1: " << t1 << std::endl; - // std::cout << "translated r1: " << r1 << std::endl; - // std::cout << "translated p1: " << p1 << std::endl; - // std::cout << "translated q1: " << q1 << std::endl; - - // Middle axis. - auto ax = construct_vector_3(q1, r1); - normalize_3(traits, ax); - - // Prev and next vectors. - auto v1 = construct_vector_3(q1, t1); - auto v2 = construct_vector_3(q1, p1); - - normalize_3(traits, v1); - normalize_3(traits, v2); - - // Two triangle normals. - auto n1 = cross_product_3(v1, ax); - auto n2 = cross_product_3(ax, v2); - - normalize_3(traits, n1); - normalize_3(traits, n2); - - // std::cout << "normal n1: " << n1 << std::endl; - // std::cout << "normal n2: " << n2 << std::endl; - - // Angle between two normals. - const double angle_rad = angle_3(traits, n1, n2); - // std::cout << "angle deg n1 <-> n2: " << angle_rad * 180.0 / CGAL_PI << std::endl; - - // Rotate p1 around ax so that it lands onto the plane [q1, t1, r1]. - const auto& t2 = t1; - const auto& r2 = r1; - const auto p2 = rotate_point_3(traits, angle_rad, ax, p1); - const auto& q2 = q1; - // std::cout << "rotated p2: " << p2 << std::endl; - - // Compute orthogonal base vectors. - Vector_3 b1, b2; - const auto& normal = n1; - orthogonal_bases_3(traits, normal, b1, b2); - - // const auto angle12 = angle_3(traits, b1, b2); - // std::cout << "angle deg b1 <-> b2: " << angle12 * 180.0 / CGAL_PI << std::endl; - - // Flatten a quad. - const auto& origin = q2; - tf = to_2d(traits, b1, b2, origin, t2); - rf = to_2d(traits, b1, b2, origin, r2); - pf = to_2d(traits, b1, b2, origin, p2); - qf = to_2d(traits, b1, b2, origin, q2); - - // std::cout << "flattened qf: " << qf << std::endl; - // std::cout << "flattened tf: " << tf << std::endl; - // std::cout << "flattened rf: " << rf << std::endl; - // std::cout << "flattened pf: " << pf << std::endl; - - // std::cout << "A1: " << area_2(traits, rf, qf, pf) << std::endl; - // std::cout << "A2: " << area_2(traits, pf, qf, rf) << std::endl; - // std::cout << "C: " << area_2(traits, tf, rf, pf) << std::endl; - // std::cout << "B: " << area_2(traits, pf, qf, tf) << std::endl; - } - - // Computes area of a 2D triangle. - template - typename GeomTraits::FT area_2( - const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) { - - const auto area_2 = traits.compute_area_2_object(); - return area_2(p, q, r); - } - - // Computes positive area of a 2D triangle. - template - typename GeomTraits::FT positive_area_2( - const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) { - - return CGAL::abs(area_2(traits, p, q, r)); - } - - // Computes area of a 3D triangle. - template - typename GeomTraits::FT area_3( - const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) { - - using FT = typename GeomTraits::FT; - using Point_3 = typename GeomTraits::Point_3; - using Vector_3 = typename GeomTraits::Vector_3; - - const auto cross_product_3 = - traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - const auto centroid_3 = - traits.construct_centroid_3_object(); - - // Compute centroid. - const auto center = centroid_3(p, q, r); - - // Translate. - const Point_3 a = Point_3( - p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); - const Point_3 b = Point_3( - q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); - const Point_3 c = Point_3( - r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); - - // Prev and next vectors. - auto v1 = construct_vector_3(b, a); - auto v2 = construct_vector_3(b, c); - normalize_3(traits, v1); - normalize_3(traits, v2); - - // Compute normal. - auto normal = cross_product_3(v1, v2); - normalize_3(traits, normal); - - // Compute orthogonal base vectors. - Vector_3 b1, b2; - orthogonal_bases_3(traits, normal, b1, b2); - - // Compute area. - const auto& origin = b; - const auto pf = to_2d(traits, b1, b2, origin, a); - const auto qf = to_2d(traits, b1, b2, origin, b); - const auto rf = to_2d(traits, b1, b2, origin, c); - - const FT A = area_2(traits, pf, qf, rf); - return A; - } - - // Computes positive area of a 3D triangle. - template - typename GeomTraits::FT positive_area_3( - const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) { - - using FT = typename GeomTraits::FT; - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); - - const auto cross_product_3 = - traits.construct_cross_product_vector_3_object(); - const auto cross = cross_product_3(v1, v2); - const FT half = FT(1) / FT(2); - const FT A = half * length_3(traits, cross); - return A; - } - - // Computes a clamped cotangent between two 3D vectors. - // In the old version of weights in PMP, it has been called secure. - // See Weights/internal/pmp_weights_deprecated.h for more information. - template - typename GeomTraits::FT cotangent_3_clamped( - const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) { - - using FT = typename GeomTraits::FT; - using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); - - const auto dot_product_3 = - traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); - - const FT dot = dot_product_3(v1, v2); - const FT length_v1 = length_3(traits, v1); - const FT length_v2 = length_3(traits, v2); - - const FT lb = -FT(999) / FT(1000), ub = FT(999) / FT(1000); - FT cosine = dot / length_v1 / length_v2; - cosine = (cosine < lb) ? lb : cosine; - cosine = (cosine > ub) ? ub : cosine; - const FT sine = sqrt(FT(1) - cosine * cosine); - - CGAL_assertion(sine != FT(0)); - if (sine != FT(0)) { - return cosine / sine; - } +}; + +template +void normalize(std::vector& values) +{ + FT sum = FT(0); + for (const FT& value : values) + sum += value; + + CGAL_assertion(sum != FT(0)); + if (sum == FT(0)) + return; + + const FT inv_sum = FT(1) / sum; + for (FT& value : values) + value *= inv_sum; +} + +// Raises value to the power. +template +typename GeomTraits::FT power(const GeomTraits&, + const typename GeomTraits::FT value, + const typename GeomTraits::FT p) +{ + using FT = typename GeomTraits::FT; + + const double base = CGAL::to_double(value); + const double exp = CGAL::to_double(p); + + return static_cast(std::pow(base, exp)); +} + +// Computes distance between two 2D points. +template +typename GeomTraits::FT distance_2(const GeomTraits& traits, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q) +{ + using Get_sqrt = Get_sqrt; + const auto sqrt = Get_sqrt::sqrt_object(traits); + + const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + return sqrt(squared_distance_2(p, q)); +} + +// Computes length of a 2D vector. +template +typename GeomTraits::FT length_2(const GeomTraits& traits, + const typename GeomTraits::Vector_2& v) +{ + using Get_sqrt = Get_sqrt; + const auto sqrt = Get_sqrt::sqrt_object(traits); + + const auto squared_length_2 = traits.compute_squared_length_2_object(); + return sqrt(squared_length_2(v)); +} + +template +void normalize_2(const GeomTraits& traits, + typename GeomTraits::Vector_2& v) +{ + using FT = typename GeomTraits::FT; + const FT length = length_2(traits, v); + CGAL_assertion(length != FT(0)); + if (length == FT(0)) + return; + + v /= length; +} + +// Computes cotanget between two 2D vectors. +template +typename GeomTraits::FT cotangent_2(const GeomTraits& traits, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r) +{ + using FT = typename GeomTraits::FT; + const auto dot_product_2 = traits.compute_scalar_product_2_object(); + const auto cross_product_2 = traits.compute_determinant_2_object(); + const auto construct_vector_2 = traits.construct_vector_2_object(); + + const auto v1 = construct_vector_2(q, r); + const auto v2 = construct_vector_2(q, p); + + const FT dot = dot_product_2(v1, v2); + const FT cross = cross_product_2(v1, v2); + + const FT length = CGAL::abs(cross); + // CGAL_assertion(length != FT(0)); not really necessary + if (length != FT(0)) + return dot / length; + else return FT(0); // undefined - } +} + +// Computes tanget between two 2D vectors. +template +typename GeomTraits::FT tangent_2(const GeomTraits& traits, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r) +{ + using FT = typename GeomTraits::FT; + const auto dot_product_2 = traits.compute_scalar_product_2_object(); + const auto cross_product_2 = traits.compute_determinant_2_object(); + const auto construct_vector_2 = traits.construct_vector_2_object(); + + const auto v1 = construct_vector_2(q, r); + const auto v2 = construct_vector_2(q, p); + + const FT dot = dot_product_2(v1, v2); + const FT cross = cross_product_2(v1, v2); + + const FT length = CGAL::abs(cross); + // CGAL_assertion(dot != FT(0)); not really necessary + if (dot != FT(0)) + return length / dot; + else + return FT(0); // undefined +} + +// Computes distance between two 3D points. +template +typename GeomTraits::FT distance_3(const GeomTraits& traits, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q) +{ + using Get_sqrt = Get_sqrt; + const auto sqrt = Get_sqrt::sqrt_object(traits); + + const auto squared_distance_3 = traits.compute_squared_distance_3_object(); + return sqrt(squared_distance_3(p, q)); +} + +template +typename GeomTraits::FT length_3(const GeomTraits& traits, + const typename GeomTraits::Vector_3& v) +{ + using Get_sqrt = Get_sqrt; + const auto sqrt = Get_sqrt::sqrt_object(traits); + + const auto squared_length_3 = traits.compute_squared_length_3_object(); + return sqrt(squared_length_3(v)); +} + +template +void normalize_3(const GeomTraits& traits, + typename GeomTraits::Vector_3& v) +{ + using FT = typename GeomTraits::FT; + + const FT length = length_3(traits, v); + CGAL_assertion(length != FT(0)); + if (length == FT(0)) + return; + + v /= length; +} + +template +typename GeomTraits::FT cotangent_3(const GeomTraits& traits, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r) +{ + using FT = typename GeomTraits::FT; + const auto dot_product_3 = traits.compute_scalar_product_3_object(); + const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + + const auto v1 = construct_vector_3(q, r); + const auto v2 = construct_vector_3(q, p); + + const FT dot = dot_product_3(v1, v2); + const auto cross = cross_product_3(v1, v2); + + const FT length = length_3(traits, cross); + // TODO: + // Not really necessary: since we handle case length = 0. Does this case happen? + // Yes, e.g. in Surface Parameterization tests. Does it affect the results? + // In current applications, not really. + // CGAL_assertion(length != FT(0)); + if (length != FT(0)) + return dot / length; + else + return FT(0); // undefined +} + +// Computes tanget between two 3D vectors. +template +typename GeomTraits::FT tangent_3(const GeomTraits& traits, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r) +{ + using FT = typename GeomTraits::FT; + const auto dot_product_3 = traits.compute_scalar_product_3_object(); + const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + + const auto v1 = construct_vector_3(q, r); + const auto v2 = construct_vector_3(q, p); + + const FT dot = dot_product_3(v1, v2); + const auto cross = cross_product_3(v1, v2); + + const FT length = length_3(traits, cross); + // CGAL_assertion(dot != FT(0)); not really necessary + if (dot != FT(0)) + return length / dot; + else + return FT(0); // undefined +} + +// Computes 3D angle between two vectors. +template +double angle_3(const GeomTraits& traits, + const typename GeomTraits::Vector_3& v1, + const typename GeomTraits::Vector_3& v2) +{ + const auto dot_product_3 = traits.compute_scalar_product_3_object(); + const double dot = CGAL::to_double(dot_product_3(v1, v2)); + + double angle_rad = 0.0; + if (dot < -1.0) + angle_rad = std::acos(-1.0); + else if (dot > 1.0) + angle_rad = std::acos(+1.0); + else + angle_rad = std::acos(dot); + + return angle_rad; +} + +// Rotates a 3D point around axis. +template +typename GeomTraits::Point_3 rotate_point_3(const GeomTraits&, + const double angle_rad, + const typename GeomTraits::Vector_3& axis, + const typename GeomTraits::Point_3& query) +{ + using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; + + const FT c = static_cast(std::cos(angle_rad)); + const FT s = static_cast(std::sin(angle_rad)); + const FT C = FT(1) - c; + + const auto x = axis.x(); + const auto y = axis.y(); + const auto z = axis.z(); + + return Point_3( + (x * x * C + c) * query.x() + + (x * y * C - z * s) * query.y() + + (x * z * C + y * s) * query.z(), + (y * x * C + z * s) * query.x() + + (y * y * C + c) * query.y() + + (y * z * C - x * s) * query.z(), + (z * x * C - y * s) * query.x() + + (z * y * C + x * s) * query.y() + + (z * z * C + c) * query.z()); +} + +// Computes two 3D orthogonal base vectors wrt a given normal. +template +void orthogonal_bases_3(const GeomTraits& traits, + const typename GeomTraits::Vector_3& normal, + typename GeomTraits::Vector_3& b1, + typename GeomTraits::Vector_3& b2) +{ + using Vector_3 = typename GeomTraits::Vector_3; + const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + + const auto nx = normal.x(); + const auto ny = normal.y(); + const auto nz = normal.z(); + + if (CGAL::abs(nz) >= CGAL::abs(ny)) + b1 = Vector_3(nz, 0, -nx); + else + b1 = Vector_3(ny, -nx, 0); + + b2 = cross_product_3(normal, b1); + + normalize_3(traits, b1); + normalize_3(traits, b2); +} + +// Converts a 3D point into a 2D point wrt to a given plane. +template +typename GeomTraits::Point_2 to_2d(const GeomTraits& traits, + const typename GeomTraits::Vector_3& b1, + const typename GeomTraits::Vector_3& b2, + const typename GeomTraits::Point_3& origin, + const typename GeomTraits::Point_3& query) +{ + using Point_2 = typename GeomTraits::Point_2; + const auto dot_product_3 = traits.compute_scalar_product_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + + const auto v = construct_vector_3(origin, query); + const auto x = dot_product_3(b1, v); + const auto y = dot_product_3(b2, v); + + return Point_2(x, y); +} + +// Flattening. + +// \cgalFigureBegin{flattening, flattening.svg} +// The non-planar configuration (top) is flattened to the planar configuration (bottom). +// \cgalFigureEnd + +// When computing weights for a query point \f$q\f$ with respect to its neighbors +// \f$p_0\f$, \f$p_1\f$, and \f$p_2\f$, the local configuration is a quadrilateral +// [\f$p_0\f$, \f$p_1\f$, \f$p_2\f$, \f$q\f$] or two connected triangles [\f$q\f$, \f$p_0\f$, \f$p_1\f$] +// and [\f$q\f$, \f$p_1\f$, \f$p_2\f$]. When working in 3D, these triangles are not +// necessarily coplanar, in other words, they do not belong to the same common plane. +// When they are not coplanar, they can be made coplanar through the process called *flattening* (see the Figure above), +// however the latter introduces a distortion because the weights are computed with respect to the +// flattened configuration rather than to the original non-flat configuration. + +// \subsection Weights_Examples_ProjectionTraits Computing 2D Weights in 3D + +// If you have a 2D polygon in 3D plane that is not an XY plane, you can still compute +// the 2D weights, however you need to provide a special projection traits class. +// The common plane that is used in this example is projectable to the XY plane. We first +// compute `Mean_value_weights_2` for a 3D polygon in this plane. We then also show how to use +// the projection traits to compute the \ref PkgWeightsRefWachspressWeights "2D Wachspress weight" +// for 3D points which are not strictly coplanar. + +// \cgalExample{Weights/projection_traits.cpp} + +// Example of flattening: + +// 3D configuration. +// const Point_3 p0(0, 1, 1); +// const Point_3 p1(2, 0, 1); +// const Point_3 p2(7, 1, 1); +// const Point_3 q0(3, 1, 1); + +// Choose a type of the weight: +// e.g. 0 - Wachspress (WP) weight. +// const FT wp = FT(0); + +// Compute WP weights for q1 which is not on the plane [p0, p1, p2]. + +// Point_3 q1(3, 1, 2); +// std::cout << "3D wachspress (WP, q1): "; +// std::cout << CGAL::Weights::three_point_family_weight(p0, p1, p2, q1, wp) << std::endl; + +// Converge q1 towards q0 that is we flatten the configuration. +// We also compare the result with the authalic weight. + +// std::cout << "Converge q1 to q0: " << std::endl; +// for (FT x = FT(0); x <= FT(1); x += step) { +// std::cout << "3D wachspress/authalic: "; +// q1 = Point_3(3, 1, FT(2) - x); +// std::cout << CGAL::Weights::three_point_family_weight(p0, p1, p2, q1, wp) << "/"; +// std::cout << CGAL::Weights::authalic_weight(p0, p1, p2, q1) << std::endl; +// } + +// Flattens an arbitrary quad into a planar quad. +template +void flatten(const GeomTraits& traits, + const typename GeomTraits::Point_3& t, // prev neighbor/vertex/point + const typename GeomTraits::Point_3& r, // curr neighbor/vertex/point + const typename GeomTraits::Point_3& p, // next neighbor/vertex/point + const typename GeomTraits::Point_3& q, // query point + typename GeomTraits::Point_2& tf, + typename GeomTraits::Point_2& rf, + typename GeomTraits::Point_2& pf, + typename GeomTraits::Point_2& qf) +{ + // std::cout << std::endl; + using Point_3 = typename GeomTraits::Point_3; + using Vector_3 = typename GeomTraits::Vector_3; + + const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + const auto centroid_3 = traits.construct_centroid_3_object(); + + // Compute centroid. + const auto center = centroid_3(t, r, p, q); + // std::cout << "centroid: " << center << std::endl; + + // Translate. + const Point_3 t1 = Point_3(t.x() - center.x(), t.y() - center.y(), t.z() - center.z()); + const Point_3 r1 = Point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); + const Point_3 p1 = Point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); + const Point_3 q1 = Point_3(q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); + + // std::cout << "translated t1: " << t1 << std::endl; + // std::cout << "translated r1: " << r1 << std::endl; + // std::cout << "translated p1: " << p1 << std::endl; + // std::cout << "translated q1: " << q1 << std::endl; + + // Middle axis. + auto ax = construct_vector_3(q1, r1); + normalize_3(traits, ax); + + // Prev and next vectors. + auto v1 = construct_vector_3(q1, t1); + auto v2 = construct_vector_3(q1, p1); + + normalize_3(traits, v1); + normalize_3(traits, v2); + + // Two triangle normals. + auto n1 = cross_product_3(v1, ax); + auto n2 = cross_product_3(ax, v2); + + normalize_3(traits, n1); + normalize_3(traits, n2); + + // std::cout << "normal n1: " << n1 << std::endl; + // std::cout << "normal n2: " << n2 << std::endl; + + // Angle between two normals. + const double angle_rad = angle_3(traits, n1, n2); + // std::cout << "angle deg n1 <-> n2: " << angle_rad * 180.0 / CGAL_PI << std::endl; + + // Rotate p1 around ax so that it lands onto the plane [q1, t1, r1]. + const auto& t2 = t1; + const auto& r2 = r1; + const auto p2 = rotate_point_3(traits, angle_rad, ax, p1); + const auto& q2 = q1; + // std::cout << "rotated p2: " << p2 << std::endl; + + // Compute orthogonal base vectors. + Vector_3 b1, b2; + const auto& normal = n1; + orthogonal_bases_3(traits, normal, b1, b2); + + // const auto angle12 = angle_3(traits, b1, b2); + // std::cout << "angle deg b1 <-> b2: " << angle12 * 180.0 / CGAL_PI << std::endl; + + // Flatten a quad. + const auto& origin = q2; + tf = to_2d(traits, b1, b2, origin, t2); + rf = to_2d(traits, b1, b2, origin, r2); + pf = to_2d(traits, b1, b2, origin, p2); + qf = to_2d(traits, b1, b2, origin, q2); + + // std::cout << "flattened qf: " << qf << std::endl; + // std::cout << "flattened tf: " << tf << std::endl; + // std::cout << "flattened rf: " << rf << std::endl; + // std::cout << "flattened pf: " << pf << std::endl; + + // std::cout << "A1: " << area_2(traits, rf, qf, pf) << std::endl; + // std::cout << "A2: " << area_2(traits, pf, qf, rf) << std::endl; + // std::cout << "C: " << area_2(traits, tf, rf, pf) << std::endl; + // std::cout << "B: " << area_2(traits, pf, qf, tf) << std::endl; +} + +// Computes area of a 2D triangle. +template +typename GeomTraits::FT area_2(const GeomTraits& traits, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r) +{ + const auto area_2 = traits.compute_area_2_object(); + return area_2(p, q, r); +} + +// Computes positive area of a 2D triangle. +template +typename GeomTraits::FT positive_area_2(const GeomTraits& traits, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r) +{ + return CGAL::abs(area_2(traits, p, q, r)); +} + +// Computes area of a 3D triangle. +template +typename GeomTraits::FT area_3(const GeomTraits& traits, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r) +{ + using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; + using Vector_3 = typename GeomTraits::Vector_3; + + const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + const auto centroid_3 = traits.construct_centroid_3_object(); + + // Compute centroid. + const auto center = centroid_3(p, q, r); + + // Translate. + const Point_3 a = Point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); + const Point_3 b = Point_3(q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); + const Point_3 c = Point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); + + // Prev and next vectors. + auto v1 = construct_vector_3(b, a); + auto v2 = construct_vector_3(b, c); + normalize_3(traits, v1); + normalize_3(traits, v2); + + // Compute normal. + auto normal = cross_product_3(v1, v2); + normalize_3(traits, normal); + + // Compute orthogonal base vectors. + Vector_3 b1, b2; + orthogonal_bases_3(traits, normal, b1, b2); + + // Compute area. + const auto& origin = b; + const auto pf = to_2d(traits, b1, b2, origin, a); + const auto qf = to_2d(traits, b1, b2, origin, b); + const auto rf = to_2d(traits, b1, b2, origin, c); + + const FT A = area_2(traits, pf, qf, rf); + return A; +} + +// Computes positive area of a 3D triangle. +template +typename GeomTraits::FT positive_area_3(const GeomTraits& traits, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r) +{ + using FT = typename GeomTraits::FT; + + const auto construct_vector_3 = traits.construct_vector_3_object(); + const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + + const auto v1 = construct_vector_3(q, r); + const auto v2 = construct_vector_3(q, p); + + const auto cross = cross_product_3(v1, v2); + const FT half = FT(1) / FT(2); + const FT A = half * length_3(traits, cross); + return A; +} + +// Computes a clamped cotangent between two 3D vectors. +// In the old version of weights in PMP, it has been called secure. +// See Weights/internal/pmp_weights_deprecated.h for more information. +template +typename GeomTraits::FT cotangent_3_clamped(const GeomTraits& traits, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r) +{ + using FT = typename GeomTraits::FT; + using Get_sqrt = Get_sqrt; + const auto sqrt = Get_sqrt::sqrt_object(traits); + + const auto dot_product_3 = traits.compute_scalar_product_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + + const auto v1 = construct_vector_3(q, r); + const auto v2 = construct_vector_3(q, p); + + const FT dot = dot_product_3(v1, v2); + const FT length_v1 = length_3(traits, v1); + const FT length_v2 = length_3(traits, v2); + + const FT lb = -FT(999) / FT(1000), ub = FT(999) / FT(1000); + FT cosine = dot / length_v1 / length_v2; + cosine = (cosine < lb) ? lb : cosine; + cosine = (cosine > ub) ? ub : cosine; + const FT sine = sqrt(FT(1) - cosine * cosine); + + CGAL_assertion(sine != FT(0)); + if (sine != FT(0)) + return cosine / sine; + + return FT(0); // undefined +} } // namespace internal } // namespace Weights diff --git a/Weights/include/CGAL/Weights/inverse_distance_weights.h b/Weights/include/CGAL/Weights/inverse_distance_weights.h index 39dd22a189b..28fec763c5e 100644 --- a/Weights/include/CGAL/Weights/inverse_distance_weights.h +++ b/Weights/include/CGAL/Weights/inverse_distance_weights.h @@ -14,219 +14,215 @@ #ifndef CGAL_INVERSE_DISTANCE_WEIGHTS_H #define CGAL_INVERSE_DISTANCE_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace inverse_distance_ns { +/// \cond SKIP_IN_MANUAL +namespace inverse_distance_ns { - template - FT weight(const FT d) { +template +FT weight(const FT d) +{ + FT w = FT(0); + CGAL_precondition(d != FT(0)); + if (d != FT(0)) + w = FT(1) / d; - FT w = FT(0); - CGAL_precondition(d != FT(0)); - if (d != FT(0)) { - w = FT(1) / d; - } - return w; - } - } - /// \endcond + return w; +} - #if defined(DOXYGEN_RUNNING) +} // namespace inverse_distance_ns - /*! +/// \endcond + +#if defined(DOXYGEN_RUNNING) + +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 2D using the points `p` and `q`, given a traits class `traits` with geometric objects, predicates, and constructions. */ - template - typename GeomTraits::FT inverse_distance_weight( +template +typename GeomTraits::FT inverse_distance_weight( const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 3D using the points `p` and `q`, given a traits class `traits` with geometric objects, predicates, and constructions. */ - template - typename GeomTraits::FT inverse_distance_weight( +template +typename GeomTraits::FT inverse_distance_weight( const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 2D using the points `p` and `q`, which are parameterized by a `Kernel` K. */ - template - typename K::FT inverse_distance_weight( +template +typename K::FT inverse_distance_weight( const CGAL::Point_2&, const CGAL::Point_2& p, const CGAL::Point_2&, const CGAL::Point_2& q) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 3D using the points `p` and `q`, which are parameterized by a `Kernel` K. */ - template - typename K::FT inverse_distance_weight( +template +typename K::FT inverse_distance_weight( const CGAL::Point_3&, const CGAL::Point_3& p, const CGAL::Point_3&, const CGAL::Point_3& q) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 2D using the points `p` and `q`, given a traits class `traits` with geometric objects, predicates, and constructions. */ - template - typename GeomTraits::FT inverse_distance_weight( +template +typename GeomTraits::FT inverse_distance_weight( const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 3D using the points `p` and `q`, given a traits class `traits` with geometric objects, predicates, and constructions. */ - template - typename GeomTraits::FT inverse_distance_weight( +template +typename GeomTraits::FT inverse_distance_weight( const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 2D using the points `p` and `q`, which are parameterized by a `Kernel` K. */ - template - typename K::FT inverse_distance_weight( +template +typename K::FT inverse_distance_weight( const CGAL::Point_2& p, const CGAL::Point_2& q) { } - /*! +/*! \ingroup PkgWeightsRefInverseDistanceWeights \brief computes the inverse distance weight in 3D using the points `p` and `q`, which are parameterized by a `Kernel` K. */ - template - typename K::FT inverse_distance_weight( +template +typename K::FT inverse_distance_weight( const CGAL::Point_3& p, const CGAL::Point_3& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const FT d = internal::distance_2(traits, q, r); - return inverse_distance_ns::weight(d); - } + const FT d = internal::distance_2(traits, q, r); + return inverse_distance_ns::weight(d); +} - template - typename GeomTraits::FT inverse_distance_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { +template +typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return inverse_distance_weight(t, r, p, q, traits); +} - const GeomTraits traits; - return inverse_distance_weight(t, r, p, q, traits); - } +template +typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + typename GeomTraits::Point_2 stub; + return inverse_distance_weight(stub, p, stub, q, traits); +} - template - typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { +template +typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + CGAL::Point_2 stub; + return inverse_distance_weight(stub, p, stub, q); +} - typename GeomTraits::Point_2 stub; - return inverse_distance_weight(stub, p, stub, q, traits); - } +template +typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - template - typename GeomTraits::FT inverse_distance_weight( - const CGAL::Point_2& p, - const CGAL::Point_2& q) { + const FT d = internal::distance_3(traits, q, r); + return inverse_distance_ns::weight(d); +} - CGAL::Point_2 stub; - return inverse_distance_weight(stub, p, stub, q); - } +template +typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return inverse_distance_weight(t, r, p, q, traits); +} - template - typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { +template +typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + typename GeomTraits::Point_3 stub; + return inverse_distance_weight(stub, p, stub, q, traits); +} - using FT = typename GeomTraits::FT; - const FT d = internal::distance_3(traits, q, r); - return inverse_distance_ns::weight(d); - } +template +typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + CGAL::Point_3 stub; + return inverse_distance_weight(stub, p, stub, q); +} - template - typename GeomTraits::FT inverse_distance_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - - const GeomTraits traits; - return inverse_distance_weight(t, r, p, q, traits); - } - - template - typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - typename GeomTraits::Point_3 stub; - return inverse_distance_weight(stub, p, stub, q, traits); - } - - template - typename GeomTraits::FT inverse_distance_weight( - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - - CGAL::Point_3 stub; - return inverse_distance_weight(stub, p, stub, q); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/mean_value_weights.h b/Weights/include/CGAL/Weights/mean_value_weights.h index 814ba883608..810294355ac 100644 --- a/Weights/include/CGAL/Weights/mean_value_weights.h +++ b/Weights/include/CGAL/Weights/mean_value_weights.h @@ -14,498 +14,466 @@ #ifndef CGAL_MEAN_VALUE_WEIGHTS_H #define CGAL_MEAN_VALUE_WEIGHTS_H -// Internal includes. #include #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace mean_value_ns { +/// \cond SKIP_IN_MANUAL +namespace mean_value_ns { - template - FT sign_of_weight(const FT A1, const FT A2, const FT B) { +template +FT sign_of_weight(const FT A1, const FT A2, const FT B) +{ + if (A1 > FT(0) && A2 > FT(0) && B <= FT(0)) + return +FT(1); - if (A1 > FT(0) && A2 > FT(0) && B <= FT(0)) { - return +FT(1); - } - if (A1 < FT(0) && A2 < FT(0) && B >= FT(0)) { - return -FT(1); - } - if (B > FT(0)) { - return +FT(1); - } - if (B < FT(0)) { - return -FT(1); - } - return FT(0); - } + if (A1 < FT(0) && A2 < FT(0) && B >= FT(0)) + return -FT(1); - template - typename GeomTraits::FT weight( - const GeomTraits& traits, - const typename GeomTraits::FT r1, - const typename GeomTraits::FT r2, - const typename GeomTraits::FT r3, - const typename GeomTraits::FT D1, - const typename GeomTraits::FT D2, - const typename GeomTraits::FT D, - const typename GeomTraits::FT sign) { + if (B > FT(0)) + return +FT(1); - using FT = typename GeomTraits::FT; - using Get_sqrt = internal::Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + if (B < FT(0)) + return -FT(1); - const FT P1 = r1 * r2 + D1; - const FT P2 = r2 * r3 + D2; + return FT(0); +} - FT w = FT(0); - CGAL_precondition(P1 != FT(0) && P2 != FT(0)); - const FT prod = P1 * P2; - if (prod != FT(0)) { - const FT inv = FT(1) / prod; - w = FT(2) * (r1 * r3 - D) * inv; - CGAL_assertion(w >= FT(0)); - w = sqrt(w); - } - w *= FT(2); w *= sign; - return w; - } +template +typename GeomTraits::FT weight(const GeomTraits& traits, + const typename GeomTraits::FT r1, + const typename GeomTraits::FT r2, + const typename GeomTraits::FT r3, + const typename GeomTraits::FT D1, + const typename GeomTraits::FT D2, + const typename GeomTraits::FT D, + const typename GeomTraits::FT sign) +{ + using FT = typename GeomTraits::FT; + + using Get_sqrt = internal::Get_sqrt; + const auto sqrt = Get_sqrt::sqrt_object(traits); + + const FT P1 = r1 * r2 + D1; + const FT P2 = r2 * r3 + D2; + + FT w = FT(0); + CGAL_precondition(P1 != FT(0) && P2 != FT(0)); + const FT prod = P1 * P2; + if (prod != FT(0)) + { + const FT inv = FT(1) / prod; + w = FT(2) * (r1 * r3 - D) * inv; + CGAL_assertion(w >= FT(0)); + w = sqrt(w); } - /// \endcond - #if defined(DOXYGEN_RUNNING) + w *= FT(2); w *= sign; + return w; +} - /*! - \ingroup PkgWeightsRefMeanValueWeights +} // namespace mean_value_ns - \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT mean_value_weight( +/// \endcond + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefMeanValueWeights + + \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT mean_value_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefMeanValueWeights +/*! + \ingroup PkgWeightsRefMeanValueWeights - \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT mean_value_weight( + \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT mean_value_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING + +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + + const auto dot_product_2 = traits.compute_scalar_product_2_object(); + const auto construct_vector_2 = traits.construct_vector_2_object(); + + const auto v1 = construct_vector_2(q, t); + const auto v2 = construct_vector_2(q, r); + const auto v3 = construct_vector_2(q, p); + + const FT l1 = internal::length_2(traits, v1); + const FT l2 = internal::length_2(traits, v2); + const FT l3 = internal::length_2(traits, v3); + + const FT D1 = dot_product_2(v1, v2); + const FT D2 = dot_product_2(v2, v3); + const FT D = dot_product_2(v1, v3); + + const FT A1 = internal::area_2(traits, r, q, t); + const FT A2 = internal::area_2(traits, p, q, r); + const FT B = internal::area_2(traits, p, q, t); + + const FT sign = mean_value_ns::sign_of_weight(A1, A2, B); + return mean_value_ns::weight(traits, l1, l2, l3, D1, D2, D, sign); +} + +template +typename GeomTraits::FT mean_value_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return mean_value_weight(t, r, p, q, traits); +} + +namespace internal { + +template +typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using Point_2 = typename GeomTraits::Point_2; + Point_2 tf, rf, pf, qf; + internal::flatten(traits, + t, r, p, q, + tf, rf, pf, qf); + return CGAL::Weights::mean_value_weight(tf, rf, pf, qf, traits); +} + +template +typename GeomTraits::FT mean_value_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return mean_value_weight(t, r, p, q, traits); +} + +} // namespace internal + +/// \endcond + +/*! + \ingroup PkgWeightsRefBarycentricMeanValueWeights + + \brief 2D mean value weights for polygons. + + This class implements 2D mean value weights ( \cite cgal:bc:hf-mvcapp-06, + \cite cgal:bc:fhk-gcbcocp-06, \cite cgal:f-mvc-03 ) which can be computed + at any point inside and outside a simple polygon. + + Mean value weights are well-defined inside and outside a simple polygon and are + non-negative in the kernel of a star-shaped polygon. These weights are computed + analytically using the formulation from the `tangent_weight()`. + + \tparam VertexRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` + \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and + value type is `Point_2`. The default is `CGAL::Identity_property_map`. + + \cgalModels `BarycentricWeights_2` +*/ +template > +class Mean_value_weights_2 +{ +public: + /// \name Types + /// @{ /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT mean_value_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { - - using FT = typename GeomTraits::FT; - const auto dot_product_2 = - traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = - traits.construct_vector_2_object(); - - const auto v1 = construct_vector_2(q, t); - const auto v2 = construct_vector_2(q, r); - const auto v3 = construct_vector_2(q, p); - - const FT l1 = internal::length_2(traits, v1); - const FT l2 = internal::length_2(traits, v2); - const FT l3 = internal::length_2(traits, v3); - - const FT D1 = dot_product_2(v1, v2); - const FT D2 = dot_product_2(v2, v3); - const FT D = dot_product_2(v1, v3); - - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT B = internal::area_2(traits, p, q, t); - - const FT sign = mean_value_ns::sign_of_weight(A1, A2, B); - return mean_value_ns::weight( - traits, l1, l2, l3, D1, D2, D, sign); - } - - template - typename GeomTraits::FT mean_value_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { - - const GeomTraits traits; - return mean_value_weight(t, r, p, q, traits); - } - - namespace internal { - - template - typename GeomTraits::FT mean_value_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten( - traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights:: - mean_value_weight(tf, rf, pf, qf, traits); - } - - template - typename GeomTraits::FT mean_value_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - - const GeomTraits traits; - return mean_value_weight(t, r, p, q, traits); - } - - } // namespace internal + using Vertex_range = VertexRange; + using Geom_traits = GeomTraits; + using Point_map = PointMap; + using Vector_2 = typename GeomTraits::Vector_2; + using Area_2 = typename GeomTraits::Compute_area_2; + using Construct_vector_2 = typename GeomTraits::Construct_vector_2; + using Squared_length_2 = typename GeomTraits::Compute_squared_length_2; + using Scalar_product_2 = typename GeomTraits::Compute_scalar_product_2; + using Get_sqrt = internal::Get_sqrt; + using Sqrt = typename Get_sqrt::Sqrt; /// \endcond - /*! - \ingroup PkgWeightsRefBarycentricMeanValueWeights + /// Number type. + typedef typename GeomTraits::FT FT; - \brief 2D mean value weights for polygons. + /// Point type. + typedef typename GeomTraits::Point_2 Point_2; - This class implements 2D mean value weights ( \cite cgal:bc:hf-mvcapp-06, - \cite cgal:bc:fhk-gcbcocp-06, \cite cgal:f-mvc-03 ) which can be computed - at any point inside and outside a simple polygon. + /// @} - Mean value weights are well-defined inside and outside a simple polygon and are - non-negative in the kernel of a star-shaped polygon. These weights are computed - analytically using the formulation from the `tangent_weight()`. - - \tparam VertexRange - a model of `ConstRange` whose iterator type is `RandomAccessIterator` - - \tparam GeomTraits - a model of `AnalyticWeightTraits_2` - - \tparam PointMap - a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and - value type is `Point_2`. The default is `CGAL::Identity_property_map`. - - \cgalModels `BarycentricWeights_2` - */ - template< - typename VertexRange, - typename GeomTraits, - typename PointMap = CGAL::Identity_property_map > - class Mean_value_weights_2 { - - public: - - /// \name Types - /// @{ - - /// \cond SKIP_IN_MANUAL - using Vertex_range = VertexRange; - using Geom_traits = GeomTraits; - using Point_map = PointMap; - - using Vector_2 = typename GeomTraits::Vector_2; - using Area_2 = typename GeomTraits::Compute_area_2; - using Construct_vector_2 = typename GeomTraits::Construct_vector_2; - using Squared_length_2 = typename GeomTraits::Compute_squared_length_2; - using Scalar_product_2 = typename GeomTraits::Compute_scalar_product_2; - using Get_sqrt = internal::Get_sqrt; - using Sqrt = typename Get_sqrt::Sqrt; - /// \endcond - - /// Number type. - typedef typename GeomTraits::FT FT; - - /// Point type. - typedef typename GeomTraits::Point_2 Point_2; - - /// @} - - /// \name Initialization - /// @{ - - /*! - \brief initializes all internal data structures. - - This class implements the behavior of mean value weights - for 2D query points inside simple polygons. - - \param polygon - an instance of `VertexRange` with the vertices of a simple polygon - - \param traits - a traits class with geometric objects, predicates, and constructions; - the default initialization is provided - - \param point_map - an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; - the default initialization is provided - - \pre polygon.size() >= 3 - \pre polygon is simple - */ - Mean_value_weights_2( - const VertexRange& polygon, - const GeomTraits traits = GeomTraits(), - const PointMap point_map = PointMap()) : - m_polygon(polygon), - m_traits(traits), - m_point_map(point_map), - m_area_2(m_traits.compute_area_2_object()), - m_construct_vector_2(m_traits.construct_vector_2_object()), - m_squared_length_2(m_traits.compute_squared_length_2_object()), - m_scalar_product_2(m_traits.compute_scalar_product_2_object()), - m_sqrt(Get_sqrt::sqrt_object(m_traits)) { - - CGAL_precondition( - polygon.size() >= 3); - CGAL_precondition( - internal::is_simple_2(polygon, traits, point_map)); - resize(); - } - - /// @} - - /// \name Access - /// @{ - - /*! - \brief computes 2D mean value weights. - - This function fills a destination range with 2D mean value weights computed at - the `query` point with respect to the vertices of the input polygon. - - The number of computed weights is equal to the number of polygon vertices. - - \tparam OutIterator - a model of `OutputIterator` whose value type is `FT` - - \param query - a query point - - \param w_begin - the beginning of the destination range with the computed weights - - \return an output iterator to the element in the destination range, - one past the last weight stored - */ - template - OutIterator operator()(const Point_2& query, OutIterator w_begin) { - const bool normalize = false; - return operator()(query, w_begin, normalize); - } - - /// @} - - /// \cond SKIP_IN_MANUAL - template - OutIterator operator()(const Point_2& query, OutIterator weights, const bool normalize) { - return optimal_weights(query, weights, normalize); - } - /// \endcond - - private: - - // Fields. - const VertexRange& m_polygon; - const GeomTraits m_traits; - const PointMap m_point_map; - - const Area_2 m_area_2; - const Construct_vector_2 m_construct_vector_2; - const Squared_length_2 m_squared_length_2; - const Scalar_product_2 m_scalar_product_2; - const Sqrt m_sqrt; - - std::vector s; - std::vector r; - std::vector A; - std::vector D; - std::vector t; - std::vector w; - - // Functions. - void resize() { - s.resize(m_polygon.size()); - r.resize(m_polygon.size()); - A.resize(m_polygon.size()); - D.resize(m_polygon.size()); - t.resize(m_polygon.size()); - w.resize(m_polygon.size()); - } - - template - OutputIterator optimal_weights( - const Point_2& query, OutputIterator weights, const bool normalize) { - - // Get the number of vertices in the polygon. - const std::size_t n = m_polygon.size(); - - // Compute vectors s following the pseudo-code in the Figure 10 from [1]. - for (std::size_t i = 0; i < n; ++i) { - const auto& pi = get(m_point_map, *(m_polygon.begin() + i)); - s[i] = m_construct_vector_2(query, pi); - } - - // Compute lengths r, areas A, and dot products D following the pseudo-code - // in the Figure 10 from [1]. Split the loop to make this computation faster. - const auto& p1 = get(m_point_map, *(m_polygon.begin() + 0)); - const auto& p2 = get(m_point_map, *(m_polygon.begin() + 1)); - - r[0] = m_sqrt(m_squared_length_2(s[0])); - A[0] = m_area_2(p1, p2, query); - D[0] = m_scalar_product_2(s[0], s[1]); - - for (std::size_t i = 1; i < n - 1; ++i) { - const auto& pi1 = get(m_point_map, *(m_polygon.begin() + (i + 0))); - const auto& pi2 = get(m_point_map, *(m_polygon.begin() + (i + 1))); - - r[i] = m_sqrt(m_squared_length_2(s[i])); - A[i] = m_area_2(pi1, pi2, query); - D[i] = m_scalar_product_2(s[i], s[i + 1]); - } - - const auto& pn = get(m_point_map, *(m_polygon.begin() + (n - 1))); - r[n - 1] = m_sqrt(m_squared_length_2(s[n - 1])); - A[n - 1] = m_area_2(pn, p1, query); - D[n - 1] = m_scalar_product_2(s[n - 1], s[0]); - - // Compute intermediate values t using the formulas from slide 19 here - // - http://www.inf.usi.ch/hormann/nsfworkshop/presentations/Hormann.pdf - for (std::size_t i = 0; i < n - 1; ++i) { - CGAL_assertion((r[i] * r[i + 1] + D[i]) != FT(0)); - t[i] = FT(2) * A[i] / (r[i] * r[i + 1] + D[i]); - } - - CGAL_assertion((r[n - 1] * r[0] + D[n - 1]) != FT(0)); - t[n - 1] = FT(2) * A[n - 1] / (r[n - 1] * r[0] + D[n - 1]); - - // Compute mean value weights using the same pseudo-code as before. - CGAL_assertion(r[0] != FT(0)); - w[0] = FT(2) * (t[n - 1] + t[0]) / r[0]; - - for (std::size_t i = 1; i < n - 1; ++i) { - CGAL_assertion(r[i] != FT(0)); - w[i] = FT(2) * (t[i - 1] + t[i]) / r[i]; - } - - CGAL_assertion(r[n - 1] != FT(0)); - w[n - 1] = FT(2) * (t[n - 2] + t[n - 1]) / r[n - 1]; - - // Normalize if necessary. - if (normalize) { - internal::normalize(w); - } - - // Return weights. - for (std::size_t i = 0; i < n; ++i) { - *(weights++) = w[i]; - } - return weights; - } - }; + /// \name Initialization + /// @{ /*! - \ingroup PkgWeightsRefBarycentricMeanValueWeights + \brief initializes all internal data structures. - \brief computes 2D mean value weights for polygons. + This class implements the behavior of mean value weights + for 2D query points inside simple polygons. - This function computes 2D mean value weights at a given `query` point - with respect to the vertices of a simple `polygon`, that is one - weight per vertex. The weights are stored in a destination range - beginning at `w_begin`. - - Internally, the class `Mean_value_weights_2` is used. If one wants to process - multiple query points, it is better to use that class. When using the free function, - internal memory is allocated for each query point, while when using the class, - it is allocated only once which is much more efficient. However, for a few query - points, it is easier to use this function. It can also be used when the processing - time is not a concern. - - \tparam PointRange - a model of `ConstRange` whose iterator type is `RandomAccessIterator` - and value type is `GeomTraits::Point_2` - - \tparam OutIterator - a model of `OutputIterator` whose value type is `GeomTraits::FT` - - \tparam GeomTraits - a model of `AnalyticWeightTraits_2` - - \param polygon - an instance of `PointRange` with 2D points which form a simple polygon - - \param query - a query point - - \param w_begin - the beginning of the destination range with the computed weights - - \param traits - a traits class with geometric objects, predicates, and constructions; - this parameter can be omitted if the traits class can be deduced from the point type - - \return an output iterator to the element in the destination range, - one past the last weight stored + \param polygon an instance of `VertexRange` with the vertices of a simple polygon + \param traits a traits class with geometric objects, predicates, and constructions; + the default initialization is provided + \param point_map an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; + the default initialization is provided \pre polygon.size() >= 3 \pre polygon is simple */ - template< - typename PointRange, - typename OutIterator, - typename GeomTraits> - OutIterator mean_value_weights_2( - const PointRange& polygon, const typename GeomTraits::Point_2& query, - OutIterator w_begin, const GeomTraits& traits) { - - Mean_value_weights_2 - mean_value(polygon, traits); - return mean_value(query, w_begin); + Mean_value_weights_2(const VertexRange& polygon, + const GeomTraits traits = GeomTraits(), + const PointMap point_map = PointMap()) + : m_polygon(polygon), + m_traits(traits), + m_point_map(point_map), + m_area_2(m_traits.compute_area_2_object()), + m_construct_vector_2(m_traits.construct_vector_2_object()), + m_squared_length_2(m_traits.compute_squared_length_2_object()), + m_scalar_product_2(m_traits.compute_scalar_product_2_object()), + m_sqrt(Get_sqrt::sqrt_object(m_traits)) + { + CGAL_precondition(polygon.size() >= 3); + CGAL_precondition(internal::is_simple_2(polygon, traits, point_map)); + resize(); } + /// @} + + /// \name Access + /// @{ + + /*! + \brief computes 2D mean value weights. + + This function fills a destination range with 2D mean value weights computed at + the `query` point with respect to the vertices of the input polygon. + + The number of computed weights is equal to the number of polygon vertices. + + \tparam OutIterator a model of `OutputIterator` whose value type is `FT` + + \param query a query point + \param w_begin the beginning of the destination range with the computed weights + + \return an output iterator to the element in the destination range, one past the last weight stored + */ + template + OutIterator operator()(const Point_2& query, OutIterator w_begin) + { + const bool normalize = false; + return operator()(query, w_begin, normalize); + } + + /// @} + /// \cond SKIP_IN_MANUAL - template< - typename PointRange, - typename OutIterator> - OutIterator mean_value_weights_2( - const PointRange& polygon, - const typename PointRange::value_type& query, - OutIterator w_begin) { - - using Point_2 = typename PointRange::value_type; - using GeomTraits = typename Kernel_traits::Kernel; - const GeomTraits traits; - return mean_value_weights_2( - polygon, query, w_begin, traits); + template + OutIterator operator()(const Point_2& query, + OutIterator weights, + const bool normalize) + { + return optimal_weights(query, weights, normalize); } + /// \endcond +private: + const VertexRange& m_polygon; + const GeomTraits m_traits; + const PointMap m_point_map; + + const Area_2 m_area_2; + const Construct_vector_2 m_construct_vector_2; + const Squared_length_2 m_squared_length_2; + const Scalar_product_2 m_scalar_product_2; + const Sqrt m_sqrt; + + std::vector s; + std::vector r; + std::vector A; + std::vector D; + std::vector t; + std::vector w; + + void resize() + { + s.resize(m_polygon.size()); + r.resize(m_polygon.size()); + A.resize(m_polygon.size()); + D.resize(m_polygon.size()); + t.resize(m_polygon.size()); + w.resize(m_polygon.size()); + } + + template + OutputIterator optimal_weights(const Point_2& query, + OutputIterator weights, + const bool normalize) + { + const std::size_t n = m_polygon.size(); + + // Compute vectors s following the pseudo-code in the Figure 10 from [1]. + for (std::size_t i = 0; i < n; ++i) + { + const auto& pi = get(m_point_map, *(m_polygon.begin() + i)); + s[i] = m_construct_vector_2(query, pi); + } + + // Compute lengths r, areas A, and dot products D following the pseudo-code + // in the Figure 10 from [1]. Split the loop to make this computation faster. + const auto& p1 = get(m_point_map, *(m_polygon.begin() + 0)); + const auto& p2 = get(m_point_map, *(m_polygon.begin() + 1)); + + r[0] = m_sqrt(m_squared_length_2(s[0])); + A[0] = m_area_2(p1, p2, query); + D[0] = m_scalar_product_2(s[0], s[1]); + + for (std::size_t i = 1; i < n - 1; ++i) + { + const auto& pi1 = get(m_point_map, *(m_polygon.begin() + (i + 0))); + const auto& pi2 = get(m_point_map, *(m_polygon.begin() + (i + 1))); + + r[i] = m_sqrt(m_squared_length_2(s[i])); + A[i] = m_area_2(pi1, pi2, query); + D[i] = m_scalar_product_2(s[i], s[i + 1]); + } + + const auto& pn = get(m_point_map, *(m_polygon.begin() + (n - 1))); + r[n - 1] = m_sqrt(m_squared_length_2(s[n - 1])); + A[n - 1] = m_area_2(pn, p1, query); + D[n - 1] = m_scalar_product_2(s[n - 1], s[0]); + + // Compute intermediate values t using the formulas from slide 19 here + // - http://www.inf.usi.ch/hormann/nsfworkshop/presentations/Hormann.pdf + for (std::size_t i = 0; i < n - 1; ++i) + { + CGAL_assertion((r[i] * r[i + 1] + D[i]) != FT(0)); + t[i] = FT(2) * A[i] / (r[i] * r[i + 1] + D[i]); + } + + CGAL_assertion((r[n - 1] * r[0] + D[n - 1]) != FT(0)); + t[n - 1] = FT(2) * A[n - 1] / (r[n - 1] * r[0] + D[n - 1]); + + // Compute mean value weights using the same pseudo-code as before. + CGAL_assertion(r[0] != FT(0)); + w[0] = FT(2) * (t[n - 1] + t[0]) / r[0]; + + for (std::size_t i = 1; i < n - 1; ++i) + { + CGAL_assertion(r[i] != FT(0)); + w[i] = FT(2) * (t[i - 1] + t[i]) / r[i]; + } + + CGAL_assertion(r[n - 1] != FT(0)); + w[n - 1] = FT(2) * (t[n - 2] + t[n - 1]) / r[n - 1]; + + // Normalize if necessary. + if (normalize) + internal::normalize(w); + + // Return weights. + for (std::size_t i = 0; i < n; ++i) + *(weights++) = w[i]; + + return weights; + } +}; + +/*! + \ingroup PkgWeightsRefBarycentricMeanValueWeights + + \brief computes 2D mean value weights for polygons. + + This function computes 2D mean value weights at a given `query` point + with respect to the vertices of a simple `polygon`, that is one + weight per vertex. The weights are stored in a destination range + beginning at `w_begin`. + + Internally, the class `Mean_value_weights_2` is used. If one wants to process + multiple query points, it is better to use that class. When using the free function, + internal memory is allocated for each query point, while when using the class, + it is allocated only once which is much more efficient. However, for a few query + points, it is easier to use this function. It can also be used when the processing + time is not a concern. + + \tparam PointRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` + and value type is `GeomTraits::Point_2` + \tparam OutIterator a model of `OutputIterator` whose value type is `GeomTraits::FT` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` + + \param polygon an instance of `PointRange` with 2D points which form a simple polygon + \param query a query point + \param w_begin the beginning of the destination range with the computed weights + \param traits a traits class with geometric objects, predicates, and constructions; + this parameter can be omitted if the traits class can be deduced from the point type + + \return an output iterator to the element in the destination range, + one past the last weight stored + + \pre polygon.size() >= 3 + \pre polygon is simple +*/ +template +OutIterator mean_value_weights_2(const PointRange& polygon, + const typename GeomTraits::Point_2& query, + OutIterator w_begin, + const GeomTraits& traits) +{ + Mean_value_weights_2 mean_value(polygon, traits); + return mean_value(query, w_begin); +} + +/// \cond SKIP_IN_MANUAL + +template +OutIterator mean_value_weights_2(const PointRange& polygon, + const typename PointRange::value_type& query, + OutIterator w_begin) +{ + using Point_2 = typename PointRange::value_type; + using GeomTraits = typename Kernel_traits::Kernel; + + const GeomTraits traits; + return mean_value_weights_2(polygon, query, w_begin, traits); +} + +/// \endcond + } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h index 579e8efda77..0dafc0f198c 100644 --- a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h @@ -14,157 +14,147 @@ #ifndef CGAL_MIXED_VORONOI_REGION_WEIGHTS_H #define CGAL_MIXED_VORONOI_REGION_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - #if defined(DOXYGEN_RUNNING) +#if defined(DOXYGEN_RUNNING) - /*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights - \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT mixed_voronoi_area( + \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT mixed_voronoi_area( const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights - \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT mixed_voronoi_area( + \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT mixed_voronoi_area( const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights - \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT mixed_voronoi_area( + \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT mixed_voronoi_area( const CGAL::Point_2& p, const CGAL::Point_2& q, const CGAL::Point_2& r) { } - /*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights - \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT mixed_voronoi_area( + \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT mixed_voronoi_area( const CGAL::Point_3& p, const CGAL::Point_3& q, const CGAL::Point_3& r) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT mixed_voronoi_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; - using FT = typename GeomTraits::FT; - using Point_2 = typename GeomTraits::Point_2; + const auto angle_2 = traits.angle_2_object(); + const auto midpoint_2 = traits.construct_midpoint_2_object(); + const auto circumcenter_2 = traits.construct_circumcenter_2_object(); - const auto angle_2 = - traits.angle_2_object(); - const auto a1 = angle_2(p, q, r); - const auto a2 = angle_2(q, r, p); - const auto a3 = angle_2(r, p, q); + const auto a1 = angle_2(p, q, r); + const auto a2 = angle_2(q, r, p); + const auto a3 = angle_2(r, p, q); - Point_2 center; - const auto midpoint_2 = - traits.construct_midpoint_2_object(); - if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) { - const auto circumcenter_2 = - traits.construct_circumcenter_2_object(); - center = circumcenter_2(p, q, r); - } else { - center = midpoint_2(r, p); - } + Point_2 center; + if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) + center = circumcenter_2(p, q, r); + else + center = midpoint_2(r, p); - const auto m1 = midpoint_2(q, r); - const auto m2 = midpoint_2(q, p); + const auto m1 = midpoint_2(q, r); + const auto m2 = midpoint_2(q, p); - const FT A1 = internal::positive_area_2(traits, q, m1, center); - const FT A2 = internal::positive_area_2(traits, q, center, m2); - return A1 + A2; - } + const FT A1 = internal::positive_area_2(traits, q, m1, center); + const FT A2 = internal::positive_area_2(traits, q, center, m2); + return A1 + A2; +} - template - typename GeomTraits::FT mixed_voronoi_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT mixed_voronoi_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return mixed_voronoi_area(p, q, r, traits); +} - const GeomTraits traits; - return mixed_voronoi_area(p, q, r, traits); - } +template +typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; - template - typename GeomTraits::FT mixed_voronoi_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { + const auto angle_3 = traits.angle_3_object(); + const auto midpoint_3 = traits.construct_midpoint_3_object(); + const auto circumcenter_3 = traits.construct_circumcenter_3_object(); - using FT = typename GeomTraits::FT; - using Point_3 = typename GeomTraits::Point_3; + const auto a1 = angle_3(p, q, r); + const auto a2 = angle_3(q, r, p); + const auto a3 = angle_3(r, p, q); - const auto angle_3 = - traits.angle_3_object(); - const auto a1 = angle_3(p, q, r); - const auto a2 = angle_3(q, r, p); - const auto a3 = angle_3(r, p, q); + Point_3 center; + if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) + center = circumcenter_3(p, q, r); + else + center = midpoint_3(r, p); - Point_3 center; - const auto midpoint_3 = - traits.construct_midpoint_3_object(); - if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) { - const auto circumcenter_3 = - traits.construct_circumcenter_3_object(); - center = circumcenter_3(p, q, r); - } else { - center = midpoint_3(r, p); - } + const auto m1 = midpoint_3(q, r); + const auto m2 = midpoint_3(q, p); - const auto m1 = midpoint_3(q, r); - const auto m2 = midpoint_3(q, p); + const FT A1 = internal::positive_area_3(traits, q, m1, center); + const FT A2 = internal::positive_area_3(traits, q, center, m2); + return A1 + A2; +} - const FT A1 = internal::positive_area_3(traits, q, m1, center); - const FT A2 = internal::positive_area_3(traits, q, center, m2); - return A1 + A2; - } +template +typename GeomTraits::FT mixed_voronoi_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return mixed_voronoi_area(p, q, r, traits); +} - template - typename GeomTraits::FT mixed_voronoi_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - return mixed_voronoi_area(p, q, r, traits); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/shepard_weights.h b/Weights/include/CGAL/Weights/shepard_weights.h index 0a9fb5f8494..00e21883d21 100644 --- a/Weights/include/CGAL/Weights/shepard_weights.h +++ b/Weights/include/CGAL/Weights/shepard_weights.h @@ -14,46 +14,49 @@ #ifndef CGAL_SHEPARD_WEIGHTS_H #define CGAL_SHEPARD_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace shepard_ns { +/// \cond SKIP_IN_MANUAL +namespace shepard_ns { - template - typename GeomTraits::FT weight( - const GeomTraits& traits, - const typename GeomTraits::FT d, - const typename GeomTraits::FT p) { +template +typename GeomTraits::FT weight(const GeomTraits& traits, + const typename GeomTraits::FT d, + const typename GeomTraits::FT p) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - FT w = FT(0); - CGAL_precondition(d != FT(0)); - if (d != FT(0)) { - FT denom = d; - if (p != FT(1)) { - denom = internal::power(traits, d, p); - } - w = FT(1) / denom; - } - return w; - } + FT w = FT(0); + CGAL_precondition(d != FT(0)); + if (d != FT(0)) + { + FT denom = d; + if (p != FT(1)) + denom = internal::power(traits, d, p); + + w = FT(1) / denom; } - /// \endcond - #if defined(DOXYGEN_RUNNING) + return w; +} - /*! - \ingroup PkgWeightsRefShepardWeights +} // namespace shepard_ns - \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT shepard_weight( +/// \endcond + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefShepardWeights + + \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`, + given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT shepard_weight( const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2&, @@ -61,14 +64,14 @@ namespace Weights { const typename GeomTraits::FT a, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT shepard_weight( + \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`, + given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT shepard_weight( const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3&, @@ -76,189 +79,179 @@ namespace Weights { const typename GeomTraits::FT a, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 2D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. - */ - template - typename K::FT shepard_weight( + \brief computes the Shepard weight in 2D using the points `p` and `q`, + which are parameterized by a `Kernel` K, and the power parameter `a` which + can be omitted. +*/ +template +typename K::FT shepard_weight( const CGAL::Point_2&, const CGAL::Point_2& p, const CGAL::Point_2&, const CGAL::Point_2& q, const typename K::FT a = typename K::FT(1)) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 3D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. - */ - template - typename K::FT shepard_weight( + \brief computes the Shepard weight in 3D using the points `p` and `q`, + which are parameterized by a `Kernel` K, and the power parameter `a` which + can be omitted. +*/ +template +typename K::FT shepard_weight( const CGAL::Point_3&, const CGAL::Point_3& p, const CGAL::Point_3&, const CGAL::Point_3& q, const typename K::FT a = typename K::FT(1)) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT shepard_weight( + \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`, + given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT shepard_weight( const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const typename GeomTraits::FT a, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT shepard_weight( + \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`, + given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT shepard_weight( const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::FT a, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 2D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. - */ - template - typename K::FT shepard_weight( + \brief computes the Shepard weight in 2D using the points `p` and `q`, + which are parameterized by a `Kernel` K, and the power parameter `a` which + can be omitted. +*/ +template +typename K::FT shepard_weight( const CGAL::Point_2& p, const CGAL::Point_2& q, const typename K::FT a = typename K::FT(1)) { } - /*! - \ingroup PkgWeightsRefShepardWeights +/*! + \ingroup PkgWeightsRefShepardWeights - \brief computes the Shepard weight in 3D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. - */ - template - typename K::FT shepard_weight( + \brief computes the Shepard weight in 3D using the points `p` and `q`, + which are parameterized by a `Kernel` K, and the power parameter `a` which + can be omitted. +*/ +template +typename K::FT shepard_weight( const CGAL::Point_3& p, const CGAL::Point_3& q, const typename K::FT a = typename K::FT(1)) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::FT a, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const FT d = internal::distance_2(traits, q, r); - return shepard_ns::weight(traits, d, a); - } + const FT d = internal::distance_2(traits, q, r); + return shepard_ns::weight(traits, d, a); +} - template - typename GeomTraits::FT shepard_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename GeomTraits::FT a = - typename GeomTraits::FT(1)) { +template +typename GeomTraits::FT shepard_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q, + const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +{ + const GeomTraits traits; + return shepard_weight(t, r, p, q, a, traits); +} - const GeomTraits traits; - return shepard_weight(t, r, p, q, a, traits); - } +template +typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::FT a, + const GeomTraits& traits) +{ + typename GeomTraits::Point_2 stub; + return shepard_weight(stub, p, stub, q, a, traits); +} - template - typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { +template +typename GeomTraits::FT shepard_weight(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +{ + CGAL::Point_2 stub; + return shepard_weight(stub, p, stub, q, a); +} - typename GeomTraits::Point_2 stub; - return shepard_weight(stub, p, stub, q, a, traits); - } +template +typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::FT a, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + const FT d = internal::distance_3(traits, q, r); + return shepard_ns::weight(traits, d, a); +} - template - typename GeomTraits::FT shepard_weight( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename GeomTraits::FT a = - typename GeomTraits::FT(1)) { +template +typename GeomTraits::FT shepard_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q, + const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +{ + const GeomTraits traits; + return shepard_weight(t, r, p, q, a, traits); +} - CGAL::Point_2 stub; - return shepard_weight(stub, p, stub, q, a); - } +template +typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::FT a, + const GeomTraits& traits) +{ + typename GeomTraits::Point_3 stub; + return shepard_weight(stub, p, stub, q, a, traits); +} - template - typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { +template +typename GeomTraits::FT shepard_weight(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +{ + CGAL::Point_3 stub; + return shepard_weight(stub, p, stub, q, a); +} - using FT = typename GeomTraits::FT; - const FT d = internal::distance_3(traits, q, r); - return shepard_ns::weight(traits, d, a); - } - - template - typename GeomTraits::FT shepard_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename GeomTraits::FT a = - typename GeomTraits::FT(1)) { - - const GeomTraits traits; - return shepard_weight(t, r, p, q, a, traits); - } - - template - typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { - - typename GeomTraits::Point_3 stub; - return shepard_weight(stub, p, stub, q, a, traits); - } - - template - typename GeomTraits::FT shepard_weight( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename GeomTraits::FT a = - typename GeomTraits::FT(1)) { - - CGAL::Point_3 stub; - return shepard_weight(stub, p, stub, q, a); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index da4c87d0fdd..399878326f7 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -20,489 +20,469 @@ namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace tangent_ns { +/// \cond SKIP_IN_MANUAL +namespace tangent_ns { - template - FT half_angle_tangent(const FT r, const FT d, const FT A, const FT D) { - - FT t = FT(0); - const FT P = r * d + D; - CGAL_precondition(P != FT(0)); - if (P != FT(0)) { - const FT inv = FT(2) / P; - t = A * inv; - } - return t; - } - - template - FT half_weight(const FT t, const FT r) { - - FT w = FT(0); - CGAL_precondition(r != FT(0)); - if (r != FT(0)) { - const FT inv = FT(2) / r; - w = t * inv; - } - return w; - } - - template - FT weight(const FT t1, const FT t2, const FT r) { - - FT w = FT(0); - CGAL_precondition(r != FT(0)); - if (r != FT(0)) { - const FT inv = FT(2) / r; - w = (t1 + t2) * inv; - } - return w; - } - - template - FT weight( - const FT d1, const FT r, const FT d2, - const FT A1, const FT A2, - const FT D1, const FT D2) { - - const FT P1 = d1 * r + D1; - const FT P2 = d2 * r + D2; - - FT w = FT(0); - CGAL_precondition(P1 != FT(0) && P2 != FT(0)); - if (P1 != FT(0) && P2 != FT(0)) { - const FT inv1 = FT(2) / P1; - const FT inv2 = FT(2) / P2; - const FT t1 = A1 * inv1; - const FT t2 = A2 * inv2; - w = weight(t1, t2, r); - } - return w; - } - - // This is positive case only. - // This version is based on the positive area. - // This version is more precise for all positive cases. - template - typename GeomTraits::FT tangent_weight_v1( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - using FT = typename GeomTraits::FT; - const auto dot_product_3 = - traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v1 = construct_vector_3(q, t); - const auto v2 = construct_vector_3(q, r); - const auto v3 = construct_vector_3(q, p); - - const FT l1 = internal::length_3(traits, v1); - const FT l2 = internal::length_3(traits, v2); - const FT l3 = internal::length_3(traits, v3); - - const FT A1 = internal::positive_area_3(traits, r, q, t); - const FT A2 = internal::positive_area_3(traits, p, q, r); - - const FT D1 = dot_product_3(v1, v2); - const FT D2 = dot_product_3(v2, v3); - - return weight(l1, l2, l3, A1, A2, D1, D2); - } - - // This version handles both positive and negative cases. - // However, it is less precise. - template - typename GeomTraits::FT tangent_weight_v2( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - using FT = typename GeomTraits::FT; - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - auto v1 = construct_vector_3(q, t); - auto v2 = construct_vector_3(q, r); - auto v3 = construct_vector_3(q, p); - - const FT l2 = internal::length_3(traits, v2); - - internal::normalize_3(traits, v1); - internal::normalize_3(traits, v2); - internal::normalize_3(traits, v3); - - const double ha_rad_1 = internal::angle_3(traits, v1, v2) / 2.0; - const double ha_rad_2 = internal::angle_3(traits, v2, v3) / 2.0; - const FT t1 = static_cast(std::tan(ha_rad_1)); - const FT t2 = static_cast(std::tan(ha_rad_2)); - - return weight(t1, t2, l2); - } - } - /// \endcond - - /*! - \ingroup PkgWeightsRefTangentWeights - - \brief computes the tangent of the half angle. - - This function computes the tangent of the half angle using the precomputed - distance, area, and dot product values. The returned value is - \f$\frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\f$. - - \tparam FT - a model of `FieldNumberType` - - \param d - the distance value - - \param l - the distance value - - \param A - the area value - - \param D - the dot product value - - \pre (d * l + D) != 0 - - \sa `half_tangent_weight()` - */ - template - FT tangent_half_angle(const FT d, const FT l, const FT A, const FT D) { - return tangent_ns::half_angle_tangent(d, l, A, D); +template +FT half_angle_tangent(const FT r, const FT d, const FT A, const FT D) +{ + FT t = FT(0); + const FT P = r * d + D; + CGAL_precondition(P != FT(0)); + if (P != FT(0)) + { + const FT inv = FT(2) / P; + t = A * inv; } - /*! - \ingroup PkgWeightsRefTangentWeights + return t; +} - \brief computes the half value of the tangent weight. - - This function constructs the half of the tangent weight using the precomputed - half angle tangent and distance values. The returned value is - \f$\frac{2\textbf{tan05}}{\textbf{d}}\f$. - - \tparam FT - a model of `FieldNumberType` - - \param tan05 - the half angle tangent value - - \param d - the distance value - - \pre d != 0 - - \sa `tangent_half_angle()` - \sa `tangent_weight()` - */ - template - FT half_tangent_weight(const FT tan05, const FT d) { - return tangent_ns::half_weight(tan05, d); +template +FT half_weight(const FT t, const FT r) +{ + FT w = FT(0); + CGAL_precondition(r != FT(0)); + if (r != FT(0)) + { + const FT inv = FT(2) / r; + w = t * inv; } - /*! - \ingroup PkgWeightsRefTangentWeights + return w; +} - \brief computes the half value of the tangent weight. - - This function constructs the half of the tangent weight using the precomputed - distance, area, and dot product values. The returned value is - \f$\frac{2\textbf{t}}{\textbf{d}}\f$ where - \f$\textbf{t} = \frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\f$. - - \tparam FT - a model of `FieldNumberType` - - \param d - the distance value - - \param l - the distance value - - \param A - the area value - - \param D - the dot product value - - \pre (d * l + D) != 0 && d != 0 - - \sa `tangent_weight()` - */ - template - FT half_tangent_weight(const FT d, const FT l, const FT A, const FT D) { - const FT tan05 = tangent_half_angle(d, l, A, D); - return half_tangent_weight(tan05, d); +template +FT weight(const FT t1, const FT t2, const FT r) +{ + FT w = FT(0); + CGAL_precondition(r != FT(0)); + if (r != FT(0)) + { + const FT inv = FT(2) / r; + w = (t1 + t2) * inv; } - #if defined(DOXYGEN_RUNNING) + return w; +} - /*! - \ingroup PkgWeightsRefTangentWeights +template +FT weight(const FT d1, const FT r, const FT d2, + const FT A1, const FT A2, + const FT D1, const FT D2) +{ + const FT P1 = d1 * r + D1; + const FT P2 = d2 * r + D2; - \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT tangent_weight( + FT w = FT(0); + CGAL_precondition(P1 != FT(0) && P2 != FT(0)); + if (P1 != FT(0) && P2 != FT(0)) + { + const FT inv1 = FT(2) / P1; + const FT inv2 = FT(2) / P2; + const FT t1 = A1 * inv1; + const FT t2 = A2 * inv2; + w = weight(t1, t2, r); + } + + return w; +} + +// This is positive case only. +// This version is based on the positive area. +// This version is more precise for all positive cases. +template +typename GeomTraits::FT tangent_weight_v1(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + + const auto dot_product_3 = traits.compute_scalar_product_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + + const auto v1 = construct_vector_3(q, t); + const auto v2 = construct_vector_3(q, r); + const auto v3 = construct_vector_3(q, p); + + const FT l1 = internal::length_3(traits, v1); + const FT l2 = internal::length_3(traits, v2); + const FT l3 = internal::length_3(traits, v3); + + const FT A1 = internal::positive_area_3(traits, r, q, t); + const FT A2 = internal::positive_area_3(traits, p, q, r); + + const FT D1 = dot_product_3(v1, v2); + const FT D2 = dot_product_3(v2, v3); + + return weight(l1, l2, l3, A1, A2, D1, D2); +} + +// This version handles both positive and negative cases. +// However, it is less precise. +template +typename GeomTraits::FT tangent_weight_v2(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + + const auto construct_vector_3 = traits.construct_vector_3_object(); + + auto v1 = construct_vector_3(q, t); + auto v2 = construct_vector_3(q, r); + auto v3 = construct_vector_3(q, p); + + const FT l2 = internal::length_3(traits, v2); + + internal::normalize_3(traits, v1); + internal::normalize_3(traits, v2); + internal::normalize_3(traits, v3); + + const double ha_rad_1 = internal::angle_3(traits, v1, v2) / 2.0; + const double ha_rad_2 = internal::angle_3(traits, v2, v3) / 2.0; + const FT t1 = static_cast(std::tan(ha_rad_1)); + const FT t2 = static_cast(std::tan(ha_rad_2)); + + return weight(t1, t2, l2); +} + +} // namespace tangent_ns + +/// \endcond + +/*! + \ingroup PkgWeightsRefTangentWeights + + \brief computes the tangent of the half angle. + + This function computes the tangent of the half angle using the precomputed + distance, area, and dot product values. The returned value is + \f$\frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\f$. + + \tparam FT a model of `FieldNumberType` + + \param d the distance value + \param l the distance value + \param A the area value + \param D the dot product value + + \pre (d * l + D) != 0 + + \sa `half_tangent_weight()` +*/ +template +FT tangent_half_angle(const FT d, const FT l, const FT A, const FT D) +{ + return tangent_ns::half_angle_tangent(d, l, A, D); +} + +/*! + \ingroup PkgWeightsRefTangentWeights + + \brief computes the half value of the tangent weight. + + This function constructs the half of the tangent weight using the precomputed + half angle tangent and distance values. The returned value is + \f$\frac{2\textbf{tan05}}{\textbf{d}}\f$. + + \tparam FT a model of `FieldNumberType` + + \param tan05 the half angle tangent value + \param d the distance value + + \pre d != 0 + + \sa `tangent_half_angle()` + \sa `tangent_weight()` +*/ +template +FT half_tangent_weight(const FT tan05, const FT d) +{ + return tangent_ns::half_weight(tan05, d); +} + +/*! + \ingroup PkgWeightsRefTangentWeights + + \brief computes the half value of the tangent weight. + + This function constructs the half of the tangent weight using the precomputed + distance, area, and dot product values. The returned value is + \f$\frac{2\textbf{t}}{\textbf{d}}\f$ where + \f$\textbf{t} = \frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\f$. + + \tparam FT a model of `FieldNumberType` + + \param d the distance value + \param l the distance value + \param A the area value + \param D the dot product value + + \pre (d * l + D) != 0 && d != 0 + + \sa `tangent_weight()` +*/ +template +FT half_tangent_weight(const FT d, const FT l, const FT A, const FT D) +{ + const FT tan05 = tangent_half_angle(d, l, A, D); + return half_tangent_weight(tan05, d); +} + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefTangentWeights + + \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT tangent_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefTangentWeights +/*! + \ingroup PkgWeightsRefTangentWeights - \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT tangent_weight( + \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT tangent_weight( const typename GeomTraits::Point_3& p0, const typename GeomTraits::Point_3& p1, const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefTangentWeights +/*! + \ingroup PkgWeightsRefTangentWeights - \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT tangent_weight( + \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT tangent_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q) { } - /*! - \ingroup PkgWeightsRefTangentWeights +/*! + \ingroup PkgWeightsRefTangentWeights - \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT tangent_weight( + \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT tangent_weight( const CGAL::Point_3& p0, const CGAL::Point_3& p1, const CGAL::Point_3& p2, const CGAL::Point_3& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT tangent_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + const auto dot_product_2 = traits.compute_scalar_product_2_object(); + const auto construct_vector_2 = traits.construct_vector_2_object(); - using FT = typename GeomTraits::FT; - const auto dot_product_2 = - traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = - traits.construct_vector_2_object(); + const auto v1 = construct_vector_2(q, t); + const auto v2 = construct_vector_2(q, r); + const auto v3 = construct_vector_2(q, p); - const auto v1 = construct_vector_2(q, t); - const auto v2 = construct_vector_2(q, r); - const auto v3 = construct_vector_2(q, p); + const FT l1 = internal::length_2(traits, v1); + const FT l2 = internal::length_2(traits, v2); + const FT l3 = internal::length_2(traits, v3); - const FT l1 = internal::length_2(traits, v1); - const FT l2 = internal::length_2(traits, v2); - const FT l3 = internal::length_2(traits, v3); + const FT A1 = internal::area_2(traits, r, q, t); + const FT A2 = internal::area_2(traits, p, q, r); - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); + const FT D1 = dot_product_2(v1, v2); + const FT D2 = dot_product_2(v2, v3); - const FT D1 = dot_product_2(v1, v2); - const FT D2 = dot_product_2(v2, v3); + return tangent_ns::weight(l1, l2, l3, A1, A2, D1, D2); +} - return tangent_ns::weight( - l1, l2, l3, A1, A2, D1, D2); +template +typename GeomTraits::FT tangent_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return tangent_weight(t, r, p, q, traits); +} + +template +typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + // return tangent_ns::tangent_weight_v1(t, r, p, q, traits); + return tangent_ns::tangent_weight_v2(t, r, p, q, traits); +} + +template +typename GeomTraits::FT tangent_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return tangent_weight(t, r, p, q, traits); +} + +// Undocumented tangent weight class. +// Its constructor takes a polygon mesh and a vertex to point map +// and its operator() is defined based on the halfedge_descriptor only. +// This version is currently used in: +// Surface_mesh_parameterizer -> Iterative_authalic_parameterizer_3.h +template::type> +class Edge_tangent_weight +{ + using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; + using FT = typename GeomTraits::FT; + + const PolygonMesh& m_pmesh; + const VertexPointMap m_pmap; + const GeomTraits m_traits; + +public: + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + + Edge_tangent_weight(const PolygonMesh& pmesh, const VertexPointMap pmap) + : m_pmesh(pmesh), m_pmap(pmap), m_traits() + { } + + FT operator()(const halfedge_descriptor he) const + { + FT weight = FT(0); + if (is_border_edge(he, m_pmesh)) + { + const auto h1 = next(he, m_pmesh); + + const auto v0 = target(he, m_pmesh); + const auto v1 = source(he, m_pmesh); + const auto v2 = target(h1, m_pmesh); + + const auto& p0 = get(m_pmap, v0); + const auto& p1 = get(m_pmap, v1); + const auto& p2 = get(m_pmap, v2); + + weight = internal::tangent_3(m_traits, p0, p2, p1); + } + else + { + const auto h1 = next(he, m_pmesh); + const auto h2 = prev(opposite(he, m_pmesh), m_pmesh); + + const auto v0 = target(he, m_pmesh); + const auto v1 = source(he, m_pmesh); + const auto v2 = target(h1, m_pmesh); + const auto v3 = source(h2, m_pmesh); + + const auto& p0 = get(m_pmap, v0); + const auto& p1 = get(m_pmap, v1); + const auto& p2 = get(m_pmap, v2); + const auto& p3 = get(m_pmap, v3); + + weight = tangent_weight(p2, p1, p3, p0) / FT(2); + } + return weight; } +}; +// Undocumented tangent weight class. +// Its constructor takes three points either in 2D or 3D. +// This version is currently used in: +// Surface_mesh_parameterizer -> MVC_post_processor_3.h +// Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h +template +class Tangent_weight { + FT m_d_r, m_d_p, m_w_base; + +public: template - typename GeomTraits::FT tangent_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { - + Tangent_weight(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) + { const GeomTraits traits; - return tangent_weight(t, r, p, q, traits); + + const auto scalar_product_2 = traits.compute_scalar_product_2_object(); + const auto construct_vector_2 = traits.construct_vector_2_object(); + + m_d_r = internal::distance_2(traits, q, r); + CGAL_assertion(m_d_r != FT(0)); // two points are identical! + m_d_p = internal::distance_2(traits, q, p); + CGAL_assertion(m_d_p != FT(0)); // two points are identical! + + const auto v1 = construct_vector_2(q, r); + const auto v2 = construct_vector_2(q, p); + + const auto A = internal::positive_area_2(traits, p, q, r); + CGAL_assertion(A != FT(0)); // three points are identical! + const auto S = scalar_product_2(v1, v2); + m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); } template - typename GeomTraits::FT tangent_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - // return tangent_ns::tangent_weight_v1(t, r, p, q, traits); - return tangent_ns::tangent_weight_v2(t, r, p, q, traits); - } - - template - typename GeomTraits::FT tangent_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - + Tangent_weight(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) + { const GeomTraits traits; - return tangent_weight(t, r, p, q, traits); + const auto scalar_product_3 = traits.compute_scalar_product_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); + + m_d_r = internal::distance_3(traits, q, r); + CGAL_assertion(m_d_r != FT(0)); // two points are identical! + m_d_p = internal::distance_3(traits, q, p); + CGAL_assertion(m_d_p != FT(0)); // two points are identical! + + const auto v1 = construct_vector_3(q, r); + const auto v2 = construct_vector_3(q, p); + + const auto A = internal::positive_area_3(traits, p, q, r); + CGAL_assertion(A != FT(0)); // three points are identical! + const auto S = scalar_product_3(v1, v2); + m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); } - // Undocumented tangent weight class. - // Its constructor takes a polygon mesh and a vertex to point map - // and its operator() is defined based on the halfedge_descriptor only. - // This version is currently used in: - // Surface_mesh_parameterizer -> Iterative_authalic_parameterizer_3.h - template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> - class Edge_tangent_weight { + FT get_w_r() const + { + return half_tangent_weight(m_w_base, m_d_r) / FT(2); + } - using GeomTraits = typename CGAL::Kernel_traits< - typename boost::property_traits::value_type>::type; - using FT = typename GeomTraits::FT; + FT get_w_p() const + { + return half_tangent_weight(m_w_base, m_d_p) / FT(2); + } +}; - const PolygonMesh& m_pmesh; - const VertexPointMap m_pmap; - const GeomTraits m_traits; - - public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - - Edge_tangent_weight(const PolygonMesh& pmesh, const VertexPointMap pmap) : - m_pmesh(pmesh), m_pmap(pmap), m_traits() { } - - FT operator()(const halfedge_descriptor he) const { - - FT weight = FT(0); - if (is_border_edge(he, m_pmesh)) { - const auto h1 = next(he, m_pmesh); - - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - - weight = internal::tangent_3(m_traits, p0, p2, p1); - - } else { - const auto h1 = next(he, m_pmesh); - const auto h2 = prev(opposite(he, m_pmesh), m_pmesh); - - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); - const auto v3 = source(h2, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - const auto& p3 = get(m_pmap, v3); - - weight = tangent_weight(p2, p1, p3, p0) / FT(2); - } - return weight; - } - }; - - // Undocumented tangent weight class. - // Its constructor takes three points either in 2D or 3D. - // This version is currently used in: - // Surface_mesh_parameterizer -> MVC_post_processor_3.h - // Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h - template - class Tangent_weight { - FT m_d_r, m_d_p, m_w_base; - - public: - template - Tangent_weight( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { - - const GeomTraits traits; - const auto scalar_product_2 = - traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = - traits.construct_vector_2_object(); - - m_d_r = internal::distance_2(traits, q, r); - CGAL_assertion(m_d_r != FT(0)); // two points are identical! - m_d_p = internal::distance_2(traits, q, p); - CGAL_assertion(m_d_p != FT(0)); // two points are identical! - - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); - - const auto A = internal::positive_area_2(traits, p, q, r); - CGAL_assertion(A != FT(0)); // three points are identical! - const auto S = scalar_product_2(v1, v2); - m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); - } - - template - Tangent_weight( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - const auto scalar_product_3 = - traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - m_d_r = internal::distance_3(traits, q, r); - CGAL_assertion(m_d_r != FT(0)); // two points are identical! - m_d_p = internal::distance_3(traits, q, p); - CGAL_assertion(m_d_p != FT(0)); // two points are identical! - - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); - - const auto A = internal::positive_area_3(traits, p, q, r); - CGAL_assertion(A != FT(0)); // three points are identical! - const auto S = scalar_product_3(v1, v2); - m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); - } - - FT get_w_r() const { - return half_tangent_weight(m_w_base, m_d_r) / FT(2); - } - - FT get_w_p() const { - return half_tangent_weight(m_w_base, m_d_p) / FT(2); - } - }; - - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/three_point_family_weights.h b/Weights/include/CGAL/Weights/three_point_family_weights.h index eca32f1b281..ce7b0d978a0 100644 --- a/Weights/include/CGAL/Weights/three_point_family_weights.h +++ b/Weights/include/CGAL/Weights/three_point_family_weights.h @@ -14,58 +14,62 @@ #ifndef CGAL_THREE_POINT_FAMILY_WEIGHTS_H #define CGAL_THREE_POINT_FAMILY_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace three_point_family_ns { +/// \cond SKIP_IN_MANUAL +namespace three_point_family_ns { - template - typename GeomTraits::FT weight( - const GeomTraits& traits, - const typename GeomTraits::FT d1, - const typename GeomTraits::FT d2, - const typename GeomTraits::FT d3, - const typename GeomTraits::FT A1, - const typename GeomTraits::FT A2, - const typename GeomTraits::FT B, - const typename GeomTraits::FT p) { +template +typename GeomTraits::FT weight(const GeomTraits& traits, + const typename GeomTraits::FT d1, + const typename GeomTraits::FT d2, + const typename GeomTraits::FT d3, + const typename GeomTraits::FT A1, + const typename GeomTraits::FT A2, + const typename GeomTraits::FT B, + const typename GeomTraits::FT p) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - FT w = FT(0); - CGAL_precondition(A1 != FT(0) && A2 != FT(0)); - const FT prod = A1 * A2; - if (prod != FT(0)) { - const FT inv = FT(1) / prod; - FT r1 = d1; - FT r2 = d2; - FT r3 = d3; - if (p != FT(1)) { - r1 = internal::power(traits, d1, p); - r2 = internal::power(traits, d2, p); - r3 = internal::power(traits, d3, p); - } - w = (r3 * A1 - r2 * B + r1 * A2) * inv; - } - return w; + FT w = FT(0); + CGAL_precondition(A1 != FT(0) && A2 != FT(0)); + const FT prod = A1 * A2; + if (prod != FT(0)) + { + const FT inv = FT(1) / prod; + FT r1 = d1; + FT r2 = d2; + FT r3 = d3; + if (p != FT(1)) + { + r1 = internal::power(traits, d1, p); + r2 = internal::power(traits, d2, p); + r3 = internal::power(traits, d3, p); } + w = (r3 * A1 - r2 * B + r1 * A2) * inv; } - /// \endcond - #if defined(DOXYGEN_RUNNING) + return w; +} - /*! - \ingroup PkgWeightsRefThreePointFamilyWeights +} // namespace three_point_family_ns - \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1`, - and `p2` and the power parameter `a`, given a traits class `traits` with geometric objects, - predicates, and constructions. - */ - template - typename GeomTraits::FT three_point_family_weight( +/// \endcond + +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefThreePointFamilyWeights + + \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1`, + and `p2` and the power parameter `a`, given a traits class `traits` with geometric objects, + predicates, and constructions. +*/ +template +typename GeomTraits::FT three_point_family_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, @@ -73,96 +77,89 @@ namespace Weights { const typename GeomTraits::FT a, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefThreePointFamilyWeights +/*! + \ingroup PkgWeightsRefThreePointFamilyWeights - \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. - */ - template - typename K::FT three_point_family_weight( + \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K, and the power parameter `a` which + can be omitted. +*/ +template +typename K::FT three_point_family_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q, const typename K::FT a = typename K::FT(1)) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT three_point_family_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::FT a, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const FT d1 = internal::distance_2(traits, q, t); - const FT d2 = internal::distance_2(traits, q, r); - const FT d3 = internal::distance_2(traits, q, p); + const FT d1 = internal::distance_2(traits, q, t); + const FT d2 = internal::distance_2(traits, q, r); + const FT d3 = internal::distance_2(traits, q, p); - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT B = internal::area_2(traits, p, q, t); + const FT A1 = internal::area_2(traits, r, q, t); + const FT A2 = internal::area_2(traits, p, q, r); + const FT B = internal::area_2(traits, p, q, t); - return three_point_family_ns::weight( - traits, d1, d2, d3, A1, A2, B, a); - } + return three_point_family_ns::weight(traits, d1, d2, d3, A1, A2, B, a); +} - template - typename GeomTraits::FT three_point_family_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename GeomTraits::FT a = - typename GeomTraits::FT(1)) { +template +typename GeomTraits::FT three_point_family_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q, + const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +{ + const GeomTraits traits; + return three_point_family_weight(t, r, p, q, a, traits); +} - const GeomTraits traits; - return three_point_family_weight(t, r, p, q, a, traits); - } +namespace internal { - namespace internal { +template +typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::FT a, + const GeomTraits& traits) +{ + using Point_2 = typename GeomTraits::Point_2; - template - typename GeomTraits::FT three_point_family_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { + Point_2 tf, rf, pf, qf; + internal::flatten(traits, + t, r, p, q, + tf, rf, pf, qf); + return CGAL::Weights::three_point_family_weight(tf, rf, pf, qf, a, traits); +} - using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten( - traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights:: - three_point_family_weight(tf, rf, pf, qf, a, traits); - } +template +typename GeomTraits::FT three_point_family_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q, + const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +{ + const GeomTraits traits; + return three_point_family_weight(t, r, p, q, a, traits); +} - template - typename GeomTraits::FT three_point_family_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename GeomTraits::FT a = - typename GeomTraits::FT(1)) { +} // namespace internal - const GeomTraits traits; - return three_point_family_weight(t, r, p, q, a, traits); - } - - } // namespace internal - - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/triangular_region_weights.h b/Weights/include/CGAL/Weights/triangular_region_weights.h index d0605d8e1bf..bb94af1a332 100644 --- a/Weights/include/CGAL/Weights/triangular_region_weights.h +++ b/Weights/include/CGAL/Weights/triangular_region_weights.h @@ -14,107 +14,103 @@ #ifndef CGAL_TRIANGULAR_REGION_WEIGHTS_H #define CGAL_TRIANGULAR_REGION_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - #if defined(DOXYGEN_RUNNING) +#if defined(DOXYGEN_RUNNING) - /*! - \ingroup PkgWeightsRefTriangularRegionWeights +/*! + \ingroup PkgWeightsRefTriangularRegionWeights - \brief computes the area of the triangular cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT triangular_area( + \brief computes the area of the triangular cell in 2D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT triangular_area( const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefTriangularRegionWeights +/*! + \ingroup PkgWeightsRefTriangularRegionWeights - \brief computes the area of the triangular cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT triangular_area( + \brief computes the area of the triangular cell in 3D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT triangular_area( const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefTriangularRegionWeights +/*! + \ingroup PkgWeightsRefTriangularRegionWeights - \brief computes the area of the triangular cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT triangular_area( + \brief computes the area of the triangular cell in 2D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT triangular_area( const CGAL::Point_2& p, const CGAL::Point_2& q, const CGAL::Point_2& r) { } - /*! - \ingroup PkgWeightsRefTriangularRegionWeights +/*! + \ingroup PkgWeightsRefTriangularRegionWeights - \brief computes the area of the triangular cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT triangular_area( + \brief computes the area of the triangular cell in 3D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT triangular_area( const CGAL::Point_3& p, const CGAL::Point_3& q, const CGAL::Point_3& r) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT triangular_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT triangular_area(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) +{ + return internal::positive_area_2(traits, p, q, r); +} - return internal::positive_area_2(traits, p, q, r); - } +template +typename GeomTraits::FT triangular_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return triangular_area(p, q, r, traits); +} - template - typename GeomTraits::FT triangular_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT triangular_area(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + return internal::positive_area_3(traits, p, q, r); +} - const GeomTraits traits; - return triangular_area(p, q, r, traits); - } +template +typename GeomTraits::FT triangular_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return triangular_area(p, q, r, traits); +} - template - typename GeomTraits::FT triangular_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { - - return internal::positive_area_3(traits, p, q, r); - } - - template - typename GeomTraits::FT triangular_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - return triangular_area(p, q, r, traits); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/uniform_region_weights.h b/Weights/include/CGAL/Weights/uniform_region_weights.h index 9d78a58b6b5..f028c700903 100644 --- a/Weights/include/CGAL/Weights/uniform_region_weights.h +++ b/Weights/include/CGAL/Weights/uniform_region_weights.h @@ -20,103 +20,100 @@ namespace CGAL { namespace Weights { - #if defined(DOXYGEN_RUNNING) +#if defined(DOXYGEN_RUNNING) - /*! - \ingroup PkgWeightsRefUniformRegionWeights +/*! + \ingroup PkgWeightsRefUniformRegionWeights - \brief this function always returns 1, given three points in 2D and a traits class - with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT uniform_area( + \brief this function always returns 1, given three points in 2D and a traits class + with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT uniform_area( const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const GeomTraits&) { } - /*! - \ingroup PkgWeightsRefUniformRegionWeights +/*! + \ingroup PkgWeightsRefUniformRegionWeights - \brief this function always returns 1, given three points in 3D and a traits class - with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT uniform_area( + \brief this function always returns 1, given three points in 3D and a traits class + with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT uniform_area( const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const GeomTraits&) { } - /*! - \ingroup PkgWeightsRefUniformRegionWeights +/*! + \ingroup PkgWeightsRefUniformRegionWeights - \brief this function always returns 1, given three points in 2D which are - parameterized by a `Kernel` K. - */ - template - typename K::FT uniform_area( + \brief this function always returns 1, given three points in 2D which are + parameterized by a `Kernel` K. +*/ +template +typename K::FT uniform_area( const CGAL::Point_2&, const CGAL::Point_2&, const CGAL::Point_2&) { } - /*! - \ingroup PkgWeightsRefUniformRegionWeights +/*! + \ingroup PkgWeightsRefUniformRegionWeights - \brief this function always returns 1, given three points in 3D which are - parameterized by a `Kernel` K. - */ - template - typename K::FT uniform_area( + \brief this function always returns 1, given three points in 3D which are + parameterized by a `Kernel` K. +*/ +template +typename K::FT uniform_area( const CGAL::Point_3&, const CGAL::Point_3&, const CGAL::Point_3&) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT uniform_area( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const GeomTraits&) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2&, + const GeomTraits&) +{ + using FT = typename GeomTraits::FT; + return FT(1); +} - using FT = typename GeomTraits::FT; - return FT(1); - } +template +typename GeomTraits::FT uniform_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return uniform_area(p, q, r, traits); +} - template - typename GeomTraits::FT uniform_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3&, + const GeomTraits&) +{ + using FT = typename GeomTraits::FT; + return FT(1); +} - const GeomTraits traits; - return uniform_area(p, q, r, traits); - } +template +typename GeomTraits::FT uniform_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return uniform_area(p, q, r, traits); +} - template - typename GeomTraits::FT uniform_area( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const GeomTraits&) { - - using FT = typename GeomTraits::FT; - return FT(1); - } - - template - typename GeomTraits::FT uniform_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - return uniform_area(p, q, r, traits); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/uniform_weights.h b/Weights/include/CGAL/Weights/uniform_weights.h index 9ce8d49d360..439e0e74075 100644 --- a/Weights/include/CGAL/Weights/uniform_weights.h +++ b/Weights/include/CGAL/Weights/uniform_weights.h @@ -20,128 +20,128 @@ namespace CGAL { namespace Weights { - #if defined(DOXYGEN_RUNNING) +#if defined(DOXYGEN_RUNNING) - /*! +/*! \ingroup PkgWeightsRefUniformWeights \brief this function always returns 1, given four points in 2D and a traits class with geometric objects, predicates, and constructions. */ - template - typename GeomTraits::FT uniform_weight( +template +typename GeomTraits::FT uniform_weight( const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const GeomTraits&) { } - /*! +/*! \ingroup PkgWeightsRefUniformWeights \brief this function always returns 1, given four points in 3D and a traits class with geometric objects, predicates, and constructions. */ - template - typename GeomTraits::FT uniform_weight( +template +typename GeomTraits::FT uniform_weight( const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const GeomTraits&) { } - /*! +/*! \ingroup PkgWeightsRefUniformWeights \brief this function always returns 1, given four points in 2D which are parameterized by a `Kernel` K. */ - template - typename K::FT uniform_weight( +template +typename K::FT uniform_weight( const CGAL::Point_2&, const CGAL::Point_2&, const CGAL::Point_2&, const CGAL::Point_2&) { } - /*! +/*! \ingroup PkgWeightsRefUniformWeights \brief this function always returns 1, given four points in 3D which are parameterized by a `Kernel` K. */ - template - typename K::FT uniform_weight( +template +typename K::FT uniform_weight( const CGAL::Point_3&, const CGAL::Point_3&, const CGAL::Point_3&, const CGAL::Point_3&) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT uniform_weight( +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT uniform_weight( const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, const GeomTraits&) { - using FT = typename GeomTraits::FT; - return FT(1); - } + using FT = typename GeomTraits::FT; + return FT(1); +} - template - typename GeomTraits::FT uniform_weight( +template +typename GeomTraits::FT uniform_weight( const CGAL::Point_2& q, const CGAL::Point_2& t, const CGAL::Point_2& r, const CGAL::Point_2& p) { - const GeomTraits traits; - return uniform_weight(q, t, r, p, traits); - } + const GeomTraits traits; + return uniform_weight(q, t, r, p, traits); +} - template - typename GeomTraits::FT uniform_weight( +template +typename GeomTraits::FT uniform_weight( const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, const GeomTraits&) { - using FT = typename GeomTraits::FT; - return FT(1); - } + using FT = typename GeomTraits::FT; + return FT(1); +} - template - typename GeomTraits::FT uniform_weight( +template +typename GeomTraits::FT uniform_weight( const CGAL::Point_3& q, const CGAL::Point_3& t, const CGAL::Point_3& r, const CGAL::Point_3& p) { - const GeomTraits traits; - return uniform_weight(q, t, r, p, traits); - } + const GeomTraits traits; + return uniform_weight(q, t, r, p, traits); +} - // Undocumented uniform weight class taking as input a polygon mesh. - // It is currently used in: - // Polygon_mesh_processing -> triangulate_hole_Polyhedron_3_test.cpp - // Polygon_mesh_processing -> triangulate_hole_Polyhedron_3_no_delaunay_test.cpp - // Polyhedron demo -> Fairing_plugin.cpp - // Polyhedron demo -> Hole_filling_plugin.cpp - template - class Uniform_weight { +// Undocumented uniform weight class taking as input a polygon mesh. +// It is currently used in: +// Polygon_mesh_processing -> triangulate_hole_Polyhedron_3_test.cpp +// Polygon_mesh_processing -> triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +// Polyhedron demo -> Fairing_plugin.cpp +// Polyhedron demo -> Hole_filling_plugin.cpp +template +class Uniform_weight +{ +public: + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + double w_i(vertex_descriptor) { return 1.; } + double w_ij(halfedge_descriptor) { return 1.; } +}; - public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - double w_i(vertex_descriptor) { return 1; } - double w_ij(halfedge_descriptor) { return 1; } - }; - - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/utils.h b/Weights/include/CGAL/Weights/utils.h index 5636e00f296..d28dfe877ba 100644 --- a/Weights/include/CGAL/Weights/utils.h +++ b/Weights/include/CGAL/Weights/utils.h @@ -20,187 +20,168 @@ namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT tangent( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT tangent(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) +{ + return internal::tangent_2(traits, p, q, r); +} - return internal::tangent_2(traits, p, q, r); - } +template +typename GeomTraits::FT tangent(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return tangent(p, q, r, traits); +} - template - typename GeomTraits::FT tangent( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT tangent(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + return internal::tangent_3(traits, p, q, r); +} - const GeomTraits traits; - return tangent(p, q, r, traits); - } +template +typename GeomTraits::FT tangent(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return tangent(p, q, r, traits); +} - template - typename GeomTraits::FT tangent( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { +template +typename GeomTraits::FT cotangent(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) +{ + return internal::cotangent_2(traits, p, q, r); +} - return internal::tangent_3(traits, p, q, r); - } +template +typename GeomTraits::FT cotangent(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return cotangent(p, q, r, traits); +} - template - typename GeomTraits::FT tangent( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { +template +typename GeomTraits::FT cotangent(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + return internal::cotangent_3(traits, p, q, r); +} - const GeomTraits traits; - return tangent(p, q, r, traits); - } +template +typename GeomTraits::FT cotangent(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return cotangent(p, q, r, traits); +} - template - typename GeomTraits::FT cotangent( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { +/// \endcond - return internal::cotangent_2(traits, p, q, r); - } +/// \cond SKIP_IN_MANUAL +// These are free functions to be used when building weights from parts rather +// than using the predefined weight functions. In principle, they can be removed. +// They are here to have unified interface within the Weights package and its +// construction weight system. +template +typename GeomTraits::FT squared_distance(const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + return squared_distance_2(p, q); +} - template - typename GeomTraits::FT cotangent( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT squared_distance(const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + const auto squared_distance_3 = traits.compute_squared_distance_3_object(); + return squared_distance_3(p, q); +} - const GeomTraits traits; - return cotangent(p, q, r, traits); - } +template +typename GeomTraits::FT distance(const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return internal::distance_2(traits, p, q); +} - template - typename GeomTraits::FT cotangent( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { +template +typename GeomTraits::FT distance(const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return internal::distance_3(traits, p, q); +} - return internal::cotangent_3(traits, p, q, r); - } +template +typename GeomTraits::FT area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return internal::area_2(traits, p, q, r); +} - template - typename GeomTraits::FT cotangent( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { +template +typename GeomTraits::FT area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return internal::positive_area_3(traits, p, q, r); +} - const GeomTraits traits; - return cotangent(p, q, r, traits); - } - /// \endcond +template +typename GeomTraits::FT scalar_product(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; - /// \cond SKIP_IN_MANUAL - // These are free functions to be used when building weights from parts rather - // than using the predefined weight functions. In principle, they can be removed. - // They are here to have unified interface within the Weights package and its - // construction weight system. - template - typename GeomTraits::FT squared_distance( - const CGAL::Point_2& p, - const CGAL::Point_2& q) { + const auto scalar_product_2 = traits.compute_scalar_product_2_object(); + const auto construct_vector_2 = traits.construct_vector_2_object(); - const GeomTraits traits; - const auto squared_distance_2 = - traits.compute_squared_distance_2_object(); - return squared_distance_2(p, q); - } + const auto v1 = construct_vector_2(q, r); + const auto v2 = construct_vector_2(q, p); + return scalar_product_2(v1, v2); +} - template - typename GeomTraits::FT squared_distance( - const CGAL::Point_3& p, - const CGAL::Point_3& q) { +template +typename GeomTraits::FT scalar_product(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + const auto scalar_product_3 = traits.compute_scalar_product_3_object(); + const auto construct_vector_3 = traits.construct_vector_3_object(); - const GeomTraits traits; - const auto squared_distance_3 = - traits.compute_squared_distance_3_object(); - return squared_distance_3(p, q); - } + const auto v1 = construct_vector_3(q, r); + const auto v2 = construct_vector_3(q, p); + return scalar_product_3(v1, v2); +} - template - typename GeomTraits::FT distance( - const CGAL::Point_2& p, - const CGAL::Point_2& q) { - - const GeomTraits traits; - return internal::distance_2(traits, p, q); - } - - template - typename GeomTraits::FT distance( - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - - const GeomTraits traits; - return internal::distance_3(traits, p, q); - } - - template - typename GeomTraits::FT area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { - - const GeomTraits traits; - return internal::area_2(traits, p, q, r); - } - - template - typename GeomTraits::FT area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - return internal::positive_area_3(traits, p, q, r); - } - - template - typename GeomTraits::FT scalar_product( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { - - const GeomTraits traits; - const auto scalar_product_2 = - traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = - traits.construct_vector_2_object(); - - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); - return scalar_product_2(v1, v2); - } - - template - typename GeomTraits::FT scalar_product( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - const auto scalar_product_3 = - traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = - traits.construct_vector_3_object(); - - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); - return scalar_product_3(v1, v2); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/voronoi_region_weights.h b/Weights/include/CGAL/Weights/voronoi_region_weights.h index 569c26a6870..8497c8aad57 100644 --- a/Weights/include/CGAL/Weights/voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/voronoi_region_weights.h @@ -14,131 +14,125 @@ #ifndef CGAL_VORONOI_REGION_WEIGHTS_H #define CGAL_VORONOI_REGION_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { - #if defined(DOXYGEN_RUNNING) +#if defined(DOXYGEN_RUNNING) - /*! - \ingroup PkgWeightsRefVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights - \brief computes the area of the Voronoi cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT voronoi_area( + \brief computes the area of the Voronoi cell in 2D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT voronoi_area( const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights - \brief computes the area of the Voronoi cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT voronoi_area( + \brief computes the area of the Voronoi cell in 3D using the points `p`, `q` + and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT voronoi_area( const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights - \brief computes the area of the Voronoi cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT voronoi_area( + \brief computes the area of the Voronoi cell in 2D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT voronoi_area( const CGAL::Point_2& p, const CGAL::Point_2& q, const CGAL::Point_2& r) { } - /*! - \ingroup PkgWeightsRefVoronoiRegionWeights +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights - \brief computes the area of the Voronoi cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. - */ - template - typename K::FT voronoi_area( - const CGAL::Point_3& p, + \brief computes the area of the Voronoi cell in 3D using the points `p`, `q` + and `r` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT voronoi_area( + const CGAL::Point_3& p, const CGAL::Point_3& q, const CGAL::Point_3& r) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT voronoi_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - using FT = typename GeomTraits::FT; - const auto circumcenter_2 = - traits.construct_circumcenter_2_object(); - const auto midpoint_2 = - traits.construct_midpoint_2_object(); + const auto circumcenter_2 = traits.construct_circumcenter_2_object(); + const auto midpoint_2 = traits.construct_midpoint_2_object(); - const auto center = circumcenter_2(p, q, r); - const auto m1 = midpoint_2(q, r); - const auto m2 = midpoint_2(q, p); + const auto center = circumcenter_2(p, q, r); + const auto m1 = midpoint_2(q, r); + const auto m2 = midpoint_2(q, p); - const FT A1 = internal::positive_area_2(traits, q, m1, center); - const FT A2 = internal::positive_area_2(traits, q, center, m2); - return A1 + A2; - } + const FT A1 = internal::positive_area_2(traits, q, m1, center); + const FT A2 = internal::positive_area_2(traits, q, center, m2); + return A1 + A2; +} - template - typename GeomTraits::FT voronoi_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { +template +typename GeomTraits::FT voronoi_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const GeomTraits traits; + return voronoi_area(p, q, r, traits); +} - const GeomTraits traits; - return voronoi_area(p, q, r, traits); - } +template +typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; - template - typename GeomTraits::FT voronoi_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { + const auto circumcenter_3 = traits.construct_circumcenter_3_object(); + const auto midpoint_3 = traits.construct_midpoint_3_object(); - using FT = typename GeomTraits::FT; - const auto circumcenter_3 = - traits.construct_circumcenter_3_object(); - const auto midpoint_3 = - traits.construct_midpoint_3_object(); + const auto center = circumcenter_3(p, q, r); + const auto m1 = midpoint_3(q, r); + const auto m2 = midpoint_3(q, p); - const auto center = circumcenter_3(p, q, r); - const auto m1 = midpoint_3(q, r); - const auto m2 = midpoint_3(q, p); + const FT A1 = internal::positive_area_3(traits, q, m1, center); + const FT A2 = internal::positive_area_3(traits, q, center, m2); + return A1 + A2; +} - const FT A1 = internal::positive_area_3(traits, q, m1, center); - const FT A2 = internal::positive_area_3(traits, q, center, m2); - return A1 + A2; - } +template +typename GeomTraits::FT voronoi_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const GeomTraits traits; + return voronoi_area(p, q, r, traits); +} - template - typename GeomTraits::FT voronoi_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { - - const GeomTraits traits; - return voronoi_area(p, q, r, traits); - } - /// \endcond +/// \endcond } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/wachspress_weights.h b/Weights/include/CGAL/Weights/wachspress_weights.h index 34299c24a52..00d843d18d1 100644 --- a/Weights/include/CGAL/Weights/wachspress_weights.h +++ b/Weights/include/CGAL/Weights/wachspress_weights.h @@ -21,402 +21,377 @@ namespace CGAL { namespace Weights { - /// \cond SKIP_IN_MANUAL - namespace wachspress_ns { +/// \cond SKIP_IN_MANUAL +namespace wachspress_ns { - template - FT weight(const FT A1, const FT A2, const FT C) { - - FT w = FT(0); - CGAL_precondition(A1 != FT(0) && A2 != FT(0)); - const FT prod = A1 * A2; - if (prod != FT(0)) { - const FT inv = FT(1) / prod; - w = C * inv; - } - return w; - } +template +FT weight(const FT A1, const FT A2, const FT C) +{ + FT w = FT(0); + CGAL_precondition(A1 != FT(0) && A2 != FT(0)); + const FT prod = A1 * A2; + if (prod != FT(0)) + { + const FT inv = FT(1) / prod; + w = C * inv; } - /// \endcond + return w; +} - #if defined(DOXYGEN_RUNNING) +} // wachspress_ns - /*! - \ingroup PkgWeightsRefWachspressWeights +/// \endcond - \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. - */ - template - typename GeomTraits::FT wachspress_weight( +#if defined(DOXYGEN_RUNNING) + +/*! + \ingroup PkgWeightsRefWachspressWeights + + \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, + and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. +*/ +template +typename GeomTraits::FT wachspress_weight( const typename GeomTraits::Point_2& p0, const typename GeomTraits::Point_2& p1, const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { } - /*! - \ingroup PkgWeightsRefWachspressWeights +/*! + \ingroup PkgWeightsRefWachspressWeights - \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. - */ - template - typename K::FT wachspress_weight( + \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, + and `p2` which are parameterized by a `Kernel` K. +*/ +template +typename K::FT wachspress_weight( const CGAL::Point_2& p0, const CGAL::Point_2& p1, const CGAL::Point_2& p2, const CGAL::Point_2& q) { } - #endif // DOXYGEN_RUNNING +#endif // DOXYGEN_RUNNING + +/// \cond SKIP_IN_MANUAL +template +typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_2& t, + const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + const FT A1 = internal::area_2(traits, r, q, t); + const FT A2 = internal::area_2(traits, p, q, r); + const FT C = internal::area_2(traits, t, r, p); + return wachspress_ns::weight(A1, A2, C); +} + +template +typename GeomTraits::FT wachspress_weight(const CGAL::Point_2& t, + const CGAL::Point_2& r, + const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const GeomTraits traits; + return wachspress_weight(t, r, p, q, traits); +} + +namespace internal { + +template +typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_3& t, + const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) +{ + using Point_2 = typename GeomTraits::Point_2; + + Point_2 tf, rf, pf, qf; + internal::flatten(traits, + t, r, p, q, + tf, rf, pf, qf); + return CGAL::Weights::wachspress_weight(tf, rf, pf, qf, traits); +} + +template +typename GeomTraits::FT wachspress_weight(const CGAL::Point_3& t, + const CGAL::Point_3& r, + const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const GeomTraits traits; + return wachspress_weight(t, r, p, q, traits); +} + +} // namespace internal + +/// \endcond + +/*! + \ingroup PkgWeightsRefBarycentricWachspressWeights + + \brief 2D Wachspress weights for polygons. + + This class implements 2D Wachspress weights ( \cite cgal:bc:fhk-gcbcocp-06, + \cite cgal:bc:mlbd-gbcip-02, \cite cgal:bc:w-rfeb-75 ) which can be computed + at any point inside a strictly convex polygon. + + Wachspress weights are well-defined and non-negative inside a strictly convex polygon. + The weights are computed analytically using the formulation from the `wachspress_weight()`. + + \tparam VertexRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` + \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and + value type is `Point_2`. The default is `CGAL::Identity_property_map`. + + \cgalModels `BarycentricWeights_2` +*/ +template > +class Wachspress_weights_2 +{ +public: + + /// \name Types + /// @{ /// \cond SKIP_IN_MANUAL - template - typename GeomTraits::FT wachspress_weight( - const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { - using FT = typename GeomTraits::FT; - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT C = internal::area_2(traits, t, r, p); - return wachspress_ns::weight(A1, A2, C); - } + using Vertex_range = VertexRange; + using Geom_traits = GeomTraits; + using Point_map = PointMap; - template - typename GeomTraits::FT wachspress_weight( - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) { - - const GeomTraits traits; - return wachspress_weight(t, r, p, q, traits); - } - - namespace internal { - - template - typename GeomTraits::FT wachspress_weight( - const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { - - using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten( - traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights:: - wachspress_weight(tf, rf, pf, qf, traits); - } - - template - typename GeomTraits::FT wachspress_weight( - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) { - - const GeomTraits traits; - return wachspress_weight(t, r, p, q, traits); - } - - } // namespace internal + using Area_2 = typename GeomTraits::Compute_area_2; /// \endcond - /*! - \ingroup PkgWeightsRefBarycentricWachspressWeights + /// Number type. + typedef typename GeomTraits::FT FT; - \brief 2D Wachspress weights for polygons. + /// Point type. + typedef typename GeomTraits::Point_2 Point_2; - This class implements 2D Wachspress weights ( \cite cgal:bc:fhk-gcbcocp-06, - \cite cgal:bc:mlbd-gbcip-02, \cite cgal:bc:w-rfeb-75 ) which can be computed - at any point inside a strictly convex polygon. + /// @} - Wachspress weights are well-defined and non-negative inside a strictly convex polygon. - The weights are computed analytically using the formulation from the `wachspress_weight()`. - - \tparam VertexRange - a model of `ConstRange` whose iterator type is `RandomAccessIterator` - - \tparam GeomTraits - a model of `AnalyticWeightTraits_2` - - \tparam PointMap - a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and - value type is `Point_2`. The default is `CGAL::Identity_property_map`. - - \cgalModels `BarycentricWeights_2` - */ - template< - typename VertexRange, - typename GeomTraits, - typename PointMap = CGAL::Identity_property_map > - class Wachspress_weights_2 { - - public: - - /// \name Types - /// @{ - - /// \cond SKIP_IN_MANUAL - using Vertex_range = VertexRange; - using Geom_traits = GeomTraits; - using Point_map = PointMap; - - using Area_2 = typename GeomTraits::Compute_area_2; - /// \endcond - - /// Number type. - typedef typename GeomTraits::FT FT; - - /// Point type. - typedef typename GeomTraits::Point_2 Point_2; - - /// @} - - /// \name Initialization - /// @{ - - /*! - \brief initializes all internal data structures. - - This class implements the behavior of Wachspress weights - for 2D query points inside strictly convex polygons. - - \param polygon - an instance of `VertexRange` with the vertices of a strictly convex polygon - - \param traits - a traits class with geometric objects, predicates, and constructions; - the default initialization is provided - - \param point_map - an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; - the default initialization is provided - - \pre polygon.size() >= 3 - \pre polygon is simple - \pre polygon is strictly convex - */ - Wachspress_weights_2( - const VertexRange& polygon, - const GeomTraits traits = GeomTraits(), - const PointMap point_map = PointMap()) : - m_polygon(polygon), - m_traits(traits), - m_point_map(point_map), - m_area_2(m_traits.compute_area_2_object()) { - - CGAL_precondition( - polygon.size() >= 3); - CGAL_precondition( - internal::is_simple_2(polygon, traits, point_map)); - CGAL_precondition( - internal::polygon_type_2(polygon, traits, point_map) == - internal::Polygon_type::STRICTLY_CONVEX); - resize(); - } - - /// @} - - /// \name Access - /// @{ - - /*! - \brief computes 2D Wachspress weights. - - This function fills a destination range with 2D Wachspress weights computed - at the `query` point with respect to the vertices of the input polygon. - - The number of computed weights is equal to the number of polygon vertices. - - \tparam OutIterator - a model of `OutputIterator` whose value type is `FT` - - \param query - a query point - - \param w_begin - the beginning of the destination range with the computed weights - - \return an output iterator to the element in the destination range, - one past the last weight stored - */ - template - OutIterator operator()(const Point_2& query, OutIterator w_begin) { - const bool normalize = false; - return operator()(query, w_begin, normalize); - } - - /// @} - - /// \cond SKIP_IN_MANUAL - template - OutIterator operator()(const Point_2& query, OutIterator w_begin, const bool normalize) { - return optimal_weights(query, w_begin, normalize); - } - /// \endcond - - private: - - // Fields. - const VertexRange& m_polygon; - const GeomTraits m_traits; - const PointMap m_point_map; - - const Area_2 m_area_2; - - std::vector A; - std::vector C; - std::vector w; - - // Functions. - void resize() { - A.resize(m_polygon.size()); - C.resize(m_polygon.size()); - w.resize(m_polygon.size()); - } - - template - OutputIterator optimal_weights( - const Point_2& query, OutputIterator weights, const bool normalize) { - - // Get the number of vertices in the polygon. - const std::size_t n = m_polygon.size(); - - // Compute areas A and C following the area notation from [1]. - // Split the loop to make this computation faster. - const auto& p1 = get(m_point_map, *(m_polygon.begin() + 0)); - const auto& p2 = get(m_point_map, *(m_polygon.begin() + 1)); - const auto& pn = get(m_point_map, *(m_polygon.begin() + (n - 1))); - - A[0] = m_area_2(p1, p2, query); - C[0] = m_area_2(pn, p1, p2); - - for (std::size_t i = 1; i < n - 1; ++i) { - const auto& pi0 = get(m_point_map, *(m_polygon.begin() + (i - 1))); - const auto& pi1 = get(m_point_map, *(m_polygon.begin() + (i + 0))); - const auto& pi2 = get(m_point_map, *(m_polygon.begin() + (i + 1))); - - A[i] = m_area_2(pi1, pi2, query); - C[i] = m_area_2(pi0, pi1, pi2); - } - - const auto& pm = get(m_point_map, *(m_polygon.begin() + (n - 2))); - A[n - 1] = m_area_2(pn, p1, query); - C[n - 1] = m_area_2(pm, pn, p1); - - // Compute unnormalized weights following the formula (28) from [1]. - CGAL_assertion(A[n - 1] != FT(0) && A[0] != FT(0)); - w[0] = C[0] / (A[n - 1] * A[0]); - - for (std::size_t i = 1; i < n - 1; ++i) { - CGAL_assertion(A[i - 1] != FT(0) && A[i] != FT(0)); - w[i] = C[i] / (A[i - 1] * A[i]); - } - - CGAL_assertion(A[n - 2] != FT(0) && A[n - 1] != FT(0)); - w[n - 1] = C[n - 1] / (A[n - 2] * A[n - 1]); - - // Normalize if necessary. - if (normalize) { - internal::normalize(w); - } - - // Return weights. - for (std::size_t i = 0; i < n; ++i) { - *(weights++) = w[i]; - } - return weights; - } - }; + /// \name Initialization + /// @{ /*! - \ingroup PkgWeightsRefBarycentricWachspressWeights + \brief initializes all internal data structures. - \brief computes 2D Wachspress weights for polygons. + This class implements the behavior of Wachspress weights + for 2D query points inside strictly convex polygons. - This function computes 2D Wachspress weights at a given `query` point - with respect to the vertices of a strictly convex `polygon`, that is one - weight per vertex. The weights are stored in a destination range - beginning at `w_begin`. - - Internally, the class `Wachspress_weights_2` is used. If one wants to process - multiple query points, it is better to use that class. When using the free function, - internal memory is allocated for each query point, while when using the class, - it is allocated only once which is much more efficient. However, for a few query - points, it is easier to use this function. It can also be used when the processing - time is not a concern. - - \tparam PointRange - a model of `ConstRange` whose iterator type is `RandomAccessIterator` - and value type is `GeomTraits::Point_2` - - \tparam OutIterator - a model of `OutputIterator` whose value type is `GeomTraits::FT` - - \tparam GeomTraits - a model of `AnalyticWeightTraits_2` - - \param polygon - an instance of `PointRange` with 2D points which form a strictly convex polygon - - \param query - a query point - - \param w_begin - the beginning of the destination range with the computed weights - - \param traits - a traits class with geometric objects, predicates, and constructions; - this parameter can be omitted if the traits class can be deduced from the point type - - \return an output iterator to the element in the destination range, - one past the last weight stored + \param polygon an instance of `VertexRange` with the vertices of a strictly convex polygon + \param traits a traits class with geometric objects, predicates, and constructions; + the default initialization is provided + \param point_map an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; + the default initialization is provided \pre polygon.size() >= 3 \pre polygon is simple \pre polygon is strictly convex */ - template< - typename PointRange, - typename OutIterator, - typename GeomTraits> - OutIterator wachspress_weights_2( - const PointRange& polygon, const typename GeomTraits::Point_2& query, - OutIterator w_begin, const GeomTraits& traits) { - - Wachspress_weights_2 - wachspress(polygon, traits); - return wachspress(query, w_begin); + Wachspress_weights_2(const VertexRange& polygon, + const GeomTraits traits = GeomTraits(), + const PointMap point_map = PointMap()) + : m_polygon(polygon), + m_traits(traits), + m_point_map(point_map), + m_area_2(m_traits.compute_area_2_object()) + { + CGAL_precondition(polygon.size() >= 3); + CGAL_precondition(internal::is_simple_2(polygon, traits, point_map)); + CGAL_precondition(internal::polygon_type_2(polygon, traits, point_map) == + internal::Polygon_type::STRICTLY_CONVEX); + resize(); } + /// @} + + /// \name Access + /// @{ + + /*! + \brief computes 2D Wachspress weights. + + This function fills a destination range with 2D Wachspress weights computed + at the `query` point with respect to the vertices of the input polygon. + + The number of computed weights is equal to the number of polygon vertices. + + \tparam OutIterator a model of `OutputIterator` whose value type is `FT` + + \param query a query point + \param w_begin the beginning of the destination range with the computed weights + + \return an output iterator to the element in the destination range, + one past the last weight stored + */ + template + OutIterator operator()(const Point_2& query, + OutIterator w_begin) + { + const bool normalize = false; + return operator()(query, w_begin, normalize); + } + + /// @} + /// \cond SKIP_IN_MANUAL - template< - typename PointRange, - typename OutIterator> - OutIterator wachspress_weights_2( - const PointRange& polygon, - const typename PointRange::value_type& query, - OutIterator w_begin) { - using Point_2 = typename PointRange::value_type; - using GeomTraits = typename Kernel_traits::Kernel; - const GeomTraits traits; - return wachspress_weights_2( - polygon, query, w_begin, traits); + template + OutIterator operator()(const Point_2& query, + OutIterator w_begin, + const bool normalize) + { + return optimal_weights(query, w_begin, normalize); } + /// \endcond +private: + const VertexRange& m_polygon; + const GeomTraits m_traits; + const PointMap m_point_map; + + const Area_2 m_area_2; + + std::vector A; + std::vector C; + std::vector w; + + void resize() + { + A.resize(m_polygon.size()); + C.resize(m_polygon.size()); + w.resize(m_polygon.size()); + } + + template + OutputIterator optimal_weights(const Point_2& query, + OutputIterator weights, + const bool normalize) + { + + // Get the number of vertices in the polygon. + const std::size_t n = m_polygon.size(); + + // Compute areas A and C following the area notation from [1]. + // Split the loop to make this computation faster. + const auto& p1 = get(m_point_map, *(m_polygon.begin() + 0)); + const auto& p2 = get(m_point_map, *(m_polygon.begin() + 1)); + const auto& pn = get(m_point_map, *(m_polygon.begin() + (n - 1))); + + A[0] = m_area_2(p1, p2, query); + C[0] = m_area_2(pn, p1, p2); + + for (std::size_t i = 1; i < n - 1; ++i) + { + const auto& pi0 = get(m_point_map, *(m_polygon.begin() + (i - 1))); + const auto& pi1 = get(m_point_map, *(m_polygon.begin() + (i + 0))); + const auto& pi2 = get(m_point_map, *(m_polygon.begin() + (i + 1))); + + A[i] = m_area_2(pi1, pi2, query); + C[i] = m_area_2(pi0, pi1, pi2); + } + + const auto& pm = get(m_point_map, *(m_polygon.begin() + (n - 2))); + A[n - 1] = m_area_2(pn, p1, query); + C[n - 1] = m_area_2(pm, pn, p1); + + // Compute unnormalized weights following the formula (28) from [1]. + CGAL_assertion(A[n - 1] != FT(0) && A[0] != FT(0)); + w[0] = C[0] / (A[n - 1] * A[0]); + + for (std::size_t i = 1; i < n - 1; ++i) + { + CGAL_assertion(A[i - 1] != FT(0) && A[i] != FT(0)); + w[i] = C[i] / (A[i - 1] * A[i]); + } + + CGAL_assertion(A[n - 2] != FT(0) && A[n - 1] != FT(0)); + w[n - 1] = C[n - 1] / (A[n - 2] * A[n - 1]); + + // Normalize if necessary. + if (normalize) + internal::normalize(w); + + // Return weights. + for (std::size_t i = 0; i < n; ++i) + *(weights++) = w[i]; + + return weights; + } +}; + +/*! + \ingroup PkgWeightsRefBarycentricWachspressWeights + + \brief computes 2D Wachspress weights for polygons. + + This function computes 2D Wachspress weights at a given `query` point + with respect to the vertices of a strictly convex `polygon`, that is one + weight per vertex. The weights are stored in a destination range + beginning at `w_begin`. + + Internally, the class `Wachspress_weights_2` is used. If one wants to process + multiple query points, it is better to use that class. When using the free function, + internal memory is allocated for each query point, while when using the class, + it is allocated only once which is much more efficient. However, for a few query + points, it is easier to use this function. It can also be used when the processing + time is not a concern. + + \tparam PointRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` + and value type is `GeomTraits::Point_2` + \tparam OutIterator a model of `OutputIterator` whose value type is `GeomTraits::FT` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` + + \param polygon an instance of `PointRange` with 2D points which form a strictly convex polygon + \param query a query point + \param w_begin the beginning of the destination range with the computed weights + \param traits a traits class with geometric objects, predicates, and constructions; + this parameter can be omitted if the traits class can be deduced from the point type + + \return an output iterator to the element in the destination range, one past the last weight stored + + \pre polygon.size() >= 3 + \pre polygon is simple + \pre polygon is strictly convex +*/ +template +OutIterator wachspress_weights_2(const PointRange& polygon, + const typename GeomTraits::Point_2& query, + OutIterator w_begin, + const GeomTraits& traits) +{ + Wachspress_weights_2 wachspress(polygon, traits); + return wachspress(query, w_begin); +} + +/// \cond SKIP_IN_MANUAL + +template +OutIterator wachspress_weights_2(const PointRange& polygon, + const typename PointRange::value_type& query, + OutIterator w_begin) +{ + using Point_2 = typename PointRange::value_type; + using GeomTraits = typename Kernel_traits::Kernel; + + const GeomTraits traits; + return wachspress_weights_2(polygon, query, w_begin, traits); +} + +/// \endcond + } // namespace Weights } // namespace CGAL From e0e0c4d54bdee2e566e992ddba886dab2d74774f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 16:25:36 +0200 Subject: [PATCH 056/426] Remove old doc (new one to be re-added directly on the functions) --- .../include/CGAL/Weights/authalic_weights.h | 62 --------- .../CGAL/Weights/barycentric_region_weights.h | 57 --------- .../include/CGAL/Weights/cotangent_weights.h | 61 --------- .../CGAL/Weights/discrete_harmonic_weights.h | 34 ----- .../CGAL/Weights/inverse_distance_weights.h | 107 ---------------- .../include/CGAL/Weights/mean_value_weights.h | 34 ----- .../Weights/mixed_voronoi_region_weights.h | 54 -------- .../include/CGAL/Weights/shepard_weights.h | 119 ------------------ .../include/CGAL/Weights/tangent_weights.h | 58 --------- .../CGAL/Weights/three_point_family_weights.h | 38 ------ .../CGAL/Weights/triangular_region_weights.h | 54 -------- .../CGAL/Weights/uniform_region_weights.h | 55 -------- .../include/CGAL/Weights/uniform_weights.h | 59 --------- Weights/include/CGAL/Weights/utils.h | 1 - .../CGAL/Weights/voronoi_region_weights.h | 54 -------- .../include/CGAL/Weights/wachspress_weights.h | 34 ----- 16 files changed, 881 deletions(-) diff --git a/Weights/include/CGAL/Weights/authalic_weights.h b/Weights/include/CGAL/Weights/authalic_weights.h index 25d38e60f26..447c58f1bea 100644 --- a/Weights/include/CGAL/Weights/authalic_weights.h +++ b/Weights/include/CGAL/Weights/authalic_weights.h @@ -76,66 +76,6 @@ FT half_authalic_weight(const FT cot, const FT d2) return authalic_ns::half_weight(cot, d2); } -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefAuthalicWeights - - \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT authalic_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefAuthalicWeights - - \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT authalic_weight( - const typename GeomTraits::Point_3& p0, - const typename GeomTraits::Point_3& p1, - const typename GeomTraits::Point_3& p2, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefAuthalicWeights - - \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT authalic_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q) { } - -/*! - \ingroup PkgWeightsRefAuthalicWeights - - \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT authalic_weight( - const CGAL::Point_3& p0, - const CGAL::Point_3& p1, - const CGAL::Point_3& p2, - const CGAL::Point_3& q) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL -// Overloads! template typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_2& t, const typename GeomTraits::Point_2& r, @@ -192,8 +132,6 @@ typename GeomTraits::FT authalic_weight(const CGAL::Point_3& t, return authalic_weight(t, r, p, q, traits); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/barycentric_region_weights.h b/Weights/include/CGAL/Weights/barycentric_region_weights.h index c095bd8c520..4b8d5692bf5 100644 --- a/Weights/include/CGAL/Weights/barycentric_region_weights.h +++ b/Weights/include/CGAL/Weights/barycentric_region_weights.h @@ -19,61 +19,6 @@ namespace CGAL { namespace Weights { -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefBarycentricRegionWeights - - \brief computes the area of the barycentric cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT barycentric_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefBarycentricRegionWeights - - \brief computes the area of the barycentric cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT barycentric_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefBarycentricRegionWeights - - \brief computes the area of the barycentric cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT barycentric_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { } - -/*! - \ingroup PkgWeightsRefBarycentricRegionWeights - - \brief computes the area of the barycentric cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT barycentric_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, @@ -132,8 +77,6 @@ typename GeomTraits::FT barycentric_area(const CGAL::Point_3& p, return barycentric_area(p, q, r, traits); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index 5b8a5617fa7..b4096632442 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -59,65 +59,6 @@ FT half_cotangent_weight(const FT cot) return cotangent_ns::half_weight(cot); } -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefCotangentWeights - - \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT cotangent_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefCotangentWeights - - \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT cotangent_weight( - const typename GeomTraits::Point_3& p0, - const typename GeomTraits::Point_3& p1, - const typename GeomTraits::Point_3& p2, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefCotangentWeights - - \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT cotangent_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q) { } - -/*! - \ingroup PkgWeightsRefCotangentWeights - - \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT cotangent_weight( - const CGAL::Point_3& p0, - const CGAL::Point_3& p1, - const CGAL::Point_3& p2, - const CGAL::Point_3& q) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_2& t, const typename GeomTraits::Point_2& r, @@ -512,8 +453,6 @@ private: } }; -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h index 170b73a67b3..5f836d0a2bc 100644 --- a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h @@ -42,40 +42,6 @@ FT weight(const FT r1, const FT r2, const FT r3, } // namespace discrete_harmonic_ns -/// \endcond - -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefDiscreteHarmonicWeights - - \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT discrete_harmonic_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefDiscreteHarmonicWeights - - \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT discrete_harmonic_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_2& t, const typename GeomTraits::Point_2& r, diff --git a/Weights/include/CGAL/Weights/inverse_distance_weights.h b/Weights/include/CGAL/Weights/inverse_distance_weights.h index 28fec763c5e..a6774ad509a 100644 --- a/Weights/include/CGAL/Weights/inverse_distance_weights.h +++ b/Weights/include/CGAL/Weights/inverse_distance_weights.h @@ -35,113 +35,6 @@ FT weight(const FT d) } // namespace inverse_distance_ns -/// \endcond - -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 2D using the points `p` and `q`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ -template -typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 3D using the points `p` and `q`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ -template -typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 2D using the points `p` and `q`, - which are parameterized by a `Kernel` K. - */ -template -typename K::FT inverse_distance_weight( - const CGAL::Point_2&, - const CGAL::Point_2& p, - const CGAL::Point_2&, - const CGAL::Point_2& q) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 3D using the points `p` and `q`, - which are parameterized by a `Kernel` K. - */ -template -typename K::FT inverse_distance_weight( - const CGAL::Point_3&, - const CGAL::Point_3& p, - const CGAL::Point_3&, - const CGAL::Point_3& q) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 2D using the points `p` and `q`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ -template -typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 3D using the points `p` and `q`, - given a traits class `traits` with geometric objects, predicates, and constructions. - */ -template -typename GeomTraits::FT inverse_distance_weight( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 2D using the points `p` and `q`, - which are parameterized by a `Kernel` K. - */ -template -typename K::FT inverse_distance_weight( - const CGAL::Point_2& p, - const CGAL::Point_2& q) { } - -/*! - \ingroup PkgWeightsRefInverseDistanceWeights - - \brief computes the inverse distance weight in 3D using the points `p` and `q`, - which are parameterized by a `Kernel` K. - */ -template -typename K::FT inverse_distance_weight( - const CGAL::Point_3& p, - const CGAL::Point_3& q) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& r, diff --git a/Weights/include/CGAL/Weights/mean_value_weights.h b/Weights/include/CGAL/Weights/mean_value_weights.h index 810294355ac..0e688e72226 100644 --- a/Weights/include/CGAL/Weights/mean_value_weights.h +++ b/Weights/include/CGAL/Weights/mean_value_weights.h @@ -76,40 +76,6 @@ typename GeomTraits::FT weight(const GeomTraits& traits, } // namespace mean_value_ns -/// \endcond - -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefMeanValueWeights - - \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT mean_value_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefMeanValueWeights - - \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT mean_value_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_2& t, const typename GeomTraits::Point_2& r, diff --git a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h index 0dafc0f198c..4eea980e123 100644 --- a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h @@ -19,60 +19,6 @@ namespace CGAL { namespace Weights { -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights - - \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT mixed_voronoi_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights - - \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT mixed_voronoi_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights - - \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT mixed_voronoi_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { } - -/*! - \ingroup PkgWeightsRefMixedVoronoiRegionWeights - - \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT mixed_voronoi_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { } - -#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL template typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p, diff --git a/Weights/include/CGAL/Weights/shepard_weights.h b/Weights/include/CGAL/Weights/shepard_weights.h index 00e21883d21..7fbc2e7a6e5 100644 --- a/Weights/include/CGAL/Weights/shepard_weights.h +++ b/Weights/include/CGAL/Weights/shepard_weights.h @@ -45,125 +45,6 @@ typename GeomTraits::FT weight(const GeomTraits& traits, } // namespace shepard_ns -/// \endcond - -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 2D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. -*/ -template -typename K::FT shepard_weight( - const CGAL::Point_2&, - const CGAL::Point_2& p, - const CGAL::Point_2&, - const CGAL::Point_2& q, - const typename K::FT a = typename K::FT(1)) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 3D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. -*/ -template -typename K::FT shepard_weight( - const CGAL::Point_3&, - const CGAL::Point_3& p, - const CGAL::Point_3&, - const CGAL::Point_3& q, - const typename K::FT a = typename K::FT(1)) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`, - given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT shepard_weight( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 2D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. -*/ -template -typename K::FT shepard_weight( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename K::FT a = typename K::FT(1)) { } - -/*! - \ingroup PkgWeightsRefShepardWeights - - \brief computes the Shepard weight in 3D using the points `p` and `q`, - which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. -*/ -template -typename K::FT shepard_weight( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename K::FT a = typename K::FT(1)) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& r, diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 399878326f7..f4f6e5c623f 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -234,64 +234,6 @@ FT half_tangent_weight(const FT d, const FT l, const FT A, const FT D) return half_tangent_weight(tan05, d); } -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefTangentWeights - - \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT tangent_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefTangentWeights - - \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT tangent_weight( - const typename GeomTraits::Point_3& p0, - const typename GeomTraits::Point_3& p1, - const typename GeomTraits::Point_3& p2, - const typename GeomTraits::Point_3& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefTangentWeights - - \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT tangent_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q) { } - -/*! - \ingroup PkgWeightsRefTangentWeights - - \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT tangent_weight( - const CGAL::Point_3& p0, - const CGAL::Point_3& p1, - const CGAL::Point_3& p2, - const CGAL::Point_3& q) { } - -#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL template typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_2& t, diff --git a/Weights/include/CGAL/Weights/three_point_family_weights.h b/Weights/include/CGAL/Weights/three_point_family_weights.h index ce7b0d978a0..44743f8497e 100644 --- a/Weights/include/CGAL/Weights/three_point_family_weights.h +++ b/Weights/include/CGAL/Weights/three_point_family_weights.h @@ -57,44 +57,6 @@ typename GeomTraits::FT weight(const GeomTraits& traits, } // namespace three_point_family_ns -/// \endcond - -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefThreePointFamilyWeights - - \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1`, - and `p2` and the power parameter `a`, given a traits class `traits` with geometric objects, - predicates, and constructions. -*/ -template -typename GeomTraits::FT three_point_family_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::FT a, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefThreePointFamilyWeights - - \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K, and the power parameter `a` which - can be omitted. -*/ -template -typename K::FT three_point_family_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q, - const typename K::FT a = typename K::FT(1)) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_2& t, const typename GeomTraits::Point_2& r, diff --git a/Weights/include/CGAL/Weights/triangular_region_weights.h b/Weights/include/CGAL/Weights/triangular_region_weights.h index bb94af1a332..6975bb38349 100644 --- a/Weights/include/CGAL/Weights/triangular_region_weights.h +++ b/Weights/include/CGAL/Weights/triangular_region_weights.h @@ -19,60 +19,6 @@ namespace CGAL { namespace Weights { -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefTriangularRegionWeights - - \brief computes the area of the triangular cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT triangular_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefTriangularRegionWeights - - \brief computes the area of the triangular cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT triangular_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefTriangularRegionWeights - - \brief computes the area of the triangular cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT triangular_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { } - -/*! - \ingroup PkgWeightsRefTriangularRegionWeights - - \brief computes the area of the triangular cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT triangular_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { } - -#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL template typename GeomTraits::FT triangular_area(const typename GeomTraits::Point_2& p, diff --git a/Weights/include/CGAL/Weights/uniform_region_weights.h b/Weights/include/CGAL/Weights/uniform_region_weights.h index f028c700903..fd5d41179a1 100644 --- a/Weights/include/CGAL/Weights/uniform_region_weights.h +++ b/Weights/include/CGAL/Weights/uniform_region_weights.h @@ -14,66 +14,11 @@ #ifndef CGAL_UNIFORM_REGION_WEIGHTS_H #define CGAL_UNIFORM_REGION_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefUniformRegionWeights - - \brief this function always returns 1, given three points in 2D and a traits class - with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT uniform_area( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const GeomTraits&) { } - -/*! - \ingroup PkgWeightsRefUniformRegionWeights - - \brief this function always returns 1, given three points in 3D and a traits class - with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT uniform_area( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const GeomTraits&) { } - -/*! - \ingroup PkgWeightsRefUniformRegionWeights - - \brief this function always returns 1, given three points in 2D which are - parameterized by a `Kernel` K. -*/ -template -typename K::FT uniform_area( - const CGAL::Point_2&, - const CGAL::Point_2&, - const CGAL::Point_2&) { } - -/*! - \ingroup PkgWeightsRefUniformRegionWeights - - \brief this function always returns 1, given three points in 3D which are - parameterized by a `Kernel` K. -*/ -template -typename K::FT uniform_area( - const CGAL::Point_3&, - const CGAL::Point_3&, - const CGAL::Point_3&) { } - -#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL template typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_2&, diff --git a/Weights/include/CGAL/Weights/uniform_weights.h b/Weights/include/CGAL/Weights/uniform_weights.h index 439e0e74075..dd96ca4a9f5 100644 --- a/Weights/include/CGAL/Weights/uniform_weights.h +++ b/Weights/include/CGAL/Weights/uniform_weights.h @@ -14,70 +14,11 @@ #ifndef CGAL_UNIFORM_WEIGHTS_H #define CGAL_UNIFORM_WEIGHTS_H -// Internal includes. #include namespace CGAL { namespace Weights { -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefUniformWeights - - \brief this function always returns 1, given four points in 2D and a traits class - with geometric objects, predicates, and constructions. - */ -template -typename GeomTraits::FT uniform_weight( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const GeomTraits&) { } - -/*! - \ingroup PkgWeightsRefUniformWeights - - \brief this function always returns 1, given four points in 3D and a traits class - with geometric objects, predicates, and constructions. - */ -template -typename GeomTraits::FT uniform_weight( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const GeomTraits&) { } - -/*! - \ingroup PkgWeightsRefUniformWeights - - \brief this function always returns 1, given four points in 2D which are - parameterized by a `Kernel` K. - */ -template -typename K::FT uniform_weight( - const CGAL::Point_2&, - const CGAL::Point_2&, - const CGAL::Point_2&, - const CGAL::Point_2&) { } - -/*! - \ingroup PkgWeightsRefUniformWeights - - \brief this function always returns 1, given four points in 3D which are - parameterized by a `Kernel` K. - */ -template -typename K::FT uniform_weight( - const CGAL::Point_3&, - const CGAL::Point_3&, - const CGAL::Point_3&, - const CGAL::Point_3&) { } - -#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL template typename GeomTraits::FT uniform_weight( diff --git a/Weights/include/CGAL/Weights/utils.h b/Weights/include/CGAL/Weights/utils.h index d28dfe877ba..6c72a4e27c8 100644 --- a/Weights/include/CGAL/Weights/utils.h +++ b/Weights/include/CGAL/Weights/utils.h @@ -14,7 +14,6 @@ #ifndef CGAL_WEIGHTS_UTILS_H #define CGAL_WEIGHTS_UTILS_H -// Internal includes. #include namespace CGAL { diff --git a/Weights/include/CGAL/Weights/voronoi_region_weights.h b/Weights/include/CGAL/Weights/voronoi_region_weights.h index 8497c8aad57..729ae98e8a8 100644 --- a/Weights/include/CGAL/Weights/voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/voronoi_region_weights.h @@ -19,60 +19,6 @@ namespace CGAL { namespace Weights { -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefVoronoiRegionWeights - - \brief computes the area of the Voronoi cell in 2D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT voronoi_area( - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefVoronoiRegionWeights - - \brief computes the area of the Voronoi cell in 3D using the points `p`, `q` - and `r`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT voronoi_area( - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefVoronoiRegionWeights - - \brief computes the area of the Voronoi cell in 2D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT voronoi_area( - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) { } - -/*! - \ingroup PkgWeightsRefVoronoiRegionWeights - - \brief computes the area of the Voronoi cell in 3D using the points `p`, `q` - and `r` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT voronoi_area( - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) { } - -#endif // DOXYGEN_RUNNING - /// \cond SKIP_IN_MANUAL template typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_2& p, diff --git a/Weights/include/CGAL/Weights/wachspress_weights.h b/Weights/include/CGAL/Weights/wachspress_weights.h index 00d843d18d1..c695cfbea4a 100644 --- a/Weights/include/CGAL/Weights/wachspress_weights.h +++ b/Weights/include/CGAL/Weights/wachspress_weights.h @@ -40,40 +40,6 @@ FT weight(const FT A1, const FT A2, const FT C) } // wachspress_ns -/// \endcond - -#if defined(DOXYGEN_RUNNING) - -/*! - \ingroup PkgWeightsRefWachspressWeights - - \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, - and `p2`, given a traits class `traits` with geometric objects, predicates, and constructions. -*/ -template -typename GeomTraits::FT wachspress_weight( - const typename GeomTraits::Point_2& p0, - const typename GeomTraits::Point_2& p1, - const typename GeomTraits::Point_2& p2, - const typename GeomTraits::Point_2& q, - const GeomTraits& traits) { } - -/*! - \ingroup PkgWeightsRefWachspressWeights - - \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, - and `p2` which are parameterized by a `Kernel` K. -*/ -template -typename K::FT wachspress_weight( - const CGAL::Point_2& p0, - const CGAL::Point_2& p1, - const CGAL::Point_2& p2, - const CGAL::Point_2& q) { } - -#endif // DOXYGEN_RUNNING - -/// \cond SKIP_IN_MANUAL template typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_2& t, const typename GeomTraits::Point_2& r, From d20475f3222d1411c9914586e342af7434d057e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 16:29:32 +0200 Subject: [PATCH 057/426] Add missing includes in Weights --- Weights/include/CGAL/Weights/authalic_weights.h | 6 +++++- Weights/include/CGAL/Weights/barycentric_region_weights.h | 5 ++++- Weights/include/CGAL/Weights/cotangent_weights.h | 8 +++++++- Weights/include/CGAL/Weights/discrete_harmonic_weights.h | 6 ++++++ Weights/include/CGAL/Weights/inverse_distance_weights.h | 3 +++ Weights/include/CGAL/Weights/mean_value_weights.h | 8 ++++++++ .../include/CGAL/Weights/mixed_voronoi_region_weights.h | 3 +++ Weights/include/CGAL/Weights/shepard_weights.h | 4 ++++ Weights/include/CGAL/Weights/tangent_weights.h | 8 ++++++-- Weights/include/CGAL/Weights/three_point_family_weights.h | 3 +++ Weights/include/CGAL/Weights/triangular_region_weights.h | 3 +++ Weights/include/CGAL/Weights/uniform_region_weights.h | 3 ++- Weights/include/CGAL/Weights/uniform_weights.h | 5 ++++- Weights/include/CGAL/Weights/voronoi_region_weights.h | 3 +++ Weights/include/CGAL/Weights/wachspress_weights.h | 8 +++++++- 15 files changed, 68 insertions(+), 8 deletions(-) diff --git a/Weights/include/CGAL/Weights/authalic_weights.h b/Weights/include/CGAL/Weights/authalic_weights.h index 447c58f1bea..316fb62289b 100644 --- a/Weights/include/CGAL/Weights/authalic_weights.h +++ b/Weights/include/CGAL/Weights/authalic_weights.h @@ -14,12 +14,16 @@ #ifndef CGAL_AUTHALIC_WEIGHTS_H #define CGAL_AUTHALIC_WEIGHTS_H -#include +#include + +#include +#include namespace CGAL { namespace Weights { /// \cond SKIP_IN_MANUAL + namespace authalic_ns { template diff --git a/Weights/include/CGAL/Weights/barycentric_region_weights.h b/Weights/include/CGAL/Weights/barycentric_region_weights.h index 4b8d5692bf5..f044887186d 100644 --- a/Weights/include/CGAL/Weights/barycentric_region_weights.h +++ b/Weights/include/CGAL/Weights/barycentric_region_weights.h @@ -14,7 +14,10 @@ #ifndef CGAL_BARYCENTRIC_REGION_WEIGHTS_H #define CGAL_BARYCENTRIC_REGION_WEIGHTS_H -#include +#include + +#include +#include namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index b4096632442..65a5908a51e 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -14,7 +14,13 @@ #ifndef CGAL_COTANGENT_WEIGHTS_H #define CGAL_COTANGENT_WEIGHTS_H -#include +#include + +#include +#include +#include +#include +#include namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h index 5f836d0a2bc..865525dbb5f 100644 --- a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h @@ -17,6 +17,12 @@ #include #include +#include +#include +#include + +#include + namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/inverse_distance_weights.h b/Weights/include/CGAL/Weights/inverse_distance_weights.h index a6774ad509a..9d0927c21ee 100644 --- a/Weights/include/CGAL/Weights/inverse_distance_weights.h +++ b/Weights/include/CGAL/Weights/inverse_distance_weights.h @@ -16,6 +16,9 @@ #include +#include +#include + namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/mean_value_weights.h b/Weights/include/CGAL/Weights/mean_value_weights.h index 0e688e72226..33291d74fa7 100644 --- a/Weights/include/CGAL/Weights/mean_value_weights.h +++ b/Weights/include/CGAL/Weights/mean_value_weights.h @@ -17,10 +17,18 @@ #include #include +#include +#include +#include +#include + +#include + namespace CGAL { namespace Weights { /// \cond SKIP_IN_MANUAL + namespace mean_value_ns { template diff --git a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h index 4eea980e123..6808512751f 100644 --- a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h @@ -16,6 +16,9 @@ #include +#include +#include + namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/shepard_weights.h b/Weights/include/CGAL/Weights/shepard_weights.h index 7fbc2e7a6e5..2cfbc76b862 100644 --- a/Weights/include/CGAL/Weights/shepard_weights.h +++ b/Weights/include/CGAL/Weights/shepard_weights.h @@ -16,10 +16,14 @@ #include +#include +#include + namespace CGAL { namespace Weights { /// \cond SKIP_IN_MANUAL + namespace shepard_ns { template diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index f4f6e5c623f..46599707e14 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -14,8 +14,12 @@ #ifndef CGAL_TANGENT_WEIGHTS_H #define CGAL_TANGENT_WEIGHTS_H -// Internal includes. -#include +#include + +#include +#include + +#include namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/three_point_family_weights.h b/Weights/include/CGAL/Weights/three_point_family_weights.h index 44743f8497e..6f2b5f7925f 100644 --- a/Weights/include/CGAL/Weights/three_point_family_weights.h +++ b/Weights/include/CGAL/Weights/three_point_family_weights.h @@ -16,6 +16,9 @@ #include +#include +#include + namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/triangular_region_weights.h b/Weights/include/CGAL/Weights/triangular_region_weights.h index 6975bb38349..9e0f7d2facd 100644 --- a/Weights/include/CGAL/Weights/triangular_region_weights.h +++ b/Weights/include/CGAL/Weights/triangular_region_weights.h @@ -16,6 +16,9 @@ #include +#include +#include + namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/uniform_region_weights.h b/Weights/include/CGAL/Weights/uniform_region_weights.h index fd5d41179a1..a7035fcccdd 100644 --- a/Weights/include/CGAL/Weights/uniform_region_weights.h +++ b/Weights/include/CGAL/Weights/uniform_region_weights.h @@ -14,7 +14,8 @@ #ifndef CGAL_UNIFORM_REGION_WEIGHTS_H #define CGAL_UNIFORM_REGION_WEIGHTS_H -#include +#include +#include namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/uniform_weights.h b/Weights/include/CGAL/Weights/uniform_weights.h index dd96ca4a9f5..be69470d143 100644 --- a/Weights/include/CGAL/Weights/uniform_weights.h +++ b/Weights/include/CGAL/Weights/uniform_weights.h @@ -14,7 +14,10 @@ #ifndef CGAL_UNIFORM_WEIGHTS_H #define CGAL_UNIFORM_WEIGHTS_H -#include +#include +#include + +#include namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/voronoi_region_weights.h b/Weights/include/CGAL/Weights/voronoi_region_weights.h index 729ae98e8a8..5d8f748f26e 100644 --- a/Weights/include/CGAL/Weights/voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/voronoi_region_weights.h @@ -16,6 +16,9 @@ #include +#include +#include + namespace CGAL { namespace Weights { diff --git a/Weights/include/CGAL/Weights/wachspress_weights.h b/Weights/include/CGAL/Weights/wachspress_weights.h index c695cfbea4a..58face6b47a 100644 --- a/Weights/include/CGAL/Weights/wachspress_weights.h +++ b/Weights/include/CGAL/Weights/wachspress_weights.h @@ -14,14 +14,20 @@ #ifndef CGAL_WACHSPRESS_WEIGHTS_H #define CGAL_WACHSPRESS_WEIGHTS_H -// Internal includes. #include #include +#include +#include +#include + +#include + namespace CGAL { namespace Weights { /// \cond SKIP_IN_MANUAL + namespace wachspress_ns { template From 9a438b26c421092100a23b8fac8f4ec9cbe66776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 16:48:56 +0200 Subject: [PATCH 058/426] Use fewer 'auto's --- .../include/CGAL/Weights/authalic_weights.h | 4 +- .../CGAL/Weights/barycentric_region_weights.h | 22 ++- .../include/CGAL/Weights/cotangent_weights.h | 75 ++++---- .../CGAL/Weights/discrete_harmonic_weights.h | 2 +- .../CGAL/Weights/internal/polygon_utils_2.h | 12 +- Weights/include/CGAL/Weights/internal/utils.h | 182 ++++++++++-------- .../include/CGAL/Weights/mean_value_weights.h | 13 +- .../Weights/mixed_voronoi_region_weights.h | 32 +-- .../include/CGAL/Weights/tangent_weights.h | 81 ++++---- Weights/include/CGAL/Weights/utils.h | 27 +-- .../CGAL/Weights/voronoi_region_weights.h | 22 ++- 11 files changed, 255 insertions(+), 217 deletions(-) diff --git a/Weights/include/CGAL/Weights/authalic_weights.h b/Weights/include/CGAL/Weights/authalic_weights.h index 316fb62289b..6700bdbb6ad 100644 --- a/Weights/include/CGAL/Weights/authalic_weights.h +++ b/Weights/include/CGAL/Weights/authalic_weights.h @@ -89,7 +89,7 @@ typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_2& t, { using FT = typename GeomTraits::FT; - const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + auto squared_distance_2 = traits.compute_squared_distance_2_object(); const FT cot_gamma = internal::cotangent_2(traits, t, r, q); const FT cot_beta = internal::cotangent_2(traits, q, r, p); @@ -117,7 +117,7 @@ typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_3& t, { using FT = typename GeomTraits::FT; - const auto squared_distance_3 = traits.compute_squared_distance_3_object(); + auto squared_distance_3 = traits.compute_squared_distance_3_object(); const FT cot_gamma = internal::cotangent_3(traits, t, r, q); const FT cot_beta = internal::cotangent_3(traits, q, r, p); diff --git a/Weights/include/CGAL/Weights/barycentric_region_weights.h b/Weights/include/CGAL/Weights/barycentric_region_weights.h index f044887186d..fe95dedd107 100644 --- a/Weights/include/CGAL/Weights/barycentric_region_weights.h +++ b/Weights/include/CGAL/Weights/barycentric_region_weights.h @@ -29,13 +29,14 @@ typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_2& p, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; - const auto midpoint_2 = traits.construct_midpoint_2_object(); - const auto centroid_2 = traits.construct_centroid_2_object(); + auto midpoint_2 = traits.construct_midpoint_2_object(); + auto centroid_2 = traits.construct_centroid_2_object(); - const auto center = centroid_2(p, q, r); - const auto m1 = midpoint_2(q, r); - const auto m2 = midpoint_2(q, p); + const Point_2 center = centroid_2(p, q, r); + const Point_2 m1 = midpoint_2(q, r); + const Point_2 m2 = midpoint_2(q, p); const FT A1 = internal::positive_area_2(traits, q, m1, center); const FT A2 = internal::positive_area_2(traits, q, center, m2); @@ -58,13 +59,14 @@ typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_3& p, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; - const auto midpoint_3 = traits.construct_midpoint_3_object(); - const auto centroid_3 = traits.construct_centroid_3_object(); + auto midpoint_3 = traits.construct_midpoint_3_object(); + auto centroid_3 = traits.construct_centroid_3_object(); - const auto center = centroid_3(p, q, r); - const auto m1 = midpoint_3(q, r); - const auto m2 = midpoint_3(q, p); + const Point_3 center = centroid_3(p, q, r); + const Point_3 m1 = midpoint_3(q, r); + const Point_3 m2 = midpoint_3(q, p); const FT A1 = internal::positive_area_3(traits, q, m1, center); const FT A2 = internal::positive_area_3(traits, q, center, m2); diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index 65a5908a51e..be6b1b7876d 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -146,11 +146,11 @@ public: FT weight = FT(0); if (is_border_edge(he, m_pmesh)) { - const auto h1 = next(he, m_pmesh); + const halfedge_descriptor h1 = next(he, m_pmesh); - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(h1, m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); @@ -161,13 +161,13 @@ public: } else { - const auto h1 = next(he, m_pmesh); - const auto h2 = prev(opposite(he, m_pmesh), m_pmesh); + const halfedge_descriptor h1 = next(he, m_pmesh); + const halfedge_descriptor h2 = prev(opposite(he, m_pmesh), m_pmesh); - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); - const auto v3 = source(h2, m_pmesh); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(h1, m_pmesh); + const vertex_descriptor v3 = source(h2, m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); @@ -249,8 +249,8 @@ public: GeomTraits traits; - const auto v0 = target(he, pmesh); - const auto v1 = source(he, pmesh); + const vertex_descriptor v0 = target(he, pmesh); + const vertex_descriptor v1 = source(he, pmesh); const auto& p0 = get(pmap, v0); const auto& p1 = get(pmap, v1); @@ -258,12 +258,12 @@ public: FT weight = FT(0); if (is_border_edge(he, pmesh)) { - const auto he_cw = opposite(next(he, pmesh), pmesh); + const halfedge_descriptor he_cw = opposite(next(he, pmesh), pmesh); auto v2 = source(he_cw, pmesh); if (is_border_edge(he_cw, pmesh)) { - const auto he_ccw = prev(opposite(he, pmesh), pmesh); + const halfedge_descriptor he_ccw = prev(opposite(he, pmesh), pmesh); v2 = source(he_ccw, pmesh); const auto& p2 = get(pmap, v2); @@ -289,10 +289,10 @@ public: } else { - const auto he_cw = opposite(next(he, pmesh), pmesh); - const auto v2 = source(he_cw, pmesh); - const auto he_ccw = prev(opposite(he, pmesh), pmesh); - const auto v3 = source(he_ccw, pmesh); + const halfedge_descriptor he_cw = opposite(next(he, pmesh), pmesh); + const vertex_descriptor v2 = source(he_cw, pmesh); + const halfedge_descriptor he_ccw = prev(opposite(he, pmesh), pmesh); + const vertex_descriptor v3 = source(he_ccw, pmesh); const auto& p2 = get(pmap, v2); const auto& p3 = get(pmap, v3); @@ -331,6 +331,7 @@ class Secure_cotangent_weight_with_voronoi_area { using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; const PolygonMesh& m_pmesh; const VertexPointMap m_pmap; @@ -359,8 +360,8 @@ private: FT cotangent_clamped(const halfedge_descriptor he) const { - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); @@ -368,12 +369,12 @@ private: FT weight = FT(0); if (is_border_edge(he, m_pmesh)) { - const auto he_cw = opposite(next(he, m_pmesh), m_pmesh); - auto v2 = source(he_cw, m_pmesh); + const halfedge_descriptor he_cw = opposite(next(he, m_pmesh), m_pmesh); + vertex_descriptor v2 = source(he_cw, m_pmesh); if (is_border_edge(he_cw, m_pmesh)) { - const auto he_ccw = prev(opposite(he, m_pmesh), m_pmesh); + const halfedge_descriptor he_ccw = prev(opposite(he, m_pmesh), m_pmesh); v2 = source(he_ccw, m_pmesh); const auto& p2 = get(m_pmap, v2); @@ -387,10 +388,10 @@ private: } else { - const auto he_cw = opposite(next(he, m_pmesh), m_pmesh); - const auto v2 = source(he_cw, m_pmesh); - const auto he_ccw = prev(opposite(he, m_pmesh), m_pmesh); - const auto v3 = source(he_ccw, m_pmesh); + const halfedge_descriptor he_cw = opposite(next(he, m_pmesh), m_pmesh); + const vertex_descriptor v2 = source(he_cw, m_pmesh); + const halfedge_descriptor he_ccw = prev(opposite(he, m_pmesh), m_pmesh); + const vertex_descriptor v3 = source(he_ccw, m_pmesh); const auto& p2 = get(m_pmap, v2); const auto& p3 = get(m_pmap, v3); @@ -405,27 +406,27 @@ private: FT voronoi(const vertex_descriptor v0) const { - const auto squared_length_3 = m_traits.compute_squared_length_3_object(); - const auto construct_vector_3 = m_traits.construct_vector_3_object(); + auto squared_length_3 = m_traits.compute_squared_length_3_object(); + auto vector_3 = m_traits.construct_vector_3_object(); FT voronoi_area = FT(0); CGAL_assertion(CGAL::is_triangle_mesh(m_pmesh)); - for (const auto& he : halfedges_around_target(halfedge(v0, m_pmesh), m_pmesh)) + for (const halfedge_descriptor& he : halfedges_around_target(halfedge(v0, m_pmesh), m_pmesh)) { CGAL_assertion(v0 == target(he, m_pmesh)); if (is_border(he, m_pmesh)) continue; - const auto v1 = source(he, m_pmesh); - const auto v2 = target(next(he, m_pmesh), m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(next(he, m_pmesh), m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); const auto& p2 = get(m_pmap, v2); - const auto angle0 = CGAL::angle(p1, p0, p2); - const auto angle1 = CGAL::angle(p2, p1, p0); - const auto angle2 = CGAL::angle(p0, p2, p1); + const Angle angle0 = CGAL::angle(p1, p0, p2); + const Angle angle1 = CGAL::angle(p2, p1, p0); + const Angle angle2 = CGAL::angle(p0, p2, p1); const bool obtuse = (angle0 == CGAL::OBTUSE) || (angle1 == CGAL::OBTUSE) || @@ -436,8 +437,8 @@ private: const FT cot_p1 = internal::cotangent_3(m_traits, p2, p1, p0); const FT cot_p2 = internal::cotangent_3(m_traits, p0, p2, p1); - const auto v1 = construct_vector_3(p0, p1); - const auto v2 = construct_vector_3(p0, p2); + const Vector_3 v1 = vector_3(p0, p1); + const Vector_3 v2 = vector_3(p0, p2); const FT t1 = cot_p1 * squared_length_3(v2); const FT t2 = cot_p2 * squared_length_3(v1); diff --git a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h index 865525dbb5f..ea0b89a923b 100644 --- a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h @@ -57,7 +57,7 @@ typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Poin { using FT = typename GeomTraits::FT; - const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + auto squared_distance_2 = traits.compute_squared_distance_2_object(); const FT d1 = squared_distance_2(q, t); const FT d2 = squared_distance_2(q, r); diff --git a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h index c52388c7559..f2933317972 100644 --- a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h +++ b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h @@ -101,9 +101,9 @@ Edge_case bounded_side_2(const VertexRange& polygon, if (next == last) return Edge_case::EXTERIOR; - const auto compare_x_2 = traits.compare_x_2_object(); - const auto compare_y_2 = traits.compare_y_2_object(); - const auto orientation_2 = traits.orientation_2_object(); + auto compare_x_2 = traits.compare_x_2_object(); + auto compare_y_2 = traits.compare_y_2_object(); + auto orientation_2 = traits.orientation_2_object(); bool is_inside = false; auto curr_y_comp_res = compare_y_2(get(point_map, *curr), query); @@ -224,15 +224,15 @@ bool is_convex_2(const VertexRange& polygon, if (next == last) return true; - const auto equal_2 = traits.equal_2_object(); + auto equal_2 = traits.equal_2_object(); while (equal_2(get(point_map, *prev), get(point_map, *curr))) { curr = next; ++next; if (next == last) return true; } - const auto less_xy_2 = traits.less_xy_2_object(); - const auto orientation_2 = traits.orientation_2_object(); + auto less_xy_2 = traits.less_xy_2_object(); + auto orientation_2 = traits.orientation_2_object(); bool has_clockwise_triplets = false; bool has_counterclockwise_triplets = false; diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 58eed2cd389..640ef28e789 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -116,9 +116,9 @@ typename GeomTraits::FT distance_2(const GeomTraits& traits, const typename GeomTraits::Point_2& q) { using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + auto sqrt = Get_sqrt::sqrt_object(traits); - const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + auto squared_distance_2 = traits.compute_squared_distance_2_object(); return sqrt(squared_distance_2(p, q)); } @@ -128,9 +128,9 @@ typename GeomTraits::FT length_2(const GeomTraits& traits, const typename GeomTraits::Vector_2& v) { using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + auto sqrt = Get_sqrt::sqrt_object(traits); - const auto squared_length_2 = traits.compute_squared_length_2_object(); + auto squared_length_2 = traits.compute_squared_length_2_object(); return sqrt(squared_length_2(v)); } @@ -155,12 +155,14 @@ typename GeomTraits::FT cotangent_2(const GeomTraits& traits, const typename GeomTraits::Point_2& r) { using FT = typename GeomTraits::FT; - const auto dot_product_2 = traits.compute_scalar_product_2_object(); - const auto cross_product_2 = traits.compute_determinant_2_object(); - const auto construct_vector_2 = traits.construct_vector_2_object(); + using Vector_2 = typename GeomTraits::Vector_2; - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto cross_product_2 = traits.compute_determinant_2_object(); + auto construct_vector_2 = traits.construct_vector_2_object(); + + const Vector_2 v1 = construct_vector_2(q, r); + const Vector_2 v2 = construct_vector_2(q, p); const FT dot = dot_product_2(v1, v2); const FT cross = cross_product_2(v1, v2); @@ -181,12 +183,14 @@ typename GeomTraits::FT tangent_2(const GeomTraits& traits, const typename GeomTraits::Point_2& r) { using FT = typename GeomTraits::FT; - const auto dot_product_2 = traits.compute_scalar_product_2_object(); - const auto cross_product_2 = traits.compute_determinant_2_object(); - const auto construct_vector_2 = traits.construct_vector_2_object(); + using Vector_2 = typename GeomTraits::Vector_2; - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto cross_product_2 = traits.compute_determinant_2_object(); + auto construct_vector_2 = traits.construct_vector_2_object(); + + const Vector_2 v1 = construct_vector_2(q, r); + const Vector_2 v2 = construct_vector_2(q, p); const FT dot = dot_product_2(v1, v2); const FT cross = cross_product_2(v1, v2); @@ -206,9 +210,9 @@ typename GeomTraits::FT distance_3(const GeomTraits& traits, const typename GeomTraits::Point_3& q) { using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + auto sqrt = Get_sqrt::sqrt_object(traits); - const auto squared_distance_3 = traits.compute_squared_distance_3_object(); + auto squared_distance_3 = traits.compute_squared_distance_3_object(); return sqrt(squared_distance_3(p, q)); } @@ -217,9 +221,9 @@ typename GeomTraits::FT length_3(const GeomTraits& traits, const typename GeomTraits::Vector_3& v) { using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + auto sqrt = Get_sqrt::sqrt_object(traits); - const auto squared_length_3 = traits.compute_squared_length_3_object(); + auto squared_length_3 = traits.compute_squared_length_3_object(); return sqrt(squared_length_3(v)); } @@ -244,15 +248,17 @@ typename GeomTraits::FT cotangent_3(const GeomTraits& traits, const typename GeomTraits::Point_3& r) { using FT = typename GeomTraits::FT; - const auto dot_product_3 = traits.compute_scalar_product_3_object(); - const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + using Vector_3 = typename GeomTraits::Vector_3; - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); const FT dot = dot_product_3(v1, v2); - const auto cross = cross_product_3(v1, v2); + auto cross = cross_product_3(v1, v2); const FT length = length_3(traits, cross); // TODO: @@ -274,15 +280,17 @@ typename GeomTraits::FT tangent_3(const GeomTraits& traits, const typename GeomTraits::Point_3& r) { using FT = typename GeomTraits::FT; - const auto dot_product_3 = traits.compute_scalar_product_3_object(); - const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + using Vector_3 = typename GeomTraits::Vector_3; - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); const FT dot = dot_product_3(v1, v2); - const auto cross = cross_product_3(v1, v2); + auto cross = cross_product_3(v1, v2); const FT length = length_3(traits, cross); // CGAL_assertion(dot != FT(0)); not really necessary @@ -298,7 +306,7 @@ double angle_3(const GeomTraits& traits, const typename GeomTraits::Vector_3& v1, const typename GeomTraits::Vector_3& v2) { - const auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto dot_product_3 = traits.compute_scalar_product_3_object(); const double dot = CGAL::to_double(dot_product_3(v1, v2)); double angle_rad = 0.0; @@ -326,9 +334,9 @@ typename GeomTraits::Point_3 rotate_point_3(const GeomTraits&, const FT s = static_cast(std::sin(angle_rad)); const FT C = FT(1) - c; - const auto x = axis.x(); - const auto y = axis.y(); - const auto z = axis.z(); + const FT x = axis.x(); + const FT y = axis.y(); + const FT z = axis.z(); return Point_3( (x * x * C + c) * query.x() + @@ -349,12 +357,14 @@ void orthogonal_bases_3(const GeomTraits& traits, typename GeomTraits::Vector_3& b1, typename GeomTraits::Vector_3& b2) { + using FT = typename GeomTraits::FT; using Vector_3 = typename GeomTraits::Vector_3; - const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const auto nx = normal.x(); - const auto ny = normal.y(); - const auto nz = normal.z(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + + const FT nx = normal.x(); + const FT ny = normal.y(); + const FT nz = normal.z(); if (CGAL::abs(nz) >= CGAL::abs(ny)) b1 = Vector_3(nz, 0, -nx); @@ -375,15 +385,19 @@ typename GeomTraits::Point_2 to_2d(const GeomTraits& traits, const typename GeomTraits::Point_3& origin, const typename GeomTraits::Point_3& query) { + using FT = typename GeomTraits::FT; using Point_2 = typename GeomTraits::Point_2; - const auto dot_product_3 = traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + using Vector_3 = typename GeomTraits::Vector_3; - const auto v = construct_vector_3(origin, query); - const auto x = dot_product_3(b1, v); - const auto y = dot_product_3(b2, v); + auto point_2 = traits.construct_point_2_object(); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto vector_3 = traits.construct_vector_3_object(); - return Point_2(x, y); + const Vector_3 v = vector_3(origin, query); + const FT x = dot_product_3(b1, v); + const FT y = dot_product_3(b2, v); + + return point_2(x, y); } // Flattening. @@ -457,12 +471,12 @@ void flatten(const GeomTraits& traits, using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; - const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); - const auto centroid_3 = traits.construct_centroid_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + auto centroid_3 = traits.construct_centroid_3_object(); // Compute centroid. - const auto center = centroid_3(t, r, p, q); + const Point_3 center = centroid_3(t, r, p, q); // std::cout << "centroid: " << center << std::endl; // Translate. @@ -477,19 +491,19 @@ void flatten(const GeomTraits& traits, // std::cout << "translated q1: " << q1 << std::endl; // Middle axis. - auto ax = construct_vector_3(q1, r1); + Vector_3 ax = vector_3(q1, r1); normalize_3(traits, ax); // Prev and next vectors. - auto v1 = construct_vector_3(q1, t1); - auto v2 = construct_vector_3(q1, p1); + Vector_3 v1 = vector_3(q1, t1); + Vector_3 v2 = vector_3(q1, p1); normalize_3(traits, v1); normalize_3(traits, v2); // Two triangle normals. - auto n1 = cross_product_3(v1, ax); - auto n2 = cross_product_3(ax, v2); + Vector_3 n1 = cross_product_3(v1, ax); + Vector_3 n2 = cross_product_3(ax, v2); normalize_3(traits, n1); normalize_3(traits, n2); @@ -502,22 +516,22 @@ void flatten(const GeomTraits& traits, // std::cout << "angle deg n1 <-> n2: " << angle_rad * 180.0 / CGAL_PI << std::endl; // Rotate p1 around ax so that it lands onto the plane [q1, t1, r1]. - const auto& t2 = t1; - const auto& r2 = r1; - const auto p2 = rotate_point_3(traits, angle_rad, ax, p1); - const auto& q2 = q1; + const Point_3& t2 = t1; + const Point_3& r2 = r1; + const Point_3 p2 = rotate_point_3(traits, angle_rad, ax, p1); + const Point_3& q2 = q1; // std::cout << "rotated p2: " << p2 << std::endl; // Compute orthogonal base vectors. Vector_3 b1, b2; - const auto& normal = n1; + const Vector_3& normal = n1; orthogonal_bases_3(traits, normal, b1, b2); - // const auto angle12 = angle_3(traits, b1, b2); + // const Angle angle12 = angle_3(traits, b1, b2); // std::cout << "angle deg b1 <-> b2: " << angle12 * 180.0 / CGAL_PI << std::endl; // Flatten a quad. - const auto& origin = q2; + const Point_3& origin = q2; tf = to_2d(traits, b1, b2, origin, t2); rf = to_2d(traits, b1, b2, origin, r2); pf = to_2d(traits, b1, b2, origin, p2); @@ -541,7 +555,7 @@ typename GeomTraits::FT area_2(const GeomTraits& traits, const typename GeomTraits::Point_2& q, const typename GeomTraits::Point_2& r) { - const auto area_2 = traits.compute_area_2_object(); + auto area_2 = traits.compute_area_2_object(); return area_2(p, q, r); } @@ -563,15 +577,16 @@ typename GeomTraits::FT area_3(const GeomTraits& traits, const typename GeomTraits::Point_3& r) { using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; - const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); - const auto centroid_3 = traits.construct_centroid_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + auto centroid_3 = traits.construct_centroid_3_object(); // Compute centroid. - const auto center = centroid_3(p, q, r); + const Point_3 center = centroid_3(p, q, r); // Translate. const Point_3 a = Point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); @@ -579,13 +594,13 @@ typename GeomTraits::FT area_3(const GeomTraits& traits, const Point_3 c = Point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); // Prev and next vectors. - auto v1 = construct_vector_3(b, a); - auto v2 = construct_vector_3(b, c); + Vector_3 v1 = vector_3(b, a); + Vector_3 v2 = vector_3(b, c); normalize_3(traits, v1); normalize_3(traits, v2); // Compute normal. - auto normal = cross_product_3(v1, v2); + Vector_3 normal = cross_product_3(v1, v2); normalize_3(traits, normal); // Compute orthogonal base vectors. @@ -593,10 +608,10 @@ typename GeomTraits::FT area_3(const GeomTraits& traits, orthogonal_bases_3(traits, normal, b1, b2); // Compute area. - const auto& origin = b; - const auto pf = to_2d(traits, b1, b2, origin, a); - const auto qf = to_2d(traits, b1, b2, origin, b); - const auto rf = to_2d(traits, b1, b2, origin, c); + const Point_3& origin = b; + const Point_2 pf = to_2d(traits, b1, b2, origin, a); + const Point_2 qf = to_2d(traits, b1, b2, origin, b); + const Point_2 rf = to_2d(traits, b1, b2, origin, c); const FT A = area_2(traits, pf, qf, rf); return A; @@ -610,14 +625,15 @@ typename GeomTraits::FT positive_area_3(const GeomTraits& traits, const typename GeomTraits::Point_3& r) { using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; - const auto construct_vector_3 = traits.construct_vector_3_object(); - const auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); - const auto cross = cross_product_3(v1, v2); + Vector_3 cross = cross_product_3(v1, v2); const FT half = FT(1) / FT(2); const FT A = half * length_3(traits, cross); return A; @@ -633,14 +649,16 @@ typename GeomTraits::FT cotangent_3_clamped(const GeomTraits& traits, const typename GeomTraits::Point_3& r) { using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; + using Get_sqrt = Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + auto sqrt = Get_sqrt::sqrt_object(traits); - const auto dot_product_3 = traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto vector_3 = traits.construct_vector_3_object(); - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); const FT dot = dot_product_3(v1, v2); const FT length_v1 = length_3(traits, v1); diff --git a/Weights/include/CGAL/Weights/mean_value_weights.h b/Weights/include/CGAL/Weights/mean_value_weights.h index 33291d74fa7..c08ccef1c51 100644 --- a/Weights/include/CGAL/Weights/mean_value_weights.h +++ b/Weights/include/CGAL/Weights/mean_value_weights.h @@ -62,7 +62,7 @@ typename GeomTraits::FT weight(const GeomTraits& traits, using FT = typename GeomTraits::FT; using Get_sqrt = internal::Get_sqrt; - const auto sqrt = Get_sqrt::sqrt_object(traits); + auto sqrt = Get_sqrt::sqrt_object(traits); const FT P1 = r1 * r2 + D1; const FT P2 = r2 * r3 + D2; @@ -92,13 +92,14 @@ typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_2& t, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Vector_2 = typename GeomTraits::Vector_2; - const auto dot_product_2 = traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = traits.construct_vector_2_object(); + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto construct_vector_2 = traits.construct_vector_2_object(); - const auto v1 = construct_vector_2(q, t); - const auto v2 = construct_vector_2(q, r); - const auto v3 = construct_vector_2(q, p); + const Vector_2 v1 = construct_vector_2(q, t); + const Vector_2 v2 = construct_vector_2(q, r); + const Vector_2 v3 = construct_vector_2(q, p); const FT l1 = internal::length_2(traits, v1); const FT l2 = internal::length_2(traits, v2); diff --git a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h index 6808512751f..1e5ab27327c 100644 --- a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h @@ -32,13 +32,13 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p using FT = typename GeomTraits::FT; using Point_2 = typename GeomTraits::Point_2; - const auto angle_2 = traits.angle_2_object(); - const auto midpoint_2 = traits.construct_midpoint_2_object(); - const auto circumcenter_2 = traits.construct_circumcenter_2_object(); + auto angle_2 = traits.angle_2_object(); + auto midpoint_2 = traits.construct_midpoint_2_object(); + auto circumcenter_2 = traits.construct_circumcenter_2_object(); - const auto a1 = angle_2(p, q, r); - const auto a2 = angle_2(q, r, p); - const auto a3 = angle_2(r, p, q); + const Angle a1 = angle_2(p, q, r); + const Angle a2 = angle_2(q, r, p); + const Angle a3 = angle_2(r, p, q); Point_2 center; if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) @@ -46,8 +46,8 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p else center = midpoint_2(r, p); - const auto m1 = midpoint_2(q, r); - const auto m2 = midpoint_2(q, p); + const Point_2 m1 = midpoint_2(q, r); + const Point_2 m2 = midpoint_2(q, p); const FT A1 = internal::positive_area_2(traits, q, m1, center); const FT A2 = internal::positive_area_2(traits, q, center, m2); @@ -72,13 +72,13 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_3& p using FT = typename GeomTraits::FT; using Point_3 = typename GeomTraits::Point_3; - const auto angle_3 = traits.angle_3_object(); - const auto midpoint_3 = traits.construct_midpoint_3_object(); - const auto circumcenter_3 = traits.construct_circumcenter_3_object(); + auto angle_3 = traits.angle_3_object(); + auto midpoint_3 = traits.construct_midpoint_3_object(); + auto circumcenter_3 = traits.construct_circumcenter_3_object(); - const auto a1 = angle_3(p, q, r); - const auto a2 = angle_3(q, r, p); - const auto a3 = angle_3(r, p, q); + const Angle a1 = angle_3(p, q, r); + const Angle a2 = angle_3(q, r, p); + const Angle a3 = angle_3(r, p, q); Point_3 center; if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) @@ -86,8 +86,8 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_3& p else center = midpoint_3(r, p); - const auto m1 = midpoint_3(q, r); - const auto m2 = midpoint_3(q, p); + const Point_3 m1 = midpoint_3(q, r); + const Point_3 m2 = midpoint_3(q, p); const FT A1 = internal::positive_area_3(traits, q, m1, center); const FT A2 = internal::positive_area_3(traits, q, center, m2); diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 46599707e14..9986d115bcd 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -103,13 +103,14 @@ typename GeomTraits::FT tangent_weight_v1(const typename GeomTraits::Point_3& t, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; - const auto dot_product_3 = traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto construct_vector_3 = traits.construct_vector_3_object(); - const auto v1 = construct_vector_3(q, t); - const auto v2 = construct_vector_3(q, r); - const auto v3 = construct_vector_3(q, p); + const Vector_3 v1 = construct_vector_3(q, t); + const Vector_3 v2 = construct_vector_3(q, r); + const Vector_3 v3 = construct_vector_3(q, p); const FT l1 = internal::length_3(traits, v1); const FT l2 = internal::length_3(traits, v2); @@ -134,12 +135,13 @@ typename GeomTraits::FT tangent_weight_v2(const typename GeomTraits::Point_3& t, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; - const auto construct_vector_3 = traits.construct_vector_3_object(); + auto construct_vector_3 = traits.construct_vector_3_object(); - auto v1 = construct_vector_3(q, t); - auto v2 = construct_vector_3(q, r); - auto v3 = construct_vector_3(q, p); + Vector_3 v1 = construct_vector_3(q, t); + Vector_3 v2 = construct_vector_3(q, r); + Vector_3 v3 = construct_vector_3(q, p); const FT l2 = internal::length_3(traits, v2); @@ -247,12 +249,14 @@ typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_2& t, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const auto dot_product_2 = traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = traits.construct_vector_2_object(); + using Vector_2 = typename GeomTraits::Vector_2; - const auto v1 = construct_vector_2(q, t); - const auto v2 = construct_vector_2(q, r); - const auto v3 = construct_vector_2(q, p); + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto construct_vector_2 = traits.construct_vector_2_object(); + + const Vector_2 v1 = construct_vector_2(q, t); + const Vector_2 v2 = construct_vector_2(q, r); + const Vector_2 v3 = construct_vector_2(q, p); const FT l1 = internal::length_2(traits, v1); const FT l2 = internal::length_2(traits, v2); @@ -327,11 +331,11 @@ public: FT weight = FT(0); if (is_border_edge(he, m_pmesh)) { - const auto h1 = next(he, m_pmesh); + const halfedge_descriptor h1 = next(he, m_pmesh); - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(h1, m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); @@ -341,13 +345,13 @@ public: } else { - const auto h1 = next(he, m_pmesh); - const auto h2 = prev(opposite(he, m_pmesh), m_pmesh); + const halfedge_descriptor h1 = next(he, m_pmesh); + const halfedge_descriptor h2 = prev(opposite(he, m_pmesh), m_pmesh); - const auto v0 = target(he, m_pmesh); - const auto v1 = source(he, m_pmesh); - const auto v2 = target(h1, m_pmesh); - const auto v3 = source(h2, m_pmesh); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(h1, m_pmesh); + const vertex_descriptor v3 = source(h2, m_pmesh); const auto& p0 = get(m_pmap, v0); const auto& p1 = get(m_pmap, v1); @@ -375,22 +379,24 @@ public: const CGAL::Point_2& q, const CGAL::Point_2& r) { + using Vector_2 = typename GeomTraits::Vector_2; + const GeomTraits traits; - const auto scalar_product_2 = traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = traits.construct_vector_2_object(); + auto scalar_product_2 = traits.compute_scalar_product_2_object(); + auto construct_vector_2 = traits.construct_vector_2_object(); m_d_r = internal::distance_2(traits, q, r); CGAL_assertion(m_d_r != FT(0)); // two points are identical! m_d_p = internal::distance_2(traits, q, p); CGAL_assertion(m_d_p != FT(0)); // two points are identical! - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); + const Vector_2 v1 = construct_vector_2(q, r); + const Vector_2 v2 = construct_vector_2(q, p); - const auto A = internal::positive_area_2(traits, p, q, r); + const FT A = internal::positive_area_2(traits, p, q, r); CGAL_assertion(A != FT(0)); // three points are identical! - const auto S = scalar_product_2(v1, v2); + const FT S = scalar_product_2(v1, v2); m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); } @@ -399,21 +405,24 @@ public: const CGAL::Point_3& q, const CGAL::Point_3& r) { + using Vector_3 = typename GeomTraits::Vector_3; + const GeomTraits traits; - const auto scalar_product_3 = traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + + auto scalar_product_3 = traits.compute_scalar_product_3_object(); + auto construct_vector_3 = traits.construct_vector_3_object(); m_d_r = internal::distance_3(traits, q, r); CGAL_assertion(m_d_r != FT(0)); // two points are identical! m_d_p = internal::distance_3(traits, q, p); CGAL_assertion(m_d_p != FT(0)); // two points are identical! - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); + const Vector_3 v1 = construct_vector_3(q, r); + const Vector_3 v2 = construct_vector_3(q, p); - const auto A = internal::positive_area_3(traits, p, q, r); + const FT A = internal::positive_area_3(traits, p, q, r); CGAL_assertion(A != FT(0)); // three points are identical! - const auto S = scalar_product_3(v1, v2); + const FT S = scalar_product_3(v1, v2); m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); } diff --git a/Weights/include/CGAL/Weights/utils.h b/Weights/include/CGAL/Weights/utils.h index 6c72a4e27c8..fe4f5705afd 100644 --- a/Weights/include/CGAL/Weights/utils.h +++ b/Weights/include/CGAL/Weights/utils.h @@ -104,7 +104,7 @@ typename GeomTraits::FT squared_distance(const CGAL::Point_2& p, const CGAL::Point_2& q) { const GeomTraits traits; - const auto squared_distance_2 = traits.compute_squared_distance_2_object(); + auto squared_distance_2 = traits.compute_squared_distance_2_object(); return squared_distance_2(p, q); } @@ -113,7 +113,7 @@ typename GeomTraits::FT squared_distance(const CGAL::Point_3& p, const CGAL::Point_3& q) { const GeomTraits traits; - const auto squared_distance_3 = traits.compute_squared_distance_3_object(); + auto squared_distance_3 = traits.compute_squared_distance_3_object(); return squared_distance_3(p, q); } @@ -156,13 +156,15 @@ typename GeomTraits::FT scalar_product(const CGAL::Point_2& p, const CGAL::Point_2& q, const CGAL::Point_2& r) { + using Vector_2 = typename GeomTraits::Vector_2; + const GeomTraits traits; - const auto scalar_product_2 = traits.compute_scalar_product_2_object(); - const auto construct_vector_2 = traits.construct_vector_2_object(); + auto scalar_product_2 = traits.compute_scalar_product_2_object(); + auto construct_vector_2 = traits.construct_vector_2_object(); - const auto v1 = construct_vector_2(q, r); - const auto v2 = construct_vector_2(q, p); + const Vector_2 v1 = construct_vector_2(q, r); + const Vector_2 v2 = construct_vector_2(q, p); return scalar_product_2(v1, v2); } @@ -171,12 +173,15 @@ typename GeomTraits::FT scalar_product(const CGAL::Point_3& p, const CGAL::Point_3& q, const CGAL::Point_3& r) { - const GeomTraits traits; - const auto scalar_product_3 = traits.compute_scalar_product_3_object(); - const auto construct_vector_3 = traits.construct_vector_3_object(); + using Vector_3 = typename GeomTraits::Vector_3; - const auto v1 = construct_vector_3(q, r); - const auto v2 = construct_vector_3(q, p); + const GeomTraits traits; + + auto scalar_product_3 = traits.compute_scalar_product_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); return scalar_product_3(v1, v2); } diff --git a/Weights/include/CGAL/Weights/voronoi_region_weights.h b/Weights/include/CGAL/Weights/voronoi_region_weights.h index 5d8f748f26e..61880e73ff8 100644 --- a/Weights/include/CGAL/Weights/voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/voronoi_region_weights.h @@ -30,13 +30,14 @@ typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_2& p, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; - const auto circumcenter_2 = traits.construct_circumcenter_2_object(); - const auto midpoint_2 = traits.construct_midpoint_2_object(); + auto circumcenter_2 = traits.construct_circumcenter_2_object(); + auto midpoint_2 = traits.construct_midpoint_2_object(); - const auto center = circumcenter_2(p, q, r); - const auto m1 = midpoint_2(q, r); - const auto m2 = midpoint_2(q, p); + const Point_2 center = circumcenter_2(p, q, r); + const Point_2 m1 = midpoint_2(q, r); + const Point_2 m2 = midpoint_2(q, p); const FT A1 = internal::positive_area_2(traits, q, m1, center); const FT A2 = internal::positive_area_2(traits, q, center, m2); @@ -59,13 +60,14 @@ typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_3& p, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Point_3 = typename GeomTraits::Point_3; - const auto circumcenter_3 = traits.construct_circumcenter_3_object(); - const auto midpoint_3 = traits.construct_midpoint_3_object(); + auto circumcenter_3 = traits.construct_circumcenter_3_object(); + auto midpoint_3 = traits.construct_midpoint_3_object(); - const auto center = circumcenter_3(p, q, r); - const auto m1 = midpoint_3(q, r); - const auto m2 = midpoint_3(q, p); + const Point_3 center = circumcenter_3(p, q, r); + const Point_3 m1 = midpoint_3(q, r); + const Point_3 m2 = midpoint_3(q, p); const FT A1 = internal::positive_area_3(traits, q, m1, center); const FT A2 = internal::positive_area_3(traits, q, center, m2); From 85132eea04c7c8c6994b0b7b8821f4f56c134e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 17:02:29 +0200 Subject: [PATCH 059/426] More re-indentation --- .../Weights/internal/pmp_weights_deprecated.h | 744 ++++++++---------- 1 file changed, 329 insertions(+), 415 deletions(-) diff --git a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h index 942ad0dc8d5..fb44deac937 100644 --- a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h +++ b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h @@ -41,19 +41,18 @@ namespace deprecated { // (i.e. for v0, v1, v2 and v2, v1, v0 the returned cot weights can be slightly different). // This one provides stable results. template -struct Cotangent_value_Meyer_impl { - +struct Cotangent_value_Meyer_impl +{ typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; template - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2, - const VertexPointMap& ppmap) { - + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2, + const VertexPointMap& ppmap) + { typedef typename Kernel_traits< - typename boost::property_traits::value_type >::Kernel::Vector_3 Vector; + typename boost::property_traits::value_type >::Kernel::Vector_3 Vector; const Vector a = get(ppmap, v0) - get(ppmap, v1); const Vector b = get(ppmap, v2) - get(ppmap, v1); @@ -66,28 +65,27 @@ struct Cotangent_value_Meyer_impl { // double divider = CGAL::sqrt(dot_aa * dot_bb - dot_ab * dot_ab); const Vector cross_ab = CGAL::cross_product(a, b); - const double divider = CGAL::to_double( - CGAL::approximate_sqrt(cross_ab * cross_ab)); + const double divider = CGAL::to_double(CGAL::approximate_sqrt(cross_ab * cross_ab)); - if (divider == 0.0 /* || divider != divider */) { + if (divider == 0.0 /* || divider != divider */) + { CGAL::collinear(get(ppmap, v0), get(ppmap, v1), get(ppmap, v2)) ? - CGAL_warning_msg(false, "Infinite Cotangent value with the degenerate triangle!") : - CGAL_warning_msg(false, "Infinite Cotangent value due to the floating point arithmetic!"); + CGAL_warning_msg(false, "Infinite Cotangent value with the degenerate triangle!") : + CGAL_warning_msg(false, "Infinite Cotangent value due to the floating point arithmetic!"); - return dot_ab > 0.0 ? - (std::numeric_limits::max)() : - -(std::numeric_limits::max)(); + return dot_ab > 0.0 ? (std::numeric_limits::max)() : + -(std::numeric_limits::max)(); } + return dot_ab / divider; } }; // Same as above but with a different API. -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> -class Cotangent_value_Meyer { - +template::type> +class Cotangent_value_Meyer +{ protected: typedef VertexPointMap Point_property_map; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -98,36 +96,27 @@ protected: Point_property_map ppmap_; public: - Cotangent_value_Meyer( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - pmesh_(pmesh_), - ppmap_(vpmap_) + Cotangent_value_Meyer(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : pmesh_(pmesh_), ppmap_(vpmap_) { } - PolygonMesh& pmesh() { - return pmesh_; - } - - Point_property_map& ppmap() { - return ppmap_; - } - - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + PolygonMesh& pmesh() { return pmesh_; } + Point_property_map& ppmap() { return ppmap_; } + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { return Cotangent_value_Meyer_impl()(v0, v1, v2, ppmap()); } }; // Imported from skeletonization. -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> -class Cotangent_value_Meyer_secure { - +template::type> +class Cotangent_value_Meyer_secure +{ typedef VertexPointMap Point_property_map; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::property_traits::value_type Point; @@ -137,26 +126,18 @@ class Cotangent_value_Meyer_secure { Point_property_map ppmap_; public: - Cotangent_value_Meyer_secure( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - pmesh_(pmesh_), - ppmap_(vpmap_) + Cotangent_value_Meyer_secure(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : pmesh_(pmesh_), ppmap_(vpmap_) { } - PolygonMesh& pmesh() { - return pmesh_; - } - - Point_property_map& ppmap() { - return ppmap_; - } - - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + PolygonMesh& pmesh() { return pmesh_; } + Point_property_map& ppmap() { return ppmap_; } + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { const Vector a = get(ppmap(), v0) - get(ppmap(), v1); const Vector b = get(ppmap(), v2) - get(ppmap(), v1); @@ -174,37 +155,28 @@ public: // Returns the cotangent value of the half angle [v0, v1, v2] by clamping between // [1, 89] degrees as suggested by -[Friedel] Unconstrained Spherical Parameterization-. -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Cotangent_value_clamped : CotangentValue { - - Cotangent_value_clamped() - { } +template::type, +typename CotangentValue = Cotangent_value_Meyer > +class Cotangent_value_clamped : CotangentValue +{ + Cotangent_value_clamped() { } public: - Cotangent_value_clamped( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Cotangent_value_clamped(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { - + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { const double cot_1 = 57.289962; const double cot_89 = 0.017455; const double value = CotangentValue::operator()(v0, v1, v2); @@ -212,37 +184,28 @@ public: } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Cotangent_value_clamped_2 : CotangentValue { - - Cotangent_value_clamped_2() - { } +template::type, +typename CotangentValue = Cotangent_value_Meyer > +class Cotangent_value_clamped_2 : CotangentValue +{ + Cotangent_value_clamped_2() { } public: - Cotangent_value_clamped_2( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Cotangent_value_clamped_2(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { - + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { const double cot_5 = 5.671282; const double cot_175 = -cot_5; const double value = CotangentValue::operator()(v0, v1, v2); @@ -250,80 +213,66 @@ public: } }; -template< - typename PolygonMesh, - typename CotangentValue = Cotangent_value_Meyer_impl > -struct Cotangent_value_minimum_zero_impl : CotangentValue { - +template > +struct Cotangent_value_minimum_zero_impl + : CotangentValue +{ typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; template - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2, - const VertexPointMap ppmap) { - + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2, + const VertexPointMap ppmap) + { const double value = CotangentValue::operator()(v0, v1, v2, ppmap); return (std::max)(0.0, value); } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Cotangent_value_minimum_zero : CotangentValue { - +template::type, +typename CotangentValue = Cotangent_value_Meyer > +class Cotangent_value_minimum_zero : CotangentValue +{ Cotangent_value_minimum_zero() { } public: - Cotangent_value_minimum_zero( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Cotangent_value_minimum_zero(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { const double value = CotangentValue::operator()(v0, v1, v2); return (std::max)(0.0, value); } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Voronoi_area : CotangentValue { - +template::type, + typename CotangentValue = Cotangent_value_Meyer > +class Voronoi_area + : CotangentValue +{ public: - Voronoi_area( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Voronoi_area(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::in_edge_iterator in_edge_iterator; @@ -333,13 +282,13 @@ public: typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel::Vector_3 Vector; - double operator()(vertex_descriptor v0) { - + double operator()(vertex_descriptor v0) + { // return 1.0; double voronoi_area = 0.0; for (const halfedge_descriptor he : - halfedges_around_target(halfedge(v0, pmesh()), pmesh())) { - + halfedges_around_target(halfedge(v0, pmesh()), pmesh())) + { if (is_border(he, pmesh()) ) { continue; } CGAL_assertion(CGAL::is_triangle_mesh(pmesh())); @@ -356,12 +305,12 @@ public: const CGAL::Angle angle1 = CGAL::angle(v_op_p, v1_p, v0_p); const CGAL::Angle angle_op = CGAL::angle(v0_p, v_op_p, v1_p); - bool obtuse = - (angle0 == CGAL::OBTUSE) || - (angle1 == CGAL::OBTUSE) || - (angle_op == CGAL::OBTUSE); + bool obtuse = (angle0 == CGAL::OBTUSE) || + (angle1 == CGAL::OBTUSE) || + (angle_op == CGAL::OBTUSE); - if (!obtuse) { + if (!obtuse) + { const double cot_v1 = CotangentValue::operator()(v_op, v1, v0); const double cot_v_op = CotangentValue::operator()(v0, v_op, v1); @@ -369,18 +318,18 @@ public: const double term2 = cot_v_op * to_double((v1_p - v0_p).squared_length()); voronoi_area += (1.0 / 8.0) * (term1 + term2); - } else { - const double area_t = to_double( - CGAL::approximate_sqrt( - CGAL::squared_area(v0_p, v1_p, v_op_p))); + } + else + { + const double area_t = to_double(CGAL::approximate_sqrt(CGAL::squared_area(v0_p, v1_p, v_op_p))); - if (angle0 == CGAL::OBTUSE) { + if (angle0 == CGAL::OBTUSE) voronoi_area += area_t / 2.0; - } else { + else voronoi_area += area_t / 4.0; - } } } + CGAL_warning_msg(voronoi_area != 0.0, "Zero Voronoi area!"); return voronoi_area; } @@ -388,118 +337,103 @@ public: // Returns the cotangent value of the half angle [v0, v1, v2] by dividing the triangle area // as suggested by -[Mullen08] Spectral Conformal Parameterization-. -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Cotangent_value_area_weighted : CotangentValue { - - Cotangent_value_area_weighted() - { } +template::type, + typename CotangentValue = Cotangent_value_Meyer > +class Cotangent_value_area_weighted + : CotangentValue +{ + Cotangent_value_area_weighted() { } public: - Cotangent_value_area_weighted( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : + Cotangent_value_area_weighted(PolygonMesh& pmesh_, + VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - double operator()( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { - + double operator()(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { return CotangentValue::operator()(v0, v1, v2) / - CGAL::sqrt(CGAL::squared_area( - get(this->ppmap(), v0), - get(this->ppmap(), v1), - get(this->ppmap(), v2))); + CGAL::sqrt(CGAL::squared_area(get(this->ppmap(), v0), + get(this->ppmap(), v1), + get(this->ppmap(), v2))); } }; // Cotangent weight calculator: // Cotangent_value: as suggested by -[Sorkine07] ARAP Surface Modeling-. // Cotangent_value_area_weighted: as suggested by -[Mullen08] Spectral Conformal Parameterization-. -template< - typename PolygonMesh, - typename CotangentValue = Cotangent_value_minimum_zero_impl > -struct Cotangent_weight_impl : CotangentValue { - +template > +struct Cotangent_weight_impl + : CotangentValue +{ typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; // Returns the cotangent weight of the specified halfedge_descriptor. // Edge orientation is trivial. template - double operator()( - halfedge_descriptor he, - PolygonMesh& pmesh, - const VertexPointMap& ppmap) { - + double operator()(halfedge_descriptor he, + PolygonMesh& pmesh, + const VertexPointMap& ppmap) + { const vertex_descriptor v0 = target(he, pmesh); const vertex_descriptor v1 = source(he, pmesh); // Only one triangle for border edges. - if (is_border_edge(he, pmesh)) { - + if (is_border_edge(he, pmesh)) + { const halfedge_descriptor he_cw = opposite(next(he, pmesh), pmesh); vertex_descriptor v2 = source(he_cw, pmesh); - if (is_border_edge(he_cw, pmesh)) { + if (is_border_edge(he_cw, pmesh)) + { const halfedge_descriptor he_ccw = prev(opposite(he, pmesh), pmesh); v2 = source(he_ccw, pmesh); } - return (CotangentValue::operator()(v0, v2, v1, ppmap) / 2.0); - } else { + return (CotangentValue::operator()(v0, v2, v1, ppmap) / 2.0); + } + else + { const halfedge_descriptor he_cw = opposite(next(he, pmesh), pmesh); const vertex_descriptor v2 = source(he_cw, pmesh); const halfedge_descriptor he_ccw = prev(opposite(he, pmesh), pmesh); const vertex_descriptor v3 = source(he_ccw, pmesh); - return ( - CotangentValue::operator()(v0, v2, v1, ppmap) / 2.0 + - CotangentValue::operator()(v0, v3, v1, ppmap) / 2.0 ); + return (CotangentValue::operator()(v0, v2, v1, ppmap) / 2.0 + + CotangentValue::operator()(v0, v3, v1, ppmap) / 2.0 ); } } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_minimum_zero > -class Cotangent_weight : CotangentValue { - - Cotangent_weight() - { } +template::type, + typename CotangentValue = Cotangent_value_minimum_zero > +class Cotangent_weight + : CotangentValue +{ + Cotangent_weight() { } public: - Cotangent_weight( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Cotangent_weight(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - Cotangent_weight(PolygonMesh& pmesh_) : - CotangentValue(pmesh_, get(CGAL::vertex_point, pmesh_)) + Cotangent_weight(PolygonMesh& pmesh_) + : CotangentValue(pmesh_, get(CGAL::vertex_point, pmesh_)) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -510,52 +444,55 @@ public: // Returns the cotangent weight of the specified halfedge_descriptor. // Edge orientation is trivial. - double operator()(halfedge_descriptor he) { + double operator()(halfedge_descriptor he) + { const vertex_descriptor v0 = target(he, pmesh()); const vertex_descriptor v1 = source(he, pmesh()); // Only one triangle for border edges. - if (is_border_edge(he, pmesh())) { - + if (is_border_edge(he, pmesh())) + { const halfedge_descriptor he_cw = opposite(next(he, pmesh()), pmesh()); vertex_descriptor v2 = source(he_cw, pmesh()); - if (is_border_edge(he_cw, pmesh())) { + if (is_border_edge(he_cw, pmesh())) + { const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); v2 = source(he_ccw, pmesh()); } - return (CotangentValue::operator()(v0, v2, v1) / 2.0); - } else { + return (CotangentValue::operator()(v0, v2, v1) / 2.0); + } + else + { const halfedge_descriptor he_cw = opposite(next(he, pmesh()), pmesh()); const vertex_descriptor v2 = source(he_cw, pmesh()); const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); const vertex_descriptor v3 = source(he_ccw, pmesh()); - return ( - CotangentValue::operator()(v0, v2, v1) / 2.0 + - CotangentValue::operator()(v0, v3, v1) / 2.0 ); + return (CotangentValue::operator()(v0, v2, v1) / 2.0 + + CotangentValue::operator()(v0, v3, v1) / 2.0 ); } } }; // Single cotangent from -[Chao10] Simple Geometric Model for Elastic Deformation. -template< - typename PolygonMesh, - typename CotangentValue = Cotangent_value_Meyer_impl > -struct Single_cotangent_weight_impl : CotangentValue { - +template > +struct Single_cotangent_weight_impl + : CotangentValue +{ typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; // Returns the cotangent of the opposite angle of the edge // 0 for border edges (which does not have an opposite angle). template - double operator()( - halfedge_descriptor he, - PolygonMesh& pmesh, - const VertexPointMap& ppmap) { - - if (is_border(he, pmesh)) { return 0.0; } + double operator()(halfedge_descriptor he, + PolygonMesh& pmesh, + const VertexPointMap& ppmap) + { + if (is_border(he, pmesh)) + return 0.0; const vertex_descriptor v0 = target(he, pmesh); const vertex_descriptor v1 = source(he, pmesh); @@ -564,29 +501,22 @@ struct Single_cotangent_weight_impl : CotangentValue { } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Single_cotangent_weight : CotangentValue { - - Single_cotangent_weight() - { } +template::type, + typename CotangentValue = Cotangent_value_Meyer > +class Single_cotangent_weight + : CotangentValue +{ + Single_cotangent_weight() { } public: - Single_cotangent_weight( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Single_cotangent_weight(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } - - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -597,9 +527,10 @@ public: // Returns the cotangent of the opposite angle of the edge // 0 for border edges (which does not have an opposite angle). - double operator()(halfedge_descriptor he) { - - if (is_border(he, pmesh())) { return 0.0; } + double operator()(halfedge_descriptor he) + { + if (is_border(he, pmesh())) + return 0.0; const vertex_descriptor v0 = target(he, pmesh()); const vertex_descriptor v1 = source(he, pmesh()); @@ -608,12 +539,12 @@ public: } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type, - typename CotangentValue = Cotangent_value_Meyer > -class Cotangent_weight_with_triangle_area : CotangentValue { - +template::type, + typename CotangentValue = Cotangent_value_Meyer > +class Cotangent_weight_with_triangle_area + : CotangentValue +{ typedef PolygonMesh PM; typedef VertexPointMap VPMap; typedef typename boost::property_traits::value_type Point; @@ -621,33 +552,29 @@ class Cotangent_weight_with_triangle_area : CotangentValue { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - Cotangent_weight_with_triangle_area() - { } + Cotangent_weight_with_triangle_area() { } public: - Cotangent_weight_with_triangle_area( - PolygonMesh& pmesh_, - VertexPointMap vpmap_) : - CotangentValue(pmesh_, vpmap_) + Cotangent_weight_with_triangle_area(PolygonMesh& pmesh_, + VertexPointMap vpmap_) + : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { - return CotangentValue::pmesh(); - } + PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap& ppmap() { return CotangentValue::ppmap(); } - VertexPointMap& ppmap() { - return CotangentValue::ppmap(); - } - - double operator()(halfedge_descriptor he) { + double operator()(halfedge_descriptor he) + { const vertex_descriptor v0 = target(he, pmesh()); const vertex_descriptor v1 = source(he, pmesh()); // Only one triangle for border edges. - if (is_border_edge(he, pmesh())) { + if (is_border_edge(he, pmesh())) + { const halfedge_descriptor he_cw = opposite(next(he, pmesh()), pmesh()); vertex_descriptor v2 = source(he_cw, pmesh()); - if (is_border_edge(he_cw, pmesh())) { + if (is_border_edge(he_cw, pmesh())) + { const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); v2 = source(he_ccw, pmesh()); } @@ -655,11 +582,11 @@ public: const Point& v0_p = get(ppmap(), v0); const Point& v1_p = get(ppmap(), v1); const Point& v2_p = get(ppmap(), v2); - const double area_t = to_double( - CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v2_p))); + const double area_t = to_double(CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v2_p))); return (CotangentValue::operator()(v0, v2, v1) / area_t); - - } else { + } + else + { const halfedge_descriptor he_cw = opposite(next(he, pmesh()), pmesh()); const vertex_descriptor v2 = source(he_cw, pmesh()); const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); @@ -672,37 +599,31 @@ public: const double area_t1 = to_double(CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v2_p))); const double area_t2 = to_double(CGAL::sqrt(CGAL::squared_area(v0_p, v1_p, v3_p))); - return ( - CotangentValue::operator()(v0, v2, v1) / area_t1 + - CotangentValue::operator()(v0, v3, v1) / area_t2 ); + return (CotangentValue::operator()(v0, v2, v1) / area_t1 + + CotangentValue::operator()(v0, v3, v1) / area_t2 ); } + return 0.0; } }; // Mean value calculator described in -[Floater04] Mean Value Coordinates- -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> -class Mean_value_weight { - - // Mean_value_weight() - // {} +template::type> +class Mean_value_weight +{ + // Mean_value_weight() {} PolygonMesh& pmesh_; VertexPointMap vpmap_; public: - Mean_value_weight( - PolygonMesh& pmesh_, - VertexPointMap vpmap) : - pmesh_(pmesh_), - vpmap_(vpmap) + Mean_value_weight(PolygonMesh& pmesh_, + VertexPointMap vpmap) + : pmesh_(pmesh_), vpmap_(vpmap) { } - PolygonMesh& pmesh() { - return pmesh_; - } + PolygonMesh& pmesh() { return pmesh_; } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -714,42 +635,43 @@ public: // Returns the mean-value coordinate of the specified halfedge_descriptor. // Returns different value for different edge orientation (which is a normal // behavior according to the formula). - double operator()(halfedge_descriptor he) { - + double operator()(halfedge_descriptor he) + { const vertex_descriptor v0 = target(he, pmesh()); const vertex_descriptor v1 = source(he, pmesh()); const Vector vec = get(vpmap_, v0) - get(vpmap_, v1); const double norm = CGAL::sqrt(vec.squared_length()); // Only one triangle for border edges. - if (is_border_edge(he, pmesh())) { - + if (is_border_edge(he, pmesh())) + { const halfedge_descriptor he_cw = opposite(next(he, pmesh()), pmesh()); vertex_descriptor v2 = source(he_cw, pmesh()); - if (is_border_edge(he_cw, pmesh())) { + if (is_border_edge(he_cw, pmesh())) + { const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); v2 = source(he_ccw, pmesh()); } - return (half_tan_value_2(v1, v0, v2) / norm); - } else { + return (half_tan_value_2(v1, v0, v2) / norm); + } + else + { const halfedge_descriptor he_cw = opposite(next(he, pmesh()), pmesh()); const vertex_descriptor v2 = source(he_cw, pmesh()); const halfedge_descriptor he_ccw = prev(opposite(he, pmesh()), pmesh()); const vertex_descriptor v3 = source(he_ccw, pmesh()); - return ( - half_tan_value_2(v1, v0, v2) / norm + - half_tan_value_2(v1, v0, v3) / norm); + return (half_tan_value_2(v1, v0, v2) / norm + + half_tan_value_2(v1, v0, v3) / norm); } } private: // Returns the tangent value of the half angle v0_v1_v2 / 2. - double half_tan_value( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { - + double half_tan_value(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { const Vector vec0 = get(vpmap_, v1) - get(vpmap_, v2); const Vector vec1 = get(vpmap_, v2) - get(vpmap_, v0); const Vector vec2 = get(vpmap_, v0) - get(vpmap_, v1); @@ -765,11 +687,10 @@ private: } // My deviation built on Meyer_02. - double half_tan_value_2( - vertex_descriptor v0, - vertex_descriptor v1, - vertex_descriptor v2) { - + double half_tan_value_2(vertex_descriptor v0, + vertex_descriptor v1, + vertex_descriptor v2) + { const Vector a = get(vpmap_, v0) - get(vpmap_, v1); const Vector b = get(vpmap_, v2) - get(vpmap_, v1); const double dot_ab = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; @@ -787,32 +708,28 @@ private: } }; -template< - typename PolygonMesh, - typename PrimaryWeight = Cotangent_weight, - typename SecondaryWeight = Mean_value_weight > -class Hybrid_weight : public PrimaryWeight, SecondaryWeight { - +template, + typename SecondaryWeight = Mean_value_weight > +class Hybrid_weight + : public PrimaryWeight, SecondaryWeight +{ PrimaryWeight primary; SecondaryWeight secondary; - Hybrid_weight() - { } + Hybrid_weight() { } public: - Hybrid_weight(PolygonMesh& pmesh_) : - primary(pmesh_), - secondary(pmesh_) + Hybrid_weight(PolygonMesh& pmesh_) + : primary(pmesh_), secondary(pmesh_) { } - PolygonMesh& pmesh() { - return primary.pmesh(); - } + PolygonMesh& pmesh() { return primary.pmesh(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - double operator()(halfedge_descriptor he) { - + double operator()(halfedge_descriptor he) + { const double weight = primary(he); // if (weight < 0.0) { std::cout << "Negative weight!" << std::endl; } return (weight >= 0.0) ? weight : secondary(he); @@ -821,27 +738,25 @@ public: // Trivial uniform weights (created for test purposes). template -class Uniform_weight { +class Uniform_weight +{ public: typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - double operator()(halfedge_descriptor /* e */) - { return 1.0; } + double operator()(halfedge_descriptor /* e */) { return 1.0; } }; template -class Scale_dependent_weight_fairing { - +class Scale_dependent_weight_fairing +{ PolygonMesh& pmesh_; public: - Scale_dependent_weight_fairing(PolygonMesh& pmesh_) : - pmesh_(pmesh_) + Scale_dependent_weight_fairing(PolygonMesh& pmesh_) + : pmesh_(pmesh_) { } - PolygonMesh& pmesh() { - return pmesh_; - } + PolygonMesh& pmesh() { return pmesh_; } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -852,53 +767,53 @@ public: double w_i(vertex_descriptor /* v_i */) { return 1.0; } - double w_ij(halfedge_descriptor he) { - + double w_ij(halfedge_descriptor he) + { const Vector v = target(he, pmesh())->point() - source(he, pmesh())->point(); const double divider = CGAL::sqrt(v.squared_length()); - if (divider == 0.0) { + if (divider == 0.0) + { CGAL_warning_msg(false, "Scale dependent weight - zero length edge."); return (std::numeric_limits::max)(); } + return 1.0 / divider; } }; -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> -class Cotangent_weight_with_voronoi_area_fairing { - +template::type> +class Cotangent_weight_with_voronoi_area_fairing +{ typedef PolygonMesh PM; typedef VertexPointMap VPMap; Voronoi_area voronoi_functor; Cotangent_weight > cotangent_functor; public: - Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_) : - voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), - cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) + Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_) + : voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), + cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) { } - Cotangent_weight_with_voronoi_area_fairing( - PM& pmesh_, - VPMap vpmap_) : - voronoi_functor(pmesh_, vpmap_), - cotangent_functor(pmesh_, vpmap_) + Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_, + VPMap vpmap_) + : voronoi_functor(pmesh_, vpmap_), + cotangent_functor(pmesh_, vpmap_) { } - PM& pmesh() { - return voronoi_functor.pmesh(); - } + PM& pmesh() { return voronoi_functor.pmesh(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - double w_i(vertex_descriptor v_i) { + double w_i(vertex_descriptor v_i) + { return 0.5 / voronoi_functor(v_i); } - double w_ij(halfedge_descriptor he) { + double w_ij(halfedge_descriptor he) + { return cotangent_functor(he) * 2.0; } }; @@ -906,54 +821,51 @@ public: // Cotangent_value_Meyer has been changed to the version: // Cotangent_value_Meyer_secure to avoid imprecisions from // the issue #4706 - https://github.com/CGAL/cgal/issues/4706. -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> -class Cotangent_weight_with_voronoi_area_fairing_secure { - +template::type> +class Cotangent_weight_with_voronoi_area_fairing_secure +{ typedef PolygonMesh PM; typedef VertexPointMap VPMap; Voronoi_area voronoi_functor; Cotangent_weight > cotangent_functor; public: - Cotangent_weight_with_voronoi_area_fairing_secure(PM& pmesh_) : - voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), - cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) + Cotangent_weight_with_voronoi_area_fairing_secure(PM& pmesh_) + : voronoi_functor(pmesh_, get(CGAL::vertex_point, pmesh_)), + cotangent_functor(pmesh_, get(CGAL::vertex_point, pmesh_)) { } - Cotangent_weight_with_voronoi_area_fairing_secure( - PM& pmesh_, - VPMap vpmap_) : - voronoi_functor(pmesh_, vpmap_), - cotangent_functor(pmesh_, vpmap_) + Cotangent_weight_with_voronoi_area_fairing_secure(PM& pmesh_, + VPMap vpmap_) + : voronoi_functor(pmesh_, vpmap_), + cotangent_functor(pmesh_, vpmap_) { } - PM& pmesh() { - return voronoi_functor.pmesh(); - } + PM& pmesh() { return voronoi_functor.pmesh(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - double w_i(vertex_descriptor v_i) { + double w_i(vertex_descriptor v_i) + { return 0.5 / voronoi_functor(v_i); } - double w_ij(halfedge_descriptor he) { + double w_ij(halfedge_descriptor he) + { return cotangent_functor(he) * 2.0; } }; template -class Uniform_weight_fairing { - +class Uniform_weight_fairing +{ public: typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - Uniform_weight_fairing(PolygonMesh&) - { } + Uniform_weight_fairing(PolygonMesh&) { } double w_ij(halfedge_descriptor /* e */) { return 1.0; } double w_i(vertex_descriptor /* v_i */) { return 1.0; } @@ -965,4 +877,6 @@ public: } // namespace Weights } // namespace CGAL +#endif // CGAL_NO_DEPRECATED_CODE + #endif // CGAL_WEIGHTS_PMP_DEPRECATED_H From 72163bc009692b082e359a8b127980b943d5280a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 17:54:01 +0200 Subject: [PATCH 060/426] Simply weight computations and use documentation variable names --- .../include/CGAL/Weights/authalic_weights.h | 18 ++--- .../CGAL/Weights/discrete_harmonic_weights.h | 11 ++- Weights/include/CGAL/Weights/internal/utils.h | 14 ++-- .../CGAL/Weights/inverse_distance_weights.h | 4 +- .../include/CGAL/Weights/mean_value_weights.h | 4 +- .../include/CGAL/Weights/shepard_weights.h | 12 +--- .../include/CGAL/Weights/tangent_weights.h | 69 +++++++------------ .../CGAL/Weights/three_point_family_weights.h | 36 +++------- 8 files changed, 60 insertions(+), 108 deletions(-) diff --git a/Weights/include/CGAL/Weights/authalic_weights.h b/Weights/include/CGAL/Weights/authalic_weights.h index 6700bdbb6ad..0e9b18782ad 100644 --- a/Weights/include/CGAL/Weights/authalic_weights.h +++ b/Weights/include/CGAL/Weights/authalic_weights.h @@ -30,11 +30,10 @@ template FT half_weight(const FT cot, const FT r2) { FT w = FT(0); - CGAL_precondition(r2 != FT(0)); - if (r2 != FT(0)) { - const FT inv = FT(2) / r2; - w = cot * inv; - } + CGAL_precondition(!is_zero(r2)); + if (!is_zero(r2)) + w = FT(2) * cot / r2; + return w; } @@ -42,12 +41,9 @@ template FT weight(const FT cot_gamma, const FT cot_beta, const FT r2) { FT w = FT(0); - CGAL_precondition(r2 != FT(0)); - if (r2 != FT(0)) - { - const FT inv = FT(2) / r2; - w = (cot_gamma + cot_beta) * inv; - } + CGAL_precondition(!is_zero(r2)); + if (!is_zero(r2)) + w = FT(2) * (cot_gamma + cot_beta) / r2; return w; } diff --git a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h index ea0b89a923b..514b25eb488 100644 --- a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h @@ -31,17 +31,14 @@ namespace Weights { namespace discrete_harmonic_ns { template -FT weight(const FT r1, const FT r2, const FT r3, +FT weight(const FT d1, const FT d2, const FT d, const FT A1, const FT A2, const FT B) { FT w = FT(0); - CGAL_precondition(A1 != FT(0) && A2 != FT(0)); + CGAL_precondition(!is_zero(A1) && !is_zero(A2)); const FT prod = A1 * A2; - if (prod != FT(0)) - { - const FT inv = FT(1) / prod; - w = (r3 * A1 - r2 * B + r1 * A2) * inv; - } + if (!is_zero(prod)) + w = (d2 * A1 - d * B + d1 * A2) / prod; return w; } diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 640ef28e789..8a0d58341d1 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -86,8 +86,8 @@ void normalize(std::vector& values) for (const FT& value : values) sum += value; - CGAL_assertion(sum != FT(0)); - if (sum == FT(0)) + CGAL_assertion(!is_zero(sum)); + if (is_zero(sum)) return; const FT inv_sum = FT(1) / sum; @@ -95,14 +95,10 @@ void normalize(std::vector& values) value *= inv_sum; } -// Raises value to the power. -template -typename GeomTraits::FT power(const GeomTraits&, - const typename GeomTraits::FT value, - const typename GeomTraits::FT p) +template +FT power(const FT value, + const FT p) { - using FT = typename GeomTraits::FT; - const double base = CGAL::to_double(value); const double exp = CGAL::to_double(p); diff --git a/Weights/include/CGAL/Weights/inverse_distance_weights.h b/Weights/include/CGAL/Weights/inverse_distance_weights.h index 9d0927c21ee..332d18f9c4a 100644 --- a/Weights/include/CGAL/Weights/inverse_distance_weights.h +++ b/Weights/include/CGAL/Weights/inverse_distance_weights.h @@ -29,8 +29,8 @@ template FT weight(const FT d) { FT w = FT(0); - CGAL_precondition(d != FT(0)); - if (d != FT(0)) + CGAL_precondition(!is_zero(d)); + if (!is_zero(d)) w = FT(1) / d; return w; diff --git a/Weights/include/CGAL/Weights/mean_value_weights.h b/Weights/include/CGAL/Weights/mean_value_weights.h index c08ccef1c51..3271db9cbb0 100644 --- a/Weights/include/CGAL/Weights/mean_value_weights.h +++ b/Weights/include/CGAL/Weights/mean_value_weights.h @@ -68,9 +68,9 @@ typename GeomTraits::FT weight(const GeomTraits& traits, const FT P2 = r2 * r3 + D2; FT w = FT(0); - CGAL_precondition(P1 != FT(0) && P2 != FT(0)); + CGAL_precondition(!is_zero(P1) && !is_zero(P2)); const FT prod = P1 * P2; - if (prod != FT(0)) + if (!is_zero(prod)) { const FT inv = FT(1) / prod; w = FT(2) * (r1 * r3 - D) * inv; diff --git a/Weights/include/CGAL/Weights/shepard_weights.h b/Weights/include/CGAL/Weights/shepard_weights.h index 2cfbc76b862..8c12d55687d 100644 --- a/Weights/include/CGAL/Weights/shepard_weights.h +++ b/Weights/include/CGAL/Weights/shepard_weights.h @@ -34,15 +34,9 @@ typename GeomTraits::FT weight(const GeomTraits& traits, using FT = typename GeomTraits::FT; FT w = FT(0); - CGAL_precondition(d != FT(0)); - if (d != FT(0)) - { - FT denom = d; - if (p != FT(1)) - denom = internal::power(traits, d, p); - - w = FT(1) / denom; - } + CGAL_precondition(is_positive(d)); + if(is_positive(d)) + w = internal::power(d, -p); return w; } diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 9986d115bcd..4c4260314fd 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -25,33 +25,16 @@ namespace CGAL { namespace Weights { /// \cond SKIP_IN_MANUAL + namespace tangent_ns { -template -FT half_angle_tangent(const FT r, const FT d, const FT A, const FT D) -{ - FT t = FT(0); - const FT P = r * d + D; - CGAL_precondition(P != FT(0)); - if (P != FT(0)) - { - const FT inv = FT(2) / P; - t = A * inv; - } - - return t; -} - template FT half_weight(const FT t, const FT r) { FT w = FT(0); - CGAL_precondition(r != FT(0)); - if (r != FT(0)) - { - const FT inv = FT(2) / r; - w = t * inv; - } + CGAL_precondition(!is_zero(r)); + if (!is_zero(r)) + w = FT(2) * t / r; return w; } @@ -62,33 +45,27 @@ FT weight(const FT t1, const FT t2, const FT r) FT w = FT(0); CGAL_precondition(r != FT(0)); if (r != FT(0)) - { - const FT inv = FT(2) / r; - w = (t1 + t2) * inv; - } + w = FT(2) * (t1 + t2) / r; return w; } template -FT weight(const FT d1, const FT r, const FT d2, +FT weight(const FT d1, const FT d, const FT d2, const FT A1, const FT A2, const FT D1, const FT D2) { - const FT P1 = d1 * r + D1; - const FT P2 = d2 * r + D2; + const FT P1 = d1 * d + D1; + const FT P2 = d2 * d + D2; FT w = FT(0); - CGAL_precondition(P1 != FT(0) && P2 != FT(0)); - if (P1 != FT(0) && P2 != FT(0)) + CGAL_precondition(!is_zero(P1) && !is_zero(P2)); + if (!is_zero(P1) && !is_zero(P2)) { - const FT inv1 = FT(2) / P1; - const FT inv2 = FT(2) / P2; - const FT t1 = A1 * inv1; - const FT t2 = A2 * inv2; - w = weight(t1, t2, r); + const FT t1 = FT(2) * A1 / P1; + const FT t2 = FT(2) * A2 / P2; + w = weight(t1, t2, d); } - return w; } @@ -168,23 +145,29 @@ typename GeomTraits::FT tangent_weight_v2(const typename GeomTraits::Point_3& t, This function computes the tangent of the half angle using the precomputed distance, area, and dot product values. The returned value is - \f$\frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\f$. + \f$\frac{2\textbf{A}}{\textbf{d}\textbf{d_1} + \textbf{D_1}}\f$. \tparam FT a model of `FieldNumberType` - \param d the distance value - \param l the distance value + \param d1 the first distance value + \param d2 the second distance value \param A the area value \param D the dot product value - \pre (d * l + D) != 0 + \pre (d1 * d2 + D) != 0 \sa `half_tangent_weight()` */ template -FT tangent_half_angle(const FT d, const FT l, const FT A, const FT D) +FT tangent_half_angle(const FT d1, const FT d2, const FT A, const FT D) { - return tangent_ns::half_angle_tangent(d, l, A, D); + FT t = FT(0); + const FT P = d1 * d2 + D; + CGAL_precondition(!is_zero(P)); + if (!is_zero(P)) + t = FT(2) * A / P; + + return t; } /*! @@ -237,7 +220,7 @@ template FT half_tangent_weight(const FT d, const FT l, const FT A, const FT D) { const FT tan05 = tangent_half_angle(d, l, A, D); - return half_tangent_weight(tan05, d); + return tangent_ns::half_weight(tan05, d); } /// \cond SKIP_IN_MANUAL diff --git a/Weights/include/CGAL/Weights/three_point_family_weights.h b/Weights/include/CGAL/Weights/three_point_family_weights.h index 6f2b5f7925f..f5b08ce9c48 100644 --- a/Weights/include/CGAL/Weights/three_point_family_weights.h +++ b/Weights/include/CGAL/Weights/three_point_family_weights.h @@ -25,36 +25,22 @@ namespace Weights { /// \cond SKIP_IN_MANUAL namespace three_point_family_ns { -template -typename GeomTraits::FT weight(const GeomTraits& traits, - const typename GeomTraits::FT d1, - const typename GeomTraits::FT d2, - const typename GeomTraits::FT d3, - const typename GeomTraits::FT A1, - const typename GeomTraits::FT A2, - const typename GeomTraits::FT B, - const typename GeomTraits::FT p) +template +FT weight(const FT d1, const FT d2, const FT d, + const FT A1, const FT A2, const FT B, + const FT p) { - using FT = typename GeomTraits::FT; - FT w = FT(0); - CGAL_precondition(A1 != FT(0) && A2 != FT(0)); + CGAL_precondition(!is_zero(A1) && !is_zero(A2)); const FT prod = A1 * A2; - if (prod != FT(0)) + if (!is_zero(prod)) { - const FT inv = FT(1) / prod; - FT r1 = d1; - FT r2 = d2; - FT r3 = d3; - if (p != FT(1)) - { - r1 = internal::power(traits, d1, p); - r2 = internal::power(traits, d2, p); - r3 = internal::power(traits, d3, p); - } - w = (r3 * A1 - r2 * B + r1 * A2) * inv; - } + const FT r1 = internal::power(d1, p); + const FT r2 = internal::power(d2, p); + const FT r = internal::power(d , p); + w = (r2 * A1 - r * B + r1 * A2) / prod; + } return w; } From 15de97faf1981888f1eb76d6a3deec97b2d44b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 17 Oct 2022 21:40:05 +0200 Subject: [PATCH 061/426] Re-organize internal functions and use usual APIs --- Weights/include/CGAL/Weights/internal/utils.h | 314 ++++-------------- Weights/include/CGAL/Weights/utils.h | 293 +++++++++------- 2 files changed, 250 insertions(+), 357 deletions(-) diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 8a0d58341d1..2c01c4e1e30 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -105,11 +105,12 @@ FT power(const FT value, return static_cast(std::pow(base, exp)); } -// Computes distance between two 2D points. +// 2D ============================================================================================== + template -typename GeomTraits::FT distance_2(const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q) +typename GeomTraits::FT distance_2(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const GeomTraits& traits) { using Get_sqrt = Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); @@ -118,10 +119,9 @@ typename GeomTraits::FT distance_2(const GeomTraits& traits, return sqrt(squared_distance_2(p, q)); } -// Computes length of a 2D vector. template -typename GeomTraits::FT length_2(const GeomTraits& traits, - const typename GeomTraits::Vector_2& v) +typename GeomTraits::FT length_2(const typename GeomTraits::Vector_2& v, + const GeomTraits& traits) { using Get_sqrt = Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); @@ -131,8 +131,8 @@ typename GeomTraits::FT length_2(const GeomTraits& traits, } template -void normalize_2(const GeomTraits& traits, - typename GeomTraits::Vector_2& v) +void normalize_2(typename GeomTraits::Vector_2& v, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; const FT length = length_2(traits, v); @@ -143,78 +143,24 @@ void normalize_2(const GeomTraits& traits, v /= length; } -// Computes cotanget between two 2D vectors. +// 3D ============================================================================================== + template -typename GeomTraits::FT cotangent_2(const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) +typename GeomTraits::FT distance_3(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const GeomTraits& traits) { - using FT = typename GeomTraits::FT; - using Vector_2 = typename GeomTraits::Vector_2; + auto squared_distance_3 = traits.compute_squared_distance_3_object(); - auto dot_product_2 = traits.compute_scalar_product_2_object(); - auto cross_product_2 = traits.compute_determinant_2_object(); - auto construct_vector_2 = traits.construct_vector_2_object(); - - const Vector_2 v1 = construct_vector_2(q, r); - const Vector_2 v2 = construct_vector_2(q, p); - - const FT dot = dot_product_2(v1, v2); - const FT cross = cross_product_2(v1, v2); - - const FT length = CGAL::abs(cross); - // CGAL_assertion(length != FT(0)); not really necessary - if (length != FT(0)) - return dot / length; - else - return FT(0); // undefined -} - -// Computes tanget between two 2D vectors. -template -typename GeomTraits::FT tangent_2(const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) -{ - using FT = typename GeomTraits::FT; - using Vector_2 = typename GeomTraits::Vector_2; - - auto dot_product_2 = traits.compute_scalar_product_2_object(); - auto cross_product_2 = traits.compute_determinant_2_object(); - auto construct_vector_2 = traits.construct_vector_2_object(); - - const Vector_2 v1 = construct_vector_2(q, r); - const Vector_2 v2 = construct_vector_2(q, p); - - const FT dot = dot_product_2(v1, v2); - const FT cross = cross_product_2(v1, v2); - - const FT length = CGAL::abs(cross); - // CGAL_assertion(dot != FT(0)); not really necessary - if (dot != FT(0)) - return length / dot; - else - return FT(0); // undefined -} - -// Computes distance between two 3D points. -template -typename GeomTraits::FT distance_3(const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q) -{ using Get_sqrt = Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); - auto squared_distance_3 = traits.compute_squared_distance_3_object(); return sqrt(squared_distance_3(p, q)); } template -typename GeomTraits::FT length_3(const GeomTraits& traits, - const typename GeomTraits::Vector_3& v) +typename GeomTraits::FT length_3(const typename GeomTraits::Vector_3& v, + const GeomTraits& traits) { using Get_sqrt = Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); @@ -224,8 +170,8 @@ typename GeomTraits::FT length_3(const GeomTraits& traits, } template -void normalize_3(const GeomTraits& traits, - typename GeomTraits::Vector_3& v) +void normalize_3(typename GeomTraits::Vector_3& v, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; @@ -238,71 +184,12 @@ void normalize_3(const GeomTraits& traits, } template -typename GeomTraits::FT cotangent_3(const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) -{ - using FT = typename GeomTraits::FT; - using Vector_3 = typename GeomTraits::Vector_3; - - auto dot_product_3 = traits.compute_scalar_product_3_object(); - auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - auto vector_3 = traits.construct_vector_3_object(); - - const Vector_3 v1 = vector_3(q, r); - const Vector_3 v2 = vector_3(q, p); - - const FT dot = dot_product_3(v1, v2); - auto cross = cross_product_3(v1, v2); - - const FT length = length_3(traits, cross); - // TODO: - // Not really necessary: since we handle case length = 0. Does this case happen? - // Yes, e.g. in Surface Parameterization tests. Does it affect the results? - // In current applications, not really. - // CGAL_assertion(length != FT(0)); - if (length != FT(0)) - return dot / length; - else - return FT(0); // undefined -} - -// Computes tanget between two 3D vectors. -template -typename GeomTraits::FT tangent_3(const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) -{ - using FT = typename GeomTraits::FT; - using Vector_3 = typename GeomTraits::Vector_3; - - auto dot_product_3 = traits.compute_scalar_product_3_object(); - auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - auto vector_3 = traits.construct_vector_3_object(); - - const Vector_3 v1 = vector_3(q, r); - const Vector_3 v2 = vector_3(q, p); - - const FT dot = dot_product_3(v1, v2); - auto cross = cross_product_3(v1, v2); - - const FT length = length_3(traits, cross); - // CGAL_assertion(dot != FT(0)); not really necessary - if (dot != FT(0)) - return length / dot; - else - return FT(0); // undefined -} - -// Computes 3D angle between two vectors. -template -double angle_3(const GeomTraits& traits, - const typename GeomTraits::Vector_3& v1, - const typename GeomTraits::Vector_3& v2) +double angle_3(const typename GeomTraits::Vector_3& v1, + const typename GeomTraits::Vector_3& v2, + const GeomTraits& traits) { auto dot_product_3 = traits.compute_scalar_product_3_object(); + const double dot = CGAL::to_double(dot_product_3(v1, v2)); double angle_rad = 0.0; @@ -318,10 +205,10 @@ double angle_3(const GeomTraits& traits, // Rotates a 3D point around axis. template -typename GeomTraits::Point_3 rotate_point_3(const GeomTraits&, - const double angle_rad, +typename GeomTraits::Point_3 rotate_point_3(const double angle_rad, const typename GeomTraits::Vector_3& axis, - const typename GeomTraits::Point_3& query) + const typename GeomTraits::Point_3& query, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Point_3 = typename GeomTraits::Point_3; @@ -348,10 +235,10 @@ typename GeomTraits::Point_3 rotate_point_3(const GeomTraits&, // Computes two 3D orthogonal base vectors wrt a given normal. template -void orthogonal_bases_3(const GeomTraits& traits, - const typename GeomTraits::Vector_3& normal, +void orthogonal_bases_3(const typename GeomTraits::Vector_3& normal, typename GeomTraits::Vector_3& b1, - typename GeomTraits::Vector_3& b2) + typename GeomTraits::Vector_3& b2, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Vector_3 = typename GeomTraits::Vector_3; @@ -369,17 +256,17 @@ void orthogonal_bases_3(const GeomTraits& traits, b2 = cross_product_3(normal, b1); - normalize_3(traits, b1); - normalize_3(traits, b2); + normalize_3(b1, traits); + normalize_3(b2, traits); } // Converts a 3D point into a 2D point wrt to a given plane. template -typename GeomTraits::Point_2 to_2d(const GeomTraits& traits, - const typename GeomTraits::Vector_3& b1, +typename GeomTraits::Point_2 to_2d(const typename GeomTraits::Vector_3& b1, const typename GeomTraits::Vector_3& b2, const typename GeomTraits::Point_3& origin, - const typename GeomTraits::Point_3& query) + const typename GeomTraits::Point_3& query, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Point_2 = typename GeomTraits::Point_2; @@ -453,15 +340,15 @@ typename GeomTraits::Point_2 to_2d(const GeomTraits& traits, // Flattens an arbitrary quad into a planar quad. template -void flatten(const GeomTraits& traits, - const typename GeomTraits::Point_3& t, // prev neighbor/vertex/point +void flatten(const typename GeomTraits::Point_3& t, // prev neighbor/vertex/point const typename GeomTraits::Point_3& r, // curr neighbor/vertex/point const typename GeomTraits::Point_3& p, // next neighbor/vertex/point const typename GeomTraits::Point_3& q, // query point typename GeomTraits::Point_2& tf, typename GeomTraits::Point_2& rf, typename GeomTraits::Point_2& pf, - typename GeomTraits::Point_2& qf) + typename GeomTraits::Point_2& qf, + const GeomTraits& traits) { // std::cout << std::endl; using Point_3 = typename GeomTraits::Point_3; @@ -488,89 +375,76 @@ void flatten(const GeomTraits& traits, // Middle axis. Vector_3 ax = vector_3(q1, r1); - normalize_3(traits, ax); + normalize_3(ax, traits); // Prev and next vectors. Vector_3 v1 = vector_3(q1, t1); Vector_3 v2 = vector_3(q1, p1); - normalize_3(traits, v1); - normalize_3(traits, v2); + normalize_3(v1, traits); + normalize_3(v2, traits); // Two triangle normals. Vector_3 n1 = cross_product_3(v1, ax); Vector_3 n2 = cross_product_3(ax, v2); - normalize_3(traits, n1); - normalize_3(traits, n2); + normalize_3(n1, traits); + normalize_3(n2, traits); // std::cout << "normal n1: " << n1 << std::endl; // std::cout << "normal n2: " << n2 << std::endl; // Angle between two normals. - const double angle_rad = angle_3(traits, n1, n2); + const double angle_rad = angle_3(n1, n2, traits); // std::cout << "angle deg n1 <-> n2: " << angle_rad * 180.0 / CGAL_PI << std::endl; // Rotate p1 around ax so that it lands onto the plane [q1, t1, r1]. const Point_3& t2 = t1; const Point_3& r2 = r1; - const Point_3 p2 = rotate_point_3(traits, angle_rad, ax, p1); + const Point_3 p2 = rotate_point_3(angle_rad, ax, p1, traits); const Point_3& q2 = q1; // std::cout << "rotated p2: " << p2 << std::endl; // Compute orthogonal base vectors. Vector_3 b1, b2; const Vector_3& normal = n1; - orthogonal_bases_3(traits, normal, b1, b2); + orthogonal_bases_3(normal, b1, b2, traits); - // const Angle angle12 = angle_3(traits, b1, b2); + // const Angle angle12 = angle_3(b1, b2, traits); // std::cout << "angle deg b1 <-> b2: " << angle12 * 180.0 / CGAL_PI << std::endl; // Flatten a quad. const Point_3& origin = q2; - tf = to_2d(traits, b1, b2, origin, t2); - rf = to_2d(traits, b1, b2, origin, r2); - pf = to_2d(traits, b1, b2, origin, p2); - qf = to_2d(traits, b1, b2, origin, q2); + tf = to_2d(b1, b2, origin, t2, traits); + rf = to_2d(b1, b2, origin, r2, traits); + pf = to_2d(b1, b2, origin, p2, traits); + qf = to_2d(b1, b2, origin, q2, traits); // std::cout << "flattened qf: " << qf << std::endl; // std::cout << "flattened tf: " << tf << std::endl; // std::cout << "flattened rf: " << rf << std::endl; // std::cout << "flattened pf: " << pf << std::endl; - // std::cout << "A1: " << area_2(traits, rf, qf, pf) << std::endl; - // std::cout << "A2: " << area_2(traits, pf, qf, rf) << std::endl; - // std::cout << "C: " << area_2(traits, tf, rf, pf) << std::endl; - // std::cout << "B: " << area_2(traits, pf, qf, tf) << std::endl; + // std::cout << "A1: " << area_2(rf, qf, pf, traits) << std::endl; + // std::cout << "A2: " << area_2(pf, qf, rf, traits) << std::endl; + // std::cout << "C: " << area_2(tf, rf, pf, traits) << std::endl; + // std::cout << "B: " << area_2(pf, qf, tf, traits) << std::endl; } -// Computes area of a 2D triangle. template -typename GeomTraits::FT area_2(const GeomTraits& traits, - const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) -{ - auto area_2 = traits.compute_area_2_object(); - return area_2(p, q, r); -} - -// Computes positive area of a 2D triangle. -template -typename GeomTraits::FT positive_area_2(const GeomTraits& traits, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT positive_area_2(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r) + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) { return CGAL::abs(area_2(traits, p, q, r)); } -// Computes area of a 3D triangle. template -typename GeomTraits::FT area_3(const GeomTraits& traits, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Point_2 = typename GeomTraits::Point_2; @@ -592,22 +466,22 @@ typename GeomTraits::FT area_3(const GeomTraits& traits, // Prev and next vectors. Vector_3 v1 = vector_3(b, a); Vector_3 v2 = vector_3(b, c); - normalize_3(traits, v1); - normalize_3(traits, v2); + normalize_3(v1, traits); + normalize_3(v2, traits); // Compute normal. Vector_3 normal = cross_product_3(v1, v2); - normalize_3(traits, normal); + normalize_3(normal, traits); // Compute orthogonal base vectors. Vector_3 b1, b2; - orthogonal_bases_3(traits, normal, b1, b2); + orthogonal_bases_3(normal, b1, b2, traits); // Compute area. const Point_3& origin = b; - const Point_2 pf = to_2d(traits, b1, b2, origin, a); - const Point_2 qf = to_2d(traits, b1, b2, origin, b); - const Point_2 rf = to_2d(traits, b1, b2, origin, c); + const Point_2 pf = to_2d(b1, b2, origin, a, traits); + const Point_2 qf = to_2d(b1, b2, origin, b, traits); + const Point_2 rf = to_2d(b1, b2, origin, c, traits); const FT A = area_2(traits, pf, qf, rf); return A; @@ -615,62 +489,18 @@ typename GeomTraits::FT area_3(const GeomTraits& traits, // Computes positive area of a 3D triangle. template -typename GeomTraits::FT positive_area_3(const GeomTraits& traits, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT positive_area_3(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; - using Vector_3 = typename GeomTraits::Vector_3; - - auto vector_3 = traits.construct_vector_3_object(); - auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - - const Vector_3 v1 = vector_3(q, r); - const Vector_3 v2 = vector_3(q, p); - - Vector_3 cross = cross_product_3(v1, v2); - const FT half = FT(1) / FT(2); - const FT A = half * length_3(traits, cross); - return A; -} - -// Computes a clamped cotangent between two 3D vectors. -// In the old version of weights in PMP, it has been called secure. -// See Weights/internal/pmp_weights_deprecated.h for more information. -template -typename GeomTraits::FT cotangent_3_clamped(const GeomTraits& traits, - const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r) -{ - using FT = typename GeomTraits::FT; - using Vector_3 = typename GeomTraits::Vector_3; - using Get_sqrt = Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); - auto dot_product_3 = traits.compute_scalar_product_3_object(); - auto vector_3 = traits.construct_vector_3_object(); + auto squared_area_3 = traits.compute_squared_area_3_object(); - const Vector_3 v1 = vector_3(q, r); - const Vector_3 v2 = vector_3(q, p); - - const FT dot = dot_product_3(v1, v2); - const FT length_v1 = length_3(traits, v1); - const FT length_v2 = length_3(traits, v2); - - const FT lb = -FT(999) / FT(1000), ub = FT(999) / FT(1000); - FT cosine = dot / length_v1 / length_v2; - cosine = (cosine < lb) ? lb : cosine; - cosine = (cosine > ub) ? ub : cosine; - const FT sine = sqrt(FT(1) - cosine * cosine); - - CGAL_assertion(sine != FT(0)); - if (sine != FT(0)) - return cosine / sine; - - return FT(0); // undefined + return sqrt(squared_area_3(p, q, r)); } } // namespace internal diff --git a/Weights/include/CGAL/Weights/utils.h b/Weights/include/CGAL/Weights/utils.h index fe4f5705afd..43c0a0945da 100644 --- a/Weights/include/CGAL/Weights/utils.h +++ b/Weights/include/CGAL/Weights/utils.h @@ -16,44 +16,37 @@ #include +#include + namespace CGAL { namespace Weights { /// \cond SKIP_IN_MANUAL -template -typename GeomTraits::FT tangent(const typename GeomTraits::Point_2& p, - const typename GeomTraits::Point_2& q, - const typename GeomTraits::Point_2& r, - const GeomTraits& traits) -{ - return internal::tangent_2(traits, p, q, r); -} +// Computes cotangent between two 2D vectors. template -typename GeomTraits::FT tangent(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +typename GeomTraits::FT cotangent_2(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) { - const GeomTraits traits; - return tangent(p, q, r, traits); -} + using FT = typename GeomTraits::FT; + using Vector_2 = typename GeomTraits::Vector_2; -template -typename GeomTraits::FT tangent(const typename GeomTraits::Point_3& p, - const typename GeomTraits::Point_3& q, - const typename GeomTraits::Point_3& r, - const GeomTraits& traits) -{ - return internal::tangent_3(traits, p, q, r); -} + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto determinant_2 = traits.compute_determinant_2_object(); + auto vector_2 = traits.construct_vector_2_object(); -template -typename GeomTraits::FT tangent(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) -{ - const GeomTraits traits; - return tangent(p, q, r, traits); + const Vector_2 v1 = vector_2(q, r); + const Vector_2 v2 = vector_2(q, p); + + const FT dot = dot_product_2(v1, v2); + const FT length = CGAL::abs(determinant_2(v1, v2)); + + if (!is_zero(length)) + return dot / length; + else + return FT(0); // undefined } template @@ -62,127 +55,197 @@ typename GeomTraits::FT cotangent(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { - return internal::cotangent_2(traits, p, q, r); + return cotangent_2(p, q, r, traits); } -template -typename GeomTraits::FT cotangent(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +template +typename Kernel::FT cotangent(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) { - const GeomTraits traits; + const Kernel traits; return cotangent(p, q, r, traits); } +// ================================================================================================= + +// Computes cotangent between two 3D vectors. +template +typename GeomTraits::FT cotangent_3(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; + + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); + + const FT dot = dot_product_3(v1, v2); + const Vector_3 cross = cross_product_3(v1, v2); + + const FT length = internal::length_3(cross, traits); + if (!is_zero(length)) + return dot / length; + else + return FT(0); // undefined +} + template typename GeomTraits::FT cotangent(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { - return internal::cotangent_3(traits, p, q, r); + return cotangent_3(p, q, r, traits); } -template -typename GeomTraits::FT cotangent(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +template +typename Kernel::FT cotangent(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - const GeomTraits traits; + const Kernel traits; return cotangent(p, q, r, traits); } -/// \endcond +// ================================================================================================= -/// \cond SKIP_IN_MANUAL -// These are free functions to be used when building weights from parts rather -// than using the predefined weight functions. In principle, they can be removed. -// They are here to have unified interface within the Weights package and its -// construction weight system. +// Computes tangent between two 2D vectors. template -typename GeomTraits::FT squared_distance(const CGAL::Point_2& p, - const CGAL::Point_2& q) -{ - const GeomTraits traits; - auto squared_distance_2 = traits.compute_squared_distance_2_object(); - return squared_distance_2(p, q); -} - -template -typename GeomTraits::FT squared_distance(const CGAL::Point_3& p, - const CGAL::Point_3& q) -{ - const GeomTraits traits; - auto squared_distance_3 = traits.compute_squared_distance_3_object(); - return squared_distance_3(p, q); -} - -template -typename GeomTraits::FT distance(const CGAL::Point_2& p, - const CGAL::Point_2& q) -{ - const GeomTraits traits; - return internal::distance_2(traits, p, q); -} - -template -typename GeomTraits::FT distance(const CGAL::Point_3& p, - const CGAL::Point_3& q) -{ - const GeomTraits traits; - return internal::distance_3(traits, p, q); -} - -template -typename GeomTraits::FT area(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) -{ - const GeomTraits traits; - return internal::area_2(traits, p, q, r); -} - -template -typename GeomTraits::FT area(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) -{ - const GeomTraits traits; - return internal::positive_area_3(traits, p, q, r); -} - -template -typename GeomTraits::FT scalar_product(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +typename GeomTraits::FT tangent_2(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) { + using FT = typename GeomTraits::FT; using Vector_2 = typename GeomTraits::Vector_2; - const GeomTraits traits; + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto determinant_2 = traits.compute_determinant_2_object(); + auto vector_2 = traits.construct_vector_2_object(); - auto scalar_product_2 = traits.compute_scalar_product_2_object(); - auto construct_vector_2 = traits.construct_vector_2_object(); + const Vector_2 v1 = vector_2(q, r); + const Vector_2 v2 = vector_2(q, p); - const Vector_2 v1 = construct_vector_2(q, r); - const Vector_2 v2 = construct_vector_2(q, p); - return scalar_product_2(v1, v2); + const FT dot = dot_product_2(v1, v2); + if (!is_zero(dot)) + { + const FT cross = determinant_2(v1, v2); + const FT length = CGAL::abs(cross); + return length / dot; + } + else + { + return FT(0); // undefined + } } template -typename GeomTraits::FT scalar_product(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +typename GeomTraits::FT tangent(const typename GeomTraits::Point_2& p, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& r, + const GeomTraits& traits) { + return tangent_2(p, q, r, traits); +} + +template +typename Kernel::FT tangent(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const Kernel traits; + return tangent(p, q, r, traits); +} + +// ================================================================================================= + +// Computes tangent between two 3D vectors. +template +typename GeomTraits::FT tangent_3(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; using Vector_3 = typename GeomTraits::Vector_3; - const GeomTraits traits; - - auto scalar_product_3 = traits.compute_scalar_product_3_object(); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto cross_product_3 = traits.construct_cross_product_vector_3_object(); auto vector_3 = traits.construct_vector_3_object(); const Vector_3 v1 = vector_3(q, r); const Vector_3 v2 = vector_3(q, p); - return scalar_product_3(v1, v2); + + const FT dot = dot_product_3(v1, v2); + if (!is_zero(dot)) + { + const Vector_3 cross = cross_product_3(v1, v2); + const FT length = internal::length_3(cross, traits); + return length / dot; + } + else + { + return FT(0); // undefined + } +} + +template +typename GeomTraits::FT tangent(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + return tangent_3(p, q, r, traits); +} + +template +typename Kernel::FT tangent(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const Kernel traits; + return tangent(p, q, r, traits); +} + +template +typename GeomTraits::FT cotangent_3_clamped(const typename GeomTraits::Point_3& p, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& r, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; + + using Get_sqrt = internal::Get_sqrt; + auto sqrt = Get_sqrt::sqrt_object(traits); + + auto dot_product_3 = traits.compute_scalar_product_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); + + const FT dot = dot_product_3(v1, v2); + const FT length_v1 = internal::length_3(v1, traits); + const FT length_v2 = internal::length_3(v2, traits); + + const FT lb = -FT(999) / FT(1000), + ub = FT(999) / FT(1000); + const FT cosine = boost::algorithm::clamp(dot / (length_v1 * length_v2), lb, ub); + const FT sine = sqrt(FT(1) - square(cosine)); + + CGAL_assertion(!is_zero(sine)); + if (!is_zero(sine)) + return cosine / sine; + + return FT(0); // undefined } /// \endcond From 5f89766c5cf1e74f2c559999221040dde11f29ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:17:06 +0200 Subject: [PATCH 062/426] Uniformize notations across the package + re-introduce documentation --- Weights/doc/Weights/PackageDescription.txt | 14 +- .../include/CGAL/Weights/authalic_weights.h | 96 +++--- .../CGAL/Weights/barycentric_region_weights.h | 52 +++- .../include/CGAL/Weights/cotangent_weights.h | 76 +++-- .../CGAL/Weights/discrete_harmonic_weights.h | 104 ++++--- .../CGAL/Weights/inverse_distance_weights.h | 112 +++++-- .../include/CGAL/Weights/mean_value_weights.h | 146 +++++---- .../Weights/mixed_voronoi_region_weights.h | 47 ++- .../include/CGAL/Weights/shepard_weights.h | 137 +++++--- .../include/CGAL/Weights/tangent_weights.h | 292 +++++++++++------- .../CGAL/Weights/three_point_family_weights.h | 107 ++++--- .../CGAL/Weights/triangular_region_weights.h | 51 ++- .../CGAL/Weights/uniform_region_weights.h | 47 ++- .../include/CGAL/Weights/uniform_weights.h | 85 ++--- Weights/include/CGAL/Weights/utils.h | 5 + .../CGAL/Weights/voronoi_region_weights.h | 57 +++- .../include/CGAL/Weights/wachspress_weights.h | 111 ++++--- 17 files changed, 990 insertions(+), 549 deletions(-) diff --git a/Weights/doc/Weights/PackageDescription.txt b/Weights/doc/Weights/PackageDescription.txt index b3c78d87b5f..76186f8025d 100644 --- a/Weights/doc/Weights/PackageDescription.txt +++ b/Weights/doc/Weights/PackageDescription.txt @@ -101,7 +101,7 @@ a model of `AnalyticWeightTraits_3` for 3D points \endverbatim This weight is computed as -\f$w = \frac{d_2^a A_1 - d^a B + d_1^a A_2}{A_1 A_2}\f$ +\f$w = \frac{d_2^a A_0 - d^a B + d_0^a A_2}{A_0 A_2}\f$ with notations shown in the figure below and \f$a\f$ any real number being the power parameter. @@ -142,7 +142,7 @@ a model of `AnalyticWeightTraits_3` for 3D points \endverbatim This weight is computed as -\f$w = \frac{C}{A_1 A_2}\f$ +\f$w = \frac{C}{A_0 A_2}\f$ with notations shown in the figure below. Here, `q` is a query point and the points `p0`, `p1`, and `p2` are its neighbors. @@ -207,10 +207,10 @@ a model of `AnalyticWeightTraits_3` for 3D points \endverbatim This weight is computed as -\f$w = \pm 2 \sqrt{\frac{2 (d_1 d_2 - D)}{(d d_1 + D_1)(d d_2 + D_2)}}\f$ +\f$w = \pm 2 \sqrt{\frac{2 (d_0 d_2 - D)}{(d d_0 + D_0)(d d_2 + D_2)}}\f$ with notations shown in the figure below and dot products -\f$D_1 = (p_0 - q) \cdot (p_1 - q)\f$, +\f$D_0 = (p_0 - q) \cdot (p_1 - q)\f$, \f$D_2 = (p_1 - q) \cdot (p_2 - q)\f$, and \f$D = (p_0 - q) \cdot (p_2 - q)\f$. @@ -247,11 +247,11 @@ a model of `AnalyticWeightTraits_3` for 3D points This weight is computed as \f$w = 2 \frac{t_1 + t_2}{d}\f$, where -\f$t_1 = \frac{2 A_1}{d d_1 + D_1}\f$ and +\f$t_1 = \frac{2 A_0}{d d_0 + D_0}\f$ and \f$t_2 = \frac{2 A_2}{d d_2 + D_2}\f$ with notations shown in the figure below and dot products -\f$D_1 = (p_0 - q) \cdot (p_1 - q)\f$ and +\f$D_0 = (p_0 - q) \cdot (p_1 - q)\f$ and \f$D_2 = (p_1 - q) \cdot (p_2 - q)\f$. Here, `q` is a query point and the points `p0`, `p1`, and `p2` are its neighbors. @@ -283,7 +283,7 @@ a model of `AnalyticWeightTraits_3` for 3D points \endverbatim This weight is computed as -\f$w = \frac{d_2^2 A_1 - d^2 B + d_1^2 A_2}{A_1 A_2}\f$ +\f$w = \frac{d_2^2 A_0 - d^2 B + d_0^2 A_2}{A_0 A_2}\f$ with notations shown in the figure below. Here, `q` is a query point and the points `p0`, `p1`, and `p2` are its neighbors. diff --git a/Weights/include/CGAL/Weights/authalic_weights.h b/Weights/include/CGAL/Weights/authalic_weights.h index 0e9b18782ad..8c3eede9a25 100644 --- a/Weights/include/CGAL/Weights/authalic_weights.h +++ b/Weights/include/CGAL/Weights/authalic_weights.h @@ -57,79 +57,103 @@ FT weight(const FT cot_gamma, const FT cot_beta, const FT r2) \brief computes the half value of the authalic weight. - This function constructs the half of the authalic weight using the precomputed + This function computes the half of the authalic weight using the precomputed cotangent and squared distance values. The returned value is - \f$\frac{2\textbf{cot}}{\textbf{d2}}\f$. + \f$\frac{2\textbf{cot}}{\textbf{sq_d}}\f$. \tparam FT a model of `FieldNumberType` \param cot the cotangent value - \param d2 the squared distance value + \param sq_d the squared distance value - \pre d2 != 0 + \pre sq_d != 0 \sa `authalic_weight()` */ template -FT half_authalic_weight(const FT cot, const FT d2) +FT half_authalic_weight(const FT cot, const FT sq_d) { - return authalic_ns::half_weight(cot, d2); + return authalic_ns::half_weight(cot, sq_d); } +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefAuthalicWeights + \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template -typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + const FT cot_gamma = cotangent_2(p0, p1, q, traits); + const FT cot_beta = cotangent_2(q, p1, p2, traits); + auto squared_distance_2 = traits.compute_squared_distance_2_object(); + const FT sq_d = squared_distance_2(q, p1); - const FT cot_gamma = internal::cotangent_2(traits, t, r, q); - const FT cot_beta = internal::cotangent_2(traits, q, r, p); - - const FT d2 = squared_distance_2(q, r); - return authalic_ns::weight(cot_gamma, cot_beta, d2); + return authalic_ns::weight(cot_gamma, cot_beta, sq_d); } -template -typename GeomTraits::FT authalic_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefAuthalicWeights + \brief computes the authalic weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT authalic_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) { - const GeomTraits traits; - return authalic_weight(t, r, p, q, traits); + const Kernel traits; + return authalic_weight(p0, p1, p2, q, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefAuthalicWeights + \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template -typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT authalic_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + const FT cot_gamma = cotangent_3(p0, p1, q, traits); + const FT cot_beta = cotangent_3(q, p1, p2, traits); + auto squared_distance_3 = traits.compute_squared_distance_3_object(); + const FT sq_d = squared_distance_3(q, p1); - const FT cot_gamma = internal::cotangent_3(traits, t, r, q); - const FT cot_beta = internal::cotangent_3(traits, q, r, p); - const FT d2 = squared_distance_3(q, r); - - return authalic_ns::weight(cot_gamma, cot_beta, d2); + return authalic_ns::weight(cot_gamma, cot_beta, sq_d); } -template -typename GeomTraits::FT authalic_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +/*! + \ingroup PkgWeightsRefAuthalicWeights + \brief computes the authalic weight in 3D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT authalic_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) { - const GeomTraits traits; - return authalic_weight(t, r, p, q, traits); + const Kernel traits; + return authalic_weight(p0, p1, p2, q, traits); } } // namespace Weights diff --git a/Weights/include/CGAL/Weights/barycentric_region_weights.h b/Weights/include/CGAL/Weights/barycentric_region_weights.h index fe95dedd107..7d9f0bf2feb 100644 --- a/Weights/include/CGAL/Weights/barycentric_region_weights.h +++ b/Weights/include/CGAL/Weights/barycentric_region_weights.h @@ -22,6 +22,13 @@ namespace CGAL { namespace Weights { +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights + \brief computes the area of the barycentric cell in 2D using the points `p`, `q`, and `r`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, @@ -38,20 +45,32 @@ typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_2& p, const Point_2 m1 = midpoint_2(q, r); const Point_2 m2 = midpoint_2(q, p); - const FT A1 = internal::positive_area_2(traits, q, m1, center); - const FT A2 = internal::positive_area_2(traits, q, center, m2); + const FT A1 = internal::positive_area_2(q, m1, center, traits); + const FT A2 = internal::positive_area_2(q, center, m2, traits); return A1 + A2; } -template -typename GeomTraits::FT barycentric_area(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights + \brief computes the area of the barycentric cell in 2D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT barycentric_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) { - const GeomTraits traits; + const Kernel traits; return barycentric_area(p, q, r, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights + \brief computes the area of the barycentric cell in 3D using the points `p`, `q`, and `r`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, @@ -68,17 +87,22 @@ typename GeomTraits::FT barycentric_area(const typename GeomTraits::Point_3& p, const Point_3 m1 = midpoint_3(q, r); const Point_3 m2 = midpoint_3(q, p); - const FT A1 = internal::positive_area_3(traits, q, m1, center); - const FT A2 = internal::positive_area_3(traits, q, center, m2); + const FT A1 = internal::positive_area_3(q, m1, center, traits); + const FT A2 = internal::positive_area_3(q, center, m2, traits); return A1 + A2; } -template -typename GeomTraits::FT barycentric_area(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +/*! + \ingroup PkgWeightsRefBarycentricRegionWeights + \brief computes the area of the barycentric cell in 3D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT barycentric_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - const GeomTraits traits; + const Kernel traits; return barycentric_area(p, q, r, traits); } diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index be6b1b7876d..c7596aa53ee 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -65,57 +65,82 @@ FT half_cotangent_weight(const FT cot) return cotangent_ns::half_weight(cot); } +/*! + \ingroup PkgWeightsRefCotangentWeights + \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template -typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT cot_beta = internal::cotangent_2(traits, q, t, r); - const FT cot_gamma = internal::cotangent_2(traits, r, p, q); + const FT cot_beta = cotangent_2(q, p0, p1, traits); + const FT cot_gamma = cotangent_2(p1, p2, q, traits); return cotangent_ns::weight(cot_beta, cot_gamma); } -template -typename GeomTraits::FT cotangent_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefCotangentWeights + \brief computes the cotangent weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT cotangent_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) { - GeomTraits traits; - return cotangent_weight(t, r, p, q, traits); + Kernel traits; + return cotangent_weight(p0, p1, p2, q, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefCotangentWeights + \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template -typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT cot_beta = internal::cotangent_3(traits, q, t, r); - const FT cot_gamma = internal::cotangent_3(traits, r, p, q); + const FT cot_beta = cotangent_3(q, p0, p1, traits); + const FT cot_gamma = cotangent_3(p1, p2, q, traits); return cotangent_ns::weight(cot_beta, cot_gamma); } -template -typename GeomTraits::FT cotangent_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +/*! + \ingroup PkgWeightsRefCotangentWeights + \brief computes the cotangent weight in 3D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT cotangent_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) { - GeomTraits traits; - return cotangent_weight(t, r, p, q, traits); + Kernel traits; + return cotangent_weight(p0, p1, p2, q, traits); } +/// \cond SKIP_IN_MANUAL + // Undocumented cotangent weight class. +// // Its constructor takes a polygon mesh and a vertex to point map // and its operator() is defined based on the halfedge_descriptor only. // This version is currently used in: @@ -219,6 +244,7 @@ public: }; // Undocumented cotangent weight class. +// // Its constructor takes a boolean flag to choose between default and clamped // versions of the cotangent weights and its operator() is defined based on the // halfedge_descriptor, polygon mesh, and vertex to point map. @@ -460,6 +486,8 @@ private: } }; +/// \endcond + } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h index 514b25eb488..6faa6f189c4 100644 --- a/Weights/include/CGAL/Weights/discrete_harmonic_weights.h +++ b/Weights/include/CGAL/Weights/discrete_harmonic_weights.h @@ -31,82 +31,97 @@ namespace Weights { namespace discrete_harmonic_ns { template -FT weight(const FT d1, const FT d2, const FT d, - const FT A1, const FT A2, const FT B) +FT weight(const FT d0, const FT d2, const FT d, + const FT A0, const FT A2, const FT B) { FT w = FT(0); - CGAL_precondition(!is_zero(A1) && !is_zero(A2)); - const FT prod = A1 * A2; + CGAL_precondition(!is_zero(A0) && !is_zero(A2)); + const FT prod = A0 * A2; if (!is_zero(prod)) - w = (d2 * A1 - d * B + d1 * A2) / prod; + w = (d2 * A0 - d * B + d0 * A2) / prod; return w; } } // namespace discrete_harmonic_ns +/// \endcond + +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefDiscreteHarmonicWeights + \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template -typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; auto squared_distance_2 = traits.compute_squared_distance_2_object(); + auto area_2 = traits.compute_area_2_object(); - const FT d1 = squared_distance_2(q, t); - const FT d2 = squared_distance_2(q, r); - const FT d3 = squared_distance_2(q, p); + const FT d0 = squared_distance_2(q, p0); + const FT d = squared_distance_2(q, p1); + const FT d2 = squared_distance_2(q, p2); - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT B = internal::area_2(traits, p, q, t); + const FT A0 = area_2(p1, q, p0); + const FT A2 = area_2(p2, q, p1); + const FT B = area_2(p2, q, p0); - return discrete_harmonic_ns::weight(d1, d2, d3, A1, A2, B); + return discrete_harmonic_ns::weight(d0, d2, d, A0, A2, B); } -template -typename GeomTraits::FT discrete_harmonic_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefDiscreteHarmonicWeights + \brief computes the discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT discrete_harmonic_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) { - const GeomTraits traits; - return discrete_harmonic_weight(t, r, p, q, traits); + const Kernel traits; + return discrete_harmonic_weight(p0, p1, p2, q, traits); } -namespace internal { +// 3D ============================================================================================== + +/// \cond SKIP_IN_MANUAL template -typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT discrete_harmonic_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten(traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights::discrete_harmonic_weight(tf, rf, pf, qf, traits); + Point_2 p0f, p1f, p2f, qf; + internal::flatten(p0, p1, p2, q, + p0f, p1f, p2f, qf, + traits); + return discrete_harmonic_weight(p0f, p1f, p2f, qf, traits); } -template -typename GeomTraits::FT discrete_harmonic_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +template +typename Kernel::FT discrete_harmonic_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) { - const GeomTraits traits; - return discrete_harmonic_weight(t, r, p, q, traits); + const Kernel traits; + return discrete_harmonic_weight(p0, p1, p2, q, traits); } -} // namespace internal - /// \endcond /*! @@ -125,7 +140,7 @@ typename GeomTraits::FT discrete_harmonic_weight(const CGAL::Point_3 \tparam VertexRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` \tparam GeomTraits a model of `AnalyticWeightTraits_2` \tparam PointMap a model of `ReadablePropertyMap` whose key type is `VertexRange::value_type` and - value type is `Point_2`. The default is `CGAL::Identity_property_map`. + value type is `Point_2`. The default is `CGAL::Identity_property_map`. \cgalModels `BarycentricWeights_2` */ @@ -341,9 +356,9 @@ private: \return an output iterator to the element in the destination range, one past the last weight stored - \pre polygon.size() >= 3 - \pre polygon is simple - \pre polygon is strictly convex + \pre `polygon.size() >= 3` + \pre `polygon` is simple + \pre `polygon` is strictly convex */ template OutIterator discrete_harmonic_weights_2(const PointRange& polygon, diff --git a/Weights/include/CGAL/Weights/inverse_distance_weights.h b/Weights/include/CGAL/Weights/inverse_distance_weights.h index 332d18f9c4a..34e7a69bddd 100644 --- a/Weights/include/CGAL/Weights/inverse_distance_weights.h +++ b/Weights/include/CGAL/Weights/inverse_distance_weights.h @@ -38,29 +38,53 @@ FT weight(const FT d) } // namespace inverse_distance_ns +/// \endcond + +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 2D using the points `p` and `q`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT d = internal::distance_2(traits, q, r); + const FT d = internal::distance_2(p, q, traits); return inverse_distance_ns::weight(d); } -template -typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 2D using the points `p` and `q`. + \tparam Kernel a model of `Kernel` +*/ +template +#ifdef DOXYGEN_RUNNING +typename Kernel::FT inverse_distance_weight(const CGAL::Point_2&, + const CGAL::Point_2& p, + const CGAL::Point_2&, + const CGAL::Point_2& q) +#else +typename Kernel::FT inverse_distance_weight(const CGAL::Point_2& stub_l, + const CGAL::Point_2& p, + const CGAL::Point_2& stub_r, + const CGAL::Point_2& q) +#endif { - const GeomTraits traits; - return inverse_distance_weight(t, r, p, q, traits); + const Kernel traits; + return inverse_distance_weight(stub_l, p, stub_r, q, traits); } +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 2D using the points `p` and `q`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, @@ -70,37 +94,66 @@ typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point return inverse_distance_weight(stub, p, stub, q, traits); } -template -typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 2D using the points `p` and `q`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT inverse_distance_weight(const CGAL::Point_2& p, + const CGAL::Point_2& q) { - CGAL::Point_2 stub; + CGAL::Point_2 stub; return inverse_distance_weight(stub, p, stub, q); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 3D using the points `p` and `q`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT d = internal::distance_3(traits, q, r); + const FT d = internal::distance_3(p, q, traits); return inverse_distance_ns::weight(d); } -template -typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 3D using the points `p` and `q`. + \tparam Kernel a model of `Kernel` +*/ +template +#ifdef DOXYGEN_RUNNING +typename Kernel::FT inverse_distance_weight(const CGAL::Point_3&, + const CGAL::Point_3& p, + const CGAL::Point_3&, + const CGAL::Point_3& q) +#else +typename Kernel::FT inverse_distance_weight(const CGAL::Point_3& stub_l, + const CGAL::Point_3& p, + const CGAL::Point_3& stub_r, + const CGAL::Point_3& q) +#endif { - const GeomTraits traits; - return inverse_distance_weight(t, r, p, q, traits); + const Kernel traits; + return inverse_distance_weight(stub_l, p, stub_r, q, traits); } +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 3D using the points `p` and `q`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, @@ -110,16 +163,19 @@ typename GeomTraits::FT inverse_distance_weight(const typename GeomTraits::Point return inverse_distance_weight(stub, p, stub, q, traits); } -template -typename GeomTraits::FT inverse_distance_weight(const CGAL::Point_3& p, - const CGAL::Point_3& q) +/*! + \ingroup PkgWeightsRefInverseDistanceWeights + \brief computes the inverse distance weight in 3D using the points `p` and `q`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT inverse_distance_weight(const CGAL::Point_3& p, + const CGAL::Point_3& q) { - CGAL::Point_3 stub; + CGAL::Point_3 stub; return inverse_distance_weight(stub, p, stub, q); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/mean_value_weights.h b/Weights/include/CGAL/Weights/mean_value_weights.h index 3271db9cbb0..a7bd53e9d6c 100644 --- a/Weights/include/CGAL/Weights/mean_value_weights.h +++ b/Weights/include/CGAL/Weights/mean_value_weights.h @@ -32,12 +32,12 @@ namespace Weights { namespace mean_value_ns { template -FT sign_of_weight(const FT A1, const FT A2, const FT B) +FT sign_of_weight(const FT A0, const FT A2, const FT B) { - if (A1 > FT(0) && A2 > FT(0) && B <= FT(0)) + if (A0 > FT(0) && A2 > FT(0) && B <= FT(0)) return +FT(1); - if (A1 < FT(0) && A2 < FT(0) && B >= FT(0)) + if (A0 < FT(0) && A2 < FT(0) && B >= FT(0)) return -FT(1); if (B > FT(0)) @@ -50,112 +50,127 @@ FT sign_of_weight(const FT A1, const FT A2, const FT B) } template -typename GeomTraits::FT weight(const GeomTraits& traits, - const typename GeomTraits::FT r1, - const typename GeomTraits::FT r2, - const typename GeomTraits::FT r3, - const typename GeomTraits::FT D1, +typename GeomTraits::FT weight(const typename GeomTraits::FT d0, + const typename GeomTraits::FT d2, + const typename GeomTraits::FT d, + const typename GeomTraits::FT D0, const typename GeomTraits::FT D2, const typename GeomTraits::FT D, - const typename GeomTraits::FT sign) + const typename GeomTraits::FT sign, + const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Get_sqrt = internal::Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); - const FT P1 = r1 * r2 + D1; - const FT P2 = r2 * r3 + D2; + const FT P1 = d * d0 + D0; + const FT P2 = d * d2 + D2; FT w = FT(0); CGAL_precondition(!is_zero(P1) && !is_zero(P2)); const FT prod = P1 * P2; if (!is_zero(prod)) { - const FT inv = FT(1) / prod; - w = FT(2) * (r1 * r3 - D) * inv; + w = FT(2) * (d0 * d2 - D) / prod; CGAL_assertion(w >= FT(0)); w = sqrt(w); } - w *= FT(2); w *= sign; + w *= sign * FT(2); return w; } } // namespace mean_value_ns +/// \endcond + +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefMeanValueWeights + \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template -typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Vector_2 = typename GeomTraits::Vector_2; + auto vector_2 = traits.construct_vector_2_object(); auto dot_product_2 = traits.compute_scalar_product_2_object(); - auto construct_vector_2 = traits.construct_vector_2_object(); + auto area_2 = traits.compute_area_2_object(); - const Vector_2 v1 = construct_vector_2(q, t); - const Vector_2 v2 = construct_vector_2(q, r); - const Vector_2 v3 = construct_vector_2(q, p); + const Vector_2 v1 = vector_2(q, p0); + const Vector_2 v = vector_2(q, p1); + const Vector_2 v2 = vector_2(q, p2); - const FT l1 = internal::length_2(traits, v1); - const FT l2 = internal::length_2(traits, v2); - const FT l3 = internal::length_2(traits, v3); + const FT d0 = internal::length_2(v1, traits); + const FT d = internal::length_2(v, traits); + const FT d2 = internal::length_2(v2, traits); - const FT D1 = dot_product_2(v1, v2); - const FT D2 = dot_product_2(v2, v3); - const FT D = dot_product_2(v1, v3); + const FT D0 = dot_product_2(v1, v); + const FT D2 = dot_product_2(v, v2); + const FT D = dot_product_2(v1, v2); - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT B = internal::area_2(traits, p, q, t); + const FT A0 = area_2(p1, q, p0); + const FT A2 = area_2(p2, q, p1); + const FT B = area_2(p2, q, p0); - const FT sign = mean_value_ns::sign_of_weight(A1, A2, B); - return mean_value_ns::weight(traits, l1, l2, l3, D1, D2, D, sign); + const FT sign = mean_value_ns::sign_of_weight(A0, A2, B); + return mean_value_ns::weight(d0, d2, d, D0, D2, D, sign, traits); } -template -typename GeomTraits::FT mean_value_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefMeanValueWeights + \brief computes the mean value weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT mean_value_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) { - const GeomTraits traits; - return mean_value_weight(t, r, p, q, traits); + const Kernel traits; + return mean_value_weight(p0, p1, p2, q, traits); } -namespace internal { +// 3D ============================================================================================== + +/// \cond SKIP_IN_MANUAL template -typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT mean_value_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten(traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights::mean_value_weight(tf, rf, pf, qf, traits); + + Point_2 p0f, p1f, p2f, qf; + internal::flatten(p0, p1, p2, q, + p0f, p1f, p2f, qf, + traits); + return CGAL::Weights::mean_value_weight(p0f, p1f, p2f, qf, traits); } -template -typename GeomTraits::FT mean_value_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +template +typename Kernel::FT mean_value_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) { - const GeomTraits traits; - return mean_value_weight(t, r, p, q, traits); + const Kernel traits; + return mean_value_weight(p0, p1, p2, q, traits); } -} // namespace internal - /// \endcond /*! @@ -163,13 +178,12 @@ typename GeomTraits::FT mean_value_weight(const CGAL::Point_3& t, \brief 2D mean value weights for polygons. - This class implements 2D mean value weights ( \cite cgal:bc:hf-mvcapp-06, - \cite cgal:bc:fhk-gcbcocp-06, \cite cgal:f-mvc-03 ) which can be computed - at any point inside and outside a simple polygon. + This class implements 2D mean value weights (\cite cgal:bc:fhk-gcbcocp-06, \cite cgal:f-mvc-03, + \cite cgal:bc:hf-mvcapp-06) which can be computed at any point inside and outside a simple polygon. Mean value weights are well-defined inside and outside a simple polygon and are non-negative in the kernel of a star-shaped polygon. These weights are computed - analytically using the formulation from the `tangent_weight()`. + analytically using the formulation from `tangent_weight()`. \tparam VertexRange a model of `ConstRange` whose iterator type is `RandomAccessIterator` \tparam GeomTraits a model of `AnalyticWeightTraits_2` @@ -188,6 +202,7 @@ public: /// @{ /// \cond SKIP_IN_MANUAL + using Vertex_range = VertexRange; using Geom_traits = GeomTraits; using Point_map = PointMap; @@ -199,6 +214,7 @@ public: using Scalar_product_2 = typename GeomTraits::Compute_scalar_product_2; using Get_sqrt = internal::Get_sqrt; using Sqrt = typename Get_sqrt::Sqrt; + /// \endcond /// Number type. @@ -274,6 +290,7 @@ public: /// @} /// \cond SKIP_IN_MANUAL + template OutIterator operator()(const Point_2& query, OutIterator weights, @@ -414,11 +431,10 @@ private: \param traits a traits class with geometric objects, predicates, and constructions; this parameter can be omitted if the traits class can be deduced from the point type - \return an output iterator to the element in the destination range, - one past the last weight stored + \return an output iterator to the element in the destination range, one past the last weight stored - \pre polygon.size() >= 3 - \pre polygon is simple + \pre `polygon.size() >= 3` + \pre `polygon` is simple */ template typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, @@ -49,11 +55,17 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p const Point_2 m1 = midpoint_2(q, r); const Point_2 m2 = midpoint_2(q, p); - const FT A1 = internal::positive_area_2(traits, q, m1, center); - const FT A2 = internal::positive_area_2(traits, q, center, m2); + const FT A1 = internal::positive_area_2(q, m1, center, traits); + const FT A2 = internal::positive_area_2(q, center, m2, traits); + return A1 + A2; } +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights + \brief computes the area of the mixed Voronoi cell in 2D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ template typename GeomTraits::FT mixed_voronoi_area(const CGAL::Point_2& p, const CGAL::Point_2& q, @@ -63,6 +75,13 @@ typename GeomTraits::FT mixed_voronoi_area(const CGAL::Point_2& p, return mixed_voronoi_area(p, q, r, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights + \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q`, and `r`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, @@ -89,22 +108,26 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_3& p const Point_3 m1 = midpoint_3(q, r); const Point_3 m2 = midpoint_3(q, p); - const FT A1 = internal::positive_area_3(traits, q, m1, center); - const FT A2 = internal::positive_area_3(traits, q, center, m2); + const FT A1 = internal::positive_area_3(q, m1, center, traits); + const FT A2 = internal::positive_area_3(q, center, m2, traits); + return A1 + A2; } -template -typename GeomTraits::FT mixed_voronoi_area(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +/*! + \ingroup PkgWeightsRefMixedVoronoiRegionWeights + \brief computes the area of the mixed Voronoi cell in 3D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT mixed_voronoi_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - const GeomTraits traits; + const Kernel traits; return mixed_voronoi_area(p, q, r, traits); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/shepard_weights.h b/Weights/include/CGAL/Weights/shepard_weights.h index 8c12d55687d..e510cbd6507 100644 --- a/Weights/include/CGAL/Weights/shepard_weights.h +++ b/Weights/include/CGAL/Weights/shepard_weights.h @@ -26,13 +26,9 @@ namespace Weights { namespace shepard_ns { -template -typename GeomTraits::FT weight(const GeomTraits& traits, - const typename GeomTraits::FT d, - const typename GeomTraits::FT p) +template +FT weight(const FT d, const FT p) { - using FT = typename GeomTraits::FT; - FT w = FT(0); CGAL_precondition(is_positive(d)); if(is_positive(d)) @@ -43,31 +39,57 @@ typename GeomTraits::FT weight(const GeomTraits& traits, } // namespace shepard_ns +/// \endcond + +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2& r, + const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2& q, const typename GeomTraits::FT a, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - - const FT d = internal::distance_2(traits, q, r); - return shepard_ns::weight(traits, d, a); + const FT d = internal::distance_2(p, q, traits); + return shepard_ns::weight(d, a); } -template -typename GeomTraits::FT shepard_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 2D using the points `p` and `q`, and the power parameter `a` + \tparam Kernel a model of `Kernel` +*/ +template +#ifdef DOXYGEN_RUNNING +typename Kernel::FT shepard_weight(const CGAL::Point_2&, + const CGAL::Point_2& p^, + const CGAL::Point_2&, + const CGAL::Point_2& q, + const typename Kernel::FT a = {1}) +#else +typename Kernel::FT shepard_weight(const CGAL::Point_2& stub_l, + const CGAL::Point_2& p, + const CGAL::Point_2& stub_r, + const CGAL::Point_2& q, + const typename Kernel::FT a = {1}) +#endif { - const GeomTraits traits; - return shepard_weight(t, r, p, q, a, traits); + const Kernel traits; + return shepard_weight(stub_l, p, stub_r, q, a, traits); } +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 2D using the points `p` and `q` and the power parameter `a`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, @@ -78,39 +100,69 @@ typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_2& p, return shepard_weight(stub, p, stub, q, a, traits); } -template -typename GeomTraits::FT shepard_weight(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 2D using the points `p` and `q`, and the power parameter `a`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT shepard_weight(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const typename Kernel::FT a = {1}) { - CGAL::Point_2 stub; + CGAL::Point_2 stub; return shepard_weight(stub, p, stub, q, a); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3& r, + const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3& q, const typename GeomTraits::FT a, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT d = internal::distance_3(traits, q, r); - return shepard_ns::weight(traits, d, a); + const FT d = internal::distance_3(p, q, traits); + return shepard_ns::weight(d, a); } -template -typename GeomTraits::FT shepard_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 3D using the points `p` and `q`, and the power parameter `a`. + \tparam Kernel a model of `Kernel` +*/ +template +#ifdef DOXYGEN_RUNNING +typename Kernel::FT shepard_weight(const CGAL::Point_3& p, + const CGAL::Point_3&, + const CGAL::Point_3& q, + const CGAL::Point_3&, + const typename Kernel::FT a = {1}) +#else +typename Kernel::FT shepard_weight(const CGAL::Point_3& stub_l, + const CGAL::Point_3& p, + const CGAL::Point_3& stub_r, + const CGAL::Point_3& q, + const typename Kernel::FT a = {1}) +#endif { - const GeomTraits traits; - return shepard_weight(t, r, p, q, a, traits); + const Kernel traits; + return shepard_weight(stub_l, p, stub_r, q, a, traits); } +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 3D using the points `p` and `q` and the power parameter `a`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, @@ -121,17 +173,20 @@ typename GeomTraits::FT shepard_weight(const typename GeomTraits::Point_3& p, return shepard_weight(stub, p, stub, q, a, traits); } -template -typename GeomTraits::FT shepard_weight(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +/*! + \ingroup PkgWeightsRefShepardWeights + \brief computes the Shepard weight in 3D using the points `p` and `q`, and the power parameter `a`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT shepard_weight(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const typename Kernel::FT a = {1}) { - CGAL::Point_3 stub; + CGAL::Point_3 stub; return shepard_weight(stub, p, stub, q, a); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 4c4260314fd..119dee11623 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -40,32 +40,33 @@ FT half_weight(const FT t, const FT r) } template -FT weight(const FT t1, const FT t2, const FT r) +FT weight(const FT t0, const FT t2, const FT r) { FT w = FT(0); CGAL_precondition(r != FT(0)); if (r != FT(0)) - w = FT(2) * (t1 + t2) / r; + w = FT(2) * (t0 + t2) / r; return w; } template -FT weight(const FT d1, const FT d, const FT d2, - const FT A1, const FT A2, - const FT D1, const FT D2) +FT weight(const FT d0, const FT d2, const FT d, + const FT A0, const FT A2, + const FT D0, const FT D2) { - const FT P1 = d1 * d + D1; - const FT P2 = d2 * d + D2; + const FT P0 = d * d0 + D0; + const FT P2 = d * d2 + D2; FT w = FT(0); - CGAL_precondition(!is_zero(P1) && !is_zero(P2)); - if (!is_zero(P1) && !is_zero(P2)) + CGAL_precondition(!is_zero(P0) && !is_zero(P2)); + if (!is_zero(P0) && !is_zero(P2)) { - const FT t1 = FT(2) * A1 / P1; + const FT t0 = FT(2) * A0 / P0; const FT t2 = FT(2) * A2 / P2; - w = weight(t1, t2, d); + w = weight(t0, t2, d); } + return w; } @@ -73,9 +74,9 @@ FT weight(const FT d1, const FT d, const FT d2, // This version is based on the positive area. // This version is more precise for all positive cases. template -typename GeomTraits::FT tangent_weight_v1(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT tangent_weight_v1(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { @@ -83,92 +84,62 @@ typename GeomTraits::FT tangent_weight_v1(const typename GeomTraits::Point_3& t, using Vector_3 = typename GeomTraits::Vector_3; auto dot_product_3 = traits.compute_scalar_product_3_object(); - auto construct_vector_3 = traits.construct_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); - const Vector_3 v1 = construct_vector_3(q, t); - const Vector_3 v2 = construct_vector_3(q, r); - const Vector_3 v3 = construct_vector_3(q, p); + const Vector_3 v0 = vector_3(q, p0); + const Vector_3 v = vector_3(q, p1); + const Vector_3 v2 = vector_3(q, p2); - const FT l1 = internal::length_3(traits, v1); - const FT l2 = internal::length_3(traits, v2); - const FT l3 = internal::length_3(traits, v3); + const FT d0 = internal::length_3(v0, traits); + const FT d = internal::length_3(v, traits); + const FT d2 = internal::length_3(v2, traits); - const FT A1 = internal::positive_area_3(traits, r, q, t); - const FT A2 = internal::positive_area_3(traits, p, q, r); + const FT A0 = internal::positive_area_3(p1, q, p0, traits); + const FT A2 = internal::positive_area_3(p2, q, p1, traits); - const FT D1 = dot_product_3(v1, v2); - const FT D2 = dot_product_3(v2, v3); + const FT D0 = dot_product_3(v0, v); + const FT D2 = dot_product_3(v, v2); - return weight(l1, l2, l3, A1, A2, D1, D2); + return weight(d0, d2, d, A0, A2, D0, D2); } // This version handles both positive and negative cases. // However, it is less precise. template -typename GeomTraits::FT tangent_weight_v2(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT tangent_weight_v2(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Vector_3 = typename GeomTraits::Vector_3; - auto construct_vector_3 = traits.construct_vector_3_object(); + auto vector_3 = traits.construct_vector_3_object(); - Vector_3 v1 = construct_vector_3(q, t); - Vector_3 v2 = construct_vector_3(q, r); - Vector_3 v3 = construct_vector_3(q, p); + Vector_3 v0 = vector_3(q, p0); + Vector_3 v = vector_3(q, p1); + Vector_3 v2 = vector_3(q, p2); - const FT l2 = internal::length_3(traits, v2); + const FT l2 = internal::length_3(v, traits); - internal::normalize_3(traits, v1); - internal::normalize_3(traits, v2); - internal::normalize_3(traits, v3); + internal::normalize_3(v0, traits); + internal::normalize_3(v, traits); + internal::normalize_3(v2, traits); - const double ha_rad_1 = internal::angle_3(traits, v1, v2) / 2.0; - const double ha_rad_2 = internal::angle_3(traits, v2, v3) / 2.0; - const FT t1 = static_cast(std::tan(ha_rad_1)); + const double ha_rad_1 = internal::angle_3(v0, v, traits) / 2.0; + const double ha_rad_2 = internal::angle_3(v, v2, traits) / 2.0; + const FT t0 = static_cast(std::tan(ha_rad_1)); const FT t2 = static_cast(std::tan(ha_rad_2)); - return weight(t1, t2, l2); + return weight(t0, t2, l2); } } // namespace tangent_ns /// \endcond -/*! - \ingroup PkgWeightsRefTangentWeights - - \brief computes the tangent of the half angle. - - This function computes the tangent of the half angle using the precomputed - distance, area, and dot product values. The returned value is - \f$\frac{2\textbf{A}}{\textbf{d}\textbf{d_1} + \textbf{D_1}}\f$. - - \tparam FT a model of `FieldNumberType` - - \param d1 the first distance value - \param d2 the second distance value - \param A the area value - \param D the dot product value - - \pre (d1 * d2 + D) != 0 - - \sa `half_tangent_weight()` -*/ -template -FT tangent_half_angle(const FT d1, const FT d2, const FT A, const FT D) -{ - FT t = FT(0); - const FT P = d1 * d2 + D; - CGAL_precondition(!is_zero(P)); - if (!is_zero(P)) - t = FT(2) * A / P; - - return t; -} +// 2D ============================================================================================== /*! \ingroup PkgWeightsRefTangentWeights @@ -195,6 +166,42 @@ FT half_tangent_weight(const FT tan05, const FT d) return tangent_ns::half_weight(tan05, d); } +/*! + \ingroup PkgWeightsRefTangentWeights + + \brief computes the tangent of the half angle. + + This function computes the tangent of the half angle using the precomputed + distance, area, and dot product values. The returned value is + \f$\frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\f$. + + \tparam FT a model of `FieldNumberType` + + \param d the distance value + \param l the distance value + \param A the area value + \param D the dot product value + + \pre (d * l + D) != 0 + + \sa `half_tangent_weight()` +*/ +template +FT tangent_half_angle(const FT d, const FT l, const FT A, const FT D) +{ + // tan(theta/2) = sin(theta) / ( 1 + cos(theta) ), also = (1 - cos(theta)) / sin(theta). + // = ( 2*A / |v1|*|v2| ) / ( 1 + v1.v2 / |v1|*|v2| ) + // = 2*A / ( |v1|*|v2| + v1.v2 ) + + FT t = FT(0); + const FT P = d * l + D; + CGAL_precondition(!is_zero(P)); + if (!is_zero(P)) + t = FT(2) * A / P; + + return t; +} + /*! \ingroup PkgWeightsRefTangentWeights @@ -224,65 +231,138 @@ FT half_tangent_weight(const FT d, const FT l, const FT A, const FT D) } /// \cond SKIP_IN_MANUAL + template -typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT half_tangent_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& q, + const typename GeomTraits::Point_2& p2, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + + auto vector_2 = traits.construct_vector_2_object(); + auto dot_product_2 = traits.compute_scalar_product_2_object(); + auto area_2 = traits.compute_area_2_object(); + + const Vector_2 v0 = vector_2(q, p0); + const Vector_2 v2 = vector_2(q, p2); + + const FT l0 = internal::length_2(v0, traits); + const FT l2 = internal::length_2(v2, traits); + const FT A = area_2(p2, q, p0); + const FT D = dot_product_2(v0, v2); + + return half_tangent_weight(l0, l2, A, D); +} + +template +typename GeomTraits::FT half_tangent_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& q, + const typename GeomTraits::Point_3& p2, + const GeomTraits& traits) +{ + using FT = typename GeomTraits::FT; + + auto vector_3 = traits.construct_vector_3_object(); + auto dot_product_3 = traits.compute_scalar_product_3_object(); + + const Vector_3 v0 = vector_3(q, p0); + const Vector_3 v2 = vector_3(q, p2); + + const FT l0 = internal::length_3(v0, traits); + const FT l2 = internal::length_3(v2, traits); + const FT A = internal::area_3(p2, q, p0, traits); + const FT D = dot_product_3(v0, v2); + + return half_tangent_weight(l0, l2, A, D); +} + +/// \endcond + +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefTangentWeights + \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, and `p2` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ +template +typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; using Vector_2 = typename GeomTraits::Vector_2; + auto vector_2 = traits.construct_vector_2_object(); auto dot_product_2 = traits.compute_scalar_product_2_object(); - auto construct_vector_2 = traits.construct_vector_2_object(); + auto area_2 = traits.compute_area_2_object(); - const Vector_2 v1 = construct_vector_2(q, t); - const Vector_2 v2 = construct_vector_2(q, r); - const Vector_2 v3 = construct_vector_2(q, p); + const Vector_2 v0 = vector_2(q, p0); + const Vector_2 v = vector_2(q, p1); + const Vector_2 v2 = vector_2(q, p2); - const FT l1 = internal::length_2(traits, v1); - const FT l2 = internal::length_2(traits, v2); - const FT l3 = internal::length_2(traits, v3); + const FT l0 = internal::length_2(v0, traits); + const FT l = internal::length_2(v, traits); + const FT l2 = internal::length_2(v2, traits); - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); + const FT A0 = area_2(p1, q, p0); + const FT A2 = area_2(p2, q, p1); - const FT D1 = dot_product_2(v1, v2); - const FT D2 = dot_product_2(v2, v3); + const FT D0 = dot_product_2(v0, v); + const FT D2 = dot_product_2(v, v2); - return tangent_ns::weight(l1, l2, l3, A1, A2, D1, D2); + return tangent_ns::weight(l0, l2, l, A0, A2, D0, D2); } -template -typename GeomTraits::FT tangent_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefTangentWeights + \brief computes the tangent weight in 2D at `q` using the points `p0`, `p1`, and `p2` + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT tangent_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) { - const GeomTraits traits; - return tangent_weight(t, r, p, q, traits); + const Kernel traits; + return tangent_weight(p0, p1, p2, q, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefTangentWeights + \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, and `p2` + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template -typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT tangent_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { - // return tangent_ns::tangent_weight_v1(t, r, p, q, traits); - return tangent_ns::tangent_weight_v2(t, r, p, q, traits); +// return tangent_ns::tangent_weight_v1(p0, p1, p2, q, traits); + return tangent_ns::tangent_weight_v2(p0, p1, p2, q, traits); } -template -typename GeomTraits::FT tangent_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +/*! + \ingroup PkgWeightsRefTangentWeights + \brief computes the tangent weight in 3D at `q` using the points `p0`, `p1`, and `p2` + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT tangent_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) { - const GeomTraits traits; - return tangent_weight(t, r, p, q, traits); + const Kernel traits; + return tangent_weight(p0, p1, p2, q, traits); } // Undocumented tangent weight class. diff --git a/Weights/include/CGAL/Weights/three_point_family_weights.h b/Weights/include/CGAL/Weights/three_point_family_weights.h index f5b08ce9c48..51bdf0eeb51 100644 --- a/Weights/include/CGAL/Weights/three_point_family_weights.h +++ b/Weights/include/CGAL/Weights/three_point_family_weights.h @@ -26,90 +26,109 @@ namespace Weights { namespace three_point_family_ns { template -FT weight(const FT d1, const FT d2, const FT d, - const FT A1, const FT A2, const FT B, +FT weight(const FT d0, const FT d2, const FT d, + const FT A0, const FT A2, const FT B, const FT p) { FT w = FT(0); - CGAL_precondition(!is_zero(A1) && !is_zero(A2)); - const FT prod = A1 * A2; + CGAL_precondition(!is_zero(A0) && !is_zero(A2)); + const FT prod = A0 * A2; if (!is_zero(prod)) { - const FT r1 = internal::power(d1, p); + const FT r0 = internal::power(d0, p); + const FT r = internal::power(d , p); const FT r2 = internal::power(d2, p); - const FT r = internal::power(d , p); - w = (r2 * A1 - r * B + r1 * A2) / prod; + w = (r2 * A0 - r * B + r0 * A2) / prod; } return w; } } // namespace three_point_family_ns +/// \endcond + +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefThreePointFamilyWeights + \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1` and `p2`, + and the power parameter `a`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template -typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const typename GeomTraits::FT a, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT d1 = internal::distance_2(traits, q, t); - const FT d2 = internal::distance_2(traits, q, r); - const FT d3 = internal::distance_2(traits, q, p); + auto area_2 = traits.compute_area_2_object(); - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT B = internal::area_2(traits, p, q, t); + const FT d0 = internal::distance_2(q, p0, traits); + const FT d = internal::distance_2(q, p1, traits); + const FT d2 = internal::distance_2(q, p2, traits); - return three_point_family_ns::weight(traits, d1, d2, d3, A1, A2, B, a); + const FT A0 = area_2(p1, q, p0); + const FT A2 = area_2(p2, q, p1); + const FT B = area_2(p2, q, p0); + + return three_point_family_ns::weight(d0, d2, d, A0, A2, B, a); } -template -typename GeomTraits::FT three_point_family_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q, - const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +/*! + \ingroup PkgWeightsRefThreePointFamilyWeights + \brief computes the three-point family weight in 2D at `q` using the points `p0`, `p1` and `p2`, + and the power parameter `a`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT three_point_family_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q, + const typename Kernel::FT a = {1}) { - const GeomTraits traits; - return three_point_family_weight(t, r, p, q, a, traits); + const Kernel traits; + return three_point_family_weight(p0, p1, p2, q, a, traits); } -namespace internal { +// 3D ============================================================================================== + +/// \cond SKIP_IN_MANUAL template -typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT three_point_family_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const typename GeomTraits::FT a, const GeomTraits& traits) { using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten(traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights::three_point_family_weight(tf, rf, pf, qf, a, traits); + Point_2 p0f, p1f, p2f, qf; + internal::flatten(p0, p1, p2 , q, + p0f, p1f, p2f, qf, + traits); + + return CGAL::Weights::three_point_family_weight(p0f, p1f, p2f, qf, a, traits); } -template -typename GeomTraits::FT three_point_family_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q, - const typename GeomTraits::FT a = typename GeomTraits::FT(1)) +template +typename Kernel::FT three_point_family_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q, + const typename Kernel::FT a = {1}) { - const GeomTraits traits; - return three_point_family_weight(t, r, p, q, a, traits); + const Kernel traits; + return three_point_family_weight(p0, p1, p2, q, a, traits); } -} // namespace internal - /// \endcond } // namespace Weights diff --git a/Weights/include/CGAL/Weights/triangular_region_weights.h b/Weights/include/CGAL/Weights/triangular_region_weights.h index 9e0f7d2facd..aa4b20a567a 100644 --- a/Weights/include/CGAL/Weights/triangular_region_weights.h +++ b/Weights/include/CGAL/Weights/triangular_region_weights.h @@ -22,45 +22,66 @@ namespace CGAL { namespace Weights { -/// \cond SKIP_IN_MANUAL +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefTriangularRegionWeights + \brief computes the area of the triangular cell in 2D using the points `p`, `q`, and `r` + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT triangular_area(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { - return internal::positive_area_2(traits, p, q, r); + return internal::positive_area_2(p, q, r, traits); } -template -typename GeomTraits::FT triangular_area(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +/*! + \ingroup PkgWeightsRefTriangularRegionWeights + \brief computes the area of the triangular cell in 2D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT triangular_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) { - const GeomTraits traits; + const Kernel traits; return triangular_area(p, q, r, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefTriangularRegionWeights + \brief computes the area of the triangular cell in 3D using the points `p`, `q`, and `r`. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT triangular_area(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { - return internal::positive_area_3(traits, p, q, r); + return internal::positive_area_3(p, q, r, traits); } -template -typename GeomTraits::FT triangular_area(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +/*! + \ingroup PkgWeightsRefTriangularRegionWeights + \brief computes the area of the triangular cell in 3D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT triangular_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - const GeomTraits traits; + const Kernel traits; return triangular_area(p, q, r, traits); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/uniform_region_weights.h b/Weights/include/CGAL/Weights/uniform_region_weights.h index a7035fcccdd..6ed0f0726b8 100644 --- a/Weights/include/CGAL/Weights/uniform_region_weights.h +++ b/Weights/include/CGAL/Weights/uniform_region_weights.h @@ -20,7 +20,13 @@ namespace CGAL { namespace Weights { -/// \cond SKIP_IN_MANUAL +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefUniformRegionWeights + \brief this function always returns `1`, given three 2D points. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_2&, const typename GeomTraits::Point_2&, @@ -31,15 +37,27 @@ typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_2&, return FT(1); } -template -typename GeomTraits::FT uniform_area(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +/*! + \ingroup PkgWeightsRefUniformRegionWeights + \brief this function always returns `1`, given three 2D points in 2D. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT uniform_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) { - const GeomTraits traits; + const Kernel traits; return uniform_area(p, q, r, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefUniformRegionWeights + \brief this function always returns `1`, given three 3D points. + \tparam GeomTraits a model of `AnalyticWeightTraits_3` +*/ template typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_3&, const typename GeomTraits::Point_3&, @@ -50,17 +68,20 @@ typename GeomTraits::FT uniform_area(const typename GeomTraits::Point_3&, return FT(1); } -template -typename GeomTraits::FT uniform_area(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +/*! + \ingroup PkgWeightsRefUniformRegionWeights + \brief this function always returns `1`, given three 3D points. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT uniform_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - const GeomTraits traits; + const Kernel traits; return uniform_area(p, q, r, traits); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/uniform_weights.h b/Weights/include/CGAL/Weights/uniform_weights.h index be69470d143..541dd95937a 100644 --- a/Weights/include/CGAL/Weights/uniform_weights.h +++ b/Weights/include/CGAL/Weights/uniform_weights.h @@ -22,51 +22,68 @@ namespace CGAL { namespace Weights { -/// \cond SKIP_IN_MANUAL -template -typename GeomTraits::FT uniform_weight( - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const typename GeomTraits::Point_2&, - const GeomTraits&) { +// 2D ============================================================================================== - using FT = typename GeomTraits::FT; - return FT(1); +/*! + \ingroup PkgWeightsRefUniformWeights + \brief returns `1`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ +template +typename GeomTraits::FT uniform_weight(const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2&, + const typename GeomTraits::Point_2&, + const GeomTraits&) +{ + return {1}; } +/*! + \ingroup PkgWeightsRefUniformWeights + \brief returns `1`. + \tparam Kernel a model of `Kernel` +*/ template -typename GeomTraits::FT uniform_weight( - const CGAL::Point_2& q, - const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p) { - +typename GeomTraits::FT uniform_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) +{ const GeomTraits traits; - return uniform_weight(q, t, r, p, traits); + return uniform_weight(p0, p1, p2, q, traits); } -template -typename GeomTraits::FT uniform_weight( - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const typename GeomTraits::Point_3&, - const GeomTraits&) { +// 3D ============================================================================================== - using FT = typename GeomTraits::FT; - return FT(1); +/*! + \ingroup PkgWeightsRefUniformWeights + \brief returns `1`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ +template +typename GeomTraits::FT uniform_weight(const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3&, + const typename GeomTraits::Point_3&, + const GeomTraits&) +{ + return {1}; } +/*! + \ingroup PkgWeightsRefUniformWeights + \brief returns `1`. + \tparam Kernel a model of `Kernel` +*/ template -typename GeomTraits::FT uniform_weight( - const CGAL::Point_3& q, - const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p) { - +typename GeomTraits::FT uniform_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) +{ const GeomTraits traits; - return uniform_weight(q, t, r, p, traits); + return uniform_weight(p0, p1, p2, q, traits); } // Undocumented uniform weight class taking as input a polygon mesh. @@ -85,8 +102,6 @@ public: double w_ij(halfedge_descriptor) { return 1.; } }; -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/utils.h b/Weights/include/CGAL/Weights/utils.h index 43c0a0945da..9f75bd14854 100644 --- a/Weights/include/CGAL/Weights/utils.h +++ b/Weights/include/CGAL/Weights/utils.h @@ -214,6 +214,11 @@ typename Kernel::FT tangent(const CGAL::Point_3& p, return tangent(p, q, r, traits); } +// ================================================================================================= + +// Computes a clamped cotangent between two 3D vectors. +// In the old version of weights in PMP, it was called "Cotangent_value_Meyer_secure". +// See Weights/internal/pmp_weights_deprecated.h for more information. template typename GeomTraits::FT cotangent_3_clamped(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, diff --git a/Weights/include/CGAL/Weights/voronoi_region_weights.h b/Weights/include/CGAL/Weights/voronoi_region_weights.h index 61880e73ff8..86d06a07243 100644 --- a/Weights/include/CGAL/Weights/voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/voronoi_region_weights.h @@ -22,7 +22,13 @@ namespace CGAL { namespace Weights { -/// \cond SKIP_IN_MANUAL +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights + \brief computes the area of the Voronoi cell in 2D using the points `p`, `q`, and `r`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& q, @@ -39,20 +45,33 @@ typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_2& p, const Point_2 m1 = midpoint_2(q, r); const Point_2 m2 = midpoint_2(q, p); - const FT A1 = internal::positive_area_2(traits, q, m1, center); - const FT A2 = internal::positive_area_2(traits, q, center, m2); + const FT A1 = internal::positive_area_2(q, m1, center,traits); + const FT A2 = internal::positive_area_2(q, center, m2, traits); + return A1 + A2; } -template -typename GeomTraits::FT voronoi_area(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights + \brief computes the area of the Voronoi cell in 2D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT voronoi_area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) { - const GeomTraits traits; + const Kernel traits; return voronoi_area(p, q, r, traits); } +// 3D ============================================================================================== + +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights + \brief computes the area of the Voronoi cell in 3D using the points `p`, `q`, and `r` + \tparam GeomTraits a model of `AnalyticWeightTraits_3`. +*/ template typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& q, @@ -69,22 +88,26 @@ typename GeomTraits::FT voronoi_area(const typename GeomTraits::Point_3& p, const Point_3 m1 = midpoint_3(q, r); const Point_3 m2 = midpoint_3(q, p); - const FT A1 = internal::positive_area_3(traits, q, m1, center); - const FT A2 = internal::positive_area_3(traits, q, center, m2); + const FT A1 = internal::positive_area_3(q, m1, center, traits); + const FT A2 = internal::positive_area_3(q, center, m2, traits); + return A1 + A2; } -template -typename GeomTraits::FT voronoi_area(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) +/*! + \ingroup PkgWeightsRefVoronoiRegionWeights + \brief computes the area of the Voronoi cell in 3D using the points `p`, `q`, and `r`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT voronoi_area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - const GeomTraits traits; + const Kernel traits; return voronoi_area(p, q, r, traits); } -/// \endcond - } // namespace Weights } // namespace CGAL diff --git a/Weights/include/CGAL/Weights/wachspress_weights.h b/Weights/include/CGAL/Weights/wachspress_weights.h index 58face6b47a..9a1c9e7bd1b 100644 --- a/Weights/include/CGAL/Weights/wachspress_weights.h +++ b/Weights/include/CGAL/Weights/wachspress_weights.h @@ -31,75 +31,92 @@ namespace Weights { namespace wachspress_ns { template -FT weight(const FT A1, const FT A2, const FT C) +FT weight(const FT A0, const FT A2, const FT C) { FT w = FT(0); - CGAL_precondition(A1 != FT(0) && A2 != FT(0)); - const FT prod = A1 * A2; - if (prod != FT(0)) - { - const FT inv = FT(1) / prod; - w = C * inv; - } + CGAL_precondition(!is_zero(A0) && !is_zero(A2)); + const FT prod = A0 * A2; + if (!is_zero(prod)) + w = C / prod; + return w; } -} // wachspress_ns +} // namespace wachspress_ns +/// \endcond + +// 2D ============================================================================================== + +/*! + \ingroup PkgWeightsRefWachspressWeights + \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam GeomTraits a model of `AnalyticWeightTraits_2` +*/ template -typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_2& t, - const typename GeomTraits::Point_2& r, - const typename GeomTraits::Point_2& p, +typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_2& p0, + const typename GeomTraits::Point_2& p1, + const typename GeomTraits::Point_2& p2, const typename GeomTraits::Point_2& q, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT A1 = internal::area_2(traits, r, q, t); - const FT A2 = internal::area_2(traits, p, q, r); - const FT C = internal::area_2(traits, t, r, p); - return wachspress_ns::weight(A1, A2, C); + + auto area_2 = traits.compute_area_2_object(); + + const FT A0 = area_2(p1, q, p0); + const FT A2 = area_2(p2, q, p1); + const FT C = area_2(p0, p1, p2); + + return wachspress_ns::weight(A0, A2, C); } -template -typename GeomTraits::FT wachspress_weight(const CGAL::Point_2& t, - const CGAL::Point_2& r, - const CGAL::Point_2& p, - const CGAL::Point_2& q) +/*! + \ingroup PkgWeightsRefWachspressWeights + \brief computes the Wachspress weight in 2D at `q` using the points `p0`, `p1`, and `p2`. + \tparam Kernel a model of `Kernel` +*/ +template +typename Kernel::FT wachspress_weight(const CGAL::Point_2& p0, + const CGAL::Point_2& p1, + const CGAL::Point_2& p2, + const CGAL::Point_2& q) { - const GeomTraits traits; - return wachspress_weight(t, r, p, q, traits); + const Kernel traits; + return wachspress_weight(p0, p1, p2, q, traits); } -namespace internal { +// 3D ============================================================================================== + +/// \cond SKIP_IN_MANUAL template -typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_3& t, - const typename GeomTraits::Point_3& r, - const typename GeomTraits::Point_3& p, +typename GeomTraits::FT wachspress_weight(const typename GeomTraits::Point_3& p0, + const typename GeomTraits::Point_3& p1, + const typename GeomTraits::Point_3& p2, const typename GeomTraits::Point_3& q, const GeomTraits& traits) { using Point_2 = typename GeomTraits::Point_2; - Point_2 tf, rf, pf, qf; - internal::flatten(traits, - t, r, p, q, - tf, rf, pf, qf); - return CGAL::Weights::wachspress_weight(tf, rf, pf, qf, traits); + Point_2 p0f, p1f, p2f, qf; + internal::flatten(p0, p1, p2, q, + p0f, p1f, p2f, qf, + traits); + + return CGAL::Weights::wachspress_weight(p0f, p1f, p2f, qf, traits); } -template -typename GeomTraits::FT wachspress_weight(const CGAL::Point_3& t, - const CGAL::Point_3& r, - const CGAL::Point_3& p, - const CGAL::Point_3& q) +template +typename Kernel::FT wachspress_weight(const CGAL::Point_3& p0, + const CGAL::Point_3& p1, + const CGAL::Point_3& p2, + const CGAL::Point_3& q) { - const GeomTraits traits; - return wachspress_weight(t, r, p, q, traits); + const Kernel traits; + return wachspress_weight(p0, p1, p2, q, traits); } -} // namespace internal - /// \endcond /*! @@ -164,9 +181,9 @@ public: \param point_map an instance of `PointMap` that maps a vertex from `polygon` to `Point_2`; the default initialization is provided - \pre polygon.size() >= 3 - \pre polygon is simple - \pre polygon is strictly convex + \pre `polygon.size() >= 3` + \pre `polygon` is simple + \pre `polygon` is strictly convex */ Wachspress_weights_2(const VertexRange& polygon, const GeomTraits traits = GeomTraits(), @@ -331,9 +348,9 @@ private: \return an output iterator to the element in the destination range, one past the last weight stored - \pre polygon.size() >= 3 - \pre polygon is simple - \pre polygon is strictly convex + \pre `polygon.size() >= 3` + \pre `polygon` is simple + \pre `polygon` is strictly convex */ template Date: Thu, 20 Oct 2022 17:21:43 +0200 Subject: [PATCH 063/426] Misc minor code cleaning --- .../Harmonic_coordinates_2.h | 3 +- .../Surface_mesh_geodesic_distances_3.h | 12 +-- .../include/CGAL/Mesh_3/vertex_perturbation.h | 2 +- .../CGAL/Polygon_mesh_processing/fair.h | 28 +++---- .../Hole_filling/Triangulate_hole_polyline.h | 12 +-- .../include/CGAL/Weights/cotangent_weights.h | 4 +- .../CGAL/Weights/internal/polygon_utils_2.h | 5 +- Weights/include/CGAL/Weights/internal/utils.h | 76 ++++++++++--------- Weights/include/CGAL/Weights/utils.h | 20 ++--- 9 files changed, 79 insertions(+), 83 deletions(-) diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h index 8e7efbd5fc3..164861dc6aa 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Harmonic_coordinates_2.h @@ -587,8 +587,7 @@ namespace Barycentric_coordinates { const auto& p0 = m_domain.vertex(neighbors[jm]); const auto& p1 = m_domain.vertex(neighbors[j]); const auto& p2 = m_domain.vertex(neighbors[jp]); - const FT w = -Weights::cotangent_weight( - p0, p1, p2, query, m_traits) / FT(2); + const FT w = -Weights::cotangent_weight(p0, p1, p2, query, m_traits) / FT(2); W -= w; if (m_domain.is_on_boundary(idx)) { diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index fd38855d2d5..64c1782bb9c 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -545,22 +545,19 @@ private: pj = p_j; pk = p_k; - const double cotan_i = CGAL::to_double( - CGAL::Weights::cotangent(pk, pi, pj, traits)); + const double cotan_i = CGAL::to_double(CGAL::Weights::cotangent(pk, pi, pj, traits)); m_cotan_matrix.add_coef(j, k, -(1./2) * cotan_i); m_cotan_matrix.add_coef(k, j, -(1./2) * cotan_i); m_cotan_matrix.add_coef(j, j, (1./2) * cotan_i); m_cotan_matrix.add_coef(k, k, (1./2) * cotan_i); - const double cotan_j = CGAL::to_double( - CGAL::Weights::cotangent(pk, pj, pi, traits)); + const double cotan_j = CGAL::to_double(CGAL::Weights::cotangent(pk, pj, pi, traits)); m_cotan_matrix.add_coef(i, k, -(1./2) * cotan_j); m_cotan_matrix.add_coef(k, i, -(1./2) * cotan_j); m_cotan_matrix.add_coef(i, i, (1./2) * cotan_j); m_cotan_matrix.add_coef(k, k, (1./2) * cotan_j); - const double cotan_k = CGAL::to_double( - CGAL::Weights::cotangent(pj, pk, pi, traits)); + const double cotan_k = CGAL::to_double(CGAL::Weights::cotangent(pj, pk, pi, traits)); m_cotan_matrix.add_coef(i, j, -(1./2) * cotan_k); m_cotan_matrix.add_coef(j, i, -(1./2) * cotan_k); m_cotan_matrix.add_coef(i, i, (1./2) * cotan_k); @@ -569,8 +566,7 @@ private: const Vector_3 v_ij = construct_vector(p_i, p_j); const Vector_3 v_ik = construct_vector(p_i, p_k); const Vector_3 cross = cross_product(v_ij, v_ik); - const double norm_cross = CGAL::sqrt( - CGAL::to_double(scalar_product(cross, cross))); + const double norm_cross = CGAL::sqrt(CGAL::to_double(scalar_product(cross, cross))); //double area_face = CGAL::Polygon_mesh_processing::face_area(f,tm); //cross is 2*area diff --git a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h index 1b5e004548a..a7e610afe51 100644 --- a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h +++ b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h @@ -1058,7 +1058,7 @@ private: */ FT cotangent(const FT& value) const { - return FT(1/std::tan(CGAL::to_double(value))); + return FT(1./std::tan(CGAL::to_double(value))); } /** diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index b6e9d00b9d0..49ea054aa45 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -41,18 +41,18 @@ namespace internal { typename TriangleMesh, typename VertexRange, typename VertexPointMap> - bool fair(TriangleMesh& tmesh, - const VertexRange& vertices, - SparseLinearSolver solver, - WeightCalculator weight_calculator, - unsigned int continuity, - VertexPointMap vpmap) - { - CGAL::Polygon_mesh_processing::internal::Fair_Polyhedron_3 - - fair_functor(tmesh, vpmap, weight_calculator); - return fair_functor.fair(vertices, solver, continuity); - } +bool fair(TriangleMesh& tmesh, + const VertexRange& vertices, + SparseLinearSolver solver, + WeightCalculator weight_calculator, + unsigned int continuity, + VertexPointMap vpmap) +{ + CGAL::Polygon_mesh_processing::internal::Fair_Polyhedron_3 + + fair_functor(tmesh, vpmap, weight_calculator); + return fair_functor.fair(vertices, solver, continuity); +} } //end namespace internal @@ -182,9 +182,9 @@ namespace internal { CGAL::Polygon_mesh_processing::parameters::all_default()); } -} //end namespace Polygon_mesh_processing +} // namespace Polygon_mesh_processing -} //end namespace CGAL +} // namespace CGAL #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 99f6e0bd64d..1b915b25201 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -385,9 +385,9 @@ class Weight_incomplete private: template Weight_incomplete(const std::vector& P, - const std::vector& Q, - int i, int j, int k, - const LookupTable& lambda) + const std::vector& Q, + int i, int j, int k, + const LookupTable& lambda) : weight(P,Q,i,j,k,lambda), patch_size(1) { } @@ -444,9 +444,9 @@ struct Weight_calculator template Weight operator()(const std::vector& P, - const std::vector& Q, - int i, int j, int k, - const LookupTable& lambda) const + const std::vector& Q, + int i, int j, int k, + const LookupTable& lambda) const { if( !is_valid(P,i,j,k) ) { return Weight::NOT_VALID(); } diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index c7596aa53ee..f4afc5c6f14 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -79,7 +79,7 @@ typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_2& p0, { using FT = typename GeomTraits::FT; - const FT cot_beta = cotangent_2(q, p0, p1, traits); + const FT cot_beta = cotangent_2(q, p0, p1, traits); const FT cot_gamma = cotangent_2(p1, p2, q, traits); return cotangent_ns::weight(cot_beta, cot_gamma); @@ -116,7 +116,7 @@ typename GeomTraits::FT cotangent_weight(const typename GeomTraits::Point_3& p0, { using FT = typename GeomTraits::FT; - const FT cot_beta = cotangent_3(q, p0, p1, traits); + const FT cot_beta = cotangent_3(q, p0, p1, traits); const FT cot_gamma = cotangent_3(p1, p2, q, traits); return cotangent_ns::weight(cot_beta, cot_gamma); diff --git a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h index f2933317972..361896fc105 100644 --- a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h +++ b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h @@ -106,7 +106,7 @@ Edge_case bounded_side_2(const VertexRange& polygon, auto orientation_2 = traits.orientation_2_object(); bool is_inside = false; - auto curr_y_comp_res = compare_y_2(get(point_map, *curr), query); + Comparison_result curr_y_comp_res = compare_y_2(get(point_map, *curr), query); // Check if the segment (curr, next) intersects // the ray { (t, query.y()) | t >= query.x() }. @@ -225,7 +225,8 @@ bool is_convex_2(const VertexRange& polygon, return true; auto equal_2 = traits.equal_2_object(); - while (equal_2(get(point_map, *prev), get(point_map, *curr))) { + while (equal_2(get(point_map, *prev), get(point_map, *curr))) + { curr = next; ++next; if (next == last) return true; diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 2c01c4e1e30..f51136186b9 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -135,9 +135,10 @@ void normalize_2(typename GeomTraits::Vector_2& v, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - const FT length = length_2(traits, v); - CGAL_assertion(length != FT(0)); - if (length == FT(0)) + + const FT length = length_2(v, traits); + CGAL_assertion(!is_zero(length)); + if (is_zero(length)) return; v /= length; @@ -174,15 +175,15 @@ void normalize_3(typename GeomTraits::Vector_3& v, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - - const FT length = length_3(traits, v); - CGAL_assertion(length != FT(0)); - if (length == FT(0)) + const FT length = length_3(v, traits); + CGAL_assertion(!is_zero(length)); + if (is_zero(length)) return; v /= length; } +// the angle is in radians template double angle_3(const typename GeomTraits::Vector_3& v1, const typename GeomTraits::Vector_3& v2, @@ -213,24 +214,26 @@ typename GeomTraits::Point_3 rotate_point_3(const double angle_rad, using FT = typename GeomTraits::FT; using Point_3 = typename GeomTraits::Point_3; + auto point_3 = traits.construct_point_3_object(); + const FT c = static_cast(std::cos(angle_rad)); const FT s = static_cast(std::sin(angle_rad)); const FT C = FT(1) - c; - const FT x = axis.x(); - const FT y = axis.y(); - const FT z = axis.z(); + const FT& x = axis.x(); + const FT& y = axis.y(); + const FT& z = axis.z(); - return Point_3( - (x * x * C + c) * query.x() + - (x * y * C - z * s) * query.y() + - (x * z * C + y * s) * query.z(), - (y * x * C + z * s) * query.x() + - (y * y * C + c) * query.y() + - (y * z * C - x * s) * query.z(), - (z * x * C - y * s) * query.x() + - (z * y * C + x * s) * query.y() + - (z * z * C + c) * query.z()); + return point_3( + (x * x * C + c) * query.x() + + (x * y * C - z * s) * query.y() + + (x * z * C + y * s) * query.z(), + (y * x * C + z * s) * query.x() + + (y * y * C + c) * query.y() + + (y * z * C - x * s) * query.z(), + (z * x * C - y * s) * query.x() + + (z * y * C + x * s) * query.y() + + (z * z * C + c) * query.z()); } // Computes two 3D orthogonal base vectors wrt a given normal. @@ -245,9 +248,9 @@ void orthogonal_bases_3(const typename GeomTraits::Vector_3& normal, auto cross_product_3 = traits.construct_cross_product_vector_3_object(); - const FT nx = normal.x(); - const FT ny = normal.y(); - const FT nz = normal.z(); + const FT& nx = normal.x(); + const FT& ny = normal.y(); + const FT& nz = normal.z(); if (CGAL::abs(nz) >= CGAL::abs(ny)) b1 = Vector_3(nz, 0, -nx); @@ -268,13 +271,13 @@ typename GeomTraits::Point_2 to_2d(const typename GeomTraits::Vector_3& b1, const typename GeomTraits::Point_3& query, const GeomTraits& traits) { - using FT = typename GeomTraits::FT; - using Point_2 = typename GeomTraits::Point_2; + using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; using Vector_3 = typename GeomTraits::Vector_3; - auto point_2 = traits.construct_point_2_object(); auto dot_product_3 = traits.compute_scalar_product_3_object(); auto vector_3 = traits.construct_vector_3_object(); + auto point_2 = traits.construct_point_2_object(); const Vector_3 v = vector_3(origin, query); const FT x = dot_product_3(b1, v); @@ -354,6 +357,7 @@ void flatten(const typename GeomTraits::Point_3& t, // prev neighbor/vertex/poin using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; + auto point_3 = traits.construct_point_3_object(); auto cross_product_3 = traits.construct_cross_product_vector_3_object(); auto vector_3 = traits.construct_vector_3_object(); auto centroid_3 = traits.construct_centroid_3_object(); @@ -363,10 +367,10 @@ void flatten(const typename GeomTraits::Point_3& t, // prev neighbor/vertex/poin // std::cout << "centroid: " << center << std::endl; // Translate. - const Point_3 t1 = Point_3(t.x() - center.x(), t.y() - center.y(), t.z() - center.z()); - const Point_3 r1 = Point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); - const Point_3 p1 = Point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); - const Point_3 q1 = Point_3(q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); + const Point_3 t1 = point_3(t.x() - center.x(), t.y() - center.y(), t.z() - center.z()); + const Point_3 r1 = point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); + const Point_3 p1 = point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); + const Point_3 q1 = point_3(q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); // std::cout << "translated t1: " << t1 << std::endl; // std::cout << "translated r1: " << r1 << std::endl; @@ -447,10 +451,11 @@ typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - using Point_2 = typename GeomTraits::Point_2; using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; + auto area_2 = traits.compute_area_2_object(); + auto point_3 = traits.construct_point_3_object(); auto cross_product_3 = traits.construct_cross_product_vector_3_object(); auto vector_3 = traits.construct_vector_3_object(); auto centroid_3 = traits.construct_centroid_3_object(); @@ -459,9 +464,9 @@ typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, const Point_3 center = centroid_3(p, q, r); // Translate. - const Point_3 a = Point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); - const Point_3 b = Point_3(q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); - const Point_3 c = Point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); + const Point_3 a = point_3(p.x() - center.x(), p.y() - center.y(), p.z() - center.z()); + const Point_3 b = point_3(q.x() - center.x(), q.y() - center.y(), q.z() - center.z()); + const Point_3 c = point_3(r.x() - center.x(), r.y() - center.y(), r.z() - center.z()); // Prev and next vectors. Vector_3 v1 = vector_3(b, a); @@ -483,8 +488,7 @@ typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, const Point_2 qf = to_2d(b1, b2, origin, b, traits); const Point_2 rf = to_2d(b1, b2, origin, c, traits); - const FT A = area_2(traits, pf, qf, rf); - return A; + return area_2(pf, qf, rf); } // Computes positive area of a 3D triangle. diff --git a/Weights/include/CGAL/Weights/utils.h b/Weights/include/CGAL/Weights/utils.h index 9f75bd14854..67c10ce16c2 100644 --- a/Weights/include/CGAL/Weights/utils.h +++ b/Weights/include/CGAL/Weights/utils.h @@ -45,8 +45,8 @@ typename GeomTraits::FT cotangent_2(const typename GeomTraits::Point_2& p, if (!is_zero(length)) return dot / length; - else - return FT(0); // undefined + + return FT(0); // undefined } template @@ -92,8 +92,8 @@ typename GeomTraits::FT cotangent_3(const typename GeomTraits::Point_3& p, const FT length = internal::length_3(cross, traits); if (!is_zero(length)) return dot / length; - else - return FT(0); // undefined + + return FT(0); // undefined } template @@ -140,10 +140,8 @@ typename GeomTraits::FT tangent_2(const typename GeomTraits::Point_2& p, const FT length = CGAL::abs(cross); return length / dot; } - else - { - return FT(0); // undefined - } + + return FT(0); // undefined } template @@ -190,10 +188,8 @@ typename GeomTraits::FT tangent_3(const typename GeomTraits::Point_3& p, const FT length = internal::length_3(cross, traits); return length / dot; } - else - { - return FT(0); // undefined - } + + return FT(0); // undefined } template From 92ea84d672ba866286286c71975c9bd5aba3c714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:23:11 +0200 Subject: [PATCH 064/426] Factorize cotangent_weight classes --- .../include/CGAL/Weights/cotangent_weights.h | 361 ++++++------------ 1 file changed, 119 insertions(+), 242 deletions(-) diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index f4afc5c6f14..93413b7cb24 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -140,236 +140,165 @@ typename Kernel::FT cotangent_weight(const CGAL::Point_3& p0, /// \cond SKIP_IN_MANUAL // Undocumented cotangent weight class. -// -// Its constructor takes a polygon mesh and a vertex to point map -// and its operator() is defined based on the halfedge_descriptor only. -// This version is currently used in: -// Polygon_mesh_processing -> curvature_flow_impl.h -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> -class Edge_cotangent_weight -{ - using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; - using FT = typename GeomTraits::FT; - - const PolygonMesh& m_pmesh; - const VertexPointMap m_pmap; - GeomTraits m_traits; - -public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - - Edge_cotangent_weight(const PolygonMesh& pmesh, const VertexPointMap pmap) - : m_pmesh(pmesh), m_pmap(pmap), m_traits() - { } - - FT operator()(const halfedge_descriptor he) const - { - - FT weight = FT(0); - if (is_border_edge(he, m_pmesh)) - { - const halfedge_descriptor h1 = next(he, m_pmesh); - - const vertex_descriptor v0 = target(he, m_pmesh); - const vertex_descriptor v1 = source(he, m_pmesh); - const vertex_descriptor v2 = target(h1, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - - weight = internal::cotangent_3(m_traits, p0, p2, p1); - - } - else - { - const halfedge_descriptor h1 = next(he, m_pmesh); - const halfedge_descriptor h2 = prev(opposite(he, m_pmesh), m_pmesh); - - const vertex_descriptor v0 = target(he, m_pmesh); - const vertex_descriptor v1 = source(he, m_pmesh); - const vertex_descriptor v2 = target(h1, m_pmesh); - const vertex_descriptor v3 = source(h2, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - const auto& p3 = get(m_pmap, v3); - - weight = cotangent_weight(p2, p1, p3, p0) / FT(2); - } - return weight; - } -}; - -// Undocumented cotangent weight class. +// Returns: cot(beta) // // Returns a single cotangent weight, its operator() is defined based on the // halfedge_descriptor, polygon mesh, and vertex to point map. // For border edges it returns zero. // This version is currently used in: // Surface_mesh_deformation -> Surface_mesh_deformation.h -template +template::value_type>::type> class Single_cotangent_weight { -public: using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - template - decltype(auto) operator()(const halfedge_descriptor he, - const PolygonMesh& pmesh, - const VertexPointMap pmap) const + using Point_ref = typename boost::property_traits::reference; + using FT = typename GeomTraits::FT; + +private: + const PolygonMesh& m_pmesh; + const VertexPointMap m_vpm; + const GeomTraits m_traits; + +public: + Single_cotangent_weight(const PolygonMesh& pmesh, + const VertexPointMap vpm, + const GeomTraits& traits = GeomTraits()) + : m_pmesh(pmesh), m_vpm(vpm), m_traits(traits) + { } + + decltype(auto) operator()(const halfedge_descriptor he) const { - using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; - using FT = typename GeomTraits::FT; - GeomTraits traits; + if (is_border(he, m_pmesh)) + return FT{0}; - if (is_border(he, pmesh)) - return FT(0); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(next(he, m_pmesh), m_pmesh); - const vertex_descriptor v0 = target(he, pmesh); - const vertex_descriptor v1 = source(he, pmesh); - const vertex_descriptor v2 = target(next(he, pmesh), pmesh); + const Point_ref p0 = get(m_vpm, v0); + const Point_ref p1 = get(m_vpm, v1); + const Point_ref p2 = get(m_vpm, v2); - const auto& p0 = get(pmap, v0); - const auto& p1 = get(pmap, v1); - const auto& p2 = get(pmap, v2); - - return internal::cotangent_3(traits, p0, p2, p1); + return cotangent_3(p0, p2, p1, m_traits); } }; // Undocumented cotangent weight class. +// Returns: 0.5 * (cot(beta) + cot(gamma)) // // Its constructor takes a boolean flag to choose between default and clamped // versions of the cotangent weights and its operator() is defined based on the // halfedge_descriptor, polygon mesh, and vertex to point map. // This version is currently used in: +// Polygon_mesh_processing -> curvature_flow_impl.h (no clamping, no bounding) // Surface_mesh_deformation -> Surface_mesh_deformation.h (default version) // Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h (default version) // Surface_mesh_skeletonization -> Mean_curvature_flow_skeletonization.h (clamped version) -template +template::value_type>::type> class Cotangent_weight { - bool m_use_clamped_version; - -public: using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - Cotangent_weight(const bool use_clamped_version = false) - : m_use_clamped_version(use_clamped_version) + using Point_ref = typename boost::property_traits::reference; + using FT = typename GeomTraits::FT; + +private: + const PolygonMesh& m_pmesh; + const VertexPointMap m_vpm; + const GeomTraits m_traits; + + bool m_use_clamped_version; + bool m_bound_from_below; + +public: + Cotangent_weight(const PolygonMesh& pmesh, + const VertexPointMap vpm, + const GeomTraits& traits = GeomTraits(), + const bool use_clamped_version = false, + const bool bound_from_below = true) + : m_pmesh(pmesh), m_vpm(vpm), m_traits(traits), + m_use_clamped_version(use_clamped_version), + m_bound_from_below(bound_from_below) { } - template - decltype(auto) operator()(const halfedge_descriptor he, - const PolygonMesh& pmesh, - const VertexPointMap pmap) const + decltype(auto) operator()(const halfedge_descriptor he) const { - using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; - using FT = typename GeomTraits::FT; + if(is_border(he, m_pmesh)) + return FT{0}; - GeomTraits traits; - - const vertex_descriptor v0 = target(he, pmesh); - const vertex_descriptor v1 = source(he, pmesh); - - const auto& p0 = get(pmap, v0); - const auto& p1 = get(pmap, v1); - - FT weight = FT(0); - if (is_border_edge(he, pmesh)) + auto half_weight = [&] (const halfedge_descriptor he) -> FT { - const halfedge_descriptor he_cw = opposite(next(he, pmesh), pmesh); - auto v2 = source(he_cw, pmesh); + if(is_border(he, m_pmesh)) + return FT{0}; - if (is_border_edge(he_cw, pmesh)) - { - const halfedge_descriptor he_ccw = prev(opposite(he, pmesh), pmesh); - v2 = source(he_ccw, pmesh); + const vertex_descriptor v0 = target(he, m_pmesh); + const vertex_descriptor v1 = source(he, m_pmesh); + const vertex_descriptor v2 = target(next(he, m_pmesh), m_pmesh); - const auto& p2 = get(pmap, v2); - if (m_use_clamped_version) - weight = internal::cotangent_3_clamped(traits, p1, p2, p0); - else - weight = internal::cotangent_3(traits, p1, p2, p0); - - weight = (CGAL::max)(FT(0), weight); - weight /= FT(2); - } - else - { - const auto& p2 = get(pmap, v2); - if (m_use_clamped_version) - weight = internal::cotangent_3_clamped(traits, p0, p2, p1); - else - weight = internal::cotangent_3(traits, p0, p2, p1); - - weight = (CGAL::max)(FT(0), weight); - weight /= FT(2); - } - } - else - { - const halfedge_descriptor he_cw = opposite(next(he, pmesh), pmesh); - const vertex_descriptor v2 = source(he_cw, pmesh); - const halfedge_descriptor he_ccw = prev(opposite(he, pmesh), pmesh); - const vertex_descriptor v3 = source(he_ccw, pmesh); - - const auto& p2 = get(pmap, v2); - const auto& p3 = get(pmap, v3); - FT cot_beta = FT(0), cot_gamma = FT(0); + const Point_ref p0 = get(m_vpm, v0); + const Point_ref p1 = get(m_vpm, v1); + const Point_ref p2 = get(m_vpm, v2); + FT weight = 0; if (m_use_clamped_version) - cot_beta = internal::cotangent_3_clamped(traits, p0, p2, p1); + weight = cotangent_3_clamped(p1, p2, p0, m_traits); else - cot_beta = internal::cotangent_3(traits, p0, p2, p1); + weight = cotangent_3(p1, p2, p0, m_traits); - if (m_use_clamped_version) - cot_gamma = internal::cotangent_3_clamped(traits, p1, p3, p0); - else - cot_gamma = internal::cotangent_3(traits, p1, p3, p0); + if(m_bound_from_below) + weight = (CGAL::max)(FT(0), weight); - cot_beta = (CGAL::max)(FT(0), cot_beta); cot_beta /= FT(2); - cot_gamma = (CGAL::max)(FT(0), cot_gamma); cot_gamma /= FT(2); - weight = cot_beta + cot_gamma; - } + return weight / FT(2); + }; + FT weight = half_weight(he) + half_weight(opposite(he, m_pmesh)); return weight; } }; // Undocumented cotangent weight class. +// // Its constructor takes a polygon mesh and a vertex to point map // and its operator() is defined based on the halfedge_descriptor only. // This class is using a special clamped version of the cotangent weights. // This version is currently used in: // Polygon_mesh_processing -> fair.h // Polyhedron demo -> Hole_filling_plugin.cpp -template< - typename PolygonMesh, - typename VertexPointMap = typename boost::property_map::type> +template class Secure_cotangent_weight_with_voronoi_area { - using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; - using FT = typename GeomTraits::FT; - using Vector_3 = typename GeomTraits::Vector_3; - - const PolygonMesh& m_pmesh; - const VertexPointMap m_pmap; - GeomTraits m_traits; - -public: using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + using Point_ref = typename boost::property_traits::reference; + using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; + +private: + const PolygonMesh& m_pmesh; + const VertexPointMap m_vpm; + GeomTraits m_traits; + + Cotangent_weight cotangent_weight_calculator; + +public: Secure_cotangent_weight_with_voronoi_area(const PolygonMesh& pmesh, - const VertexPointMap pmap) - : m_pmesh(pmesh), m_pmap(pmap), m_traits() + const VertexPointMap vpm, + const GeomTraits& traits = GeomTraits()) + : m_pmesh(pmesh), m_vpm(vpm), m_traits(traits), + cotangent_weight_calculator(m_pmesh, m_vpm, m_traits, + true /*clamp*/, true /*bound from below*/) { } FT w_i(const vertex_descriptor v_i) const @@ -379,89 +308,46 @@ public: FT w_ij(const halfedge_descriptor he) const { - return cotangent_clamped(he); + return cotangent_weight_calculator(he); } private: - FT cotangent_clamped(const halfedge_descriptor he) const - { - - const vertex_descriptor v0 = target(he, m_pmesh); - const vertex_descriptor v1 = source(he, m_pmesh); - - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - - FT weight = FT(0); - if (is_border_edge(he, m_pmesh)) - { - const halfedge_descriptor he_cw = opposite(next(he, m_pmesh), m_pmesh); - vertex_descriptor v2 = source(he_cw, m_pmesh); - - if (is_border_edge(he_cw, m_pmesh)) - { - const halfedge_descriptor he_ccw = prev(opposite(he, m_pmesh), m_pmesh); - v2 = source(he_ccw, m_pmesh); - - const auto& p2 = get(m_pmap, v2); - weight = internal::cotangent_3_clamped(m_traits, p1, p2, p0); - } - else - { - const auto& p2 = get(m_pmap, v2); - weight = internal::cotangent_3_clamped(m_traits, p0, p2, p1); - } - } - else - { - const halfedge_descriptor he_cw = opposite(next(he, m_pmesh), m_pmesh); - const vertex_descriptor v2 = source(he_cw, m_pmesh); - const halfedge_descriptor he_ccw = prev(opposite(he, m_pmesh), m_pmesh); - const vertex_descriptor v3 = source(he_ccw, m_pmesh); - - const auto& p2 = get(m_pmap, v2); - const auto& p3 = get(m_pmap, v3); - - const FT cot_beta = internal::cotangent_3_clamped(m_traits, p0, p2, p1); - const FT cot_gamma = internal::cotangent_3_clamped(m_traits, p1, p3, p0); - weight = cot_beta + cot_gamma; - } - - return weight; - } - FT voronoi(const vertex_descriptor v0) const { auto squared_length_3 = m_traits.compute_squared_length_3_object(); auto vector_3 = m_traits.construct_vector_3_object(); FT voronoi_area = FT(0); - CGAL_assertion(CGAL::is_triangle_mesh(m_pmesh)); - for (const halfedge_descriptor& he : halfedges_around_target(halfedge(v0, m_pmesh), m_pmesh)) + for (const halfedge_descriptor he : halfedges_around_target(halfedge(v0, m_pmesh), m_pmesh)) { CGAL_assertion(v0 == target(he, m_pmesh)); + CGAL_assertion(CGAL::is_triangle(he, m_pmesh)); + if (is_border(he, m_pmesh)) continue; const vertex_descriptor v1 = source(he, m_pmesh); const vertex_descriptor v2 = target(next(he, m_pmesh), m_pmesh); - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); + const Point_ref p0 = get(m_vpm, v0); + const Point_ref p1 = get(m_vpm, v1); + const Point_ref p2 = get(m_vpm, v2); - const Angle angle0 = CGAL::angle(p1, p0, p2); - const Angle angle1 = CGAL::angle(p2, p1, p0); - const Angle angle2 = CGAL::angle(p0, p2, p1); - - const bool obtuse = (angle0 == CGAL::OBTUSE) || - (angle1 == CGAL::OBTUSE) || - (angle2 == CGAL::OBTUSE); - - if (!obtuse) + const CGAL::Angle angle0 = CGAL::angle(p1, p0, p2); + if((angle0 == CGAL::OBTUSE) || + (CGAL::angle(p2, p1, p0) == CGAL::OBTUSE) || + (CGAL::angle(p0, p2, p1) == CGAL::OBTUSE)) { - const FT cot_p1 = internal::cotangent_3(m_traits, p2, p1, p0); - const FT cot_p2 = internal::cotangent_3(m_traits, p0, p2, p1); + const FT A = internal::positive_area_3(m_traits, p0, p1, p2); + if (angle0 == CGAL::OBTUSE) + voronoi_area += A / FT(2); + else + voronoi_area += A / FT(4); + } + else + { + const FT cot_p1 = cotangent_3_clamped(p2, p1, p0, m_traits); + const FT cot_p2 = cotangent_3_clamped(p0, p2, p1, m_traits); const Vector_3 v1 = vector_3(p0, p1); const Vector_3 v2 = vector_3(p0, p2); @@ -469,19 +355,10 @@ private: const FT t1 = cot_p1 * squared_length_3(v2); const FT t2 = cot_p2 * squared_length_3(v1); voronoi_area += (t1 + t2) / FT(8); - - } - else - { - const FT A = internal::positive_area_3(m_traits, p0, p1, p2); - if (angle0 == CGAL::OBTUSE) - voronoi_area += A / FT(2); - else - voronoi_area += A / FT(4); } } - CGAL_assertion(voronoi_area != FT(0)); + CGAL_assertion(!is_zero(voronoi_area)); return voronoi_area; } }; From 670fec5e3cef8cbd4f4427b4ecca1467d8ee4f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:23:54 +0200 Subject: [PATCH 065/426] Fix issues in tangent_weight classes - Edge_tangent_weight returns 0 if the halfedge is border - if opp(h, mesh) is tangent, properly returns tan of the HALF angle and not tangent_3. --- .../include/CGAL/Weights/tangent_weights.h | 114 ++++++++++-------- 1 file changed, 65 insertions(+), 49 deletions(-) diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 119dee11623..afa64e2da90 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -365,16 +365,24 @@ typename Kernel::FT tangent_weight(const CGAL::Point_3& p0, return tangent_weight(p0, p1, p2, q, traits); } +/// \cond SKIP_IN_MANUAL + // Undocumented tangent weight class. +// // Its constructor takes a polygon mesh and a vertex to point map // and its operator() is defined based on the halfedge_descriptor only. // This version is currently used in: // Surface_mesh_parameterizer -> Iterative_authalic_parameterizer_3.h -template::type> +template< + typename PolygonMesh, + typename VertexPointMap, + typename GeomTraits> class Edge_tangent_weight { - using GeomTraits = typename CGAL::Kernel_traits::value_type>::type; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; + + using Point_ref = typename boost::property_traits::reference; using FT = typename GeomTraits::FT; const PolygonMesh& m_pmesh; @@ -382,17 +390,20 @@ class Edge_tangent_weight const GeomTraits m_traits; public: - using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; - using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - Edge_tangent_weight(const PolygonMesh& pmesh, const VertexPointMap pmap) - : m_pmesh(pmesh), m_pmap(pmap), m_traits() + Edge_tangent_weight(const PolygonMesh& pmesh, + const VertexPointMap pmap, + const GeomTraits& traits) + : m_pmesh(pmesh), m_pmap(pmap), m_traits(traits) { } - FT operator()(const halfedge_descriptor he) const + FT operator()(halfedge_descriptor he) const { + if(is_border(he, m_pmesh)) + return FT(0); + FT weight = FT(0); - if (is_border_edge(he, m_pmesh)) + if (is_border_edge(he, m_pmesh)) // ie, opp(he, pmesh) is a border halfedge { const halfedge_descriptor h1 = next(he, m_pmesh); @@ -400,11 +411,11 @@ public: const vertex_descriptor v1 = source(he, m_pmesh); const vertex_descriptor v2 = target(h1, m_pmesh); - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); + const Point_ref p0 = get(m_pmap, v0); + const Point_ref p1 = get(m_pmap, v1); + const Point_ref p2 = get(m_pmap, v2); - weight = internal::tangent_3(m_traits, p0, p2, p1); + weight = half_tangent_weight(p1, p0, p2, m_traits) / FT(2); } else { @@ -416,75 +427,80 @@ public: const vertex_descriptor v2 = target(h1, m_pmesh); const vertex_descriptor v3 = source(h2, m_pmesh); - const auto& p0 = get(m_pmap, v0); - const auto& p1 = get(m_pmap, v1); - const auto& p2 = get(m_pmap, v2); - const auto& p3 = get(m_pmap, v3); + const Point_ref p0 = get(m_pmap, v0); + const Point_ref p1 = get(m_pmap, v1); + const Point_ref p2 = get(m_pmap, v2); + const Point_ref p3 = get(m_pmap, v3); - weight = tangent_weight(p2, p1, p3, p0) / FT(2); + weight = tangent_weight(p2, p1, p3, p0, m_traits) / FT(2); } return weight; } }; // Undocumented tangent weight class. +// Returns - std::tan(theta/2); uses positive areas. +// // Its constructor takes three points either in 2D or 3D. // This version is currently used in: // Surface_mesh_parameterizer -> MVC_post_processor_3.h // Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h template -class Tangent_weight { +class Tangent_weight +{ FT m_d_r, m_d_p, m_w_base; public: - template - Tangent_weight(const CGAL::Point_2& p, - const CGAL::Point_2& q, - const CGAL::Point_2& r) + template + Tangent_weight(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) { - using Vector_2 = typename GeomTraits::Vector_2; + const Kernel traits; - const GeomTraits traits; + using Vector_2 = typename Kernel::Vector_2; + auto vector_2 = traits.construct_vector_2_object(); auto scalar_product_2 = traits.compute_scalar_product_2_object(); - auto construct_vector_2 = traits.construct_vector_2_object(); - m_d_r = internal::distance_2(traits, q, r); - CGAL_assertion(m_d_r != FT(0)); // two points are identical! - m_d_p = internal::distance_2(traits, q, p); - CGAL_assertion(m_d_p != FT(0)); // two points are identical! + m_d_r = internal::distance_2(q, r, traits); + CGAL_assertion(is_positive(m_d_r)); // two points are identical! + m_d_p = internal::distance_2(q, p, traits); + CGAL_assertion(is_positive(m_d_p)); // two points are identical! - const Vector_2 v1 = construct_vector_2(q, r); - const Vector_2 v2 = construct_vector_2(q, p); + const Vector_2 v1 = vector_2(q, r); + const Vector_2 v2 = vector_2(q, p); + + const FT A = internal::positive_area_2(p, q, r, traits); + CGAL_assertion(!is_zero(A)); - const FT A = internal::positive_area_2(traits, p, q, r); - CGAL_assertion(A != FT(0)); // three points are identical! const FT S = scalar_product_2(v1, v2); m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); } - template - Tangent_weight(const CGAL::Point_3& p, - const CGAL::Point_3& q, - const CGAL::Point_3& r) + template + Tangent_weight(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) { - using Vector_3 = typename GeomTraits::Vector_3; + const Kernel traits; - const GeomTraits traits; + using Vector_3 = typename Kernel::Vector_3; + auto vector_3 = traits.construct_vector_3_object(); auto scalar_product_3 = traits.compute_scalar_product_3_object(); - auto construct_vector_3 = traits.construct_vector_3_object(); - m_d_r = internal::distance_3(traits, q, r); - CGAL_assertion(m_d_r != FT(0)); // two points are identical! - m_d_p = internal::distance_3(traits, q, p); - CGAL_assertion(m_d_p != FT(0)); // two points are identical! + m_d_r = internal::distance_3(q, r, traits); + CGAL_assertion(is_positive(m_d_r)); // two points are identical! + m_d_p = internal::distance_3(q, p, traits); + CGAL_assertion(is_positive(m_d_p)); // two points are identical! - const Vector_3 v1 = construct_vector_3(q, r); - const Vector_3 v2 = construct_vector_3(q, p); + const Vector_3 v1 = vector_3(q, r); + const Vector_3 v2 = vector_3(q, p); + + const FT A = internal::positive_area_3(p, q, r, traits); + CGAL_assertion(is_positive(A)); - const FT A = internal::positive_area_3(traits, p, q, r); - CGAL_assertion(A != FT(0)); // three points are identical! const FT S = scalar_product_3(v1, v2); m_w_base = -tangent_half_angle(m_d_r, m_d_p, A, S); } From 7eb3002790e1d593d4b420dacde8133b40cedec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:25:52 +0200 Subject: [PATCH 066/426] Avoid computing all angles if possible --- .../CGAL/Weights/mixed_voronoi_region_weights.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h index 35136a82ec5..647e771a7c9 100644 --- a/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h +++ b/Weights/include/CGAL/Weights/mixed_voronoi_region_weights.h @@ -42,12 +42,10 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_2& p auto midpoint_2 = traits.construct_midpoint_2_object(); auto circumcenter_2 = traits.construct_circumcenter_2_object(); - const Angle a1 = angle_2(p, q, r); - const Angle a2 = angle_2(q, r, p); - const Angle a3 = angle_2(r, p, q); - Point_2 center; - if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) + if (angle_2(p, q, r) != CGAL::OBTUSE && + angle_2(q, r, p) != CGAL::OBTUSE && + angle_2(r, p, q) != CGAL::OBTUSE) center = circumcenter_2(p, q, r); else center = midpoint_2(r, p); @@ -95,12 +93,10 @@ typename GeomTraits::FT mixed_voronoi_area(const typename GeomTraits::Point_3& p auto midpoint_3 = traits.construct_midpoint_3_object(); auto circumcenter_3 = traits.construct_circumcenter_3_object(); - const Angle a1 = angle_3(p, q, r); - const Angle a2 = angle_3(q, r, p); - const Angle a3 = angle_3(r, p, q); - Point_3 center; - if (a1 != CGAL::OBTUSE && a2 != CGAL::OBTUSE && a3 != CGAL::OBTUSE) + if (angle_3(p, q, r) != CGAL::OBTUSE && + angle_3(q, r, p) != CGAL::OBTUSE && + angle_3(r, p, q) != CGAL::OBTUSE) center = circumcenter_3(p, q, r); else center = midpoint_3(r, p); From 6cd5c24f70c44431c9bd31ff8a40d4cade9f3500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:26:34 +0200 Subject: [PATCH 067/426] Pass traits to the secure Vor-weighted cotan functor --- .../include/CGAL/Polygon_mesh_processing/fair.h | 16 +++++++++------- .../Plugins/PMP/Hole_filling_plugin.cpp | 13 +++++++------ 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index 49ea054aa45..b90c3a798bc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -159,20 +159,22 @@ bool fair(TriangleMesh& tmesh, #endif typedef typename GetVertexPointMap < TriangleMesh, NamedParameters>::type VPMap; + VPMap vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), + get_property_map(vertex_point, tmesh)); + + typedef typename GetGeomTraits < TriangleMesh, NamedParameters>::type GT; + GT gt = choose_parameter(get_parameter(np, internal_np::geom_traits)); // Cotangent_weight_with_voronoi_area_fairing has been changed to the version: - // Cotangent_weight_with_voronoi_area_fairing_secure to avoid imprecisions from + // Secure_cotangent_weight_with_voronoi_area to avoid imprecisions from // the issue #4706 - https://github.com/CGAL/cgal/issues/4706. - typedef CGAL::Weights::Secure_cotangent_weight_with_voronoi_area Default_weight_calculator; - - VPMap vpmap_ = choose_parameter(get_parameter(np, internal_np::vertex_point), - get_property_map(vertex_point, tmesh)); + typedef CGAL::Weights::Secure_cotangent_weight_with_voronoi_area Default_weight_calculator; return internal::fair(tmesh, vertices, choose_parameter(get_parameter(np, internal_np::sparse_linear_solver)), - choose_parameter(get_parameter(np, internal_np::weight_calculator), Default_weight_calculator(tmesh, vpmap_)), + choose_parameter(get_parameter(np, internal_np::weight_calculator), Default_weight_calculator(tmesh, vpmap, gt)), choose_parameter(get_parameter(np, internal_np::fairing_continuity), 1), - vpmap_); + vpmap); } template diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index c4a6207c968..423ee5124c6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -725,14 +725,15 @@ bool Polyhedron_demo_hole_filling_plugin::fill use_delaunay_triangulation(use_DT))); } else { - auto pmap = get_property_map(CGAL::vertex_point, poly); + auto vpm = get_property_map(CGAL::vertex_point, poly); + auto weight_calc = CGAL::Weights::Secure_cotangent_weight_with_voronoi_area(poly, vpm, EPICK()); + success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, it, std::back_inserter(patch), CGAL::Emptyset_iterator(), - CGAL::Polygon_mesh_processing::parameters:: - weight_calculator(CGAL::Weights::Secure_cotangent_weight_with_voronoi_area(poly, pmap)). - density_control_factor(alpha). - fairing_continuity(continuity). - use_delaunay_triangulation(use_DT))); + CGAL::parameters::weight_calculator(weight_calc). + density_control_factor(alpha). + fairing_continuity(continuity). + use_delaunay_triangulation(use_DT))); } if(!success) { print_message("Error: fairing is not successful, only triangulation and refinement are applied!"); } From 19f847a74b6caed13faf7923073da7edf11c66d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:27:39 +0200 Subject: [PATCH 068/426] Fix API of cotan functor in shape smoothing --- .../internal/Smoothing/curvature_flow_impl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h index fa600557af3..fa92c34bb3e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h @@ -78,7 +78,7 @@ public: vimap_(get(Vertex_local_index(), mesh_)), scale_volume_after_smoothing(true), traits_(traits), - weight_calculator_(mesh, vpmap) + weight_calculator_(mesh_, vpmap_, traits_, false /*no clamping*/, false /*no bounding from below*/) { } template @@ -177,7 +177,8 @@ public: if(is_source_constrained && is_target_constrained) continue; - const FT Lij = weight_calculator_(hi); + // Cotangent_weight returns (cot(beta) + cot(gamma)) / 2 + const FT Lij = FT(2) * weight_calculator_(hi); const std::size_t i_source = get(vimap_, v_source); const std::size_t i_target = get(vimap_, v_target); @@ -368,8 +369,8 @@ private: std::vector diagonal_; // index of vector -> index of vimap_ std::vector constrained_flags_; - const GeomTraits& traits_; - const CGAL::Weights::Edge_cotangent_weight weight_calculator_; + GeomTraits traits_; + const CGAL::Weights::Cotangent_weight weight_calculator_; }; } // internal From 91336eb213ab042b0c2fc61d1772eed9f27c751d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:28:00 +0200 Subject: [PATCH 069/426] Use modern C++ --- .../internal/Smoothing/curvature_flow_impl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h index fa92c34bb3e..509d2394fdd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/curvature_flow_impl.h @@ -186,14 +186,14 @@ public: // note that these constraints create asymmetry in the matrix if(!is_source_constrained) { - stiffness_elements.push_back(Triplet(i_source, i_target, Lij)); - diag_coeff.insert(std::make_pair(i_source, 0)).first->second -= Lij; + stiffness_elements.emplace_back(i_source, i_target, Lij); + diag_coeff.emplace(i_source, 0).first->second -= Lij; } if(!is_target_constrained) { - stiffness_elements.push_back(Triplet(i_target, i_source, Lij)); - diag_coeff.insert(std::make_pair(i_target, 0)).first->second -= Lij; + stiffness_elements.emplace_back(i_target, i_source, Lij); + diag_coeff.emplace(i_target, 0).first->second -= Lij; } } } @@ -201,7 +201,7 @@ public: typename std::unordered_map::iterator it = diag_coeff.begin(), end = diag_coeff.end(); for(; it!=end; ++it) - stiffness_elements.push_back(Triplet(it->first, it->first, it->second)); + stiffness_elements.emplace_back(it->first, it->first, it->second); } void update_mesh_no_scaling(const Eigen_vector& Xx, const Eigen_vector& Xy, const Eigen_vector& Xz) From 010e24f4ff10b75792ae6441d3b2295d2e8fa908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:28:42 +0200 Subject: [PATCH 070/426] Fix weight calculator initialization in Surface mesh deformation --- .../include/CGAL/Surface_mesh_deformation.h | 252 ++++++++---------- 1 file changed, 110 insertions(+), 142 deletions(-) diff --git a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h index c267c49b808..a715accf733 100644 --- a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h +++ b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h @@ -55,49 +55,72 @@ enum Deformation_algorithm_tag /// @cond CGAL_DOCUMENT_INTERNAL namespace internal { -template +// property map that create a Simple_cartesian::Point_3 +// on the fly in order the deformation class to be used +// with points with minimal requirements +template +struct SC_on_the_fly_pmap + : public Vertex_point_map +{ + typedef boost::readable_property_map_tag category; + typedef CGAL::Simple_cartesian::Point_3 value_type; + typedef value_type reference; + typedef typename boost::property_traits::key_type key_type; + + SC_on_the_fly_pmap(Vertex_point_map base): + Vertex_point_map(base) {} + + friend value_type + get(const SC_on_the_fly_pmap map, key_type k) + { + typename boost::property_traits::reference base= + get(static_cast(map), k); + return value_type(base[0], base[1], base[2]); + } +}; + +template struct Types_selectors; -template -struct Types_selectors { +template +struct Types_selectors +{ + typedef SC_on_the_fly_pmap Wrapped_VertexPointMap; + typedef CGAL::Weights::Single_cotangent_weight Weight_calculator; - // Get weight from the weight interface. - typedef CGAL::Weights::Single_cotangent_weight Weight_calculator; - - struct ARAP_visitor{ - template + struct ARAP_visitor + { void init(TriangleMesh, VertexPointMap){} - void rotation_matrix_pre( - typename boost::graph_traits::vertex_descriptor, - TriangleMesh&){} + void rotation_matrix_pre(typename boost::graph_traits::vertex_descriptor, + TriangleMesh&){} template - void update_covariance_matrix( - Square_matrix_3&, - const Square_matrix_3&){} + void update_covariance_matrix(Square_matrix_3&, + const Square_matrix_3&){} void set_sre_arap_alpha(double){} }; }; -template -struct Types_selectors { +template +struct Types_selectors +{ + typedef SC_on_the_fly_pmap Wrapped_VertexPointMap; + typedef CGAL::Weights::Cotangent_weight Weight_calculator; - // Get weight from the weight interface. - typedef CGAL::Weights::Cotangent_weight Weight_calculator; - - typedef typename Types_selectors - ::ARAP_visitor ARAP_visitor; + typedef typename Types_selectors::ARAP_visitor ARAP_visitor; }; -template -struct Types_selectors { +template +struct Types_selectors +{ + typedef SC_on_the_fly_pmap Wrapped_VertexPointMap; + typedef CGAL::Weights::Cotangent_weight Weight_calculator; - // Get weight from the weight interface. - typedef CGAL::Weights::Cotangent_weight Weight_calculator; - - class ARAP_visitor{ + class ARAP_visitor + { double m_nb_edges_incident; double m_area; double m_alpha; @@ -105,7 +128,6 @@ struct Types_selectors { public: ARAP_visitor(): m_alpha(0.02) {} - template void init(TriangleMesh triangle_mesh, const VertexPointMap& vpmap) { // calculate area @@ -144,31 +166,6 @@ struct Types_selectors { }; }; -// property map that create a Simple_cartesian::Point_3 -// on the fly in order the deformation class to be used -// with points with minimal requirements -template -struct SC_on_the_fly_pmap - : public Vertex_point_map -{ - typedef boost::readable_property_map_tag category; - typedef CGAL::Simple_cartesian::Point_3 value_type; - typedef value_type reference; - typedef typename boost::property_traits::key_type key_type; - - SC_on_the_fly_pmap(Vertex_point_map base): - Vertex_point_map(base) {} - - friend value_type - get(const SC_on_the_fly_pmap map, key_type k) - { - typename boost::property_traits::reference base= - get(static_cast(map), k); - return value_type(base[0], base[1], base[2]); - } -}; - - }//namespace internal /// @endcond @@ -235,17 +232,6 @@ public: typedef HIM Hedge_index_map; #endif -// weight calculator -#ifndef DOXYGEN_RUNNING - typedef typename Default::Get< - WC, - typename internal::Types_selectors::Weight_calculator - >::type Weight_calculator; -#else - /// weight calculator functor type - typedef WC Weight_calculator; -#endif - // sparse linear solver #ifndef DOXYGEN_RUNNING typedef typename Default::Get< @@ -290,6 +276,17 @@ public: typedef VPM Vertex_point_map; #endif +// weight calculator +#ifndef DOXYGEN_RUNNING + typedef typename Default::Get< + WC, + typename internal::Types_selectors::Weight_calculator + >::type Weight_calculator; +#else + /// weight calculator functor type + typedef WC Weight_calculator; +#endif + /// The type for vertex descriptor typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; /// The type for halfedge descriptor @@ -304,8 +301,6 @@ public: private: typedef Surface_mesh_deformation Self; // Repeat Triangle_mesh types - typedef typename boost::graph_traits::vertex_iterator vertex_iterator; - typedef typename boost::graph_traits::halfedge_iterator halfedge_iterator; typedef typename boost::graph_traits::in_edge_iterator in_edge_iterator; typedef typename boost::graph_traits::out_edge_iterator out_edge_iterator; @@ -340,12 +335,11 @@ private: bool last_preprocess_successful; ///< stores the result of last call to preprocess() + Vertex_point_map vertex_point_map; Weight_calculator weight_calculator; - Vertex_point_map vertex_point_map; - public: - typename internal::Types_selectors::ARAP_visitor arap_visitor; + typename internal::Types_selectors::ARAP_visitor arap_visitor; private: #ifdef CGAL_DEFORM_MESH_USE_EXPERIMENTAL_SCALE @@ -359,68 +353,13 @@ public: public: /// \cond SKIP_FROM_MANUAL - //vertex_point_map set by default - Surface_mesh_deformation(Triangle_mesh& triangle_mesh, - Vertex_index_map vertex_index_map, - Hedge_index_map hedge_index_map) - : m_triangle_mesh(triangle_mesh), - vertex_index_map(vertex_index_map), - hedge_index_map(hedge_index_map), - ros_id_map(std::vector(num_vertices(triangle_mesh), (std::numeric_limits::max)() )), - is_roi_map(std::vector(num_vertices(triangle_mesh), false)), - is_ctrl_map(std::vector(num_vertices(triangle_mesh), false)), - m_iterations(5), m_tolerance(1e-4), - need_preprocess_factorization(true), - need_preprocess_region_of_solution(true), - last_preprocess_successful(false), - weight_calculator(Weight_calculator()), - vertex_point_map(get(vertex_point, triangle_mesh)) - { - init(); - } - - //vertex_point_map and hedge_index_map set by default - Surface_mesh_deformation(Triangle_mesh& triangle_mesh, - Vertex_index_map vertex_index_map) - : m_triangle_mesh(triangle_mesh), - vertex_index_map(vertex_index_map), - hedge_index_map(CGAL::get_initialized_halfedge_index_map(triangle_mesh)), - ros_id_map(std::vector(num_vertices(triangle_mesh), (std::numeric_limits::max)() )), - is_roi_map(std::vector(num_vertices(triangle_mesh), false)), - is_ctrl_map(std::vector(num_vertices(triangle_mesh), false)), - m_iterations(5), m_tolerance(1e-4), - need_preprocess_factorization(true), - need_preprocess_region_of_solution(true), - last_preprocess_successful(false), - weight_calculator(Weight_calculator()), - vertex_point_map(get(vertex_point, triangle_mesh)) - { - init(); - } - //vertex_point_map, hedge_index_map and vertex_index_map set by default - Surface_mesh_deformation(Triangle_mesh& triangle_mesh) - : m_triangle_mesh(triangle_mesh), - vertex_index_map(CGAL::get_initialized_vertex_index_map(triangle_mesh)), - hedge_index_map(CGAL::get_initialized_halfedge_index_map(triangle_mesh)), - ros_id_map(std::vector(num_vertices(triangle_mesh), (std::numeric_limits::max)() )), - is_roi_map(std::vector(num_vertices(triangle_mesh), false)), - is_ctrl_map(std::vector(num_vertices(triangle_mesh), false)), - m_iterations(5), m_tolerance(1e-4), - need_preprocess_factorization(true), - need_preprocess_region_of_solution(true), - last_preprocess_successful(false), - weight_calculator(Weight_calculator()), - vertex_point_map(get(vertex_point, triangle_mesh)) - { - init(); - } // Constructor with all the parameters provided Surface_mesh_deformation(Triangle_mesh& triangle_mesh, Vertex_index_map vertex_index_map, Hedge_index_map hedge_index_map, Vertex_point_map vertex_point_map, - Weight_calculator weight_calculator = Weight_calculator()) + Weight_calculator weight_calculator) : m_triangle_mesh(triangle_mesh), vertex_index_map(vertex_index_map), hedge_index_map(hedge_index_map), @@ -431,13 +370,47 @@ public: need_preprocess_factorization(true), need_preprocess_region_of_solution(true), last_preprocess_successful(false), - weight_calculator(weight_calculator), - vertex_point_map(vertex_point_map) + vertex_point_map(vertex_point_map), + weight_calculator(weight_calculator) { init(); } + + Surface_mesh_deformation(Triangle_mesh& triangle_mesh, + Vertex_index_map vertex_index_map, + Hedge_index_map hedge_index_map, + Vertex_point_map vertex_point_map) + : Surface_mesh_deformation(triangle_mesh, + vertex_index_map, + hedge_index_map, + vertex_point_map, + Weight_calculator(triangle_mesh, internal::SC_on_the_fly_pmap(vertex_point_map))) + { } + + Surface_mesh_deformation(Triangle_mesh& triangle_mesh, + Vertex_index_map vertex_index_map, + Hedge_index_map hedge_index_map) + : Surface_mesh_deformation(triangle_mesh, + vertex_index_map, + hedge_index_map, + get(vertex_point, triangle_mesh)) + { } + + Surface_mesh_deformation(Triangle_mesh& triangle_mesh, + Vertex_index_map vertex_index_map) + : Surface_mesh_deformation(triangle_mesh, + vertex_index_map, + CGAL::get_initialized_halfedge_index_map(triangle_mesh)) + { } + + Surface_mesh_deformation(Triangle_mesh& triangle_mesh) + : Surface_mesh_deformation(triangle_mesh, + CGAL::get_initialized_vertex_index_map(triangle_mesh)) + { } + /// \endcond - #if DOXYGEN_RUNNING + +#if DOXYGEN_RUNNING /// \name Construction /// @{ /** @@ -457,21 +430,17 @@ public: Vertex_index_map vertex_index_map = unspecified_internal_vertex_index_map, Hedge_index_map hedge_index_map = unspecified_internal_halfedge_index_map, Vertex_point_map vertex_point_map = get(boost::vertex_point, triangle_mesh), - Weight_calculator weight_calculator = Weight_calculator()); + Weight_calculator weight_calculator = Weight_calculator(triangle_mesh, vertex_point_map)); /// @} #endif private: - void init() { - typedef internal::SC_on_the_fly_pmap Wrapper; - // compute halfedge weights - halfedge_iterator eb, ee; - hedge_weight.reserve(2*num_edges(m_triangle_mesh)); - for(std::tie(eb, ee) = halfedges(m_triangle_mesh); eb != ee; ++eb) - { - hedge_weight.push_back( - this->weight_calculator(*eb, m_triangle_mesh, Wrapper(vertex_point_map))); - } + void init() + { + hedge_weight.reserve(num_halfedges(m_triangle_mesh)); + for(halfedge_descriptor he : halfedges(m_triangle_mesh)) + hedge_weight.push_back(this->weight_calculator(he)); + arap_visitor.init(m_triangle_mesh, vertex_point_map); } @@ -854,7 +823,6 @@ public: */ void overwrite_initial_geometry() { - typedef internal::SC_on_the_fly_pmap Wrapper; if(roi.empty()) { return; } // no ROI to overwrite region_of_solution(); // the roi should be preprocessed since we are using original_position vec @@ -875,13 +843,13 @@ public: std::size_t id_e = id(he); if(is_weight_computed[id_e]) { continue; } - hedge_weight[id_e] = weight_calculator(he, m_triangle_mesh, Wrapper(vertex_point_map)); + hedge_weight[id_e] = weight_calculator(he); is_weight_computed[id_e] = true; halfedge_descriptor e_opp = opposite(he, m_triangle_mesh); std::size_t id_e_opp = id(e_opp); - hedge_weight[id_e_opp] = weight_calculator(e_opp, m_triangle_mesh, Wrapper(vertex_point_map)); + hedge_weight[id_e_opp] = weight_calculator(e_opp); is_weight_computed[id_e_opp] = true; } } From b469a58df9b31d58349138cf878021c8028139bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:29:44 +0200 Subject: [PATCH 071/426] Fix compilation of alternate, unused iterative authalic initializers --- .../Iterative_authalic_parameterizer_3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index 2e475b11db8..50c2fb16165 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -478,7 +478,7 @@ private: double weight; }; - NT determinant(Point_2& v0, Point_2& v1) const + NT determinant(const Point_2& v0, const Point_2& v1) const { return (v0.x() * v1.y() - v1.x() * v0.y()); } @@ -489,8 +489,8 @@ private: const NT det0 = determinant(uv1, uv2); const NT det1 = determinant(uv2, uv0); const NT det2 = determinant(uv0, uv1); - const NT det3 = CGAL::determinant(Vector_2(uv1.x()-uv0.x(), uv1.y()-uv0.y()), - Vector_2(uv2.x()-uv0.x(), uv2.y()-uv0.y())); + NT det3 = CGAL::determinant(Vector_2(uv1.x()-uv0.x(), uv1.y()-uv0.y()), + Vector_2(uv2.x()-uv0.x(), uv2.y()-uv0.y())); CGAL_assertion(det3 > NT(0)); if(det3 <= NT(0)) det3 = NT(1); @@ -527,7 +527,7 @@ private: { Neighbor_list NL; NL.vertex = *v_j; - NL.vector = Vector_3(get(ppmap, v), tmesh.point(*v_j)); + NL.vector = Vector_3(get(ppmap, v), get(ppmap, *v_j)); NL.length = sqrt(NL.vector.squared_length()); neighbor_list.push_back(NL); ++neighborsCounter; From 936b02b87eb45f7127b36ce3d3b5f9e114e515d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:30:18 +0200 Subject: [PATCH 072/426] Fix order of points: the circulator is clockwise around the vertex --- .../Discrete_authalic_parameterizer_3.h | 2 +- .../Discrete_conformal_map_parameterizer_3.h | 2 +- .../Iterative_authalic_parameterizer_3.h | 2 +- .../Mean_value_coordinates_parameterizer_3.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h index aeb891cff92..ee6c011ce30 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h @@ -187,7 +187,7 @@ protected: ++next_vertex_v_l; const Point_3& position_v_l = get(ppmap, *next_vertex_v_l); - return CGAL::Weights::authalic_weight(position_v_k, position_v_j, position_v_l, position_v_i) / NT(2); + return CGAL::Weights::authalic_weight(position_v_l, position_v_j, position_v_k, position_v_i) / NT(2); } }; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h index 3d09fad861c..b1afca32d4e 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h @@ -183,7 +183,7 @@ protected: ++next_vertex_v_l; const Point_3& position_v_l = get(ppmap, *next_vertex_v_l); - return CGAL::Weights::cotangent_weight(position_v_k, position_v_j, position_v_l, position_v_i) / NT(2); + return CGAL::Weights::cotangent_weight(position_v_l, position_v_j, position_v_k, position_v_i) / NT(2); } }; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index 50c2fb16165..fce8e6d3622 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -723,7 +723,7 @@ private: VertexIndexMap& vimap) const { auto vpm = get_const_property_map(CGAL::vertex_point, tmesh); - const CGAL::Weights::Edge_tangent_weight compute_mvc(tmesh, vpm); + const CGAL::Weights::Edge_tangent_weight weight_calc(tmesh, vpm, Kernel()); const int i = get(vimap, v); diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h index 95593adf95e..630391fa28b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h @@ -206,7 +206,7 @@ protected: ++next_vertex_v_l; const Point_3& position_v_l = get(ppmap, *next_vertex_v_l); - return CGAL::Weights::tangent_weight(position_v_k, position_v_j, position_v_l, position_v_i) / NT(2); + return CGAL::Weights::tangent_weight(position_v_l, position_v_j, position_v_k, position_v_i) / NT(2); } }; From ca93b406a2f57baad1a3d3bfc771805191ab62dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:30:45 +0200 Subject: [PATCH 073/426] Avoid needless length check (the weight functors already do it) --- .../Iterative_authalic_parameterizer_3.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index fce8e6d3622..ca2fba0a85d 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -641,9 +641,6 @@ private: const PPM_ref position_v_i = get(ppmap, main_vertex_v_i); const PPM_ref position_v_j = get(ppmap, *neighbor_vertex_v_j); - const Vector_3 edge = position_v_i - position_v_j; - const NT squared_length = edge * edge; - vertex_around_target_circulator previous_vertex_v_k = neighbor_vertex_v_j; --previous_vertex_v_k; const PPM_ref position_v_k = get(ppmap, *previous_vertex_v_k); @@ -652,14 +649,10 @@ private: ++next_vertex_v_l; const PPM_ref position_v_l = get(ppmap, *next_vertex_v_l); - NT weight = NT(0); - CGAL_assertion(squared_length > NT(0)); // two points are identical! - if(squared_length != NT(0)) { - // This version was commented out to be an alternative weight - // in the original code by authors. - // weight = CGAL::Weights::authalic_weight(position_v_k, position_v_j, position_v_l, position_v_i) / NT(2); - weight = CGAL::Weights::cotangent_weight(position_v_k, position_v_j, position_v_l, position_v_i) / NT(2); - } + // This version was commented out to be an alternative weight in the original code by authors. +// NT weight = CGAL::Weights::authalic_weight(position_v_l, position_v_j, position_v_k, position_v_i) / NT(2); + NT weight = CGAL::Weights::cotangent_weight(position_v_l, position_v_j, position_v_k, position_v_i) / NT(2); + return weight; } From dfe3ff5d608fbdd4dbddb75b94a4ca426aa160c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:31:22 +0200 Subject: [PATCH 074/426] Code clarifications --- .../ARAP_parameterizer_3.h | 1 + .../Iterative_authalic_parameterizer_3.h | 2 +- .../Orbifold_Tutte_parameterizer_3.h | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index 33fef26c674..154b6f7f940 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h @@ -458,6 +458,7 @@ private: const Faces_vector& faces, Cot_map ctmap) const { + // Since we loop faces, we are implicitely defining the weight of border halfedges as 0... for(face_descriptor fd : faces) { halfedge_descriptor hd = halfedge(fd, mesh), hdb = hd; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index ca2fba0a85d..06d0fbc09bd 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -726,7 +726,7 @@ private: for(halfedge_descriptor h : CGAL::halfedges_around_target(v, tmesh)) { - NT w_ij = NT(-1) * compute_mvc(h); + NT w_ij = NT(-1) * weight_calc(h); // w_ii = - sum of w_ijs w_ii -= w_ij; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index 3f8337d0660..5256204c0fd 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -783,9 +783,13 @@ private: const int i = get(vimap, vi); const int j = get(vimap, vj); - if (i > j) continue; - const CGAL::Weights::Cotangent_weight cotangent_weight; - const NT w_ij = NT(2) * cotangent_weight(hd, mesh, pmap); + if (i > j) + continue; + + const CGAL::Weights::Cotangent_weight cotangent_weight(mesh, pmap); + + // x2 because Cotangent_weight returns 0.5 * (cot alpha + cot beta)... + const NT w_ij = NT(2) * cotangent_weight(hd); // ij M.set_coef(2*i, 2*j, w_ij, true /* new coef */); From 59f2021eaf76da9ddbc7a2dec3552f3ee09a3801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:32:20 +0200 Subject: [PATCH 075/426] Update Weights doc figure to use compatible notations --- Weights/doc/Weights/fig/discrete_harmonic.svg | Bin 12046 -> 15475 bytes Weights/doc/Weights/fig/mean_value.svg | Bin 4718 -> 6282 bytes Weights/doc/Weights/fig/tangent.svg | Bin 5526 -> 7306 bytes .../doc/Weights/fig/three_point_family.svg | Bin 12046 -> 15244 bytes Weights/doc/Weights/fig/wachspress.svg | Bin 12953 -> 15910 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Weights/doc/Weights/fig/discrete_harmonic.svg b/Weights/doc/Weights/fig/discrete_harmonic.svg index 21fdafc5cd717f9b56535177d788dc3b3f40ac2a..08c74518014e206c1ac9a6e94f07e7ed7f1c90be 100644 GIT binary patch literal 15475 zcmd^`TW{OimB*h?J_W~p=>a5~n|C^Piq@TJ3Mjw;)A4Je$cin5mJCU;lN9~#^ZTz& zQW8ze&6$HXK@-Tl?Y;K8-!^&vyU%xZ@GxI*7OUmOi3_8XV7{EKt{2OjiQBLce!gF=x50ncpKiu~UIwAvyz*gyo-IS9t%H?LluZys)5 z1;IXI?nE~h*B2*~>6iKXum1Y;#YuGk*&cn_ojxwEx3?E3S>(c`d3rlv+}v)VFn3|m z+BZ`P|%%j>h{{E^`Y6JFa4IC-|Y zpU#+dzn*XA>xa3A1UK*bon5bH%jq4DuNRxydcK|i^>(_xTP+u}5PEIwV)=11o8HgQ z_CykgF8FOV%db;6PhB($;wX;CQ89Mu&+Wp?%~?D3;^cO_y+1oWeSCZj+neEPeRHbC z4Z+Q6dw*~Kra`lt-`)r}t556M`~x87;c~t`{o`N$c-lT3N8$DMdIzSPt<@hBTQ`oP z=(ME}E`cmpM@POnzn*{Cv=Y~O92Y0S>6`O*;WJTlEfKb(x*Ktv8AA8doB3>2uhthQ zzxiPQ?DqTB`g*=@ALRCL@4*TYF1BcsjKN^HGTGd&9tCrAJH1{#UYx{-kM*dV9Q7v~ zGPm>D$NBpGYPv>`d(f}vn~yD0*G~TpycWG#OYc8S>y6i_R(fY&SF1bpJWQjkO4H&H zpBb8+C!s5xtIFOZ$Sb4Jm6hjI2k>#RgtT#EK&~tsvujz1?y{D*(!# z$0u)I{SiTSnD|?NnT78_K{RZXaUvoLWTWsg+8a%dVE_(fUo8|t7!QQjD zpXhJK-Oa_aUI6d!ug*_xF_4-q)-#Wlgph`*p)(WLi_nV+I^wY5K4|(GsZ_i_y~@L? zoA1&n^o$(@kPiWfomVwmKWUH|oQ|^}SU=iZKX##4iNX0SWB~40^%pTka+%fB%|>$Y zNZhX$%PrRxP)C9mz@CxV5{S@|5g6>Ac7kkSy7(VoV+Rl(jLIZTjzVtOZ=t6{yRiUd zbQ7o2qw~Y(jRDwm)3cw>@2A__0n!=rE-#6S7-X2vvalMLVKH)9nB&XCd=%$lIp%T) zQjnY%>QBwWas@YWBuuy^uH3AaTCL@5;Q*y2T)=82r>qj>Md&!q!!*eAFdn%$VNP(s zUI00-0zf{!5v}^`{~S`i$Ccy-t|TvWrK*HcRL+o6ECva0-HQ>~2vQC?f@_hQ9dIN$ z!Vwom;o?tuqsKi@HspAMm5uRvfBix89_*!5c0ia5)R0au**I69I1q9;c^e}N(S%M5X@7$sGh&Bke%VKCX)nZd}9kbz@Uc!8aXqafJ;OY$QuaR4kw z1f3+1^T>6I;b5Sg#@%UxK!(_oeLGu<7uZs~%$5@49%XO^cY@82r6Cv&Ji)xV*;A8z zfG5Qfo|Jg*QHCJ~gsp^yf>NBx3b_%vuPhz*BKdJ{m}f6-;a-f{$?&Eq&GSEvG2TTg z#+0ezC{ChyaMBH|W*m!;kLbp*DeyF-VW{_^iqewICZw~uht(*KZ33w)8 z_Ly1bRqeXqeldzha!jiG@Z3Z=jbmBKfNR_d*Cea8Jg@-k2ud|*uwIz7E5(x?3178p z@D82>D~7u>XTrpXhXn*>K+Yg2v&mY*hyY{(ehFevnj<)JRMG)6*A0uDHhu$=5r{CZ$=MWbH*Sn9={52O@(;x5e^22zTh zxQSwLrhFio05t^&(97`%iV>xbune-f!XZF{j)@TgBe)U?IY(omgGcd9JaeN|QPcjC zHF}O1x1pZlCDU*}3Qi_=3r(<34B8o^sa4DYW7>uT(J%o{#)gBDufNH#FkQnS6Bn2_eW(f&Y z|484!MLtNKKU1}Tb{8i*cwe~c;C+s{=velJE7Gr~!$USAfK*$)WZJin~-Qm_8^d-IAs}xLZ!+$?nnD;GL*TMmgn{9y97H&*~;?xn=Z~9%&q< zM>fhRQ7qC`BxuB6#W1p;{FbO_5!!;9ay$jMW&mkQ{y=0V=F?0j=K55IH1?K|r`*kP zRFGDRNKp1Lue4Z)As3ES%9%o_B@-;6_^+U9*}-P)6kqv~P=>LHiA8$}?FG|FuozBi zYB87;qRT-P`$;jtuF`~^irmP|?U?&I1O{l3xXhiAMsS=-6O3Ud z52e3VEv;ePTQE|7Wb4-rK7=pF@{%%0D92M0Op0ZgAQMTevLo5Lv~eS?Qs%B?l;dSm zl*ki~YRQ6H+K5I{I|lTaPp8XzJ%iEN`L2(zmb@v_sX5@b6+|T{C~?7Pq)-qhT~is5 zO)59CV#vx9?i3?wFa?X~QZXbWl0oSRjhFa3BXm^4cR3ISd0xUn(_z-wWvtv(C93}b z@qE+D$tBeznY+NqDml;tytLv{eM@Re{s=y}V}+G0!7;K{L6XXzZ^0**!Q{2qBqr}>P z?~ChLvEyh@b=i~`mv0{KjHC6O#dGqi>8L8Qe#KL{ zS(V`z7?7E)532(lvM^?5fXgqFoUSc~g(lNoB~9i?iD811iviQ8l9PoTO3#Lx$JH|5 zD!p0-4pM|g67`|{v>4{cV=u<$RFc%GU#%xhI=4q`Z@IBo^I#A1-+_DlY}}B{IV*qocpCujBYq$w>$vNXHW?|W4QoXd}Wrz?deD~rV4tJZkyM`fse*& z&y&*G?aS?*%e7ugZ$$jV9u7huD)?PmpQDpX(ubroYcrEEHgsTs4o@qRyajs8Ys6Gb z9+J{i6Rag1J#PK&5gQa3^}njgZmphd*sEwZpxUiIxjJXAKV@G6Ppq6Fr#L2vz;|V? zN_>^IsYwTPe(Jv}e%ViLOO%AaJ^}Yhm%3<5@-0r|xOjlmQX&@F!I zz$)$VtuNUJy3RHGY)S&SlKj=1)d-s|qgD2<-XZ;1`9a2lgg8>%T2@CMNOF%)gFy;* zqImDL&#R-^Grjko9{X*P!;B!q=Cntg*TN2DD2!6egA)93A!OX78?-w^U(lSw_H-V%N9%(u8(lFhX zaA0bT?r^Ox{V?qXcN2DJJqEHpm%qPb;)6hckHoZ--Q`RzoAMYFT{mj7JC)fH z64?>MQSb8+H9$jld^E9ijFhe#Gbg**0>w5PnGx`wvU2y#)bd>C7Sv?Yr|yM zXEhcORSjSP3yv75x1%53HalWre@l0dP3&?VN$}`%_iWQ|P955&GHORf;IPE}EnRC4 zwG|`MhDrBW0!0B`;nR!Ndfh)!%aC#`>$OLUEy$p^}bW&m^#%}(P)PM@|F z&IpIfQw$PEX0;8zt9;9N9If5AB`ma~n|Q4jjolf@DS_ubgk0Vg56n!#vMLwoxeqSf zFb^!Rs>HOXph>n#u!a@-WlC_u@e#pq4SNhG1>K<3NL2CNm zf}?uf0T!n#a|gdf<>fdmKewZlJ?8C#R^N3lJ;at+vRkB2`_XpH{^piX9IAmLq9X4i z1IO^q!&j}3?$muZ0D|F(jQ$rW`@W(}|K#cAb@7#Iiw?W_quMSkgpyixj*{U=^zG7f zF;v=)!E!1>Mmw5%5@-K;K-=}c8&j3gBE;-1^}Hf&R^ysv;!5f!dxPK_E=CHLr3y?Y z0@{^gH?E2fvN;IMl$Tc%p*IZV0F+ z|3e9-fNi?*t0sKe-(Q#4LN<` z4_1RQ?=va`Ac&hAB*z)<*Zkn+;M>?0lRaYh&wGq&cGCCXjo9sU#(pDnFF}r**U%4& z?38!+adf;?{k)azjX?=h+X(w7S;<>g8?Fnlgn`h30KF6aj7@a*AmjMXY$7EQnL`Kcm+65vn#{;fPBbsYuUR6dx^6$frai&b?Twk7P=k3|gK>Y`$ zA69(GX5WeNHQD-ZTEDhCkM@1)!L1G7!kwjj-uhZ^IgR}{cV~z#^HV-d?-uo!vke=4 zW4<0;b`k9g+V&)xLtn{5#CU7FJi{6(DlH?8!d8oMeLA6oi%%~TPJ xs6sjU`Iaw7?K30Z>S#Y`U9a?stgthX{_|WLSVZJc=cjhABVai2)#sa6{|7^^ZPow) delta 3002 zcmbtWO>7%Q6jrMA$4*N66UeWf&A3VPvmWp4zuVX#!J)JXQZF13B}C5FcIzgtcaz#t zp`up=N*QrL;(*ElRqC;)a^O;NK@sG@r3i@%5y}M+2=&5&H=gl&V{8^Rm-U;S_kHhs zZ{EE1pVjx@*o^OA^DZXsTUu^x&Rx$->rTZjuC8Pd!30Ugj8F3K?W51Z!-k;1u%(56De| zEqHP3?_oOBmBNhnlv`fPIT=*0IIdG!cThBvjn27Vt>j2vtqeP!Q}t3g*QJlU*KSBT z2&ZEmNjZpTTi8NUC4*FKpcLS8#Yzr<%qeZ+H1{I9g3V5DDp3TN##lRWDS~Sfsr3p4 z+{&w^8q@`XmX=&MgIrHR^y&e1km+f=`R#!zi*4qc5Q4JNNbrTqUPR`~OJ1Sr1;nL; zaz9{UE6<+b0patjEA*>_S~si_UFaE5n~?uaeDly$d*bg8*?S`XC^Flg_(=rsiTF-* zx;^p!94f?TwswMw=r@Nibh8eib+QkRCF$!&<~i}*BX6f6(o<4y9&J!wYtVW0w`0*g zP%a+#bIo~npuZP($>JjTp(eL_uZ?xzR%m@`wFz@Q4#Ku~u>#tcR8z9V$ z=me{s{B%3r@UxqA-uhs`*||92}lr92w0aoT%^S;l9w4lRxNQQ?&@2bNu8nS{_1~BLSjSY5M|4|W%g(ZrPHQ9zJ^y5)P-;HN^ zYFqKM27wQ=E!#jU6GdevxPjR~fC{3dIot->X8m40K#4AsK1SBGzZa&2J{-T|hov8) zS-yCHE=HSGqGuAK?B`F47BWtZht>b~3DJPDiH+8hTlJhQ%(QnZx$gtXT5txe1_Vkz zG3~EHv)h>v8kQz61rz#Za+xRUC$xPsG@L_@t`d7S2`IzYdijs-(>%?R&u zQl@ui?67hrXT?zbbXMG~QCW07W4|XSg6x0EBC&EZ7sfn>h1_xSGW`k9aLK#0-%jmf z|1otnjPw&lkj99}Ge9^OlzLeWC7aS3twLU+KWjEuxGVq9^>~o$~?GeqCB7dhg0d*s=c3!Z}i=-KE$r)uoi diff --git a/Weights/doc/Weights/fig/mean_value.svg b/Weights/doc/Weights/fig/mean_value.svg index 0e40e87eaefb4744072b28fb47cd905c4cb385cd..d102c8d130fb7ce445cb0e950bb6da649ff649ab 100644 GIT binary patch literal 6282 zcmdT|TW{mW8GW{Y1*^O?06Cf&k|R=UJ7}CV8$baHG}UV$Q?w+QCIym~Y#06SJ!gib zE~{*cv<0#@s2R@XyPfYQ-F)-@ZZ=hUJ5oZ9yu8e+<)&QSj{foUUxQ@iHSMBY zE{dwmZ%1V{`sVKX=1)Q3{g9V=y=bd?>iuO|J>=exMe)+KcFEI`kRtTGzt4a0zJJ|T zb?g1Dcv%HMmY%SSbH{V)86lzih`y7s(d!PJNgo8|3jws_0y zU)=la?MQB4?bh32y5B6@_3cP&EmXI=&Nr)d3k{7Frd!)>^8L3JNqEw;hdsM($u;d; z0e$mw@lfQ!!y$4@SNus2}IX|r8qxV5eGCa-t7qXcVi@l2OhRxX~g z{hTk#Uv`V)B^OZC9@>;oO}5zP(<3Y(z4zxdGs{Tjk&?crrPhI*1S$ z-L~85c)Z{5MZYMjdNn3jD_Jw{*N^TuoqWUnenB+VOP%G9Ad!nQZ^z&L{N1?U45V1L z%LAF=Ho5OZ%U4S&$GwIy4}`_rXHVYUEc3^vhnn+AIP%7KH$C4em01$H{?M>6aXztK ztn#cXs`_^H)ua8hQa)7mGOzm$WB-meDj>IM;Y5r9OS(s-Syy|~Y}SiqwTD}sZgXq6 zEYB}nVb*!}l-Cc{qK5mPQD5fGQ!ms~@!ygs(^XA(e_RxebEF=->3dZ@-;Rt>QYLX6 zp30NKp;Ik%qE&Rh1@(*)q0~uodTGBYpZ>tZ5tvkh1%Fba#Cv znpXbvaZ?o25((@B@>BJcPrrg^;;(xRo;Ph?7m%Z!D*54G*EeHJ0F1ItojFdlYbYj` zMFw>eBb*T-n-=lF+TDogwCC4TBb@W_z6#Th+C>895&KA$_Go4 z^noc}2Brh;&hVd+`d~y7Pqc_EcK-qG4ij6N$Z(~ti`^V8Nc!B>&34hQ>7F?B6ZAKJ zl1Y*J(pMrz=8SxB4KSZ2snGr;!&-tpu1$O$Xq?p<2JOoLPKV{hj**BmiS-E%n;-(= z5IY#b%gYoP;D#li;zUw_E*Ih~Q2fVPgg@?+QHVtxCAk=fl^sK2?vqF;-#~;U#_hy+ z3cPziL0B+GSt=}-9ZKoCXTAd~Q$S*>_mL-Y0a%5;3WZvORSe0&72=SUu_L6PPee>P z6`pX81G7~6vfxb!Z+B>|oe>i%c~AU(1)Y31gHoJ1KJP;q5&`96;Ob_)f+O3H15}}f z>KMD^Q|!VJW{48l>LPrQvNNx=kZ7v;-{Gg|CKf?D#P32dz7Gj(G=Xp-!KDKJpbBsa z6Q@=*k5U@703Z{Zdlnkri*`XQLTE=&^bQyUBImkzb3i8;6CAOC_Ar?pkTHA<@uahX z(J3(6Md{Vm^{-%K2*nXLVe~0BO2S$FB%x!`XfW4FY(cg^BsfYU*!%=mh8rW8tO}U+ z+5jIV6Q|mQG1eoL5Fy%@ZkGJ7AUg0m#VB-H`Z7R~#p4K|$Y#RR#HZpITELzDz|jNm zJ4Aqd6fL0@fld1;nO9zGn=EoL&ier7bqq0 z6O%EuD+GtZ8>@nW!YD_KPdqVJSq<#NIz)?5IR-x+l|F}e9<_1pE9%RWj4rODhFDU( zlQulaO+1F12u>1$EuG&YnUiM%xljY}MlvXO_JqC8;+8;2~@7QWrxSTRsN94Z) zwU5f^nHm&6nx0xJa-Ga&Pma$^czmIRv(O?=7>pm~9J9ifxi!?Ab$fIQ)+7`@);So_ zr6bn5a3=i}ko2jOwpP>!n$x&MCk8RKgNqfYenNLT0w?U@9PDE&ChPr2oIa_gF>WaI z2g$4#VVFQH7IAc*=m9LO;7v;G0<1TFpg?J7T$^qf#ZVW4u?;4Rmaa=1AH=8mPZh z1Hcb`acn{dpoyWI4FWqNqX04r!LYy^h2cn4aM;S`qLDJHd*x`sHHf?=%TB7}aHjs} z`W$?fJFTVhg+2#HhBFvR54SDd94|*s-tWVm(ul2U4B$TXa|UY!g?`)9X)){VIL#cR z5YQK${nO5I@b@@D;io^9A~N=U7n+1du&oTPorobUMX4?pvpm?-(rNL?sml z5XOWsX10k7;Dj+;BdlgerifOUH|xb1CKOFEd!|SaU!Wsuq!-wgIYuMtV9GRiQ0WwP)3t}^Nb*Yu+gf8i59YYs zf4DZ`i)}p^V989YLEGc`nW4IXJqnMbUk9GOC>BzsNtF1QnMj+^c$sGlmS?L1N|4u= zEUutrxp&M}H{%)Uv%YwUUY}*lW0kWLUZJPk75B;gckj8UtH_aM$lb=YC!>0@%mE|^ ojvWWg+#S1sT+@roJ78`p@&eCuJhe-NUo`kT5Poah;p_Ro0rj|_*#H0l delta 1210 zcmai!F>ljA7=~3S3U+B5+6Dwj<#c6C&OY05;wTOhbZJOe1PfKZ0s=>HWXz%9+R<7hEZRk zmSri~E=Cg@tKkHrMBHTwjr|_;Y^-S-p?t@4{l3S*%T$R83unJ?r?-|A!d)71*mYbR zhmjk*(a6QJ)RLPqO9B_MB!nI2PMG4var$FJ}HA-=?V+(Q_K7T+n8z8SMm2wXB?>!H~c*=*F>)W2VAHDA;FR2~?tg zqUE_0D6-r<@A=X!IhW?ixmNI=a&-p0P@Nx$%j+63Ak9?$pSa(Wr6#{f&9KY7^q}y3 z86KqcTOkoe`)cn2UwO#A%Ty)RvZyGj^GYvMozP=Gc&VuXN?hi_ccg*fy^}_wD9F7N zE)vcNKE8d!0H#qV)yIbARSZ%cRlqNxqy~50qeSaWTaMAb0mfwmas)h@N@ym7u2ID# zv}35GRyK6bFgw%U*`!-p-ubAXU{h+a w*_fq%**sbVJKf4ZnA44B+9=(h1O6&mv%p6;T+uL{f^l=FG&f%b{!uOY4`Nv(?EnA( diff --git a/Weights/doc/Weights/fig/tangent.svg b/Weights/doc/Weights/fig/tangent.svg index a52fcf03170a41e2f44ab9c6b61408226927b7aa..9ee59f419e85114a1c7d2d637d574b5a9865186c 100644 GIT binary patch literal 7306 zcmd^D+ivT|6@9k9f>mA`fTCtd&XClx9W+iF2T*_lP5oNP6fFs+MS-N{OVNMtTAQRU zG|zF7<{<~QA#pf+X5ZGn%;@5~m&e@MWo5N4HkTvqsgaXy(qggREH6j@`1P;jc;r;| ze6yJ6#U{HPZHm!%SLYXh8jqcyvQ1Xb>!O@Ge_0fFne%g=KUK9%IezFVFL0f|-~QzM z__8g^+WA}lv>gAuaXgv4ZDdXz>nY`Y|Fq5*j{4Sd#^bB=^NVV?Ja?R9#q@|1>&4}0 zHh;~^e>U$gmm{@(5z^~n_`F`!tILt^`<`y8t8Beo)v(ZNFKp*_>+Jdaf-D^6$YMvx z!mg@cbJ&}0=688EzMH2H%d&XdET)_68Ou*Le3BjTJd8pF)Hk%#+0o9#9C#hY8It#UO9bftWSVdzUe%p!LRMT$j zQuuTwf_Q=`4hApe)|Lxbo^^k=<7v&K$?l$eCPSbaJOOWR#-xcK|D?5Ufzav5c*w!^7hzTI9J4C8g@l2l8YQ89*5mTpR zlJ=Wbf3qmF%F>6dyesAQbe<_BBYdWqEl5OW)^E5VhIZd8u8%R5}&f z5}2EVgva^I`f>f1!PFkh^rRpy3WcRdel>`KK=XrVj>J6C|#FnBZ-a; zyvA?zWNh0P=;nJ(>=CeLN64t{Z%?e(pvCUn;P#4xVq%#z(Fn@^O4h+Q$ZtQ!(7kRf3NE;zAOJ6Y{E)Ekq=ET{>c3!U-Ojz_w3N_wLE~KH`ePq!{p&dNjGMS|;6^YUkI=K%cxX^TvtS3m#I8y; zhQ8bIO+b$!*vY|^lO`Q&{(CV#0eDkNfJvyK@M^F@%QGN<3bmAAFo<31{^tAwhig}( zedHo%r#!nFLx&xN*xdKfM7;2ZtKKMEHduh==@kT-R8c0Bp&%%ZXW+%Rk!Pr-#wWPN zf*BZKRW9G2FEqMp2l%f+14r27HX|6+jv(dj5C?F)ZX*5cVzNZE$=3lPUl2Ni%(w3$ z3s4H(F!sV>+@N9WS_Qx~%!iR3a4BpA6&9ke!s~p7NX^A3^bVP!SL{QH!?* z>=@5@7Q}8~JBaKK$jDm&VlvwcIt9jWlJo2gIWvS!5cbk3kb--fPFf)j-N<}x;3Sgk z3@oh}%d`N)&KSU>(PYK4-vJ*$C<*sDgbuP!AqturJ&aE%a2(}MDD|(0k3kH6b*ZBb z;gH~d30+F!Lh$r>U;=IE2#%eThw~awjqiQbPaO!4rHoLSiskPjOVq6FU&iU6AgS_z5)-no>qgJ_i+g&|8G=g~KW755|+7m|pNB@q>q zjL@p3EXF9{lo>-Wwk)ZQ(2Gy#$L%bNF_c8rf*DvVRT4_DmPD(N@^|3Ij+5Nd)}CjY zbIEYXntq242RgJtD@FIqsRzWaV1_ih0Ch5=Sk2lO-57;HkU)u`{|fHPL1SZta?m?R zv4`7H9?4>6(6&+eSJ)fR_S@PHX<)1yp(d)mw zJa&9FB{CkG-57RkbjKD9EZIR~D*>Zsk4zx!I(4}R z!i6I@a6O-=4zd1NQfRRAnEt8244ewI9}tT0!#Kf0Rt%s0H~KhEw2z|}^0*0cP6r!f(J%?@V{X<0L0ogLwl%p<%9bj;GKYY&bce8&Z&X@vPHg zKVUsVZs8^-cNR1Nh$koBE2P)VSl1J|fTU~#7NU5eVQmljL>u5m2yaj&k|)lXl`O@8 z^#d0jURtO&cCfKquIa+-xA1ZAZ%!(ynpYfMU4Y-~s*J z&X7}-@hb(dsJ$DUHrSw5C?16Gz?c;#f=W^)sV)0xD^s2zS6C(naUSp28kT_%Kx!EB z?04Wz++imc;1?CKM9LlPljbT`dlvc|pTRD&r&FHX3Lw&6qerV&wTv+p7 z)=KFa-`0V_5Rdw2^Jw5~4$mSCEIJuu{P>Cp^_nn0EP=fV!VDgOf8IwrPXZyf?e86f zu}(jA@!p(uzYy#1FQfZlzZEU05(7ntxGB-410hZ+1SDvJ4O;$jf*du2{$wa5F^9B+ z1*0{ohj)8$IxSO-5$ptrAwV<)(XiZ@oF_~kkC0Zgqg9MsWhIn(h=O-mL3X&y(BFU$ zGyzkl!2$L5u>Mq~=u6j+xPSeK2d*E!Moy`~OFkQc`xQ`}ziTFLf@1kw1CYVTNMOPJ zUjlG;P~~Vy6*VI)LG}AgKvMcXDF0wp*GH{^e_7RiR3Hpt2Zo(VJ@g0fIKJi&V8m2Q z2x9N>CFd(Yi7?aR*^#x!_#uA8u__F;i&3N^8~Oh)XMDp3j$hk%`0ejM DlrVir delta 1256 zcmah}zi-n(6c$x!V<-G*lj5e8in)RWCAs)_;*vx{LWt6Iq!KWo$Z=x}H%W8GjSE$G zq)JpLv9g00SvoKD@J}!xgm}&+X^1FU?%uoiz3;vE-PteA*Ee4+oqgtSWeZ2D zb-74_x)|7P;x-#4Bx4zgZmonW)zEG~krBN;v78V)+g^jLc09N7lWVN9b)=>`fEVpezVgxb` ztT2?Un%FoErbs4Mdu$5UPJ@|Jm+d+fRisFxp`xv(7lJZS)~gayLd2I4y)~uGM;-k$ z_-1M)83pTQp6f1Lu~qdQ8lT>sk%opUb>||xEY-*|pyVgC- zO4z6juzQi>|7+?I-|RPap9*n_IqUJQant;aZ=WQ7NM!qokCTQP4WP5qJ<;mtTn1Q~ zeW66^1<<#X)v&n%tQX91Nv#EHkgbVZ)e4E;w6&-!yfjH{dAB1 zASDmee@S&1a&4|Qj`hb}?_KR&>KQ|<0(~x^Vdi5Y7)Kb+hq3Nu>F^#8lUL|s`T^_4 iPwzA1ASKYm!e7Me3pR_vT{A;lT%H?whdKD8mH9tR2{K9m diff --git a/Weights/doc/Weights/fig/three_point_family.svg b/Weights/doc/Weights/fig/three_point_family.svg index 21fdafc5cd717f9b56535177d788dc3b3f40ac2a..079ce8129b1a4a2d35774d6310570ab03f1a9be3 100644 GIT binary patch literal 15244 zcmd^`TW{M)mdBqvpMv9gnFb`9RlK|79_(ahCj%(J06Xi~h9fJs5Lq%L#ZEGq@4mnP zDN>?nTJB_fcN1(kWERP)Q|Epw=H(wh-Y%m1*?KcyEzeI}oSa0n<#cs5UtXV|{O3RZ zeO#SHo9*TD>ToD{e(~bv z=KlIc6m=1ECwefyIzO3QewwX+3HKk*Pm;Tj_UhAq_%OfP-khK0iHpo9(9s^v;%-Zx^%i+so-Flx^6G3kdtmy(f}d;! zoIKmyT~1kbx1Mcg>-$-N1UK*aon5V_%gb9{Z*SJK*)Mmi`EvWqyUW}8;!_O4HhI2$ zznNa%&CWV9@v)2kP*01i%*`^Fj3S?SKTgWA%YJNkUT)6XrROI%+wI-i>FLA6L)<=$ zSL^Fj?QR%uPTS|5^_vFI-TL-Hyjgu%PiOA{F^iY8?dhNY@#oX_#dk|d`sg|G=^xjQ=Z=a*Nrcbit^8hc-!M5jN$Y&Sj=HCK{hJ8SpA``i$^yS$!F zSBus9{N(rV>_2<_cD25mt=kuc{nvT1LWc7#>LhD0*sV-9H>(H1+}vDVtsc%#{NZc8 z+AU7{iw&8Z+4TKv{dRS^Mv;5auV$O~EmBub{~LI1dcBt7zq?#)f=ad0JNvv^-GWD4 zCcZ9xdWg>y)piy3RlBVJ3i8IjjMK98MSZyJVZMaAabrY2FM4=3?{^lJmW^$;Y-%RR zum&N^QU_n$UVfb4&OgtfwFh$gVZEL$x8sFufA0d&2YiJrRdU*Xx|4CuK5kE^n@!jO zQ1;%R{QTmFc(YCZ`EI^goGo!?KjEuZ?`LPfM?3kixgFomx3l#EJho>p`RQM_%Kh_d zzPV%burNIIyNC1TVh+52y?A+Qn}O7HzMclGB!w)_44o;YS7lt<4RrW8D5|6zR%Fug z{_?trgN(G^Wl3B-4WJkT;9X$2?VmQt4DOG+AJ{+X?C)J1gfqCFjSRruYVk=-kzA&W z%gsh|2uPUURfeI`A6dHB9@1NPqZ?1z_km)n~G(wXw6sECWs)p0h><9b}h<;dl6fisVbkuTzE z%vkm?Rs(r37mKF^i97Dh=mMM_=_65e{|5!nb*4msinIFcUW zh)WXj*`acg#xNqOV$axEmE>_1)ww;!DGss4e>q#SXV{WG&lXpvAca{}({YND)M$+7 zirJ*2G|tCq>kOn6(v@_8GubiDl$ki4MXvN36bzDZ(F-xF7~)6z<^0H>;Ya>FKOi?7 zi6_`jF{7gGbT48?+*yk2{$S;?GrvhfL zS!G_;?n|DRqhutTG09k@xirCZU3XY5_Hp+MlnZ^tcmf*}?&QExW zXs=CqqkGNNRVeCOO+}|M5^7R#z-h$QWRK$K1CuKo_3FpcAnsxyrRa#eGHVz}DfZ$f ziou!co@4^l6d*vaz#}L|RJy`4$mR}*013LLMg)xDP9zjujfD;#`Kfs3Mwz0f{UvJ* z95HS~J<}_e;eHgHOzak#V4oPm*e`8{zTtZ`K{}Q9KlP9jd&p^&Xb%9#I7kYy~p~ zo4NBR3f`vTJp_@GM20Fo)a-bkV=$VE_7Fx^)g2hb0o8aw4Y4JWb@0i@arHTx0hdvXOG^$I-?LGNs= zy;?%#ZVh_3>(JD~yXyV0>0ol9#eh5_!x?`@s%CquJy1Wchue08mA~fUNq+Y+yLr;{ z0?NWtD(*_DV0N#dbVHhQ?`|0S$^O;n=#8jLM+N1UUNh^W$QMo4a>MKkz0y2Nk9?F< zqFAJ>NzjPDieY3w#SKx>BD4iH<#-Bi%>>ev;-1J%%%_`7%nhjwY3vOlPq~}psvxZt zk)Rx4UTCu&hTJ%Isiq2{mQ1jP;=h8bWe1zFQ+(w|LK%Az<3)P~?Ip`du$WG2YB87; zVwZy`_LE|OU9AP4$->5iD9HeS!&D^-jEU|lPPu9eW3MF$H(IA$PDz7u&X7Fh#xLax zLXV=E&A5v6dJ?!V+B(BShvD2~kI~VF!KP3rgCl8uHe*jK%a5qF+&%er$eERwDETSj zx+US3BPpR#)*>1tMx{u~SZiw$pcI9XS=hA*bqEa5BypK1BhBDCl_nU&Odd*q>xHz2 zd9T4p`H}6vXz(F?IkuOSK|(p6l3-FS!vvW~TD4ut)}@UbX_Yc}C8JzlrDcUY;i$GO zsihf9B{~e~F`rJCT8dqF-C=&{`h@TtOp#8FirHO$Wd%_M3QAls8YvWnN!L^cO9wh-6T@LgOoZoe?^!;JX|MlL9Z{py@Ds>@!v#suI=z01154 z&gm2PTkyUb`2l&d0OZ6?ODfuJ#;Eom6vINJ>g$j~P_Iv|Ag$$-x$nJRhTC zI#%pB+EWr`SAf0xruCfVQ}SBKEf`CchvE+)?>Uj7|CkYzRTZhyQB`F9ipO%ZDkE$# zATwDXRtGp_Va&_{SG-CKy0#b=noM_PqLJE&C&o!?@gux3&@JQ-{+O zfG{hh?@_dT!g9E5p-q;m*jzEg?6Ebn;vVY)A|?s^$!?#%NZJC!Us3p`fd{UFA2~+#qe)$1*Auj58V=QfZX=AZ~rDrsHUXlCfcYx%G%i_Zm7R z8{DKw3g+`GWn+DruaM1dubyl;XfUsKm?Jpz+Zl%nxKRcCg36W%0N<5%Dr;5Br4AeN z;HT!Pf{*>wbHtqa8?xt+F{uTn4Bdh(epduHEmnIT^0%<2-WW_YkZZwD?Nj9pp>HL% zSMtggyp(uYaw0!zGiT`vbe@MUfX?fig)8SLNl8eYFoqAP0iDjdJ{_4um<2f@m;L zqnikRM2kqlB8~33D|rSLj)%-}npQ@iBUa;)$0R5j6OaP$nPt&8dL2 zC>e=SI(ZR?gDjO#|Bv&$&)+tBcFO}8K(s~WI2C~bC3vEHQ)v%FF2YgN-}UJzHo!f7o4|Gi}F+ z!N+UU3iUHQBt0Ahw}M*RRd^FR0$|N;y@O=Z_y^N#K+B{uj7zZ1xGGI*jH`}%tmJ^~ zNNz}rycglZxz>THzfm&o&>W{o{hEe1mxa|aG(NJ)?zJKZG+M;R|H4slS42=XlTILz zbLzBBrR9*_A{eVYuv~Z!KzH99Qcjc((DA|*;?8*stFaj?i&PxEX1=!3bKAmBhEy<3 zc4+KJAgA1)PZ$dMcI3`V!LkAw=;Ri`tJ{|aQ~7jNe9Cg=s5y31Ep9PhJrGGnR}x1W zDokZyw!&5Ahp5+TRD;KYl0l^IX_8o+Qp8a5OIgH^tHmAZsK`_dQH`(F*((KWagUR2 zMk0bbJy6pZ`0kXn{k%o#JzuNHim7$1xuj630~VdZs4}9mHa6;3``VSqGzPp874Rru z(Gd_L)*cEVx!u8*0_fCApKw@Z4W+Oc+ALbyl~UJA1I12tlPq@XDycBpFcZ@PhVGRM z@c1j)8)%hW%`ScFj~x=YaH!Kwx~qYtTOCK_(kgtndI!bKbiOkOqJ5LzhP+X#m6zkN!g{Cd zo(~gReb-oeh%K?@Zj(OkM>{#)bFonT*8?R?O%_M~kKvn#uUj9zQ}_J@2!kHO4v-{{A zt35miR)-mePlj5FWcghUOv^_q$Vbra6i`q3AWl5{Zz!P@uuV696D3sB{QK2Hwf4nP zX`x#Fj7<$YR2>SQe=jhkhbf(K*6#E$tp@b4GfBe4#s7Le+|BNzbF2&MIUMTgAt#29 zdO3W4Y=MUZb9uty(7&Gp?w;_1tztNjGu~a~zo@fCILCOD@cvd>IN2l8845x2n3PXP zpGbPO|1RQnj0j?8SWN^rjGKo<|l4Z zR`B`H+7@a}QG^HRbLVlT*eRHAql~JS+`FVn&ey|r zQl#EmgA}1^$yoKQHjS0fdV;$M_l)V}=#5HewV|{|OYDC4LQBBZSz{>t)%>QXDY)uB zSy3ETGi<@Q7OYq(xa`>MU|l2%>F|J{-lD5DY;F*>AQ0gmb&NPdS77g&{B6Y9V_xMs ahi&S=@$WFJ{QnI*%#Qe1WB2?coBsl$pc#(< delta 3449 zcmbtX&2Jk;6c;5lwUg391NkD!cC40stY>%jb2g15q;LquRXLyn5=~>dj_u+m#@@ts z_{f3Y_z>-!5E4fOLPdfz7ybYgi5|F6H5C$6oC<;i5(nPwtamq#9i!y3dAsku-+S|$ zH@|T{sC~5b@%Urw?n;v0)Uy+F)s4Kgk*idTYpW?lFhNrBY6_(@ja=mlK`ebFu_V>6 zmsYE@^-^*5jT9=lZh2NwYPA}!>3FS@SBT>{iswaAJ%!YA9Z3!GHy)E}#j9>1g-n%T zoqGzoV!q%)EsJ0qKHU6wgbhEUU|wamTFzv1DO9fHs=3NW4#i{h@wuwoDCH!#Q3j8j ztGi0JT4lfYtZzwKC}&^;Nm-~zZEPc{l0q6bkpg+yVkHZSJjk)IBch0*Vyjb_MpPe5 z=cpa9R3Gas(mcWm+E1{doLx z51#<0KVA{WmrY~h#5s!($(#a1A|8BNqVv@W_4^Yg0Y*+Xgz@#scO58mK)hQ|1b9iN zJbAu}=`O%QqOzlI!ht_9dgfHXL7q(w^a*r2;1e=&LSc6Y`nOtokBEdu4X%HlmQbvB zI{&(DaRuRF#2{Gf6lYMU8An4g;q{}+q}wXUm4^l->{g~$C6VeRh5UpDm?ELBfhAgR zfJu4lyhz(@%3B-I8uS;}7PM zv3EqJ_r{9CcsQ2mmVIU1&)y#QYd@4m*viCni@aC=w8Eu&!7wqAO%>}Ku;+!Ofz6F1 zSS7d!;jdnR+aw*tY)TglxP@eRm@K1?7^bXZjVD;?z_H1&v>*d9O6zLki0 z`Au5swx~}|Uk?*sMl;RC1p6E<#KVQL-h|K8H*}bNn8=F2zY?cgPg={+NSqPV#JUU@ zw*?$fj{_AOB@I@}IkGuNBpn2W7La3sUxuToaoS1{Cld{mLK4U*+9^V`&a-2`q!|k69F z{Z;Mg{>>8Mz>ISxB}iiy>el!BR#0M!DYpOfWYJs0M-p=oCZnsca zy0+)xZvOa(l{Sdd$fiaN+E$zGmj$%Wmsjr=^U1rb*@v6;>eKT2Y&m~q^4|0xZ9Y6a z+uUExSaZLgZ|3WVdDsU&-t%*Iy_zkrJ~I4xHM`wt&L)9Gn{>DQu$f)m&(HRx;1d`9 zTQe)Kb2raj8b?0$ev(!bm;bJVxZIp|OW&N_ZnyVmr>BpPk4e{=tkyTDf@+v;PP_iS z^_v#Ietp-GY*wGvv-x|rm?z8m_VkZ`|Kn*lI7yT1?e%V(ezl-KW(L=%X?ogG2zx-5 zx1%%PzP_Hn-*iG&+xzMyI(_@P1AHcGt|hl_R^Q=$VF=w{-OOjJ#cKWLr2n>eCzH+X>QQ@cZm+Iak8e)=;jo7K#p!UdA#*#QeVDJ` zt*+Ln?qK)p`Q}51)V0%p+g?C#)>8HNSBp(hrA~ThUstP-sCJU4RqC@tbY^I?%L)vt zDF-7W&bh=DuF4OG9`BZrHfe3f7v%uScDy&BtZGfM<54?7mNdGv40Ckg1?wJ5ZKDb{mI)`KO~!N`j7W_ zi^bUz-}NJ|Y4u@#_FGhwf9>n!_aPYoDI&F#=U!cP$K}#jtup*a&50^J(67)>#UDhN)n4=q% zV;lIiNrGw^20jTQAKd`|K7v8Ihk;L%AfD0nj)26l0=aE{pxPH z<-K9oSi40qC>CQPks2F`(QdRCWw)pE|2mA_hQ@`s_DObh?^XmBZ+gUAeMC+-K9?@N zJ{)iTfQ_53{qXw!YI{3EJX8K!R!JE9dC!{YfWd6!f)cRv z>5XXB@9^u8>OHPxFK{J$nJY~#jM8dGfI~OUsdCh#$s&QGQIPfEEvylS@Hb-&$-bQ-#S086US^1IFcx8o z<&<%a@G7vziFnxIV%QN}ZO4v$gdN2ZcKDiYE37YKDGlzD;i^m%k9#-6G%hUDMQ zkn#nFlrJ;HITSX|u$^-S^g7OK^f`-*LPC^C3%t#NIhG2R3t7O6ce{f07djPae?!W8oJ{Gr!~fn@;EolvDXH85MuV6ZB?7Fo`#stKRg9BG@pRV1aTDM)53rH}@8~A)#Gi$%OB?G6N(%v}BkLgf>5hc2f*Oe? zV9E8(&^m-kSW7AhD%iPzpu!dlgb~4(6?kRL%-Sb7(y9TJGYXl;3=fvz%v-^a@DkA$ z8X3{MX6h*v^{i*2(-;Xg88~D(qFOk&D1JRKxvEvKVJHpaE=RO|Pu#Ux!$?N46Sv|R zG16BLWD_8#AOV8qB&Rz=Ogv#4g!6`CK!l!|kpU}s6A>j(W1@pgfqrq$#YUF>&LmUg zH}o^TW?7{tmL?_&GD}LagtlJ<#Sx3eb}5T~q#RNP4^~ndtrAui+=73Fie5EgwW1ws zf_^wH0}NWmQ-JlvPun8XM&7V<7V_NTCfcPs3K#x?oJjjgq8W&0P-q%HqK!R=4+UF? zRP;%XWP)wXO+9bNO>i(r?O3k2B2#<-PYD)WTedh+W|%VMHC`^TI7Vevh$1i_&SVd; z)kMweSR)d6eXEURS?9H&)UrTpRfPPu1>~<-o>Yfl002yW%g;h4kv{FDav)XZs74To&YDX-#xI_eopjF0(fJ0Fk;*O$5br93n+ zNbMDd12i2;dbl{+48NxF=2;JI0pddQG~Hr78U3DTe$Fcg=karUW`*Quy|SGn&JD?2 zF`-9y*BVN>&)=WaU3R9)xuuG8@GEW=Mhy2n&lEB>2WhHTr9Q+uI#n%*8Mv82G&pGc%JW0XYY zFpy~IbtF;6TCt^mb$n1^DzBe|Xd5$@{|Piruu}I;;#ZepBMxYmCD!GOCY_t+MML5DEe8nLS2t zjPjbwXun5&6p296@WzT7aNTb}8R^KClWR-kub;W@`Rup>>-YP@Tfg6D&r8p;FT7E< z3)t!atqmPDeY;RPvipu)?M|*5XxHw0fCZ}~WVid?RZ@F}(qH-<-d34hVkdb-hI1@j zBZIA5rRM213YQ{=y4{*sMS$fmICaYEFXo%vA5qpt(-f?$TMXjCDR}#7)(>HgqP>hu zLbQgNby;$3$5=2JW_E*nO(l}JhP-j&dbh?*~;z@X_Xw>d^DPTRiyf`4#=HPWuw~7^DRAf@+Cf|_6Fu)Hr zOMIe!i4ir7sAlpGS|W#|A`fXY_{e{T;u2f~J5Jp45=yFhf+$Xi-!09&DX{Pkv$z`4 zQ(!_7=2q+EqEwMmSu<3o@HR~4W`;d@iu9&sv1r?C4xCGOb2D0Na9m{c2bETp z24z8&eX|-`9o&Dw*~;%B>II<}Oe(k@L!vJxb zz)E_uSflMl*-Vl)h8Vx$K8Fx#1#?AwDE$b5MT-!T#sObqWL&;mg;ZR+p#sAtj>eu; ziZ@ajp48^J)!^omf9F|6wG~ROh*=?PXhskn^#jgw(Iz{5<_H*WokAHWaJIc5>d$;u zP%qIC3UGjtI$4zo5|t+w)4G9PE2k?>Rv$Gj(G^opHzk(B({0sKQ3gL%_>!XO(ia=m z)0E!$2^URInL$-qrE?WA^`Du6X_lf&j>wPAxH}D+$7bbuog*X45a6tvbskt4Xi^nM zJ9fppi<*)#HY>;rSru?EG>_@rz+>ZNAQEFxZ>t>wOsXOyt}n@It%S=MMp3yca4 z&|E)lq#We~m;2{oKP7^pCBgPEguqa2N7G}jl?DdEz1D&2G=t#E+dn5aki@@)^UyCL zIIDUE0MCdH9z79VhR3c1 zb#avDR)v zF%3>^ctcXZ%4A~tLt_YhJKlHHx>gO+9=6lXHMxb1r^ug)~ zfqA>dwv!?U?5m%$&+*ku7_*6d<{$>vD6?fNqYS*%j3J-;+tscNWMuOVoNZV_w%l;Z zAp?tyL!4KtpjcgRpj;Jlc~<+;DMKbI<&nc<6;F@omGGG3!y2V0nkiqR{t!>YnkMYY zAOoca+cYR#M9E~7Ebs&+yee?&)_v+JvA z8uQtYRoKQZuOuNAquc|jrPv(YkUGRM1!BYluPh!Zie3yOmGTjbRMQ@fT?^!NkKa_` zz#0ye+RKs>b}!9^gKfwRr2$HU6x$^YuFHwbmLcnn1FFp~^WOXb&sw zBAsr_W)Y*_Nw5%lIISua*`1i4rd$@|fh$E(Vx>*;c|3)x!B{kqyLuH^d(url=8dL+Ms?0tYm%>U=Ian`skFLnvU_)j zpj=HFgBnO)A{N5YBHK@81|dNYyNl6+LY`=o4Yy#N!qJ^O+e@w}s3E`m{fE>aO(Vh` z?0)uF4^Cj>72hQy9b!R$<5>asVoyE5LF(oV&$qj+=~iSB}AZP50&x(Ro@m z+N%ic-y(;|&BxkL@>uV{h0hd~KiG}?6aDLFfV+oO_%q^gd*y4@cU=3VdD1|+-Jha; z(+-ioA>{Z>t<ZYALb;Uj8O5X%}VTGG<4H@bEJ#U6)x>EMcqJub>bE2&%I~arU{9qaz6m)A&ps*H z12ClgSWU`vQ*@Yv<7}P=1y#X-c{DBAn*+g_ebW8EmY7@sPj+Rwjb)GuqvUmUpO>_i zykBWzLdDUN1SJR=pUn}ZEj8JrYAE;76KckV4Qr3(CjAtN5!2$d@h|5ld-DhAw12KM zUK;h>Pz}_u{hO16#42wKd&jbqy*c2Y*VT8Bom@6@x55l;o=->mRK#4w_mz(14Q^G* zNRIQdRAfiaP|~A^z?@@?JmCLHDx&-^lvh+v|Jf@f7AJwg-c(6cA+dx+(Y(1Z!iOw+ zdQ#jgBYljhf|aSu3o2D?*5oet(JZq1L)3Rwxyvo)>$`F1kq7C z(h_TE3FtZN3BNV|HTu}?>jaVbl7`hZyKP*zEgO{D4u~xTT49ZKaQx}e)f#}?j#{Ak UdLA;yRrSQQhd*$9;BUeH2NG0Rr2SV%w#Nf6{#6YyNBZk8`e5GNm; z+XA(#`GOUz<#UC#1kBoYDJBTjY86!#R4iu%$uJC|u?j&g0mV`cf;xM7GNP{3vxacai$_Xf=C=^IsI#*8T&4!bq zBAIzfih$R(#_2f8)yq8sVvfRI+B)(`8p{gNt;huRsveK2=VG6d6F{f zxcJ4PMU5_IS|JkIw#zvo(+O9+l(MreF9Mtz42_dmvXr4u;z819iUs`1pfW(l5T72J zkXs@54O~6E&>8sK!_fl)zvNo#4E&2rI1upb?qFx&zueM+fOm(w)OdLKV5RtcxJ!+} zkya^Awsk_|1lv17hWN81&kWEGz;Adnc>CxO8{9ftW`^h3vPv5zE|5lH585%#9_xnu z;jyPV#z>VJ$#EZkdnCmMgC2js$lIRF4C7Bvo*BE-SC}z1GlTya9qSi)ZHxo{Fji-P zPmOOHq&$7rAn9#ZmlxFQYgSgkANhv+WhzdrGJ>y7Tw})O=o9$Lq@NA8CxMS$@cnn6 zocO&-zQ?o2OU(Js@d7i16UDumF#hJmBWy4_wbC!kucl0f5t&|RhU28vZVWePt}^G} zXKKt?^YieZ{AjD~EF5wz>k3uhhN^2+ksSi-a8tA>GPtZq8k*eMFQV&vetHXx=68N0 z6xBdFLnErb{~OV+=%6N%FAoc-6O#qhWMVPubzW*LDS>?mG_ynzSi*8BwOztTYFn9$&l=WG_F%=1=z zcOLc%@&@=_ej!j{(SHZ7&r^-spxgStd|#jBY~!b{v(P)Ia?Ds)gzf|~jzr6%{Z72}p!uvsN7JnML$SU!c&bRrTIDvP=)6O(M zhq)45M1@}HV*)>(8v;+`KsKDH--*xm0(({B7(2pgydtZN>WeZzMoM*7flknr!lk8I zk;fxFkN9?kH?I)o Date: Thu, 20 Oct 2022 17:32:53 +0200 Subject: [PATCH 076/426] Use num_halfedges instead of 2*num_edges --- .../include/CGAL/Mean_curvature_flow_skeletonization.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index 3882180786a..aa86264e177 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -883,11 +883,9 @@ private: void compute_edge_weight() { m_edge_weight.clear(); - m_edge_weight.reserve(2 * num_edges(m_tmesh)); + m_edge_weight.reserve(num_halfedges(m_tmesh)); for(halfedge_descriptor hd : halfedges(m_tmesh)) - { m_edge_weight.push_back(m_weight_calculator(hd, m_tmesh, m_tmesh_point_pmap)); - } } /// Assemble the left hand side. From f4f6229c428e182fa59efb11e8a59901cab3cbc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:34:02 +0200 Subject: [PATCH 077/426] Weights examples/tests improvements --- Weights/examples/Weights/convergence.cpp | 1 - .../examples/Weights/weighted_laplacian.cpp | 46 +- Weights/test/Weights/include/utils.h | 611 +++++++++--------- Weights/test/Weights/include/wrappers.h | 250 ++++--- .../test/Weights/test_authalic_weights.cpp | 23 +- .../test_barycentric_region_weights.cpp | 43 +- .../test/Weights/test_cotangent_weights.cpp | 33 +- .../test_discrete_harmonic_weights.cpp | 40 +- .../Weights/test_inverse_distance_weights.cpp | 48 +- .../test/Weights/test_mean_value_weights.cpp | 32 +- .../test_mixed_voronoi_region_weights.cpp | 21 +- .../test/Weights/test_projected_weights.cpp | 8 +- Weights/test/Weights/test_shepard_weights.cpp | 50 +- Weights/test/Weights/test_tangent_weights.cpp | 23 +- .../test_three_point_family_weights.cpp | 37 +- .../test_triangular_region_weights.cpp | 21 +- .../Weights/test_uniform_region_weights.cpp | 25 +- Weights/test/Weights/test_uniform_weights.cpp | 27 +- .../Weights/test_voronoi_region_weights.cpp | 21 +- .../test/Weights/test_wachspress_weights.cpp | 40 +- 20 files changed, 783 insertions(+), 617 deletions(-) diff --git a/Weights/examples/Weights/convergence.cpp b/Weights/examples/Weights/convergence.cpp index 8cc85915531..83bb06ebe83 100644 --- a/Weights/examples/Weights/convergence.cpp +++ b/Weights/examples/Weights/convergence.cpp @@ -1,5 +1,4 @@ #include -#include #include // Typedefs. diff --git a/Weights/examples/Weights/weighted_laplacian.cpp b/Weights/examples/Weights/weighted_laplacian.cpp index bd44f1fb0ea..af3e4345b41 100644 --- a/Weights/examples/Weights/weighted_laplacian.cpp +++ b/Weights/examples/Weights/weighted_laplacian.cpp @@ -20,18 +20,18 @@ using HD = boost::graph_traits::halfedge_descriptor; template FT get_w_ij(const Mesh& mesh, const HD he, const PointMap pmap) { - const auto v0 = target(he, mesh); - const auto v1 = source(he, mesh); + const VD v0 = target(he, mesh); + const VD v1 = source(he, mesh); const auto& q = get(pmap, v0); // query const auto& p1 = get(pmap, v1); // neighbor j if (is_border_edge(he, mesh)) { - const auto he_cw = opposite(next(he, mesh), mesh); - auto v2 = source(he_cw, mesh); + const HD he_cw = opposite(next(he, mesh), mesh); + VD v2 = source(he_cw, mesh); if (is_border_edge(he_cw, mesh)) { - const auto he_ccw = prev(opposite(he, mesh), mesh); + const HD he_ccw = prev(opposite(he, mesh), mesh); v2 = source(he_ccw, mesh); const auto& p2 = get(pmap, v2); // neighbor jp @@ -42,10 +42,10 @@ FT get_w_ij(const Mesh& mesh, const HD he, const PointMap pmap) { } } - const auto he_cw = opposite(next(he, mesh), mesh); - const auto v2 = source(he_cw, mesh); - const auto he_ccw = prev(opposite(he, mesh), mesh); - const auto v3 = source(he_ccw, mesh); + const HD he_cw = opposite(next(he, mesh), mesh); + const VD v2 = source(he_cw, mesh); + const HD he_ccw = prev(opposite(he, mesh), mesh); + const VD v3 = source(he_ccw, mesh); const auto& p0 = get(pmap, v2); // neighbor jm const auto& p2 = get(pmap, v3); // neighbor jp @@ -56,14 +56,14 @@ template FT get_w_i(const Mesh& mesh, const VD v_i, const PointMap pmap) { FT A_i = 0.0; - const auto v0 = v_i; - const auto init = halfedge(v_i, mesh); - for (const auto& he : halfedges_around_target(init, mesh)) { + const VD v0 = v_i; + const HD init = halfedge(v_i, mesh); + for (const HD he : halfedges_around_target(init, mesh)) { assert(v0 == target(he, mesh)); if (is_border(he, mesh)) { continue; } - const auto v1 = source(he, mesh); - const auto v2 = target(next(he, mesh), mesh); + const VD v1 = source(he, mesh); + const VD v2 = target(next(he, mesh), mesh); const auto& p = get(pmap, v0); const auto& q = get(pmap, v1); @@ -81,14 +81,14 @@ void set_laplacian_matrix(const Mesh& mesh, Matrix& L) { // Precompute Voronoi areas. std::map w_i; - for (const auto& v_i : vertices(mesh)) { + for (const VD v_i : vertices(mesh)) { w_i[get(imap, v_i)] = get_w_i(mesh, v_i, pmap); } // Fill the matrix. - for (const auto& he : halfedges(mesh)) { - const auto vi = source(he, mesh); - const auto vj = target(he, mesh); + for (const HD he : halfedges(mesh)) { + const VD vi = source(he, mesh); + const VD vj = target(he, mesh); const std::size_t i = get(imap, vi); const std::size_t j = get(imap, vj); @@ -106,11 +106,11 @@ int main() { // Create mesh. Mesh mesh; - const auto v0 = mesh.add_vertex(Point_3(0, 2, 0)); - const auto v1 = mesh.add_vertex(Point_3(2, 2, 0)); - const auto v2 = mesh.add_vertex(Point_3(0, 0, 0)); - const auto v3 = mesh.add_vertex(Point_3(2, 0, 0)); - const auto v4 = mesh.add_vertex(Point_3(1, 1, 1)); + const VD v0 = mesh.add_vertex(Point_3(0, 2, 0)); + const VD v1 = mesh.add_vertex(Point_3(2, 2, 0)); + const VD v2 = mesh.add_vertex(Point_3(0, 0, 0)); + const VD v3 = mesh.add_vertex(Point_3(2, 0, 0)); + const VD v4 = mesh.add_vertex(Point_3(1, 1, 1)); mesh.add_face(v0, v2, v4); mesh.add_face(v2, v3, v4); mesh.add_face(v3, v1, v4); diff --git a/Weights/test/Weights/include/utils.h b/Weights/test/Weights/include/utils.h index bfbc8d78086..90afd589149 100644 --- a/Weights/test/Weights/include/utils.h +++ b/Weights/test/Weights/include/utils.h @@ -1,113 +1,177 @@ #ifndef CGAL_WEIGHTS_TESTS_UTILS_H #define CGAL_WEIGHTS_TESTS_UTILS_H -// STL includes. +#include + +#include +#include + #include #include #include #include #include -// CGAL includes. -#include -#include -#include +namespace CGAL { +namespace Weights { +namespace internal { + +template +typename Kernel::FT squared_distance(const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const Kernel traits; + auto squared_distance_2 = traits.compute_squared_distance_2_object(); + return squared_distance_2(p, q); +} + +template +typename Kernel::FT squared_distance(const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const Kernel traits; + auto squared_distance_3 = traits.compute_squared_distance_3_object(); + return squared_distance_3(p, q); +} + +template +typename Kernel::FT distance(const CGAL::Point_2& p, + const CGAL::Point_2& q) +{ + const Kernel traits; + return CGAL::Weights::internal::distance_2(p, q, traits); +} + +template +typename Kernel::FT distance(const CGAL::Point_3& p, + const CGAL::Point_3& q) +{ + const Kernel traits; + return CGAL::Weights::internal::distance_3(p, q, traits); +} + +template +typename Kernel::FT area(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const Kernel traits; + return CGAL::Weights::internal::positive_area_2(p, q, r, traits); +} + +template +typename Kernel::FT area(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const Kernel traits; + return CGAL::Weights::internal::positive_area_3(p, q, r, traits); +} + +template +typename Kernel::FT scalar_product(const CGAL::Point_2& p, + const CGAL::Point_2& q, + const CGAL::Point_2& r) +{ + const Kernel traits; + auto scalar_product_2 = traits.compute_scalar_product_2_object(); + auto vector_2 = traits.construct_vector_2_object(); + + const auto v1 = vector_2(q, r); + const auto v2 = vector_2(q, p); + return scalar_product_2(v1, v2); +} + +template +typename Kernel::FT scalar_product(const CGAL::Point_3& p, + const CGAL::Point_3& q, + const CGAL::Point_3& r) +{ + const Kernel traits; + auto scalar_product_3 = traits.compute_scalar_product_3_object(); + auto vector_3 = traits.construct_vector_3_object(); + + const auto v1 = vector_3(q, r); + const auto v2 = vector_3(q, p); + + return scalar_product_3(v1, v2); +} + +} // namespace internal +} // namespace Weights +} // namespace CGAL namespace tests { template -FT get_tolerance() { - return FT(1) / FT(10000000000); -} +FT get_tolerance() { return FT(1e-10); } template std::vector< std::array > -get_all_triangles() { - +get_all_triangles() +{ using Point_2 = typename Kernel::Point_2; - const std::array triangle0 = { - Point_2(-1, 0), Point_2(0, -1), Point_2(1, 0) - }; - const std::array triangle1 = { - Point_2(-2, 0), Point_2(0, -1), Point_2(2, 0) - }; - const std::array triangle2 = { - Point_2(-2, 0), Point_2(-2, -2), Point_2(2, 0) - }; - const std::array triangle3 = { - Point_2(-2, 0), Point_2(2, -2), Point_2(2, 0) - }; + + const std::array triangle0 = { Point_2(-1, 0), Point_2(0, -1), Point_2(1, 0) }; + const std::array triangle1 = { Point_2(-2, 0), Point_2(0, -1), Point_2(2, 0) }; + const std::array triangle2 = { Point_2(-2, 0), Point_2(-2, -2), Point_2(2, 0) }; + const std::array triangle3 = { Point_2(-2, 0), Point_2(2, -2), Point_2(2, 0) }; + return { triangle0, triangle1, triangle2, triangle3 }; } template std::vector< std::array > -get_symmetric_triangles() { - +get_symmetric_triangles() +{ using Point_2 = typename Kernel::Point_2; - const std::array triangle0 = { - Point_2(-1, 0), Point_2(0, -1), Point_2(1, 0) - }; - const std::array triangle1 = { - Point_2(-2, 0), Point_2(0, -1), Point_2(2, 0) - }; - const std::array triangle2 = { - Point_2(-3, 0), Point_2(0, -1), Point_2(3, 0) - }; + + const std::array triangle0 = { Point_2(-1, 0), Point_2(0, -1), Point_2(1, 0) }; + const std::array triangle1 = { Point_2(-2, 0), Point_2(0, -1), Point_2(2, 0) }; + const std::array triangle2 = { Point_2(-3, 0), Point_2(0, -1), Point_2(3, 0) }; + return { triangle0, triangle1, triangle2 }; } template std::vector< std::array > -get_uniform_triangles() { - +get_uniform_triangles() +{ using Point_2 = typename Kernel::Point_2; - const std::array triangle0 = { - Point_2(-1, 0), Point_2(0, -1), Point_2(1, 0) - }; - const std::array triangle1 = { - Point_2(-2, 0), Point_2(0, -2), Point_2(2, 0) - }; - const std::array triangle2 = { - Point_2(1, 0), Point_2(-1, 0), Point_2(-1, -2) - }; - const std::array triangle3 = { - Point_2(1, -2), Point_2(1, 0), Point_2(-1, 0) - }; + + const std::array triangle0 = { Point_2(-1, 0), Point_2(0, -1), Point_2(1, 0) }; + const std::array triangle1 = { Point_2(-2, 0), Point_2(0, -2), Point_2(2, 0) }; + const std::array triangle2 = { Point_2(1, 0), Point_2(-1, 0), Point_2(-1, -2) }; + const std::array triangle3 = { Point_2(1, -2), Point_2(1, 0), Point_2(-1, 0) }; + return { triangle0, triangle1, triangle2, triangle3 }; } template std::vector< std::vector > -get_all_polygons() { - +get_all_polygons() +{ using Point_2 = typename Kernel::Point_2; - const std::vector polygon0 = { - Point_2(-2, -2), Point_2(2, -2), Point_2(0, 2) - }; - const std::vector polygon1 = { - Point_2(-1, -1), Point_2(1, -1), Point_2(1, 1), Point_2(-1, 1) - }; - const std::vector polygon2 = { - Point_2(-2, 0), Point_2(0, -2), Point_2(2, 0), Point_2(0, 2) - }; - const std::vector polygon3 = { - Point_2(-2, -2), Point_2(2, -2), Point_2(2, 0), Point_2(0, 2), Point_2(-2, 0) - }; + + const std::vector polygon0 = { Point_2(-2, -2), Point_2(2, -2), Point_2(0, 2) }; + const std::vector polygon1 = { Point_2(-1, -1), Point_2(1, -1), Point_2(1, 1), Point_2(-1, 1) }; + const std::vector polygon2 = { Point_2(-2, 0), Point_2(0, -2), Point_2(2, 0), Point_2(0, 2) }; + const std::vector polygon3 = { Point_2(-2, -2), Point_2(2, -2), Point_2(2, 0), + Point_2(0, 2), Point_2(-2, 0) }; + return { polygon0, polygon1, polygon2, polygon3 }; } -template< -typename Kernel, -typename Weight_wrapper> -bool test_query( - const Weight_wrapper& wrapper, - const typename Kernel::Point_2& query, - const std::array& neighbors) { - +template +void test_query(const Weight_wrapper& wrapper, + const typename Kernel::Point_2& query, + const std::array& neighbors) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; + const FT tol = get_tolerance(); // 2D configuration. @@ -122,36 +186,28 @@ bool test_query( const Point_3 p3(p2.x(), p2.y(), 1); const Point_3 q3(q2.x(), q2.y(), 1); - const auto a2 = wrapper.weight_a(t2, r2, p2, q2); - const auto b2 = wrapper.weight_b(t2, r2, p2, q2); - CGAL_assertion(a2 >= FT(0) && b2 >= FT(0)); - if (a2 < FT(0) || b2 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a2 - b2) < tol); - if (CGAL::abs(a2 - b2) >= tol) return false; + const FT a2 = wrapper.weight_a(t2, r2, p2, q2); + const FT b2 = wrapper.weight_b(t2, r2, p2, q2); + assert(a2 >= FT(0) && b2 >= FT(0)); + assert(CGAL::abs(a2 - b2) < tol); - if (wrapper.supports_3d()) { - const auto a3 = wrapper.weight_a(t3, r3, p3, q3); - const auto b3 = wrapper.weight_b(t3, r3, p3, q3); - CGAL_assertion(a3 >= FT(0) && b3 >= FT(0)); - if (a3 < FT(0) || b3 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a3 - b3) < tol); - if (CGAL::abs(a3 - b3) >= tol) return false; - CGAL_assertion(CGAL::abs(a2 - a3) < tol); - CGAL_assertion(CGAL::abs(b2 - b3) < tol); - if (CGAL::abs(a2 - a3) >= tol) return false; - if (CGAL::abs(b2 - b3) >= tol) return false; + if (wrapper.supports_3d()) + { + const FT a3 = wrapper.weight_a(t3, r3, p3, q3); + const FT b3 = wrapper.weight_b(t3, r3, p3, q3); + assert(a3 >= FT(0) && b3 >= FT(0)); + assert(CGAL::abs(a3 - b3) < tol); + assert(CGAL::abs(a2 - a3) < tol); + assert(CGAL::abs(b2 - b3) < tol); } - return true; } -template< -typename Kernel, -typename Weight_wrapper> -bool test_symmetry_x( - const Weight_wrapper& wrapper, - const std::array& neighbors, - const typename Kernel::FT& x) { - +template +void test_symmetry_x(const Weight_wrapper& wrapper, + const std::array& neighbors, + const typename Kernel::FT& x) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -167,41 +223,34 @@ bool test_symmetry_x( const Point_3 r3(r2.x(), r2.y(), 1); const Point_3 p3(p2.x(), p2.y(), 1); - const auto a2 = wrapper.weight_a(t2, r2, p2, Point_2(-x, 0)); - const auto b2 = wrapper.weight_a(t2, r2, p2, Point_2(+x, 0)); - CGAL_assertion(a2 >= FT(0) && b2 >= FT(0)); - if (a2 < FT(0) || b2 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a2 - b2) < tol); - if (CGAL::abs(a2 - b2) >= tol) return false; + const FT a2 = wrapper.weight_a(t2, r2, p2, Point_2(-x, 0)); + const FT b2 = wrapper.weight_a(t2, r2, p2, Point_2(+x, 0)); + assert(a2 >= FT(0) && b2 >= FT(0)); + assert(CGAL::abs(a2 - b2) < tol); - if (wrapper.supports_3d()) { - const auto a3 = wrapper.weight_a(t3, r3, p3, Point_3(-x, 0, 1)); - const auto b3 = wrapper.weight_a(t3, r3, p3, Point_3(+x, 0, 1)); - CGAL_assertion(a3 >= FT(0) && b3 >= FT(0)); - if (a3 < FT(0) || b3 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a3 - b3) < tol); - if (CGAL::abs(a3 - b3) >= tol) return false; - CGAL_assertion(CGAL::abs(a2 - a3) < tol); - CGAL_assertion(CGAL::abs(b2 - b3) < tol); - if (CGAL::abs(a2 - a3) >= tol) return false; - if (CGAL::abs(b2 - b3) >= tol) return false; + if (wrapper.supports_3d()) + { + const FT a3 = wrapper.weight_a(t3, r3, p3, Point_3(-x, 0, 1)); + const FT b3 = wrapper.weight_a(t3, r3, p3, Point_3(+x, 0, 1)); + assert(a3 >= FT(0) && b3 >= FT(0)); + assert(CGAL::abs(a3 - b3) < tol); + assert(CGAL::abs(a2 - a3) < tol); + assert(CGAL::abs(b2 - b3) < tol); } - return true; } -template< -typename Kernel, -typename Weight_wrapper_1, -typename Weight_wrapper_2> -bool test_compare( - const Weight_wrapper_1& wrapper1, - const Weight_wrapper_2& wrapper2, - const typename Kernel::Point_2& query, - const std::array& neighbors) { - +template +void test_compare(const Weight_wrapper_1& wrapper1, + const Weight_wrapper_2& wrapper2, + const typename Kernel::Point_2& query, + const std::array& neighbors) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; + const FT tol = get_tolerance(); // 2D configuration. @@ -216,34 +265,29 @@ bool test_compare( const Point_3 p3(p2.x(), p2.y(), 1); const Point_3 q3(q2.x(), q2.y(), 1); - const auto a2 = wrapper1.weight_a(t2, r2, p2, q2); - const auto b2 = wrapper2.weight_a(t2, r2, p2, q2); - CGAL_assertion(a2 >= FT(0) && b2 >= FT(0)); - if (a2 < FT(0) || b2 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a2 - b2) < tol); - if (CGAL::abs(a2 - b2) >= tol) return false; + const FT a2 = wrapper1.weight_a(t2, r2, p2, q2); + const FT b2 = wrapper2.weight_a(t2, r2, p2, q2); + assert(a2 >= FT(0) && b2 >= FT(0)); + assert(CGAL::abs(a2 - b2) < tol); - if (wrapper1.supports_3d() && wrapper2.supports_3d()) { - const auto a3 = wrapper1.weight_a(t3, r3, p3, q3); - const auto b3 = wrapper2.weight_a(t3, r3, p3, q3); - CGAL_assertion(a3 >= FT(0) && b3 >= FT(0)); - if (a3 < FT(0) || b3 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a3 - b3) < tol); - if (CGAL::abs(a3 - b3) >= tol) return false; + if (wrapper1.supports_3d() && wrapper2.supports_3d()) + { + const FT a3 = wrapper1.weight_a(t3, r3, p3, q3); + const FT b3 = wrapper2.weight_a(t3, r3, p3, q3); + assert(a3 >= FT(0) && b3 >= FT(0)); + assert(CGAL::abs(a3 - b3) < tol); } - return true; } -template< -typename Kernel, -typename Weight_wrapper> -bool test_neighbors( - const Weight_wrapper& wrapper, - const std::array& neighbors) { - +template +void test_neighbors(const Weight_wrapper& wrapper, + const std::array& neighbors) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; + const FT tol = get_tolerance(); // 2D configuration. @@ -256,22 +300,17 @@ bool test_neighbors( const Point_3 q3(q2.x(), q2.y(), 1); const Point_3 r3(r2.x(), r2.y(), 1); - const auto a2 = wrapper.weight(p2, q2, r2); - const auto a3 = wrapper.weight(p3, q3, r3); - CGAL_assertion(a2 >= FT(0) && a3 >= FT(0)); - if (a2 < FT(0) || a3 < FT(0)) return false; - CGAL_assertion(CGAL::abs(a2 - a3) < tol); - if (CGAL::abs(a2 - a3) >= tol) return false; - return true; + const FT a2 = wrapper.weight(p2, q2, r2); + const FT a3 = wrapper.weight(p3, q3, r3); + assert(a2 >= FT(0) && a3 >= FT(0)); + assert(CGAL::abs(a2 - a3) < tol); } -template< -typename Kernel, -typename Weight_wrapper> -bool test_area( - const Weight_wrapper& wrapper, - const std::array& neighbors) { - +template +void test_area(const Weight_wrapper& wrapper, + const std::array& neighbors) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -286,129 +325,105 @@ bool test_area( const Point_3 q3(q2.x(), q2.y(), 1); const Point_3 r3(r2.x(), r2.y(), 1); - const auto a2 = wrapper.weight(p2, q2, r2); - const auto a3 = wrapper.weight(p3, q3, r3); - CGAL_assertion(a2 <= CGAL::Weights::area(p2, q2, r2)); - CGAL_assertion(a3 <= CGAL::Weights::area(p3, q3, r3)); - if (a2 > CGAL::Weights::area(p2, q2, r2)) return false; - if (a3 > CGAL::Weights::area(p3, q3, r3)) return false; - CGAL_assertion(a2 >= FT(0)); - CGAL_assertion(a3 >= FT(0)); - if (a2 < FT(0)) return false; - if (a3 < FT(0)) return false; - return true; + const FT a2 = wrapper.weight(p2, q2, r2); + const FT a3 = wrapper.weight(p3, q3, r3); + assert(a2 <= CGAL::Weights::internal::area(p2, q2, r2)); + assert(a3 <= CGAL::Weights::internal::area(p3, q3, r3)); + + assert(a2 >= FT(0)); + assert(a3 >= FT(0)); } template -bool test_coordinates( - const Point& query, - const std::vector& polygon, - const std::vector& weights) { - - CGAL_assertion(weights.size() > 0); - if (weights.size() == 0) return false; +void test_coordinates(const Point& query, + const std::vector& polygon, + const std::vector& weights) +{ + assert(weights.size() > 0); // Compute the sum of weights. const FT tol = get_tolerance(); FT sum = FT(0); - for (const FT& weight : weights) { + for (const FT& weight : weights) sum += weight; - } - CGAL_assertion(sum >= tol); - if (sum < tol) return false; + assert(sum >= tol); // Compute coordinates. std::vector coordinates; coordinates.reserve(weights.size()); - for (const FT& weight : weights) { + for (const FT& weight : weights) coordinates.push_back(weight / sum); - } - CGAL_assertion(coordinates.size() == weights.size()); - if (coordinates.size() != weights.size()) return false; + + assert(coordinates.size() == weights.size()); // Test partition of unity. sum = FT(0); - for (const FT& coordinate : coordinates) { + for (const FT& coordinate : coordinates) sum += coordinate; - } - CGAL_assertion(CGAL::abs(FT(1) - sum) < tol); - if (CGAL::abs(FT(1) - sum) >= tol) return false; + assert(CGAL::abs(FT(1) - sum) < tol); // Test linear precision. FT x = FT(0), y = FT(0); - for (std::size_t i = 0; i < polygon.size(); ++i) { + for (std::size_t i = 0; i < polygon.size(); ++i) + { x += coordinates[i] * polygon[i].x(); y += coordinates[i] * polygon[i].y(); } - CGAL_assertion(CGAL::abs(query.x() - x) < tol); - CGAL_assertion(CGAL::abs(query.y() - y) < tol); - if (CGAL::abs(query.x() - x) >= tol) return false; - if (CGAL::abs(query.y() - y) >= tol) return false; - return true; + assert(CGAL::abs(query.x() - x) < tol); + assert(CGAL::abs(query.y() - y) < tol); } -template< -typename Kernel, -typename Weight_wrapper> -bool test_on_polygon( - const Weight_wrapper& wrapper, - const typename Kernel::Point_2& query_2, - const std::vector& polygon_2) { - +template +void test_on_polygon(const Weight_wrapper& wrapper, + const typename Kernel::Point_2& query_2, + const std::vector& polygon_2) +{ // Get weights. using FT = typename Kernel::FT; - CGAL_assertion(polygon_2.size() >= 3); - if (polygon_2.size() < 3) return false; + assert(polygon_2.size() >= 3); // 2D version. std::vector weights_2; weights_2.reserve(polygon_2.size()); - wrapper.compute_on_polygon( - polygon_2, query_2, Kernel(), std::back_inserter(weights_2)); - CGAL_assertion(weights_2.size() == polygon_2.size()); - if (weights_2.size() != polygon_2.size()) return false; - if (!test_coordinates(query_2, polygon_2, weights_2)) return false; + wrapper.compute_on_polygon(polygon_2, query_2, Kernel(), std::back_inserter(weights_2)); + assert(weights_2.size() == polygon_2.size()); + test_coordinates(query_2, polygon_2, weights_2); // 3D version. using Point_3 = typename Kernel::Point_3; const Point_3 query_3(query_2.x(), query_2.y(), 1); std::vector polygon_3; polygon_3.reserve(polygon_2.size()); - for (const auto& vertex_2 : polygon_2) { - polygon_3.push_back(Point_3(vertex_2.x(), vertex_2.y(), 1)); - } - CGAL_assertion(polygon_3.size() == polygon_2.size()); - if (polygon_3.size() != polygon_2.size()) return false; - const CGAL::Projection_traits_xy_3 ptraits; + for (const auto& vertex_2 : polygon_2) + polygon_3.emplace_back(vertex_2.x(), vertex_2.y(), 1); + assert(polygon_3.size() == polygon_2.size()); + const CGAL::Projection_traits_xy_3 ptraits; std::vector weights_3; weights_3.reserve(polygon_3.size()); - wrapper.compute_on_polygon( - polygon_3, query_3, ptraits, std::back_inserter(weights_3)); - CGAL_assertion(weights_3.size() == polygon_3.size()); - if (weights_3.size() != polygon_3.size()) return false; - if (!test_coordinates(query_3, polygon_3, weights_3)) return false; - return true; + wrapper.compute_on_polygon(polygon_3, query_3, ptraits, std::back_inserter(weights_3)); + assert(weights_3.size() == polygon_3.size()); + + test_coordinates(query_3, polygon_3, weights_3); } -template< -typename Kernel, -typename Weight_wrapper> -bool test_barycentric_properties( - const Weight_wrapper& wrapper, - const typename Kernel::Point_2& query, - const std::vector& polygon) { - +template +void test_barycentric_properties(const Weight_wrapper& wrapper, + const typename Kernel::Point_2& query, + const std::vector& polygon) +{ // Get weights. using FT = typename Kernel::FT; const std::size_t n = polygon.size(); - CGAL_assertion(n >= 3); - if (n < 3) return false; + assert(n >= 3); // Check properties. std::vector weights; weights.reserve(n); - for (std::size_t i = 0; i < n; ++i) { + for (std::size_t i = 0; i < n; ++i) + { const std::size_t im = (i + n - 1) % n; const std::size_t ip = (i + 1) % n; const auto& t = polygon[im]; @@ -418,24 +433,20 @@ bool test_barycentric_properties( const FT weight = wrapper.weight_a(t, r, p, q); weights.push_back(weight); } - CGAL_assertion(weights.size() == n); - if (weights.size() != n) return false; - if (!test_coordinates(query, polygon, weights)) return false; - return true; + assert(weights.size() == n); + + test_coordinates(query, polygon, weights); } -template< -typename Kernel, -typename Weight_wrapper_1, -typename Weight_wrapper_2> -bool test_analytic_weight( - const Weight_wrapper_1& weight, - const Weight_wrapper_2& alternative) { - +template +void test_analytic_weight(const Weight_wrapper_1& weight, + const Weight_wrapper_2& alternative) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; - // Data. const FT q = FT(1) / FT(4); const FT h = FT(1) / FT(2); const FT t = FT(3) / FT(4); @@ -449,66 +460,59 @@ bool test_analytic_weight( // Test query points. auto configs = get_all_triangles(); - for (const auto& config : configs) { - if (!test_query(weight, zero, config)) return false; - for (const auto& query : queries) { - if (!test_query(weight, query, config)) return false; - } + for (const auto& config : configs) + { + test_query(weight, zero, config); + for (const auto& query : queries) + test_query(weight, query, config); } // Test alternative formulations. - for (const auto& config : configs) { - if (!test_compare(weight, alternative, zero, config)) { - return false; - } - for (const auto& query : queries) { - if (!test_compare(weight, alternative, query, config)) { - return false; - } - } + for (const auto& config : configs) + { + test_compare(weight, alternative, zero, config); + for (const auto& query : queries) + test_compare(weight, alternative, query, config); } // Test symmetry along x axis. configs = get_symmetric_triangles(); - for (const auto& config : configs) { - if (!test_symmetry_x(weight, config, q)) return false; - if (!test_symmetry_x(weight, config, h)) return false; - if (!test_symmetry_x(weight, config, t)) return false; + for (const auto& config : configs) + { + test_symmetry_x(weight, config, q); + test_symmetry_x(weight, config, h); + test_symmetry_x(weight, config, t); } // Test barycentric properties. - if (weight.is_barycentric()) { + if (weight.is_barycentric()) + { const auto polygons = get_all_polygons(); - for (const auto& polygon : polygons) { - if (!test_barycentric_properties(weight, zero, polygon)) { - return false; - } - for (const auto& query : queries) { - if (!test_barycentric_properties(weight, query, polygon)) { - return false; - } - } + for (const auto& polygon : polygons) + { + test_barycentric_properties(weight, zero, polygon); + for (const auto& query : queries) + test_barycentric_properties(weight, query, polygon); } } - return true; + + return; } -template< -typename Kernel, -typename Weight_wrapper_1, -typename Weight_wrapper_2> -bool test_barycentric_weight( - const Weight_wrapper_1& weight, - const Weight_wrapper_2& alternative) { - +template +void test_barycentric_weight(const Weight_wrapper_1& weight, + const Weight_wrapper_2& alternative) +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; - // Data. const FT q = FT(1) / FT(4); const FT h = FT(1) / FT(2); const Point_2 zero(0, 0); - const std::vector queries = { + const std::vector queries = + { Point_2(-h, 0), Point_2(+h, 0), Point_2(-q, 0), Point_2(+q, 0), Point_2( 0, -h), Point_2( 0, +h), Point_2( 0, -q), Point_2( 0, +q), Point_2(-h, -h), Point_2(+h, +h), Point_2(-q, -q), Point_2(+q, +q), @@ -516,40 +520,29 @@ bool test_barycentric_weight( }; // Test analytic formulations. - if (!test_analytic_weight(weight, alternative)) { - return false; - } + test_analytic_weight(weight, alternative); // Test on polygons. const auto polygons = get_all_polygons(); - for (const auto& polygon : polygons) { - if (!test_on_polygon(weight, zero, polygon)) return false; - for (const auto& query : queries) { - if (!test_on_polygon(weight, query, polygon)) { - return false; - } - } + for (const auto& polygon : polygons) + { + test_on_polygon(weight, zero, polygon); + for (const auto& query : queries) + test_on_polygon(weight, query, polygon); } - return true; } -template< -typename Kernel, -typename Weight_wrapper> -bool test_region_weight(const Weight_wrapper& weight) { - - // Test neighborhoods. +template +void test_region_weight(const Weight_wrapper& weight) +{ auto configs = get_all_triangles(); - for (const auto& config : configs) { - if (!test_neighbors(weight, config)) return false; - } + for (const auto& config : configs) + test_neighbors(weight, config); - // Test areas. configs = get_uniform_triangles(); - for (const auto& config : configs) { - if (!test_area(weight, config)) return false; - } - return true; + for (const auto& config : configs) + test_area(weight, config); } } // namespace tests diff --git a/Weights/test/Weights/include/wrappers.h b/Weights/test/Weights/include/wrappers.h index 9946236476a..9a6bdbbb653 100644 --- a/Weights/test/Weights/include/wrappers.h +++ b/Weights/test/Weights/include/wrappers.h @@ -1,261 +1,345 @@ #ifndef CGAL_WEIGHTS_TESTS_WRAPPERS_H #define CGAL_WEIGHTS_TESTS_WRAPPERS_H -// STL includes. +#include "utils.h" + +#include + #include #include -// CGAL includes. -#include - namespace wrappers { template -struct Authalic_wrapper { +struct Authalic_wrapper +{ using FT = typename Kernel::FT; + template - FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const { - return CGAL::Weights::authalic_weight(t, r, p, q); + FT weight_a(const Point& p0, const Point& p1, const Point& p2, const Point& q) const + { + return CGAL::Weights::authalic_weight(p0, p1, p2, q); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return - CGAL::Weights::half_authalic_weight( - CGAL::Weights::cotangent(t, r, q), - CGAL::Weights::squared_distance(q, r)) + - CGAL::Weights::half_authalic_weight( - CGAL::Weights::cotangent(q, r, p), - CGAL::Weights::squared_distance(q, r)); + FT weight_b(const Point& p0, const Point& p1, const Point& p2, const Point& q) const + { + return CGAL::Weights::half_authalic_weight(CGAL::Weights::cotangent(p0, p1, q), + CGAL::Weights::internal::squared_distance(q, p1)) + + CGAL::Weights::half_authalic_weight(CGAL::Weights::cotangent(q, p1, p2), + CGAL::Weights::internal::squared_distance(q, p1)); } + bool supports_3d() const { return true; } bool is_barycentric() const { return true; } }; template -struct Cotangent_wrapper { +struct Cotangent_wrapper +{ using FT = typename Kernel::FT; + template - FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const { - return CGAL::Weights::cotangent_weight(t, r, p, q); + FT weight_a(const Point& p0, const Point& p1, const Point& p2, const Point& q) const + { + return CGAL::Weights::cotangent_weight(p0, p1, p2, q); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return - CGAL::Weights::half_cotangent_weight( - CGAL::Weights::cotangent(q, t, r)) + - CGAL::Weights::half_cotangent_weight( - CGAL::Weights::cotangent(r, p, q)); + FT weight_b(const Point& p0, const Point& p1, const Point& p2, const Point& q) const + { + return CGAL::Weights::half_cotangent_weight(CGAL::Weights::cotangent(q, p0, p1)) + + CGAL::Weights::half_cotangent_weight(CGAL::Weights::cotangent(p1, p2, q)); } + bool supports_3d() const { return true; } bool is_barycentric() const { return true; } }; template -struct Tangent_wrapper { +struct Tangent_wrapper +{ using FT = typename Kernel::FT; + template - FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const + { return CGAL::Weights::tangent_weight(t, r, p, q); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return - CGAL::Weights::half_tangent_weight( - CGAL::Weights::distance(r, q), - CGAL::Weights::distance(t, q), - CGAL::Weights::area(r, q, t), - CGAL::Weights::scalar_product(r, q, t)) + - CGAL::Weights::half_tangent_weight( - CGAL::Weights::distance(r, q), - CGAL::Weights::distance(p, q), - CGAL::Weights::area(p, q, r), - CGAL::Weights::scalar_product(p, q, r)); + FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const + { + return CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), + CGAL::Weights::internal::distance(t, q), + CGAL::Weights::internal::area(r, q, t), + CGAL::Weights::internal::scalar_product(r, q, t)) + + CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), + CGAL::Weights::internal::distance(p, q), + CGAL::Weights::internal::area(p, q, r), + CGAL::Weights::internal::scalar_product(p, q, r)); } + bool supports_3d() const { return true; } bool is_barycentric() const { return true; } }; template -struct Wachspress_wrapper { +struct Wachspress_wrapper +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; - FT weight_a(const Point_2& t, const Point_2& r, const Point_2& p, const Point_2& q) const { - return CGAL::Weights::wachspress_weight(t, r, p, q); + + FT weight_a(const Point_2& p0, const Point_2& p1, const Point_2& p2, const Point_2& q) const + { + return CGAL::Weights::wachspress_weight(p0, p1, p2, q); } - FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { + + FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const + { return FT(-1); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return weight_a(t, r, p, q); + FT weight_b(const Point& p0, const Point& p1, const Point& p2, const Point& q) const + { + return weight_a(p0, p1, p2, q); } + template - void compute_on_polygon( - const Polygon& polygon, const Point& query, const Traits& traits, OutputIterator out) const { + void compute_on_polygon(const Polygon& polygon, + const Point& query, + const Traits& traits, + OutputIterator out) const + { CGAL::Weights::wachspress_weights_2(polygon, query, out, traits); } + bool supports_3d() const { return false; } bool is_barycentric() const { return true; } }; template -struct Discrete_harmonic_wrapper { +struct Discrete_harmonic_wrapper +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; - FT weight_a(const Point_2& t, const Point_2& r, const Point_2& p, const Point_2& q) const { - return CGAL::Weights::discrete_harmonic_weight(t, r, p, q); + + FT weight_a(const Point_2& p0, const Point_2& p1, const Point_2& p2, const Point_2& q) const + { + return CGAL::Weights::discrete_harmonic_weight(p0, p1, p2, q); } - FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { + + FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const + { return FT(-1); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return weight_a(t, r, p, q); + FT weight_b(const Point& p0, const Point& p1, const Point& p2, const Point& q) const + { + return weight_a(p0, p1, p2, q); } + template - void compute_on_polygon( - const Polygon& polygon, const Point& query, const Traits& traits, OutputIterator out) const { + void compute_on_polygon(const Polygon& polygon, + const Point& query, + const Traits& traits, + OutputIterator out) const + { CGAL::Weights::discrete_harmonic_weights_2(polygon, query, out, traits); } + bool supports_3d() const { return false; } bool is_barycentric() const { return true; } }; template -struct Mean_value_wrapper { +struct Mean_value_wrapper +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; - FT weight_a(const Point_2& t, const Point_2& r, const Point_2& p, const Point_2& q) const { + + FT weight_a(const Point_2& t, const Point_2& r, const Point_2& p, const Point_2& q) const + { return CGAL::Weights::mean_value_weight(t, r, p, q); } - FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { + + FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const + { return FT(-1); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const + { return weight_a(t, r, p, q); } + template - void compute_on_polygon( - const Polygon& polygon, const Point& query, const Traits& traits, OutputIterator out) const { + void compute_on_polygon(const Polygon& polygon, + const Point& query, + const Traits& traits, + OutputIterator out) const + { CGAL::Weights::mean_value_weights_2(polygon, query, out, traits); } + bool supports_3d() const { return false; } bool is_barycentric() const { return true; } }; template -struct Three_point_family_wrapper { +struct Three_point_family_wrapper +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; + const FT a; + Three_point_family_wrapper(const FT a) : a(a) { } - FT weight_a(const Point_2& t, const Point_2& r, const Point_2& p, const Point_2& q) const { + FT weight_a(const Point_2& t, const Point_2& r, const Point_2& p, const Point_2& q) const + { return CGAL::Weights::three_point_family_weight(t, r, p, q, a); } - FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const { + + FT weight_a(const Point_3&, const Point_3&, const Point_3&, const Point_3&) const + { return FT(-1); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const + { return weight_a(t, r, p, q); } + bool supports_3d() const { return false; } bool is_barycentric() const { return true; } }; template -struct Uniform_region_wrapper { +struct Uniform_region_wrapper +{ using FT = typename Kernel::FT; template - FT weight(const Point& p, const Point& q, const Point& r) const { + FT weight(const Point& p, const Point& q, const Point& r) const + { return CGAL::Weights::uniform_area(p, q, r); } }; template -struct Triangular_region_wrapper { +struct Triangular_region_wrapper +{ using FT = typename Kernel::FT; template - FT weight(const Point& p, const Point& q, const Point& r) const { + FT weight(const Point& p, const Point& q, const Point& r) const + { return CGAL::Weights::triangular_area(p, q, r); } }; template -struct Barycentric_region_wrapper { +struct Barycentric_region_wrapper +{ using FT = typename Kernel::FT; template - FT weight(const Point& p, const Point& q, const Point& r) const { + FT weight(const Point& p, const Point& q, const Point& r) const + { return CGAL::Weights::barycentric_area(p, q, r); } }; template -struct Voronoi_region_wrapper { +struct Voronoi_region_wrapper +{ using FT = typename Kernel::FT; template - FT weight(const Point& p, const Point& q, const Point& r) const { + FT weight(const Point& p, const Point& q, const Point& r) const + { return CGAL::Weights::voronoi_area(p, q, r); } }; template -struct Mixed_voronoi_region_wrapper { +struct Mixed_voronoi_region_wrapper +{ using FT = typename Kernel::FT; template - FT weight(const Point& p, const Point& q, const Point& r) const { + FT weight(const Point& p, const Point& q, const Point& r) const + { return CGAL::Weights::mixed_voronoi_area(p, q, r); } }; template -struct Uniform_wrapper { +struct Uniform_wrapper +{ using FT = typename Kernel::FT; + template - FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const + { return CGAL::Weights::uniform_weight(t, r, p, q); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const + { return weight_a(t, r, p, q); } + bool supports_3d() const { return true; } bool is_barycentric() const { return false; } }; template -struct Inverse_distance_wrapper { +struct Inverse_distance_wrapper +{ using FT = typename Kernel::FT; + template - FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const + { return CGAL::Weights::inverse_distance_weight(t, r, p, q); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const + { return weight_a(t, r, p, q); } + bool supports_3d() const { return true; } bool is_barycentric() const { return false; } }; template -struct Shepard_wrapper { +struct Shepard_wrapper +{ using FT = typename Kernel::FT; + const FT a; + Shepard_wrapper(const FT a) : a(a) { } + template - FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_a(const Point& t, const Point& r, const Point& p, const Point& q) const + { return CGAL::Weights::shepard_weight(t, r, p, q, a); } + template - FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { + FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const + { return weight_a(t, r, p, q); } + bool supports_3d() const { return true; } bool is_barycentric() const { return false; } }; diff --git a/Weights/test/Weights/test_authalic_weights.cpp b/Weights/test/Weights/test_authalic_weights.cpp index 1aa439a3523..68aa6553417 100644 --- a/Weights/test/Weights/test_authalic_weights.cpp +++ b/Weights/test/Weights/test_authalic_weights.cpp @@ -1,26 +1,29 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ const wrappers::Authalic_wrapper aut; const wrappers::Wachspress_wrapper whp; - return tests::test_analytic_weight(aut, whp); + const wrappers::Three_point_family_wrapper tpf(0); + tests::test_analytic_weight(aut, whp); + tests::test_analytic_weight(aut, tpf); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_authalic_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_barycentric_region_weights.cpp b/Weights/test/Weights/test_barycentric_region_weights.cpp index 49be26810bf..39dfebe8c39 100644 --- a/Weights/test/Weights/test_barycentric_region_weights.cpp +++ b/Weights/test/Weights/test_barycentric_region_weights.cpp @@ -1,25 +1,48 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ + using FT = typename Kernel::FT; + using Point_2 = typename Kernel::Point_2; + using Point_3 = typename Kernel::Point_3; + + const Point_2 p( 1, 0); + const Point_2 q( 0, 6); + const Point_2 r(-1, 0); + const FT w1 = CGAL::Weights::barycentric_area(p, q, r); + const FT w2 = CGAL::Weights::barycentric_area(r, p, q); + const FT w3 = CGAL::Weights::barycentric_area(q, r, p); + assert(w1 == FT(2)); // medians subdivide a triangle into 6 triangles of equal areas + assert(w1 == w2 && w2 == w3); + + const Point_3 s( 0, -1, 0); + const Point_3 t( 0, 0, 6); + const Point_3 u( 0, 1, 0); + const FT w4 = CGAL::Weights::barycentric_area(s, t, u); + const FT w5 = CGAL::Weights::barycentric_area(t, u, s); + const FT w6 = CGAL::Weights::barycentric_area(u, s, t); + assert(w4 == FT(2)); + assert(w4 == w5 && w5 == w6); + const wrappers::Barycentric_region_wrapper bar; - return tests::test_region_weight(bar); + tests::test_region_weight(bar); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_barycentric_region_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_cotangent_weights.cpp b/Weights/test/Weights/test_cotangent_weights.cpp index 962ed140c44..e1bcb98da72 100644 --- a/Weights/test/Weights/test_cotangent_weights.cpp +++ b/Weights/test/Weights/test_cotangent_weights.cpp @@ -1,26 +1,39 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ + using FT = typename Kernel::FT; + using Point_2 = typename Kernel::Point_2; + + const Point_2 p0(-2, 1); + const Point_2 p1( 0, 1); + const Point_2 p2( 0, 3); + const Point_2 q( -2, 3); + const FT w = CGAL::Weights::cotangent_weight(p0, p1, p2, q); + assert(w == FT(0)); + const wrappers::Cotangent_wrapper cot; const wrappers::Discrete_harmonic_wrapper dhw; - return tests::test_analytic_weight(cot, dhw); + const wrappers::Three_point_family_wrapper tpf(2); + tests::test_analytic_weight(cot, dhw); + tests::test_analytic_weight(cot, tpf); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_cotangent_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_discrete_harmonic_weights.cpp b/Weights/test/Weights/test_discrete_harmonic_weights.cpp index b49d7beac51..f358f412191 100644 --- a/Weights/test/Weights/test_discrete_harmonic_weights.cpp +++ b/Weights/test/Weights/test_discrete_harmonic_weights.cpp @@ -1,17 +1,17 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -19,36 +19,42 @@ void test_overloads() { const Point_2 r1( 0, -1); const Point_2 p1( 1, 0); const Point_2 q1( 0, 0); + const Point_3 t2(-1, 0, 1); const Point_3 r2( 0, -1, 1); const Point_3 p2( 1, 0, 1); const Point_3 q2( 0, 0, 1); + const FT a2 = CGAL::Weights::discrete_harmonic_weight(t1, r1, p1, q1); - const FT a3 = CGAL::Weights::internal::discrete_harmonic_weight(t2, r2, p2, q2); - assert(a2 >= FT(0)); - assert(a3 >= FT(0)); + const FT a3 = CGAL::Weights::discrete_harmonic_weight(t2, r2, p2, q2); + assert(a2 == FT(4)); + assert(a3 == FT(4)); assert(a2 == a3); + struct Traits : public Kernel { }; assert(CGAL::Weights::discrete_harmonic_weight(t1, r1, p1, q1, Traits()) == a2); - assert(CGAL::Weights::internal::discrete_harmonic_weight(t2, r2, p2, q2, Traits()) == a3); + assert(CGAL::Weights::discrete_harmonic_weight(t2, r2, p2, q2, Traits()) == a3); + CGAL::Projection_traits_xy_3 ptraits; const FT a23 = CGAL::Weights::discrete_harmonic_weight(t2, r2, p2, q2, ptraits); - assert(a23 >= FT(0)); - assert(a23 == a2 && a23 == a3); + assert(a23 == FT(4)); + assert(a23 == a2); } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Discrete_harmonic_wrapper dhw; const wrappers::Cotangent_wrapper cot; - return tests::test_barycentric_weight(dhw, cot); + tests::test_barycentric_weight(dhw, cot); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_discrete_harmonic_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_inverse_distance_weights.cpp b/Weights/test/Weights/test_inverse_distance_weights.cpp index a19dec04749..5cccd29824b 100644 --- a/Weights/test/Weights/test_inverse_distance_weights.cpp +++ b/Weights/test/Weights/test_inverse_distance_weights.cpp @@ -1,47 +1,53 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; const Point_2 p1(0, 0); - const Point_2 q1(1, 0); + const Point_2 q1(2, 0); const Point_3 p2(0, 0, 1); - const Point_3 q2(1, 0, 1); - const FT a2 = CGAL::Weights::inverse_distance_weight(p1, q1); - const FT a3 = CGAL::Weights::inverse_distance_weight(p2, q2); - assert(a2 == FT(1)); - assert(a3 == FT(1)); - assert(CGAL::Weights::inverse_distance_weight(p1, p1, q1, q1) == a2); - assert(CGAL::Weights::inverse_distance_weight(p2, p2, q2, q2) == a3); + const Point_3 q2(2, 0, 1); + + const FT w1 = CGAL::Weights::inverse_distance_weight(p1, q1); + const FT w2 = CGAL::Weights::inverse_distance_weight(p2, q2); + assert(w1 == FT(1) / FT(2)); + assert(w2 == FT(1) / FT(2)); + assert(CGAL::Weights::inverse_distance_weight(p1, p1, q1, q1) == w1); + assert(CGAL::Weights::inverse_distance_weight(p2, p2, q2, q2) == w2); + struct Traits : public Kernel { }; - assert(CGAL::Weights::inverse_distance_weight(p1, p1, q1, q1, Traits()) == a2); - assert(CGAL::Weights::inverse_distance_weight(p2, p2, q2, q2, Traits()) == a3); + assert(CGAL::Weights::inverse_distance_weight(p1, q1, Traits()) == w1); + assert(CGAL::Weights::inverse_distance_weight(p2, q2, Traits()) == w2); + assert(CGAL::Weights::inverse_distance_weight(p1, p1, q1, q1, Traits()) == w1); + assert(CGAL::Weights::inverse_distance_weight(p2, p2, q2, q2, Traits()) == w2); } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Inverse_distance_wrapper idw; const wrappers::Shepard_wrapper spw(1); - return tests::test_analytic_weight(idw, spw); + tests::test_analytic_weight(idw, spw); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_inverse_distance_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_mean_value_weights.cpp b/Weights/test/Weights/test_mean_value_weights.cpp index 883ff79d591..74ec6ffa4a5 100644 --- a/Weights/test/Weights/test_mean_value_weights.cpp +++ b/Weights/test/Weights/test_mean_value_weights.cpp @@ -1,17 +1,17 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -23,14 +23,16 @@ void test_overloads() { const Point_3 r2( 0, -1, 1); const Point_3 p2( 1, 0, 1); const Point_3 q2( 0, 0, 1); + const FT a2 = CGAL::Weights::mean_value_weight(t1, r1, p1, q1); - const FT a3 = CGAL::Weights::internal::mean_value_weight(t2, r2, p2, q2); + const FT a3 = CGAL::Weights::mean_value_weight(t2, r2, p2, q2); assert(a2 >= FT(0)); assert(a3 >= FT(0)); assert(a2 == a3); + struct Traits : public Kernel { }; assert(CGAL::Weights::mean_value_weight(t1, r1, p1, q1, Traits()) == a2); - assert(CGAL::Weights::internal::mean_value_weight(t2, r2, p2, q2, Traits()) == a3); + assert(CGAL::Weights::mean_value_weight(t2, r2, p2, q2, Traits()) == a3); CGAL::Projection_traits_xy_3 ptraits; const FT a23 = CGAL::Weights::mean_value_weight(t2, r2, p2, q2, ptraits); assert(a23 >= FT(0)); @@ -38,17 +40,21 @@ void test_overloads() { } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Mean_value_wrapper mvw; const wrappers::Tangent_wrapper tan; - return tests::test_barycentric_weight(mvw, tan); + const wrappers::Three_point_family_wrapper tpf(1); + tests::test_barycentric_weight(mvw, tan); + tests::test_barycentric_weight(mvw, tpf); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_mean_value_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_mixed_voronoi_region_weights.cpp b/Weights/test/Weights/test_mixed_voronoi_region_weights.cpp index 3c78f1f18a2..d0c6571d95e 100644 --- a/Weights/test/Weights/test_mixed_voronoi_region_weights.cpp +++ b/Weights/test/Weights/test_mixed_voronoi_region_weights.cpp @@ -1,25 +1,26 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ const wrappers::Mixed_voronoi_region_wrapper mix; - return tests::test_region_weight(mix); + tests::test_region_weight(mix); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_mixed_voronoi_region_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_projected_weights.cpp b/Weights/test/Weights/test_projected_weights.cpp index 96d01644499..874bc73d22b 100644 --- a/Weights/test/Weights/test_projected_weights.cpp +++ b/Weights/test/Weights/test_projected_weights.cpp @@ -1,18 +1,19 @@ #include #include #include + #include #include #include #include -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_kernel() { +void test_kernel() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -110,7 +111,8 @@ void test_kernel() { assert(CGAL::Weights::three_point_family_weight(t3, r3, p3, q3, 1, yz_traits) == ref_value); } -int main() { +int main(int, char**) +{ test_kernel(); test_kernel(); test_kernel(); diff --git a/Weights/test/Weights/test_shepard_weights.cpp b/Weights/test/Weights/test_shepard_weights.cpp index e178b574144..9806892d386 100644 --- a/Weights/test/Weights/test_shepard_weights.cpp +++ b/Weights/test/Weights/test_shepard_weights.cpp @@ -1,49 +1,55 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; + const Point_2 p1(0, 0); - const Point_2 q1(1, 0); + const Point_2 q1(2, 0); const Point_3 p2(0, 0, 1); - const Point_3 q2(1, 0, 1); - const FT a2 = CGAL::Weights::shepard_weight(p1, q1); - const FT a3 = CGAL::Weights::shepard_weight(p2, q2); - assert(a2 == FT(1)); - assert(a3 == FT(1)); - assert(CGAL::Weights::shepard_weight(p1, p1, q1, q1) == a2); - assert(CGAL::Weights::shepard_weight(p2, p2, q2, q2) == a3); + const Point_3 q2(2, 0, 1); + + const FT a2 = CGAL::Weights::shepard_weight(p1, q1, 3); + const FT a3 = CGAL::Weights::shepard_weight(p2, q2, 3); + assert(a2 == FT(1)/FT(8)); + assert(a3 == FT(1)/FT(8)); + + assert(CGAL::Weights::shepard_weight(p1, p1, q1, q1, 3) == a2); + assert(CGAL::Weights::shepard_weight(p2, p2, q2, q2, 3) == a3); + struct Traits : public Kernel { }; - assert(CGAL::Weights::shepard_weight(p1, p1, q1, q1, 1, Traits()) == a2); - assert(CGAL::Weights::shepard_weight(p2, p2, q2, q2, 1, Traits()) == a3); + assert(CGAL::Weights::shepard_weight(p1, p1, q1, q1, 3, Traits()) == a2); + assert(CGAL::Weights::shepard_weight(p2, p2, q2, q2, 3, Traits()) == a3); } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Shepard_wrapper spwa(1); const wrappers::Shepard_wrapper spwb(2); const wrappers::Inverse_distance_wrapper idw; - assert(tests::test_analytic_weight(spwa, idw)); - return tests::test_analytic_weight(spwb, spwb); + tests::test_analytic_weight(spwa, idw); + tests::test_analytic_weight(spwb, spwb); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_shepard_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_tangent_weights.cpp b/Weights/test/Weights/test_tangent_weights.cpp index 8fe08620ad7..aece71cb567 100644 --- a/Weights/test/Weights/test_tangent_weights.cpp +++ b/Weights/test/Weights/test_tangent_weights.cpp @@ -1,26 +1,29 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ const wrappers::Tangent_wrapper tan; const wrappers::Mean_value_wrapper mvw; - return tests::test_analytic_weight(tan, mvw); + const wrappers::Three_point_family_wrapper tpf(1); + tests::test_analytic_weight(tan, mvw); + tests::test_analytic_weight(tan, tpf); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_tangent_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_three_point_family_weights.cpp b/Weights/test/Weights/test_three_point_family_weights.cpp index e6ebfb0f64b..85f231b7eb0 100644 --- a/Weights/test/Weights/test_three_point_family_weights.cpp +++ b/Weights/test/Weights/test_three_point_family_weights.cpp @@ -1,17 +1,17 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -23,14 +23,16 @@ void test_overloads() { const Point_3 r2( 0, -1, 1); const Point_3 p2( 1, 0, 1); const Point_3 q2( 0, 0, 1); + const FT a2 = CGAL::Weights::three_point_family_weight(t1, r1, p1, q1); - const FT a3 = CGAL::Weights::internal::three_point_family_weight(t2, r2, p2, q2); + const FT a3 = CGAL::Weights::three_point_family_weight(t2, r2, p2, q2); assert(a2 >= FT(0)); assert(a3 >= FT(0)); assert(a2 == a3); + struct Traits : public Kernel { }; assert(CGAL::Weights::three_point_family_weight(t1, r1, p1, q1, 1, Traits()) == a2); - assert(CGAL::Weights::internal::three_point_family_weight(t2, r2, p2, q2, 1, Traits()) == a3); + assert(CGAL::Weights::three_point_family_weight(t2, r2, p2, q2, 1, Traits()) == a3); CGAL::Projection_traits_xy_3 ptraits; const FT a23 = CGAL::Weights::three_point_family_weight(t2, r2, p2, q2, 0, ptraits); assert(a23 >= FT(0)); @@ -38,7 +40,8 @@ void test_overloads() { } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); using FT = typename Kernel::FT; const FT h = FT(1) / FT(2); @@ -49,16 +52,18 @@ bool test_kernel() { const wrappers::Wachspress_wrapper whp; const wrappers::Mean_value_wrapper mvw; const wrappers::Discrete_harmonic_wrapper dhw; - assert(tests::test_analytic_weight(tpfa, whp)); - assert(tests::test_analytic_weight(tpfb, mvw)); - assert(tests::test_analytic_weight(tpfc, dhw)); - return tests::test_analytic_weight(tpfd, tpfd); + + tests::test_analytic_weight(tpfa, whp); + tests::test_analytic_weight(tpfb, mvw); + tests::test_analytic_weight(tpfc, dhw); + tests::test_analytic_weight(tpfd, tpfd); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_three_point_family_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_triangular_region_weights.cpp b/Weights/test/Weights/test_triangular_region_weights.cpp index c6bde65c492..bafdc2ed189 100644 --- a/Weights/test/Weights/test_triangular_region_weights.cpp +++ b/Weights/test/Weights/test_triangular_region_weights.cpp @@ -1,25 +1,26 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ const wrappers::Triangular_region_wrapper tri; - return tests::test_region_weight(tri); + tests::test_region_weight(tri); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_triangular_region_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_uniform_region_weights.cpp b/Weights/test/Weights/test_uniform_region_weights.cpp index 52124ede996..71d25a9a555 100644 --- a/Weights/test/Weights/test_uniform_region_weights.cpp +++ b/Weights/test/Weights/test_uniform_region_weights.cpp @@ -1,17 +1,17 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -20,22 +20,25 @@ void test_overloads() { const Point_3 q(0, 0, 0); assert(CGAL::Weights::uniform_area(p, p, p) == a); assert(CGAL::Weights::uniform_area(q, q, q) == a); + struct Traits : public Kernel { }; assert(CGAL::Weights::uniform_area(p, p, p, Traits()) == a); assert(CGAL::Weights::uniform_area(q, q, q, Traits()) == a); } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Uniform_region_wrapper uni; - return tests::test_region_weight(uni); + tests::test_region_weight(uni); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_uniform_region_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_uniform_weights.cpp b/Weights/test/Weights/test_uniform_weights.cpp index 68ae5af005c..00501f1f13d 100644 --- a/Weights/test/Weights/test_uniform_weights.cpp +++ b/Weights/test/Weights/test_uniform_weights.cpp @@ -1,41 +1,46 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; + const FT a = FT(1); const Point_2 p(0, 0); const Point_3 q(0, 0, 0); + assert(CGAL::Weights::uniform_weight(p, p, p, p) == a); assert(CGAL::Weights::uniform_weight(q, q, q, q) == a); + struct Traits : public Kernel { }; assert(CGAL::Weights::uniform_weight(p, p, p, p, Traits()) == a); assert(CGAL::Weights::uniform_weight(q, q, q, q, Traits()) == a); } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Uniform_wrapper uni; - return tests::test_analytic_weight(uni, uni); + tests::test_analytic_weight(uni, uni); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_uniform_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_voronoi_region_weights.cpp b/Weights/test/Weights/test_voronoi_region_weights.cpp index a0d6bcc43d4..7040392d029 100644 --- a/Weights/test/Weights/test_voronoi_region_weights.cpp +++ b/Weights/test/Weights/test_voronoi_region_weights.cpp @@ -1,25 +1,26 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -bool test_kernel() { +void test_kernel() +{ const wrappers::Voronoi_region_wrapper vor; - return tests::test_region_weight(vor); + tests::test_region_weight(vor); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_voronoi_region_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } diff --git a/Weights/test/Weights/test_wachspress_weights.cpp b/Weights/test/Weights/test_wachspress_weights.cpp index 75b43f46437..f370c383745 100644 --- a/Weights/test/Weights/test_wachspress_weights.cpp +++ b/Weights/test/Weights/test_wachspress_weights.cpp @@ -1,17 +1,17 @@ +#include "include/utils.h" +#include "include/wrappers.h" + #include #include #include -#include "include/utils.h" -#include "include/wrappers.h" - -// Typedefs. using SCKER = CGAL::Simple_cartesian; using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel; using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template -void test_overloads() { +void test_overloads() +{ using FT = typename Kernel::FT; using Point_2 = typename Kernel::Point_2; using Point_3 = typename Kernel::Point_3; @@ -23,32 +23,38 @@ void test_overloads() { const Point_3 r2( 0, -1, 1); const Point_3 p2( 1, 0, 1); const Point_3 q2( 0, 0, 1); + const FT a2 = CGAL::Weights::wachspress_weight(t1, r1, p1, q1); - const FT a3 = CGAL::Weights::internal::wachspress_weight(t2, r2, p2, q2); - assert(a2 >= FT(0)); - assert(a3 >= FT(0)); + const FT a3 = CGAL::Weights::wachspress_weight(t2, r2, p2, q2); + assert(a2 == FT(4)); + assert(a3 == FT(4)); assert(a2 == a3); + struct Traits : public Kernel { }; assert(CGAL::Weights::wachspress_weight(t1, r1, p1, q1, Traits()) == a2); - assert(CGAL::Weights::internal::wachspress_weight(t2, r2, p2, q2, Traits()) == a3); + assert(CGAL::Weights::wachspress_weight(t2, r2, p2, q2, Traits()) == a3); CGAL::Projection_traits_xy_3 ptraits; const FT a23 = CGAL::Weights::wachspress_weight(t2, r2, p2, q2, ptraits); - assert(a23 >= FT(0)); - assert(a23 == a2 && a23 == a3); + assert(a23 == FT(4)); + assert(a23 == a2); } template -bool test_kernel() { +void test_kernel() +{ test_overloads(); const wrappers::Wachspress_wrapper whp; const wrappers::Authalic_wrapper aut; - return tests::test_barycentric_weight(whp, aut); + const wrappers::Three_point_family_wrapper tpf(0); + tests::test_barycentric_weight(whp, aut); + tests::test_barycentric_weight(whp, tpf); } -int main() { - assert(test_kernel()); - assert(test_kernel()); - assert(test_kernel()); +int main(int, char**) +{ + test_kernel(); + test_kernel(); + test_kernel(); std::cout << "* test_wachspress_weights: SUCCESS" << std::endl; return EXIT_SUCCESS; } From 0640470f5d1253ddd3347053b1277cd0332b4d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:34:34 +0200 Subject: [PATCH 078/426] Hide pmp_weights_deprecated.h behind CGAL_NO_DEPRECATED_CODE --- Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h index fb44deac937..7a7cd14a4c2 100644 --- a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h +++ b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h @@ -19,6 +19,8 @@ "This part of the package is deprecated since the version 5.4 of CGAL!" #include +#ifndef CGAL_NO_DEPRECATED_CODE + // README: // This header collects all weights which have been in CGAL before unifying them // into the new package Weights. This header is for information purpose only. It From b9e7c2aa13b6312cf6e86538be6fb3eb28136cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Oct 2022 17:35:19 +0200 Subject: [PATCH 079/426] Misc minor fixes --- .../CGAL/Weights/internal/polygon_utils_2.h | 2 +- Weights/include/CGAL/Weights/internal/utils.h | 17 ++++++++++------- Weights/include/CGAL/Weights/uniform_weights.h | 5 +++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h index 361896fc105..8b2bb361673 100644 --- a/Weights/include/CGAL/Weights/internal/polygon_utils_2.h +++ b/Weights/include/CGAL/Weights/internal/polygon_utils_2.h @@ -114,7 +114,7 @@ Edge_case bounded_side_2(const VertexRange& polygon, const auto& currp = get(point_map, *curr); const auto& nextp = get(point_map, *next); - auto next_y_comp_res = compare_y_2(nextp, query); + Comparison_result next_y_comp_res = compare_y_2(nextp, query); switch (curr_y_comp_res) { case CGAL::SMALLER: switch (next_y_comp_res) { diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index f51136186b9..af5e3f27c91 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -191,17 +191,19 @@ double angle_3(const typename GeomTraits::Vector_3& v1, { auto dot_product_3 = traits.compute_scalar_product_3_object(); + const double product = CGAL::sqrt(to_double(scalar_product(v1,v1)) * to_double(scalar_product(v2,v2))); + if(product == 0.) + return 0.; + const double dot = CGAL::to_double(dot_product_3(v1, v2)); + const double costine = dot / product; - double angle_rad = 0.0; if (dot < -1.0) - angle_rad = std::acos(-1.0); + return std::acos(-1.0); else if (dot > 1.0) - angle_rad = std::acos(+1.0); + return std::acos(+1.0); else - angle_rad = std::acos(dot); - - return angle_rad; + return std::acos(dot); } // Rotates a 3D point around axis. @@ -441,7 +443,8 @@ typename GeomTraits::FT positive_area_2(const typename GeomTraits::Point_2& p, const typename GeomTraits::Point_2& r, const GeomTraits& traits) { - return CGAL::abs(area_2(traits, p, q, r)); + auto area_2 = traits.compute_area_2_object(); + return CGAL::abs(area_2(p, q, r)); } template diff --git a/Weights/include/CGAL/Weights/uniform_weights.h b/Weights/include/CGAL/Weights/uniform_weights.h index 541dd95937a..69d1cf2a288 100644 --- a/Weights/include/CGAL/Weights/uniform_weights.h +++ b/Weights/include/CGAL/Weights/uniform_weights.h @@ -86,7 +86,10 @@ typename GeomTraits::FT uniform_weight(const CGAL::Point_3& p0, return uniform_weight(p0, p1, p2, q, traits); } +/// \cond SKIP_IN_MANUAL + // Undocumented uniform weight class taking as input a polygon mesh. +// // It is currently used in: // Polygon_mesh_processing -> triangulate_hole_Polyhedron_3_test.cpp // Polygon_mesh_processing -> triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -102,6 +105,8 @@ public: double w_ij(halfedge_descriptor) { return 1.; } }; +/// \endcond + } // namespace Weights } // namespace CGAL From 0d00ad237b2e851488af4276184e1276f7eaf107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 00:05:20 +0200 Subject: [PATCH 080/426] Remove needless normalization calls --- Weights/include/CGAL/Weights/internal/utils.h | 19 +++++-------------- .../include/CGAL/Weights/tangent_weights.h | 4 ---- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index af5e3f27c91..483616d8254 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -191,19 +191,19 @@ double angle_3(const typename GeomTraits::Vector_3& v1, { auto dot_product_3 = traits.compute_scalar_product_3_object(); - const double product = CGAL::sqrt(to_double(scalar_product(v1,v1)) * to_double(scalar_product(v2,v2))); + const double product = CGAL::sqrt(to_double(dot_product_3(v1,v1) * dot_product_3(v2,v2))); if(product == 0.) return 0.; const double dot = CGAL::to_double(dot_product_3(v1, v2)); - const double costine = dot / product; + const double cosine = dot / product; - if (dot < -1.0) + if (cosine < -1.0) return std::acos(-1.0); - else if (dot > 1.0) + else if (cosine > 1.0) return std::acos(+1.0); else - return std::acos(dot); + return std::acos(cosine); } // Rotates a 3D point around axis. @@ -387,16 +387,10 @@ void flatten(const typename GeomTraits::Point_3& t, // prev neighbor/vertex/poin Vector_3 v1 = vector_3(q1, t1); Vector_3 v2 = vector_3(q1, p1); - normalize_3(v1, traits); - normalize_3(v2, traits); - // Two triangle normals. Vector_3 n1 = cross_product_3(v1, ax); Vector_3 n2 = cross_product_3(ax, v2); - normalize_3(n1, traits); - normalize_3(n2, traits); - // std::cout << "normal n1: " << n1 << std::endl; // std::cout << "normal n2: " << n2 << std::endl; @@ -474,12 +468,9 @@ typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, // Prev and next vectors. Vector_3 v1 = vector_3(b, a); Vector_3 v2 = vector_3(b, c); - normalize_3(v1, traits); - normalize_3(v2, traits); // Compute normal. Vector_3 normal = cross_product_3(v1, v2); - normalize_3(normal, traits); // Compute orthogonal base vectors. Vector_3 b1, b2; diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index afa64e2da90..6f31b0b1c6c 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -123,10 +123,6 @@ typename GeomTraits::FT tangent_weight_v2(const typename GeomTraits::Point_3& p0 const FT l2 = internal::length_3(v, traits); - internal::normalize_3(v0, traits); - internal::normalize_3(v, traits); - internal::normalize_3(v2, traits); - const double ha_rad_1 = internal::angle_3(v0, v, traits) / 2.0; const double ha_rad_2 = internal::angle_3(v, v2, traits) / 2.0; const FT t0 = static_cast(std::tan(ha_rad_1)); From 6a5f099f4191455ca72ec9dc41afa3beac58644d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 00:05:30 +0200 Subject: [PATCH 081/426] Add a test --- .../test/Weights/test_voronoi_region_weights.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Weights/test/Weights/test_voronoi_region_weights.cpp b/Weights/test/Weights/test_voronoi_region_weights.cpp index 7040392d029..49b0fe672af 100644 --- a/Weights/test/Weights/test_voronoi_region_weights.cpp +++ b/Weights/test/Weights/test_voronoi_region_weights.cpp @@ -12,6 +12,22 @@ using EPECK = CGAL::Exact_predicates_exact_constructions_kernel; template void test_kernel() { + using FT = typename Kernel::FT; + using Point_2 = typename Kernel::Point_2; + using Point_3 = typename Kernel::Point_3; + + const Point_2 p( 2, 0); + const Point_2 q( 0, 2); + const Point_2 r(-2, 0); + const FT w1 = CGAL::Weights::voronoi_area(p, q, r); + assert(w1 == FT(2)); + + const Point_3 s( 0, -2, 0); + const Point_3 t( 0, 0, 2); + const Point_3 u( 0, 2, 0); + const FT w4 = CGAL::Weights::voronoi_area(s, t, u); + assert(w4 == FT(2)); + const wrappers::Voronoi_region_wrapper vor; tests::test_region_weight(vor); } From 6a694366f035e422a7fcc45199b5914dd76bf872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 10:34:07 +0200 Subject: [PATCH 082/426] Remove trailing whitespace --- Weights/test/Weights/include/wrappers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Weights/test/Weights/include/wrappers.h b/Weights/test/Weights/include/wrappers.h index 9a6bdbbb653..2566a219a6c 100644 --- a/Weights/test/Weights/include/wrappers.h +++ b/Weights/test/Weights/include/wrappers.h @@ -245,7 +245,7 @@ struct Triangular_region_wrapper }; template -struct Barycentric_region_wrapper +struct Barycentric_region_wrapper { using FT = typename Kernel::FT; template From 82c0d0686e0f73a8ec9c85691b384f363a97c8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 11:23:36 +0200 Subject: [PATCH 083/426] Add missing typedef --- Weights/include/CGAL/Weights/internal/utils.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 483616d8254..744af8be2d3 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -448,6 +448,7 @@ typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Point_2 = typename GeomTraits::Point_2; using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; From b0c183fc3d90ee04400a7a6e6f6586e725987c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 12:07:12 +0200 Subject: [PATCH 084/426] Add missing typedef --- Weights/include/CGAL/Weights/tangent_weights.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 6f31b0b1c6c..2ec910d67e2 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -235,6 +235,7 @@ typename GeomTraits::FT half_tangent_weight(const typename GeomTraits::Point_2& const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Vector_2 = typename GeomTraits::Vector_2; auto vector_2 = traits.construct_vector_2_object(); auto dot_product_2 = traits.compute_scalar_product_2_object(); From 8d7669d559d543c9e7251a7b3bf8d023a74b9979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 12:15:03 +0200 Subject: [PATCH 085/426] Test alternate API + add missing typedef --- Weights/include/CGAL/Weights/tangent_weights.h | 1 + Weights/test/Weights/include/wrappers.h | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Weights/include/CGAL/Weights/tangent_weights.h b/Weights/include/CGAL/Weights/tangent_weights.h index 2ec910d67e2..7788a961218 100644 --- a/Weights/include/CGAL/Weights/tangent_weights.h +++ b/Weights/include/CGAL/Weights/tangent_weights.h @@ -259,6 +259,7 @@ typename GeomTraits::FT half_tangent_weight(const typename GeomTraits::Point_3& const GeomTraits& traits) { using FT = typename GeomTraits::FT; + using Vector_3 = typename GeomTraits::Vector_3; auto vector_3 = traits.construct_vector_3_object(); auto dot_product_3 = traits.compute_scalar_product_3_object(); diff --git a/Weights/test/Weights/include/wrappers.h b/Weights/test/Weights/include/wrappers.h index 2566a219a6c..94138e735df 100644 --- a/Weights/test/Weights/include/wrappers.h +++ b/Weights/test/Weights/include/wrappers.h @@ -70,10 +70,7 @@ struct Tangent_wrapper template FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), - CGAL::Weights::internal::distance(t, q), - CGAL::Weights::internal::area(r, q, t), - CGAL::Weights::internal::scalar_product(r, q, t)) + + return CGAL::Weights::half_tangent_weight(r, q, t, Kernel()) + CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), CGAL::Weights::internal::distance(p, q), CGAL::Weights::internal::area(p, q, r), From 4d4bf04b835849a4735a28833a3b722c1a5f78b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 12:47:52 +0200 Subject: [PATCH 086/426] Fix constructor of Mean_curvature_flow_skeletonization + weight API --- .../CGAL/Mean_curvature_flow_skeletonization.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index aa86264e177..43a6a41ceb6 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -223,7 +223,7 @@ public: typedef typename boost::graph_traits::edge_iterator edge_iterator; // Get weight from the weight interface. - typedef CGAL::Weights::Cotangent_weight Weight_calculator; + typedef CGAL::Weights::Cotangent_weight Weight_calculator; typedef internal::Curve_skeleton Vertex_pair; std::vector v2v; copy_face_graph(tmesh, m_tmesh, - CGAL::parameters::vertex_to_vertex_output_iterator(std::back_inserter(v2v))); + CGAL::parameters::vertex_to_vertex_output_iterator(std::back_inserter(v2v)) + .vertex_point_map(vpm)); // copy input vertices to keep correspondence for(const Vertex_pair& vp : v2v) From bd83e152e3f85642539792feb1f18bc2b812c761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 13:52:55 +0200 Subject: [PATCH 087/426] Fix initialization and usage of Weights in skeletonization --- .../include/CGAL/Mean_curvature_flow_skeletonization.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index 43a6a41ceb6..58e8e0b4d43 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -371,7 +371,11 @@ public: Mean_curvature_flow_skeletonization(const TriangleMesh& tmesh, VertexPointMap vertex_point_map, const Traits& traits = Traits()) - : m_traits(traits), m_weight_calculator(tmesh, vertex_point_map, traits, true /* use_clamped_version */) + : + m_tmesh(), + m_tmesh_point_pmap(get(CGAL::vertex_point, m_tmesh)), + m_traits(traits), + m_weight_calculator(m_tmesh, m_tmesh_point_pmap, m_traits, true /* use_clamped_version */) { init(tmesh, vertex_point_map); } @@ -884,7 +888,7 @@ private: m_edge_weight.clear(); m_edge_weight.reserve(num_halfedges(m_tmesh)); for(halfedge_descriptor hd : halfedges(m_tmesh)) - m_edge_weight.push_back(m_weight_calculator(hd, m_tmesh, m_tmesh_point_pmap)); + m_edge_weight.push_back(m_weight_calculator(hd)); } /// Assemble the left hand side. From 88b3d0ab88731588dbdf770c14848913131a5320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 21 Oct 2022 14:32:42 +0200 Subject: [PATCH 088/426] Fix compilation --- Weights/include/CGAL/Weights/cotangent_weights.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index 93413b7cb24..d462c3f5174 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -338,7 +338,7 @@ private: (CGAL::angle(p2, p1, p0) == CGAL::OBTUSE) || (CGAL::angle(p0, p2, p1) == CGAL::OBTUSE)) { - const FT A = internal::positive_area_3(m_traits, p0, p1, p2); + const FT A = internal::positive_area_3(p0, p1, p2, m_traits); if (angle0 == CGAL::OBTUSE) voronoi_area += A / FT(2); else From e99f4428303c82b66a5e93979991081e45c40588 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 25 Oct 2022 11:59:59 +0200 Subject: [PATCH 089/426] NP_helper::has_normal_map should not always return true look for a normal_map in the point set, and in the named parameters # Conflicts: # BGL/include/CGAL/boost/graph/named_params_helper.h # Point_set_processing_3/include/CGAL/jet_estimate_normals.h --- .../CGAL/boost/graph/named_params_helper.h | 6 +++--- Point_set_3/include/CGAL/Point_set_3.h | 16 +++++++++++----- .../include/CGAL/IO/read_off_points.h | 7 +++---- .../include/CGAL/IO/read_ply_points.h | 9 +++------ .../include/CGAL/IO/read_xyz_points.h | 7 +++---- .../include/CGAL/IO/write_off_points.h | 2 +- .../include/CGAL/IO/write_ply_points.h | 2 +- .../include/CGAL/IO/write_xyz_points.h | 2 +- .../include/CGAL/bilateral_smooth_point_set.h | 2 +- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- .../include/CGAL/jet_estimate_normals.h | 2 +- .../include/CGAL/mst_orient_normals.h | 2 +- .../include/CGAL/pca_estimate_normals.h | 2 +- .../include/CGAL/scanline_orient_normals.h | 2 +- .../include/CGAL/structure_point_set.h | 2 +- .../include/CGAL/vcm_estimate_normals.h | 2 +- 16 files changed, 34 insertions(+), 33 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 4399e555143..e80cae78072 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -336,10 +336,10 @@ struct Point_set_processing_3_np_helper return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map() + static constexpr bool has_normal_map(const PointRange&, const NamedParameters&) { - return !boost::is_same< typename internal_np::Get_param::type, - internal_np::Param_not_found> ::value; + using CGAL::parameters::is_default_parameter; + return !(is_default_parameter::value); } }; diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 74b731a0d31..66f86d0ed04 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -219,11 +219,9 @@ public: added. If `false` (default value), the normal map can still be added later on (see `add_normal_map()`). */ - Point_set_3 (bool with_normal_map = false) : m_base() + Point_set_3 () : m_base() { clear(); - if (with_normal_map) - add_normal_map(); } /*! @@ -1341,11 +1339,17 @@ struct Point_set_processing_3_np_helper, NamedParamet static const Normal_map get_normal_map(const Point_set_3& ps, const NamedParameters& np) { + CGAL_assertion_code( + if (!(parameters::is_default_parameter::value))) + CGAL_assertion(!!ps.normal_map()); return parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map), ps.normal_map()); } static Normal_map get_normal_map(Point_set_3& ps, const NamedParameters& np) { + CGAL_assertion_code( + if (!(parameters::is_default_parameter::value))) + CGAL_assertion(!!ps.normal_map()); return parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map), ps.normal_map()); } @@ -1354,9 +1358,11 @@ struct Point_set_processing_3_np_helper, NamedParamet return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map() + static constexpr bool has_normal_map(const Point_set_3& ps, const NamedParameters& np) { - return true; + using CGAL::parameters::is_default_parameter; + const bool np_has_normals = !(is_default_parameter::value); + return np_has_normals || !!ps.normal_map(); } }; diff --git a/Point_set_processing_3/include/CGAL/IO/read_off_points.h b/Point_set_processing_3/include/CGAL/IO/read_off_points.h index 783fd20c1fc..7ef015cc018 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_off_points.h @@ -98,8 +98,8 @@ bool read_OFF(std::istream& is, typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - bool has_normals = NP_helper::has_normal_map(); - + //the default value for normal map, if not provided in the np, + // is a dummy Constant_property_map PointMap point_map = NP_helper::get_point_map(np); NormalMap normal_map = NP_helper::get_normal_map(np); @@ -183,8 +183,7 @@ bool read_OFF(std::istream& is, Enriched_point pwn; put(point_map, pwn, point); // point_map[&pwn] = point - if (has_normals) - put(normal_map, pwn, normal); // normal_map[&pwn] = normal + put(normal_map, pwn, normal); // normal_map[&pwn] = normal *output++ = pwn; ++pointsRead; diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index 1a0f7ed547b..5a38b4fd034 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -258,17 +258,14 @@ bool read_PLY(std::istream& is, typedef typename NP_helper::Point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(); - + //the default value for normal map, if not provided in the np, + // is a dummy Constant_property_map PointMap point_map = NP_helper::get_point_map(np); NormalMap normal_map = NP_helper::get_normal_map(np); - if(has_normals) - return read_PLY_with_properties(is, output, + return read_PLY_with_properties(is, output, make_ply_point_reader(point_map), make_ply_normal_reader(normal_map)); - // else - return read_PLY_with_properties(is, output, make_ply_point_reader(point_map)); } /** diff --git a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h index 793c7e2e85f..d2a7f178992 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h @@ -90,8 +90,8 @@ bool read_XYZ(std::istream& is, typedef typename NP_helper::Normal_map NormalMap; typedef typename NP_helper::Geom_traits Kernel; - bool has_normals = NP_helper::has_normal_map(); - + //the default value for normal map, if not provided in the np, + // is a dummy Constant_property_map PointMap point_map = NP_helper::get_point_map(np); NormalMap normal_map = NP_helper::get_normal_map(np); @@ -156,8 +156,7 @@ bool read_XYZ(std::istream& is, Enriched_point pwn; put(point_map, pwn, point); // point_map[pwn] = point - if (has_normals) - put(normal_map, pwn, normal); // normal_map[pwn] = normal + put(normal_map, pwn, normal); // normal_map[pwn] = normal *output++ = pwn; continue; diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index f89ca2a28c0..2fb38456379 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -46,7 +46,7 @@ bool write_OFF_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - const bool has_normals = !(is_default_parameter::value); + bool has_normals = NP_helper::has_normal_map(points, np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index 38b361ff779..d151871a541 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -201,7 +201,7 @@ bool write_PLY(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(); + bool has_normals = NP_helper::has_normal_map(points, np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index 73610c9545f..b98ebb247df 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -47,7 +47,7 @@ bool write_XYZ_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(); + bool has_normals = NP_helper::has_normal_map(points, np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 86fa5d23b19..5c1d2d7cf25 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -278,7 +278,7 @@ bilateral_smooth_point_set( typedef typename Kernel::Point_3 Point_3; typedef typename Kernel::Vector_3 Vector_3; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); typedef typename Kernel::FT FT; diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 507418d45b8..7bcb43eaf8f 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -367,7 +367,7 @@ edge_aware_upsample_point_set( typedef typename NP_helper::Geom_traits Kernel; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index da74d6e93ee..092c479c53d 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -196,7 +196,7 @@ jet_estimate_normals( typedef typename Kernel::FT FT; typedef typename GetSvdTraits::type SvdTraits; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index 909dc37a63d..18be66609e5 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -631,7 +631,7 @@ mst_orient_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetIsConstrainedMap::type ConstrainedMap; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index 8447ae952ff..9c4f5cde3e6 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -168,7 +168,7 @@ pca_estimate_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index 02f956f2416..272ce021158 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa ::type; using Fallback_scanline_ID = Boolean_tag::value>; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index f0a9fc34c86..5930d4b08f0 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneMap::type PlaneMap; typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); CGAL_static_assertion_msg((!is_default_parameter::value), "Error: no plane index map"); diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index 5b69f3ef0f9..de0c26d68f6 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename GetDiagonalizeTraits::type DiagonalizeTraits; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); From 0ee5493f02101f802f400dabff6feee3a024fe52 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 25 Oct 2022 12:53:39 +0200 Subject: [PATCH 090/426] revert unintended change --- Point_set_3/include/CGAL/Point_set_3.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 66f86d0ed04..dbf00b0182b 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -219,9 +219,11 @@ public: added. If `false` (default value), the normal map can still be added later on (see `add_normal_map()`). */ - Point_set_3 () : m_base() + Point_set_3 (bool with_normal_map = false) : m_base() { clear(); + if (with_normal_map) + add_normal_map(); } /*! From 95dd353904417f9f007f31a43718f712a624546d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 27 Oct 2022 18:06:55 +0200 Subject: [PATCH 091/426] transform cell_selector into a property map to be consistent with doc --- ...tetrahedral_remeshing_of_one_subdomain.cpp | 26 +++++++++++++---- .../internal/smooth_vertices.h | 2 +- .../tetrahedral_adaptive_remeshing_impl.h | 29 +------------------ .../internal/tetrahedral_remeshing_helpers.h | 12 ++++---- .../include/CGAL/tetrahedral_remeshing.h | 17 ++++++----- 5 files changed, 38 insertions(+), 48 deletions(-) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp index ec9f56138e0..097b7955fb5 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/tetrahedral_remeshing_of_one_subdomain.cpp @@ -10,19 +10,34 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Tetrahedral_remeshing::Remeshing_triangulation_3 Remeshing_triangulation; -struct Cells_of_subdomain +template +struct Cells_of_subdomain_pmap { private: + using Cell_handle = typename Tr::Cell_handle; + const int m_subdomain; public: - Cells_of_subdomain(const int& subdomain) + using key_type = Cell_handle; + using value_type = bool; + using reference = bool; + using category = boost::read_write_property_map_tag; + + Cells_of_subdomain_pmap(const int& subdomain) : m_subdomain(subdomain) {} - bool operator()(Remeshing_triangulation::Cell_handle c) const + friend value_type get(const Cells_of_subdomain_pmap& map, + const key_type& c) { - return m_subdomain == c->subdomain_index(); + return (map.m_subdomain == c->subdomain_index()); + } + friend void put(Cells_of_subdomain_pmap&, + const key_type&, + const value_type) + { + ; //nothing to do : subdomain indices are updated in remeshing } }; @@ -35,7 +50,8 @@ int main(int argc, char* argv[]) CGAL::Tetrahedral_remeshing::generate_input_two_subdomains(nbv, tr); CGAL::tetrahedral_isotropic_remeshing(tr, target_edge_length, - CGAL::parameters::cell_is_selected_map(Cells_of_subdomain(2))); + CGAL::parameters::cell_is_selected_map( + Cells_of_subdomain_pmap(2))); return EXIT_SUCCESS; } diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index 7c784af9820..ed60e69495c 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -451,7 +451,7 @@ public: inc_cells(nbv, boost::container::small_vector()); for (const Cell_handle c : tr.finite_cell_handles()) { - const bool cell_is_selected = cell_selector(c); + const bool cell_is_selected = get(cell_selector, c); for (int i = 0; i < 4; ++i) { diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index b4f1093393d..4117c01bc89 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -55,33 +55,6 @@ public: void after_flip(CellHandle /* c */) {} }; -template -struct All_cells_selected -{ - typedef typename Tr::Cell_handle argument_type; - typedef typename Tr::Cell::Subdomain_index Subdomain_index; - - typedef bool result_type; - - result_type operator()(const argument_type c) const - { - return c->subdomain_index() != Subdomain_index(); - } -}; - -template -struct No_constraint_pmap -{ -public: - typedef Primitive key_type; - typedef bool value_type; - typedef value_type reference; - typedef boost::read_write_property_map_tag category; - - friend value_type get(No_constraint_pmap, key_type) { return false; } - friend void put(No_constraint_pmap, key_type, value_type) {} -}; - templatesubdomain_index(); if(!input_is_c3t3()) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index 2b348e4574b..4ac4db080ec 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -440,7 +440,7 @@ bool is_boundary(const C3T3& c3t3, const CellSelector& cell_selector) { return c3t3.is_in_complex(f) - || cell_selector(f.first) != cell_selector(f.first->neighbor(f.second)); + || get(cell_selector, f.first) != get(cell_selector, f.first->neighbor(f.second)); } template @@ -496,7 +496,7 @@ bool is_boundary_vertex(const typename C3t3::Vertex_handle& v, { if (c3t3.is_in_complex(f)) return true; - if (cell_selector(f.first) ^ cell_selector(f.first->neighbor(f.second))) + if (get(cell_selector, f.first) ^ get(cell_selector, f.first->neighbor(f.second))) return true; } return false; @@ -766,7 +766,7 @@ bool is_outside(const typename C3t3::Edge & edge, if (c3t3.is_in_complex(circ)) return false; // does circ belong to the selection? - if (cell_selector(circ)) + if (get(cell_selector, circ)) return false; ++circ; @@ -788,7 +788,7 @@ bool is_selected(const typename C3t3::Vertex_handle v, for(Cell_handle c : cells) { - if (cell_selector(c)) + if (get(cell_selector, c)) return true; } return false; @@ -813,7 +813,7 @@ bool is_internal(const typename C3t3::Edge& edge, return false; if (si != circ->subdomain_index()) return false; - if (!cell_selector(circ)) + if (!get(cell_selector, circ)) return false; if (c3t3.is_in_complex( circ, @@ -835,7 +835,7 @@ bool is_selected(const typename C3T3::Triangulation::Edge& e, Cell_circulator done = circ; do { - if (cell_selector(circ)) + if (get(cell_selector, circ)) return true; } while (++circ != done); diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index b1818bbded1..a5039038896 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -26,6 +26,8 @@ #include #include +#include + #ifdef CGAL_DUMP_REMESHING_STEPS #include #endif @@ -214,34 +216,33 @@ void tetrahedral_isotropic_remeshing( = choose_parameter(get_parameter(np, internal_np::smooth_constrained_edges), false); + typedef typename Tr::Cell_handle Cell_handle; typedef typename internal_np::Lookup_named_param_def < internal_np::cell_selector_t, NamedParameters, - Tetrahedral_remeshing::internal::All_cells_selected//default + Constant_property_map//default > ::type SelectionFunctor; SelectionFunctor cell_select = choose_parameter(get_parameter(np, internal_np::cell_selector), - Tetrahedral_remeshing::internal::All_cells_selected()); + Constant_property_map(true)); typedef std::pair Edge_vv; - typedef Tetrahedral_remeshing::internal::No_constraint_pmap No_edge; typedef typename internal_np::Lookup_named_param_def < internal_np::edge_is_constrained_t, NamedParameters, - No_edge//default + Constant_property_map//default > ::type ECMap; ECMap ecmap = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), - No_edge()); + Constant_property_map(false)); typedef typename Tr::Facet Facet; - typedef Tetrahedral_remeshing::internal::No_constraint_pmap No_facet; typedef typename internal_np::Lookup_named_param_def < internal_np::facet_is_constrained_t, NamedParameters, - No_facet//default + Constant_property_map//default > ::type FCMap; FCMap fcmap = choose_parameter(get_parameter(np, internal_np::facet_is_constrained), - No_facet()); + Constant_property_map(false)); typedef typename internal_np::Lookup_named_param_def < internal_np::visitor_t, From ff3a47738a4e25f558bc0e07e0491a23f6a1d103 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 28 Oct 2022 09:44:32 +0200 Subject: [PATCH 092/426] use Constant_propert_map --- .../include/CGAL/tetrahedral_remeshing.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index a5039038896..4ae71cf1360 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -410,34 +410,33 @@ void tetrahedral_isotropic_remeshing( = choose_parameter(get_parameter(np, internal_np::smooth_constrained_edges), false); + typedef typename Tr::Cell_handle Cell_handle; typedef typename internal_np::Lookup_named_param_def < internal_np::cell_selector_t, NamedParameters, - Tetrahedral_remeshing::internal::All_cells_selected//default + Constant_property_map//default > ::type SelectionFunctor; SelectionFunctor cell_select = choose_parameter(get_parameter(np, internal_np::cell_selector), - Tetrahedral_remeshing::internal::All_cells_selected()); + Constant_property_map(true)); typedef std::pair Edge_vv; - typedef Tetrahedral_remeshing::internal::No_constraint_pmap No_edge; typedef typename internal_np::Lookup_named_param_def < internal_np::edge_is_constrained_t, NamedParameters, - No_edge//default + Constant_property_map//default > ::type ECMap; ECMap ecmap = choose_parameter(get_parameter(np, internal_np::edge_is_constrained), - No_edge()); + Constant_property_map(false)); typedef typename Tr::Facet Facet; - typedef Tetrahedral_remeshing::internal::No_constraint_pmap No_facet; typedef typename internal_np::Lookup_named_param_def < internal_np::facet_is_constrained_t, NamedParameters, - No_facet//default + Constant_property_map//default > ::type FCMap; FCMap fcmap = choose_parameter(get_parameter(np, internal_np::facet_is_constrained), - No_facet()); + Constant_property_map(false)); typedef typename internal_np::Lookup_named_param_def < internal_np::visitor_t, From e1b319bf6a2fb51b330499f8f960f639c2fd4385 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 28 Oct 2022 10:11:57 +0200 Subject: [PATCH 093/426] use pmaps for cell selector everywhere --- .../internal/compute_c3t3_statistics.h | 4 ++-- .../internal/tetrahedral_remeshing_helpers.h | 6 ++--- ...tetrahedral_remeshing_of_one_subdomain.cpp | 24 +++++++++++++++---- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h index 36b93215109..5f77df7bd2b 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/compute_c3t3_statistics.h @@ -63,7 +63,7 @@ void compute_statistics(const Triangulation& tr, { const Cell_handle cell = fit->first; const int& index = fit->second; - if (!cell_selector(cell) || !cell_selector(cell->neighbor(index))) + if (!get(cell_selector, cell) || !get(cell_selector, cell->neighbor(index))) continue; const Point& pa = point(cell->vertex((index + 1) & 3)->point()); @@ -96,7 +96,7 @@ void compute_statistics(const Triangulation& tr, ++cit) { const Subdomain_index& si = cit->subdomain_index(); - if (si == Subdomain_index() || !cell_selector(cit)) + if (si == Subdomain_index() || !get(cell_selector, cit)) continue; ++nb_tets; diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index 4ac4db080ec..e067efa2f33 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -1591,11 +1591,9 @@ void dump_cells_with_small_dihedral_angle(const Tr& tr, std::vector cells; std::vector indices; - for (typename Tr::Finite_cells_iterator cit = tr.finite_cells_begin(); - cit != tr.finite_cells_end(); ++cit) + for (Cell_handle c : tr.finite_cell_handles()) { - Cell_handle c = cit; - if (c->subdomain_index() != Subdomain_index() && cell_select(c)) + if (c->subdomain_index() != Subdomain_index() && get(cell_select, c)) { double dh = min_dihedral_angle(tr, c); if (dh < angle_bound) diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_of_one_subdomain.cpp b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_of_one_subdomain.cpp index 05f9add785e..bd0049f19a0 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_of_one_subdomain.cpp +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/test_tetrahedral_remeshing_of_one_subdomain.cpp @@ -47,20 +47,33 @@ void generate_input_two_subdomains(const std::size_t nbv, Remeshing_triangulatio #endif } -struct Cells_of_subdomain +template +struct Cells_of_subdomain_pmap { private: + using Cell_handle = typename Tr::Cell_handle; + const int m_subdomain; public: - Cells_of_subdomain(const int& subdomain) + using key_type = Cell_handle; + using value_type = bool; + using reference = bool; + using category = boost::read_write_property_map_tag; + + Cells_of_subdomain_pmap(const int& subdomain) : m_subdomain(subdomain) {} - bool operator()(Remeshing_triangulation::Cell_handle c) const + friend value_type get( + const Cells_of_subdomain_pmap& map, const key_type& c) { - return m_subdomain == c->subdomain_index(); + return (map.m_subdomain == c->subdomain_index()); } + friend void put( + Cells_of_subdomain_pmap&, const key_type&, const value_type) + {} //nothing to do : subdomain indices are updated in remeshing + }; int main(int argc, char* argv[]) @@ -74,7 +87,8 @@ int main(int argc, char* argv[]) generate_input_two_subdomains(1000, tr); CGAL::tetrahedral_isotropic_remeshing(tr, target_edge_length, - CGAL::parameters::cell_is_selected_map(Cells_of_subdomain(2))); + CGAL::parameters::cell_is_selected_map( + Cells_of_subdomain_pmap(2))); return EXIT_SUCCESS; } From 7a0cb92e43d6d01f5c0beae03742cdece87fd4f2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 28 Oct 2022 12:50:23 +0200 Subject: [PATCH 094/426] fix cell_selector use in flip() --- .../internal/split_long_edges.h | 49 ++++++++++--------- .../internal/tetrahedral_remeshing_helpers.h | 32 ++++++++++++ 2 files changed, 59 insertions(+), 22 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h index d0d3c12f442..e074975d53a 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/split_long_edges.h @@ -32,8 +32,9 @@ namespace Tetrahedral_remeshing { namespace internal { -template +template typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, + CellSelector cell_selector, C3t3& c3t3) { typedef typename C3t3::Triangulation Tr; @@ -68,8 +69,16 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, } CGAL_assertion(dimension > 0); - boost::unordered_map cells_info; - boost::unordered_map > facets_info; + struct Cell_info { + Subdomain_index subdomain_index_; + bool selected_; + }; + struct Facet_info { + Vertex_handle opp_vertex_; + Surface_patch_index patch_index_; + }; + boost::unordered_map cells_info; + boost::unordered_map facets_info; // check orientation and collect incident cells to avoid circulating twice boost::container::small_vector inc_cells; @@ -113,23 +122,21 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, //keys are the opposite facets to the ones not containing e, //because they will not be modified const Subdomain_index subdomain = c3t3.subdomain_index(c); + const bool selected = get(cell_selector, c); const Facet opp_facet1 = tr.mirror_facet(Facet(c, index_v1)); const Facet opp_facet2 = tr.mirror_facet(Facet(c, index_v2)); // volume data - cells_info.insert(std::make_pair(opp_facet1, subdomain)); - cells_info.insert(std::make_pair(opp_facet2, subdomain)); - if (c3t3.is_in_complex(c)) - c3t3.remove_from_complex(c); + cells_info.insert(std::make_pair(opp_facet1, Cell_info{subdomain, selected})); + cells_info.insert(std::make_pair(opp_facet2, Cell_info{subdomain, selected})); + treat_before_delete(c, cell_selector, c3t3); // surface data for facets of the cells to be split const int findex = CGAL::Triangulation_utils_3::next_around_edge(index_v1, index_v2); Surface_patch_index patch = c3t3.surface_patch_index(c, findex); Vertex_handle opp_vertex = c->vertex(findex); - facets_info.insert(std::make_pair(opp_facet1, - std::make_pair(opp_vertex, patch))); - facets_info.insert(std::make_pair(opp_facet2, - std::make_pair(opp_vertex, patch))); + facets_info.insert(std::make_pair(opp_facet1, Facet_info{opp_vertex, patch})); + facets_info.insert(std::make_pair(opp_facet2, Facet_info{opp_vertex, patch})); if(c3t3.is_in_complex(c, findex)) c3t3.remove_from_complex(c, findex); @@ -150,28 +157,26 @@ typename C3t3::Vertex_handle split_edge(const typename C3t3::Edge& e, //get subdomain info back CGAL_assertion(cells_info.find(mfi) != cells_info.end()); - Subdomain_index n_index = cells_info.at(mfi); - if (Subdomain_index() != n_index) - c3t3.add_to_complex(new_cell, n_index); - else - new_cell->set_subdomain_index(Subdomain_index()); + Cell_info c_info = cells_info.at(mfi); + treat_new_cell(new_cell, c_info.subdomain_index_, + cell_selector, c_info.selected_, c3t3); // get surface info back CGAL_assertion(facets_info.find(mfi) != facets_info.end()); - const std::pair v_and_opp_patch = facets_info.at(mfi); + const Facet_info v_and_opp_patch = facets_info.at(mfi); // facet opposite to new_v (status wrt c3t3 is unchanged) new_cell->set_surface_patch_index(new_cell->index(new_v), mfi.first->surface_patch_index(mfi.second)); // new half-facet (added or not to c3t3 depending on the stored surface patch index) - if (Surface_patch_index() == v_and_opp_patch.second) - new_cell->set_surface_patch_index(new_cell->index(v_and_opp_patch.first), + if (Surface_patch_index() == v_and_opp_patch.patch_index_) + new_cell->set_surface_patch_index(new_cell->index(v_and_opp_patch.opp_vertex_), Surface_patch_index()); else c3t3.add_to_complex(new_cell, - new_cell->index(v_and_opp_patch.first), - v_and_opp_patch.second); + new_cell->index(v_and_opp_patch.opp_vertex_), + v_and_opp_patch.patch_index_); // newly created internal facet for (int i = 0; i < 4; ++i) @@ -301,7 +306,7 @@ void split_long_edges(C3T3& c3t3, continue; visitor.before_split(tr, edge); - Vertex_handle vh = split_edge(edge, c3t3); + Vertex_handle vh = split_edge(edge, cell_selector, c3t3); if(vh != Vertex_handle()) visitor.after_split(tr, vh); diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h index e067efa2f33..f5b34ad19f8 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_remeshing_helpers.h @@ -1134,6 +1134,38 @@ void get_edge_info(const typename C3t3::Edge& edge, } } +namespace internal +{ + template + void treat_before_delete(typename C3t3::Cell_handle c, + CellSelector& cell_selector, + C3t3& c3t3) + { + if (c3t3.is_in_complex(c)) + c3t3.remove_from_complex(c); + if (get(cell_selector, c)) + put(cell_selector, c, false); + } + + template + void treat_new_cell(typename C3t3::Cell_handle c, + const typename C3t3::Subdomain_index& subdomain, + CellSelector& cell_selector, + const bool selected, + C3t3& c3t3) + { + //update C3t3 + using Subdomain_index = typename C3t3::Subdomain_index; + if (Subdomain_index() != subdomain) + c3t3.add_to_complex(c, subdomain); + else + c->set_subdomain_index(Subdomain_index()); + + //update cell_selector property map + put(cell_selector, c, selected); + } +} + namespace debug { From 1891985a82bd12d5982f36b743bbaf926f9f27d8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 28 Oct 2022 13:13:36 +0200 Subject: [PATCH 095/426] update cell selector after collapse --- .../internal/collapse_short_edges.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h index 4ce1fe25af0..feec9fe79aa 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/collapse_short_edges.h @@ -744,10 +744,11 @@ void merge_surface_patch_indices(const typename C3t3::Facet& f1, } } -template +template typename C3t3::Vertex_handle collapse(const typename C3t3::Cell_handle ch, const int to, const int from, + CellSelector& cell_selector, C3t3& c3t3) { typedef typename C3t3::Triangulation Tr; @@ -913,8 +914,7 @@ collapse(const typename C3t3::Cell_handle ch, for (Cell_handle cell_to_remove : cells_to_remove) { // remove cell - if (c3t3.is_in_complex(cell_to_remove)) - c3t3.remove_from_complex(cell_to_remove); + treat_before_delete(cell_to_remove, cell_selector, c3t3); c3t3.triangulation().tds().delete_cell(cell_to_remove); } @@ -927,9 +927,10 @@ collapse(const typename C3t3::Cell_handle ch, } -template +template typename C3t3::Vertex_handle collapse(typename C3t3::Edge& edge, const Collapse_type& collapse_type, + CellSelector& cell_selector, C3t3& c3t3) { typedef typename C3t3::Vertex_handle Vertex_handle; @@ -953,7 +954,7 @@ typename C3t3::Vertex_handle collapse(typename C3t3::Edge& edge, vh0->set_point(new_position); vh1->set_point(new_position); - vh = collapse(edge.first, edge.second, edge.third, c3t3); + vh = collapse(edge.first, edge.second, edge.third, cell_selector, c3t3); c3t3.set_dimension(vh, (std::min)(dim_vh0, dim_vh1)); } else //Collapse at vertex @@ -961,7 +962,7 @@ typename C3t3::Vertex_handle collapse(typename C3t3::Edge& edge, if (collapse_type == TO_V1) { vh0->set_point(p1); - vh = collapse(edge.first, edge.third, edge.second, c3t3); + vh = collapse(edge.first, edge.third, edge.second, cell_selector, c3t3); c3t3.set_dimension(vh, (std::min)(dim_vh0, dim_vh1)); } else //Collapse at v0 @@ -969,7 +970,7 @@ typename C3t3::Vertex_handle collapse(typename C3t3::Edge& edge, if (collapse_type == TO_V0) { vh1->set_point(p0); - vh = collapse(edge.first, edge.second, edge.third, c3t3); + vh = collapse(edge.first, edge.second, edge.third, cell_selector, c3t3); c3t3.set_dimension(vh, (std::min)(dim_vh0, dim_vh1)); } else @@ -1133,7 +1134,7 @@ typename C3t3::Vertex_handle collapse_edge(typename C3t3::Edge& edge, if (in_cx) nb_valid_collapse++; #endif - return collapse(edge, collapse_type, c3t3); + return collapse(edge, collapse_type, cell_selector, c3t3); } } #ifdef CGAL_DEBUG_TET_REMESHING_IN_PLUGIN From 1501d9943aa48e8e6133d2797fa51a0873613313 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 28 Oct 2022 15:19:09 +0200 Subject: [PATCH 096/426] Fix the bug! See the empty columns in https://cgal.geometryfactory.com/CGAL/testsuite/results-5.6-Ic-100.shtml and the CMake output at https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-5.6-Ic-100/Installation/TestReport_Christo_MSVC-2022-Community-Release.gz With `Scripts/developer_scripts/run_testsuite_with_ctest`, CMake is called with `-DWITH_tests=ON -DCGAL_TEST_SUITE=ON`. We do not want to disable that option `-DWITH_tests=ON` because it is crucial for the correct behavior of `run_testsuite_with_ctest`. --- Installation/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index c10bcd3b1f5..f200d97caad 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -842,7 +842,7 @@ endmacro() # This allows programs to locate CGALConfig.cmake set(CGAL_DIR ${CGAL_BINARY_DIR}) -if(NOT RUNNING_CGAL_AUTO_TEST AND NOT CGAL_TEST_SUITE) +if(NOT RUNNING_CGAL_AUTO_TEST) add_programs(examples examples OFF) add_programs(demo demos OFF) From 23bccfe1aa4ecab6512556ce7bf69222c5d03a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 2 Nov 2022 10:58:21 +0100 Subject: [PATCH 097/426] Remove obsolete (and wrong) comments --- .../Edge_collapse/Count_ratio_stop_predicate.h | 10 +--------- .../Policies/Edge_collapse/Count_stop_predicate.h | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index eaa2849e61b..3d97e16e490 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -19,15 +19,7 @@ namespace CGAL { namespace Surface_mesh_simplification { -//******************************************************************************************************************* -// -= stopping condition predicate =- -// -// Determines whether the simplification has finished. -// The arguments are (current_cost,vertex,vertex,is_edge,initial_pair_count,current_pair_count,surface) and the result is bool -// -//******************************************************************************************************************* - -// Stops when the ratio of initial to current vertex pairs is below some value. +// Stops when the ratio of initial to current number of edges is below some value. template class Count_ratio_stop_predicate { diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index ddc7e7a4843..0fea930b44a 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -19,15 +19,7 @@ namespace CGAL { namespace Surface_mesh_simplification { -//******************************************************************************************************************* -// -= stopping condition predicate =- -// -// Determines whether the simplification has finished. -// The arguments are (current_cost,vertex,vertex,is_edge,initial_pair_count,current_pair_count,surface) and the result is bool -// -//******************************************************************************************************************* - -// Stops when the number of edges left falls below a given number. +// Stops when the number of edges falls below a given number. template class Count_stop_predicate { From ba3a0d7d22131acf826f5138fa897f0e8a6e16af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 2 Nov 2022 13:46:45 +0100 Subject: [PATCH 098/426] Replace SMS::Count_* stop predicates with new Edge/Face_count_* stop predicates --- .../Mesh_simplification_plugin.cpp | 4 +- .../benchmark/polyhedron_performance.h | 4 +- .../benchmark/surface_mesh_performance.h | 4 +- .../Count_ratio_stop_predicate.h | 8 ++- .../Edge_collapse/Count_stop_predicate.h | 6 +- .../Edge_count_ratio_stop_predicate.h | 50 +++++++++++++++++ .../Edge_collapse/Edge_count_stop_predicate.h | 48 ++++++++++++++++ .../Face_count_ratio_stop_predicate.h | 51 +++++++++++++++++ .../Edge_collapse/Face_count_stop_predicate.h | 49 ++++++++++++++++ .../Concepts/StopPredicate.h | 6 +- .../PackageDescription.txt | 8 ++- .../edge_collapse_OpenMesh.cpp | 4 +- .../edge_collapse_bounded_normal_change.cpp | 4 +- .../edge_collapse_constrain_sharp_edges.cpp | 4 +- ...collapse_constrained_border_polyhedron.cpp | 4 +- ...llapse_constrained_border_surface_mesh.cpp | 4 +- .../edge_collapse_enriched_polyhedron.cpp | 4 +- .../edge_collapse_envelope.cpp | 4 +- .../edge_collapse_garland_heckbert.cpp | 8 ++- .../edge_collapse_linear_cell_complex.cpp | 4 +- .../edge_collapse_polyhedron.cpp | 4 +- .../edge_collapse_surface_mesh.cpp | 4 +- .../edge_collapse_visitor_surface_mesh.cpp | 4 +- .../Count_ratio_stop_predicate.h | 36 ++++-------- .../Edge_collapse/Count_stop_predicate.h | 36 ++++-------- .../Edge_count_ratio_stop_predicate.h | 52 +++++++++++++++++ .../Edge_collapse/Edge_count_stop_predicate.h | 50 +++++++++++++++++ .../Face_count_ratio_stop_predicate.h | 56 +++++++++++++++++++ .../Edge_collapse/Face_count_stop_predicate.h | 52 +++++++++++++++++ .../test/Surface_mesh_simplification/basics.h | 3 +- ...e_collapse_garland_heckbert_variations.cpp | 4 +- .../edge_collapse_topology.cpp | 4 +- .../test_edge_collapse_Envelope.cpp | 4 +- .../test_edge_collapse_Polyhedron_3.cpp | 2 +- .../test_edge_collapse_bounded_distance.cpp | 4 +- 35 files changed, 492 insertions(+), 101 deletions(-) create mode 100644 Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h create mode 100644 Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h create mode 100644 Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h create mode 100644 Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h create mode 100644 Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h create mode 100644 Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h create mode 100644 Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h create mode 100644 Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp index c8913412da2..31f46ffc2fb 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Mesh_simplification_plugin.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include @@ -25,7 +25,7 @@ typedef Scene_facegraph_item::Face_graph FaceGraph; class Custom_stop_predicate { bool m_and; - CGAL::Surface_mesh_simplification::Count_stop_predicate m_count_stop; + CGAL::Surface_mesh_simplification::Edge_count_stop_predicate m_count_stop; CGAL::Surface_mesh_simplification::Edge_length_stop_predicate m_length_stop; public: diff --git a/Surface_mesh/benchmark/polyhedron_performance.h b/Surface_mesh/benchmark/polyhedron_performance.h index 6229adb0007..b4de8bd6b6d 100644 --- a/Surface_mesh/benchmark/polyhedron_performance.h +++ b/Surface_mesh/benchmark/polyhedron_performance.h @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include @@ -461,7 +461,7 @@ private: ) vb->id() = index++; - SMS::Count_ratio_stop_predicate stop(0.1); + SMS::Edge_count_ratio_stop_predicate stop(0.1); int r = SMS::edge_collapse(P, stop); #endif } diff --git a/Surface_mesh/benchmark/surface_mesh_performance.h b/Surface_mesh/benchmark/surface_mesh_performance.h index 9ab57e28c9a..e310a6f4400 100644 --- a/Surface_mesh/benchmark/surface_mesh_performance.h +++ b/Surface_mesh/benchmark/surface_mesh_performance.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include typedef CGAL::Simple_cartesian K; @@ -284,7 +284,7 @@ private: mesh.clear(); bool b = CGAL::IO::read_OFF(_filename, mesh); - SMS::Count_ratio_stop_predicate stop(0.1); + SMS::Edge_count_ratio_stop_predicate stop(0.1); int r = SMS::edge_collapse(mesh, stop); } diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index 8ffe08d081a..5825ac62f5b 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -5,6 +5,8 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef +\deprecated + The class `Count_ratio_stop_predicate` is a model for the `StopPredicate` concept which returns `true` when the relation between the initial and current number of edges drops below a certain ratio. @@ -12,8 +14,8 @@ which returns `true` when the relation between the initial and current number of \cgalModels `StopPredicate` -\sa `CGAL::Surface_mesh_simplification::Count_stop_predicate` - +\sa `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` */ template< typename TriangleMesh> class Count_ratio_stop_predicate @@ -34,7 +36,7 @@ public: /// @{ /*! - Returns `((double)current_edge_count / (double)initial_edge_count) < ratio`. + Returns `(double(current_edge_count) / double(initial_edge_count)) < ratio`. All other parameters are ignored (but exist since this is a generic policy). */ bool operator()(const Edge_profile::FT current_cost, diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index 7e6deb0254a..452302a0634 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -4,6 +4,8 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef +\deprecated + The class `Count_stop_predicate` is a model for the `StopPredicate` concept, which returns `true` when the number of current edges drops below a certain threshold. @@ -11,8 +13,8 @@ which returns `true` when the number of current edges drops below a certain thre \cgalModels `StopPredicate` -\sa `CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate` - +\sa `CGAL::Surface_mesh_simplification::Edge_count_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Face_count_stop_predicate` */ template class Count_stop_predicate diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h new file mode 100644 index 00000000000..31da80779c6 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h @@ -0,0 +1,50 @@ + +namespace CGAL { +namespace Surface_mesh_simplification { + +/*! +\ingroup PkgSurfaceMeshSimplificationRef + +\cgalModels `StopPredicate` + +The class `Edge_count_ratio_stop_predicate` is a model for the `StopPredicate` concept +which returns `true` when the relation between the initial and current number of edges drops below a certain ratio. + +\tparam TriangleMesh is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. + +\sa `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` +*/ +template< typename TriangleMesh> +class Edge_count_ratio_stop_predicate +{ +public: + + /// \name Creation + /// @{ + + /*! + Initializes the predicate establishing the `ratio`. + */ + Edge_count_ratio_stop_predicate(const double ratio); + + /// @} + + /// \name Operations + /// @{ + + /*! + Returns `(double(current_edge_count) / double(initial_edge_count)) < ratio`. + All other parameters are ignored (but exist since this is a generic policy). + */ + bool operator()(const Edge_profile::FT current_cost, + const Edge_profile& edge_profile, + const Edge_profile::edges_size_type initial_edge_count, + const Edge_profile::edges_size_type current_edge_count) const; + + /// @} + +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h new file mode 100644 index 00000000000..6e3920dd421 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h @@ -0,0 +1,48 @@ +namespace CGAL { +namespace Surface_mesh_simplification { + +/*! +\ingroup PkgSurfaceMeshSimplificationRef + +\cgalModels `StopPredicate` + +The class `Edge_count_stop_predicate` is a model for the `StopPredicate` concept, +which returns `true` when the number of current edges drops below a certain threshold. + +\tparam TriangleMesh is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. + +\sa `CGAL::Surface_mesh_simplification::Face_count_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Edge_ratio_count_stop_predicate` +*/ +template +class Edge_count_stop_predicate +{ +public: + + /// \name Creation + /// @{ + + /*! + Initializes the predicate establishing the `threshold` value. + */ + Edge_count_stop_predicate(const Edge_profile::edges_size_type threshold); + + /// @} + + /// \name Operations + /// @{ + + /*! + Returns `(current_edge_count < threshold)`. All other parameters are ignored (but exist since this is a generic policy). + */ + bool operator()(const Edge_profile::FT& current_cost, + const Edge_profile& edge_profile, + const Edge_profile::edges_size_type initial_edge_count, + const Edge_profile::edges_size_type current_edge_count) const; + + /// @} + +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h new file mode 100644 index 00000000000..82cfdf2e62e --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h @@ -0,0 +1,51 @@ + +namespace CGAL { +namespace Surface_mesh_simplification { + +/*! +\ingroup PkgSurfaceMeshSimplificationRef + +\cgalModels `StopPredicate` + +The class `Face_count_ratio_stop_predicate` is a model for the `StopPredicate` concept +which returns `true` when the relation between the initial and current number of edges drops below a certain ratio. + +\tparam TriangleMesh is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. + +\sa `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` +*/ +template< typename TriangleMesh> +class Face_count_ratio_stop_predicate +{ +public: + + /// \name Creation + /// @{ + + /*! + Initializes the predicate establishing the `ratio`. + */ + Face_count_ratio_stop_predicate(const double ratio, const TriangleMesh& tmesh); + + /// @} + + /// \name Operations + /// @{ + + /*! + Returns `true` if the ratio of current face count over initial face count is strictly smaller than `ratio`, + and `false` otherwise. + All other parameters are ignored (but exist since this is a generic policy). + */ + bool operator()(const Edge_profile::FT current_cost, + const Edge_profile& edge_profile, + const Edge_profile::edges_size_type initial_edge_count, + const Edge_profile::edges_size_type current_edge_count) const; + + /// @} + +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h new file mode 100644 index 00000000000..8c35a5c35e7 --- /dev/null +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h @@ -0,0 +1,49 @@ +namespace CGAL { +namespace Surface_mesh_simplification { + +/*! +\ingroup PkgSurfaceMeshSimplificationRef + +\cgalModels `StopPredicate` + +The class `Face_count_stop_predicate` is a model for the `StopPredicate` concept, +which returns `true` when the number of current faces drops below a certain threshold. + +\tparam TriangleMesh is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. + +\sa `CGAL::Surface_mesh_simplification::Edge_count_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` +*/ +template +class Face_count_stop_predicate +{ +public: + + /// \name Creation + /// @{ + + /*! + Initializes the predicate establishing the `threshold` value. + */ + Face_count_stop_predicate(const Edge_profile::edges_size_type threshold); + + /// @} + + /// \name Operations + /// @{ + + /*! + Returns `true` if the current face count is strictly smaller than `threshold`, and `false` otherwise. + All other parameters are ignored (but exist since this is a generic policy). + */ + bool operator()(const Edge_profile::FT& current_cost, + const Edge_profile& edge_profile, + const Edge_profile::edges_size_type initial_edge_count, + const Edge_profile::edges_size_type current_edge_count) const; + + /// @} + +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h index b24bc09c99e..ad5f22d4ccb 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/StopPredicate.h @@ -4,8 +4,10 @@ The concept `StopPredicate` describes the requirements for the predicate which indicates if the simplification process must finish. -\cgalHasModel `CGAL::Surface_mesh_simplification::Count_stop_predicate` -\cgalHasModel `CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate` +\cgalHasModel `CGAL::Surface_mesh_simplification::Edge_count_stop_predicate` +\cgalHasModel `CGAL::Surface_mesh_simplification::Face_count_stop_predicate` +\cgalHasModel `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` +\cgalHasModel `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` \cgalHasModel `CGAL::Surface_mesh_simplification::Edge_length_stop_predicate` */ diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt index f29f913fc0a..1d97e670f9d 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/PackageDescription.txt @@ -34,8 +34,12 @@ - `CGAL::Surface_mesh_simplification::edge_collapse()` \cgalCRPSection{Policies} -- `CGAL::Surface_mesh_simplification::Count_stop_predicate` -- `CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate` +- `CGAL::Surface_mesh_simplification::Count_stop_predicate` (deprecated) +- `CGAL::Surface_mesh_simplification::Count_ratio_stop_predicate` (deprecated) +- `CGAL::Surface_mesh_simplification::Edge_count_stop_predicate` +- `CGAL::Surface_mesh_simplification::Face_count_stop_predicate` +- `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` +- `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` - `CGAL::Surface_mesh_simplification::Edge_length_stop_predicate` - `CGAL::Surface_mesh_simplification::Edge_length_cost` - `CGAL::Surface_mesh_simplification::Midpoint_placement` diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp index ae8c50b4c45..7612d7436e2 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp @@ -5,7 +5,7 @@ // Simplification function #include -#include +#include #include #include @@ -70,7 +70,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // left in the surface mesh drops below the specified number (1000) const std::size_t stop_n = (argc > 2) ? std::stoi(argv[2]) : 1000; - SMS::Count_stop_predicate stop(stop_n); + SMS::Edge_count_stop_predicate stop(stop_n); // This the actual call to the simplification algorithm. // The surface mesh and stop conditions are mandatory arguments. diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp index e8d0ba8ba1b..88eb9b986e7 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_bounded_normal_change.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -53,7 +53,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // left in the surface mesh drops below the specified number const std::size_t stop_n = (argc > 2) ? std::stoi(argv[2]) : num_halfedges(surface_mesh)/2 - 1; - SMS::Count_stop_predicate stop(stop_n); + SMS::Edge_count_stop_predicate stop(stop_n); typedef SMS::LindstromTurk_placement Placement; diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp index 678087c38b2..f40a35faeae 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrain_sharp_edges.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include @@ -121,7 +121,7 @@ int main(int argc, char** argv) std::cerr << "# sharp edges = " << nb_sharp_edges << std::endl; // Contract the surface mesh as much as possible - SMS::Count_stop_predicate stop(0); + SMS::Edge_count_stop_predicate stop(0); std::cout << "Collapsing as many non-sharp edges of mesh: " << filename << " as possible..." << std::endl; int r = SMS::edge_collapse(surface_mesh, stop, diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp index 9c50a593725..1fcb9ce4e05 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_polyhedron.cpp @@ -11,7 +11,7 @@ #include // Stop-condition policy -#include +#include #include #include @@ -78,7 +78,7 @@ int main(int argc, char** argv) } // Contract the surface mesh as much as possible - SMS::Count_stop_predicate stop(0); + SMS::Edge_count_stop_predicate stop(0); Border_is_constrained_edge_map bem(surface_mesh); // This the actual call to the simplification algorithm. diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp index b60753cddfc..4d3418e9abe 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_constrained_border_surface_mesh.cpp @@ -11,7 +11,7 @@ #include // Stop-condition policy -#include +#include #include #include @@ -77,7 +77,7 @@ int main(int argc, char** argv) } // Contract the surface mesh as much as possible - SMS::Count_stop_predicate stop(0); + SMS::Edge_count_stop_predicate stop(0); Border_is_constrained_edge_map bem(surface_mesh); // This the actual call to the simplification algorithm. diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp index d8b574b241f..a48e1833bb3 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include @@ -53,7 +53,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // drops below xx% of the initial count const double ratio = (argc > 2) ? std::stod(argv[2]) : 0.1; - SMS::Count_ratio_stop_predicate stop(ratio); + SMS::Edge_count_ratio_stop_predicate stop(ratio); // The index maps are not explicitelty passed as in the previous // example because the surface mesh items have a proper id() field. diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp index 6b8ee4e8902..7fc05ffc8b8 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_envelope.cpp @@ -3,7 +3,7 @@ #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ int main(int argc, char** argv) std::ifstream is(argc > 1 ? argv[1] : CGAL::data_file_path("meshes/helmet.off")); is >> mesh; - SMS::Count_stop_predicate stop(0); // go as far as you can while in the envelope + SMS::Edge_count_stop_predicate stop(0); // go as far as you can while in the envelope CGAL::Iso_cuboid_3 bbox(CGAL::Polygon_mesh_processing::bbox(mesh)); diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp index ef14f4f94ba..8a70a30d560 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp @@ -1,11 +1,13 @@ #include #include -#include +#include #include #include #include +#include + #include #include #include @@ -29,13 +31,13 @@ void collapse_gh(Surface_mesh& mesh, { std::chrono::steady_clock::time_point start_time = std::chrono::steady_clock::now(); - SMS::Count_ratio_stop_predicate stop(ratio); + SMS::Edge_count_ratio_stop_predicate stop(ratio); // Garland&Heckbert simplification policies typedef typename GHPolicies::Get_cost GH_cost; typedef typename GHPolicies::Get_placement GH_placement; - typedef SMS::Bounded_normal_change_placement Bounded_GH_placement; + typedef SMS::Bounded_normal_change_placement Bounded_GH_placement; GHPolicies gh_policies(mesh); const GH_cost& gh_cost = gh_policies.get_cost(); diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_linear_cell_complex.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_linear_cell_complex.cpp index 3528fb06646..4bedf34619a 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_linear_cell_complex.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_linear_cell_complex.cpp @@ -4,7 +4,7 @@ #include // Stop-condition policy -#include +#include #include #include @@ -42,7 +42,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // left in the surface mesh drops below the specified number (1000 by default) const std::size_t edge_count_treshold = (argc > 2) ? std::stoi(argv[2]) : 1000; - SMS::Count_stop_predicate stop(edge_count_treshold); + SMS::Edge_count_stop_predicate stop(edge_count_treshold); // This the actual call to the simplification algorithm. // The surface mesh and stop conditions are mandatory arguments. diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp index a46b5ab76db..712afa46742 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_polyhedron.cpp @@ -5,7 +5,7 @@ #include // Stop-condition policy -#include +#include #include #include @@ -36,7 +36,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // left in the surface mesh drops below the specified number (1000) const std::size_t edge_count_treshold = (argc > 2) ? std::stoi(argv[2]) : 1000; - SMS::Count_stop_predicate stop(edge_count_treshold); + SMS::Edge_count_stop_predicate stop(edge_count_treshold); // This the actual call to the simplification algorithm. // The surface mesh and stop conditions are mandatory arguments. diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp index d0bce9ca051..d21417d9829 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_surface_mesh.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // drops below 10% of the initial count double stop_ratio = (argc > 2) ? std::stod(argv[2]) : 0.1; - SMS::Count_ratio_stop_predicate stop(stop_ratio); + SMS::Edge_count_ratio_stop_predicate stop(stop_ratio); int r = SMS::edge_collapse(surface_mesh, stop); diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp index 2568e555755..f0b747108a6 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp @@ -8,7 +8,7 @@ #include // Stop-condition policy -#include +#include #include #include @@ -112,7 +112,7 @@ int main(int argc, char** argv) // In this example, the simplification stops when the number of undirected edges // drops below xx% of the initial count const double ratio = (argc > 2) ? std::stod(argv[2]) : 0.1; - SMS::Count_ratio_stop_predicate stop(ratio); + SMS::Edge_count_ratio_stop_predicate stop(ratio); Stats stats; My_visitor vis(&stats); diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index 3d97e16e490..ec8f2a3a225 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -13,40 +13,24 @@ #include -#include -#include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_REPLACEMENT_HEADER "" +#include + +#include + +#ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { namespace Surface_mesh_simplification { // Stops when the ratio of initial to current number of edges is below some value. template -class Count_ratio_stop_predicate -{ -public: - typedef TM_ TM; - typedef typename boost::graph_traits::edges_size_type size_type; - - Count_ratio_stop_predicate(const double ratio) - : m_ratio(ratio) - { - CGAL_warning(0. < ratio && ratio <= 1.); - } - - template - bool operator()(const F& /*current_cost*/, - const Profile& /*profile*/, - size_type initial_edge_count, - size_type current_edge_count) const - { - return (static_cast(current_edge_count) / static_cast(initial_edge_count)) < m_ratio; - } - -private: - double m_ratio; -}; +using Count_ratio_stop_predicate = CGAL_DEPRECATED Edge_count_ratio_stop_predicate; } // namespace Surface_mesh_simplification } // namespace CGAL +#endif // CGAL_NO_DEPRECATED_CODE + #endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_COUNT_RATIO_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index 0fea930b44a..c72b0bafea2 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -13,38 +13,24 @@ #include -#include -#include +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_REPLACEMENT_HEADER "" +#include + +#include + +#ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { namespace Surface_mesh_simplification { -// Stops when the number of edges falls below a given number. +// Stops when the number of edges left falls below a given number. template -class Count_stop_predicate -{ -public: - typedef TM_ TM; - typedef typename boost::graph_traits::edges_size_type size_type; - - Count_stop_predicate(const std::size_t edge_count_threshold) - : m_edge_count_threshold(edge_count_threshold) - { } - - template - bool operator()(const F& /*current_cost*/, - const Profile& /*profile*/, - std::size_t /*initial_edge_count*/, - std::size_t current_edge_count) const - { - return current_edge_count < m_edge_count_threshold; - } - -private: - std::size_t m_edge_count_threshold; -}; +using Count_stop_predicate = CGAL_DEPRECATED Edge_count_stop_predicate; } // namespace Surface_mesh_simplification } // namespace CGAL +#endif // CGAL_NO_DEPRECATED_CODE + #endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_COUNT_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h new file mode 100644 index 00000000000..0642d1644b0 --- /dev/null +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h @@ -0,0 +1,52 @@ +// Copyright (c) 2006 GeometryFactory (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) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_COUNT_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_COUNT_STOP_PREDICATE_H + +#include + +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the ratio of initial to current number of edges is below some value. +template +class Edge_count_ratio_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::edges_size_type size_type; + + Edge_count_ratio_stop_predicate(const double ratio) + : m_ratio(ratio) + { + CGAL_warning(0. < ratio && ratio <= 1.); + } + + template + bool operator()(const F& /*current_cost*/, + const Profile& /*profile*/, + size_type initial_edge_count, + size_type current_edge_count) const + { + return (static_cast(current_edge_count) / static_cast(initial_edge_count)) < m_ratio; + } + +private: + double m_ratio; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_COUNT_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h new file mode 100644 index 00000000000..aa3de2159a9 --- /dev/null +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_stop_predicate.h @@ -0,0 +1,50 @@ +// Copyright (c) 2006 GeometryFactory (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) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_STOP_PREDICATE_H + +#include + +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the number of edges falls below a given number. +template +class Edge_count_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::edges_size_type size_type; + + Edge_count_stop_predicate(const std::size_t edge_count_threshold) + : m_edge_count_threshold(edge_count_threshold) + { } + + template + bool operator()(const F& /*current_cost*/, + const Profile& /*profile*/, + std::size_t /*initial_edge_count*/, + std::size_t current_edge_count) const + { + return current_edge_count < m_edge_count_threshold; + } + +private: + std::size_t m_edge_count_threshold; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h new file mode 100644 index 00000000000..383d389d2a3 --- /dev/null +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h @@ -0,0 +1,56 @@ +// Copyright (c) 2006 GeometryFactory (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) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_FACE_COUNT_RATIO_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_FACE_COUNT_RATIO_STOP_PREDICATE_H + +#include + +#include +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the ratio of initial to current number of edges is below some value. +template +class Face_count_ratio_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::edges_size_type size_type; + + Face_count_ratio_stop_predicate(const double ratio, + const TM& tmesh) + : m_ratio(ratio), m_initial_face_count(CGAL::internal::exact_num_faces(tmesh)) + { + CGAL_warning(0. < ratio && ratio <= 1.); + } + + template + bool operator()(const F& /*current_cost*/, + const Profile& profile, + size_type /*initial_edge_count*/, + size_type /*current_edge_count*/) const + { + const std::size_t current_face_count = CGAL::internal::exact_num_faces(profile.surface_mesh()); + return (static_cast(current_face_count) / static_cast(m_initial_face_count)) < m_ratio; + } + +private: + const double m_ratio; + const std::size_t m_initial_face_count; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_FACE_COUNT_RATIO_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h new file mode 100644 index 00000000000..873cac7c320 --- /dev/null +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_stop_predicate.h @@ -0,0 +1,52 @@ +// Copyright (c) 2006 GeometryFactory (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) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_STOP_PREDICATE_H + +#include + +#include +#include +#include + +namespace CGAL { +namespace Surface_mesh_simplification { + +// Stops when the number of faces falls below a given number. +template +class Face_count_stop_predicate +{ +public: + typedef TM_ TM; + typedef typename boost::graph_traits::faces_size_type size_type; + + Face_count_stop_predicate(const std::size_t face_count_threshold) + : m_face_count_threshold(face_count_threshold) + { } + + template + bool operator()(const F& /*current_cost*/, + const Profile& profile, + std::size_t /*initial_edge_count*/, + std::size_t /*current_edge_count*/) const + { + const std::size_t current_face_count = CGAL::internal::exact_num_faces(profile.surface_mesh()); + return (current_face_count < m_face_count_threshold); + } + +private: + std::size_t m_face_count_threshold; +}; + +} // namespace Surface_mesh_simplification +} // namespace CGAL + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h b/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h index 703a7f4c194..e1363e7fed6 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/basics.h @@ -32,7 +32,8 @@ void Surface_simplification_external_trace(std::string s) #include #include #include -#include +#include +#include #include #include diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp index 9b7bd975503..32505153d06 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_garland_heckbert_variations.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include @@ -102,7 +102,7 @@ Surface_mesh edge_collapse(Surface_mesh& mesh, const Cost& cost = p.get_cost(); const Placement& unbounded_placement = p.get_placement(); Bounded_placement bounded_placement(unbounded_placement); - SMS::Count_ratio_stop_predicate stop(ratio); + SMS::Edge_count_ratio_stop_predicate stop(ratio); std::chrono::time_point start_time = std::chrono::steady_clock::now(); diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp index 5e0ab17d1d6..d52a8e1daa1 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp @@ -8,7 +8,7 @@ #include // Stop-condition policy -#include +#include typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Polyhedron_3 Surface; @@ -36,7 +36,7 @@ int main(int argc, char** argv) std::cout << "Initial count " << initial_count << " edges.\n"; // Contract the surface as much as possible - SMS::Count_stop_predicate stop(0); + SMS::Edge_count_stop_predicate stop(0); int r = SMS::edge_collapse (surface diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp index d7228a1406a..cb52e089ede 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp @@ -7,7 +7,7 @@ #include -#include +#include #include #include @@ -96,7 +96,7 @@ int main(int argc, char** argv) std::ifstream is(argc > 1 ? argv[1] : "data/helmet.off"); is >> input_mesh; - SMS::Count_stop_predicate stop(0); // go as far as you can while in the envelope + SMS::Edge_count_stop_predicate stop(0); // go as far as you can while in the envelope Stats stats; My_visitor vis(&stats); diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp index 7c641c5eb69..b81c477049c 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp @@ -378,7 +378,7 @@ bool Test (string aName) set_halfedgeds_items_id(lSurface); - SMS::Count_stop_predicate stop(sStop); + SMS::Edge_count_stop_predicate stop(sStop); Real_timer t; t.start(); diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_bounded_distance.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_bounded_distance.cpp index 0764b881fe1..f6cd535bf50 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_bounded_distance.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_bounded_distance.cpp @@ -4,7 +4,7 @@ // Simplification function #include #include -#include +#include #include #include @@ -42,7 +42,7 @@ int main(int argc, char** argv) std::ifstream is(argc > 1 ? argv[1] : "data/helmet.off"); is >> ref_mesh; - SMS::Count_stop_predicate stop(num_halfedges(ref_mesh)/10); + SMS::Edge_count_stop_predicate stop(num_halfedges(ref_mesh)/10); std::cout << "input has " << num_vertices(ref_mesh) << " vertices." << std::endl; CGAL::Iso_cuboid_3 bbox(CGAL::Polygon_mesh_processing::bbox(ref_mesh)); From e64a8d759fb0e19206f9b635d0133f2942c7d981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 2 Nov 2022 13:47:41 +0100 Subject: [PATCH 099/426] Add a test for new count stop predicates + test deprecated versions --- .../CMakeLists.txt | 1 + .../test_edge_deprecated_stop_predicates.cpp | 171 ++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt index 86599afd28e..2f55474593a 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/CMakeLists.txt @@ -11,6 +11,7 @@ create_single_source_cgal_program("test_edge_collapse_bounded_distance.cpp") create_single_source_cgal_program("test_edge_collapse_Envelope.cpp") create_single_source_cgal_program("test_edge_collapse_Polyhedron_3.cpp") create_single_source_cgal_program("test_edge_profile_link.cpp") +create_single_source_cgal_program("test_edge_deprecated_stop_predicates.cpp") find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp new file mode 100644 index 00000000000..e1b7be1fb1e --- /dev/null +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp @@ -0,0 +1,171 @@ +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include + +// deprecated +#include +#include + +#include +#include + +#include + +typedef CGAL::Simple_cartesian K; +typedef CGAL::Surface_mesh Mesh; + +namespace SMS = CGAL::Surface_mesh_simplification; + +typedef SMS::Edge_count_stop_predicate Edge_count_stop; +typedef SMS::Face_count_stop_predicate Face_count_stop; +typedef SMS::Edge_count_ratio_stop_predicate Edge_count_ratio_stop; +typedef SMS::Face_count_ratio_stop_predicate Face_count_ratio_stop; + +typedef SMS::Count_stop_predicate Count_stop; +typedef SMS::Count_ratio_stop_predicate Count_ratio_stop; + +typedef SMS::Count_ratio_stop_predicate Count_ratio_stop; + +typedef SMS::Edge_length_cost Cost; +typedef SMS::Midpoint_placement Placement; + +int main(int argc, char** argv) +{ + const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/cube-meshed.off"); + + Mesh mesh; + if(!CGAL::IO::read_polygon_mesh(filename, mesh)) + { + std::cerr << "Failed to read input mesh: " << filename << std::endl; + return EXIT_FAILURE; + } + + if(!CGAL::is_triangle_mesh(mesh)) + { + std::cerr << "Input geometry is not triangulated." << std::endl; + return EXIT_FAILURE; + } + + std::cout << "Input mesh has " << num_vertices(mesh) << " nv " + << num_edges(mesh) << " ne " + << num_faces(mesh) << " nf" << std::endl; + + Cost cost; + Placement placement; + + // Edge_count_stop + { + Mesh mesh_cpy = mesh; + const std::size_t expected_ne = num_edges(mesh_cpy) / 2; + Edge_count_stop stop(expected_ne); + SMS::edge_collapse(mesh_cpy, stop, + CGAL::parameters::get_cost(cost) + .get_placement(placement)); + + std::cout << "Output mesh has " << CGAL::internal::exact_num_vertices(mesh_cpy) << " nv " + << CGAL::internal::exact_num_edges(mesh_cpy) << " ne " + << CGAL::internal::exact_num_faces(mesh_cpy) << " nf" << std::endl; + + assert(CGAL::internal::exact_num_edges(mesh_cpy) < expected_ne); + } + + // Count_stop + { + Mesh mesh_cpy = mesh; + const std::size_t expected_ne = num_edges(mesh_cpy) + 1; + Count_stop stop(expected_ne); + SMS::edge_collapse(mesh_cpy, stop, + CGAL::parameters::get_cost(cost) + .get_placement(placement)); + + std::cout << "Output mesh has " << CGAL::internal::exact_num_vertices(mesh_cpy) << " nv " + << CGAL::internal::exact_num_edges(mesh_cpy) << " ne " + << CGAL::internal::exact_num_faces(mesh_cpy) << " nf" << std::endl; + + assert(CGAL::internal::exact_num_edges(mesh_cpy) < expected_ne); + } + + // Face_count_stop + { + Mesh mesh_cpy = mesh; + const std::size_t expected_nf = num_faces(mesh_cpy) / 4; + Face_count_stop stop(expected_nf); + SMS::edge_collapse(mesh_cpy, stop, + CGAL::parameters::get_cost(cost) + .get_placement(placement)); + + std::cout << "Output mesh has " << CGAL::internal::exact_num_vertices(mesh_cpy) << " nv " + << CGAL::internal::exact_num_edges(mesh_cpy) << " ne " + << CGAL::internal::exact_num_faces(mesh_cpy) << " nf" << std::endl; + + assert(CGAL::internal::exact_num_faces(mesh_cpy) < expected_nf); + } + + /// RATIO + + // Edge_count_ratio_stop + { + Mesh mesh_cpy = mesh; + const double ratio = 0.5; + const std::size_t initial_ne = num_edges(mesh_cpy); + Edge_count_ratio_stop stop(ratio); + SMS::edge_collapse(mesh_cpy, stop, + CGAL::parameters::get_cost(cost) + .get_placement(placement)); + + std::cout << "Output mesh has " << CGAL::internal::exact_num_vertices(mesh_cpy) << " nv " + << CGAL::internal::exact_num_edges(mesh_cpy) << " ne " + << CGAL::internal::exact_num_faces(mesh_cpy) << " nf" << std::endl; + + assert(CGAL::internal::exact_num_edges(mesh_cpy) / initial_ne < ratio); + } + + // Count_ratio_stop + { + Mesh mesh_cpy = mesh; + const double ratio = 1.; + const std::size_t initial_ne = num_edges(mesh_cpy); + Count_ratio_stop stop(ratio); + SMS::edge_collapse(mesh_cpy, stop, + CGAL::parameters::get_cost(cost) + .get_placement(placement)); + + std::cout << "Output mesh has " << CGAL::internal::exact_num_vertices(mesh_cpy) << " nv " + << CGAL::internal::exact_num_edges(mesh_cpy) << " ne " + << CGAL::internal::exact_num_faces(mesh_cpy) << " nf" << std::endl; + + assert(CGAL::internal::exact_num_edges(mesh_cpy) / initial_ne < ratio); + } + + // Face_count_ratio_stop + { + Mesh mesh_cpy = mesh; + const double ratio = 0.7; + const std::size_t initial_nf = num_faces(mesh_cpy); + Face_count_ratio_stop stop(ratio, mesh_cpy); + SMS::edge_collapse(mesh_cpy, stop, + CGAL::parameters::get_cost(cost) + .get_placement(placement)); + + std::cout << "Output mesh has " << CGAL::internal::exact_num_vertices(mesh_cpy) << " nv " + << CGAL::internal::exact_num_edges(mesh_cpy) << " ne " + << CGAL::internal::exact_num_faces(mesh_cpy) << " nf" << std::endl; + + assert(CGAL::internal::exact_num_faces(mesh_cpy) / initial_nf < ratio); + } + + return 0; +} + From 837573119d16627b96f7f4f2e7b4e0481d3d9614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 2 Nov 2022 13:55:32 +0100 Subject: [PATCH 100/426] Fix include guard names --- .../Edge_collapse/Edge_count_ratio_stop_predicate.h | 6 +++--- .../Edge_collapse/Face_count_ratio_stop_predicate.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h index 0642d1644b0..13123440d86 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h @@ -8,8 +8,8 @@ // // Author(s) : Fernando Cacciola // -#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_COUNT_STOP_PREDICATE_H -#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_COUNT_STOP_PREDICATE_H +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_RATIO_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_RATIO_STOP_PREDICATE_H #include @@ -49,4 +49,4 @@ private: } // namespace Surface_mesh_simplification } // namespace CGAL -#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_COUNT_STOP_PREDICATE_H +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_EDGE_COUNT_RATIO_STOP_PREDICATE_H diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h index 383d389d2a3..e21db25c3a0 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h @@ -8,8 +8,8 @@ // // Author(s) : Fernando Cacciola // -#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_FACE_COUNT_RATIO_STOP_PREDICATE_H -#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_FACE_COUNT_RATIO_STOP_PREDICATE_H +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_RATIO_STOP_PREDICATE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_RATIO_STOP_PREDICATE_H #include @@ -53,4 +53,4 @@ private: } // namespace Surface_mesh_simplification } // namespace CGAL -#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_EDGE_FACE_COUNT_RATIO_STOP_PREDICATE_H +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLICIES_EDGE_COLLAPSE_FACE_COUNT_RATIO_STOP_PREDICATE_H From 47032c62c72ded8822132c3e344444fcaaad770a Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 2 Nov 2022 22:34:56 +0200 Subject: [PATCH 101/426] Fixed link --- .../doc/Minkowski_sum_2/CGAL/approximated_offset_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h index 4b98132bb68..d53817e4676 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h @@ -14,7 +14,7 @@ several disconnected components. The result is therefore represented as a sequence of generalized polygons, whose edges are either line segments or circular arcs. The output sequence is returned via the output iterator `oi`, whose -value-type must be `Gps_circle_segment_traits_2::Polygon_2`. +value-type must be `Gps_circle_segment_traits_2::Polygon_2`. \pre `P` is a simple polygon. */ template From 895c8574b9eef4f62a0168ca800582bc3ebc47db Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Wed, 2 Nov 2022 22:36:25 +0200 Subject: [PATCH 102/426] Added mising const --- Boolean_set_operations_2/include/CGAL/Polygon_set_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h b/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h index d986acfd860..d1c2305c2dd 100644 --- a/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h +++ b/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h @@ -58,7 +58,7 @@ public: {} /*! Constructor with traits object. */ - Polygon_set_2 (Traits_2& tr) : + Polygon_set_2 (const Traits_2& tr) : Base(tr) {} From 7c8eac05ce67acec75a33a77012a505a7a7c6401 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 3 Nov 2022 11:40:42 +0100 Subject: [PATCH 103/426] add cell_selector to flip_all_edges() --- .../internal/flip_edges.h | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h index f849baea079..18c0c119109 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h @@ -87,12 +87,13 @@ void update_c3t3_facets(C3t3& c3t3, } } -template +template Sliver_removal_result flip_3_to_2(typename C3t3::Edge& edge, C3t3& c3t3, const std::vector& vertices_around_edge, const Flip_Criterion& criterion, - IncCellsVectorMap& inc_cells) + IncCellsVectorMap& inc_cells, + Cell_selector& cell_selector) { typedef typename C3t3::Triangulation Tr; typedef typename C3t3::Facet Facet; @@ -323,7 +324,7 @@ Sliver_removal_result flip_3_to_2(typename C3t3::Edge& edge, // Update c3t3 update_c3t3_facets(c3t3, cells_to_update, outer_mirror_facets); - c3t3.remove_from_complex(cell_to_remove); + treat_before_delete(cell_to_remove, cell_selector, c3t3); tr.tds().delete_cell(cell_to_remove); /********************VALIDITY CHECK***************************/ @@ -703,11 +704,15 @@ void find_best_flip_to_improve_dh(C3t3& c3t3, } } -template +template Sliver_removal_result flip_n_to_m(C3t3& c3t3, typename C3t3::Edge& edge, typename C3t3::Vertex_handle vh, IncCellsVectorMap& inc_cells, + Cell_selector& cell_selector, Visitor& visitor, bool check_validity = false) { @@ -862,6 +867,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, //Subdomain index? typename C3t3::Subdomain_index subdomain = to_remove[0]->subdomain_index(); + bool selected = get(m_cell_selector, to_remove[0]); visitor.before_flip(to_remove[0]); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG @@ -882,7 +888,8 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, new_cell->set_vertex(fi.second, vh); - c3t3.add_to_complex(new_cell, subdomain); + treat_new_cell(new_cell, subdomain, cell_selector, selected, c3t3); + visitor.after_flip(new_cell); cells_to_update.push_back(new_cell); } @@ -951,7 +958,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, //Remove cells for (Cell_handle ch : to_remove) { - c3t3.remove_from_complex(ch); + treat_before_delete(ch, cell_selector, c3t3); tr.tds().delete_cell(ch); } @@ -1072,11 +1079,12 @@ Sliver_removal_result flip_n_to_m(typename C3t3::Edge& edge, return result; } -template +template Sliver_removal_result find_best_flip(typename C3t3::Edge& edge, C3t3& c3t3, const Flip_Criterion& criterion, IncCellsVectorMap& inc_cells, + Cell_selector& cell_selector, Visitor& visitor) { typedef typename C3t3::Triangulation Tr; @@ -1139,7 +1147,7 @@ Sliver_removal_result find_best_flip(typename C3t3::Edge& edge, { std::vector vertices; vertices.insert(vertices.end(), vertices_around_edge.begin(), vertices_around_edge.end()); - res = flip_3_to_2(edge, c3t3, vertices, criterion, inc_cells); + res = flip_3_to_2(edge, c3t3, vertices, criterion, inc_cells, cell_selector); } } else @@ -1151,7 +1159,7 @@ Sliver_removal_result find_best_flip(typename C3t3::Edge& edge, { std::vector vertices; vertices.insert(vertices.end(), boundary_vertices.begin(), boundary_vertices.end()); - res = flip_n_to_m(edge, c3t3, vertices, criterion, inc_cells, visitor); + res = flip_n_to_m(edge, c3t3, vertices, criterion, inc_cells, cell_selector, visitor); //return n_to_m_flip(edge, boundary_vertices, flip_criterion); } } @@ -1160,10 +1168,11 @@ Sliver_removal_result find_best_flip(typename C3t3::Edge& edge, } -template +template std::size_t flip_all_edges(const std::vector& edges, C3t3& c3t3, const Flip_Criterion& criterion, + Cell_selector& cell_selector, Visitor& visitor) { typedef typename C3t3::Triangulation Tr; @@ -1194,7 +1203,8 @@ std::size_t flip_all_edges(const std::vector& edges, { Edge edge(ch, i0, i1); - Sliver_removal_result res = find_best_flip(edge, c3t3, criterion, inc_cells, visitor); + Sliver_removal_result res + = find_best_flip(edge, c3t3, criterion, inc_cells, cell_selector, visitor); if (res == INVALID_CELL || res == INVALID_VERTEX || res == INVALID_ORIENTATION) { std::cout << "FLIP PROBLEM!!!!" << std::endl; @@ -1237,8 +1247,6 @@ void flip_edges(C3T3& c3t3, //const Flip_Criterion criterion = VALENCE_MIN_DH_BASED; - //collect long edges - //compute vertices normals map? // typedef typename C3T3::Surface_patch_index Surface_patch_index; @@ -1272,7 +1280,7 @@ void flip_edges(C3T3& c3t3, #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE nb_flips = #endif - flip_all_edges(inside_edges, c3t3, MIN_ANGLE_BASED, visitor); + flip_all_edges(inside_edges, c3t3, MIN_ANGLE_BASED, cell_selector, visitor); //} #ifdef CGAL_TETRAHEDRAL_REMESHING_VERBOSE From e4c7c2e6ec0ead4e3453890658473839c8a9f17b Mon Sep 17 00:00:00 2001 From: Mael Date: Fri, 4 Nov 2022 10:25:49 +0100 Subject: [PATCH 104/426] Add a depreciation message --- .../Policies/Edge_collapse/Count_ratio_stop_predicate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index 5825ac62f5b..f4a5378489b 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -5,7 +5,7 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef -\deprecated +\deprecated This class is deprecated since \cgal 5.6, the class `Edge_count_ratio_stop_predicate` should be used instead. The class `Count_ratio_stop_predicate` is a model for the `StopPredicate` concept which returns `true` when the relation between the initial and current number of edges drops below a certain ratio. From d9a98ab2b81a9f4502213da6ea0a55b945991d7f Mon Sep 17 00:00:00 2001 From: Mael Date: Fri, 4 Nov 2022 10:26:34 +0100 Subject: [PATCH 105/426] Add a depreciation message --- .../Policies/Edge_collapse/Count_stop_predicate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index 452302a0634..bef9e2fdba9 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -4,7 +4,7 @@ namespace Surface_mesh_simplification { /*! \ingroup PkgSurfaceMeshSimplificationRef -\deprecated +\deprecated This class is deprecated since \cgal 5.6, the class `Edge_count_stop_predicate` should be used instead. The class `Count_stop_predicate` is a model for the `StopPredicate` concept, which returns `true` when the number of current edges drops below a certain threshold. From a929b4af09b04cbd582f7f3045934f0c489e83ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 4 Nov 2022 10:45:50 +0100 Subject: [PATCH 106/426] Fix typo --- .../test/Surface_mesh_simplification/edge_collapse_topology.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp index d52a8e1daa1..479a7687dda 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_topology.cpp @@ -8,7 +8,7 @@ #include // Stop-condition policy -#include +#include typedef CGAL::Simple_cartesian Kernel; typedef CGAL::Polyhedron_3 Surface; From ab96b29f0c5e0ede6859690193bcb9eebf9bac7b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 4 Nov 2022 11:16:09 +0100 Subject: [PATCH 107/426] cell_selector in flipping step --- .../CGAL/Tetrahedral_remeshing/internal/flip_edges.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h index 18c0c119109..c6354b5e4ef 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/flip_edges.h @@ -867,7 +867,7 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, //Subdomain index? typename C3t3::Subdomain_index subdomain = to_remove[0]->subdomain_index(); - bool selected = get(m_cell_selector, to_remove[0]); + bool selected = get(cell_selector, to_remove[0]); visitor.before_flip(to_remove[0]); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG @@ -1015,12 +1015,13 @@ Sliver_removal_result flip_n_to_m(C3t3& c3t3, } -template +template Sliver_removal_result flip_n_to_m(typename C3t3::Edge& edge, C3t3& c3t3, const std::vector& boundary_vertices, const Flip_Criterion& criterion, IncCellsVectorMap& inc_cells, + CellSelector& cell_selector, Visitor& visitor) { typedef typename C3t3::Vertex_handle Vertex_handle; @@ -1069,7 +1070,8 @@ Sliver_removal_result flip_n_to_m(typename C3t3::Edge& edge, if (curr_max_cosdh <= curr_cost_vpair.first) return NO_BEST_CONFIGURATION; - result = flip_n_to_m(c3t3, edge, curr_cost_vpair.second.first, inc_cells, visitor); + result = flip_n_to_m(c3t3, edge, curr_cost_vpair.second.first, inc_cells, + cell_selector, visitor); if (result != NOT_FLIPPABLE) flip_performed = true; @@ -1231,7 +1233,7 @@ std::size_t flip_all_edges(const std::vector& edges, template void flip_edges(C3T3& c3t3, const bool protect_boundaries, - CellSelector cell_selector, + CellSelector& cell_selector, Visitor& visitor) { CGAL_USE(protect_boundaries); From dcf0ea09b32204bd6bc17c5f69c699bb60658536 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 4 Nov 2022 14:12:52 +0100 Subject: [PATCH 108/426] create normal_map when not already created before usage --- Point_set_3/include/CGAL/Point_set_3.h | 30 ++++++++++++++------------ 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index dbf00b0182b..a02ea9509bd 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -465,8 +465,8 @@ public: \note Properties of the added point other than its normal vector are initialized to their default value. - \note A normal property must have been added to the point set - before using this method. + \note If not already added, a normal property is automatically + added to the point set when using this method. \note If a reallocation happens, all iterators, pointers and references related to the container are invalidated. Otherwise, @@ -479,8 +479,7 @@ public: iterator insert (const Point& p, const Vector& n) { iterator out = insert (p); - CGAL_assertion(has_normal_map()); - m_normals[size()-1] = n; + normal_map()[size()-1] = n; return out; } @@ -550,17 +549,17 @@ public: /*! \brief returns a reference to the normal corresponding to `index`. - \note The normal property must have been added to the point set - before calling this method (see `add_normal_map()`). + \note If not already added, a normal property is automatically + added to the point set (see `add_normal_map()`). */ - Vector& normal (const Index& index) { return m_normals[index]; } + Vector& normal (const Index& index) { return normal_map()[index]; } /*! \brief returns a constant reference to the normal corresponding to `index`. - \note The normal property must have been added to the point set - before calling this method (see `add_normal_map()`). + \note If not already added, a normal property is automatically + added to the point set (see `add_normal_map()`). */ - const Vector& normal (const Index& index) const { return m_normals[index]; } + const Vector& normal (const Index& index) const { return normal_map()[index]; } /// @} @@ -869,11 +868,14 @@ public: /*! \brief returns the property map of the normal property. - \note The normal property must have been added to the point set - before calling this method (see `add_normal_map()`). + \note If the normal property has not been added yet to the point set + before calling this method, the property map is automatically added + with `add_normal_map()`. */ Vector_map normal_map () { + if (!m_normals) + add_normal_map(); return m_normals; } /*! @@ -982,7 +984,7 @@ public: inline parameters() const { return CGAL::parameters::point_map (m_points). - normal_map (m_normals). + normal_map (normal_map()). geom_traits (typename Kernel_traits::Kernel()); } @@ -1036,7 +1038,7 @@ public: */ Vector_range normals () const { - return this->range (m_normals); + return this->range (normal_map()); } /// @} From 9ed334bcf9c0178205c0099159aa2364eb6f2294 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 4 Nov 2022 14:27:09 +0100 Subject: [PATCH 109/426] now normal_map is always valid since it is created before it's used, when not available --- Point_set_3/include/CGAL/Point_set_3.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index a02ea9509bd..55d2f5bfa5a 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1343,17 +1343,11 @@ struct Point_set_processing_3_np_helper, NamedParamet static const Normal_map get_normal_map(const Point_set_3& ps, const NamedParameters& np) { - CGAL_assertion_code( - if (!(parameters::is_default_parameter::value))) - CGAL_assertion(!!ps.normal_map()); return parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map), ps.normal_map()); } static Normal_map get_normal_map(Point_set_3& ps, const NamedParameters& np) { - CGAL_assertion_code( - if (!(parameters::is_default_parameter::value))) - CGAL_assertion(!!ps.normal_map()); return parameters::choose_parameter(parameters::get_parameter(np, internal_np::normal_map), ps.normal_map()); } @@ -1362,11 +1356,9 @@ struct Point_set_processing_3_np_helper, NamedParamet return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map(const Point_set_3& ps, const NamedParameters& np) + static constexpr bool has_normal_map(const Point_set_3&, const NamedParameters&) { - using CGAL::parameters::is_default_parameter; - const bool np_has_normals = !(is_default_parameter::value); - return np_has_normals || !!ps.normal_map(); + return true;//either available in np, or in point set } }; From b8e96fef84316d2be45a6efe1ab3c055de129688 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Nov 2022 09:11:19 +0000 Subject: [PATCH 110/426] Surface_mesh: Deal with PLY files with vertex and face color which is float instead of unsigned char --- .../include/CGAL/Surface_mesh/IO/PLY.h | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index 97ba5aed47b..0204a0ac701 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -289,10 +289,22 @@ public: if(m_vcolors == 3) { - unsigned char r, g, b; - element.assign(r, "red"); - element.assign(g, "green"); - element.assign(b, "blue"); + unsigned char r=0, g=0, b=0; + float rf=0, gf=0, bf=0; + if(element.has_property("red",r)) + { + element.assign(r, "red"); + element.assign(g, "green"); + element.assign(b, "blue"); + }else if(element.has_property("red", rf)) + { + element.assign(rf, "red"); + element.assign(gf, "green"); + element.assign(bf, "blue"); + r = std::floor(rf*255); + g = std::floor(gf*255); + b = std::floor(bf*255); + } m_vcolor_map[vi] = CGAL::IO::Color(r, g, b); } } @@ -331,10 +343,22 @@ public: if(m_fcolors == 3) { - unsigned char r, g, b; - element.assign(r, "red"); - element.assign(g, "green"); - element.assign(b, "blue"); + unsigned char r=0, g=0, b=0; + float rf=0, gf=0, bf=0; + if(element.has_property("red",r)) + { + element.assign(r, "red"); + element.assign(g, "green"); + element.assign(b, "blue"); + } else if(element.has_property("red", rf)) + { + element.assign(rf, "red"); + element.assign(gf, "green"); + element.assign(bf, "blue"); + r = std::floor(rf*255); + g = std::floor(gf*255); + b = std::floor(bf*255); + } m_fcolor_map[fi] = CGAL::IO::Color(r, g, b); } } From 3f9f7429b8f70eedc829b189339b2ad51cac43f2 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Nov 2022 10:20:13 +0100 Subject: [PATCH 111/426] Update Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h Co-authored-by: Sebastien Loriot --- Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index 0204a0ac701..ae1853a0a12 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -350,7 +350,7 @@ public: element.assign(r, "red"); element.assign(g, "green"); element.assign(b, "blue"); - } else if(element.has_property("red", rf)) + } else if(element.has_property("red", rf)) { element.assign(rf, "red"); element.assign(gf, "green"); From 47babfefae1401e3a2da1c623bcb4f5c68d12821 Mon Sep 17 00:00:00 2001 From: Sven Oesau Date: Mon, 7 Nov 2022 10:38:49 +0100 Subject: [PATCH 112/426] reverted exclusion of some tests --- .../test_pmp_locate.cpp | 84 ++++++------------- 1 file changed, 26 insertions(+), 58 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 3997ade8a77..2767dad9338 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp @@ -172,25 +172,17 @@ void test_constructions(const G& g, // --------------------------------------------------------------------------- bar = PMP::barycentric_coordinates(p, q, r, p, K()); - if (std::is_same()) { - assert(is_equal(bar[0], FT(1)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(0))); - } + assert(is_equal(bar[0], FT(1)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(0))); bar = PMP::barycentric_coordinates(p, q, r, q, K()); - if (std::is_same()) { - assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(1)) && is_equal(bar[2], FT(0))); - } + assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(1)) && is_equal(bar[2], FT(0))); bar = PMP::barycentric_coordinates(p, q, r, r, K()); - if (std::is_same()) { - assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(1))); - } + assert(is_equal(bar[0], FT(0)) && is_equal(bar[1], FT(0)) && is_equal(bar[2], FT(1))); Point mp = Point(CGAL::midpoint(bp, bq)); bar = PMP::barycentric_coordinates(p, q, r, mp); - if (std::is_same()) { - assert(is_equal(bar[0], FT(0.5)) && is_equal(bar[1], FT(0.5)) && is_equal(bar[2], FT(0))); - } + assert(is_equal(bar[0], FT(0.5)) && is_equal(bar[1], FT(0.5)) && is_equal(bar[2], FT(0))); int n = 100; while(n --> 0) // :) @@ -202,9 +194,7 @@ void test_constructions(const G& g, // Point to location and inversely Bare_point barycentric_pt = CGAL::barycenter(bp, a, bq, b, br, c); bar = PMP::barycentric_coordinates(p, q, r, Point(barycentric_pt)); - if (std::is_same()) { - assert(is_equal(bar[0], a) && is_equal(bar[1], b) && is_equal(bar[2], c)); - } + assert(is_equal(bar[0], a) && is_equal(bar[1], b) && is_equal(bar[2], c)); loc.second = bar; const Bare_point barycentric_pt_2 = @@ -213,30 +203,22 @@ void test_constructions(const G& g, .geom_traits(K()))); const FT sq_dist = CGAL::squared_distance(barycentric_pt, barycentric_pt_2); - if (std::is_same()) { - assert(is_equal(sq_dist, FT(0))); - } + assert(is_equal(sq_dist, FT(0))); } // --------------------------------------------------------------------------- loc = std::make_pair(f, CGAL::make_array(FT(0.3), FT(0.4), FT(0.3))); descriptor_variant dv = PMP::get_descriptor_from_location(loc, g); const face_descriptor* fd = boost::get(&dv); - if (std::is_same()) { - assert(fd); - } + assert(fd); loc = std::make_pair(f, CGAL::make_array(FT(0.5), FT(0.5), FT(0))); dv = PMP::get_descriptor_from_location(loc, g); const halfedge_descriptor* hd = boost::get(&dv); - if (std::is_same()) { - assert(hd); - } + assert(hd); loc = std::make_pair(f, CGAL::make_array(FT(1), FT(0), FT(0))); - if (std::is_same()) { - assert(PMP::is_on_vertex(loc, source(halfedge(f, g), g), g)); - } + assert(PMP::is_on_vertex(loc, source(halfedge(f, g), g), g)); dv = PMP::get_descriptor_from_location(loc, g); if(const vertex_descriptor* v = boost::get(&dv)) { } else { assert(false); } @@ -270,20 +252,16 @@ void test_random_entities(const G& g, CGAL::Random& rnd) while(nn --> 0) // the infamous 'go to zero' operator { loc = PMP::random_location_on_mesh(g, rnd); - if (std::is_same()) { - assert(loc.first != boost::graph_traits::null_face()); - assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && - loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && - loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); - } + assert(loc.first != boost::graph_traits::null_face()); + assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && + loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && + loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); loc = PMP::random_location_on_face(f, g, rnd); - if (std::is_same()) { - assert(loc.first == f); - assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && - loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && - loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); - } + assert(loc.first == f); + assert(loc.second[0] >= FT(0) && loc.second[0] <= FT(1) && + loc.second[1] >= FT(0) && loc.second[1] <= FT(1) && + loc.second[2] >= FT(0) && loc.second[2] <= FT(1)); loc = PMP::random_location_on_halfedge(h, g, rnd); assert(loc.first == face(h, g)); @@ -459,38 +437,28 @@ void test_locate_in_face(const G& g, loc = PMP::locate_vertex(v, g); - if (std::is_same()) { - assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); - assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); - } + assert(is_equal(loc.second[CGAL::vertex_index_in_face(v, loc.first, g)], FT(1))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 1) % 3], FT(0))); + assert(is_equal(loc.second[(CGAL::vertex_index_in_face(v, loc.first, g) + 2) % 3], FT(0))); loc = PMP::locate_vertex(v, f, g); - if (std::is_same()) { - assert(loc.first == f); - assert(is_equal(loc.second[0], FT(0)) && is_equal(loc.second[1], FT(1)) && is_equal(loc.second[2], FT(0))); - } + assert(loc.first == f); + assert(is_equal(loc.second[0], FT(0)) && is_equal(loc.second[1], FT(1)) && is_equal(loc.second[2], FT(0))); loc = PMP::locate_on_halfedge(h, a, g); const int h_id = CGAL::halfedge_index_in_face(h, g); - if (std::is_same()) { - assert(loc.first == f && is_equal(loc.second[(h_id + 2) % 3], FT(0))); - } + assert(loc.first == f && is_equal(loc.second[(h_id + 2) % 3], FT(0))); loc = PMP::locate_in_face(p, f, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K())); int v_id = CGAL::vertex_index_in_face(v, f, g); - if (std::is_same()) { - assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); - } + assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); // Internal vertex point pmap typedef typename boost::property_map_value::type Point; Point p2 = get(CGAL::vertex_point, g, v); PMP::locate_in_face(p2, f, g); - if (std::is_same()) { - assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); - } + assert(loc.first == f && is_equal(loc.second[v_id], FT(1))); // --------------------------------------------------------------------------- loc.second[0] = FT(0.2); @@ -516,8 +484,8 @@ void test_locate_in_face(const G& g, if (std::is_same()) { assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()))); - assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); } + assert(PMP::locate_in_common_face(loc, p, neigh_loc, g, CGAL::parameters::vertex_point_map(vpm).geom_traits(K()), 1e-7)); } } From 1a226ed87705c4ae0cabc664dc74020ede52e8ca Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 7 Nov 2022 10:41:22 +0100 Subject: [PATCH 113/426] Restore [revious API --- BGL/include/CGAL/boost/graph/named_params_helper.h | 2 +- Point_set_3/include/CGAL/Point_set_3.h | 2 +- Point_set_processing_3/include/CGAL/IO/write_off_points.h | 2 +- Point_set_processing_3/include/CGAL/IO/write_ply_points.h | 2 +- Point_set_processing_3/include/CGAL/IO/write_xyz_points.h | 2 +- .../include/CGAL/bilateral_smooth_point_set.h | 2 +- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- Point_set_processing_3/include/CGAL/jet_estimate_normals.h | 2 +- Point_set_processing_3/include/CGAL/mst_orient_normals.h | 2 +- Point_set_processing_3/include/CGAL/pca_estimate_normals.h | 2 +- Point_set_processing_3/include/CGAL/scanline_orient_normals.h | 2 +- Point_set_processing_3/include/CGAL/structure_point_set.h | 2 +- Point_set_processing_3/include/CGAL/vcm_estimate_normals.h | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index e80cae78072..948de5dded6 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -336,7 +336,7 @@ struct Point_set_processing_3_np_helper return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map(const PointRange&, const NamedParameters&) + static constexpr bool has_normal_map() { using CGAL::parameters::is_default_parameter; return !(is_default_parameter::value); diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 55d2f5bfa5a..6ca6be884d5 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1356,7 +1356,7 @@ struct Point_set_processing_3_np_helper, NamedParamet return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map(const Point_set_3&, const NamedParameters&) + static constexpr bool has_normal_map() { return true;//either available in np, or in point set } diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index 2fb38456379..a3435090bb8 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -46,7 +46,7 @@ bool write_OFF_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(points, np); + bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index d151871a541..faad40b8f9a 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -201,7 +201,7 @@ bool write_PLY(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(points, np); + bool has_normals = NP_helper::has_normal_map(np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index b98ebb247df..73610c9545f 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -47,7 +47,7 @@ bool write_XYZ_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(points, np); + bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 5c1d2d7cf25..91147a5a6e5 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -278,7 +278,7 @@ bilateral_smooth_point_set( typedef typename Kernel::Point_3 Point_3; typedef typename Kernel::Vector_3 Vector_3; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); typedef typename Kernel::FT FT; diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 7bcb43eaf8f..eaafa1251eb 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -367,7 +367,7 @@ edge_aware_upsample_point_set( typedef typename NP_helper::Geom_traits Kernel; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 092c479c53d..91b29879d1a 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -196,7 +196,7 @@ jet_estimate_normals( typedef typename Kernel::FT FT; typedef typename GetSvdTraits::type SvdTraits; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index 18be66609e5..ff81bcb6305 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -631,7 +631,7 @@ mst_orient_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetIsConstrainedMap::type ConstrainedMap; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index 9c4f5cde3e6..64a7a99dec0 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -168,7 +168,7 @@ pca_estimate_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index 272ce021158..a1a8bdf5f8d 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa ::type; using Fallback_scanline_ID = Boolean_tag::value>; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 5930d4b08f0..72785255714 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneMap::type PlaneMap; typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); CGAL_static_assertion_msg((!is_default_parameter::value), "Error: no plane index map"); diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index de0c26d68f6..afe5c3a2535 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename GetDiagonalizeTraits::type DiagonalizeTraits; - CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); From 04e4eec6fdbf91efcc1af3b9f778e024fe986610 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Mon, 7 Nov 2022 10:44:02 +0100 Subject: [PATCH 114/426] reuse static assertions --- Point_set_processing_3/include/CGAL/IO/write_ply_points.h | 2 +- .../include/CGAL/bilateral_smooth_point_set.h | 2 +- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- Point_set_processing_3/include/CGAL/jet_estimate_normals.h | 2 +- Point_set_processing_3/include/CGAL/mst_orient_normals.h | 2 +- Point_set_processing_3/include/CGAL/pca_estimate_normals.h | 2 +- Point_set_processing_3/include/CGAL/scanline_orient_normals.h | 2 +- Point_set_processing_3/include/CGAL/structure_point_set.h | 2 +- Point_set_processing_3/include/CGAL/vcm_estimate_normals.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index faad40b8f9a..38b361ff779 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -201,7 +201,7 @@ bool write_PLY(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(np); + bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 91147a5a6e5..86fa5d23b19 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -278,7 +278,7 @@ bilateral_smooth_point_set( typedef typename Kernel::Point_3 Point_3; typedef typename Kernel::Vector_3 Vector_3; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); typedef typename Kernel::FT FT; diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index eaafa1251eb..507418d45b8 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -367,7 +367,7 @@ edge_aware_upsample_point_set( typedef typename NP_helper::Geom_traits Kernel; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 91b29879d1a..da74d6e93ee 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -196,7 +196,7 @@ jet_estimate_normals( typedef typename Kernel::FT FT; typedef typename GetSvdTraits::type SvdTraits; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index ff81bcb6305..909dc37a63d 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -631,7 +631,7 @@ mst_orient_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetIsConstrainedMap::type ConstrainedMap; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index 64a7a99dec0..8447ae952ff 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -168,7 +168,7 @@ pca_estimate_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index a1a8bdf5f8d..02f956f2416 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa ::type; using Fallback_scanline_ID = Boolean_tag::value>; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index 72785255714..f0a9fc34c86 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneMap::type PlaneMap; typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); CGAL_static_assertion_msg((!is_default_parameter::value), "Error: no plane index map"); diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index afe5c3a2535..5b69f3ef0f9 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename GetDiagonalizeTraits::type DiagonalizeTraits; - CGAL_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); From b609f5364b64740cb022102a18895360e42e2486 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 12:19:16 +0100 Subject: [PATCH 115/426] remove duplicate include --- Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp index 999a81bc2cf..e35576fc98f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/VTK_io_plugin.cpp @@ -60,12 +60,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include From 57c6d59ddcef1fac903149ff3e3f5812191aca34 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 12:20:14 +0100 Subject: [PATCH 116/426] add vtkNrrd reader to Io_image_plugin --- .../Plugins/Mesh_3/Io_image_plugin.cpp | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 72ef02c7c4c..826c4867696 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -65,7 +65,9 @@ #include #include #include +#include #endif + #include // Covariant return types don't work for scalar types and we cannot @@ -978,7 +980,8 @@ private Q_SLOTS: QString Io_image_plugin::nameFilters() const { return QString("Inrimage files (*.inr *.inr.gz) ;; " "Analyze files (*.hdr *.img *img.gz) ;; " - "Stanford Exploration Project files (*.H *.HH)"); + "Stanford Exploration Project files (*.H *.HH) ;; " + "NRRD image files (*.nrrd)"); } @@ -1011,7 +1014,23 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) ok = true; QApplication::restoreOverrideCursor(); Image* image = new Image; - if(fileinfo.suffix() != "H" && fileinfo.suffix() != "HH" && + if (fileinfo.suffix() == "nrrd") + { +#ifdef CGAL_USE_VTK + vtkNew reader; + reader->SetFileName(fileinfo.filePath().toUtf8()); + reader->Update(); + auto vtk_image = reader->GetOutput(); + vtk_image->Print(std::cerr); + *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data +#else + CGAL::Three::Three::warning("You need VTK to read a NRRD file"); + CGAL_USE(dirname); + delete image; + return QList(); +#endif + } + else if(fileinfo.suffix() != "H" && fileinfo.suffix() != "HH" && !image->read(fileinfo.filePath().toUtf8())) { QMessageBox qmb(QMessageBox::NoIcon, From 41f1acc4650b897568a1333700a0e367c9a633e6 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 12:41:53 +0100 Subject: [PATCH 117/426] reorder if/else conditions --- .../Plugins/Mesh_3/Io_image_plugin.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 826c4867696..7a3f29db756 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1014,6 +1014,8 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) ok = true; QApplication::restoreOverrideCursor(); Image* image = new Image; + + //read a nrrd file if (fileinfo.suffix() == "nrrd") { #ifdef CGAL_USE_VTK @@ -1030,6 +1032,15 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) return QList(); #endif } + + //read a sep file + else if (fileinfo.suffix() == "H" || fileinfo.suffix() == "HH") + { + CGAL::SEP_to_ImageIO reader(fileinfo.filePath().toUtf8().data()); + *image = *reader.cgal_image(); + is_gray = true; + } + else if(fileinfo.suffix() != "H" && fileinfo.suffix() != "HH" && !image->read(fileinfo.filePath().toUtf8())) { @@ -1119,13 +1130,7 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) return QList(); } } - //read a sep file - else if(fileinfo.suffix() == "H" || fileinfo.suffix() == "HH") - { - CGAL::SEP_to_ImageIO reader(fileinfo.filePath().toUtf8().data()); - *image = *reader.cgal_image(); - is_gray = true; - } + // Get display precision QDialog dialog; ui.setupUi(&dialog); From 26472284e4ee0ae551fbcf32bbfa663951242625 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 12:47:35 +0100 Subject: [PATCH 118/426] the demo can now mesh images with any word type thanks to the new domain constructors that do not need to be defined explicitly a priori --- .../Plugins/Mesh_3/Mesh_3_plugin.cpp | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp index 6aa0571c8b9..ac61fa258e9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp @@ -374,27 +374,6 @@ boost::optional Mesh_3_plugin::get_items_or_return_error_string() const auto& image_item = image_mesh_items->image_item; item = image_item; features_protection_available = true; - - bool fit_wrdtp = true; - std::size_t img_wdim = image_item->image()->image()->wdim; - WORD_KIND img_wordKind = image_item->image()->image()->wordKind; - // check if the word type fits the hardcoded values in the plugin - if (image_item->isGray()) { - if (img_wordKind != WK_FLOAT) - fit_wrdtp = false; - else if (img_wdim != 4) - fit_wrdtp = false; - } else { - if (img_wordKind != WK_FIXED) - fit_wrdtp = false; - else if (img_wdim != 1) - fit_wrdtp = false; - } - if (!fit_wrdtp) { - return tr( - "Selected object can't be meshed because the image's word type is " - "not supported by this plugin."); - } } # endif From 07ebf4da2389345e53e900fa1fc39e449e987c30 Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 7 Nov 2022 13:12:49 +0100 Subject: [PATCH 119/426] Fix test --- Weights/test/Weights/include/wrappers.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Weights/test/Weights/include/wrappers.h b/Weights/test/Weights/include/wrappers.h index 94138e735df..2566a219a6c 100644 --- a/Weights/test/Weights/include/wrappers.h +++ b/Weights/test/Weights/include/wrappers.h @@ -70,7 +70,10 @@ struct Tangent_wrapper template FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return CGAL::Weights::half_tangent_weight(r, q, t, Kernel()) + + return CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), + CGAL::Weights::internal::distance(t, q), + CGAL::Weights::internal::area(r, q, t), + CGAL::Weights::internal::scalar_product(r, q, t)) + CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), CGAL::Weights::internal::distance(p, q), CGAL::Weights::internal::area(p, q, r), From 7a0fbcffd2cc1cb7b4acc3354379e3179374d33d Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 7 Nov 2022 14:03:54 +0100 Subject: [PATCH 120/426] Apply fixes from @sloriot Co-authored-by: Sebastien Loriot --- .../Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h | 2 +- .../Policies/Edge_collapse/Face_count_ratio_stop_predicate.h | 4 ++-- .../Policies/Edge_collapse/Face_count_ratio_stop_predicate.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h index 31da80779c6..fed8537304f 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_count_ratio_stop_predicate.h @@ -12,7 +12,7 @@ which returns `true` when the relation between the initial and current number of \tparam TriangleMesh is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. -\sa `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Edge_count_stop_predicate` \sa `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` */ template< typename TriangleMesh> diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h index 82cfdf2e62e..f5154aeb0d8 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h @@ -8,12 +8,12 @@ namespace Surface_mesh_simplification { \cgalModels `StopPredicate` The class `Face_count_ratio_stop_predicate` is a model for the `StopPredicate` concept -which returns `true` when the relation between the initial and current number of edges drops below a certain ratio. +which returns `true` when the relation between the initial and current number of faces drops below a certain ratio. \tparam TriangleMesh is the type of surface mesh being simplified, and must be a model of the `MutableFaceGraph` and `HalfedgeListGraph` concepts. \sa `CGAL::Surface_mesh_simplification::Edge_count_ratio_stop_predicate` -\sa `CGAL::Surface_mesh_simplification::Face_count_ratio_stop_predicate` +\sa `CGAL::Surface_mesh_simplification::Face_count_stop_predicate` */ template< typename TriangleMesh> class Face_count_ratio_stop_predicate diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h index e21db25c3a0..d349c948181 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Face_count_ratio_stop_predicate.h @@ -20,7 +20,7 @@ namespace CGAL { namespace Surface_mesh_simplification { -// Stops when the ratio of initial to current number of edges is below some value. +// Stops when the ratio of initial to current number of faces is below some value. template class Face_count_ratio_stop_predicate { From 56244a493f0ae7efd00837cd5cbad363cc104d8e Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 7 Nov 2022 13:12:49 +0100 Subject: [PATCH 121/426] Fix test --- Weights/test/Weights/include/wrappers.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Weights/test/Weights/include/wrappers.h b/Weights/test/Weights/include/wrappers.h index 94138e735df..2566a219a6c 100644 --- a/Weights/test/Weights/include/wrappers.h +++ b/Weights/test/Weights/include/wrappers.h @@ -70,7 +70,10 @@ struct Tangent_wrapper template FT weight_b(const Point& t, const Point& r, const Point& p, const Point& q) const { - return CGAL::Weights::half_tangent_weight(r, q, t, Kernel()) + + return CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), + CGAL::Weights::internal::distance(t, q), + CGAL::Weights::internal::area(r, q, t), + CGAL::Weights::internal::scalar_product(r, q, t)) + CGAL::Weights::half_tangent_weight(CGAL::Weights::internal::distance(r, q), CGAL::Weights::internal::distance(p, q), CGAL::Weights::internal::area(p, q, r), From a24c6ac84c90b966a3a33ea58f6a3678f67dea7b Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 14:13:18 +0100 Subject: [PATCH 122/426] Apply suggestions from Mael's code review Co-authored-by: Mael --- Point_set_3/include/CGAL/Point_set_3.h | 2 +- Point_set_processing_3/include/CGAL/IO/read_ply_points.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 6ca6be884d5..76f261949ad 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1358,7 +1358,7 @@ struct Point_set_processing_3_np_helper, NamedParamet static constexpr bool has_normal_map() { - return true;//either available in np, or in point set + return true; // either available in named parameters, and always available in Point_set_3 otherwise } }; diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index 5a38b4fd034..e52a2758f0f 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -264,8 +264,8 @@ bool read_PLY(std::istream& is, NormalMap normal_map = NP_helper::get_normal_map(np); return read_PLY_with_properties(is, output, - make_ply_point_reader(point_map), - make_ply_normal_reader(normal_map)); + make_ply_point_reader(point_map), + make_ply_normal_reader(normal_map)); } /** From 6555faf73f3b2b7dbf0ca81c5802ef9f7625ee17 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 14:14:16 +0100 Subject: [PATCH 123/426] this is only for ranges, not for Point_set_3 --- Point_set_processing_3/include/CGAL/IO/read_off_points.h | 2 -- Point_set_processing_3/include/CGAL/IO/read_ply_points.h | 2 -- Point_set_processing_3/include/CGAL/IO/read_xyz_points.h | 2 -- 3 files changed, 6 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/IO/read_off_points.h b/Point_set_processing_3/include/CGAL/IO/read_off_points.h index 7ef015cc018..01a7138eb5b 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_off_points.h @@ -98,8 +98,6 @@ bool read_OFF(std::istream& is, typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - //the default value for normal map, if not provided in the np, - // is a dummy Constant_property_map PointMap point_map = NP_helper::get_point_map(np); NormalMap normal_map = NP_helper::get_normal_map(np); diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index 5a38b4fd034..dd780cc6436 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -258,8 +258,6 @@ bool read_PLY(std::istream& is, typedef typename NP_helper::Point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - //the default value for normal map, if not provided in the np, - // is a dummy Constant_property_map PointMap point_map = NP_helper::get_point_map(np); NormalMap normal_map = NP_helper::get_normal_map(np); diff --git a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h index d2a7f178992..29e48e25918 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h @@ -90,8 +90,6 @@ bool read_XYZ(std::istream& is, typedef typename NP_helper::Normal_map NormalMap; typedef typename NP_helper::Geom_traits Kernel; - //the default value for normal map, if not provided in the np, - // is a dummy Constant_property_map PointMap point_map = NP_helper::get_point_map(np); NormalMap normal_map = NP_helper::get_normal_map(np); From 32486e4be871aa2380e570e746912cf38c02b59d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 14:14:30 +0100 Subject: [PATCH 124/426] precise default normal --- Point_set_3/include/CGAL/Point_set_3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 55d2f5bfa5a..fc1da7fe601 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -466,7 +466,8 @@ public: are initialized to their default value. \note If not already added, a normal property is automatically - added to the point set when using this method. + added to the point set when using this method. The default value + for normal vectors is `CGAL::NULL_VECTOR`. \note If a reallocation happens, all iterators, pointers and references related to the container are invalidated. Otherwise, From 0a43b5ff7de697c25a7641878495f74f9c19e865 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 7 Nov 2022 14:55:17 +0100 Subject: [PATCH 125/426] has_normals is const --- Point_set_processing_3/include/CGAL/IO/write_off_points.h | 2 +- Point_set_processing_3/include/CGAL/IO/write_ply_points.h | 2 +- Point_set_processing_3/include/CGAL/IO/write_xyz_points.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index a3435090bb8..379f4afd0bc 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -46,7 +46,7 @@ bool write_OFF_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(); + const bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index 38b361ff779..ae47bf501fd 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -201,7 +201,7 @@ bool write_PLY(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(); + const bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index 73610c9545f..06f77c4b419 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -47,7 +47,7 @@ bool write_XYZ_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - bool has_normals = NP_helper::has_normal_map(); + const bool has_normals = NP_helper::has_normal_map(); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); From 2b41ebaaaa459592ba0817c1f42b36a2a500abc4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 7 Nov 2022 15:45:58 +0100 Subject: [PATCH 126/426] Remove last remnant of C++17 if constexpr --- .../test/Kernel_23/include/CGAL/_test_new_3.h | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h index 4daf22f0f3d..2b4b26dd388 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h @@ -78,6 +78,28 @@ _test_new_3_sqrt(const R& rep, CGAL::Tag_true) return true; } +template struct Test_needs_FT +{ + template void operator()(const T&...) const {} +}; + +template <> struct Test_needs_FT +{ + template + void operator()(const Compare_distance_3& compare_dist, + const Point_3& p1, const Point_3 p2, const Point_3& p3, + const Segment_3& s2, const Line_3& l1) const + { + assert(!compare_dist.needs_FT(p1, p2, p3)); + assert(!compare_dist.needs_FT(p2, s2, s2)); + assert(!compare_dist.needs_FT(p2, p2, s2)); + assert(!compare_dist.needs_FT(p1, s2, p2)); + assert(compare_dist.needs_FT(l1, p1, p1)); + assert(compare_dist.needs_FT(p2, p3, p2, p3)); + assert(compare_dist.needs_FT(p2, s2, l1, s2)); + } +}; template bool @@ -612,17 +634,10 @@ test_new_3(const R& rep) tmp34ab = compare_dist(p2,p3,p2,p3); tmp34ab = compare_dist(p1, p2, p3, p4); tmp34ab = compare_dist(l2, p1, p1); - if constexpr (R::Has_filtered_predicates && - has_needs_FT::value) -{ - assert(!compare_dist.needs_FT(p1, p2, p3)); - assert(!compare_dist.needs_FT(p2, s2, s2)); - assert(!compare_dist.needs_FT(p2, p2, s2)); - assert(!compare_dist.needs_FT(p1, s2, p2)); - assert(compare_dist.needs_FT(l1, p1, p1)); - assert(compare_dist.needs_FT(p2, p3, p2, p3)); - assert(compare_dist.needs_FT(p2, s2, l1, s2)); - } + + Test_needs_FT::value> test_needs_ft; + test_needs_ft(compare_dist, p1, p2, p3, s2, l1); (void) tmp34ab; typename R::Compare_squared_distance_3 compare_sq_dist From 21f60772a1b54980bb5348afc012786d70d33468 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 7 Nov 2022 15:46:13 +0100 Subject: [PATCH 127/426] Do not enable CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS by default --- Kernel_23/test/Kernel_23/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Kernel_23/test/Kernel_23/CMakeLists.txt b/Kernel_23/test/Kernel_23/CMakeLists.txt index a27b9eb2978..1de74e0e1b0 100644 --- a/Kernel_23/test/Kernel_23/CMakeLists.txt +++ b/Kernel_23/test/Kernel_23/CMakeLists.txt @@ -31,7 +31,6 @@ create_single_source_cgal_program("test_kernel__.cpp") create_single_source_cgal_program("test_projection_traits.cpp") create_single_source_cgal_program("test_Projection_traits_xy_3_Intersect_2.cpp") -set(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS ON) if(CGAL_KERNEL_23_TEST_RT_FT_PREDICATE_FLAGS) # Templated operators: # - create a lot of possible combinations, which is expensive to test From 38fd07dfc45d36868771336da5600b8a1e0937b5 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Nov 2022 10:24:43 +0100 Subject: [PATCH 128/426] differentiate has_normal_map() between const and non-const point set --- BGL/include/CGAL/boost/graph/named_params_helper.h | 2 +- Point_set_3/include/CGAL/Point_set_3.h | 11 +++++++++-- .../include/CGAL/IO/write_off_points.h | 2 +- .../include/CGAL/IO/write_ply_points.h | 2 +- .../include/CGAL/IO/write_xyz_points.h | 2 +- .../include/CGAL/bilateral_smooth_point_set.h | 2 +- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- .../include/CGAL/jet_estimate_normals.h | 2 +- .../include/CGAL/mst_orient_normals.h | 2 +- .../include/CGAL/pca_estimate_normals.h | 2 +- .../include/CGAL/scanline_orient_normals.h | 2 +- .../include/CGAL/structure_point_set.h | 2 +- .../include/CGAL/vcm_estimate_normals.h | 2 +- 13 files changed, 21 insertions(+), 14 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 948de5dded6..e80cae78072 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -336,7 +336,7 @@ struct Point_set_processing_3_np_helper return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map() + static constexpr bool has_normal_map(const PointRange&, const NamedParameters&) { using CGAL::parameters::is_default_parameter; return !(is_default_parameter::value); diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 539c75e7db6..5a833713161 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1357,11 +1357,18 @@ struct Point_set_processing_3_np_helper, NamedParamet return parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits)); } - static constexpr bool has_normal_map() + static bool has_normal_map(const Point_set_3& ps, const NamedParameters&) + { + if (ps.has_normal_map()) + return true; + using CGAL::parameters::is_default_parameter; + return !(is_default_parameter::value); + } + + static constexpr bool has_normal_map(Point_set_3& ps, const NamedParameters&) { return true; // either available in named parameters, and always available in Point_set_3 otherwise } - }; /// \endcond diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index 379f4afd0bc..1ae7746e301 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -46,7 +46,7 @@ bool write_OFF_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - const bool has_normals = NP_helper::has_normal_map(); + const bool has_normals = NP_helper::has_normal_map(points, np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index ae47bf501fd..897f1bbd089 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -201,7 +201,7 @@ bool write_PLY(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - const bool has_normals = NP_helper::has_normal_map(); + const bool has_normals = NP_helper::has_normal_map(points, np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index 06f77c4b419..45b351d18f0 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -47,7 +47,7 @@ bool write_XYZ_PSP(std::ostream& os, typedef typename NP_helper::Const_point_map PointMap; typedef typename NP_helper::Normal_map NormalMap; - const bool has_normals = NP_helper::has_normal_map(); + const bool has_normals = NP_helper::has_normal_map(points, np); PointMap point_map = NP_helper::get_const_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 86fa5d23b19..5c1d2d7cf25 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -278,7 +278,7 @@ bilateral_smooth_point_set( typedef typename Kernel::Point_3 Point_3; typedef typename Kernel::Vector_3 Vector_3; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); typedef typename Kernel::FT FT; diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 507418d45b8..5c6ab8f9139 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -367,7 +367,7 @@ edge_aware_upsample_point_set( typedef typename NP_helper::Geom_traits Kernel; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index da74d6e93ee..1bd1b57e0e9 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -196,7 +196,7 @@ jet_estimate_normals( typedef typename Kernel::FT FT; typedef typename GetSvdTraits::type SvdTraits; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index 909dc37a63d..f5c366c6f7f 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -631,7 +631,7 @@ mst_orient_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetIsConstrainedMap::type ConstrainedMap; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index 8447ae952ff..42718e38177 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -168,7 +168,7 @@ pca_estimate_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index 02f956f2416..da232f97961 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa ::type; using Fallback_scanline_ID = Boolean_tag::value>; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index f0a9fc34c86..e4054c0d11c 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneMap::type PlaneMap; typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); CGAL_static_assertion_msg((!is_default_parameter::value), "Error: no plane index map"); diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index 5b69f3ef0f9..689bb2df132 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename GetDiagonalizeTraits::type DiagonalizeTraits; - CGAL_static_assertion_msg(NP_helper::has_normal_map(), "Error: no normal map"); + CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); From bccf3990f90d254c50889f643ce4e7cbae9de9f7 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 8 Nov 2022 10:51:46 +0100 Subject: [PATCH 129/426] fix compilation --- .../include/CGAL/edge_aware_upsample_point_set.h | 2 +- Point_set_processing_3/include/CGAL/jet_estimate_normals.h | 2 +- Point_set_processing_3/include/CGAL/mst_orient_normals.h | 2 +- Point_set_processing_3/include/CGAL/pca_estimate_normals.h | 2 +- Point_set_processing_3/include/CGAL/scanline_orient_normals.h | 2 +- Point_set_processing_3/include/CGAL/structure_point_set.h | 2 +- Point_set_processing_3/include/CGAL/vcm_estimate_normals.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 5c6ab8f9139..7bcb43eaf8f 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -367,7 +367,7 @@ edge_aware_upsample_point_set( typedef typename NP_helper::Geom_traits Kernel; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); typedef typename Kernel::Point_3 Point; typedef typename Kernel::Vector_3 Vector; diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 1bd1b57e0e9..092c479c53d 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -196,7 +196,7 @@ jet_estimate_normals( typedef typename Kernel::FT FT; typedef typename GetSvdTraits::type SvdTraits; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); CGAL_static_assertion_msg(!(boost::is_same::NoTraits>::value), "Error: no SVD traits"); diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index f5c366c6f7f..18be66609e5 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -631,7 +631,7 @@ mst_orient_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Point_set_processing_3::GetIsConstrainedMap::type ConstrainedMap; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index 42718e38177..9c4f5cde3e6 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -168,7 +168,7 @@ pca_estimate_normals( typedef typename NP_helper::Geom_traits Kernel; typedef typename Kernel::FT FT; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index da232f97961..272ce021158 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -478,7 +478,7 @@ void scanline_orient_normals (PointRange& points, const NamedParameters& np = pa ::type; using Fallback_scanline_ID = Boolean_tag::value>; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index e4054c0d11c..5930d4b08f0 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -234,7 +234,7 @@ public: typedef typename Point_set_processing_3::GetPlaneMap::type PlaneMap; typedef typename Point_set_processing_3::GetPlaneIndexMap::type PlaneIndexMap; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); CGAL_static_assertion_msg((!is_default_parameter::value), "Error: no plane index map"); diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index 689bb2df132..de0c26d68f6 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -321,7 +321,7 @@ vcm_estimate_normals_internal (PointRange& points, typedef typename NP_helper::Geom_traits Kernel; typedef typename GetDiagonalizeTraits::type DiagonalizeTraits; - CGAL_assertion(NP_helper::has_normal_map(points, np), "Error: no normal map"); + CGAL_assertion_msg(NP_helper::has_normal_map(points, np), "Error: no normal map"); PointMap point_map = NP_helper::get_point_map(points, np); NormalMap normal_map = NP_helper::get_normal_map(points, np); From f0443a6ab33bf9dec3860937568f7921cee1ca94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Nov 2022 14:43:19 +0100 Subject: [PATCH 130/426] Rework as to not break the Surface_mesh_deformation weight concept --- .../include/CGAL/Surface_mesh_deformation.h | 19 ++-- .../include/CGAL/Weights/cotangent_weights.h | 106 ++++++++++-------- 2 files changed, 67 insertions(+), 58 deletions(-) diff --git a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h index a715accf733..a536e13ddae 100644 --- a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h +++ b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h @@ -86,8 +86,7 @@ struct Types_selectors; template struct Types_selectors { - typedef SC_on_the_fly_pmap Wrapped_VertexPointMap; - typedef CGAL::Weights::Single_cotangent_weight Weight_calculator; + typedef CGAL::Weights::Single_cotangent_weight Weight_calculator; struct ARAP_visitor { @@ -107,8 +106,7 @@ struct Types_selectors template struct Types_selectors { - typedef SC_on_the_fly_pmap Wrapped_VertexPointMap; - typedef CGAL::Weights::Cotangent_weight Weight_calculator; + typedef CGAL::Weights::Cotangent_weight Weight_calculator; typedef typename Types_selectors::ARAP_visitor ARAP_visitor; }; @@ -116,8 +114,7 @@ struct Types_selectors template struct Types_selectors { - typedef SC_on_the_fly_pmap Wrapped_VertexPointMap; - typedef CGAL::Weights::Cotangent_weight Weight_calculator; + typedef CGAL::Weights::Cotangent_weight Weight_calculator; class ARAP_visitor { @@ -384,7 +381,7 @@ public: vertex_index_map, hedge_index_map, vertex_point_map, - Weight_calculator(triangle_mesh, internal::SC_on_the_fly_pmap(vertex_point_map))) + Weight_calculator()) { } Surface_mesh_deformation(Triangle_mesh& triangle_mesh, @@ -437,9 +434,10 @@ public: private: void init() { + typedef internal::SC_on_the_fly_pmap Wrapper; hedge_weight.reserve(num_halfedges(m_triangle_mesh)); for(halfedge_descriptor he : halfedges(m_triangle_mesh)) - hedge_weight.push_back(this->weight_calculator(he)); + hedge_weight.push_back(this->weight_calculator(he, m_triangle_mesh, Wrapper(vertex_point_map))); arap_visitor.init(m_triangle_mesh, vertex_point_map); } @@ -823,6 +821,7 @@ public: */ void overwrite_initial_geometry() { + typedef internal::SC_on_the_fly_pmap Wrapper; if(roi.empty()) { return; } // no ROI to overwrite region_of_solution(); // the roi should be preprocessed since we are using original_position vec @@ -843,13 +842,13 @@ public: std::size_t id_e = id(he); if(is_weight_computed[id_e]) { continue; } - hedge_weight[id_e] = weight_calculator(he); + hedge_weight[id_e] = weight_calculator(he, m_triangle_mesh, Wrapper(vertex_point_map)); is_weight_computed[id_e] = true; halfedge_descriptor e_opp = opposite(he, m_triangle_mesh); std::size_t id_e_opp = id(e_opp); - hedge_weight[id_e_opp] = weight_calculator(e_opp); + hedge_weight[id_e_opp] = weight_calculator(e_opp, m_triangle_mesh, Wrapper(vertex_point_map)); is_weight_computed[id_e_opp] = true; } } diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index d462c3f5174..89af4fa88d4 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -147,44 +147,38 @@ typename Kernel::FT cotangent_weight(const CGAL::Point_3& p0, // For border edges it returns zero. // This version is currently used in: // Surface_mesh_deformation -> Surface_mesh_deformation.h -template::value_type>::type> +template class Single_cotangent_weight { using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - using Point_ref = typename boost::property_traits::reference; - using FT = typename GeomTraits::FT; - -private: - const PolygonMesh& m_pmesh; - const VertexPointMap m_vpm; - const GeomTraits m_traits; - public: - Single_cotangent_weight(const PolygonMesh& pmesh, - const VertexPointMap vpm, - const GeomTraits& traits = GeomTraits()) - : m_pmesh(pmesh), m_vpm(vpm), m_traits(traits) - { } - - decltype(auto) operator()(const halfedge_descriptor he) const + // Returns the cotangent of the opposite angle of the edge + // 0 for border edges (which does not have an opposite angle). + template + auto operator()(halfedge_descriptor he, + PolygonMesh& pmesh, + VPM vpm) { - if (is_border(he, m_pmesh)) + using Point = typename boost::property_traits::value_type; + using Point_ref = typename boost::property_traits::reference; + + using GeomTraits = typename Kernel_traits::type; + using FT = typename GeomTraits::FT; + + if(is_border(he, pmesh)) return FT{0}; - const vertex_descriptor v0 = target(he, m_pmesh); - const vertex_descriptor v1 = source(he, m_pmesh); - const vertex_descriptor v2 = target(next(he, m_pmesh), m_pmesh); + const vertex_descriptor v0 = target(he, pmesh); + const vertex_descriptor v1 = source(he, pmesh); + const vertex_descriptor v2 = target(next(he, pmesh), pmesh); - const Point_ref p0 = get(m_vpm, v0); - const Point_ref p1 = get(m_vpm, v1); - const Point_ref p2 = get(m_vpm, v2); + const Point_ref p0 = get(vpm, v0); + const Point_ref p1 = get(vpm, v1); + const Point_ref p2 = get(vpm, v2); - return cotangent_3(p0, p2, p1, m_traits); + return cotangent(p0, p2, p1); } }; @@ -200,7 +194,7 @@ public: // Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h (default version) // Surface_mesh_skeletonization -> Mean_curvature_flow_skeletonization.h (clamped version) template::type, typename GeomTraits = typename Kernel_traits< typename boost::property_traits::value_type>::type> class Cotangent_weight @@ -208,11 +202,10 @@ class Cotangent_weight using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - using Point_ref = typename boost::property_traits::reference; using FT = typename GeomTraits::FT; private: - const PolygonMesh& m_pmesh; + PolygonMesh* const* m_pmesh_ptr; const VertexPointMap m_vpm; const GeomTraits m_traits; @@ -220,33 +213,33 @@ private: bool m_bound_from_below; public: - Cotangent_weight(const PolygonMesh& pmesh, - const VertexPointMap vpm, - const GeomTraits& traits = GeomTraits(), - const bool use_clamped_version = false, - const bool bound_from_below = true) - : m_pmesh(pmesh), m_vpm(vpm), m_traits(traits), - m_use_clamped_version(use_clamped_version), - m_bound_from_below(bound_from_below) + // Surface_mesh_deformation has its own API locked by the concept SurfaceMeshDeformationWeights + Cotangent_weight() + : m_pmesh_ptr(nullptr), m_vpm(), m_traits(), m_use_clamped_version(false), m_bound_from_below(true) { } - decltype(auto) operator()(const halfedge_descriptor he) const + template + FT operator()(const halfedge_descriptor he, + const PolygonMesh& pmesh, + const VPM vpm) const { - if(is_border(he, m_pmesh)) + using Point_ref = typename boost::property_traits::reference; + + if(is_border(he, pmesh)) return FT{0}; auto half_weight = [&] (const halfedge_descriptor he) -> FT { - if(is_border(he, m_pmesh)) + if(is_border(he, pmesh)) return FT{0}; - const vertex_descriptor v0 = target(he, m_pmesh); - const vertex_descriptor v1 = source(he, m_pmesh); - const vertex_descriptor v2 = target(next(he, m_pmesh), m_pmesh); + const vertex_descriptor v0 = target(he, pmesh); + const vertex_descriptor v1 = source(he, pmesh); + const vertex_descriptor v2 = target(next(he, pmesh), pmesh); - const Point_ref p0 = get(m_vpm, v0); - const Point_ref p1 = get(m_vpm, v1); - const Point_ref p2 = get(m_vpm, v2); + const Point_ref p0 = get(vpm, v0); + const Point_ref p1 = get(vpm, v1); + const Point_ref p2 = get(vpm, v2); FT weight = 0; if (m_use_clamped_version) @@ -260,9 +253,26 @@ public: return weight / FT(2); }; - FT weight = half_weight(he) + half_weight(opposite(he, m_pmesh)); + FT weight = half_weight(he) + half_weight(opposite(he, pmesh)); return weight; } + +public: + Cotangent_weight(const PolygonMesh& pmesh, + const VertexPointMap vpm, + const GeomTraits& traits = GeomTraits(), + const bool use_clamped_version = false, + const bool bound_from_below = true) + : m_pmesh_ptr(&pmesh), m_vpm(vpm), m_traits(traits), + m_use_clamped_version(use_clamped_version), + m_bound_from_below(bound_from_below) + { } + + FT operator()(const halfedge_descriptor he) const + { + CGAL_precondition(m_pmesh_ptr != nullptr); + return this->operator()(he, *m_pmesh_ptr, m_vpm); + } }; // Undocumented cotangent weight class. From 72fdfbeb1846b5b125b7bdb58bdc6c81a6d17bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Nov 2022 14:44:57 +0100 Subject: [PATCH 131/426] Some const correctness + don't take pmaps by ref --- .../Weights/internal/pmp_weights_deprecated.h | 97 +++++++++---------- 1 file changed, 47 insertions(+), 50 deletions(-) diff --git a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h index 7a7cd14a4c2..40984d8bc0f 100644 --- a/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h +++ b/Weights/include/CGAL/Weights/internal/pmp_weights_deprecated.h @@ -51,7 +51,7 @@ struct Cotangent_value_Meyer_impl double operator()(vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, - const VertexPointMap& ppmap) + VertexPointMap ppmap) { typedef typename Kernel_traits< typename boost::property_traits::value_type >::Kernel::Vector_3 Vector; @@ -94,17 +94,17 @@ protected: typedef typename boost::property_traits::value_type Point; typedef typename Kernel_traits::Kernel::Vector_3 Vector; - PolygonMesh& pmesh_; + const PolygonMesh& pmesh_; Point_property_map ppmap_; public: - Cotangent_value_Meyer(PolygonMesh& pmesh_, + Cotangent_value_Meyer(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : pmesh_(pmesh_), ppmap_(vpmap_) { } - PolygonMesh& pmesh() { return pmesh_; } - Point_property_map& ppmap() { return ppmap_; } + const PolygonMesh& pmesh() { return pmesh_; } + Point_property_map ppmap() { return ppmap_; } double operator()(vertex_descriptor v0, vertex_descriptor v1, @@ -128,13 +128,13 @@ class Cotangent_value_Meyer_secure Point_property_map ppmap_; public: - Cotangent_value_Meyer_secure(PolygonMesh& pmesh_, + Cotangent_value_Meyer_secure(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : pmesh_(pmesh_), ppmap_(vpmap_) { } - PolygonMesh& pmesh() { return pmesh_; } - Point_property_map& ppmap() { return ppmap_; } + const PolygonMesh& pmesh() { return pmesh_; } + Point_property_map ppmap() { return ppmap_; } double operator()(vertex_descriptor v0, vertex_descriptor v1, @@ -165,13 +165,13 @@ class Cotangent_value_clamped : CotangentValue Cotangent_value_clamped() { } public: - Cotangent_value_clamped(PolygonMesh& pmesh_, + Cotangent_value_clamped(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -194,13 +194,13 @@ class Cotangent_value_clamped_2 : CotangentValue Cotangent_value_clamped_2() { } public: - Cotangent_value_clamped_2(PolygonMesh& pmesh_, + Cotangent_value_clamped_2(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -238,17 +238,16 @@ template > class Cotangent_value_minimum_zero : CotangentValue { - Cotangent_value_minimum_zero() - { } - public: - Cotangent_value_minimum_zero(PolygonMesh& pmesh_, + Cotangent_value_minimum_zero() { } + + Cotangent_value_minimum_zero(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -268,13 +267,13 @@ class Voronoi_area : CotangentValue { public: - Voronoi_area(PolygonMesh& pmesh_, + Voronoi_area(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::in_edge_iterator in_edge_iterator; @@ -348,13 +347,13 @@ class Cotangent_value_area_weighted Cotangent_value_area_weighted() { } public: - Cotangent_value_area_weighted(PolygonMesh& pmesh_, + Cotangent_value_area_weighted(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -385,7 +384,7 @@ struct Cotangent_weight_impl template double operator()(halfedge_descriptor he, PolygonMesh& pmesh, - const VertexPointMap& ppmap) + VertexPointMap ppmap) { const vertex_descriptor v0 = target(he, pmesh); const vertex_descriptor v1 = source(he, pmesh); @@ -422,20 +421,20 @@ template::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -512,13 +511,13 @@ class Single_cotangent_weight Single_cotangent_weight() { } public: - Single_cotangent_weight(PolygonMesh& pmesh_, + Single_cotangent_weight(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -557,13 +556,13 @@ class Cotangent_weight_with_triangle_area Cotangent_weight_with_triangle_area() { } public: - Cotangent_weight_with_triangle_area(PolygonMesh& pmesh_, + Cotangent_weight_with_triangle_area(const PolygonMesh& pmesh_, VertexPointMap vpmap_) : CotangentValue(pmesh_, vpmap_) { } - PolygonMesh& pmesh() { return CotangentValue::pmesh(); } - VertexPointMap& ppmap() { return CotangentValue::ppmap(); } + const PolygonMesh& pmesh() { return CotangentValue::pmesh(); } + VertexPointMap ppmap() { return CotangentValue::ppmap(); } double operator()(halfedge_descriptor he) { @@ -614,18 +613,16 @@ template::type> class Mean_value_weight { - // Mean_value_weight() {} - - PolygonMesh& pmesh_; + const PolygonMesh& pmesh_; VertexPointMap vpmap_; public: - Mean_value_weight(PolygonMesh& pmesh_, + Mean_value_weight(const PolygonMesh& pmesh_, VertexPointMap vpmap) : pmesh_(pmesh_), vpmap_(vpmap) { } - PolygonMesh& pmesh() { return pmesh_; } + const PolygonMesh& pmesh() { return pmesh_; } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -722,11 +719,11 @@ class Hybrid_weight Hybrid_weight() { } public: - Hybrid_weight(PolygonMesh& pmesh_) + Hybrid_weight(const PolygonMesh& pmesh_) : primary(pmesh_), secondary(pmesh_) { } - PolygonMesh& pmesh() { return primary.pmesh(); } + const PolygonMesh& pmesh() { return primary.pmesh(); } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; @@ -751,14 +748,14 @@ public: template class Scale_dependent_weight_fairing { - PolygonMesh& pmesh_; + const PolygonMesh& pmesh_; public: - Scale_dependent_weight_fairing(PolygonMesh& pmesh_) + Scale_dependent_weight_fairing(const PolygonMesh& pmesh_) : pmesh_(pmesh_) { } - PolygonMesh& pmesh() { return pmesh_; } + const PolygonMesh& pmesh() { return pmesh_; } typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; @@ -800,7 +797,7 @@ public: Cotangent_weight_with_voronoi_area_fairing(PM& pmesh_, VPMap vpmap_) - : voronoi_functor(pmesh_, vpmap_), + : voronoi_functor(pmesh_, vpmap_), cotangent_functor(pmesh_, vpmap_) { } @@ -867,7 +864,7 @@ public: typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - Uniform_weight_fairing(PolygonMesh&) { } + Uniform_weight_fairing(const PolygonMesh&) { } double w_ij(halfedge_descriptor /* e */) { return 1.0; } double w_i(vertex_descriptor /* v_i */) { return 1.0; } From 7163a188d308596389e36c075ba3307d6b792e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Nov 2022 14:45:12 +0100 Subject: [PATCH 132/426] Remove unused typedefs --- Weights/include/CGAL/Weights/internal/utils.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 744af8be2d3..850fccff1e8 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -214,7 +214,6 @@ typename GeomTraits::Point_3 rotate_point_3(const double angle_rad, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - using Point_3 = typename GeomTraits::Point_3; auto point_3 = traits.construct_point_3_object(); @@ -274,7 +273,6 @@ typename GeomTraits::Point_2 to_2d(const typename GeomTraits::Vector_3& b1, const GeomTraits& traits) { using FT = typename GeomTraits::FT; - using Point_2 = typename GeomTraits::Point_2; using Vector_3 = typename GeomTraits::Vector_3; auto dot_product_3 = traits.compute_scalar_product_3_object(); @@ -447,7 +445,6 @@ typename GeomTraits::FT area_3(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { - using FT = typename GeomTraits::FT; using Point_2 = typename GeomTraits::Point_2; using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; @@ -493,7 +490,6 @@ typename GeomTraits::FT positive_area_3(const typename GeomTraits::Point_3& p, const typename GeomTraits::Point_3& r, const GeomTraits& traits) { - using FT = typename GeomTraits::FT; using Get_sqrt = Get_sqrt; auto sqrt = Get_sqrt::sqrt_object(traits); From f744b2fbec0643e28deb3cb891b573e3fa68cc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Nov 2022 14:53:03 +0100 Subject: [PATCH 133/426] Fix placement of [[deprecated]] in old stop predicate aliases --- .../Policies/Edge_collapse/Count_ratio_stop_predicate.h | 2 +- .../Policies/Edge_collapse/Count_stop_predicate.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h index ec8f2a3a225..36b784e4dbf 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_ratio_stop_predicate.h @@ -26,7 +26,7 @@ namespace Surface_mesh_simplification { // Stops when the ratio of initial to current number of edges is below some value. template -using Count_ratio_stop_predicate = CGAL_DEPRECATED Edge_count_ratio_stop_predicate; +using Count_ratio_stop_predicate CGAL_DEPRECATED = Edge_count_ratio_stop_predicate; } // namespace Surface_mesh_simplification } // namespace CGAL diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h index c72b0bafea2..66b0f5fb8c9 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Count_stop_predicate.h @@ -26,7 +26,7 @@ namespace Surface_mesh_simplification { // Stops when the number of edges left falls below a given number. template -using Count_stop_predicate = CGAL_DEPRECATED Edge_count_stop_predicate; +using Count_stop_predicate CGAL_DEPRECATED = Edge_count_stop_predicate; } // namespace Surface_mesh_simplification } // namespace CGAL From d7b46586a86bae5d53e4e6898d2b00235d03e4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Nov 2022 14:53:31 +0100 Subject: [PATCH 134/426] Fix double include (also preventing de-activation of [[deprecated]] warnings...) --- .../test_edge_deprecated_stop_predicates.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp index e1b7be1fb1e..238a796eb03 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_deprecated_stop_predicates.cpp @@ -1,4 +1,3 @@ -#include #include #include From dd249a21f8ed06e2915c55e0bc318c3b7cd6dc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 8 Nov 2022 16:08:00 +0100 Subject: [PATCH 135/426] Fix intercompatiblity between APIs of Cotangent_weight --- .../include/CGAL/Weights/cotangent_weights.h | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index 89af4fa88d4..ce3471550b5 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -205,6 +205,10 @@ class Cotangent_weight using FT = typename GeomTraits::FT; private: + // These class members are used only when the constructor initializing them + // is used, but Surface_mesh_deformation has its own weight API locked + // by the concept SurfaceMeshDeformationWeights. + // A bit awkward, but better than duplicating code... PolygonMesh* const* m_pmesh_ptr; const VertexPointMap m_vpm; const GeomTraits m_traits; @@ -213,15 +217,17 @@ private: bool m_bound_from_below; public: - // Surface_mesh_deformation has its own API locked by the concept SurfaceMeshDeformationWeights Cotangent_weight() : m_pmesh_ptr(nullptr), m_vpm(), m_traits(), m_use_clamped_version(false), m_bound_from_below(true) { } - template + // Common API whether mesh/vpm/traits are initialized in the constructor, + // or passed in the operator() + template FT operator()(const halfedge_descriptor he, const PolygonMesh& pmesh, - const VPM vpm) const + const VPM vpm, + const GT& traits) const { using Point_ref = typename boost::property_traits::reference; @@ -243,9 +249,9 @@ public: FT weight = 0; if (m_use_clamped_version) - weight = cotangent_3_clamped(p1, p2, p0, m_traits); + weight = cotangent_3_clamped(p1, p2, p0, traits); else - weight = cotangent_3(p1, p2, p0, m_traits); + weight = cotangent_3(p1, p2, p0, traits); if(m_bound_from_below) weight = (CGAL::max)(FT(0), weight); @@ -257,7 +263,19 @@ public: return weight; } + // That is the API called by Surface_mesh_deformation + template + FT operator()(const halfedge_descriptor he, + const PolygonMesh& pmesh, + const VPM vpm) const + { + using Point = typename boost::property_traits::value_type; + using GT = typename Kernel_traits::type; + return this->operator()(he, pmesh, vpm, GT()); + } + public: + // This is the "normal" API: give all info to the constructor, and operator()(halfedge) Cotangent_weight(const PolygonMesh& pmesh, const VertexPointMap vpm, const GeomTraits& traits = GeomTraits(), @@ -271,7 +289,7 @@ public: FT operator()(const halfedge_descriptor he) const { CGAL_precondition(m_pmesh_ptr != nullptr); - return this->operator()(he, *m_pmesh_ptr, m_vpm); + return this->operator()(he, *m_pmesh_ptr, m_vpm, m_traits); } }; From f3f3af10bbe104ac5b49bd49700cc29d2ce91979 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Nov 2022 08:18:22 +0000 Subject: [PATCH 136/426] Remove CGAL_USE(dirname) as not defined --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 7a3f29db756..f74562e6e58 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1027,7 +1027,6 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data #else CGAL::Three::Three::warning("You need VTK to read a NRRD file"); - CGAL_USE(dirname); delete image; return QList(); #endif From fa6a2bddac4ec08f9f1d9f37269938573b1ee225 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Nov 2022 08:32:59 +0000 Subject: [PATCH 137/426] static_cast to avoid warning --- Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index ae1853a0a12..3f03e20badd 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -355,9 +355,9 @@ public: element.assign(rf, "red"); element.assign(gf, "green"); element.assign(bf, "blue"); - r = std::floor(rf*255); - g = std::floor(gf*255); - b = std::floor(bf*255); + r = static_cast(std::floor(rf*255)); + g = static_cast(std::floor(gf*255)); + b = static_cast(std::floor(bf*255)); } m_fcolor_map[fi] = CGAL::IO::Color(r, g, b); } From d1eca8310f955652616b3e1abdaa77f646ae004a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 7 Nov 2022 17:34:54 +0000 Subject: [PATCH 138/426] typo --- Orthtree/include/CGAL/Orthtree/Node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Orthtree/include/CGAL/Orthtree/Node.h b/Orthtree/include/CGAL/Orthtree/Node.h index 5a485adcae8..219959b81cc 100644 --- a/Orthtree/include/CGAL/Orthtree/Node.h +++ b/Orthtree/include/CGAL/Orthtree/Node.h @@ -345,7 +345,7 @@ public: } /*! - \brief returns the nth child fo this node. + \brief returns the nth child of this node. \pre `!is_null()` \pre `!is_leaf()` From 331ea2898a896b3a6b1c3cd4966f88c1b7221d41 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 8 Nov 2022 15:15:20 +0000 Subject: [PATCH 139/426] Orthtree: Fix memory leak --- Orthtree/include/CGAL/Orthtree.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index 5c8cc3ca021..8091001a32f 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -320,8 +320,21 @@ public: void refine(const Split_predicate& split_predicate) { // If the tree has already been refined, reset it - if (!m_root.is_leaf()) + if (!m_root.is_leaf()){ + std::queue nodes; + for (std::size_t i = 0; i < Degree::value; ++ i) + nodes.push (m_root[i]); + while (!nodes.empty()) + { + Node node = nodes.front(); + nodes.pop(); + if (!node.is_leaf()) + for (std::size_t i = 0; i < Degree::value; ++ i) + nodes.push (node[i]); + node.free(); + } m_root.unsplit(); + } // Reset the side length map, too m_side_per_depth.resize(1); From b603aab68005688abd8161862e420dd81a9d84c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 9 Nov 2022 09:55:29 +0100 Subject: [PATCH 140/426] Fix syntax --- Weights/include/CGAL/Weights/cotangent_weights.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index ce3471550b5..ba128a98502 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -209,7 +209,7 @@ private: // is used, but Surface_mesh_deformation has its own weight API locked // by the concept SurfaceMeshDeformationWeights. // A bit awkward, but better than duplicating code... - PolygonMesh* const* m_pmesh_ptr; + PolygonMesh const * const m_pmesh_ptr; const VertexPointMap m_vpm; const GeomTraits m_traits; From 07c60df0ce0d5f08f7fa0350f3f1d6dd500c9460 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Nov 2022 10:00:54 +0000 Subject: [PATCH 141/426] Polygon_mesh_processing: reparation -> repairing --- .../doc/Polygon_mesh_processing/Polygon_mesh_processing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index 08e11df647d..e7345cd3c4c 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -59,7 +59,7 @@ of the graph concepts defined in the package \ref PkgBGLRef. Using common graph enables having common input/output functions for all the models of these concepts. The page \ref PkgBGLIOFct provides an exhaustive description of the available I/O functions. In addition, this package offers the function `CGAL::Polygon_mesh_processing::IO::read_polygon_mesh()`, -which can perform some reparation if the input data do not represent a manifold surface. +which can perform some repairing if the input data do not represent a manifold surface. **************************************** \section PMPMeshing Meshing From 91ab7000b05a7fcb70338e36a73fbffc8567476c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 9 Nov 2022 11:25:27 +0000 Subject: [PATCH 142/426] Add a default parameter so that the test does something --- .../test/Surface_mesh_shortest_path/TestMesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 389cc215f11..c52c87fa50e 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -308,7 +308,7 @@ int main(int argc, char** argv) options.add_options() ("help,h", "Display help message") - ("polyhedron,p", po::value(), "Polyhedron input file") + ("polyhedron,p", po::value()->default_value("./data/test_mesh_6.off"), "Polyhedron input file") ("debugmode,d", po::value()->default_value(false), "Enable debug output") ("randomseed,r", po::value(), "Randomization seed value") ("trials,t", po::value()->default_value(1), "Number of trials to run") From 8ff15b25a015279856e22083e096d9aeaa3788c1 Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 9 Nov 2022 15:44:10 +0100 Subject: [PATCH 143/426] reparation -> repairing --- .../Polygon_mesh_processing/repair_polygon_soup_example.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp index 13da122a884..e58267d6da7 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/repair_polygon_soup_example.cpp @@ -84,9 +84,9 @@ int main(int, char**) polygons.push_back({0,1,2,3,4,3,2,1}); #endif - std::cout << "Before reparation, the soup has " << points.size() << " vertices and " << polygons.size() << " faces" << std::endl; + std::cout << "Before repairing, the soup has " << points.size() << " vertices and " << polygons.size() << " faces" << std::endl; PMP::repair_polygon_soup(points, polygons, CGAL::parameters::geom_traits(Array_traits())); - std::cout << "After reparation, the soup has " << points.size() << " vertices and " << polygons.size() << " faces" << std::endl; + std::cout << "After repairing, the soup has " << points.size() << " vertices and " << polygons.size() << " faces" << std::endl; Mesh mesh; PMP::orient_polygon_soup(points, polygons); From cd4de51a4035bf066e49abb9a2fa0d5ef96cba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 9 Nov 2022 18:17:31 +0100 Subject: [PATCH 144/426] fix inconsistency check --- .../Corefinement/Face_graph_output_builder.h | 17 +++++++++---- .../data-coref/floating_squares.off | 16 +++++++++++++ .../data-coref/hexa.off | 24 +++++++++++++++++++ .../test_corefinement_bool_op.cmd | 1 + 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/floating_squares.off create mode 100644 Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/hexa.off 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 bb52550f111..6709b3705eb 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 @@ -1069,15 +1069,15 @@ public: if (!used_to_clip_a_surface && !used_to_classify_patches && (!is_tm1_closed || !is_tm2_closed)) { //make sure there is no ambiguity in tm1 - if( (patch_status_was_not_already_set[0] && previous_bitvalue[0]!=is_patch_inside_tm2[patch_id_p1] ) || - (patch_status_was_not_already_set[1] && previous_bitvalue[1]!=is_patch_inside_tm2[patch_id_p2] ) ) + if( (!patch_status_was_not_already_set[0] && previous_bitvalue[0]!=is_patch_inside_tm2.test(patch_id_p1) ) || + (!patch_status_was_not_already_set[1] && previous_bitvalue[1]!=is_patch_inside_tm2.test(patch_id_p2) ) ) { impossible_operation.set(); return true; } //make sure there is no ambiguity in tm2 - if( (patch_status_was_not_already_set[2] && previous_bitvalue[2]!=is_patch_inside_tm2[patch_id_q1] ) || - (patch_status_was_not_already_set[3] && previous_bitvalue[3]!=is_patch_inside_tm2[patch_id_q2] ) ) + if( (!patch_status_was_not_already_set[2] && previous_bitvalue[2]!=is_patch_inside_tm1.test(patch_id_q1) ) || + (!patch_status_was_not_already_set[3] && previous_bitvalue[3]!=is_patch_inside_tm1.test(patch_id_q2) ) ) { impossible_operation.set(); return true; @@ -1092,6 +1092,15 @@ public: patch_status_not_set_tm2.reset(patch_id_q1); patch_status_not_set_tm2.reset(patch_id_q2); + // restore initial state, needed when checking in `inconsistent_classification()` + if (!is_tm1_closed || !is_tm2_closed) + { + 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); + } + #ifdef CGAL_COREFINEMENT_POLYHEDRA_DEBUG #warning: Factorize the orientation predicates. #endif //CGAL_COREFINEMENT_POLYHEDRA_DEBUG diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/floating_squares.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/floating_squares.off new file mode 100644 index 00000000000..86709d5e8ac --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/floating_squares.off @@ -0,0 +1,16 @@ +OFF +8 4 0 + +0 0 1 +1 0 1 +1 1 1 +0 1 1 +0 0 0 +1 0 0 +1 1 0 +0 1 0 +3 0 1 2 +3 2 3 0 +3 6 5 4 +3 4 7 6 + diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/hexa.off b/Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/hexa.off new file mode 100644 index 00000000000..4bbb30354ec --- /dev/null +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/data-coref/hexa.off @@ -0,0 +1,24 @@ +OFF +8 12 0 + +0.75 0.75 -1 +0.25 0.75 -1 +0.25 0.25 -1 +0.75 0.25 -1 +0.75 0.25 1 +0.75 0.75 1 +0.25 0.75 1 +0.25 0.25 1 +3 4 5 6 +3 0 3 2 +3 1 2 7 +3 0 1 6 +3 3 0 5 +3 2 3 4 +3 6 7 4 +3 2 1 0 +3 7 6 1 +3 6 5 0 +3 5 4 3 +3 4 7 2 + 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 99d70e20728..c11009e6559 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,2 +1,3 @@ ${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 From 178bc9e905bf9221542fb23cfa0c144a183b06e7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Nov 2022 09:24:26 +0000 Subject: [PATCH 145/426] More static cast --- Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index 3f03e20badd..8e274941fc1 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -301,9 +301,9 @@ public: element.assign(rf, "red"); element.assign(gf, "green"); element.assign(bf, "blue"); - r = std::floor(rf*255); - g = std::floor(gf*255); - b = std::floor(bf*255); + r = static_cast(std::floor(rf*255)); + g = static_cast(std::floor(gf*255)); + b = static_cast(std::floor(bf*255)); } m_vcolor_map[vi] = CGAL::IO::Color(r, g, b); } From 792ea897908fc5b5226a312713f6e7b84a19bc01 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 10 Nov 2022 14:34:52 +0100 Subject: [PATCH 146/426] Also give a default initialization for the random seed + fix typo --- .../test/Surface_mesh_shortest_path/TestMesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index c52c87fa50e..66ced595875 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -264,7 +264,7 @@ void run_program_instance(po::variables_map& vm) if (vm.count("randomseed")) { - programInstance.randomizer = new CGAL::Random(vm["randomSeed"].as()); + programInstance.randomizer = new CGAL::Random(vm["randomseed"].as()); } programInstance.debugMode = vm["debugmode"].as(); @@ -310,7 +310,7 @@ int main(int argc, char** argv) ("help,h", "Display help message") ("polyhedron,p", po::value()->default_value("./data/test_mesh_6.off"), "Polyhedron input file") ("debugmode,d", po::value()->default_value(false), "Enable debug output") - ("randomseed,r", po::value(), "Randomization seed value") + ("randomseed,r", po::value()->default_value(0), "Randomization seed value") ("trials,t", po::value()->default_value(1), "Number of trials to run") ("kernel,k", po::value()->default_value("epick"), "Kernel to use. One of \'ipick\', \'epick\', \'epeck\'") ; From 2bcc9ad8c591067f1b2aff6c33a6925629221245 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 13 Nov 2022 13:19:22 +0100 Subject: [PATCH 147/426] Link corrections - Correcting some permanent redirects - corrected link for to `max_element`, link was incorrect --- Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt | 2 +- Documentation/doc/Documentation/Third_party.txt | 2 +- Generalized_map/doc/Generalized_map/Generalized_map.txt | 2 +- STL_Extension/doc/STL_Extension/CGAL/algorithm.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index 58ada384336..423f49aae1c 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -542,7 +542,7 @@ Let d0\f$ \in \f$ D be a dart. Given i, 1 \f$ \leq \f$ i \section Combinatorial_mapDesign Design and Implementation History -The code of this package is inspired by Moka, a 3D topological modeler mainly developed by Frédéric Vidil and Guillaume Damiand (http://moka-modeller.sourceforge.net/). However, Moka was based on Generalized maps (and not Combinatorial maps), and the design was not \cgal "compatible". Thus, Guillaume Damiand started to develop a totally new package by mixing ideas taken from Moka with the design of the Halfedge data structure package of \cgal. Andreas Fabri and Sébastien Loriot contributed to the design, the coding, and to the documentation of the package, and Laurent Rineau helped for the design. Emma Michel contributed to the manual. Monique Teillaud and Bernd Gärtner contributed to the manual by giving useful remarks, really numerous and detailed for Monique. Ken Arroyo Ohori contributed to the two reverse orientation functions. +The code of this package is inspired by Moka, a 3D topological modeler mainly developed by Frédéric Vidil and Guillaume Damiand (https://moka-modeller.sourceforge.net/). However, Moka was based on Generalized maps (and not Combinatorial maps), and the design was not \cgal "compatible". Thus, Guillaume Damiand started to develop a totally new package by mixing ideas taken from Moka with the design of the Halfedge data structure package of \cgal. Andreas Fabri and Sébastien Loriot contributed to the design, the coding, and to the documentation of the package, and Laurent Rineau helped for the design. Emma Michel contributed to the manual. Monique Teillaud and Bernd Gärtner contributed to the manual by giving useful remarks, really numerous and detailed for Monique. Ken Arroyo Ohori contributed to the two reverse orientation functions. */ } /* namespace CGAL */ diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index d74dcdaf7b9..1b281911cc8 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -213,7 +213,7 @@ the handling of \pdb data. In \cgal, the \esbtl is used in an example of the \ref PkgSkinSurface3 package. -It can be downloaded from `http://esbtl.sourceforge.net/`. +It can be downloaded from `https://esbtl.sourceforge.net/`. \subsection thirdpartyTBB Intel TBB diff --git a/Generalized_map/doc/Generalized_map/Generalized_map.txt b/Generalized_map/doc/Generalized_map/Generalized_map.txt index 09ad37a4946..0b08884f40a 100644 --- a/Generalized_map/doc/Generalized_map/Generalized_map.txt +++ b/Generalized_map/doc/Generalized_map/Generalized_map.txt @@ -551,7 +551,7 @@ Let d0 \f$ \in \f$ D be a dart. Given i, 0 \f$ \leq \f$ \section Generalized_mapDesign Design and Implementation History -The code of this package followed the code of Combinatorial maps and was inspired by Moka, a 3D topological modeler that uses 3D generalized maps (http://moka-modeller.sourceforge.net/). +The code of this package followed the code of Combinatorial maps and was inspired by Moka, a 3D topological modeler that uses 3D generalized maps (https://moka-modeller.sourceforge.net/). */ } /* namespace CGAL */ diff --git a/STL_Extension/doc/STL_Extension/CGAL/algorithm.h b/STL_Extension/doc/STL_Extension/CGAL/algorithm.h index 13fa64df19b..2250a4a3e93 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/algorithm.h +++ b/STL_Extension/doc/STL_Extension/CGAL/algorithm.h @@ -42,7 +42,7 @@ Computes the minimal and the maximal element of a range. It is modeled after the \stl functions `std::min_element` and `std::max_element`. +href="https://en.cppreference.com/w/cpp/algorithm/max_element">`std::max_element`. The advantage of `min_max_element()` compared to calling both \stl functions is that one only iterates once over the sequence. This is more efficient especially for large and/or complex sequences. From dd6b993e07b3da2758f53f0de127ba310ab61a3a Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 13 Nov 2022 13:47:14 +0100 Subject: [PATCH 148/426] Documentation: spelling corrections Some spelling corrections --- .../Developer_manual/Chapter_iterators_and_circulators.txt | 2 +- .../Documentation/Developer_manual/Chapter_portability.txt | 4 ++-- .../doc/Documentation/Developer_manual/developer_manual.txt | 2 +- Documentation/doc/Documentation/Third_party.txt | 2 +- .../doc/Documentation/Tutorials/Tutorial_hello_world.txt | 2 +- Documentation/doc/Documentation/Usage.txt | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt index b7450d5cd3d..bb7567c4858 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt @@ -42,7 +42,7 @@ Thus we will not give a full description of these concept here but only a few hints about how to use and write handle, iterators and circulators in \cgal. Developers should consult the above-mentioned references to become familiar with the iterator, circulator and handle concepts. In particular, the notions of iterator and circulator ranges, -dereferencable and past-the-end values, +dereferenceable and past-the-end values, mutable and constant iterators and circulators, and the different categories (forward, bidirectional, random-access, etc.) of iterators and circulators, are fundamental. diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt index 1cb5aeadaab..9be392c25ce 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_portability.txt @@ -57,14 +57,14 @@ is used only internally. Requirements are lower for code that is not released such as the test-suite. Boost libraries already accepted in the C++ Standard Library Technical Report will be the first easy candidates (these are marked [TR1] in the list below). However, -wrapping the use within \cgal is generally adviced (like what is done +wrapping the use within \cgal is generally advised (like what is done in the `cpp11` namespace). Finally, the policy is that if a better alternative exists in Boost and is allowed, then \cgal code must use it instead of a \cgal version (which probably must be deprecated and phased out), trying not to break backward compatibility too much. -A list of reasonnable Boost libraries to use in the \cgal API is +A list of reasonable Boost libraries to use in the \cgal API is Graph, Optional, Parameter (for packages already using it), Property Map, Smart Pointers (for packages already using it), Variant. diff --git a/Documentation/doc/Documentation/Developer_manual/developer_manual.txt b/Documentation/doc/Documentation/Developer_manual/developer_manual.txt index b229577bbbc..a133c654aba 100644 --- a/Documentation/doc/Documentation/Developer_manual/developer_manual.txt +++ b/Documentation/doc/Documentation/Developer_manual/developer_manual.txt @@ -2,7 +2,7 @@ \page dev_manual Developer Manual -The developer manual is primarly aimed at \cgal developers, but may also be interesting to any \cgal user. +The developer manual is primarily aimed at \cgal developers, but may also be interesting to any \cgal user. - \subpage devman_intro - \subpage devman_code_format diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index d74dcdaf7b9..f24bb9e24a3 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -291,7 +291,7 @@ for more information. \attention \ceres indicates that `glog` is a recommended dependency. `glog` has `libunwind` as a recommended dependency. On some platforms, linking with `libunwind` was responsible for an increase of the runtime of the final application. -If you experience such an issue, we recommand to compile \ceres without `glog` support. +If you experience such an issue, we recommend to compile \ceres without `glog` support. \subsection thirdpartyGLPK GLPK diff --git a/Documentation/doc/Documentation/Tutorials/Tutorial_hello_world.txt b/Documentation/doc/Documentation/Tutorials/Tutorial_hello_world.txt index 06c056229ee..da30ca174cc 100644 --- a/Documentation/doc/Documentation/Tutorials/Tutorial_hello_world.txt +++ b/Documentation/doc/Documentation/Tutorials/Tutorial_hello_world.txt @@ -287,7 +287,7 @@ duplicate(T t) If you want to instantiate this function with a class `C`, this class must at least provide a copy constructor, and we say that class `C` must be a model of `CopyConstructible`. -A singleton class does not fulfill this requirment. +A singleton class does not fulfill this requirement. Another example is the function: diff --git a/Documentation/doc/Documentation/Usage.txt b/Documentation/doc/Documentation/Usage.txt index 8537ba3548e..9b69dcfea7f 100644 --- a/Documentation/doc/Documentation/Usage.txt +++ b/Documentation/doc/Documentation/Usage.txt @@ -46,7 +46,7 @@ or to build your own project using \cgal, see Section \ref secoptional3rdpartyso \cgal can be obtained through different channels. We recommend using a package manager as this will ensure that all essential third party dependencies are present, and with the correct versions. -You may also download the sources of \cgal directly, but it is then your responsability to independently +You may also download the sources of \cgal directly, but it is then your responsibility to independently acquire these dependencies. The examples and demos of \cgal are not included when you install \cgal with a package manager, From 014c06fd19af81c9bceeb37dec7610c747e06bd0 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 14 Nov 2022 15:32:47 +0100 Subject: [PATCH 149/426] spelling corrections Some spelling corrections (Directories starting with `A`) --- AABB_tree/demo/AABB_tree/Scene.cpp | 2 +- AABB_tree/doc/AABB_tree/aabb_tree.txt | 2 +- AABB_tree/include/CGAL/AABB_traits.h | 4 +-- .../test/AABB_tree/aabb_any_all_benchmark.cpp | 2 +- .../include/CGAL/Coercion_traits.h | 2 +- .../include/CGAL/Needs_parens_as_product.h | 4 +-- .../include/CGAL/Test/_test_rational_traits.h | 2 +- .../include/CGAL/Test/_test_real_embeddable.h | 2 +- .../Algebraic_curve_kernel_2.h | 4 +-- ...ebraic_real_quadratic_refinement_rep_bfi.h | 2 +- .../Algebraic_kernel_d/Algebraic_real_rep.h | 4 +-- .../Algebraic_real_rep_bfi.h | 2 +- .../Algebraic_kernel_d/Bitstream_descartes.h | 2 +- .../Bitstream_descartes_E08_tree.h | 2 +- .../Bitstream_descartes_rndl_tree.h | 8 ++--- .../Algebraic_kernel_d/Curve_analysis_2.h | 8 ++--- .../CGAL/Algebraic_kernel_d/Descartes.h | 4 +-- .../Algebraic_kernel_d/Event_line_builder.h | 4 +-- .../CGAL/Algebraic_kernel_d/Float_traits.h | 2 +- .../Real_embeddable_extension.h | 2 +- .../Algebraic_kernel_d/Status_line_CA_1.h | 2 +- .../Algebraic_kernel_d/Status_line_CPA_1.h | 2 +- .../CGAL/Algebraic_kernel_d/Xy_coordinate_2.h | 4 +-- .../algebraic_curve_kernel_2_tools.h | 2 +- .../include/CGAL/Algebraic_kernel_d/flags.h | 6 ++-- .../include/CGAL/Algebraic_kernel_d_1.h | 2 +- .../include/CGAL/RS/algebraic_1.h | 2 +- ...l_functions_on_roots_and_polynomials_2_3.h | 2 +- .../doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h | 2 +- Alpha_shapes_2/include/CGAL/Alpha_shape_2.h | 8 ++--- .../Alpha_shapes_2/internal/Lazy_alpha_nt_2.h | 2 +- Alpha_shapes_3/TODO | 4 +-- .../demo/Alpha_shapes_3/CMakeLists.txt | 2 +- .../doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h | 2 +- .../ex_alpha_shapes_with_fast_location_3.cpp | 2 +- Alpha_shapes_3/include/CGAL/Alpha_shape_3.h | 16 ++++----- .../Alpha_shapes_3/internal/Lazy_alpha_nt_3.h | 2 +- .../include/CGAL/Fixed_alpha_shape_3.h | 6 ++-- .../include/CGAL/_test_cls_alpha_shape_3.h | 6 ++-- .../doc/Alpha_wrap_3/alpha_wrap_3.txt | 2 +- .../CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h | 6 ++-- .../Alpha_wrap_3/internal/splitting_helper.h | 2 +- .../Apollonius_graph_2_impl.h | 2 +- .../Apollonius_graph_hierarchy_2_impl.h | 2 +- .../uncertain/Uncertain_vertex_conflict_2.h | 14 ++++---- .../test/Apollonius_graph_2/include/test.h | 8 ++--- .../include/CGAL/CORE_arithmetic_kernel.h | 2 +- .../Arithmetic_kernel/description.txt | 4 +-- .../Arrangement_on_surface_2/Conic_reader.hpp | 4 +-- .../Arrangement_on_surface_2/Double.hpp | 4 +-- .../Point_parser_visitor.hpp | 2 +- .../Polyline_reader.hpp | 2 +- .../Segment_reader.hpp | 4 +-- .../Arrangement_on_surface_2/arr_bench.cpp | 4 +-- .../ArrangementGraphicsItem.cpp | 6 ++-- .../ArrangementPainterOstream.cpp | 2 +- .../demo/Arrangement_on_surface_2/FloodFill.h | 2 +- .../GraphicsSceneMixin.h | 2 +- .../Arrangement_on_surface_2/Utils/Utils.cpp | 4 +-- .../Arrangement_on_surface_2/Utils/Utils.h | 2 +- .../CGAL/Arr_conic_traits_2.h | 2 +- .../Arr_geodesic_arc_on_sphere_traits_2.h | 4 +-- .../CGAL/Arr_overlay_2.h | 2 +- .../CGAL/Arr_polycurve_traits_2.h | 6 ++-- .../CGAL/Arr_polyline_traits_2.h | 2 +- .../CGAL/Arr_triangulation_point_location.h | 4 +-- .../CGAL/Arrangement_2.h | 2 +- .../CGAL/Arrangement_on_surface_2.h | 2 +- ...rrTraits--CompareXOnBoundaryOfCurveEnd_2.h | 4 +-- .../Concepts/ArrTraits--Merge_2.h | 2 +- .../Concepts/ArrangementDcelFace.h | 2 +- .../Concepts/ArrangementDcelWithRebind.h | 2 +- .../ArrangementOpenBoundaryTraits_2.h | 2 +- .../Concepts/ArrangementTopologyTraits.h | 4 +-- .../Arrangement_on_surface_2/conics.cpp | 2 +- .../overlay_unbounded.cpp | 2 +- .../polycurve_circular_arc.cpp | 4 +-- .../polycurve_conic.cpp | 2 +- .../include/CGAL/Arr_Bezier_curve_traits_2.h | 4 +-- .../include/CGAL/Arr_accessor.h | 4 +-- .../CGAL/Arr_algebraic_segment_traits_2.h | 4 +-- .../CGAL/Arr_circle_segment_traits_2.h | 6 ++-- .../include/CGAL/Arr_conic_traits_2.h | 2 +- .../include/CGAL/Arr_counting_traits_2.h | 2 +- .../include/CGAL/Arr_curve_data_traits_2.h | 6 ++-- ...eodesic_arc_on_sphere_partition_traits_2.h | 12 +++---- .../Arr_geodesic_arc_on_sphere_traits_2.h | 24 ++++++------- .../CGAL/Arr_geometry_traits/Arr_plane_3.h | 2 +- .../Bezier_bounding_rational_traits.h | 10 +++--- .../CGAL/Arr_geometry_traits/Bezier_cache.h | 2 +- .../CGAL/Arr_geometry_traits/Bezier_curve_2.h | 6 ++-- .../CGAL/Arr_geometry_traits/Bezier_point_2.h | 8 ++--- .../Arr_geometry_traits/Bezier_x_monotone_2.h | 16 ++++----- .../Arr_geometry_traits/Circle_segment_2.h | 2 +- .../CGAL/Arr_geometry_traits/Conic_arc_2.h | 26 +++++++------- .../CGAL/Arr_geometry_traits/Conic_point_2.h | 4 +-- .../Conic_x_monotone_arc_2.h | 12 +++---- .../Arr_geometry_traits/One_root_number.h | 4 +-- .../CGAL/Arr_geometry_traits/Rational_arc_2.h | 14 ++++---- .../CGAL/Arr_landmarks_point_location.h | 2 +- .../include/CGAL/Arr_linear_traits_2.h | 2 +- .../CGAL/Arr_non_caching_segment_traits_2.h | 8 ++--- .../include/CGAL/Arr_observer.h | 10 +++--- .../Arr_landmarks_pl_impl.h | 4 +-- .../Arr_lm_halton_generator.h | 2 +- .../Arr_lm_random_generator.h | 2 +- .../Arr_simple_point_location_impl.h | 6 ++-- .../Arr_trapezoid_ric_pl_impl.h | 4 +-- .../Arr_triangulation_pl_functions.h | 6 ++-- .../Arr_triangulation_pl_impl.h | 6 ++-- .../Arr_walk_along_line_pl_impl.h | 10 +++--- .../CGAL/Arr_point_location/Td_X_trapezoid.h | 4 +-- .../CGAL/Arr_point_location/Td_active_edge.h | 2 +- .../Td_active_fictitious_vertex.h | 2 +- .../Arr_point_location/Td_active_trapezoid.h | 2 +- .../Arr_point_location/Td_active_vertex.h | 2 +- .../CGAL/Arr_point_location/Td_dag_node.h | 2 +- .../Arr_point_location/Td_inactive_edge.h | 2 +- .../Td_inactive_fictitious_vertex.h | 2 +- .../Td_inactive_trapezoid.h | 2 +- .../Arr_point_location/Td_inactive_vertex.h | 2 +- .../CGAL/Arr_point_location/Td_traits.h | 4 +-- .../Trapezoidal_decomposition_2.h | 16 ++++----- .../Trapezoidal_decomposition_2_impl.h | 18 +++++----- .../CGAL/Arr_polycurve_basic_traits_2.h | 8 ++--- .../include/CGAL/Arr_polycurve_traits_2.h | 2 +- .../CGAL/Arr_rat_arc/Rational_arc_d_1.h | 14 ++++---- .../include/CGAL/Arr_segment_traits_2.h | 2 +- .../include/CGAL/Arr_simple_point_location.h | 2 +- .../Arr_polyhedral_sgm.h | 2 +- .../Arr_polyhedral_sgm_polyhedron_3.h | 4 +-- .../Arr_spherical_gaussian_map_3.h | 14 ++++---- .../Arr_transform_on_sphere.h | 4 +-- .../CGAL/Arr_spherical_topology_traits_2.h | 4 +-- .../Arr_inc_insertion_zone_visitor.h | 4 +-- .../Arr_planar_topology_traits_base_2.h | 4 +-- .../Arr_spherical_construction_helper.h | 2 +- .../Arr_spherical_insertion_helper.h | 2 +- .../Arr_spherical_topology_traits_2_impl.h | 6 ++-- .../Arr_spherical_vert_decomp_helper.h | 4 +-- .../Arr_unb_planar_topology_traits_2_impl.h | 2 +- .../include/CGAL/Arr_tracing_traits_2.h | 4 +-- .../CGAL/Arr_vertical_decomposition_2.h | 4 +-- .../Arrangement_2/Arr_compute_zone_visitor.h | 8 ++--- .../Arr_do_intersect_zone_visitor.h | 4 +-- .../CGAL/Arrangement_2/Arr_traits_adaptor_2.h | 12 +++---- .../Arr_traits_adaptor_2_dispatching.h | 2 +- .../Arrangement_2/Arr_with_history_accessor.h | 2 +- .../Arrangement_on_surface_2_global.h | 8 ++--- .../Arrangement_on_surface_2_impl.h | 24 ++++++------- .../Arrangement_2/Arrangement_zone_2_impl.h | 10 +++--- .../Arrangement_2/arrangement_type_traits.h | 2 +- .../CGAL/Arrangement_2/graph_traits_dual.h | 12 +++---- .../include/CGAL/Arrangement_on_surface_2.h | 34 +++++++++---------- .../include/CGAL/Arrangement_zone_2.h | 10 +++--- .../CGAL/CORE_algebraic_number_traits.h | 2 +- .../CGAL/Curved_kernel_via_analysis_2/Arc_2.h | 12 +++---- .../Curve_interval_arcno_cache.h | 2 +- .../Curve_renderer_facade.h | 4 +-- .../Curved_kernel_via_analysis_2_functors.h | 6 ++-- .../Curved_kernel_via_analysis_2_impl.h | 2 +- ...ltered_curved_kernel_via_analysis_2_impl.h | 2 +- .../Generic_arc_2.h | 2 +- .../Generic_point_2.h | 2 +- .../Make_x_monotone_2.h | 2 +- .../Curved_kernel_via_analysis_2/Point_2.h | 2 +- .../gfx/Curve_renderer_2.h | 4 +-- .../gfx/Curve_renderer_internals.h | 10 +++--- .../gfx/Curve_renderer_traits.h | 2 +- .../gfx/Subdivision_2.h | 4 +-- .../test/simple_models.h | 6 ++-- .../include/CGAL/IO/Arrangement_2_reader.h | 2 +- .../include/CGAL/IO/Arrangement_2_writer.h | 2 +- .../include/CGAL/IO/Fig_stream.h | 8 ++--- .../Arr_basic_insertion_traits_2.h | 2 +- .../Surface_sweep_2/Arr_construction_event.h | 2 +- .../Arr_construction_event_base.h | 6 ++-- .../Arr_construction_ss_visitor.h | 2 +- .../Arr_construction_subcurve.h | 2 +- .../Surface_sweep_2/Arr_insertion_traits_2.h | 2 +- .../Surface_sweep_2/Arr_overlay_ss_visitor.h | 12 +++---- .../Surface_sweep_2/Arr_overlay_traits_2.h | 10 +++--- .../include/CGAL/graph_traits_Arrangement_2.h | 2 +- .../Construction_test.h | 4 +-- .../Point_location_test.h | 4 +-- .../test/Arrangement_on_surface_2/TODO | 2 +- .../Traits_base_test.h | 4 +-- .../Arrangement_on_surface_2/Traits_test.h | 8 ++--- .../Vertical_decomposition_test.h | 2 +- .../test_arc_polycurve.cpp | 2 +- .../test_conic_polycurve.cpp | 10 +++--- .../Arrangement_on_surface_2/test_traits.cpp | 2 +- 192 files changed, 465 insertions(+), 465 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp index 793adcd71ef..abf09661b43 100644 --- a/AABB_tree/demo/AABB_tree/Scene.cpp +++ b/AABB_tree/demo/AABB_tree/Scene.cpp @@ -334,7 +334,7 @@ void Scene::compute_elements(int mode) pos_points.push_back(p.z()); } } - //The Segements + //The segments { std::list::iterator sit; for(sit = m_segments.begin(); sit != m_segments.end(); sit++) diff --git a/AABB_tree/doc/AABB_tree/aabb_tree.txt b/AABB_tree/doc/AABB_tree/aabb_tree.txt index b64248012d3..bdeefbdd032 100644 --- a/AABB_tree/doc/AABB_tree/aabb_tree.txt +++ b/AABB_tree/doc/AABB_tree/aabb_tree.txt @@ -390,7 +390,7 @@ query and location of query in space. number of primitive data (greater than 2M faces in our experiments) however we noticed that it is not necessary (and sometimes even slower) to use all reference points when constructing the - KD-tree. In these cases we recommend to specify trough the function + KD-tree. In these cases we recommend to specify through the function ` AABB_tree::accelerate_distance_queries()` fewer reference points (typically not more than 100K) evenly distributed over the input primitives. diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index 4e83a3ad7c1..b2eb87dc8f6 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -213,7 +213,7 @@ public: /// Point query type. typedef typename GeomTraits::Point_3 Point_3; - /// additionnal types for the search tree, required by the RangeSearchTraits concept + /// additional types for the search tree, required by the RangeSearchTraits concept /// \bug This is not documented for now in the AABBTraits concept. typedef typename GeomTraits::Iso_cuboid_3 Iso_cuboid_3; @@ -254,7 +254,7 @@ public: * @param beyond iterator on beyond element * @param bbox the bounding box of [first,beyond[ * - * Sorts the range defined by [first,beyond[. Sort is achieved on bbox longuest + * Sorts the range defined by [first,beyond[. Sort is achieved on bbox longest * axis, using the comparison function `_less_than` (dim in {x,y,z}) */ class Split_primitives diff --git a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp index d57f7dcc916..5e09d6c2291 100644 --- a/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp +++ b/AABB_tree/test/AABB_tree/aabb_any_all_benchmark.cpp @@ -131,7 +131,7 @@ std::tuple test(const char* name) { tu = std::make_tuple(intersect(lines.begin(), lines.end(), tree, counter), intersect(rays.begin(), rays.end(), tree, counter), intersect(segments.begin(), segments.end(), tree, counter), - // cant use counter here + // can't use counter here 0); std::get<3>(tu) = counter; } diff --git a/Algebraic_foundations/include/CGAL/Coercion_traits.h b/Algebraic_foundations/include/CGAL/Coercion_traits.h index 7d384fe9c08..14acb431c7c 100644 --- a/Algebraic_foundations/include/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Coercion_traits.h @@ -29,7 +29,7 @@ #include -// Makro to define an additional operator for binary functors which takes +// Macro to define an additional operator for binary functors which takes // two number types as parameters that are interoperable with the // number type #define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \ diff --git a/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h b/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h index 4cc9ebcd504..b2fc44ac66f 100644 --- a/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h +++ b/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h @@ -28,7 +28,7 @@ class Parens_as_product_tag {}; /*! \ingroup NiX_io_parens * \brief decides whether this number requires parentheses - * in case it appears within a produkt. + * in case it appears within a product. */ template struct Needs_parens_as_product{ @@ -37,7 +37,7 @@ struct Needs_parens_as_product{ /*! \ingroup NiX_io_parens * \brief decides whether this number requires parentheses - * in case it appears within a produkt. + * in case it appears within a product. */ template inline bool needs_parens_as_product(const NT& x){ diff --git a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h index 17c1a407ef6..5efda40bc2f 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_rational_traits.h @@ -39,7 +39,7 @@ void test_rational_traits(){ assert( Rational_traits().make_rational(std::make_pair(x,x)) == Rational(1)); assert( Rational_traits().make_rational(std::make_pair(7,RT(2))) == x); - // gloabal function to_rational + // global function to_rational x = CGAL::to_rational(3.5); assert( x == Rational(7)/Rational(2)); } diff --git a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h index f3740e853f6..bb67e3f57a5 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_real_embeddable.h @@ -84,7 +84,7 @@ namespace CGAL { assert(to_interval(Type(42)).first > 41.99); assert(to_interval(Type(42)).second < 42.01); - // test neagtive numbers as well to catch obvious sign + // test negative numbers as well to catch obvious sign // errors assert( -42.0 >= to_interval( -Type(42) ).first ); assert( -42.0 <= to_interval( -Type(42) ).second ); diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index 9e2c0398fe2..7adc56c978f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -840,7 +840,7 @@ public: } else { // more work! We should not assume that each // roots[i].first has f or g as defining polynomial, because - // the representation might have been simplifed + // the representation might have been simplified // Here's the safe way: Take the simpler of the curves // (but the one without vertical component!) @@ -922,7 +922,7 @@ public: * * \attention{This method returns the y-coordinate in isolating interval * representation. Calculating such a representation is usually a time- - * consuming taks, since it is against the "y-per-x"-view that we take + * consuming task, since it is against the "y-per-x"-view that we take * in our kernel. Therefore, it is recommended, if possible, * to use the functors * \c Approximate_absolute_y_2 and \c Approximate_relative_y_2 that diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h index 19f447c08f2..e3453818b63 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h @@ -494,7 +494,7 @@ public: } } }; -} // namepace internal +} // namespace internal } //namespace CGAL diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h index 97544ae2985..cecfb57c971 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h @@ -38,7 +38,7 @@ namespace internal { // sign_at_low_ = polynomial_.evaluate(low_) // x is the only root of polynomial_ in the open interval ]low_,high_[ // low_ != x != high -// ******************* EXEPTION ******************* +// ******************* EXCEPTION ******************* // x is rational: in this case low=high=x template< class Coefficient_, class Rational_> @@ -135,7 +135,7 @@ protected: // interval_option left out - // trys to set rational if degree is 1 + // tries to set rational if degree is 1 typedef typename CGAL::Coercion_traits< Coefficient, Rational >::Type RET; set_rational(RET()); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h index f9aaa350e87..5a0aacac94f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h @@ -52,7 +52,7 @@ namespace internal { // sign_at_low_ = polynomial_.evaluate(low_) // x is the only root of polynomial_ in the open interval ]low_,high_[ // low_ != x != high -// ******************* EXEPTION ******************* +// ******************* EXCEPTION ******************* // x is rational: in this case low=high=x diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h index f1f45aab56c..53a62ea7aba 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h @@ -1217,7 +1217,7 @@ public: * * The polynomial \c f must have exactly \c m real roots, counted without * multiplicity, and the degree of gcd(f,f') must be \c k. In this - * case, the constructor either isolates the real roots of \c f sucessfully + * case, the constructor either isolates the real roots of \c f successfully * or a Non_generic_position_exception is thrown. Such an exception * certainly occurs if \c f has more than one multiple real root. If \c f * has at most one multiple root over the complex numbers, the roots are diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index d78d50acfd0..c6deea5e0d7 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -443,7 +443,7 @@ private: Integer_vector coeff_; // wrt [lower_, upper_], approximate int min_var_, max_var_; bool coeff_update_delayed_; - // "state data" (copied en bloc by .copy_state_from()) + // "state data" (copied en block by .copy_state_from()) long subdepth_bound_, subdepth_current_; long log_eps_; // $q - p$ long log_C_eps_; // $q - p + 4n$ diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 869b758cb12..5f4b6eafa6f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -531,7 +531,7 @@ private: long log_bdry_den_; Integer_vector coeff_; // wrt [lower_, upper_], approximate int min_var_, max_var_; - // "state data" (copied en bloc by .copy_state_from()) + // "state data" (copied en block by .copy_state_from()) long subdiv_tries_, subdiv_fails_; long recdepth_; long log_sep_, delta_log_sep_, log_eps_, log_C_eps_; @@ -736,7 +736,7 @@ public: Supplying a traits class This class is actually a class template. - To use it, you need to instanciate it with a traits class + To use it, you need to instantiate it with a traits class that defines the following three types and the various functors on them listed below. - \c Coefficient: The type of coefficients supplied @@ -749,7 +749,7 @@ public: - \c Bound: \c lower() and \c upper() return interval boundaries in this type. Must be \c Assignable. The canonical choice is \c NiX::Exact_float_number. - If you never instanciate \c lower() and \c upper() + If you never instantiate \c lower() and \c upper() (maybe use \c boundaries() instead), you might be lucky and get away with typedef'ing this to \c void. @@ -772,7 +772,7 @@ public: - \c Lower_bound_log2_abs: A \c UnaryFunction with signature long l = Lower_bound_log2_abs()(Coefficient x). The result \c l must be a lower bound to log2(|x|). - If \c Coefficient posesses \c NiX::NT_traits::Floor_log2_abs, + If \c Coefficient possesses \c NiX::NT_traits::Floor_log2_abs, you can simply use that. - \c lower_bound_log2_abs_object(): A \c const member function taking no arguments and returning a function object diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index 0a4db6d8b3b..b8bd5995a6f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -481,7 +481,7 @@ public: * \c internal::Zero_resultant_exception, * instead of performing a shear. * - * \Todo Currently the defualt strategy has been changed to SHEAR_STRATEGY + * \Todo Currently the default strategy has been changed to SHEAR_STRATEGY * because there exist a problem if vertical asymtotes are present at * the rational x-coordinate. */ @@ -1167,7 +1167,7 @@ public: /*! * \brief returns the status line for the interval - * preceeding the ith event + * preceding the ith event * * Returns a status line for a reference x-coordinate of the ith * interval of the curve. If called multiple times for the same i, @@ -1827,7 +1827,7 @@ private: static_cast(lcoeff_roots.size()) && event_values[i]==lcoeff_roots[curr_lcoeff_index]) { // We have a root of the leading coefficient - // of the primitve polynomial + // of the primitive polynomial curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index; curr_event.mult_of_prim_lcoeff_root = lcoeff_mults[curr_lcoeff_index]; @@ -1867,7 +1867,7 @@ private: static_cast(lcoeff_roots.size()) && event_values[i]==lcoeff_roots[curr_lcoeff_index]) { // We have a root of the leading coefficient - // of the primitve polynomial + // of the primitive polynomial curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index; curr_event.mult_of_prim_lcoeff_root = lcoeff_mults[curr_lcoeff_index]; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Descartes.h index 9c4264a2c29..0adc7652b04 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Descartes.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Descartes.h @@ -328,7 +328,7 @@ private: return false; return (P[0] != Coeff__(0) && P.evaluate(Coeff__(1)) != Coeff__(0)); } - //! Descartes algoritm to determine isolating intervals for the roots + //! Descartes algorithm to determine isolating intervals for the roots //! lying in the interval (0,1). // The parameters $(i,D)$ describe the interval $(i/2^D, (i+1)/2^D)$. // Here $0\leq i < 2^D$. @@ -389,7 +389,7 @@ private: } - //! Strong Descartes algoritm to determine isolating intervals for the + //! Strong Descartes algorithm to determine isolating intervals for the //! roots lying in the interval (0,1), where the first //! derivative have no sign change. \pre $P$ has only one root in the //! interval given by $(i,D)$. diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Event_line_builder.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Event_line_builder.h index 978fb2a5e88..38baa5ead22 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Event_line_builder.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Event_line_builder.h @@ -118,7 +118,7 @@ public: * curve. * * Additionally, the \c id of the event line to be created has to be - * specfied, and + * specified, and * the number of arcs that are entering from the left and leaving to the * right are needed. Furthermore, the flag \c root_of_resultant tells * whether \c alpha is a root of the resultant of the specified curve, and @@ -314,7 +314,7 @@ protected: * * If the first elements in the sequence are known to be zero, * \c first_elements_zero can be set accordingly. The zero test is then - * ommitted for that leading elements. + * omitted for that leading elements. */ template std::pair compute_mk(Algebraic_real_1 alpha, diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h index 0c451058202..6700f1dcaaf 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Float_traits.h @@ -41,7 +41,7 @@ namespace CGAL { namespace internal { -// Don't define default, results in more convinient compiler messages +// Don't define default, results in more convenient compiler messages template< class Type > class Float_traits; // { // public: diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h index 880b4e82720..31e43a0f2dd 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Real_embeddable_extension.h @@ -54,7 +54,7 @@ namespace internal { // TODO: Implement array in source code file // extern const signed char floor_log2_4bit[16]; // see src/floor_log2_4bit.C -// Don't define default, results in more convinient compiler messages +// Don't define default, results in more convenient compiler messages template< class Type > class Real_embeddable_extension; // { // public: diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h index eebf8f4bd26..2bd1c6515c1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h @@ -323,7 +323,7 @@ public: } /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CA_1(Rep rep) : Base(rep) { diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h index ba9ac1e30f9..26fb94416d1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CPA_1.h @@ -208,7 +208,7 @@ public: protected: /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CPA_1(Rep rep) : Base(rep) { diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h index 3ae2a59e961..81a74c56c38 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h @@ -233,7 +233,7 @@ public: } /*!\brief - * constructs a point from a given represenation + * constructs a point from a given representation */ Xy_coordinate_2(Rep rep) : Base(rep) { @@ -254,7 +254,7 @@ public: /*! * \brief y-coordinate of this point * - * Note: In general, this method results in a extremly large polynomial + * Note: In general, this method results in a extremely large polynomial * for the y-coordinate. It is recommended to use it carefully, * and using get_approximation_y() instead whenever approximations suffice. */ diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h index e4558076367..1609fdbaa6b 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.h @@ -157,7 +157,7 @@ template typename AlgebraicKernel_1::Bound } /*! - * \brief finds a Rational value rightt of an Algebraic real alpha + * \brief finds a Rational value right of an Algebraic real alpha */ template typename AlgebraicKernel_1::Bound bound_right_of(const AlgebraicKernel_1* kernel, diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h index 4b3629b29ec..6b402fbfd23 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h @@ -87,10 +87,10 @@ * (i.e., vertical cusps, isolated points on arcs), and usual regular points. * The candidate point on each status line can be checked for being singular * using this flag. This gives additional information but increases - * compuation time + * computation time * * WARNING: Currently, the status line does not store the additional - * information whether a point is singluar or not. + * information whether a point is singular or not. * Therefore, there is currently no reasons to set this flag. It is still * contained for possible further extension of the status line. */ @@ -171,7 +171,7 @@ /** * The algorithm can also handle non-y-regular curves without shearing, * in case that the resultant multiplicity at vertical asymptotes is one. - * This special treatement can be switched off by setting this flag. + * This special treatment can be switched off by setting this flag. * It is not recommended to do this because of efficiency */ #ifndef CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h index 8b5f1e321ce..4146f072c1d 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h @@ -111,7 +111,7 @@ public: void operator()( Type& t, int rel_prec ) const { // If t is zero, we can refine the interval to - // infinite precission + // infinite precision if( CGAL::is_zero( t ) ) { t = Type(0); } else { diff --git a/Algebraic_kernel_d/include/CGAL/RS/algebraic_1.h b/Algebraic_kernel_d/include/CGAL/RS/algebraic_1.h index ecc3ec4d903..cbbc66eb9cd 100644 --- a/Algebraic_kernel_d/include/CGAL/RS/algebraic_1.h +++ b/Algebraic_kernel_d/include/CGAL/RS/algebraic_1.h @@ -34,7 +34,7 @@ namespace RS_AK1{ // Refiner_()(const Polynomial_&,Bound_&,Bound_&,int p); // // The fourth template argument is a comparator, a function object that -// receives the polynomials and bounds defining two algebraic numbres and +// receives the polynomials and bounds defining two algebraic numbers and // just compares them, returning a CGAL::Comparison_result. The signature // of a comparator must be: // CGAL::Comparison_result diff --git a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h index 65fb8edce6d..e3d6adbe51a 100644 --- a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h +++ b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_on_roots_and_polynomials_2_3.h @@ -46,7 +46,7 @@ namespace CGAL { typedef typename AK::Polynomial_1_3 Polynomial_1_3; // The degenerated cases are 2 tangent spheres // os 2 non-intersecting spheres - // beacause we cannot have infinitely many solutions + // because we cannot have infinitely many solutions if(e1 == e2) { if(tangent(e1,e3)) { Polynomial_1_3 p = plane_from_2_spheres(e1,e3); diff --git a/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h index 579b561c0a2..98dedd0f75b 100644 --- a/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/doc/Alpha_shapes_2/CGAL/Alpha_shape_2.h @@ -47,7 +47,7 @@ how to convert from the camouflaged `CGAL::Point_3` to the two-dimensional point of `CGAL::Simple_cartesian`. In this case, a partial specialization of `Cartesian_converter` must be provided by the user. An example of such specialization is given in the example \ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp". -
  • The tag `ExactAlphaComparisonTag` cannot be used in conjonction with periodic triangulations. +
  • The tag `ExactAlphaComparisonTag` cannot be used in conjunction with periodic triangulations. When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink, the evaluations of predicates such as `Side_of_oriented_circle_2` are done lazily. Consequently, the predicates store pointers to the geometrical positions of the diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h index 373dc515573..3c4cb4b7d30 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h @@ -57,7 +57,7 @@ public: typedef typename Dt::Geom_traits Gt; typedef typename Dt::Triangulation_data_structure Tds; - // The Exact Comparison Tag cannot be used in conjonction with periodic triangulations + // The Exact Comparison Tag cannot be used in conjunction with periodic triangulations // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. @@ -432,7 +432,7 @@ public: private: // the dynamic version is not yet implemented - // desactivate the triangulation member functions + // deactivate the triangulation member functions Vertex_handle insert(const Point& p); // Inserts point `p' in the alpha shape and returns the // corresponding vertex of the underlying Delaunay triangulation. @@ -744,7 +744,7 @@ private: //--------------------------------------------------------------------- private: - // prevent default copy constructor and default assigment + // prevent default copy constructor and default assignment Alpha_shape_2(const Alpha_shape_2& A); @@ -1435,7 +1435,7 @@ template < class Dt, class EACT > typename Alpha_shape_2::Type_of_alpha Alpha_shape_2::find_alpha_solid() const { - // compute the minumum alpha such that all data points + // compute the minimum alpha such that all data points // are either on the boundary or in the interior // not necessarily connected // starting point for searching diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h index af93607e2d5..cc734b7f4b6 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shapes_2/internal/Lazy_alpha_nt_2.h @@ -144,7 +144,7 @@ class Lazy_alpha_nt_2 typedef typename Types::Exact_point Exact_point; typedef typename Types::Input_point Input_point; - //Convertion functions + //Conversion functions Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_2 must be convertible using the Cartesian converter diff --git a/Alpha_shapes_3/TODO b/Alpha_shapes_3/TODO index 03c111e94d4..82d7330cf22 100644 --- a/Alpha_shapes_3/TODO +++ b/Alpha_shapes_3/TODO @@ -1,4 +1,4 @@ -- deprectate the following function +- deprecate the following function Classification_type A.classify ( Cell_handle f, int i, FT alpha = get_alpha()) because it is ambiguous with Classification_type A.classify ( Cell_handle f, FT alpha = get_alpha()) @@ -12,7 +12,7 @@ when alpha is given as an int. Alpha_shape_3(Dt& dt, bool swap=true, NT alpha = 0, Mode m = REGULARIZED) The triangulation is swapped if swap=true and copied otherwise. -- test the taking into account of paramater alpha in functions +- test the taking into account of parameter alpha in functions get_alpha_shape_edges get_alpha_shape_facets get_alpha_shape_vertices diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 4ebb4334fbd..a20424c7b5b 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -27,7 +27,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) # include(${QT_USE_FILE}) include_directories(BEFORE ./) - # ui file, created wih Qt Designer + # ui file, created with Qt Designer qt5_wrap_ui(uis MainWindow.ui) # qrc files (resources files, that contain icons, at least) diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h index 1a90836e601..70f1bec2182 100644 --- a/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/doc/Alpha_shapes_3/CGAL/Alpha_shape_3.h @@ -44,7 +44,7 @@ the basic `Cartesian_converter`, for example when a custom point is used. In this case, a partial specialization of `Cartesian_converter` must be provided by the user. An example of such specialization is given in the two-dimensional Alpha Shapes example \ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp". -
  • The tag `ExactAlphaComparisonTag` cannot be used in conjonction with periodic triangulations. +
  • The tag `ExactAlphaComparisonTag` cannot be used in conjunction with periodic triangulations. When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink, the evaluations of predicates such as `Side_of_oriented_sphere_3` are done lazily. Consequently, the predicates store pointers to the geometrical positions of the diff --git a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp index 46260918749..7d1b9e2fb8d 100644 --- a/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp +++ b/Alpha_shapes_3/examples/Alpha_shapes_3/ex_alpha_shapes_with_fast_location_3.cpp @@ -37,7 +37,7 @@ int main() // compute alpha shape Alpha_shape_3 as(dt); - std::cout << "Alpha shape computed in REGULARIZED mode by defaut." + std::cout << "Alpha shape computed in REGULARIZED mode by default." << std::endl; // find optimal alpha values diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index b7b8c2e18ba..be6849a5886 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -69,7 +69,7 @@ class Alpha_shape_3 : public Dt // or INTERIOR with respect to the alpha shape. // In GENERAL mode a $k$ simplex is REGULAR if it is on the boundary // of the alpha_complex and belongs to a $k+1$ simplex in the complex - // and it is SINGULAR simplex if it is a boundary simplex tht is not + // and it is SINGULAR simplex if it is a boundary simplex that is not // included in a $k+1$ simplex of the complex. // In REGULARIZED mode each k-dimensional simplex of the triangulation @@ -93,7 +93,7 @@ public: typedef typename Dt::Geom_traits Gt; typedef typename Dt::Triangulation_data_structure Tds; - // The Exact Comparison Tag cannot be used in conjonction with periodic triangulations + // The Exact Comparison Tag cannot be used in conjunction with periodic triangulations // because the periodic triangulations' point() function returns a temporary // value while the lazy predicate evaluations that are used when the Exact tag // is set to true rely on a permanent and safe access to the points. @@ -422,7 +422,7 @@ public: private: // the dynamic version is not yet implemented - // desactivate the tetrahedralization member functions + // deactivate the tetrahedralization member functions void insert(const Point& /*p*/) {} // Inserts point `p' in the alpha shape and returns the // corresponding vertex of the underlying Delaunay tetrahedralization. @@ -735,7 +735,7 @@ public: // (2) the nb of solid components is equal or less than nb_component NT find_alpha_solid() const; - // compute the minumum alpha such that all data points + // compute the minimum alpha such that all data points // are either on the boundary or in the interior // not necessarily connected // starting point for searching @@ -776,7 +776,7 @@ private: //--------------------------------------------------------------------- private: - // prevent default copy constructor and default assigment + // prevent default copy constructor and default assignment Alpha_shape_3(const Alpha_shape_3&); void operator=(const Alpha_shape_3&); @@ -1292,7 +1292,7 @@ Alpha_shape_3::initialize_alpha_vertex_maps(bool reinitialize) back_inserter(incidents)); typename std::list::iterator chit=incidents.begin(); if (is_infinite(*chit)) as->set_is_on_chull(true); - while (is_infinite(*chit)) ++chit; //skip infinte cells + while (is_infinite(*chit)) ++chit; //skip infinite cells alpha = (*chit)->get_alpha(); as->set_alpha_mid(alpha); as->set_alpha_max(alpha); @@ -1330,7 +1330,7 @@ Alpha_shape_3::initialize_alpha_vertex_maps(bool reinitialize) incident_cells(static_cast(vit), back_inserter(incidents)); typename std::list::iterator chit=incidents.begin(); - while (is_infinite(*chit)) ++chit; //skip infinte cells + while (is_infinite(*chit)) ++chit; //skip infinite cells alpha = (*chit)->get_alpha(); as->set_alpha_mid(alpha); for( ; chit != incidents.end(); ++chit) { @@ -1835,7 +1835,7 @@ Alpha_shape_3::find_optimal_alpha(size_type nb_components) const template typename Alpha_shape_3::NT Alpha_shape_3::find_alpha_solid() const - // compute the minumum alpha such that all data points + // compute the minimum alpha such that all data points // are either on the boundary or in the interior // not necessarily connected { diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h index 8995c928990..cd853624378 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shapes_3/internal/Lazy_alpha_nt_3.h @@ -135,7 +135,7 @@ class Lazy_alpha_nt_3{ typedef typename Types::Approx_point Approx_point; typedef typename Types::Exact_point Exact_point; typedef typename Types::Input_point Input_point; -//Convertion functions +//Conversion functions Approx_point to_approx(const Input_point& wp) const { // The traits class' Point_3 must be convertible using the Cartesian converter diff --git a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h index ea15aa9ffb6..f599e971bb0 100644 --- a/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Fixed_alpha_shape_3.h @@ -116,7 +116,7 @@ class Fixed_alpha_shape_3 : public Dt // or INTERIOR with respect to the alpha shape. // A $k$ simplex is REGULAR if it is on the boundary // of the alpha_complex and belongs to a $k+1$ simplex in the complex - // and it is SINGULAR simplex if it is a boundary simplex tht is not + // and it is SINGULAR simplex if it is a boundary simplex that is not // included in a $k+1$ simplex of the complex. // Roughly, the Fixed_alpha_shape data structure computes and stores, @@ -280,7 +280,7 @@ public: } } // Erase from edge_status_map, edges that will disappear: - // they are not on the boudary of the hole + // they are not on the boundary of the hole std::set hole_edges; std::pair::iterator,bool> it_hedge_and_not_already_seen; for (typename std::vector::iterator it=cells.begin();it!=cells.end();++it){ @@ -598,7 +598,7 @@ private : } private : - // prevent default copy constructor and default assigment + // prevent default copy constructor and default assignment Fixed_alpha_shape_3(const Fixed_alpha_shape_3&); void operator=(const Fixed_alpha_shape_3&); diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_test_cls_alpha_shape_3.h b/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_test_cls_alpha_shape_3.h index 4707cc51e62..dd41a52c9de 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_test_cls_alpha_shape_3.h +++ b/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_test_cls_alpha_shape_3.h @@ -152,7 +152,7 @@ _test_cls_alpha_shape_3() test_filtration(a1,verbose); std::cout << std::endl; - std::cout << "test additionnal creators and set mode" << std::endl; + std::cout << "test additional creators and set mode" << std::endl; Triangulation dt2( L.begin(), L.end()); Alpha_shape_3 a2(dt2, 0, Alpha_shape_3::REGULARIZED); if(verbose) show_alpha_values(a2); @@ -193,10 +193,10 @@ _test_cls_alpha_shape_3() Alpha_iterator previous = opt; --previous; if(verbose) { std::cerr << " optimal de 1 " << *opt - << "nb of componants " << a1.number_of_solid_components(*opt) + << "nb of components " << a1.number_of_solid_components(*opt) << std::endl; std::cerr << " previous " << *previous - << "nb of componants " + << "nb of components " << a1.number_of_solid_components(*previous) << std::endl; } assert (a1.number_of_solid_components(*opt) == 1); diff --git a/Alpha_wrap_3/doc/Alpha_wrap_3/alpha_wrap_3.txt b/Alpha_wrap_3/doc/Alpha_wrap_3/alpha_wrap_3.txt index b12abc50c9d..d3bebfe2ab7 100644 --- a/Alpha_wrap_3/doc/Alpha_wrap_3/alpha_wrap_3.txt +++ b/Alpha_wrap_3/doc/Alpha_wrap_3/alpha_wrap_3.txt @@ -332,7 +332,7 @@ and values of alpha smaller than the size of the holes. Two-sided wrap. (Left) Wrapping a Bunny in 2D, with decreasing values for alpha. (Right) Wrapping a defect-laden Bunny in 3D. The rightmost column depicts a clipped visualization -of the inside. When alpha is small enough with respect the diamater of the holes, the algorithm generates a two-sided wrap. +of the inside. When alpha is small enough with respect the diameter of the holes, the algorithm generates a two-sided wrap. \cgalFigureCaptionEnd \section aw3_performance Performance diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h index 8e05d6929cf..20982e9beaa 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/Alpha_wrap_3.h @@ -192,7 +192,7 @@ public: m_queue(4096) { // Due to the Steiner point computation being a dichotomy, the algorithm is inherently inexact - // and passing exact kernels is explicitely disabled to ensure no misunderstanding. + // and passing exact kernels is explicitly disabled to ensure no misunderstanding. CGAL_static_assertion((std::is_floating_point::value)); } @@ -944,7 +944,7 @@ private: return IRRELEVANT; } - // push if facet is connected to artifical vertices + // push if facet is connected to artificial vertices for(int i=0; i<3; ++i) { const Vertex_handle vh = ch->vertex(Dt::vertex_triple_index(id, i)); @@ -1049,7 +1049,7 @@ private: check_queue_sanity(); #endif - // const& to something that will be poped, but safe as `ch` && `id` are extracted before the pop + // const& to something that will be popped, but safe as `ch` && `id` are extracted before the pop const Gate& gate = m_queue.top(); const Facet& f = gate.facet(); CGAL_precondition(!m_dt.is_infinite(f)); diff --git a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h index 4b146e95d8f..89ed99a00dc 100644 --- a/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h +++ b/Alpha_wrap_3/include/CGAL/Alpha_wrap_3/internal/splitting_helper.h @@ -167,7 +167,7 @@ struct AABB_tree_splitter_traits // The input face ID serves when traversing the tree, to avoid doing the same intersection() // on the same datum seen from different primitives. // - // Technically, FPM could type-erase the mesh and the VPM, as it currently forces all independant + // Technically, FPM could type-erase the mesh and the VPM, as it currently forces all independent // inputs to have the same types. This is not such much of an issue for the mesh type, // but it can be annoying for the VPM type. using ID = std::pair; diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h index e9e6ee7d472..e9a3a735d5b 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_2_impl.h @@ -1960,7 +1960,7 @@ template void Apollonius_graph_2::file_output(std::ostream& os) const { - // ouput to a file + // output to a file size_type n = this->_tds.number_of_vertices(); size_type m = this->_tds.number_of_full_dim_faces(); diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h index a5369929afe..f3ced604626 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/Apollonius_graph_hierarchy_2_impl.h @@ -54,7 +54,7 @@ Apollonius_graph_hierarchy_2 } -//Assignement +//Assignment template Apollonius_graph_hierarchy_2 & Apollonius_graph_hierarchy_2:: diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h index f82f5a8fd07..99472d22edb 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2/uncertain/Uncertain_vertex_conflict_2.h @@ -268,7 +268,7 @@ private: { // NOTE:*************************************** // * the perturb boolean variable is not used - // * for consistancy with Menelaos + // * for consistency with Menelaos // NOTE:*************************************** RT x2 = p2.x() - p1.x(); RT y2 = p2.y() - p1.y(); @@ -298,10 +298,10 @@ private: if ( is_indeterminate(s_xw2q) ) { return s_xw2q; } power_test = o12 * s_xw2q; - // this results is consistant with Menelaos + // this results is consistent with Menelaos if (power_test != ZERO) { return -power_test; } - // this result is consistant with the perturb on off idea + // this result is consistent with the perturb on off idea //if (power_test != ZERO || ! perturb) return -power_test; o1q = CGAL::sign(xq); @@ -313,10 +313,10 @@ private: if ( is_indeterminate(s_yw2q) ) { return s_yw2q; } power_test = o12 * s_yw2q; - // this results is consistant with Menelaos + // this results is consistent with Menelaos if (power_test != ZERO) { return -power_test; } - // this result is consistant with the perturb on off idea + // this result is consistent with the perturb on off idea //if (power_test != ZERO || ! perturb) return -power_test; o1q = CGAL::sign(yq); @@ -348,11 +348,11 @@ private: - CGAL::square(xy2q)); if ( is_indeterminate(radInt) ) { return radInt; } - // radical intersection degerate + // radical intersection degenerate if (radInt == ZERO) { CGAL_assertion (radSide != ZERO); - // this result is consistant with the perturb on off idea + // this result is consistent with the perturb on off idea //if (! perturb) return (radSide == orient) ? ZERO : orient; RT rs2q1 = (p2.x() - q.x()) * xw2q + (p2.y() - q.y()) * yw2q; diff --git a/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h b/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h index 6d973d3c6df..69064b0c781 100644 --- a/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h +++ b/Apollonius_graph_2/test/Apollonius_graph_2/include/test.h @@ -879,7 +879,7 @@ bool test_algo(InputStream& is) // Patch for the Microsoft compiler so that it does not produce the // nasty warning about decorated name length // Basically what I do here is create typedefs for the default - // template paramaters so as to give them shorter names + // template parameters so as to give them shorter names typedef Apollonius_graph_vertex_base_2 Vb; typedef Triangulation_face_base_2 Fb; typedef Triangulation_data_structure_2 Agds; @@ -904,7 +904,7 @@ bool test_hierarchy_algo(InputStream& is) // Patch for the Microsoft compiler so that it does not produce the // nasty warning about decorated name length // Basically what I do here is create typedefs for the default - // template paramaters so as to give them shorter names + // template parameters so as to give them shorter names typedef Apollonius_graph_vertex_base_2 Vb; typedef Apollonius_graph_hierarchy_vertex_base_2 HVb; typedef Triangulation_face_base_2 Fb; @@ -934,7 +934,7 @@ bool test_filtered_traits_algo(InputStream& is) // Patch for the Microsoft compiler so that it does not produce the // nasty warning about decorated name length // Basically what I do here is create typedefs for the default - // template paramaters so as to give them shorter names + // template parameters so as to give them shorter names typedef Apollonius_graph_vertex_base_2 Vb; typedef Triangulation_face_base_2 Fb; typedef Triangulation_data_structure_2 Agds; @@ -961,7 +961,7 @@ bool test_filtered_traits_hierarchy_algo(InputStream& is) // Patch for the Microsoft compiler so that it does not produce the // nasty warning about decorated name length // Basically what I do here is create typedefs for the default - // template paramaters so as to give them shorter names + // template parameters so as to give them shorter names typedef Apollonius_graph_vertex_base_2 Vb; typedef Apollonius_graph_hierarchy_vertex_base_2 HVb; typedef Triangulation_face_base_2 Fb; diff --git a/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h b/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h index 5df573c77de..c619f418de0 100644 --- a/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h +++ b/Arithmetic_kernel/include/CGAL/CORE_arithmetic_kernel.h @@ -42,7 +42,7 @@ class CORE_arithmetic_kernel : public internal::Arithmetic_kernel_base { public: //! exact integers typedef CORE::BigInt Integer; - //! exact float nummber + //! exact float number typedef CORE::BigRat Exact_float_number; //! exact rationals, constructible from integers typedef CORE::BigRat Rational; diff --git a/Arithmetic_kernel/package_info/Arithmetic_kernel/description.txt b/Arithmetic_kernel/package_info/Arithmetic_kernel/description.txt index 954b06aeccc..62da4ee2e71 100644 --- a/Arithmetic_kernel/package_info/Arithmetic_kernel/description.txt +++ b/Arithmetic_kernel/package_info/Arithmetic_kernel/description.txt @@ -1,7 +1,7 @@ An Arithmetic_kernel is required to provide at least the following public types: -Integer, Rational, Bigfloat_interval. It is guranteed that these types are interoperable. Currently there are: +Integer, Rational, Bigfloat_interval. It is guaranteed that these types are interoperable. Currently there are: Gmp_arithmetic_kernel CORE_arithmetic_kernel LEDA_arithmetic_kernel -Moreover, the package provides a class template Get_arithmetic_kernel. This cclass provides the corresponding Arithmetic_kernel for T. Note that T may also be a non trivial type such as Sqrt_extension, Polynomial etc. +Moreover, the package provides a class template Get_arithmetic_kernel. This class provides the corresponding Arithmetic_kernel for T. Note that T may also be a non trivial type such as Sqrt_extension, Polynomial etc. diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Conic_reader.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Conic_reader.hpp index effc5820e5d..070aaf21aa1 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Conic_reader.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Conic_reader.hpp @@ -69,7 +69,7 @@ public: /*! Is a conivs arc currently being processed? */ bool m_processing_arc; - /*! A place holder to store the undelying conic of a conic arc */ + /*! A place holder to store the underlying conic of a conic arc */ Curve_2 m_conic; /*! Last orientation */ @@ -263,7 +263,7 @@ public: /*! Read the conic curves or arcs of conic curves from the input file * \param filename the name of the input file * \param curves_out the iterator of the container of the read curves - * \param bbox the counding box of the read curves + * \param bbox the bounding box of the read curves */ template int read_data(const char * filename, OutputIterator curves_out, diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Double.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Double.hpp index 2f32d5716ed..7e07941d34b 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Double.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Double.hpp @@ -36,7 +36,7 @@ public: return(*this); } - // Arithmetic opertors. + // Arithmetic operators. Double operator+(const Double & x) const { return Double(val + x.val); } Double operator-(const Double & x) const { return Double(val - x.val); } @@ -48,7 +48,7 @@ public: // Unary minus. Double operator-() const { return Double(-val); } - // Arithmetic opertors and assignment. + // Arithmetic operators and assignment. void operator+=(const Double & x) { val += x.val; } void operator-=(const Double & x) { val -= x.val; } diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Point_parser_visitor.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Point_parser_visitor.hpp index dfa35f35f03..01e34b904fb 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Point_parser_visitor.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Point_parser_visitor.hpp @@ -86,7 +86,7 @@ public: std::cout << "Duplicate point: " << point << std::endl; } - /*! Parse a generic Homogenuous point */ + /*! Parse a generic Homogeneous point */ virtual void accept_point_2( std::string x, std::string y, std::string w) { typedef typename Number_type_traits::FT FT; diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Polyline_reader.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Polyline_reader.hpp index 708660b8099..87276bf0cec 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Polyline_reader.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Polyline_reader.hpp @@ -92,7 +92,7 @@ public: /*! Read the segments from the input file * \param filename the name of the input file * \param curves_out the iterator of the container of the read curves - * \param bbox the counding box of the read curves + * \param bbox the bounding box of the read curves */ template int read_data(const char * filename, OutputIterator curves_out, diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Segment_reader.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Segment_reader.hpp index fc5b8dec755..85675c3cf78 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Segment_reader.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/Segment_reader.hpp @@ -24,7 +24,7 @@ public: typedef typename Traits::Point_2 Point_2; typedef typename Traits::Curve_2 Curve_2; - /*! A visitor of the parser that reads segements */ + /*! A visitor of the parser that reads segments */ template class Segment_parser_visitor : public Point_parser_visitor { @@ -71,7 +71,7 @@ public: /*! Read the segments from the input file * \param filename the name of the input file * \param curves_out the iterator of the container of the read curves - * \param bbox the counding box of the read curves + * \param bbox the bounding box of the read curves */ template int read_data(const char * filename, OutputIterator curves_out, diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp index ed93820690c..c1ef4e01f0d 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp @@ -590,7 +590,7 @@ void run_bench(Bench_inst & bench_inst, Benchable & benchable, if (samples > 0) bench_inst.set_samples(samples); else if (iterations > 0) bench_inst.set_iterations(iterations); - //opertor () in the Bench - does all the work ! + //operator () in the Bench - does all the work ! bench_inst(); } @@ -648,7 +648,7 @@ int main(int argc, char * argv[]) std::cout << "strategy_mask = " << strategy_mask << std::endl; } - // Construct Incrementaly (only if type_code == incremental) + // Construct Incrementally (only if type_code == incremental) type_code = Option_parser::TYPE_INCREMENT; if (type_mask & (0x1 << type_code)) { if (verbose_level > 0) std::cout << "TYPE_INCREMENT " << std::endl; diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp index 4ad1ba51251..c875dcbeacd 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementGraphicsItem.cpp @@ -191,7 +191,7 @@ void ArrangementGraphicsItem::paintWithFloodFill( // paint bounded faces normally? // by experimenting it's faster to just paint all using the flood algo - // specially with algebraic faces since currenlty all edges have to + // specially with algebraic faces since currently all edges have to // be recalculated/rendered again for faces // this->paintFaces(&painter2); this->paintEdges(&painter2, traits); @@ -588,7 +588,7 @@ void ArrangementGraphicsItem::paintFace( Halfedge_handle he = cc; X_monotone_curve_2 c = he->curve(); - // Get the co-ordinates of the curve's source and target. + // Get the coordinates of the curve's source and target. double sx = CGAL::to_double(he->source()->point().x()), sy = CGAL::to_double(he->source()->point().y()), tx = CGAL::to_double(he->target()->point().x()), @@ -606,7 +606,7 @@ void ArrangementGraphicsItem::paintFace( else { // If the curve is monotone, than its source and its target has the - // extreme x co-ordinates on this curve. + // extreme x coordinates on this curve. bool is_source_left = (sx < tx); int x_min = is_source_left ? coord_source_viewport.x() : coord_target_viewport.x(); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp index b470946cec0..3616dc9fd64 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementPainterOstream.cpp @@ -186,7 +186,7 @@ ArrangementPainterOstreamscene->views().first(); int xmin = view->mapFromScene(bb.xmin(), bb.ymin()).x(); int xmax = view->mapFromScene(bb.xmax(), bb.ymin()).x(); - // can be negitive due to rotation trasnformation + // can be negative due to rotation transformation size_t n = static_cast(std::abs(xmax - xmin)); if (n == 0) { return *this; } diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/FloodFill.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/FloodFill.h index 160b6c6477d..85ffc3d6c01 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/FloodFill.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/FloodFill.h @@ -26,7 +26,7 @@ class FloodFill public: // this currently assumes that there is a "border" in the boundaries that // will prevent the flood fill from going there - // this way we don't check bounadry conditions! + // this way we don't check boundary conditions! void operator()(QRgb* raw_img, uint16_t width, uint16_t x, uint16_t y, QRgb color); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsSceneMixin.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsSceneMixin.h index 6e79b95939f..ad563f7db01 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsSceneMixin.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GraphicsSceneMixin.h @@ -21,7 +21,7 @@ class QGraphicsView; class GraphicsSceneMixin { public: - /*! Costructor */ + /*! Constructor */ GraphicsSceneMixin(QGraphicsScene* scene_ = nullptr); /*! Destructor (virtual) */ diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp index a8a2f336263..5fcdeb8fc3c 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.cpp @@ -93,7 +93,7 @@ double Compute_squared_distance_2< CGAL::Arr_conic_traits_2>:: operator()(const Point_2& p, const X_monotone_curve_2& c) const { - // Get the co-ordinates of the curve's source and target. + // Get the coordinates of the curve's source and target. // double sx = CGAL::to_double( c.source( ).x( ) ); // double sy = CGAL::to_double( c.source( ).y( ) ); // double tx = CGAL::to_double( c.target( ).x( ) ); @@ -111,7 +111,7 @@ operator()(const Point_2& p, const X_monotone_curve_2& c) const else { // If the curve is monotone, than its source and its target has the - // extreme x co-ordinates on this curve. + // extreme x coordinates on this curve. // bool is_source_left = (sx < tx); // int x_min = is_source_left ? (*w).x_pixel(sx) : (*w).x_pixel(tx); // int x_max = is_source_left ? (*w).x_pixel(tx) : (*w).x_pixel(sx); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h index 0713d63f1c0..3775dfa43af 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/Utils/Utils.h @@ -281,7 +281,7 @@ public: double operator()(const Point_2& p, const X_monotone_curve_2& c) const; }; -// chcek if arrangement is a model of the concept ArrangementOpenBoundaryTraits_2 +// check if arrangement is a model of the concept ArrangementOpenBoundaryTraits_2 template struct IsOpenBoundaryArrangement : public CGAL::Boolean_tag< diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h index f7024e766c2..8d7a6e647e6 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_conic_traits_2.h @@ -376,7 +376,7 @@ public: */ Point_2(const typename Alg_kernel::Point_2& p); - /*! constructs from homegeneous coordinates. + /*! constructs from homogeneous coordinates. */ Point_2(const Algebraic& hx, const Algebraic& hy, const Algebraic& hz); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index ea209143818..c6c4c608690 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -22,7 +22,7 @@ namespace CGAL { * We use the following parameterization of the unit sphere \f$S = * \phi_S(\Phi)\f$: \f$\Phi = [\alpha, 2\pi + \alpha] \times [-\frac{\pi}{2}, * \frac{\pi}{2}]\f$, \f$\phi_S(x, y) = (\cos y \cos x, \sin y \cos x, \sin - * x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By deafult, \f$X = -1, Y = 0\f$, + * x)\f$, where \f$\alpha = \arctan(X, Y)\f$. By default, \f$X = -1, Y = 0\f$, * which implies \f$\alpha = \pi\f$, and a default parameterization \f$\Phi = * [-\pi, \pi] \times [-\frac{\pi}{2}, \frac{\pi}{2}]\f$. The equator curve, * for example, is given by \f$\gamma(t) = (\pi(2t - 1) + \alpha, 0)\f$, for @@ -365,7 +365,7 @@ namespace CGAL { X_monotone_curve_2 operator()(const Point_2& p, const Point_2& q); /*! Construct a full great circle from a normal to a plane. - * Observe that the constrcted arc has one endpoint that lies on + * Observe that the constructed arc has one endpoint that lies on * the identification curve. This point is considered both the source and * target (and also the left and right) point of the arc. * \param normal the normal to the plane containing the great circle. diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h index bd1e4534d0f..731c735675a 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_overlay_2.h @@ -72,4 +72,4 @@ void overlay (const Arrangement_with_history_2& arr1, -} /* end namesapce CGAL */ +} /* end namespace CGAL */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h index f75223432f4..78787314913 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polycurve_traits_2.h @@ -10,7 +10,7 @@ namespace CGAL { * or line segments. We call such a compound curve a polycurve. A polycurve * is a chain of subcurves, where each two neighboring subcurves in the chain * share a common endpoint; that is, the polycurve is continuous. Furthermore, - * the target of the \f$i\f$th segement of a polycurve has to coincide with + * the target of the \f$i\f$th segment of a polycurve has to coincide with * the source of the \f$i+1\f$st segment; that is, the polycurve has to be * \a well-oriented. Note that it is possible to construct general polycurves * that are neither continuous nor well-oriented, as it is impossible to @@ -231,7 +231,7 @@ namespace CGAL { public: /*! Obtain a trimmed version of the polycurve with src and tgt as end * vertices. - * Src and tgt will be swaped if they do not conform to the direction of + * Src and tgt will be swapped if they do not conform to the direction of * the polycurve. */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, @@ -424,7 +424,7 @@ namespace CGAL { /// @{ /*! Append a subcurve to the polycurve at the back. - * \a Warning: This function does not preform the precondition test + * \a Warning: This function does not perform the precondition test * that the `Push_back_2` functor does. Thus, it is * recommended to use the latter. * \param subcurve The new subcurve to be appended to the polycurve. diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h index ee3c7e5a16f..9c86561f925 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_polyline_traits_2.h @@ -15,7 +15,7 @@ namespace CGAL { * curves, commonly referred to as polylines. Each polyline is a * chain of segments, where each two neighboring segments in the * chain share a common endpoint; that is, the polyline is - * continuous. Furthermore, the target of the \f$i\f$th segement of + * continuous. Furthermore, the target of the \f$i\f$th segment of * a polyline has to coincide with the source of the \f$i+1\f$st * segment; that is, the polyline has to be \a well-oriented. Note * that it is possible to construct general polylines that are diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h index 95c7bcf75cf..ed9c1e12e3d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_triangulation_point_location.h @@ -8,9 +8,9 @@ namespace CGAL { * The `Arr_triangulation_point_location` class template implements a * point-location (and vertical ray-shooting) strategy that is based on * triangulation. In particular, the algorithm uses a constrained triangulation, - * provided by the 2D Triangulations package, as a search strcture. Every time + * provided by the 2D Triangulations package, as a search structure. Every time * the arrangement is modified the constrained triangulation search-structure is - * reconstructed from scrach, where the edges of the arrangement are set to be + * reconstructed from scratch, where the edges of the arrangement are set to be * the constrained edges of the triangulation. This strategy is inefficient * (especially when the number of modifications applied to the arrangement is * high) and provided only for educational purposes. diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h index 4ad282634a8..bf3e048637d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_2.h @@ -282,7 +282,7 @@ void insert_non_intersecting_curves(Arrangement_2& arr, * * Inserts a given point into a given arrangement. It uses a given * point-location object to locate the given point in the given arrangement. If - * the point conincides with an existing vertex, there is nothing left to do; if + * the point coincides with an existing vertex, there is nothing left to do; if * it lies on an edge, the edge is split at the point. Otherwise, the point is * contained inside a face, and is inserted as an isolated vertex inside this * face. By default, the function uses the "walk along line" point-location diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h index d58316e3e70..4aee4e22035 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arrangement_on_surface_2.h @@ -1185,7 +1185,7 @@ void insert_non_intersecting_curves * * Inserts a given point into a given arrangement. It uses a given * point-location object to locate the given point in the given arrangement. If - * the point conincides with an existing vertex, there is nothing left to do; if + * the point coincides with an existing vertex, there is nothing left to do; if * it lies on an edge, the edge is split at the point. Otherwise, the point is * contained inside a face, and is inserted as an isolated vertex inside this * face. By default, the function uses the "walk along line" point-location diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h index 0feb21ddd81..4d66951502f 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--CompareXOnBoundaryOfCurveEnd_2.h @@ -20,7 +20,7 @@ public: * enumeration `ce` that specifies either the minimum or the maximum end of * the curve where the curve has a vertical asymptote, compares the \f$ * x\f$-coordinate of `p` and the \f$x\f$-coordinate of the limit of the - * curve at its specificed end. The variable `xcv` identifies the parametric + * curve at its specified end. The variable `xcv` identifies the parametric * curve \f$c(t) = (x(t), y(t))\f$ defined over an open or half-open interval * with endpoints \f$ 0\f$ and \f$ 1\f$. The enumeration `ce` identifies an * open end \f$d \in\{0,1\}\f$ of \f$c\f$. Formally, compares the \f$ @@ -40,7 +40,7 @@ public: /*! Given two \f$ x\f$-monotone curves `xcv1` and `xcv2` and two indices `ce1` * and `ce2` that specify either the minimum or the maximum ends of `xcv1` and * `xcv2`, respectively, where the curves have vertical asymptotes, compares the - * \f$ x\f$-coordinates of the limits of the curves at their specificed + * \f$ x\f$-coordinates of the limits of the curves at their specified * ends. The variables `xcv1` and `xcv2` identify the parametric curves \f$ * c_1(t) = (x_1(t),y_1(t))\f$ and \f$ c_2(t) = (x_2(t),y_2(t))\f$, * respectively, defined over open or half-open intervals with endpoints \f$ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Merge_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Merge_2.h index af3e5c6ea49..41b560fa101 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Merge_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrTraits--Merge_2.h @@ -15,7 +15,7 @@ public: /// @{ /*! accepts two mergeable \f$ x\f$-monotone curves `xc1` and `xc2` - * and asigns `xc` with the merged curve. + * and assigns `xc` with the merged curve. * * \pre `are_mergeable_2`(`xc1`, `xc2`) is true. */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h index 7e1fb63865a..dc3fa8f8674 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelFace.h @@ -8,7 +8,7 @@ * (CCB). A face may be unbounded. Otherwise, it has one or more outer CCBs. A * face may also be bounded by inner CCBs, and it may contain isolated vertices * in its interior. A planar face may have only one outer CCBs and its inner - * CCBs are refered to as holes. + * CCBs are referred to as holes. * * \sa `ArrangementDcel` * \sa `ArrangementDcelVertex` diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelWithRebind.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelWithRebind.h index 2f6b152e345..8c1f6db2d0d 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelWithRebind.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementDcelWithRebind.h @@ -39,7 +39,7 @@ typedef unspecified_type template rebind; /// @{ /*! -constructs an empty \dcel with one unbouned face. +constructs an empty \dcel with one unbounded face. */ Arr_dcel(); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBoundaryTraits_2.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBoundaryTraits_2.h index 7d004c99ff3..d617129c29c 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBoundaryTraits_2.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOpenBoundaryTraits_2.h @@ -11,7 +11,7 @@ * `ArrangementBasicTraits_2`. The arrangement template instantiated with a * traits class that models this concept can handle \f$ x\f$-monotone curves * that are unbounded in any direction. The concept - * `ArrangementOpenBoundaryTraits_2`, nontheless, also supports planar \f$ + * `ArrangementOpenBoundaryTraits_2`, nonetheless, also supports planar \f$ * x\f$-monotone curves that reach the boundary of an open yet bounded parameter * space. * diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopologyTraits.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopologyTraits.h index 7a818fb4035..2ea883dee11 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopologyTraits.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementTopologyTraits.h @@ -15,7 +15,7 @@ *
  • `CGAL::Arr_bounded_planar_topology_traits_2`—can serve as a topology traits * for an arrangement of planar unbounded curves. *
  • `CGAL::Arr_unb_planar_topology_traits_2`—can serve as a topology traits - * for an arrangement of arcs of great circles embeded on a sphere. + * for an arrangement of arcs of great circles embedded on a sphere. * * * At this point we do not expose all the requirements of this concept. @@ -46,7 +46,7 @@ public: /*! constructs default. */ Arr_topology_traits(); - /*! construcs from a geometry-traits object. */ + /*! constructs from a geometry-traits object. */ Arr_topology_traits(const Geometry_traits_2* geometry_traits); /// @} diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conics.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conics.cpp index a8688f55a98..c831b617d9f 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conics.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conics.cpp @@ -37,7 +37,7 @@ int main() { // Insert a parabolic arc (C6) supported by the parabola y = -x^2 with // endpoints (-sqrt(3),-3) (~(-1.73,-3)) and (sqrt(2),-2) (~(1.41,-2)). - // Since the x-coordinates of the endpoints cannot be acccurately represented, + // Since the x-coordinates of the endpoints cannot be accurately represented, // we specify them as the intersections of the parabola with the lines // y = -3 and y = -2, respectively. The arc is clockwise-oriented. Conic_arc c6 = diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp index 7fcb7a63dee..be62a491733 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp @@ -11,7 +11,7 @@ #include "arr_linear.h" -// Define a functor for creating a label from a characer and an integer. +// Define a functor for creating a label from a character and an integer. struct Overlay_label { std::string operator()(char c, unsigned int i) const { return c + boost::lexical_cast(i); } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp index d84ef0741a6..00827b0da57 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_circular_arc.cpp @@ -103,12 +103,12 @@ int main() { X_monotone_polycurve x_polycurve_1 = ctr_xcurve(x_curves.begin(), x_curves.end()); - // Insert polycurves to Arangment and print. + // Insert polycurves to Arrangement and print. Polycurve_circ_arc_arrangment polycurve_arrangment(&traits); insert(polycurve_arrangment, polycurve_1); insert(polycurve_arrangment, polycurve_2); insert(polycurve_arrangment, x_polycurve_1); - std::cout << "Arrangment Statistics:\n"; + std::cout << "Arrangement Statistics:\n"; print_arrangement(polycurve_arrangment); return 0; diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp index 7513e6bff7a..db6b1b19853 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polycurve_conic.cpp @@ -108,7 +108,7 @@ int main() { X_monotone_polycurve conic_x_mono_polycurve_2 = ctr_xpolycurve(xmono_conic_curves_2.begin(), xmono_conic_curves_2.end()); - // Insert the Polycurves into arrangment and print. + // Insert the Polycurves into arrangement and print. Polycurve_conic_arrangment x_pc_arrangment(&traits); insert(x_pc_arrangment, conic_x_mono_polycurve_1); insert(x_pc_arrangment, conic_x_mono_polycurve_2); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h index 243fbbf705a..7aedff1530d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_Bezier_curve_traits_2.h @@ -138,7 +138,7 @@ public: m_owner (false) {} - /*! Assignmnet operator. */ + /*! Assignment operator. */ Self& operator= (const Self& tr) { if (this == &tr) @@ -809,7 +809,7 @@ public: m_traits.compare_y_at_x_2_object()); CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // Check whether source and taget are two distinct points and they lie + // Check whether source and taeget are two distinct points and they lie // on the line. CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h index 9bcf709f9f0..e66d8d62cfa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h @@ -430,7 +430,7 @@ public: * Insert an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other - * endpoint corrsponds to a free vertex (a newly created vertex or an + * endpoint corresponds to a free vertex (a newly created vertex or an * isolated vertex). * \param he_to The reference halfedge. We should represent cv as a pair * of edges, one of them should become he_to's successor. @@ -792,7 +792,7 @@ public: const Dcel& dcel() const { return (p_arr->_dcel()); } /*! - * Clear the entire arrangment. + * Clear the entire arrangement. */ void clear_all() { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h index a20bfd83e4f..85f1b7c5acf 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_algebraic_segment_traits_2.h @@ -61,7 +61,7 @@ public: // Copy constructor Arr_algebraic_segment_traits_2 (const Self& /* s */) { /* No state...*/} - // Assignement operator + // Assignment operator const Self& operator= (const Self& s) {return s;} @@ -254,7 +254,7 @@ public: return std::make_pair(std::make_pair(0,0),vertical); } - // abbrevation for convenience + // abbreviation for convenience bool is_one_one(Curve_2 cv, Point_2 p) const { std::pair,bool> branches diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h index 746ef587cac..3dabf797184 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circle_segment_traits_2.h @@ -20,7 +20,7 @@ #include /*! \file - * The header file for the Arr_circle_segment_traits_2 class. + * The header file for the Arr_circle_segment_traits_2 class. */ #include @@ -421,7 +421,7 @@ public: return oi; } - // Check the case of a degenrate circle (a point). + // Check the case of a degenerate circle (a point). const typename Kernel::Circle_2& circ = cv.supporting_circle(); CGAL::Sign sign_rad = CGAL::sign (circ.squared_radius()); CGAL_precondition (sign_rad != NEGATIVE); @@ -702,7 +702,7 @@ public: m_traits.compare_y_at_x_2_object()); CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // Check whether source and taget are two distinct points and they lie + // Check whether source and target are two distinct points and they lie // on the line. CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h index f926dca65f0..8c3e7f6533e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_conic_traits_2.h @@ -843,7 +843,7 @@ public: m_traits.compare_y_at_x_2_object()); CGAL_precondition_code(Equal_2 equal_2 = m_traits.equal_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // Check whether source and taget are two distinct points and they lie + // Check whether source and target are two distinct points and they lie // on the line. CGAL_precondition(compare_y_at_x_2(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x_2(tgt, xcv) == EQUAL); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 7aa1fded18f..173e56ee601 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -21,7 +21,7 @@ * A counting traits-class for the arrangement package. * This is a meta-traits class. It is parameterized with another traits class * and inherits from it. For each traits method it maintains a counter that - * counts the number of invokations into the method. + * counts the number of invocations into the method. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h index 7f433810fca..1455a276f6d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_curve_data_traits_2.h @@ -79,10 +79,10 @@ public: typedef typename internal::Arr_complete_right_side_category:: Category Right_side_category; - // Representation of a curve with an addtional data field: + // Representation of a curve with an additonal data field: typedef _Curve_data_ex Curve_2; - // Representation of an x-monotone curve with an addtional data field: + // Representation of an x-monotone curve with an additonal data field: typedef _Curve_data_ex X_monotone_curve_2; @@ -99,7 +99,7 @@ public: Arr_curve_data_traits_2(const Base_traits_2& traits) : Base_traits_2(traits) {} //@} - /// \name Overriden functors. + /// \name Overridden functors. //@{ //! \name Intersections & subdivisions diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h index 967989024aa..745694afe74 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h @@ -87,7 +87,7 @@ public: /*! Compare two points lexigoraphically: by x, then by y. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - y(p1) < y(p2); * true - y(p1) = y(p2) and x(p1) < x(p2); @@ -129,7 +129,7 @@ public: /*! Compare two points lexigoraphically: by y, then by x. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - x(p1) < x(p2); * true - x(p1) = x(p2) and y(p1) < y(p2); @@ -250,7 +250,7 @@ public: /*! Compare two points by y coordinate. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * EQUAL - x(p1) = x(p2); @@ -395,7 +395,7 @@ public: /*! Compare two points lexigoraphically: by x, then by y. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - y(p1) < y(p2); * true - y(p1) = y(p2) and x(p1) < x(p2); @@ -436,7 +436,7 @@ public: /*! Compare two points lexigoraphically: by y, then by x. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return true - x(p1) < x(p2); * true - x(p1) = x(p2) and y(p1) < y(p2); @@ -556,7 +556,7 @@ public: /*! Compare two points by y coordinate. * We actually reversing the order, so x <--> y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * EQUAL - x(p1) = x(p2); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index c5aac5358b1..1468d38bc67 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -231,7 +231,7 @@ protected: public: /*! Compare two endpoint directions by v. - * \param d1 the first enpoint direction. + * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - v(d1) < v(d2); * EQUAL - v(d1) = v(d2); @@ -283,7 +283,7 @@ public: } /*! Compare two endpoint directions by u. - * \param d1 the first enpoint direction. + * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); * EQUAL - u(d1) = u(d2); @@ -301,7 +301,7 @@ public: } /*! Compare two endpoint directions lexigoraphically: by u, then by v. - * \param d1 the first enpoint direction. + * \param d1 the first endpoint direction. * \param d2 the second endpoint direction. * \return SMALLER - u(d1) < u(d2); * SMALLER - u(d1) = u(d2) and v(d1) < v(d2); @@ -640,7 +640,7 @@ public: return; } - // None of the enpoints coincide with a pole: + // None of the endpoints coincide with a pole: Direction_2 s = Traits::project_xy(source); Direction_2 t = Traits::project_xy(target); @@ -763,7 +763,7 @@ public: return cv; } - // None of the enpoints coincide with a pole: + // None of the endpoints coincide with a pole: if (z_sign(normal) == ZERO) { // The arc is vertical cv.set_is_vertical(true); @@ -992,8 +992,8 @@ public: }; protected: - /*! Obtain the possitive (north) pole - * \return the possitive (north) pole + /*! Obtain the positive (north) pole + * \return the positive (north) pole */ inline static const Point_2& pos_pole() { @@ -1033,7 +1033,7 @@ public: public: /*! Compare two directional points lexigoraphically: by x, then by y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * SMALLER - x(p1) = x(p2) and y(p1) < y(p2); @@ -2140,7 +2140,7 @@ public: return oi; } - // None of the enpoints coincide with a pole. + // None of the endpoints coincide with a pole. bool s_is_positive, t_is_positive, plane_is_positive; CGAL::Sign xsign = Traits::x_sign(normal); if (xsign == ZERO) { @@ -2172,7 +2172,7 @@ public: return oi; } - // The curve is not vertical, (none of the enpoints coincide with a pole) + // The curve is not vertical, (none of the endpoints coincide with a pole) Direction_3 dp; m_traits.intersection_with_identification(c, dp, Zero_atan_y()); Point_2 p(dp, Point_2::MID_BOUNDARY_LOC); @@ -2589,7 +2589,7 @@ public: return oi; } - /*! If the endpoints of one arc coinside with the 2 poles resp, + /*! If the endpoints of one arc coincide with the 2 poles resp, * the other arc is completely overlapping. */ if (xc1.left().is_min_boundary() && xc1.right().is_max_boundary()) { @@ -3166,7 +3166,7 @@ public: return; } - // None of the enpoints coincide with a pole: + // None of the endpoints coincide with a pole: Direction_2 s = Traits::project_xy(m_source); Direction_2 t = Traits::project_xy(m_target); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h index 7680e01d93a..ba37b21f187 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Arr_plane_3.h @@ -211,7 +211,7 @@ intersect(const Arr_plane_3 & plane1, typedef typename Kernel::FT FT; typedef boost::variant > Intersection_result; - // We know that the plane goes throgh the origin + // We know that the plane goes through the origin const FT& a1 = plane1.a(); const FT& b1 = plane1.b(); const FT& c1 = plane1.c(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h index bc7831ee95f..e287978f9e3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_bounding_rational_traits.h @@ -719,7 +719,7 @@ public: /*! * Construct a bounding box for the given control polygon. - * \param cp A sequence of control point (the control polgon). + * \param cp A sequence of control point (the control polygon). * \param bbox Output: The bounding box. * \pre cp is not empty. */ @@ -776,7 +776,7 @@ private: Comparison_result res = EQUAL; // Look for the first pair of consecutive points whose x-coordinate - // (or y-coordinate) are not equal. Their comparsion result will be + // (or y-coordinate) are not equal. Their comparison result will be // set as the "reference" comparison result. typename Control_points::const_iterator pt_curr = cp.begin(); typename Control_points::const_iterator pt_end = cp.end(); @@ -1054,7 +1054,7 @@ private: const Point_2& s2 = cp2.front(); const Point_2& t2 = cp2.back(); - // Check whether any pair of these endpoints conincide. + // Check whether any pair of these endpoints coincide. NT x, y; // Coordinate of a common endpoint. NT t_val1, t_val2; // Its respective parameters. @@ -1114,7 +1114,7 @@ private: } /*! - * An auxilary recursive function for computing the approximated + * An auxiliary recursive function for computing the approximated * intersection points between two Bezier curves. * \param cp1 The control points of the first curve. * \param t_min1 The lower bound of the parameter range of the first curve. @@ -1369,7 +1369,7 @@ private: } /*! - * An auxilary recursive function for computing the approximated vertical + * An auxiliary recursive function for computing the approximated vertical * tangency points of a Bezier curves. * \param cp The control points of the curve. * \param t_min The lower bound of the parameter range of the curve. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h index 829f00d2a5f..15723d2fa35 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_cache.h @@ -822,7 +822,7 @@ _Bezier_cache::_compute_resultant } // We multiplied the current row by the i'th diagonal entry, thus - // multipling the determinant value by it. We therefore increment + // multiplying the determinant value by it. We therefore increment // the exponent of mat[i][i] in the normalization factor. exp_fact[i] = exp_fact[i] + 1; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h index 853be78e4f1..119ad9a5226 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_curve_2.h @@ -162,7 +162,7 @@ public: for (k = 0; pts_begin != pts_end; ++pts_begin, k++) { -//SL: Acccording to the fact that all operations are based on polynomials +//SL: According to the fact that all operations are based on polynomials // duplicated control points can be allowed. // // Make sure that we do not have two identical consecutive control // // points. @@ -423,7 +423,7 @@ public: } /*! - * Get an interator for the first control point. + * Get an iterator for the first control point. */ Control_point_iterator control_points_begin () const { @@ -431,7 +431,7 @@ public: } /*! - * Get a past-the-end interator for control points. + * Get a past-the-end iterator for control points. */ Control_point_iterator control_points_end () const { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h index cc7046ad836..a2318c0d7d1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_point_2.h @@ -88,7 +88,7 @@ private: unsigned int _xid; /*!< Serial number of the originating x-monotone curve. */ Bez_point_bound _bpb; /*!< Bounding information for the - point: bouding control polygon, + point: bounding control polygon, point type, etc. */ Algebraic *p_t; /*!< The algebraic parameter for the point (if available). */ @@ -240,7 +240,7 @@ private: * Set the serial number of the originating x-monotone curve. * \param xid the new serial number of the originating x-monotone curve. * \pre The current xid() is 0. - * \pre xid is possitive. + * \pre xid is positive. */ void set_xid (unsigned int xid) { @@ -253,7 +253,7 @@ private: }; /*! \struct Subcurve - * Auxilary structure for the vertical_position() function. + * Auxiliary structure for the vertical_position() function. */ typedef typename Bounding_traits::Control_points Control_points; typedef typename Bounding_traits::NT BoundNT; @@ -1421,7 +1421,7 @@ bool _Bezier_point_2_rep::_refine () CGAL_assertion(_origs.size() == 2); // Obtain the other curve that originates the intersection point and use - // it to refine its reprsentation. + // it to refine its representation. Orig_iter org_it = _origs.begin(); ++org_it; Originator& orig2 = *org_it; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h index 41594edcc2b..cf7d00135b0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Bezier_x_monotone_2.h @@ -533,7 +533,7 @@ private: /*! Compute the exact vertical position of the given point with respect to * the x-monotone curve. * \param p The point. - * \param force_exact Sould we force an exact result. + * \param force_exact Should we force an exact result. * \return SMALLER if the point is below the curve; * LARGER if the point is above the curve; * EQUAL if p lies on the curve. @@ -751,7 +751,7 @@ point_position(const Point_2& p, Bezier_cache& cache) const in_range = _is_in_range(p, correct_res); if (! correct_res) { - // Perform the comparsion in an exact manner. + // Perform the comparison in an exact manner. if (! p.is_exact()) p.make_exact(cache); @@ -764,7 +764,7 @@ point_position(const Point_2& p, Bezier_cache& cache) const } // Call the vertical-position function that uses the bounding-boxes - // to evaluate the comparsion result. + // to evaluate the comparison result. typename Bounding_traits::Control_points cp; std::copy(_curve.control_points_begin(), _curve.control_points_end(), @@ -1192,7 +1192,7 @@ _Bezier_x_monotone_2::compare_to_left return (slope_res); // Compare the two subcurves by choosing some point to the left of p - // and compareing the vertical position there. + // and comparing the vertical position there. Comparison_result left_res; if (left().compare_x(cv.left(), cache) != SMALLER) @@ -1376,7 +1376,7 @@ _is_in_range(const Algebraic& t, Bezier_cache& cache) const return (false); } - // Obtain the exact t-range of the curve and peform an exact comparison. + // Obtain the exact t-range of the curve and perform an exact comparison. std::pair range = _t_range (cache); const Algebraic& t_src = range.first; const Algebraic& t_trg = range.second; @@ -1923,7 +1923,7 @@ _clip_control_polygon(typename Bounding_traits::Control_points& ctrl, if (! (org_min->point_bound().type == Bez_point_bound::RATIONAL_PT && CGAL::sign(org_min->point_bound().t_min) == CGAL::ZERO)) { - // It is possible that the paramater range of the originator is too large. + // It is possible that the parameter range of the originator is too large. // We therefore make sure it fits the current bounding box of the point // (which we know is tight enough). p_min.fit_to_bbox(); @@ -1951,7 +1951,7 @@ _clip_control_polygon(typename Bounding_traits::Control_points& ctrl, if (! (org_max->point_bound().type == Bez_point_bound::RATIONAL_PT && CGAL::compare (org_max->point_bound().t_max, 1) == CGAL::EQUAL)) { - // It is possible that the paramater range of the originator is too large. + // It is possible that the parameter range of the originator is too large. // We therefore make sure it fits the current bounding box of the point // (which we know is tight enough). p_max.fit_to_bbox(); @@ -2435,7 +2435,7 @@ _exact_vertical_position(const Point_2& p, #endif ) const { - // If it is a rational point, obtain its rational reprsentation. + // If it is a rational point, obtain its rational representation. Rat_point_2 rat_p; if (p.is_rational()) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h index 2d94e51f820..c6f11cc8a34 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Circle_segment_2.h @@ -1705,7 +1705,7 @@ protected: } /*! Compute the intersections between the supporting circle of (*this) and - * the supporting line of the segement cv. + * the supporting line of the segment cv. */ void _circ_line_intersect(const Self& cv, Intersection_list& inter_list) const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h index 15bee1cd34b..cbff44dbe24 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_arc_2.h @@ -182,7 +182,7 @@ public: _target (target), _extra_data_P (nullptr) { - // Make sure that the source and the taget are not the same. + // Make sure that the source and the target are not the same. CGAL_precondition (Alg_kernel().compare_xy_2_object() (source, target) != EQUAL); @@ -249,7 +249,7 @@ public: _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1)); _target = Point_2 (nt_traits.convert (x2), nt_traits.convert (y2)); - // Make sure that the source and the taget are not the same. + // Make sure that the source and the target are not the same. CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source, _target) != EQUAL); @@ -300,7 +300,7 @@ public: Rational y0 = center.y(); Rational R_sqr = ker.compute_squared_radius_2_object() (circ); - // Produce the correponding conic: if the circle center is (x0,y0) + // Produce the corresponding conic: if the circle center is (x0,y0) // and its squared radius is R^2, that its equation is: // x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0 // Note that this equation describes a curve with a negative (clockwise) @@ -338,7 +338,7 @@ public: _target(target), _extra_data_P (nullptr) { - // Make sure that the source and the taget are not the same. + // Make sure that the source and the target are not the same. CGAL_precondition (Alg_kernel().compare_xy_2_object() (source, target) != EQUAL); CGAL_precondition (orient != COLLINEAR); @@ -350,7 +350,7 @@ public: Rational y0 = center.y(); Rational R_sqr = ker.compute_squared_radius_2_object() (circ); - // Produce the correponding conic: if the circle center is (x0,y0) + // Produce the corresponding conic: if the circle center is (x0,y0) // and it squared radius is R^2, that its equation is: // x^2 + y^2 - 2*x0*x - 2*y0*y + (x0^2 + y0^2 - R^2) = 0 // Since this equation describes a curve with a negative (clockwise) @@ -412,7 +412,7 @@ public: _source = Point_2 (nt_traits.convert (x1), nt_traits.convert (y1)); _target = Point_2 (nt_traits.convert (x3), nt_traits.convert (y3)); - // Make sure that the source and the taget are not the same. + // Make sure that the source and the target are not the same. CGAL_precondition (Alg_kernel().compare_xy_2_object() (_source, _target) != EQUAL); @@ -440,7 +440,7 @@ public: if (points_collinear) { - _info = 0; // Inavlid arc. + _info = 0; // Invalid arc. return; } @@ -506,7 +506,7 @@ public: if (point_collinear) { - _info = 0; // Inavlid arc. + _info = 0; // Invalid arc. return; } @@ -943,7 +943,7 @@ public: } else { - // Use the source and target to initialize the exterme points. + // Use the source and target to initialize the extreme points. bool source_left = CGAL::to_double(_source.x()) < CGAL::to_double(_target.x()); x_min = source_left ? @@ -1270,7 +1270,7 @@ private: else { // The sign of (4rs - t^2) detetmines the conic type: - // - if it is possitive, the conic is an ellipse, + // - if it is positive, the conic is an ellipse, // - if it is negative, the conic is a hyperbola, // - if it is zero, the conic is a parabola. CGAL::Sign sign_conic = CGAL::sign (4*_r*_s - _t*_t); @@ -1371,7 +1371,7 @@ private: } /*! - * Build the data for hyperbolic arc, contaning the characterization of the + * Build the data for hyperbolic arc, containing the characterization of the * hyperbolic branch the arc is placed on. */ void _build_hyperbolic_arc_data () @@ -1626,7 +1626,7 @@ protected: } /*! - * Find the vertical tangency points of the undelying conic. + * Find the vertical tangency points of the underlying conic. * \param ps The output points of vertical tangency. * This area must be allocated at the size of 2. * \return The number of vertical tangency points. @@ -1709,7 +1709,7 @@ protected: } /*! - * Find the horizontal tangency points of the undelying conic. + * Find the horizontal tangency points of the underlying conic. * \param ps The output points of horizontal tangency. * This area must be allocated at the size of 2. * \return The number of horizontal tangency points. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h index 737610bc86d..d1c5ed3826c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_point_2.h @@ -111,12 +111,12 @@ private: Base() {} - /*! Constrcutor from the base class. */ + /*! Constructor from the base class. */ _Conic_point_2 (const Base& p) : Base (p) {} - /*! Constructor with homegeneous coordinates. */ + /*! Constructor with homogeneous coordinates. */ _Conic_point_2 (const Algebraic& hx, const Algebraic& hy, const Algebraic& hz) : diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h index ad13fe00427..7579788a8a4 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Conic_x_monotone_arc_2.h @@ -106,7 +106,7 @@ protected: public: - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -945,7 +945,7 @@ public: /*! * Flip the arc. - * \return An arc with swapped source and target and a reverse orienation. + * \return An arc with swapped source and target and a reverse orientation. */ Self flip() const { @@ -1218,7 +1218,7 @@ private: // Check whether the conic is facing up or facing down: // Check whether the arc (which is x-monotone of degree 2) lies above or - // below the segement that contects its two end-points (x1,y1) and (x2,y2). + // below the segment that connects its two end-points (x1,y1) and (x2,y2). // To do that, we find the y coordinate of a point on the arc whose x // coordinate is (x1+x2)/2 and compare it to (y1+y2)/2. Comparison_result res = ker.compare_y_2_object() (p_arc_mid, p_mid); @@ -1239,7 +1239,7 @@ private: /*! * Check if the arc is a special segment connecting two algebraic endpoints - * (and has no undelying integer conic coefficients). + * (and has no underlying integer conic coefficients). */ bool _is_special_segment () const { @@ -1679,7 +1679,7 @@ private: } /*! - * Intersect the supporing conic curves of this arc and the given arc. + * Intersect the supporting conic curves of this arc and the given arc. * \param arc The arc to intersect with. * \param inter_list The list of intersection points. */ @@ -1703,7 +1703,7 @@ private: if (arc._is_special_segment()) { // The second arc is a special segment (a*x + b*y + c = 0). if (_is_special_segment()) { - // Both arc are sepcial segment, so they have at most one intersection + // Both arc are special segment, so they have at most one intersection // point. Algebraic denom = this->_extra_data_P->a * arc._extra_data_P->b - this->_extra_data_P->b * arc._extra_data_P->a; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h index 47e72487c4f..287b54da0ed 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/One_root_number.h @@ -474,7 +474,7 @@ CGAL::Comparison_result compare (const _One_root_number& x, sign_right = ZERO; } - // Check whether on of the terms is zero. In this case, the comparsion + // Check whether on of the terms is zero. In this case, the comparison // result is simpler: if (sign_left == ZERO) { @@ -507,7 +507,7 @@ CGAL::Comparison_result compare (const _One_root_number& x, // We now square both terms and look at the sign of the one-root number: // ((a1 - a2)^2 - (b1^2*c1 + b2^2*c2)) + 2*b1*b2*sqrt(c1*c2) // - // If both signs are negative, we should swap the comparsion result + // If both signs are negative, we should swap the comparison result // we eventually compute. const NT A = diff_alpha*diff_alpha - (x_sqr + y_sqr); const NT B = 2 * x.beta() * y.beta(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h index b6c246eb583..de7128f9700 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h @@ -95,7 +95,7 @@ protected: public: - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -339,7 +339,7 @@ public: if (! valid) return; - // Analyze the bahaviour of the rational function at x = -oo (the source). + // Analyze the behaviour of the rational function at x = -oo (the source). Algebraic y0; const Arr_parameter_space inf_s = _analyze_at_minus_infinity (_numer, _denom, y0); @@ -351,7 +351,7 @@ public: else // if (inf_s == ARR_INTERIOR) _ps = Point_2 (0, y0); - // Analyze the bahaviour of the rational function at x = +oo (the target). + // Analyze the behaviour of the rational function at x = +oo (the target). const Arr_parameter_space inf_t = _analyze_at_plus_infinity (_numer, _denom, y0); @@ -989,7 +989,7 @@ public: // Both arcs are defined to the same side (left or right) of the vertical // asymptote. If one is defined at y = -oo and the other at y = +oo, we - // preform a "lexicographic" comparison. + // perform a "lexicographic" comparison. const Arr_parameter_space inf_y1 = (ind1 == ARR_MIN_END ? left_infinite_in_y() : right_infinite_in_y()); const Arr_parameter_space inf_y2 = (ind2 == ARR_MIN_END) ? @@ -1833,7 +1833,7 @@ public: typedef std::pair Intersection_point; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -1844,7 +1844,7 @@ public: {} /*! - * Constrcutor from a base arc. + * Constructor from a base arc. */ _Continuous_rational_arc_2 (const Base& arc) : Base (arc) @@ -2346,7 +2346,7 @@ public: typedef typename Base::Rat_vector Rat_vector; typedef typename Base::Polynomial Polynomial; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h index 5845797ae72..7af60b3d1b3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_landmarks_point_location.h @@ -262,7 +262,7 @@ protected: * \param new_vertex Output: if found a closer vertex to the query point. * \param cv_is_contained_in_seg Output: Whether cv is contained inside seg. * \return A handle to the halfedge (if no intersecting edge is found, the - * function returns an ivalid halfedge handle). + * function returns an invalid halfedge handle). */ Halfedge_const_handle _intersection_with_ccb(Ccb_halfedge_const_circulator circ, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h index 8a71028c8b4..b2354fe9895 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_linear_traits_2.h @@ -592,7 +592,7 @@ public: Compare_y_at_x_2 compare_y_at_x = m_traits.compare_y_at_x_2_object(); //preconditions - //check if source and taget are distinct points and they lie on the line. + //check if source and target are distinct points and they lie on the line. CGAL_precondition(!equal(src, tgt)); CGAL_precondition(compare_y_at_x(src, xcv) == EQUAL); CGAL_precondition(compare_y_at_x(tgt, xcv) == EQUAL); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h index 3a6ab1538b8..42d0457c32b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_traits_2.h @@ -22,7 +22,7 @@ * This traits class handles general segments. It is a model of the * ArrangementTraits_2 concept, a refinement of the ArrangementBasicTraits_2 * concept. The class is templated by a kernel and inherits from the - * Arr_non_caching_segment_basic_traits_2 class instanciated with the kernel - + * Arr_non_caching_segment_basic_traits_2 class instantiated with the kernel - * a model of the ArrangementBasicTraits_2 concept. It defined a few additional * functors required by the concept it models. */ @@ -143,7 +143,7 @@ public: { return Make_x_monotone_2(); } /*! \class - * A functor for splitting a segment into two segements. + * A functor for splitting a segment into two segments. */ class Split_2 { typedef Arr_non_caching_segment_traits_2 Self; @@ -233,14 +233,14 @@ public: // There is no intersection: if (! res) return oi; - // Chack if the intersection is a point: + // Check if the intersection is a point: const Point_2* p_p = boost::get(&*res); if (p_p != nullptr) { // Create a pair representing the point with its multiplicity, // which is always 1 for line segments for all practical purposes. // If the two segments intersect at their endpoints, then the // multiplicity is undefined, but we deliberately ignore it for - // efficieny reasons. + // efficiency reasons. *oi++ = Intersection_result(Intersection_point(*p_p, 1)); return oi; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h index b9ccd177ea3..c622bbe1a32 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h @@ -100,14 +100,14 @@ public: if (p_arr != nullptr) return; - // Notify the concrete oberver (the sub-class) about the attachment. + // Notify the concrete observer (the sub-class) about the attachment. before_attach(arr); // Register the observer object in the new arrangement. p_arr = &arr; p_arr->_register_observer(this); - // Notify the concrete oberver that the attachment took place. + // Notify the concrete observer that the attachment took place. after_attach(); } @@ -116,15 +116,15 @@ public: { if (p_arr == nullptr) return; - // Notify the concrete oberver (the sub-class) about the detachment. + // Notify the concrete observer (the sub-class) about the detachment. before_detach (); // Unregister the observer object from the current arrangement, and mark - // that the oberver is not attached to an arrangement. + // that the observer is not attached to an arrangement. p_arr->_unregister_observer(this); p_arr = nullptr; - // Notify the concrete oberver that the detachment took place. + // Notify the concrete observer that the detachment took place. after_detach(); } //@} diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h index 0a6fbc736b7..ea0ad200fc6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_landmarks_pl_impl.h @@ -47,7 +47,7 @@ Arr_landmarks_point_location::locate(const Point_2& p) const return lm_location_obj; // Walk from the nearest_vertex to the point p, using walk algorithm, - // and find the location of the query point p. Note that the set fo edges + // and find the location of the query point p. Note that the set of edges // we have crossed so far is initially empty. Halfedge_set crossed_edges; result_type out_obj; @@ -100,7 +100,7 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex, CGAL_assertion_msg(! vh->is_at_open_boundary(), "_walk_from_vertex() from a vertex at infinity."); - // Check if the qurey point p conincides with the vertex. + // Check if the query point p coincides with the vertex. if (m_traits->equal_2_object()(vh->point(), p)) return make_result(vh); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h index e74a80da15c..8e42fcf2250 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_halton_generator.h @@ -81,7 +81,7 @@ protected: { points.clear(); - // Go over the arrangement vertices and construct their boundig box. + // Go over the arrangement vertices and construct their bounding box. const Arrangement_2* arr = this->arrangement(); Vertex_const_iterator vit; double x_min = 0, x_max = 1, y_min = 0, y_max = 1; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h index 7f2cd2aa450..11757d55ab7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_lm_random_generator.h @@ -82,7 +82,7 @@ protected: { points.clear(); - // Go over the arrangement vertices and construct their boundig box. + // Go over the arrangement vertices and construct their bounding box. const Arrangement_2* arr = this->arrangement(); Vertex_const_iterator vit; double x_min = 0, x_max = 1, y_min = 0, y_max = 1; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h index a5980967cb4..453fc7ce13c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_simple_point_location_impl.h @@ -92,7 +92,7 @@ Arr_simple_point_location::locate(const Point_2& p) const //----------------------------------------------------------------------------- // Locate the arrangement feature which a vertical ray emanating from the -// given point hits (not inculding isolated vertices). +// given point hits (not including isolated vertices). // template typename Arr_simple_point_location::Optional_result_type @@ -155,7 +155,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const cl_vt = vt; } else { - // Compare with the vertically closest curve so far and detemine the + // Compare with the vertically closest curve so far and determine the // curve closest to p. We first check the case that the two curves // have a common endpoint (note that the two curves do not intersect // in their interiors). Observe that if such a common vertex exists, @@ -192,7 +192,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const // In case the two curves do not have a common endpoint, but overlap // in their x-range (both contain p), just compare their positions. // Note that in this case one of the edges may be fictitious, so we - // preform the comparsion symbolically in this case. + // perform the comparison symbolically in this case. y_res = (closest_he->has_null_curve()) ? curve_above_under : ((eit->has_null_curve()) ? point_above_under : compare_y_position(closest_he->curve(), eit->curve())); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h index f95817735da..9a0ac3b2527 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_trapezoid_ric_pl_impl.h @@ -201,7 +201,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, //the Halfedge_handle source is left_ee. // this way the face on it's left is the desired one - //MICHAL: maybe add a verification that the above occures + //MICHAL: maybe add a verification that the above occurs return he->face(); } else if (!tr.is_on_right_boundary()) { @@ -234,7 +234,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p, //the Halfedge_handle source is right_ee. // this way the face on it's left is the desired one - //MICHAL: maybe add a verification that the above occures + //MICHAL: maybe add a verification that the above occurs return he->face(); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h index 2272aa287be..4f6ddf1eec9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_functions.h @@ -86,7 +86,7 @@ Arr_triangulation_point_location::locate(const Point_2& p) case CDT::EDGE: CGAL_TRG_PRINT_DEBUG("locate type = edge" << li); - //li is the index of the vertex OPOSITE to the edge + //li is the index of the vertex OPPOSITE to the edge if (m_cdt.is_constrained(CDT_Edge(fh,li))) { //the edge found is an edge in the plannar map CGAL_TRG_PRINT_DEBUG("the edge is a constrained"); @@ -189,7 +189,7 @@ Arr_triangulation_point_location::locate(const Point_2& p) //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template @@ -197,7 +197,7 @@ void Arr_triangulation_point_location::clear_triangulation() { m_cdt.clear(); } //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h index 5dffa9bbccf..fd97720ab65 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_triangulation_pl_impl.h @@ -85,7 +85,7 @@ Arr_triangulation_point_location::locate (const Point_2& p) const case CDT::EDGE: { CGAL_TRG_PRINT_DEBUG("locate type = edge"<
  • ::locate (const Point_2& p) const //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template @@ -217,7 +217,7 @@ void Arr_triangulation_point_location::clear_triangulation () } //---------------------------------------------------- -/*! triangulate the arrangement into a cdt (Constaint Delauney Triangulation): +/*! triangulate the arrangement into a cdt (Constraint Delauney Triangulation): go over all halfedges, and insert each halfedge as a constraint to the cdt. */ template diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h index dff6a89f9cf..74bea960eed 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h @@ -440,7 +440,7 @@ _is_in_connected_component (const Point_2& p, is_on_edge = false; closest_to_target = false; - // Set the results for comparison acording to the ray direction. + // Set the results for comparison according to the ray direction. const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER); const Comparison_result curve_above_under = (shoot_up ? LARGER : SMALLER); @@ -580,7 +580,7 @@ _is_in_connected_component (const Point_2& p, res = top_traits->compare_y_at_x(p, &(*curr)); if (res == EQUAL) { - // The current edge contains the query point. If the seach is inclusive + // The current edge contains the query point. If the search is inclusive // we return the edge. Otherwise, we return it only if it is vertical, // and contains p in its interior. if (inclusive) { @@ -620,7 +620,7 @@ _is_in_connected_component (const Point_2& p, if (source_res != EQUAL) { if ((closest_he == invalid_he) || (closest_he->twin() == Halfedge_const_handle(curr))) { - // 1. If we have no closests halfedge, we have just found one. + // 1. If we have no closest halfedge, we have just found one. // 2. If the closest halfedge is the twin of our current halfedge, // we can take our halfedge to be the closest one. This covers the // case where our closest halfedge is not in our CCB. @@ -629,7 +629,7 @@ _is_in_connected_component (const Point_2& p, closest_to_target = (target_res == EQUAL); } else { - // Compare with the vertically closest curve so far and detemine the + // Compare with the vertically closest curve so far and determine the // curve closest to p. We first check the case that the two curves // have a common endpoint (note that the two curves do not intersect // in their interiors). Observe that if such a common vertex exists, @@ -673,7 +673,7 @@ _is_in_connected_component (const Point_2& p, // In case the two curves do not have a common endpoint, but // overlap in their x-range (both contain p), just compare their // positions. Note that in this case one of the edges may be - // fictitious, so we preform the comparsion symbolically in this + // fictitious, so we perform the comparison symbolically in this // case. if (closest_he->is_fictitious()) y_res = curve_above_under; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index 6f6f72a1678..9f10d237246 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -18,7 +18,7 @@ /*! \file - * Defintion of the Td_X_trapezoid class. + * Definition of the Td_X_trapezoid class. */ #include @@ -239,7 +239,7 @@ public: ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END; if (!is_on_boundaries()) - { //if the trapezoid respresents an inner vertex + { //if the trapezoid represents an inner vertex ptr()->e0 = left()->point(); } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h index 24ad3b4bf15..9b82324fa33 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_active_edge class. + * Definition of the Td_active_edge class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index e47760609a0..0681f5b5779 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h @@ -17,7 +17,7 @@ #include /*! \file - * Defintion of the Td_active_fictitious_vertex class. + * Definition of the Td_active_fictitious_vertex class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index e74b291ab06..c61693a6616 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_active_trapezoid class. + * Definition of the Td_active_trapezoid class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h index 9486ddcc41d..530debb43f8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h @@ -17,7 +17,7 @@ #include /*! \file - * Defintion of the Td_active_vertex class. + * Definition of the Td_active_vertex class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h index ec4a961d8f1..72fd48526c8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_dag_node.h @@ -145,7 +145,7 @@ protected: boost::apply_visitor(clear_neighbors_visitor(), m_data); } - bool is_inner_node() const //MICHAL: a node with only left child (like removed node) will be concidered as a leaf + bool is_inner_node() const //MICHAL: a node with only left child (like removed node) will be considered as a leaf { //return !!m_left_child && !!m_right_child; return (!m_left_child.is_null() && !m_right_child.is_null()); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h index 72497798323..f0187bf16ea 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_edge class. + * Definition of the Td_inactive_edge class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h index db7a89c8275..d6956380aa6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_fictitious_vertex class. + * Definition of the Td_inactive_fictitious_vertex class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h index 1c498b5608a..908be87c078 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_trapezoid.h @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_trapezoid class. + * Definition of the Td_inactive_trapezoid class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h index e9dc3158554..93066874631 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_vertex class. + * Definition of the Td_inactive_vertex class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h index 4a3ba178259..45ba665a1d5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_traits.h @@ -1077,7 +1077,7 @@ public: } /*! returns true if the end point is inside the closure of the trapezoid - (inlcude all boundaries) */ + (include all boundaries) */ bool is_in_closure (const Td_active_trapezoid& tr, const Curve_end& ce ) const { // test left and right sides @@ -1107,7 +1107,7 @@ public: return false; } /*! returns true if the end point is inside the closure of the trapezoid - (inlcude all boundaries) */ + (include all boundaries) */ bool is_in_closure (const Td_active_edge& e, const Curve_end& ce ) const { // test left and right sides diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h index d9ff595e41d..f70204b0174 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h @@ -44,7 +44,7 @@ namespace internal{ // struct used to avoid recursive deletion of elements of // Td_map_item. Td_active_edge and Td_active_edge_item are -// both refering to elements of the same type creating +// both referring to elements of the same type creating // recursive call to ~Handle() if we let the regular // calls of destructors. Here elements are copied in // a vector and the true deletion is done when the vector @@ -326,7 +326,7 @@ public: #endif protected: - //reference to the seperating X_monotone_curve_2 + //reference to the separating X_monotone_curve_2 const X_monotone_curve_2& m_sep; public: @@ -357,14 +357,14 @@ public: /* destription: advances m_cur_item to one of the right neighbours according to the relation - between the seperating Halfedge (m_sep) and the right() trapezoid point. + between the separating Halfedge (m_sep) and the right() trapezoid point. precoditions: m_sep doesn't intersect any existing edges except possibly on common end points. postconditions: if the rightmost trapezoid was traversed m_cur_item is set to nullptr. remark: - if the seperator is vertical, using the precondition assumptions it + if the separator is vertical, using the precondition assumptions it follows that there is exactly one trapezoid to travel. */ In_face_iterator& operator++() @@ -1196,7 +1196,7 @@ protected: Dag_node* node); //--------------------------------------------------------------------------- // Description: - // the opposite operation for spliting the trapezoid with + // the opposite operation for splitting the trapezoid with // vertical line through ce // Precondition: // The root trapezoid is degenerate point (ce) and is active @@ -1214,7 +1214,7 @@ protected: // trapezoidal tree with an input halfedge he // Precondition: // The root trapezoid is active - // The root trapezoid is devided by he or is equal to it and is vertical. + // The root trapezoid is divided by he or is equal to it and is vertical. Dag_node& split_trapezoid_by_halfedge(Dag_node& split_node, Td_map_item& prev_e, Td_map_item& prev_bottom_tr, @@ -1504,7 +1504,7 @@ public: // Remark: // Given an edge-degenerate trapezoid representing a Halfedge, // all the other trapezoids representing the Halfedge can be extracted - // via moving continously to the left and right neighbours. + // via moving continuously to the left and right neighbours. Td_map_item insert(Halfedge_const_handle he); @@ -2015,7 +2015,7 @@ public: if (static_cast(std::rand()) > RAND_MAX / ( num_of_cv + 1)) return false; - /* INTERNAL COMPILER ERROR overide + /* INTERNAL COMPILER ERROR override #ifndef __GNUC__ */ #ifdef CGAL_TD_REBUILD_DEBUG diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h index 087920e3aec..fcc17f1d7cb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h @@ -168,7 +168,7 @@ build_vertex_map_item(Vertex_const_handle v, //----------------------------------------------------------------------------- // Description: -// the opposite operation for spliting the trapezoid with +// the opposite operation for splitting the trapezoid with // vertical line through ce // Precondition: // tr_node data is a td vertex and is active @@ -259,7 +259,7 @@ deactivate_edge(std::shared_ptr& cv, // trapezoidal tree with an input halfedge he // Precondition: // The root trapezoid is active -// The root trapezoid is devided by he or is equal to it and is vertical. +// The root trapezoid is divided by he or is equal to it and is vertical. template typename Trapezoidal_decomposition_2::Dag_node & Trapezoidal_decomposition_2:: @@ -609,7 +609,7 @@ search_using_dag(Dag_node& curr_node, while (true) { //curr_node is the current pointer to node in the data structure - //curr_item is the curent Td_map_item held in curr_node + //curr_item is the current Td_map_item held in curr_node Td_map_item curr_item(curr_node.get_data()); if (traits->is_td_vertex(curr_item)) { @@ -793,7 +793,7 @@ search_using_dag(Dag_node& curr_node, // while(true) // { // //curr_node is the current pointer to node in the data structure -// //curr_item is the curent Td_map_item held in curr_node +// //curr_item is the current Td_map_item held in curr_node // Td_map_item curr_item(curr_node.get_data()); // // if (traits->is_td_vertex(curr_item)) @@ -1017,7 +1017,7 @@ search_using_dag_with_cv(Dag_node& curr_node, { while (true) { //curr_node is the current pointer to node in the data structure - //curr_item is the curent Td_map_item held in curr_node + //curr_item is the current Td_map_item held in curr_node Td_map_item curr_item(curr_node.get_data()); if (traits->is_td_vertex(curr_item)) { @@ -1207,7 +1207,7 @@ search_using_dag_with_cv(Dag_node& curr_node, while (true) { //curr_node is the current pointer to node in the data structure - //curr_item is the curent Td_map_item held in curr_node + //curr_item is the current Td_map_item held in curr_node Td_map_item curr_item(curr_node.get_data()); if (traits->is_td_vertex(curr_item)) { @@ -1443,7 +1443,7 @@ is_last_edge(Halfedge_const_handle /* he */ , Td_map_item& vtx_item) // Remark: // Given an edge-degenerate trapezoid representing a Halfedge, // all the other trapezoids representing the Halfedge can be extracted -// via moving continously to the left and right neighbours. +// via moving continuously to the left and right neighbours. template typename Trapezoidal_decomposition_2::Td_map_item Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) @@ -2114,7 +2114,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // CGAL_warning(old_t.dag_node()); // //#endif -// //the DAG node of the curve trapezoid where the spiltting point is +// //the DAG node of the curve trapezoid where the splitting point is // Dag_node& old_split_node = *old_t.dag_node(); // // CGAL_assertion(traits->equal_curve_end_2_object() @@ -2202,7 +2202,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // In_face_iterator& top_it = *m_before_split.m_p_top_it; // //MICHAL: new end // -// //the DAG node of the curve trapezoid where the spiltting point is +// //the DAG node of the curve trapezoid where the splitting point is // Dag_node& old_split_node = *old_t.dag_node(); // // diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index ca5e8ce1447..66ec759e105 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -325,7 +325,7 @@ public: {} /*! Compare two directional points lexigoraphically: by x, then by y. - * \param p1 the first enpoint directional point. + * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. * \return SMALLER - x(p1) < x(p2); * SMALLER - x(p1) = x(p2) and y(p1) < y(p2); @@ -1592,7 +1592,7 @@ public: // x-value. // and also that min end subcurve is always placed at position 0 of the // vector. - // Comfirm with Eric. + // Confirm with Eric. return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; } @@ -1681,7 +1681,7 @@ public: // x-value. // and also that min end subcurve is always placed at position 0 of the // vector. - // Comfirm with Eric. + // Confirm with Eric. size_type index = (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; return index; } @@ -2328,7 +2328,7 @@ public: target = src; } - // std::cout << "**************the new sourc: " << source + // std::cout << "**************the new source: " << source // << "the new target: " << target << std::endl; /* * Get the source and target subcurve numbers from the polycurve. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index d0c6fd76aa5..db9b12395f9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -818,7 +818,7 @@ public: // assume that the subcurves cannot overlap more than once. if (! right_coincides && ! left_coincides) { // Non of the endpoints of the current subcurve of one polycurve - // coincides with the curent subcurve of the other polycurve: + // coincides with the current subcurve of the other polycurve: // Output the intersection if exists. std::vector xections; intersect(cv1[i1], cv2[i2], std::back_inserter(xections)); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index 7dc1412a0ee..ef568ab6cad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -450,7 +450,7 @@ public: _info = (_info | IS_DIRECTED_RIGHT); - // Analyze the bahaviour of the rational function at x = -oo (the source). + // Analyze the behaviour of the rational function at x = -oo (the source). Algebraic_real_1 y0; const Arr_parameter_space inf_s = _analyze_at_minus_infinity(P, Q, y0); @@ -460,7 +460,7 @@ public: _info = (_info | SRC_AT_Y_PLUS_INFTY); else // if (inf_s == ARR_INTERIOR) _ps = Algebraic_point_2(); //the point is a dummy - //Analyze the bahaviour of the rational function at x = +oo (the target). + //Analyze the behaviour of the rational function at x = +oo (the target). const Arr_parameter_space inf_t = _analyze_at_plus_infinity(P, Q, y0); if (inf_t == ARR_BOTTOM_BOUNDARY) @@ -1010,7 +1010,7 @@ public: //Get the relative position of the point with respect to the rational arc. //param p The query point. //precondition: p is in the x-range of the arc. - // both p's supporting curve and the rational arc are continous + // both p's supporting curve and the rational arc are continuous //return SMALLER if the point is below the arc; // LARGER if the point is above the arc; // EQUAL if p lies on the arc. @@ -1450,7 +1450,7 @@ protected: //------------------------------- //-------------------------------------------------------------------------- - // Cannonicalize numerator and denominator such that: + // Canonicalize numerator and denominator such that: // There are no common devisor // If negative sign exists, it is in the numerator void _canonicalize(const Polynomial_1& P,const Polynomial_1& Q, @@ -1852,7 +1852,7 @@ public: //typedef std::pair Intersection_point; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! @@ -1863,7 +1863,7 @@ public: {} /*! - * Constrcutor from a base arc. + * Constructor from a base arc. */ Continuous_rational_arc_d_1(const Base& arc) : Base(arc) @@ -2421,7 +2421,7 @@ public: typedef typename Base::Cache Cache; - /// \name Constrcution methods. + /// \name Construction methods. //@{ /*! diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h index d9667f09848..1e3b908faa6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_segment_traits_2.h @@ -1041,7 +1041,7 @@ public: m_traits.compare_y_at_x_2_object()); Compare_x_2 compare_x_2 = m_traits.compare_x_2_object(); - // check whether source and taget are two distinct points and they lie + // check whether source and target are two distinct points and they lie // on the line. CGAL_precondition(!equal(src, tgt)); CGAL_precondition(compare_y_at_x(src, xcv) == EQUAL); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h index cac0d12eb09..099f46edcd6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_simple_point_location.h @@ -152,7 +152,7 @@ public: protected: /*! * Locate the arrangement feature which a vertical ray emanating from the - * given point hits (not inculding isolated vertices). + * given point hits (not including isolated vertices). * \param p The query point. * \param shoot_up Indicates whether the ray is directed upward or downward. * \return An object representing the arrangement feature the ray hits. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h index b429247edc7..718679797d1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm.h @@ -109,7 +109,7 @@ private: polyhedron.planes_begin(), Normal_equation()); } - /*! Compute the equation of the undelying plane of a facet */ + /*! Compute the equation of the underlying plane of a facet */ struct Plane_equation { template typename Facet::Plane_3 operator()(Facet& f) { diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h index 70e9a8b6518..b76c7d5088b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_polyhedral_sgm_polyhedron_3.h @@ -129,7 +129,7 @@ private: Base; typedef typename Sgm::Vertex_handle Arr_vertex_handle; - /*! The arrangement vertex handle of the projected noraml. */ + /*! The arrangement vertex handle of the projected normal. */ Arr_vertex_handle m_vertex; /*! Indicates whether it is a marked face */ @@ -161,7 +161,7 @@ public: }; /*! The "items" type. A model of the PolyhedralSgmPolyhedronItems_3 concept, - * which is a refinment of the PolyhedronItems_3 concept. Its base class + * which is a refinement of the PolyhedronItems_3 concept. Its base class * Polyhedron_items_3, a model of the latter concept, provides definitions of * vertices with points, halfedges, and faces with normal equations. We extend * the definition of each one of the three items with the necessary data diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h index 3dfd56071ca..54264ab18e6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_spherical_gaussian_map_3.h @@ -21,7 +21,7 @@ * embedded on the sphere. * * This file consists of the definition of the main type, namely - * Arr_spherical_gaussian_map_2 and a service tye, + * Arr_spherical_gaussian_map_2 and a service type, * namely Arr_sgm_initializer, that initializes an object of the main type. */ @@ -89,7 +89,7 @@ public: }; #endif -/*! Arr_sgm_initializer is an algorothmic framework that initializes a +/*! Arr_sgm_initializer is an algorithmic framework that initializes a * Arr_spherical_gaussian_map_3 structure. It is parameterized by the SGM to * be initialized and by a visitor class. */ @@ -115,7 +115,7 @@ public: virtual ~Arr_sgm_initializer() {} /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. */ @@ -143,7 +143,7 @@ public: } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \return the handle for the halfedge directed from the endpoint @@ -183,7 +183,7 @@ public: } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \return the handle for the halfedge directed from the endpoint @@ -227,7 +227,7 @@ public: } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \param vertex the handle of the vertex that is the source of the arc @@ -281,7 +281,7 @@ public: } /*! Insert a great arc whose angle is less than Pi and is represented by two - * normals into the SGM. Each normal defines an end point of the greate arc. + * normals into the SGM. Each normal defines an end point of the great arc. * \param normal1 represents the source normal. * \param normal2 represents the target normal. * \param vertex1 the handle of the vertex that is the source of the arc diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h index 1a772864e24..5116ef4ca45 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_gaussian_map_3/Arr_transform_on_sphere.h @@ -103,7 +103,7 @@ void Arr_transform_on_sphere(Arrangement & arr, topol_traits->erase_redundant_vertex(&(*v_temp)); // Merge the edges into a single one, and delete the vertex from the - // DCEL. (By default, the merge_edge() funtion deletes the vertex.) + // DCEL. (By default, the merge_edge() function deletes the vertex.) arr.merge_edge(havc, havc_next->twin() , merged_cv); } } @@ -158,7 +158,7 @@ void Arr_transform_on_sphere(Arrangement & arr, // The curve that its left vertex lies on the identification curve const auto* sub_cv1 = boost::get(&(*it)); ++it; - //The curve that its rigth vertex lies on the identification curve + //The curve that its right vertex lies on the identification curve const auto* sub_cv2 = boost::get(&(*it)); bool eq1 = (*sub_cv1).source() == hei1->source()->point(); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h index 6965f66e99f..9b4ea137450 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_spherical_topology_traits_2.h @@ -154,7 +154,7 @@ protected: //! The geometry-traits adaptor. const Gt_adaptor_2* m_geom_traits; - //! Inidicates whether the traits object should evetually be freed. + //! Indicates whether the traits object should eventually be freed. bool m_own_geom_traits; // Copy constructor and assignment operator - not supported. @@ -289,7 +289,7 @@ public: return (it != m_boundary_vertices.end()) ? it->second : nullptr; } - // TODO remove if all occurences have been replaced with the new signature that queries for a point + // TODO remove if all occurrences have been replaced with the new signature that queries for a point /*! Obtain a vertex on the line of discontinuity that corresponds to * the given curve-end (or return NULL if no such vertex exists). */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h index a03c1c8632f..cd14d4f3978 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_inc_insertion_zone_visitor.h @@ -59,8 +59,8 @@ private: const Vertex_handle invalid_v; // An invalid vertex handle. const Halfedge_handle invalid_he; // An invalid halfedge handle. - X_monotone_curve_2 m_sub_cv1; // Auxiliary varibale (for splitting). - X_monotone_curve_2 m_sub_cv2; // Auxiliary varibale (for splitting). + X_monotone_curve_2 m_sub_cv1; // Auxiliary variable (for splitting). + X_monotone_curve_2 m_sub_cv2; // Auxiliary variable (for splitting). public: /*! Constructor. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h index 68448ca1b4c..0ceba209b57 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_planar_topology_traits_base_2.h @@ -71,8 +71,8 @@ protected: Dcel m_dcel; // The DCEL. const Traits_adaptor_2* m_geom_traits; // The geometry-traits adaptor. - bool m_own_geom_traits; // Inidicate whether we should - // evetually free the traits object. + bool m_own_geom_traits; // Indicate whether we should + // eventually free the traits object. // Copy constructor and assignment operator - not supported. Arr_planar_topology_traits_base_2(const Self&); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h index 36f94283653..4384be25014 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h @@ -263,7 +263,7 @@ before_handle_event(Event* event) if (ps_x == ARR_RIGHT_BOUNDARY) { // Process a non-isolated event on the right identified boundary. - // Cannnot be vertical, only curves approaching the right side are possible. + // Cannot be vertical, only curves approaching the right side are possible. // If a vertex on the line of discontinuity does not exists, create one. DVertex* dv = m_top_traits->discontinuity_vertex(event->point()); Vertex_handle v = (dv) ? Vertex_handle(dv) : diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h index 10abb5f19ea..28a89150af8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_insertion_helper.h @@ -163,7 +163,7 @@ before_handle_event_imp(Event* event, Arr_not_all_sides_oblivious_tag) if (event->is_isolated()) return; if (ps_y == ARR_BOTTOM_BOUNDARY) { - // Process bootom contraction boundary: + // Process bottom contraction boundary: // The event has only one right curve, as there is exactly one curve // incident to an event with boundary conditions. CGAL_assertion((event->number_of_left_curves() == 0) && diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h index ae871171390..fbe5e059eef 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h @@ -217,14 +217,14 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const * 1. The vertical ray intersects the boundary at a halfedge. In this * case the x-possition of p is strictly larger than the x-possition of * the current-curve source, and strictly smaller than x-possition of - * the current-curve target, or vise versa. + * the current-curve target, or vice versa. * 2. The vertical ray intersects the boundary at a vertex. In this case: * a. the x-possition of p is strictly smaller than the x-position of the * current-curve source, and equal to the x-position of the current-curve * target, and * b. the x-possition of p is equal to the x-position of the next-curve * source (not counting vertical curves in between), and strictly larger - * than the x-possition of the next-curve target, or vise verase (that is, + * than the x-possition of the next-curve target, or vice verase (that is, * the "smaller" and "larger" interchanged). */ @@ -902,7 +902,7 @@ _locate_around_pole(Vertex* v, next = curr->next()->opposite(); } while (curr != first); - // We sould never reach here: + // We should never reach here: CGAL_error(); return nullptr; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h index 3ff18aa638b..af8e70a3f13 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_vert_decomp_helper.h @@ -109,14 +109,14 @@ public: template void Arr_spherical_vert_decomp_helper::before_sweep() { - // Get the north pole and the face that intially contains it. + // Get the north pole and the face that initially contains it. m_valid_north_pole = (m_top_traits->north_pole() != nullptr); if (m_valid_north_pole) m_north_pole = Vertex_const_handle (m_top_traits->north_pole()); m_north_face = Face_const_handle (m_top_traits->spherical_face()); - // Get the south pole and the face that intially contains it. + // Get the south pole and the face that initially contains it. m_valid_south_pole = (m_top_traits->south_pole() != nullptr); if (m_valid_south_pole) m_south_pole = Vertex_const_handle (m_top_traits->south_pole()); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h index 5d9a91452af..fa5d9095cfe 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h @@ -809,7 +809,7 @@ _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind, } } else { - // If we reched here, we have a "horizontal" fictitious halfedge. + // If we reached here, we have a "horizontal" fictitious halfedge. Arr_parameter_space he_ps_y = v1->parameter_space_in_y(); CGAL_assertion((he_ps_y == ARR_BOTTOM_BOUNDARY || diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h index 7cd7374f513..a9d3ba2c19d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tracing_traits_2.h @@ -279,7 +279,7 @@ public: m_object(base->construct_min_vertex_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curev the left endpoint of which is obtained + * \param xcv the curve the left endpoint of which is obtained * \return the left endpoint */ const Point_2 operator()(const X_monotone_curve_2& xcv) const @@ -305,7 +305,7 @@ public: m_object(base->construct_max_vertex_2_object()), m_enabled(enabled) {} /*! Operate - * \param xcv the curev the right endpoint of which is obtained + * \param xcv the curve the right endpoint of which is obtained * \return the right endpoint */ const Point_2 operator()(const X_monotone_curve_2& xcv) const diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h index d06d7c71076..3739d35a83a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertical_decomposition_2.h @@ -87,7 +87,7 @@ decompose(const Arrangement_on_surface_2& arr, Halfedge_const_handle he = (eit->direction() == ARR_RIGHT_TO_LEFT) ? eit : eit->twin(); //attempt to solve compile problem in one of the tests. created the - // tmp_curve instead of passing eit->curve() as a parmeter to the function + // tmp_curve instead of passing eit->curve() as a parameter to the function X_monotone_curve_2 tmp_curve = eit->curve(); xcurves_vec[i++] = Vd_x_monotone_curve_2(tmp_curve, he); } @@ -102,7 +102,7 @@ decompose(const Arrangement_on_surface_2& arr, if (vit->is_isolated()) { Vertex_const_handle iso_v = vit; //attempt to solve compile problem in one of the tests. created the - // tmp_curve instead of passing eit->curve() as a parmeter to the + // tmp_curve instead of passing eit->curve() as a parameter to the // function Point_2 tmp_point = vit->point(); iso_pts_vec[i++] = Vd_point_2(tmp_point, iso_v); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h index 1d6bc8b97cd..9685d3739f8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_compute_zone_visitor.h @@ -26,7 +26,7 @@ namespace CGAL { /*! \class * A visitor class for Arrangement_zone_2 that outputs the zone of an - * x-monotone curve. Specifically, it outputs handles to the the arrangment + * x-monotone curve. Specifically, it outputs handles to the the arrangement * cells that the x-monotone curve intersects. * The class should be templated by an Arrangement_2 class, and by an * output iterator of a variant of types of handles to the arrangement cells @@ -54,11 +54,11 @@ private: const Halfedge_handle invalid_he; // Invalid halfedge. const Vertex_handle invalid_v; // Invalid vertex. - OutputIterator& out_iter; // for outputing the zone objects. + OutputIterator& out_iter; // for outputting the zone objects. // Its value type is boost::variant. - bool output_left; // Determines wheter we should + bool output_left; // Determines whether we should // output the left end point of a - // subcurve (to avoid outputing + // subcurve (to avoid outputhing // the same feature twice). public: diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h index 0e69460c71a..c4efa8a5ef6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_do_intersect_zone_visitor.h @@ -24,8 +24,8 @@ namespace CGAL { /*! \class * A visitor class for Arrangement_zone_2, which check whether - * a given x-monotone curve intersects the arrangment. - * The class shouldbe templated by an Arrangement_2 class. + * a given x-monotone curve intersects the arrangement. + * The class should be templated by an Arrangement_2 class. */ template class Arr_do_intersect_zone_visitor diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index a89043def67..54c2d0aad44 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -124,7 +124,7 @@ public: typedef typename Base::Compare_y_at_x_right_2 Compare_y_at_x_right_2; typedef typename Base::Equal_2 Equal_2; - /// \name Overriden functors for bounded boundaries. + /// \name Overridden functors for bounded boundaries. //@{ /*! A functor that compares the y-coordinates of (i) a given point and (ii) @@ -656,7 +656,7 @@ public: //@} - /// \name Overriden functors for boundaries. + /// \name Overridden functors for boundaries. //@{ // left-right @@ -1860,7 +1860,7 @@ public: auto compare_x = m_self->compare_x_2_object(); auto min_res = compare_x(p, m_self->construct_min_vertex_2_object()(xcv)); if (min_res == SMALLER) return false; // p is to the left of the x-range - else if (min_res == EQUAL) return true; // p coinsides with the left end + else if (min_res == EQUAL) return true; // p coincides with the left end auto max_res = compare_x(p, m_self->construct_max_vertex_2_object()(xcv)); return (max_res != LARGER); @@ -2248,7 +2248,7 @@ public: if (ps_y1 != ARR_INTERIOR) { if (ps_y2 != ARR_INTERIOR) { - // The curve ends have special boundary with oposite signs in y, + // The curve ends have special boundary with opposite signs in y, // we readily know their relative position (recall that they do not // instersect). if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY)) @@ -3360,11 +3360,11 @@ public: typedef typename Base_traits_2::Split_2 Split_2; typedef typename Base_traits_2::Intersect_2 Intersect_2; - /// \name Overriden functors. + /// \name Overridden functors. //@{ /*! A functor that compares two points or two x-monotone curves - * lexigoraphically. Two points are compared firest by their x-coordinates, + * lexigoraphically. Two points are compared first by their x-coordinates, * then by their y-coordinates. Two curves are compared first their left-most * endpoint, then by the graphs, and finally by their right-most endpoint. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h index 1993de1862f..e4533596dd2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2_dispatching.h @@ -258,7 +258,7 @@ namespace Is_on_y_identification_2 { namespace Compare_y_on_boundary_2 { - // Poitns + // Points template < class ArrSideTag > struct Points { typedef Arr_use_dummy_tag type; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h index afc5ef36512..070b10513a3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_with_history_accessor.h @@ -25,7 +25,7 @@ namespace CGAL { /*! \class * A class that provides access to some of the internal methods of the * Arrangement_on_surface_with_history_2 class. - * Used mostly by the global functions that operate on arrangments with + * Used mostly by the global functions that operate on arrangements with * history objects. */ template diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index b0cb7948e51..4b65cf0390f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -640,7 +640,7 @@ void insert_curves(Arrangement_on_surface_2& //----------------------------------------------------------------------------- // Insert an x-monotone curve into the arrangement, such that the curve // interior does not intersect with any existing edge or vertex in the -// arragement (incremental insertion). +// arrangement (incremental insertion). // template @@ -796,7 +796,7 @@ insert_non_intersecting_curve //----------------------------------------------------------------------------- // Insert an x-monotone curve into the arrangement, such that the curve // interior does not intersect with any existing edge or vertex in the -// arragement (incremental insertion). +// arrangement (incremental insertion). // Overloaded version with no point location object. // template @@ -1003,7 +1003,7 @@ non_intersecting_insert_non_empty(Arrangement_on_surface_2 @@ -1607,7 +1607,7 @@ do_intersect(Arrangement_on_surface_2& arr, CGAL_assertion(iso_p != nullptr); // Check whether the isolated point lies inside a face (otherwise, - // it conincides with a vertex or an edge). + // it coincides with a vertex or an edge). auto obj = pl.locate(*iso_p); if (boost::get(&x_obj) != nullptr) return true; } diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h index c7bb1aa1bdf..a05c76ee9d5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h @@ -248,7 +248,7 @@ Arrangement_on_surface_2::~Arrangement_on_surface_2() template void Arrangement_on_surface_2::clear() { - // Notify the observers that we are about to clear the arragement. + // Notify the observers that we are about to clear the arrangement. _notify_before_clear(); // Free all stored points. @@ -265,7 +265,7 @@ void Arrangement_on_surface_2::clear() _dcel().delete_all(); m_topol_traits.init_dcel(); - // Notify the observers that we have just cleared the arragement. + // Notify the observers that we have just cleared the arrangement. _notify_after_clear(); } @@ -399,7 +399,7 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f) new_he = _insert_at_vertices(fict_prev1, cv, ARR_LEFT_TO_RIGHT, fict_prev2->next(), new_face_created, check_swapped_predecessors); - // Comment EBEB 2012-10-21: Swapping does not take place as there is no local minumum so far + // Comment EBEB 2012-10-21: Swapping does not take place as there is no local minimum so far CGAL_assertion(!check_swapped_predecessors); // usually one would expect to have an new_he (and its twin) lying on the // same _inner_ CCB ... @@ -1487,7 +1487,7 @@ remove_isolated_vertex(Vertex_handle v) DFace* p_f = iv->face(); Face_handle f = Face_handle(p_f); - // Notify the observers that we are abount to remove a vertex. + // Notify the observers that we are about to remove a vertex. _notify_before_remove_vertex(v); // Remove the isolated vertex from the face that contains it. @@ -2207,7 +2207,7 @@ _place_and_set_point(DFace* f, const Point_2& p, Halfedge_handle((*p_pred)->next())); } else if (obj.is_empty()) { - // Create a new vertex that reprsents the given point. + // Create a new vertex that represents the given point. v = _create_boundary_vertex(p, ps_x, ps_y); // Notify the topology traits on the creation of the boundary vertex. @@ -2240,7 +2240,7 @@ _place_and_set_curve_end(DFace* f, // Act according to the result type. if (! obj) { - // We have to create a new vertex that reprsents the given curve end. + // We have to create a new vertex that represents the given curve end. DVertex* v = _create_boundary_vertex(cv, ind, ps_x, ps_y); // Notify the topology traits on the creation of the boundary vertex. @@ -2359,7 +2359,7 @@ _insert_in_face_interior(DFace* f, // Insert an x-monotone curve into the arrangement, such that one of its // endpoints corresponds to a given arrangement vertex, given the exact // place for the curve in the circular list around this vertex. The other -// endpoint corrsponds to a free vertex (a newly created vertex or an +// endpoint corresponds to a free vertex (a newly created vertex or an // isolated vertex). // template @@ -2915,7 +2915,7 @@ _insert_at_vertices(DHalfedge* he_to, } else if ((ic1 == ic2) && (oc1 == oc2)) { // In this case we created a pair of halfedge that connect halfedges that - // already belong to the same component. This means we have to cretae a + // already belong to the same component. This means we have to create a // new face by splitting the existing face f. // Notify the observers that we are about to split a face. Face_handle fh(f); @@ -3092,7 +3092,7 @@ _insert_at_vertices(DHalfedge* he_to, // In this case, he1 lies on an outer CCB of f. he1->set_outer_ccb(oc1); - // As the outer component of the exisitng face f may associated with + // As the outer component of the existing face f may associated with // one of the halfedges along the boundary of the new face, we set it // to be he1. oc1->set_halfedge(he1); @@ -3111,7 +3111,7 @@ _insert_at_vertices(DHalfedge* he_to, else { // Use the topology traits to determine whether each of the split // faces is unbounded. Note that if the new face is bounded, then f - // obviously reamins unbounded and there is no need for further checks. + // obviously remains unbounded and there is no need for further checks. new_f->set_unbounded(m_topol_traits.is_unbounded(new_f)); if (new_f->is_unbounded()) @@ -3531,7 +3531,7 @@ _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr, // newly inserted curve. // // Precondition The OutputIterator must be a back inserter. -// Precondition The traveresed ccb is an inner ccb; thus, it cannot be +// Precondition The traversed ccb is an inner ccb; thus, it cannot be // on an open boundary. // Postcondition If nullptr is a local minimum, it is inserted first. // No other local minima can be nullptr. @@ -5114,7 +5114,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target) _move_all_isolated_vertices(f2, f1); // move all iso vertices from f2 to f1 // Notice that f2 will be merged with f1, but its boundary will still be - // a hole inside this face. In case he1 is a represantative of this hole, + // a hole inside this face. In case he1 is a representative of this hole, // replace it by its predecessor. if (ic1->halfedge() == he1) ic1->set_halfedge(prev1); diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h index ed297255a22..1a489be166b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h @@ -76,7 +76,7 @@ init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj) } //----------------------------------------------------------------------------- -// Compute the zone of the given curve and issue the apporpriate +// Compute the zone of the given curve and issue the appropriate // notifications for the visitor. // template @@ -289,7 +289,7 @@ do_overlap_impl(const X_monotone_curve_2& cv1, // vertical, they completely lie on the right boundary, and they overlap. if (psx1 == ARR_RIGHT_BOUNDARY) return true; - // If the curves are not vertical, we can safly call the standard function. + // If the curves are not vertical, we can safely call the standard function. // Observe that this case covers the case where (psy == ARR_TOP_BOUNDARY). if (! vertical1) return (cmp_right(cv1, cv2, p) == EQUAL); @@ -687,7 +687,7 @@ _remove_next_intersection(Halfedge_handle he) } //----------------------------------------------------------------------------- -// Check if the given point lies completely to the left of the given egde. +// Check if the given point lies completely to the left of the given edge. // template bool Arrangement_zone_2:: @@ -984,7 +984,7 @@ _zone_in_face(Face_handle face, bool on_boundary) m_visitor->found_subcurve(m_cv, face, m_left_v, m_left_he, m_invalid_v, m_invalid_he); - // Inidicate that we are done with the zone-computation process. + // Indicate that we are done with the zone-computation process. return true; } @@ -1152,7 +1152,7 @@ _zone_in_face(Face_handle face, bool on_boundary) m_left_he = (m_right_he->direction() == ARR_LEFT_TO_RIGHT) ? inserted_he : m_right_he; else { - // Mutliplicity is unkown: + // Mutliplicity is unknown: m_left_he = m_invalid_he; } } diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h index 713e79956bf..a97588ecde2 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/arrangement_type_traits.h @@ -13,7 +13,7 @@ /*! \file arrangement_type_traits.h - \brief The file contains meta-function related to the arrangement pakcage. + \brief The file contains meta-function related to the arrangement package. Specifically, it contains the meta-function is_arrangement_2 that determines whether a given type is an arrangement. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h index f87aeeec560..190f550479c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/graph_traits_dual.h @@ -13,7 +13,7 @@ // Sebastien Loriot // Efi Fogel -// This file contains the follwoing three parts: +// This file contains the following three parts: // 1. The common base class template of the specialized // Dual class template. // @@ -24,8 +24,8 @@ // the various Boost Graph concepts. There is one macro per required function // template. Each macro accepts the name of a template class, an instance of // which represents an arrangement data structure, e.g., Arrangement_2. The -// definitios of the free functions templates for a given arrangement data -// strcture must be present when a dual of this data structure is defined. +// definitions of the free functions templates for a given arrangement data +// structure must be present when a dual of this data structure is defined. #include @@ -176,7 +176,7 @@ protected: _ccb_curr == it._ccb_curr))); } - /*! Derefernce the current circulator. */ + /*! Dereference the current circulator. */ Edge_handle _dereference() const { if (_out) return (_ccb_curr); @@ -314,9 +314,9 @@ namespace CGAL { /*! \class * The common base class template of the specialized * boost::graph_traits > class template. - * The latter serves as a dual adapter for the specialied arrangment, where the + * The latter serves as a dual adapter for the specialied arrangement, where the * valid arrangement faces correspond to graph verices, and two graph vertices - * are connected if the two corrsponding faces are adjacent. + * are connected if the two corresponding faces are adjacent. * We consider the graph as directed. We also allow parallel edges, as two * faces may have more than one common edges. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index eef016ca2f7..b2106603695 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -263,7 +263,7 @@ protected: }; public: - // Forward declerations: + // Forward declarations: class Vertex; class Halfedge; class Face; @@ -572,7 +572,7 @@ public: typedef DVertex Base; public: - /*! Default constrcutor. */ + /*! Default constructor. */ Vertex() {} /*! Check whether the vertex lies on an open boundary. */ @@ -661,7 +661,7 @@ public: typedef DHalfedge Base; public: - /*! Default constrcutor. */ + /*! Default constructor. */ Halfedge() {} /*! Check whether the halfedge is fictitious. */ @@ -761,7 +761,7 @@ public: typedef DFace Base; public: - /*! Default constrcutor. */ + /*! Default constructor. */ Face() {} /*! Obtain an iterator for the outer CCBs of the face (non-const version). */ @@ -905,8 +905,8 @@ protected: Curves_alloc m_curves_alloc; // allocator for the curves. Observers_container m_observers; // pointers to existing observers. const Traits_adaptor_2* m_geom_traits; // the geometry-traits adaptor. - bool m_own_traits; // inidicates whether the geometry - // traits should be freed up. + bool m_own_traits; // indicates whether the geometry + // traits should be freed. bool m_sweep_mode = false; // sweep mode efficiently @@ -1491,8 +1491,8 @@ public: * \param cv2 The curve that should be associated with the second split edge. * \pre cv1's source and cv2's target equal the endpoints of the curve - * currently assoicated with e (respectively), and cv1's target equals - * cv2's target, and this is the split point (ot vice versa). + * currently associated with e (respectively), and cv1's target equals + * cv2's target, and this is the split point (or vice versa). * \return A handle for the halfedge whose source is the source of the * original halfedge e, and whose target is the split point. */ @@ -1563,7 +1563,7 @@ protected: /// \name Determining the boundary-side conditions. //@{ - /*! Determines whether a boundary-side categoty indicates an open side. + /*! Determines whether a boundary-side category indicates an open side. */ inline bool is_open(Arr_boundary_side_tag) const { return false; } inline bool is_open(Arr_open_side_tag) const { return true; } @@ -1584,12 +1584,12 @@ protected: } - /*! Determines whether a boundary-side categoty indicates a constracted side. + /*! Determines whether a boundary-side category indicates a constructed side. */ inline bool is_contracted(Arr_boundary_side_tag) const { return false; } inline bool is_contracted(Arr_contracted_side_tag) const { return true; } - /*! Determines whether a boundary-side categoty indicates a constracted side. + /*! Determines whether a boundary-side category indicates a constructed side. */ inline bool is_identified(Arr_boundary_side_tag) const { return false; } inline bool is_identified(Arr_identified_side_tag) const { return true; } @@ -1902,7 +1902,7 @@ protected: * \param cv The x-monotone curve we use to connect he_to's target and * he_away's source vertex. * \param cv_dir the direction of the curve between he_to and he_away - * \param he_away The succcessor halfedge. + * \param he_away The successor halfedge. * \param local_mins_it the outputiterator * (value_type = std::pair< DHalfedge*, int >, where the int denotes the * index) to report the halfedges pointing to local minima (<-shaped @@ -1968,7 +1968,7 @@ protected: * \param cv The x-monotone curve we use to connect he_to's target and * he_away's source vertex. * \param cv_dir the direction of the curve between he_to and he_away - * \param he_away The succcessor halfedge. + * \param he_away The successor halfedge. * \pre he_to and he_away belong to the same inner CCB. * \return true if he_to=>cv,cv_dir=>he_away lie in the interior of the face we * are about to create (i.e.~are part of the new outer ccb), @@ -2117,7 +2117,7 @@ protected: * Insert an x-monotone curve into the arrangement, such that one of its * endpoints corresponds to a given arrangement vertex, given the exact * place for the curve in the circular list around this vertex. The other - * endpoint corrsponds to a free vertex (a newly created vertex or an + * endpoint corresponds to a free vertex (a newly created vertex or an * isolated vertex). * \param he_to The reference halfedge. We should represent cv as a pair * of edges, one of them should become he_to's successor. @@ -2914,7 +2914,7 @@ void insert(Arrangement_on_surface_2& arr, /*! * Insert an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the - * arragement (incremental insertion). + * arrangement (incremental insertion). * \param arr The arrangement. * \param c The x-monotone curve to be inserted. * \param pl A point-location object associated with the arrangement. @@ -2932,7 +2932,7 @@ insert_non_intersecting_curve /*! * Insert an x-monotone curve into the arrangement, such that the curve * interior does not intersect with any existing edge or vertex in the - * arragement (incremental insertion). The default point-location strategy + * arrangement (incremental insertion). The default point-location strategy * is used for the curve insertion. * \param arr The arrangement. * \param c The x-monotone curve to be inserted. @@ -2949,7 +2949,7 @@ insert_non_intersecting_curve /*! * Insert a range of pairwise interior-disjoint x-monotone curves into * the arrangement, such that the curve interiors do not intersect with - * any existing edge or vertex in the arragement (aggregated insertion). + * any existing edge or vertex in the arrangement (aggregated insertion). * \param arr The arrangement. * \param begin An iterator for the first x-monotone curve in the range. * \param end A past-the-end iterator for the x-monotone curve range. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h index 8f3df2766c0..2e16e30a823 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -20,7 +20,7 @@ /*! \file - * Defintion of the Arrangement_zone_2 class. + * Definition of the Arrangement_zone_2 class. */ #include @@ -40,7 +40,7 @@ namespace CGAL { * arrangement. * The arrangement parameter corresponds to the underlying arrangement, and * the zone-visitor parameter corresponds to a visitor class which is capable - * of receiving notifications on the arrangment features the query curve + * of receiving notifications on the arrangement features the query curve * traverses. The visitor has to support the following functions: * - init(), for initializing the visitor with a given arrangement. * - found_subcurve(), called when a non-intersecting x-monotone curve is @@ -248,7 +248,7 @@ public: */ void init_with_hint(const X_monotone_curve_2& cv, Pl_result_type obj); - /*! Compute the zone of the given curve and issue the apporpriate + /*! Compute the zone of the given curve and issue the appropriate * notifications for the visitor. */ void compute_zone(); @@ -346,7 +346,7 @@ private: void _remove_next_intersection(Halfedge_handle he); /*! Check whether the given point lies completely to the left of the given - * egde. + * edge. * \param p The point. * \param he The halfedge. * \pre he is not a fictitious edge. @@ -370,7 +370,7 @@ private: Arr_not_all_sides_oblivious_tag) const; /*! Check whether the given point lies completely to the right of the given - * egde. + * edge. * \param p The point. * \param he The halfedge. * \pre he is not a fictitious edge. diff --git a/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h b/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h index 5bc7c25f019..c3fd592a7d6 100644 --- a/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/CORE_algebraic_number_traits.h @@ -202,7 +202,7 @@ public: /*! * Compute the square root of an algebraic number. * \param x The number. - * \return The sqaure root of x. + * \return The square root of x. * \pre x is non-negative. */ Algebraic sqrt (const Algebraic& x) const diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h index 9db172266e5..2182023925e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h @@ -1088,7 +1088,7 @@ public: } /*!\brief - * Compares the relative vertical aligment of this arc with a second + * Compares the relative vertical alignment of this arc with a second * immediately to the left of one of their intersection points. * * If one of the curves is vertical (emanating downward from p), @@ -1116,7 +1116,7 @@ public: } /*!\brief - * Compares the relative vertical aligment of this arc with a second + * Compares the relative vertical alignment of this arc with a second * immediately to the right of one of their intersection points. * * If one of the curves is vertical (emanating downward from p), @@ -1436,7 +1436,7 @@ public: * \pre p != q * \pre both points must be interior and must lie on \c cv */ - // do we need this method separetely ?? + // do we need this method separately ?? Kernel_arc_2 trim(const Point_2& p, const Point_2& q) const { CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2) @@ -1937,7 +1937,7 @@ protected: * \param cv2 the second arc * \param where the location in parameter space * \param x0 The x-coordinate - * \param perturb determines whether to pertub slightly to the left/right + * \param perturb determines whether to perturb slightly to the left/right * \return the relative vertical alignment * * \pre !is_on_bottom_top(where) @@ -1964,7 +1964,7 @@ protected: * \param cv2 the second arc * \param where the location in parameter space * \param x0 The x-coordinate - * \param perturb determines whether to pertub slightly to the left/right + * \param perturb determines whether to perturb slightly to the left/right * \return the relative vertical alignment */ CGAL::Comparison_result _compare_coprime( @@ -2595,7 +2595,7 @@ protected: /*!\brief * computes intersection of two arcs meeting only at their curve ends. * - * Intersection points are returned in the output interator \c oi as object + * Intersection points are returned in the output iterator \c oi as object * of type std::pair (intersection + multiplicity) * * \param cv1 the first arc diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h index b90d6d8a163..7a8cf2840bf 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h @@ -84,7 +84,7 @@ struct Curve_interval_arcno_cache { //!@} - //!\name Functor invokation + //!\name Functor invocation //!@{ /*!\brief diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h index e4d446e4b41..c1ece0d0d57 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curve_renderer_facade.h @@ -246,7 +246,7 @@ public: * \c Coord_2 must be constructible from a pair of integers / doubles * depending on the renderer type * - * computes optionaly end-point coordinates (even if they lie outside the + * computes optionally end-point coordinates (even if they lie outside the * window) */ template < class Coord_2, template < class, class > class Container, @@ -335,7 +335,7 @@ Lexit: std::cerr << "Sorry, this does not work even with exact " * rasterizes a point on curve, returns point coordinates as objects of * type \c Coord_2 which are constructible from a pair of ints / doubles * - * retunrs \c false if point lies outside the window or cannot be + * returns \c false if point lies outside the window or cannot be * rasterized due to precision problems */ template < class Coord_2 > diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h index 9da1c8d085e..89c4b6595f8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h @@ -945,7 +945,7 @@ public: }; /*!\brief - * Functor that computes the relative vertical aligment of two arcs left + * Functor that computes the relative vertical alignment of two arcs left * of a point */ template < class CurvedKernelViaAnalysis_2 > @@ -1056,7 +1056,7 @@ public: /*!\brief - * Functor that computes the relative vertical aligment of two arcs right + * Functor that computes the relative vertical alignment of two arcs right * of a point */ template < class CurvedKernelViaAnalysis_2 > @@ -1932,7 +1932,7 @@ public: /*!\brief * Splits an input object \c obj into x-monotone arcs and isolated points * - * \param obj the polymorph input object: can represet \c Point_2, + * \param obj the polymorph input object: can represent \c Point_2, * \c Arc_2, \c Non_x_monotone_arc_2 or \c Curve_analysis_2 * \param oi Output iterator that stores CGAL::Object, which either * encapsulates \c Point_2 or \c Arc_2 diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h index e5d220e482f..66f20cccf09 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_impl.h @@ -100,7 +100,7 @@ public: //!@{ - //! type of inverval arcno cache + //! type of interval arcno cache typedef internal::Curve_interval_arcno_cache< Curve_kernel_2 > Curve_interval_arcno_cache; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h index e2eca4d6f10..45bb19fa558 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Filtered_curved_kernel_via_analysis_2_impl.h @@ -546,7 +546,7 @@ public: if (!Base::_ckva()->may_have_intersection_2_object()(cv1, cv2)) { // return no one - CKvA_CERR("\nfilter: sucessfull\n"); + CKvA_CERR("\nfilter: successful\n"); CGAL_assertion_code( { diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h index 9465f5cd78c..c95ee1b85f9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h @@ -148,7 +148,7 @@ public: #endif /*!\brief - * constructs an arc from a given represenation + * constructs an arc from a given representation */ Generic_arc_2(Rep rep) : Base(rep) { diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h index 708fb351d8b..e061c1a2873 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h @@ -128,7 +128,7 @@ public: } #endif /*!\brief - * constructs an arc from a given represenation + * constructs an arc from a given represetnation */ Generic_point_2(Rep rep) : Base(rep) { diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h index e667c90ea23..69f9db2015e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h @@ -116,7 +116,7 @@ struct Make_x_monotone_2 : //!@} - //!\name Functor invokation + //!\name Functor invocation //!@{ // TODO add operator for non-x-monotone arc diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h index f243c948bc0..53b5d589b13 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h @@ -326,7 +326,7 @@ protected: //!@{ /*!\brief - * constructs from a given represenation + * constructs from a given representation */ /*!\brief * Constructor for for rebind diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h index 163bbff54e9..547a4bc7b26 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h @@ -218,7 +218,7 @@ private: //! returns \c true when the precision limit for a specified number type is //! reached typename Renderer_traits::Precision_limit limit; - //! maximum level of subdivision dependending on speficied number type + //! maximum level of subdivision dependending on specified number type static const unsigned MAX_SUBDIVISION_LEVEL = Renderer_traits::MAX_SUBDIVISION_LEVEL; @@ -1223,7 +1223,7 @@ bool subdivide(Pixel_2& pix, int back_dir, int& new_dir) { throw internal::Insufficient_rasterize_precision_exception(); } - // if several branches coincide withing this pixel we cannot perform + // if several branches coincide within this pixel we cannot perform // a subdivision if(branches_coincide) return false; diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h index 47afb1f2f68..9c423ff9794 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_internals.h @@ -62,7 +62,7 @@ namespace internal { // derivative range analysis #define CGAL_RECURSIVE_DER_MAX_DEGREE 7 -// 8-pixel neighbouthood directions +// 8-pixel neighbourhood directions static const struct { int x; int y; } directions[] = { { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}, { 0,-1}, { 1,-1}}; @@ -277,7 +277,7 @@ public: return (low*up < 0); //(low < 0&&up > 0); } - //! \brief evalutates a certain polynomial derivative at x + //! \brief evaluates a certain polynomial derivative at x //! //! \c der_coeffs is a set of derivative coefficients, //! \c poly - polynomial coefficients @@ -295,7 +295,7 @@ public: return y; } - //! \brief evalutates a polynomial at certain x-coordinate + //! \brief evaluates a polynomial at certain x-coordinate static NT evaluate(const Poly_1& poly, const NT& x, bool *error_bounds_ = nullptr) { @@ -754,7 +754,7 @@ bool get_range_MAA_1(int var, const NT& l_, const NT& r_, const NT& key, const Poly_1& poly, int check = 1) { Derivative_2 *der = (var == CGAL_X_RANGE) ? der_x : der_y; - // stores precomputed polynomial derivatives and binominal coeffs + // stores precomputed polynomial derivatives and binomial coeffs Derivative_1 der_cache //(der->size()+1, NT(0)) , binom;//(der->size()+1, NT(0)); @@ -824,7 +824,7 @@ bool get_range_MAA_1(int var, const NT& l_, const NT& r_, const NT& key, } // assume we have an array of derivatives: // der_cache: {f^(0); f^(1); f^(2); ...} - // and binominal coefficients: [h; h^2/2; h^3/6; ... h^d/d!] + // and binomial coefficients: [h; h^2/2; h^3/6; ... h^d/d!] der_iterator_1 eval_it = der_cache.end()-1, local_it, binom_it, eval_end = der_cache.end(); d = poly.degree(); diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index 56595cd3835..32e108b71c0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -67,7 +67,7 @@ struct Max_coeff }; /*!\brief - * divides an input value by a contant + * divides an input value by a constant * * provided that there is a coercion between \c Input and \c Result types */ diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h index 1e5841429ee..9358316c0b8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Subdivision_2.h @@ -166,7 +166,7 @@ private: void precompute(); //! \brief switches to another cache instance depending on the //! supporting curve of a segment - //! \brief evalutates the ith derivative at certain x + //! \brief evaluates the ith derivative at certain x //! //! \c cache_it - an intetator pointing to the end of an array of //! polynomial coefficients, \c der_it - an iterator for derivative @@ -179,7 +179,7 @@ private: val = val * x + (*cache_it--) * (*der_it); return val; } - //! evalutates a function at a certain x + //! evaluates a function at a certain x NT evaluate(const Poly_1& poly, const NT& x) { const_iterator_1 it = poly.end() - 1, begin = poly.begin(); diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h index 3db023b54fb..201bfc19b4b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h @@ -472,7 +472,7 @@ public: } /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CA_1(Rep rep) : Base(rep) { @@ -630,7 +630,7 @@ public: } /*!\brief - * constructsa curve analysis from a given represenation + * constructs a curve analysis from a given representation */ Curve_analysis_2(Rep rep) : Base(rep) { @@ -776,7 +776,7 @@ public: } /*!\brief - * constructs from a given represenation + * constructs from a given representation */ Status_line_CPA_1(Rep rep) : Base(rep) { diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h index 238004fbf91..1dcdb21736e 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h @@ -90,7 +90,7 @@ namespace CGAL { template void operator()(Formatter& formatter) { - // Clear the exisiting arrangement so it contains no DCEL features. + // Clear the existing arrangement so it contains no DCEL features. m_arr_access.clear_all(); // Read the arrangement dimensions. diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h index a4caeadceef..f6949fe1b5c 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h @@ -63,7 +63,7 @@ namespace CGAL { typedef std::map Vertex_index_map; typedef std::map Halfedge_index_map; - // Data memebrs: + // Data members: const Arrangement_2& m_arr; const Dcel* m_dcel; int m_curr_v; diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h index 0a89ec038a3..98ef52e1522 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h @@ -310,7 +310,7 @@ public: } //@} - /// \name Openning and closing the file. + /// \name Opening and closing the file. //@{ /*! @@ -731,7 +731,7 @@ public: /*! * Add a user-defined color. - * Use this function after openning the FIG stream and before writing any + * Use this function after opening the FIG stream and before writing any * other object (i.e. before calling the write_ () functions). * \param color The color. * \param r The red component (0 - 255). @@ -750,7 +750,7 @@ public: if (color_defined (color)) return; - // Prepare a string desribing the color. + // Prepare a string describing the color. std::stringstream out; out << "0x" << std::hex @@ -1401,7 +1401,7 @@ protected: } /*! - * Write a polygon, reprsented as a range of points. + * Write a polygon, represented as a range of points. */ template void _write_polygon (const int n_points, diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h index 35fb713577f..953652180e5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_basic_insertion_traits_2.h @@ -20,7 +20,7 @@ /*! \file * - * Defintion of the Arr_basic_insertion_traits_2 class. + * Definition of the Arr_basic_insertion_traits_2 class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event.h index 50bb3af41e7..8a90bdd90ad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event.h @@ -50,7 +50,7 @@ namespace Ss2 = Surface_sweep_2; * parameters of the surface-sweep visitor class templates. It enables the * definition of these two types, which refer one to another; (the curves to the * right of an event and the curves to its left are data members of the event, - * and the two events associated with the endpoints of a curve are data memebrs + * and the two events associated with the endpoints of a curve are data members * of the curve.) * * If you need to represent an event with additional data members, introduce a diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h index e8a54f87eb6..89e916f59a1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_event_base.h @@ -40,10 +40,10 @@ namespace Ss2 = Surface_sweep_2; * information is stored, in order to expedite the insertion of curves into the * arrangement. * - * The additional infomation contains the following: + * The additional information contains the following: * - among the left curves of the event, we keep the highest halfedge that * was inserted into the arrangement at any given time and when there are no - * left curves, we keep the highest halfedge that was inseted to the right. + * left curves, we keep the highest halfedge that was inserted to the right. * * \tparam GeometryTraits_2 the geometry traits. * \tparam Allocator_ a type of an element that is used to acquire/release @@ -174,7 +174,7 @@ public: } /*! Return true iff 'curve' is the toppest curve among the halfedges - * to the right fo the event that were already were inserted to the + * to the right of the event that were already were inserted to the * arrangement. */ bool is_curve_largest(Subcurve *curve) diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h index 1c5fa116652..c15ce315c9a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h @@ -747,7 +747,7 @@ insert_at_vertices(const X_monotone_curve_2& cv, #endif // Use the helper class to determine whether the order of predecessor - // halfedges should be swaped, to that the edge directed from prev1->target() + // halfedges should be swapped, to that the edge directed from prev1->target() // to prev2->target() is incident to the new face (in case a new face is // created). Halfedge_handle res; diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h index cb1627c291f..b20b165a6ef 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_subcurve.h @@ -200,7 +200,7 @@ public: typedef typename Base::Event_ptr Event_ptr; typedef typename Base::Halfedge_indices_list Halfedge_indices_list; - /*! Construct deafult. */ + /*! Construct default. */ Arr_construction_subcurve() {} /*! Constructor from an x-monotone curve. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h index 73d7f3b0326..f3de33d7fe7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_insertion_traits_2.h @@ -18,7 +18,7 @@ /*! \file * - * Defintion of the Arr_insertion_traits_2 class. + * Definition of the Arr_insertion_traits_2 class. */ #include diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h index 87d723501ae..ab7b56ce987 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_ss_visitor.h @@ -289,8 +289,8 @@ protected: /*! * Update the boundary vertices map. * This function is used when the parameter space has an identified (or - * contructed) boundary side. We assume that if the parameter space has a - * contructed boundary side, it also must have an identified boundary side. + * constructed) boundary side. We assume that if the parameter space has a + * constructed boundary side, it also must have an identified boundary side. * \param event The event. * \param v The vertex. * \param tag The tag used for dispatching. @@ -301,7 +301,7 @@ protected: /*! * Update the boundary vertices map. * This function is used when the parameter space does not have an identified - * boundary side, and thus, neither it has a contructed boundary side. + * boundary side, and thus, neither it has a constructed boundary side. * \param event The event. * \param v The vertex. * \param tag The tag used for dispatching. @@ -312,8 +312,8 @@ protected: /*! * Update a newly created vertex using the overlay traits. * This function is used when the parameter space has an identified (or - * contructed) boundary side. We assume that if the parameter space has a - * contructed boundary side, it also must have an identified boundary side. + * constructed) boundary side. We assume that if the parameter space has a + * constructed boundary side, it also must have an identified boundary side. * \param event The event associated with the new vertex. * \param res_v The new vertex in the overlaid arrangement. * \param sc The subcurve incident to the event. @@ -325,7 +325,7 @@ protected: /*! * Update a newly created vertex using the overlay traits. * This function is used when the parameter space does not have an identified - * boundary side, and thus, neither it has a contructed boundary side. + * boundary side, and thus, neither it has a constructed boundary side. * \param event The event associated with the new vertex. * \param res_v The new vertex in the overlaid arrangement. * \param sc The subcurve incident to the event. diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h index 51bfbf54fe1..b38fc25d344 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_overlay_traits_2.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Arr_overlay_traits_2 class-template. + * Definition of the Arr_overlay_traits_2 class-template. */ #include @@ -437,7 +437,7 @@ public: intersector(xcv2.base(), xcv1.base(), std::back_inserter(xections)); // Convert objects that are associated with Base_x_monotone_curve_2 to - // the exteneded X_monotone_curve_2. + // the extended X_monotone_curve_2. for (const auto& xection : xections) { const Intersection_base_point* base_ipt = boost::get(&xection); @@ -753,7 +753,7 @@ public: public: Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { - // Check if there wither points represent red or blue vertices. + // Check if there whether points represent red or blue vertices. const Vertex_handle_red* vr1 = p1.red_vertex_handle(); const Vertex_handle_red* vr2 = p2.red_vertex_handle(); const Vertex_handle_blue* vb1 = p1.blue_vertex_handle(); @@ -983,7 +983,7 @@ public: Is_on_x_identification_2 is_on_x_identification_2_object() const { return Is_on_x_identification_2(m_base_traits); } - /*! A functor that compares the y-values of pointss on the + /*! A functor that compares the y-values of points on the * boundary of the parameter space. */ class Compare_y_on_boundary_2 { @@ -1115,7 +1115,7 @@ public: Is_on_y_identification_2 is_on_y_identification_2_object() const { return Is_on_y_identification_2(m_base_traits); } - /*! A functor that compares the y-values of pointss on the + /*! A functor that compares the y-values of points on the * boundary of the parameter space. */ class Compare_x_on_boundary_2 { diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h index f0240f3b12c..23ba40e5f00 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h @@ -119,7 +119,7 @@ public: /*! * Constructor. - * \param circ A ciruclator for the halfedges around a vertex. + * \param circ A circulator for the halfedges around a vertex. * \param out_edges Do we need the outgoing or the ingoing halfedges. * \param counter A counter associated with the iterator. * \param cend The past-the-end counter value. diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h index 1e38b817582..799e68b3750 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Construction_test.h @@ -553,12 +553,12 @@ bool Construction_test::test6() CGAL::insert_point(*m_arr, m_isolated_points[i]); #if TEST_TOPOL_TRAITS != SPHERICAL_TOPOL_TRAITS if (! CGAL::is_valid(*m_arr)) { - std::cout << "ERROR : (6) The aggregated x-monotone inertion test failed (invalid)." + std::cout << "ERROR : (6) The aggregated x-monotone insertion test failed (invalid)." << std::endl; } #endif if (! are_same_results()) { - std::cout << "ERROR : (6) The aggregated x-monotone inertion test failed." + std::cout << "ERROR : (6) The aggregated x-monotone insertion test failed." << std::endl; return false; } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h index bce0e2d5e1f..f4b717db180 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Point_location_test.h @@ -984,7 +984,7 @@ verify(Objects_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) if (CGAL::assign(fh_cur, objs[pl][qi])) { if (fh_cur != fh_ref) { std::cout << "Error: point location number " << pl << std::endl; - std::cout << "Expecte: a face." << std::endl; + std::cout << "Expected: a face." << std::endl; std::cout << "Actual: a different face" << std::endl; result += -1; } @@ -992,7 +992,7 @@ verify(Objects_vector objs[NUM_PL_STRATEGIES], size_t size, size_t pls_num) } std::cout << "Error: point location number " << pl << std::endl; - std::cout << "Expecte: a face." << std::endl; + std::cout << "Expected: a face." << std::endl; result += -1; if (CGAL::assign(hh_cur, objs[pl][qi])) { std::cout << "Actual: a halfedge." << std::endl; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/TODO b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/TODO index 7fda2ca7aea..de91469cc33 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/TODO +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/TODO @@ -19,7 +19,7 @@ way of testing them. I therefore see no gain in testing them. What would be a good test for Bezier curves is a program that reads sets of Beizer curves from a file (like Bezier_curves.cpp in the examples folder), -preferrably in degenerate positions, and computes their arrangement. +preferably in degenerate positions, and computes their arrangement. This way Split is tested at any case. By the way - if you really want to test AreMergeable and Merge, you can do the diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h index 0ac8100431c..9bfe463e3bf 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h @@ -34,7 +34,7 @@ * that throws a special exceptions, which indicates whether the violation was * expected or not unexpected. Depending on abort_on_error the right exceptions * is thrown. the exceptions are caught in perform function. - * so basiclly we have 4 cases: + * so basically we have 4 cases: * * | violation occurred | violation did * | | not occurred @@ -228,7 +228,7 @@ void Traits_base_test::clear() } /*! - * Command dispatcher. Retrieves a line from the input file and performes + * Command dispatcher. Retrieves a line from the input file and performs * some action. See comments for suitable function in order to know specific * command arguments. */ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h index 26872c1204a..680ae201d40 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_test.h @@ -131,7 +131,7 @@ private: * Cut the given curve into x-monotone subcurves and insert them into the * given output iterator. * Degenerate cases for polylines: The first segment is vertical. The last - * segment is vertical. Both firt and last are vertical. An internal segment + * segment is vertical. Both first and last are vertical. An internal segment * is vertical. */ bool make_x_monotone_wrapper(std::istringstream& line); @@ -408,7 +408,7 @@ push_back_wrapper(std::istringstream& str_stream) if (type == 0) { /* THERE IS NO WAY AS OF NOW TO CHECK IF THE POLYCURVE (NON X-MONOTONE) IS - * EQUAL. HENCE, UNTILL THAT COMPARISON IS NOT AVAILABLE IN THE + * EQUAL. HENCE, UNTIL THAT COMPARISON IS NOT AVAILABLE IN THE * ARR_POLYCURVE_TRAITS, THIS TEST WILL PASS ONLY IF THE PRINTED RESULT * OF THE EXPECTED CURVE AND THE ACTUAL OBTAINED CURVE IS IDENTICAL. */ @@ -481,7 +481,7 @@ push_front_wrapper(std::istringstream& str_stream) if (type == 0) { /* THERE IS NO WAY AS OF NOW TO CHECK IF THE POLYCURVE (NON X-MONOTONE) IS - * EQUAL. HENCE, UNTILL THAT COMPARISON IS NOT AVAILABLE IN THE + * EQUAL. HENCE, UNTIL THAT COMPARISON IS NOT AVAILABLE IN THE * ARR_POLYCURVE_TRAITS, THIS TEST WILL PASS ONLY IF THE PRINTED RESULT * OF THE EXPECTED CURVE AND THE ACTUAL OBTAINED CURVE IS IDENTICAL. */ @@ -903,7 +903,7 @@ equal_curves_wrapper(std::istringstream& str_stream) * Cut the given curve into x-monotone subcurves and insert them into the * given output iterator. * Degenerate cases for polylines: The first segment is vertical. The last - * segment is vertical. Both firt and last are vertical. An internal segment + * segment is vertical. Both first and last are vertical. An internal segment * is vertical. */ template diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h index 1c70c873eae..6ffb18e01f3 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Vertical_decomposition_test.h @@ -195,7 +195,7 @@ compare(const Result_type& expected, Vert_type actual) if (! actual) return false; auto obj = *actual; - // Assign object to a fase. + // Assign object to a face. if (const auto* fh_expected = boost::get(&(expected))) { if (boost::get(&obj)) { std::cout << "Error: vertical decomposition!" << std::endl; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp index f92cd22854a..2856f82b076 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_arc_polycurve.cpp @@ -267,7 +267,7 @@ void check_push_back(Traits_2::Make_x_monotone_2 << polycurve.number_of_subcurves() << std::endl; push_back_2(polycurve, curves[1]); - //throws a warning "size is depricated" + //throws a warning "size is deprecated" std::cout << "size of polycurve after 2 push_backs: " << polycurve.number_of_subcurves() << std::endl; } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp index 80956fb505d..02f85dc22e7 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_conic_polycurve.cpp @@ -508,12 +508,12 @@ void check_are_mergable() construct_x_monotone_curve_2(c3); bool result = are_mergeable_2(polyline_xmc1, polyline_xmc2); - std::cout << "Are_mergable:: Mergable x-monotone polycurves are Computed as: " - << ((result)? "Mergable" : "Not-Mergable") << std::endl; + std::cout << "Are_mergeable:: Mergeable x-monotone polycurves are Computed as: " + << ((result)? "Mergeable" : "Not-Mergeable") << std::endl; result = are_mergeable_2(polyline_xmc1, polyline_xmc3); - std::cout << "Are_mergable:: Non-Mergable x-monotone polycurves are Computed as: " - << ((result)? "Mergable" : "Not-Mergable") << std::endl; + std::cout << "Are_mergeable:: Non-Mergeable x-monotone polycurves are Computed as: " + << ((result)? "Mergeable" : "Not-Mergeable") << std::endl; } void check_merge_2() @@ -543,7 +543,7 @@ void check_merge_2() Polycurve_conic_traits_2::X_monotone_curve_2 merged_xmc; merge_2(polyline_xmc1, polyline_xmc2, merged_xmc); - std::cout<< "Merge_2:: Mergable x-monotone curves merged successfully" + std::cout<< "Merge_2:: Mergeable x-monotone curves merged successfully" << std:: endl; } diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.cpp index ec26c356b75..4140fa16656 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_traits.cpp @@ -104,7 +104,7 @@ int main(int argc, char* argv[]) * and read_xcurve() for construction from "IO_base_test.h" * * read_point(), read_curve() and read_xcurve() from "IO_base_test.h" - * construct the appriopriate point, curve and xcurve using appropriate + * construct the appropriate point, curve and xcurve using appropriate * GEOM_TRAITS i.e. in this case POLYCURVE_CONIC_GEOM_TRAITS and using * overridden functions. Note: these functions only make 1 curve. So if we * want a polycurve, it should be taken care of in these function. From 62a31babbd1aa227e31a42768ec4436964964cce Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 14 Nov 2022 17:44:33 +0100 Subject: [PATCH 150/426] spelling corrections Some spelling corrections (Directories starting with `B`) --- BGL/doc/BGL/graph_traits.txt | 2 +- BGL/examples/BGL_LCC/kruskal_lcc.cpp | 2 +- .../kruskal_with_stored_id.cpp | 2 +- BGL/examples/BGL_triangulation_2/emst.cpp | 2 +- .../emst_cdt_plus_hierarchy.cpp | 2 +- .../BGL_triangulation_2/emst_regular.cpp | 2 +- .../CGAL/boost/graph/Euler_operations.h | 4 +-- BGL/include/CGAL/boost/graph/Seam_mesh.h | 2 +- BGL/include/CGAL/boost/graph/iterator.h | 26 +++++++++---------- BGL/include/CGAL/draw_face_graph.h | 2 +- .../internal/utils_2.h | 2 +- .../Boolean_set_operations_2.txt | 2 +- .../Concepts/ArrDirectionalTraits--Merge_2.h | 2 +- .../bezier_traits_adapter2.cpp | 4 +-- .../Gps_agg_meta_traits.h | 4 +-- .../Boolean_set_operations_2/Gps_agg_op.h | 2 +- .../Gps_agg_op_surface_sweep_2.h | 4 +-- .../Gps_bfs_base_visitor.h | 2 +- .../Gps_bfs_xor_visitor.h | 2 +- .../Gps_default_dcel.h | 2 +- .../Gps_on_surface_base_2.h | 12 ++++----- .../Gps_on_surface_base_2_impl.h | 2 +- .../Gps_polygon_validation.h | 6 ++--- .../Gps_traits_adaptor.h | 2 +- .../include/CGAL/General_polygon_set_2.h | 2 +- .../CGAL/General_polygon_set_on_surface_2.h | 2 +- .../include/CGAL/connect_holes.h | 6 ++--- .../bop_test_suite_generator.cpp | 2 +- .../data/agg_op/README.txt | 4 +-- .../data/bop/README.txt | 4 +-- .../test_polygon_validation.cpp | 2 +- .../doc/Bounding_volumes/Bounding_volumes.txt | 2 +- .../CGAL/Approximate_min_ellipsoid_d.h | 4 +-- .../doc/Bounding_volumes/CGAL/Min_ellipse_2.h | 2 +- .../doc/Bounding_volumes/CGAL/Min_sphere_d.h | 2 +- .../CGAL/Min_sphere_of_spheres_d.h | 2 +- .../Concepts/MinSphereOfSpheresTraits.h | 2 +- .../CGAL/Approximate_min_ellipsoid_d.h | 4 +-- .../Approximate_min_ellipsoid_d_debug.h | 6 ++--- .../Approximate_min_ellipsoid_d_impl.h | 4 +-- .../Khachiyan_approximation.h | 12 ++++----- .../Khachiyan_approximation_impl.h | 6 ++--- .../include/CGAL/Min_sphere_of_spheres_d.h | 2 +- .../Min_sphere_of_spheres_d_pair.h | 2 +- .../Min_sphere_of_spheres_d_support_set.h | 2 +- ...Min_sphere_of_spheres_d_support_set_impl.h | 2 +- .../include/CGAL/rectangular_3_center_2.h | 2 +- .../CGAL/Box_intersection_d/Box_d.h | 2 +- 48 files changed, 87 insertions(+), 87 deletions(-) diff --git a/BGL/doc/BGL/graph_traits.txt b/BGL/doc/BGL/graph_traits.txt index 6b91c48b14a..d2d3f837dbc 100644 --- a/BGL/doc/BGL/graph_traits.txt +++ b/BGL/doc/BGL/graph_traits.txt @@ -120,7 +120,7 @@ For convenience, the type `edge_descriptor` is hashable using the functor `CGAL:
  • All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.
  • -
  • In order to use property maps, darts and types associated with of 0- and 2-attributes must define the two fonctions: +
  • In order to use property maps, darts and types associated with of 0- and 2-attributes must define the two functions: \code int id() const; // Returns the index. int& id(); // Returns a reference to the index stored in the attribute. diff --git a/BGL/examples/BGL_LCC/kruskal_lcc.cpp b/BGL/examples/BGL_LCC/kruskal_lcc.cpp index 8722010ea37..02bd54e4d58 100644 --- a/BGL/examples/BGL_LCC/kruskal_lcc.cpp +++ b/BGL/examples/BGL_LCC/kruskal_lcc.cpp @@ -25,7 +25,7 @@ void kruskal(const LCC& lcc) // This property map is defined in graph_traits_Linear_cell_complex_for_combinatorial_map.h // This function call requires a vertex_index_map named parameter which - // when ommitted defaults to "get(vertex_index,graph)". + // when omitted defaults to "get(vertex_index,graph)". // That default works here because the vertex type has an "id()" method // field which is used by the vertex_index internal property. std::list mst; diff --git a/BGL/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp b/BGL/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp index ad3f2e79ee8..a1280a1b479 100644 --- a/BGL/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp +++ b/BGL/examples/BGL_polyhedron_3/kruskal_with_stored_id.cpp @@ -25,7 +25,7 @@ kruskal( const Polyhedron& P) // This property map is defined in graph_traits_Polyhedron_3.h // This function call requires a vertex_index_map named parameter which - // when ommitted defaults to "get(vertex_index,graph)". + // when omitted defaults to "get(vertex_index,graph)". // That default works here because the vertex type has an "id()" method // field which is used by the vertex_index internal property. std::list mst; diff --git a/BGL/examples/BGL_triangulation_2/emst.cpp b/BGL/examples/BGL_triangulation_2/emst.cpp index 683d586e4ac..fc843e44db2 100644 --- a/BGL/examples/BGL_triangulation_2/emst.cpp +++ b/BGL/examples/BGL_triangulation_2/emst.cpp @@ -51,7 +51,7 @@ int main(int argc,char* argv[]) boost::kruskal_minimum_spanning_tree(tr, std::back_inserter(mst), vertex_index_map(vertex_index_pmap)); - std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl; + std::cout << "The edges of the Euclidean minimum spanning tree:" << std::endl; for(edge_descriptor ed : mst) { vertex_descriptor svd = source(ed, tr); diff --git a/BGL/examples/BGL_triangulation_2/emst_cdt_plus_hierarchy.cpp b/BGL/examples/BGL_triangulation_2/emst_cdt_plus_hierarchy.cpp index d75c48a23ed..be2898169b2 100644 --- a/BGL/examples/BGL_triangulation_2/emst_cdt_plus_hierarchy.cpp +++ b/BGL/examples/BGL_triangulation_2/emst_cdt_plus_hierarchy.cpp @@ -66,7 +66,7 @@ int main(int argc,char* argv[]) vertex_index_map(vertex_index_pmap)); - std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl; + std::cout << "The edges of the Euclidean minimum spanning tree:" << std::endl; for(edge_descriptor ed : mst) { vertex_descriptor svd = source(ed, tr); diff --git a/BGL/examples/BGL_triangulation_2/emst_regular.cpp b/BGL/examples/BGL_triangulation_2/emst_regular.cpp index 01ae7bee324..42cdfd106ec 100644 --- a/BGL/examples/BGL_triangulation_2/emst_regular.cpp +++ b/BGL/examples/BGL_triangulation_2/emst_regular.cpp @@ -78,7 +78,7 @@ int main(int argc,char* argv[]) .weight_map(boost::make_function_property_map< edge_descriptor, FT, Edge_weight_functor>(Edge_weight_functor(tr)))); - std::cout << "The edges of the Euclidean mimimum spanning tree:" << std::endl; + std::cout << "The edges of the Euclidean minimum spanning tree:" << std::endl; for(edge_descriptor ed : mst) { vertex_descriptor svd = source(ed, tr); diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h index 30d481f8cdf..a441065c7b8 100644 --- a/BGL/include/CGAL/boost/graph/Euler_operations.h +++ b/BGL/include/CGAL/boost/graph/Euler_operations.h @@ -437,7 +437,7 @@ split_loop(typename boost::graph_traits::halfedge_descriptor h1, internal::insert_tip( opposite(inew, g), hnew, g); internal::insert_tip( opposite(jnew, g), inew, g); internal::insert_tip( opposite(hnew, g), jnew, g); - // Make the new incidences with the old stucture. + // Make the new incidences with the old structure. CGAL_assertion_code( std::size_t termination_count = 0;) if ( next(h,g) != i) { halfedge_descriptor nh = next(h, g); @@ -983,7 +983,7 @@ void add_faces(const RangeofVertexRange& faces_to_add, PolygonMesh& pm) // disconnect hand-fans (umbrellas being not affected) at non-manifold vertices // in case the location on the boundary of the mesh where they are attached is closed. // Note that we link the boundary of the hand fans together, making them - // independant boundary cycles (even if the non-manifold vertex is not duplicated) + // independent boundary cycles (even if the non-manifold vertex is not duplicated) if ( !former_border_hedges.empty() ) { std::sort(former_border_hedges.begin(), former_border_hedges.end()); // TODO: is it better to use a dynamic pmap? diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index 5971942b17b..34c6e61e0a6 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -177,7 +177,7 @@ public: /// \ingroup PkgBGLAdaptors /// -/// This class is a data structure that takes a triangle mesh, further refered +/// This class is a data structure that takes a triangle mesh, further referred /// to as `underlying mesh` and turns some marked edges of that mesh into /// virtual boundary edges. /// diff --git a/BGL/include/CGAL/boost/graph/iterator.h b/BGL/include/CGAL/boost/graph/iterator.h index c8af78eaf8b..1fed18a2278 100644 --- a/BGL/include/CGAL/boost/graph/iterator.h +++ b/BGL/include/CGAL/boost/graph/iterator.h @@ -213,7 +213,7 @@ public: {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Halfedge_around_source_iterator::*bool_type)() const; @@ -313,7 +313,7 @@ public: {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Halfedge_around_target_iterator::*bool_type)() const; @@ -412,7 +412,7 @@ public: pointer operator -> ( ) { return &pos; } const value_type* operator -> ( ) const { return &pos; } - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Halfedge_around_face_iterator::*bool_type)() const; @@ -522,7 +522,7 @@ public: Halfedge_around_source_circulator(vertex_descriptor vd, const Graph& g) : Halfedge_around_source_circulator::iterator_adaptor_(Halfedge_around_target_circulator(halfedge(vd,g),g)), opp(g) {} - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Halfedge_around_source_circulator::*bool_type)() const; @@ -580,7 +580,7 @@ public: #ifndef DOXYGEN_RUNNING typedef std::size_t size_type; - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Face_around_target_circulator::*bool_type)() const; @@ -655,7 +655,7 @@ public: bool operator != ( const Self& other) const { return g != other.g || pos != other.pos; } - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Halfedge_around_target_circulator::*bool_type)() const; @@ -752,7 +752,7 @@ public: bool operator != ( const Self& other) const { return g != other.g || pos != other.pos; } - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Halfedge_around_face_circulator::*bool_type)() const; @@ -1008,7 +1008,7 @@ public: {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Vertex_around_face_circulator::*bool_type)() const; @@ -1062,7 +1062,7 @@ public: {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Vertex_around_face_iterator::*bool_type)() const; @@ -1192,7 +1192,7 @@ public: {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Vertex_around_target_circulator::*bool_type)() const; @@ -1250,7 +1250,7 @@ public: {} #ifndef DOXYGEN_RUNNING - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Vertex_around_target_iterator::*bool_type)() const; @@ -1337,7 +1337,7 @@ public: Out_edge_iterator(halfedge_descriptor h, const Graph& g, int n = 0) : Out_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator(h,g,(h==halfedge_descriptor())?1:n)), opp(g) {} - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (Out_edge_iterator::*bool_type)() const; @@ -1379,7 +1379,7 @@ public: : In_edge_iterator::iterator_adaptor_(Halfedge_around_target_iterator(h,g,(h==halfedge_descriptor())?1:n)), fct(g) {} - // design patter: "safe bool" + // design pattern: "safe bool" // will be replaced by explicit operator bool with C++11 typedef void (In_edge_iterator::*bool_type)() const; diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 00e22278c7b..02a96433146 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -51,7 +51,7 @@ public: /// @param amesh the surface mesh to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) template SimpleFaceGraphViewerQt(QWidget* parent, const SM& amesh, diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h index 1d740298361..7faa4f49eb2 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/internal/utils_2.h @@ -306,7 +306,7 @@ namespace internal { return boost::none; } - // Check wether a query point belongs to the last polygon edge. + // Check whether a query point belongs to the last polygon edge. template< typename VertexRange, typename OutputIterator, diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt index a60f1e33f1e..6adadd2cef6 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt @@ -530,7 +530,7 @@ All the free function-templates that apply Boolean set operations accept an optional traits argument; see next Section for more information. If a traits class is not provided, a default one that can handle the type of the curves that comprise the boundaries of the -input polygons is selected. You somwhow can influence this selection +input polygons is selected. You somehow can influence this selection using a template parameter as described below. The set of free function-templates that handle (linear) polygons diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h index d7b1cbe791e..49023ab8810 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Concepts/ArrDirectionalTraits--Merge_2.h @@ -18,7 +18,7 @@ public: /*! accepts two mergeable \f$ x\f$-monotone curves `xc1` and -`xc2` and asigns `xc` with the merged curve. If the target +`xc2` and assigns `xc` with the merged curve. If the target point of `xc1` and the source point of `xc2` coincide; then the source point of `xc1` and the target point of `xc2` become the source and target points of `xc`, respectively. If the target diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp index 2c5b160b40a..853340f86d2 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp @@ -168,11 +168,11 @@ bool read_bezier(char const* aFileName, Bezier_polygon_set& rSet) } } catch(std::exception const& x) { - std::cout << "An exception ocurred during reading of Bezier polygon set:" + std::cout << "An exception occurred during reading of Bezier polygon set:" << x.what() << std::endl; } catch(...) { - std::cout << "An exception ocurred during reading of Bezier polygon set." + std::cout << "An exception occurred during reading of Bezier polygon set." << std::endl; } } diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h index f673515eda6..eeb80bf655d 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_meta_traits.h @@ -32,10 +32,10 @@ protected: typedef Curve_with_halfedge Base; const Arrangement* m_arr; // pointer to the arrangement containing the edge. - unsigned int m_bc; // the boudary counter of the halfedge with the same + unsigned int m_bc; // the boundary counter of the halfedge with the same // direction as the curve - unsigned int m_twin_bc; // the boudary counter of the halfedge with the same + unsigned int m_twin_bc; // the boundary counter of the halfedge with the same // direction as the curve public: diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h index 5d30825d63c..e047d78f884 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op.h @@ -108,7 +108,7 @@ public: { std::list curves_list; - unsigned int n_inf_pgn = 0; // number of infinte polygons (arrangement + unsigned int n_inf_pgn = 0; // number of infinite polygons (arrangement // with a contained unbounded face unsigned int n_pgn = 0; // number of polygons (arrangements) unsigned int i; diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h index 0448dd90321..2a76a46c271 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_surface_sweep_2.h @@ -110,7 +110,7 @@ public: event = this->_allocate_event(vh->point(), event_type, ARR_INTERIOR, ARR_INTERIOR); - // \todo When the boolean set operations are exteneded to support + // \todo When the boolean set operations are extended to support // unbounded curves, we will need here a special treatment. #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H @@ -150,7 +150,7 @@ public: if (res == SMALLER || q_iter == q_end) { event = this->_allocate_event(vh->point(), event_type, ARR_INTERIOR, ARR_INTERIOR); - // \todo When the boolean set operations are exteneded to support + // \todo When the boolean set operations are extended to support // unbounded curves, we will need here a special treatment. #ifndef CGAL_ARRANGEMENT_ON_SURFACE_2_H diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h index 4bb4803f089..0312f6781c3 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_base_visitor.h @@ -57,7 +57,7 @@ public: //! discovered_face /*! discovered_face is called by Gps_bfs_scanner when it reveals a new face during a BFS scan. In the BFS traversal we are going from old_face to - new_face throught the half-edge he. + new_face through the half-edge he. \param old_face The face that was already revealed \param new_face The face that we have just now revealed \param he The half-edge that is used to traverse between them. diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h index 5c35964139b..d716452220e 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_bfs_xor_visitor.h @@ -56,7 +56,7 @@ public: /*! The function fixes some of the curves, to be in the same direction as the half-edges. - \param arr The given arrangment. + \param arr The given arrangement. */ void after_scan(Arrangement& arr) { diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h index 250f303dcfe..293b89df161 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h @@ -20,7 +20,7 @@ /*! \file * This class is the default \dcel{} class used by the General_polygon_set_2 - * and Polygon_set_2} class-templates to represent the undelying internal + * and Polygon_set_2} class-templates to represent the underlying internal * Arrangement_2 data structure. */ diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h index 81c6f421171..23af4802c19 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h @@ -146,7 +146,7 @@ protected: public: - // default costructor + // default constructor Gps_on_surface_base_2() : m_traits(new Traits_2()), m_traits_adaptor(*m_traits), m_traits_owner(true), @@ -169,7 +169,7 @@ public: m_arr(new Aos_2(*(ps.m_arr))) {} - // Asignment operator + // Assignment operator Gps_on_surface_base_2& operator=(const Self& ps) { if (this == &ps) @@ -456,13 +456,13 @@ public: bool is_empty() const { // We have to check that all the faces of an empty arrangement are not - // conained in the polygon set (there can be several faces in an empty - // arrangement, dependant on the topology traits. + // contained in the polygon set (there can be several faces in an empty + // arrangement, dependent on the topology traits. // The point is that if the arrangement is "empty" (meaning that no curve // or point were inserted and that it is in its original state) then // all the faces (created by the topology traits) should have the same // result for contained() --- from Boolean operations point of view there - // can not be an empty arrangement which has serveral faces with different + // can not be an empty arrangement which has several faces with different // attributes. return (m_arr->is_empty() && !m_arr->faces_begin()->contained()); } @@ -1189,7 +1189,7 @@ protected: (*it)->_inner_ccbs().clear(); } - // accessor for low-level arrangement fonctionalities + // accessor for low-level arrangement functionalities CGAL::Arr_accessor accessor(*arr); // the face field of outer and inner ccb are used in the loop to access the old face an halfedge // used to contribute to. These two vectors are used to delay the association to the new face to diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h index f35d5486c6b..01f7d07f051 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2_impl.h @@ -631,7 +631,7 @@ template typedef Arr_bfs_scanner Arr_bfs_scanner; - //counting_output_operator CTOR reqires a parameter + //counting_output_operator CTOR requires a parameter std::size_t cc = 0; Arr_bfs_scanner scanner(this->m_traits, Counting_output_iterator(&cc)); scanner.scan(*(this->m_arr)); diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h index 40e47f1f7f4..8f50cc8960c 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_polygon_validation.h @@ -644,7 +644,7 @@ bool are_holes_and_boundary_pairwise_disjoint * * Use sweep to find intersections on the interior of curves (not on vertices) * and overlapping edges which are not allowed (note that 0/1 dimension - * intersections are not detectes by do_intersect() which only returns the + * intersections are not detects by do_intersect() which only returns the * 2D intersection polygon if exists) * Note that using this sweep alone allows for a hole and an edge to share * a vertex and intersect (like illegal input pgn_w_overlap_hole.dat in @@ -686,7 +686,7 @@ bool are_holes_and_boundary_pairwise_disjoint Polygon_2 hole(*hoit); hole.reverse_orientation(); /* gps.join() and gps.insert()requires that the polyon insrted is valid, - * and therfore hole orientation must be reversed + * and therefore the hole orientation must be reversed */ bool intersect = gps.do_intersect(hole); if (intersect) return false; @@ -760,7 +760,7 @@ bool are_holes_and_boundary_pairwise_disjoint * 2 - The PWH is relatively simple polygon (holes are simple...) * 3 - Has it's boundary oriented counterclockwise and the holes oriented * clockwise - * 4 - All the segments (boundry and holes) do not cross or intersect in their + * 4 - All the segments (boundary and holes) do not cross or intersect in their * relative interior * 5 - The holes are on the interior of the boundary polygon if the boundary * is not empty diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h index aafcbc14ec8..4b669d7af73 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h @@ -132,7 +132,7 @@ public: } if (from_leftmost == end) { - // First occurance + // First occurrence from_leftmost = from; into_leftmost = into; into = from; diff --git a/Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h b/Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h index ade9a4989e5..9a378e8000e 100644 --- a/Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h +++ b/Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h @@ -47,7 +47,7 @@ public: typedef typename Base::Polygon_2 Polygon_2; typedef typename Base::Polygon_with_holes_2 Polygon_with_holes_2; - // default costructor + // default constructor General_polygon_set_2() : Base() {} // constructor from a traits object diff --git a/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h b/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h index 7081d319aa8..8e05b354176 100644 --- a/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h +++ b/Boolean_set_operations_2/include/CGAL/General_polygon_set_on_surface_2.h @@ -68,7 +68,7 @@ public: public: - // default costructor + // default constructor General_polygon_set_on_surface_2() : Base() {} diff --git a/Boolean_set_operations_2/include/CGAL/connect_holes.h b/Boolean_set_operations_2/include/CGAL/connect_holes.h index a7067650459..3c1f8e39d7e 100644 --- a/Boolean_set_operations_2/include/CGAL/connect_holes.h +++ b/Boolean_set_operations_2/include/CGAL/connect_holes.h @@ -114,7 +114,7 @@ OutputIterator connect_holes(const Polygon_with_holes_2bad order of the input points. \section SectBoundingAnnulus Bounding Annulus in dD We provide the class `Min_annulus_d` for arbitrary dimensions -to compute the smalles enclosing annulus for a set of points. +to compute the smallest enclosing annulus for a set of points. In 2D the annulus consists of two concentric circles, in 3D of two concentric spheres. diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h index a8669faad09..33d006577bf 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Approximate_min_ellipsoid_d.h @@ -211,7 +211,7 @@ limited precision in the algorithm's underlying arithmetic, it can happen that the computed approximation ellipsoid has a worse approximation ratio (and \f$ \epsilon\f$ can thus be larger than `eps` in general). In any case, the number -\f$ \epsilon\f$ (and with this, the achived approximation +\f$ \epsilon\f$ (and with this, the achieved approximation \f$ 1+\epsilon\f$) can be queried by calling the routine `achieved_epsilon()` discussed below. @@ -240,7 +240,7 @@ const Traits& traits = Traits() ); /// exactly representable as `double` numbers.) In order to access the /// center and semiaxes of the computed approximation ellipsoid, the /// functions `center_cartesian_begin()`, `axes_lengths_begin()`, and -/// `axis_direction_cartesian_begin()` can be used. In constrast to +/// `axis_direction_cartesian_begin()` can be used. In contrast to /// the above access functions `achieved_epsilon()`, /// `defining_matrix()`, `defining_vector()`, and `defining_scalar()`, /// which return the described quantities exactly, the routines below diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_ellipse_2.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_ellipse_2.h index 437721b0afc..35a903babec 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_ellipse_2.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_ellipse_2.h @@ -50,7 +50,7 @@ for validity each takes linear time. To illustrate the usage of `Min_ellipse_2` and to show that randomization can be useful in certain cases, we give an example. The example also -shows how the coefficents of the constructed ellipse can be accessed. +shows how the coefficients of the constructed ellipse can be accessed. \cgalExample{Min_ellipse_2/min_ellipse_2.cpp} diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_d.h index 82b106c9971..d868672502e 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_d.h @@ -299,7 +299,7 @@ InputIterator last ); ///
  • \f$ S\f$ is minimal, i.e.\ no support point is redundant. /// /// \note Under inexact arithmetic, the result of the -/// validation is not realiable, because the checker itself can suffer +/// validation is not reliable, because the checker itself can suffer /// from numerical problems. /// @{ diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h index 3d77b9a4d88..8d360443390 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_of_spheres_d.h @@ -90,7 +90,7 @@ be used in such a case. (For exact number types Currently, we require `Traits::FT` to be either an exact number type or `double` or `float`; other inexact number types are not supported at this time. Also, the current implementation only -handles spheres with Cartesian coordinates; homogenous representation +handles spheres with Cartesian coordinates; homogeneous representation is not supported yet. \cgalHeading{Example} diff --git a/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h b/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h index 4a59d4c3390..49b32647f3c 100644 --- a/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h +++ b/Bounding_volumes/doc/Bounding_volumes/Concepts/MinSphereOfSpheresTraits.h @@ -42,7 +42,7 @@ typedef unspecified_type Sphere; /*! is a (exact or inexact) field number type. -\tparam FT must either be `double` or `float`, or an exact field number type. (An exact number type is one which evaluates arithmetic expressions involving the four basic operations and comparisions with infinite precision, that is, like in \f$ \mathbb{R}\f$.) +\tparam FT must either be `double` or `float`, or an exact field number type. (An exact number type is one which evaluates arithmetic expressions involving the four basic operations and comparisons with infinite precision, that is, like in \f$ \mathbb{R}\f$.) */ typedef unspecified_type FT; diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d.h index cc74dfd6afa..90bda509b4b 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d.h @@ -65,7 +65,7 @@ namespace CGAL { // When the input points do not affinely span the whole space // (i.e., if dim(aff(P)) < d), then the smallest enclosing // ellipsoid of P has no volume in R^d and so the points are - // called "degnerate" (see is_degenerate()) below. + // called "degenerate" (see is_degenerate()) below. // As discussed below (before (*)), the centrally symmetric ellipsoid // E':= sqrt{(1+a_eps)(d+1)} E contains (under exact arithmetic) the @@ -140,7 +140,7 @@ namespace CGAL { CGAL_APPEL_ASSERT(is_deg == E->is_degenerate()); CGAL_APPEL_LOG("appel", " Input points are " << (is_deg? "" : "not ") << - "degnerate." << std::endl); + "degenerate." << std::endl); if (is_deg) find_lower_dimensional_approximation(); diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h index 116e952bf48..fc576c54583 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h @@ -98,7 +98,7 @@ namespace CGAL { { // Here's where we maintain the only instance: (Notice that it // gets constructed automatically the first time instance() is - // called, and that it gets disposed of (if ever contructed) at + // called, and that it gets disposed of (if ever constructed) at // program termination.) static Logger instance; return instance; @@ -183,7 +183,7 @@ namespace CGAL { // created and started. Otherwise, the timer with name name is // restarted. // - // - lapse(name): Retuns the number of seconds which have elapsed + // - lapse(name): Returns the number of seconds which have elapsed // since start(name) was called last. // Precondition: start(name) has been called once. { @@ -201,7 +201,7 @@ namespace CGAL { { // Here's where we maintain the only instance: (Notice that it // gets constructed automatically the first time instance() is - // called, and that it gets disposed of (if ever contructed) at + // called, and that it gets disposed of (if ever constructed) at // program termination.) static Timer instance; return instance; diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h index dcdaedd11f8..b38b7794967 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_impl.h @@ -91,7 +91,7 @@ namespace CGAL { // [ M' m ] // M = [ m^T nu ] // - // where M is the matrix defined via E->matrix(i,j). After caling + // where M is the matrix defined via E->matrix(i,j). After calling // compute_center() (see above), we have in center_ a point c such // that // @@ -101,7 +101,7 @@ namespace CGAL { // // Now if we can write M' = U D U^T holds for some diagonal matrix // D and an orthogonal matrix U then the length l_i of the ith axes - // (corresponding to the ith "direcion" stored in the ith row of + // (corresponding to the ith "direction" stored in the ith row of // U) can be obtained by plugging (0,...,0,l_i,0,...,0)U^T=y-c into // the above equation for E*: // diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h index 4eef8eeab66..0fc9ef14af1 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h @@ -13,7 +13,7 @@ // Note: whenever a comment refers to "Khachiyan's paper" then the // paper "Rounding of polytopes in the real number model of // computation" is meant (Mathematics of Operations Research, Vol. 21, -// No. 2, May 1996). Nontheless, most comments refer to the +// No. 2, May 1996). Nonetheless, most comments refer to the // accompanying documentation sheet (and not to the above paper), see // the file(s) in documentation/. @@ -294,7 +294,7 @@ namespace CGAL { (Embed? "" : "not ") << "embedded)." << std::endl); CGAL_APPEL_TIMER_START("khachiyan"); - // In order to satisfy the invariant on m, we have to initalize + // In order to satisfy the invariant on m, we have to initialize // m with the zero matrix: for (int i=0; ifirst+a.first,this->second+a.second); } diff --git a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h index 46f3adc0382..29094f9e271 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set.h @@ -181,7 +181,7 @@ namespace CGAL_MINIBALL_NAMESPACE { private: // traits class: Traits& t; - private: // for internal consisteny checks: + private: // for internal consistency checks: #ifdef CGAL_MINIBALL_DEBUG // The following variable is true if and only if no ball has been // pushed so far, or is_spanning() has been called at least once and diff --git a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h index d6ce869e3a8..095ccb01837 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h @@ -144,7 +144,7 @@ namespace CGAL_MINIBALL_NAMESPACE { copy_n(t.center_cartesian_begin(*b[0]),center); if (m > 1) { - // compute the coeffients beta[i] and the center: + // compute the coefficients beta[i] and the center: for(unsigned int i=1; i(delta[i]+eps[i])+sol[m]*phi[i])/alpha[i]; for (int j=0; j rho_min); // if a covering with rho == 0 is possible, - // it will be catched in the type1 functions + // it will be caught in the type1 functions Point q_t, q_r; if (rad_2 > rho_max || rho_min == -1) { // it is rho_max ... diff --git a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h index 08c4a329c83..6c4b4dd6819 100644 --- a/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h +++ b/Box_intersection_d/doc/Box_intersection_d/CGAL/Box_intersection_d/Box_d.h @@ -12,7 +12,7 @@ need to provide a unique `id`-number. The policy parameter `IdPolicy` offers several choices. The template parameters have to comply with the following requirements: -\tparam NT is the number type for the box boundaries. It must meet the requierements +\tparam NT is the number type for the box boundaries. It must meet the requirements of the concepts `Assignable` and `LessThanComparable`. \tparam D is an integer and the dimension of the box. \tparam IdPolicy specifies how the `id`-number will be From c5993c7458b17b7c1e16c76c27f82be9bf2dd192 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 14 Nov 2022 18:10:26 +0000 Subject: [PATCH 151/426] Snap_rounding: cleanup --- .../doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h | 4 ++-- Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h b/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h index 1a888a011ce..5f908c59c86 100644 --- a/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h +++ b/Snap_rounding_2/doc/Snap_rounding_2/Concepts/SnapRoundingTraits_2.h @@ -189,7 +189,7 @@ class ConstructVertex_2 public: /*! returns the source or target of `seg`. If `i` modulo 2 is 0, - the source is returned, otherwise the target is returned.} + the source is returned, otherwise the target is returned. */ Point_2 operator()(Segment_2 seg, int i); }; @@ -223,7 +223,7 @@ class ConstructIsoRectangle_2 public: /*! - introduces an iso-oriented rectangle fo whose minimal `x` coordinate + introduces an iso-oriented rectangle whose minimal `x` coordinate is the one of `left`, the maximal `x` coordinate is the one of `right`, the minimal `y` coordinate is the one of `bottom`, the maximal `y` coordinate is the one of `top`.} diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index cf7b6c2def6..20140344b84 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -19,7 +19,6 @@ #include #include -#include #include #include #include From 7a62583efa1ad6ab5bd0e71c5f14f388bc31d237 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 14 Nov 2022 19:14:33 +0100 Subject: [PATCH 152/426] spelling corrections Some spelling corrections (Directories starting with `C`) --- CGAL_Core/include/CGAL/CORE/BigFloatRep.h | 4 ++-- CGAL_Core/include/CGAL/CORE/BigFloat_impl.h | 6 +++--- CGAL_Core/include/CGAL/CORE/BigInt.h | 2 +- CGAL_Core/include/CGAL/CORE/BigRat.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreAux.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreIO_impl.h | 4 ++-- CGAL_Core/include/CGAL/CORE/Expr.h | 4 ++-- CGAL_Core/include/CGAL/CORE/ExprRep.h | 4 ++-- CGAL_Core/include/CGAL/CORE/Expr_impl.h | 6 +++--- CGAL_Core/include/CGAL/CORE/Real.h | 4 ++-- CGAL_Core/include/CGAL/CORE/RealRep.h | 2 +- CGAL_Core/include/CGAL/CORE/Real_impl.h | 4 ++-- CGAL_Core/include/CGAL/CORE/extLong_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/poly/Curves.h | 4 ++-- CGAL_Core/include/CGAL/CORE/poly/Curves.tcc | 4 ++-- CGAL_Core/include/CGAL/CORE/poly/Sturm.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO.h | 6 +++--- CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/gis.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h | 4 ++-- CGAL_ImageIO/include/CGAL/ImageIO_impl.h | 2 +- CGAL_ImageIO/include/CGAL/SEP_header.h | 2 +- CGAL_ipelets/demo/CGAL_ipelets/hull.cpp | 2 +- CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp | 4 ++-- .../CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h | 2 +- CGAL_ipelets/demo/CGAL_ipelets/multi_delaunay.cpp | 4 ++-- CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt | 2 +- CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h | 6 +++--- CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h | 6 +++--- Cartesian_kernel/TODO | 2 +- .../include/CGAL/Cartesian/function_objects.h | 2 +- .../include/CGAL/constructions/kernel_ftC3.h | 4 ++-- .../include/CGAL/predicates/kernel_ftC3.h | 2 +- .../benchmark/README_benchmark_CK2.txt | 2 +- .../benchmark/benchmarks_arrangement.cpp | 4 ++-- Circular_kernel_2/benchmark/bff_reader/readme.txt | 4 ++-- .../benchmark/parser/benchmark_lexer.cpp | 2 +- .../benchmark/parser/benchmark_lexer.l | 2 +- Circular_kernel_2/benchmark/parser/readme.txt | 2 +- .../CGAL/Circular_kernel_2/Circular_arc_2.h | 2 +- .../CGAL/Circular_kernel_2/interface_macros.h | 2 +- .../internal_functions_on_circular_arc_2.h | 4 ++-- .../interface_macros.h | 2 +- .../CGAL/Circular_kernel_3/interface_macros.h | 2 +- .../include/CGAL/_test_sphere_constructions.h | 4 ++-- .../include/CGAL/_test_sphere_predicates.h | 2 +- Circulator/doc/Circulator/PackageDescription.txt | 4 ++-- Circulator/include/CGAL/circulator_bases.h | 2 +- .../doc/Classification/Classification.txt | 4 ++-- .../CGAL/Classification/Point_set_neighborhood.h | 2 +- .../doc/Combinatorial_map/Combinatorial_map.txt | 2 +- .../doc/Combinatorial_map/Concepts/GenericMap.h | 2 +- .../Combinatorial_map/map_3_dynamic_onmerge.cpp | 2 +- Combinatorial_map/include/CGAL/Cell_attribute.h | 14 +++++++------- .../include/CGAL/Cell_attribute_with_id.h | 6 +++--- Combinatorial_map/include/CGAL/Combinatorial_map.h | 14 +++++++------- .../internal/Combinatorial_map_copy_functors.h | 6 +++--- .../internal/Combinatorial_map_group_functors.h | 2 +- .../internal/Combinatorial_map_internal_functors.h | 4 ++-- .../internal/Combinatorial_map_utility.h | 12 ++++++------ .../CGAL/Combinatorial_map_iterators_base.h | 2 +- .../include/CGAL/Combinatorial_map_save_load.h | 6 +++--- Combinatorial_map/include/CGAL/Dart.h | 2 +- .../include/CGAL/Info_for_cell_attribute.h | 4 ++-- .../CGAL/Cone_spanners_2/Plane_scan_tree_impl.h | 4 ++-- .../include/CGAL/Construct_theta_graph_2.h | 2 +- .../include/CGAL/Construct_yao_graph_2.h | 2 +- .../CGAL/Convex_hull_traits_adapter_2.h | 2 +- .../CGAL/convex_hull_constructive_traits_2.h | 4 ++-- Convex_hull_2/include/CGAL/convex_hull_traits_2.h | 2 +- .../Convex_hull_3/dual/halfspace_intersection_3.h | 2 +- .../Convex_hull_3/dual/halfspace_intersection_3.h | 2 +- .../halfspace_intersection_with_constructions_3.h | 2 +- Convex_hull_d/include/CGAL/Convex_hull_d.h | 6 +++--- .../include/CGAL/Convex_hull_d_to_polyhedron_3.h | 2 +- Convex_hull_d/include/CGAL/Delaunay_d.h | 2 +- Convex_hull_d/include/CGAL/Regular_complex_d.h | 4 ++-- 82 files changed, 140 insertions(+), 140 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h index 7439ce025a9..be3ded37195 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h @@ -91,7 +91,7 @@ public: void normal(); void bigNormal(BigInt&); - // arithmetics + // arithmetic public: void add(const BigFloatRep&, const BigFloatRep&); void sub(const BigFloatRep&, const BigFloatRep&); @@ -314,7 +314,7 @@ inline void BigFloatRep::eliminateTrailingZeroes() { } } -// bultin functions +// builtin functions inline extLong BigFloatRep::lMSB() const { if (!isZeroIn()) return extLong(floorLg(abs(m) - err)) + bits(exp); diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index aa029b5c51b..540aff36389 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -97,7 +97,7 @@ const BigFloat& BigFloat::getOne() { CGAL_INLINE_FUNCTION BigFloat::BigFloat(const Expr& E, const extLong& r, const extLong& a) : RCBigFloat(new BigFloatRep()) { - *this = E.approx(r, a).BigFloatValue(); // lazy implementaion, any other way? + *this = E.approx(r, a).BigFloatValue(); // lazy implementation, any other way? } //////////////////////////////////////////////////////////// @@ -862,7 +862,7 @@ BigFloatRep::toDecimal(unsigned int width, bool Scientific) const { // the output is an integer (in which case it does not physically appear // but conceptually terminates the sequence of digits). - // First, get the decimal representaion of (m * B^(exp)). + // First, get the decimal representation of (m * B^(exp)). if (e2 < 0) { M *= FiveTo(-e2); // M = x * 10^(-e2) } else if (e2 > 0) { @@ -1077,7 +1077,7 @@ std::istream& BigFloatRep :: operator >>(std::istream& i) { } while (isspace(c)); /* loop if met end-of-file, or char read in is white-space. */ // Chen Li, "if (c == EOF)" is unsafe since c is of char type and - // EOF is of int tyep with a negative value -1 + // EOF is of int type with a negative value -1 if (i.eof()) { i.clear(std::ios::eofbit | std::ios::failbit); return i; diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index 7b16a960ac3..cf4d8b27fe8 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -37,7 +37,7 @@ public: BigIntRep() { mpz_init(mp); } - // Note : should the copy-ctor be alloed at all ? [Sylvain Pion] + // Note : should the copy-ctor be allowed at all ? [Sylvain Pion] BigIntRep(const BigIntRep& z) : RCRepImpl() { mpz_init_set(mp, z.mp); } diff --git a/CGAL_Core/include/CGAL/CORE/BigRat.h b/CGAL_Core/include/CGAL/CORE/BigRat.h index 29b99509d40..f0bd44a97e0 100644 --- a/CGAL_Core/include/CGAL/CORE/BigRat.h +++ b/CGAL_Core/include/CGAL/CORE/BigRat.h @@ -34,7 +34,7 @@ public: BigRatRep() { mpq_init(mp); } - // Note : should the copy-ctor be alloed at all ? [Sylvain Pion] + // Note : should the copy-ctor be allowed at all ? [Sylvain Pion] BigRatRep(const BigRatRep& z) : RCRepImpl() { mpq_init(mp); mpq_set(mp, z.mp); diff --git a/CGAL_Core/include/CGAL/CORE/CoreAux.h b/CGAL_Core/include/CGAL/CORE/CoreAux.h index 9d75668be3a..b1d41697bd2 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreAux.h +++ b/CGAL_Core/include/CGAL/CORE/CoreAux.h @@ -7,7 +7,7 @@ * * File: CoreAux.h * Synopsis: - * Auxilliary functions + * Auxiliary functions * * Written by * Chee Yap diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h index d28326496f3..91fc769dc0b 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h @@ -42,7 +42,7 @@ namespace CORE { // Note from 2014: does not seem to be used anywhere, and it is not declared // in CoreDefs.h so it is not accessible -// Left here for compatibilty when CGAL_HEADER_ONLY is not defined +// Left here for compatibility when CGAL_HEADER_ONLY is not defined int IOErrorFlag = 0; diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h index 0e4a2044e74..46c546057bd 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h @@ -270,7 +270,7 @@ CGAL_INLINE_FUNCTION void writeToFile(const BigInt& z, std::ostream& out, int base, int charsPerLine) { BigInt c = abs(z); - // get the absoulte value string + // get the absolute value string char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2]; mpz_get_str(buffer, base, c.get_mp()); std::size_t length = std::strlen(buffer); @@ -332,7 +332,7 @@ CGAL_INLINE_FUNCTION void writeToFile(const BigFloat& bf, std::ostream& out, int base, int charsPerLine) { BigInt c(CORE::abs(bf.m())); - // get the absoulte value string + // get the absolute value string char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2]; mpz_get_str(buffer, base, c.get_mp()); std::size_t length = std::strlen(buffer); diff --git a/CGAL_Core/include/CGAL/CORE/Expr.h b/CGAL_Core/include/CGAL/CORE/Expr.h index 5cd5092d7e9..96804e7423c 100644 --- a/CGAL_Core/include/CGAL/CORE/Expr.h +++ b/CGAL_Core/include/CGAL/CORE/Expr.h @@ -209,7 +209,7 @@ public: *this -= 1; return *this; } - /// right deccrement operator (i--) + /// right decrement operator (i--) Expr operator--(int) { Expr t(*this); *this -= 1; @@ -365,7 +365,7 @@ CGAL_CORE_EXPORT Expr pow(const Expr&, unsigned long); inline Expr operator+(const Expr& e1, const Expr& e2) { return Expr(new AddRep(e1.Rep(), e2.Rep())); } -/// substraction +/// subtraction inline Expr operator-(const Expr& e1, const Expr& e2) { return Expr(new SubRep(e1.Rep(), e2.Rep())); } diff --git a/CGAL_Core/include/CGAL/CORE/ExprRep.h b/CGAL_Core/include/CGAL/CORE/ExprRep.h index 7920485fff7..f3d30e58c8d 100644 --- a/CGAL_Core/include/CGAL/CORE/ExprRep.h +++ b/CGAL_Core/include/CGAL/CORE/ExprRep.h @@ -145,7 +145,7 @@ struct NodeInfo { // class Expr; /// \class ExprRep -/// \brief The sharable, internal representation of expressions +/// \brief The shareable, internal representation of expressions // Members: private: int refCount, // public: NodeInfo* nodeInfo, // filteredFp ffVal. @@ -425,7 +425,7 @@ public: extLong computeBound(); /// driver function to approximate void approx(const extLong& relPrec, const extLong& absPrec); - /// compute an approximate value satifying the specified precisions + /// compute an approximate value satisfying the specified precisions virtual void computeApproxValue(const extLong&, const extLong&) = 0; /// Test whether the current approx. value satisfies [relPrec, absPrec] bool withinKnownPrecision(const extLong&, const extLong&); diff --git a/CGAL_Core/include/CGAL/CORE/Expr_impl.h b/CGAL_Core/include/CGAL/CORE/Expr_impl.h index 5e3806024fa..3655720dc22 100644 --- a/CGAL_Core/include/CGAL/CORE/Expr_impl.h +++ b/CGAL_Core/include/CGAL/CORE/Expr_impl.h @@ -76,8 +76,8 @@ const Expr& Expr::getOne() { // Note: // // This function returns are two consecutive representable binary -// IEEE double values whichs contain the real value, but when you print out -// them, you might be confused by the decimal represention due to round. +// IEEE double values which contain the real value, but when you print out +// them, you might be confused by the decimal representation due to rounding. // CGAL_INLINE_FUNCTION void Expr::doubleInterval(double & lb, double & ub) const { @@ -354,7 +354,7 @@ void ExprRep::reduceTo(const ExprRep *e) { // we can ``reduce'' an Expression to a single node containing // a BigRat value. This reduction is done if the global variable // get_static_rationalReduceFlag()=true. The default value is false. - // This is the intepretation of ratFlag: + // This is the interpretation of ratFlag: // ratFlag < 0 means irrational // ratFlag = 0 means not initialized // ratFlag > 0 means rational diff --git a/CGAL_Core/include/CGAL/CORE/Real.h b/CGAL_Core/include/CGAL/CORE/Real.h index b79503eb4c2..618c8fd5bea 100644 --- a/CGAL_Core/include/CGAL/CORE/Real.h +++ b/CGAL_Core/include/CGAL/CORE/Real.h @@ -115,7 +115,7 @@ public: *this += 1; return t; } - /// right deccrement operator (i--) + /// right decrement operator (i--) Real operator--(int) { Real t(*this); *this -= 1; @@ -168,7 +168,7 @@ public: } //@} - /// \name Aprroximation Function + /// \name Approximation Function //@{ /// approximation Real approx(const extLong& r=get_static_defRelPrec(), diff --git a/CGAL_Core/include/CGAL/CORE/RealRep.h b/CGAL_Core/include/CGAL/CORE/RealRep.h index 5a18d2748d1..ebbcbbf3db6 100644 --- a/CGAL_Core/include/CGAL/CORE/RealRep.h +++ b/CGAL_Core/include/CGAL/CORE/RealRep.h @@ -459,7 +459,7 @@ inline unsigned long RealBigFloat::length() const { // The BigRat(BigFloat) actually is a // conversion operator (defined in BigFloat.h), _NOT_ // an ordinary class constructor! The C++ language - // specify that an intialization is not an assignment + // specify that an initialization is not an assignment // but a constructor operation! // Considering that BigRat(BigFloat) is a conversion // operator not really a constructor. The programmer's diff --git a/CGAL_Core/include/CGAL/CORE/Real_impl.h b/CGAL_Core/include/CGAL/CORE/Real_impl.h index 8a6a4899c64..a72c801fb84 100644 --- a/CGAL_Core/include/CGAL/CORE/Real_impl.h +++ b/CGAL_Core/include/CGAL/CORE/Real_impl.h @@ -96,7 +96,7 @@ extern BigInt FiveTo(unsigned long exp); // Note: // -- Zilin Du: 06/03/2003 // -- Original it is the code for Real's constructor for "const char*". -// I change it to a function so that two constrcutors can share the code. +// I change it to a function so that two constructors can share the code. // now it is private and no default value. // // --Default value of the argument "prec" is get_static_defInputDigits() @@ -209,7 +209,7 @@ std::istream& operator >>(std::istream& i, Real& x) { char read in is white-space. */ // Chen Li, // original "if (c == EOF) ..." is unsafe since c is of char type and - // EOF is of int tyep with a negative value -1 + // EOF is of int type with a negative value -1 if (i.eof()) { i.clear(std::ios::eofbit | std::ios::failbit); diff --git a/CGAL_Core/include/CGAL/CORE/extLong_impl.h b/CGAL_Core/include/CGAL/CORE/extLong_impl.h index 0baeb58fbcd..716c602765d 100644 --- a/CGAL_Core/include/CGAL/CORE/extLong_impl.h +++ b/CGAL_Core/include/CGAL/CORE/extLong_impl.h @@ -177,7 +177,7 @@ extLong extLong::operator- () const { // sign // You should check "flag" before calling this, otherwise -// you cannot interprete the returned value! +// you cannot interpret the returned value! CGAL_INLINE_FUNCTION int extLong::sign() const { if (flag == 2) diff --git a/CGAL_Core/include/CGAL/CORE/poly/Curves.h b/CGAL_Core/include/CGAL/CORE/poly/Curves.h index 65d1422d255..f6c1646a171 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Curves.h +++ b/CGAL_Core/include/CGAL/CORE/poly/Curves.h @@ -147,7 +147,7 @@ class BiPoly{ //BiPoly(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) @@ -414,7 +414,7 @@ public: //Curve(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) diff --git a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc index d9be84796c0..1c3844655f6 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc @@ -92,7 +92,7 @@ BiPoly::BiPoly(Polynomial p, bool flag){ //BiPoly(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) @@ -1101,7 +1101,7 @@ Curve::Curve(Polynomial p, bool flag) //Curve(deg, d[], C[]): // Takes in a list of list of coefficients. - // Each cofficient list represents a polynomial in X + // Each coefficient list represents a polynomial in X // // deg - ydeg of the bipoly // d[] - array containing the degrees of each coefficient (i.e., X poly) diff --git a/CGAL_Core/include/CGAL/CORE/poly/Sturm.h b/CGAL_Core/include/CGAL/CORE/poly/Sturm.h index 57fe5b26b7f..b6d1f7520c9 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Sturm.h +++ b/CGAL_Core/include/CGAL/CORE/poly/Sturm.h @@ -19,7 +19,7 @@ * It is very important that the BigFloats used in these intervals * have no error at the beginning, and this is maintained * by refinement. Note that if x, y are error-free BigFloats, - * then (x+y)/2 may not be error-free (in current implementaion. + * then (x+y)/2 may not be error-free (in current implementation. * We have to call a special "exact divide by 2" method, * (x+y).div2() for this purpose. * diff --git a/CGAL_ImageIO/include/CGAL/ImageIO.h b/CGAL_ImageIO/include/CGAL/ImageIO.h index 9c6b4281cc6..4d3eb8fc886 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO.h @@ -191,7 +191,7 @@ typedef struct imformat { WRITE_IMAGE writeImage; /* the file extension of format (including a dot ".": if several - extensions may be used, they should be separed with a + extensions may be used, they should be separated with a comma ".inr,.inr.gz" */ char fileExtension[IMAGE_FORMAT_NAME_LENGTH]; @@ -394,7 +394,7 @@ CGAL_IMAGEIO_EXPORT int _writeImage(_image *im, const char *name); File descriptor is let at the beginning of next slice and closed
    when end of file is encountered.
    If data buffer is nullptr, it is allocated for one slice only.
    - This funtion is dedicated to read huge inrimages. + This function is dedicated to read huge inrimages. @param im image descriptor */ CGAL_IMAGEIO_EXPORT void _getNextSlice(_image *im); @@ -437,7 +437,7 @@ CGAL_IMAGEIO_EXPORT int _readNonInterlacedFileData(_image *im); /** given an initialized file descriptor and a file name, open file - from stdout (if name == nullptr), a gziped pipe (if file is gziped) + from stdout (if name == nullptr), a gzipped pipe (if file is gzipped) or a standard file otherwise. @param im initialized image descriptor @param name image file name */ diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h index c9c76c0e20f..185a777dac8 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmp_impl.h @@ -200,7 +200,7 @@ void *_readBmpImage( const char *name, numImages = 1; /* - * Now that we have our arrays allocted, read the image into them. + * Now that we have our arrays allocated, read the image into them. */ switch (fileType) { case TYPE_BMP: diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h index 0b314a09c3d..2c33a9ae3b2 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmpread_impl.h @@ -699,7 +699,7 @@ void reflectYchar(char *image, int width, int height) * start of a BITMAPARRAYHEADER. These functions will leave the file pointer * on the byte after the image's color table. * - * The coordinate speaces in the returned arrays will have an upper-left + * The coordinate spaces in the returned arrays will have an upper-left * origin. As before, a non-zero return value indicates that something went * wrong. * diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h index bd50484f6db..c40f95ca378 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h @@ -129,7 +129,7 @@ typedef struct Bitmapfileheader * BITMAPARRAYHEADER is used to establish a linked list of Bitmapfileheader * structures for a bitmap file with multiple images in it. There is no * equivalent structure in the Windows SDK. Its analogues in the OS/2 toolkit - * are the BITMAPARRAYFILEHEADER and BITMAPARRAYFILEHEADER2 strucutres. + * are the BITMAPARRAYFILEHEADER and BITMAPARRAYFILEHEADER2 structures. * * A Bitmapfileheader structure is always concatenated to the end of a * BITMAPARRAYHEADER structure. diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h index 119b6e2d515..2917310087b 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/gif_impl.h @@ -413,7 +413,7 @@ int gif89 = 0; - /* Start reading the raster data. First we get the intial code size + /* Start reading the raster data. First we get the initial code size * and compute decompressor constant values, based on this code size. */ diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/gis.h b/CGAL_ImageIO/include/CGAL/ImageIO/gis.h index 9b29a1548dd..2abc1069860 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/gis.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/gis.h @@ -23,7 +23,7 @@ Format du fichier texte associe aux fichiers binaires (images) -exemple : +example : 512 512 100 2 -type U16 -dx 1. diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h index 6bacde694e1..e2d9b5b2818 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/gis_impl.h @@ -445,7 +445,7 @@ int readGisHeader( const char* name,_image* im) else { - fprintf( stderr, "readGisHeader: unknown indentifier '%s'\n", s ); + fprintf( stderr, "readGisHeader: unknown identifier '%s'\n", s ); ADD_USER_STRING *s = '\0'; } diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h b/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h index c4c612cc6e3..d9437f9c13f 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h @@ -35,7 +35,7 @@ -/* Differents type coding for images and buffers. +/* Different type coding for images and buffers. */ typedef enum { TYPE_UNKNOWN /* unknown type */, @@ -63,7 +63,7 @@ typedef double r64; -/* Typedef Booleen +/* Typedef Boolean */ typedef enum { False = 0, diff --git a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h index 9d37a4d4ce6..8dbef016b1c 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h @@ -887,7 +887,7 @@ _image* _readNonInterlacedImage(const char *name) { /* Write inrimage given in inr in file name. If file name's suffix is - .gz, the image is gziped. If file name's suffix is .hdr, the image + .gz, the image is gzipped. If file name's suffix is .hdr, the image is written in ANALYZE format. If file name is nullptr, image is written on stdout */ CGAL_INLINE_FUNCTION diff --git a/CGAL_ImageIO/include/CGAL/SEP_header.h b/CGAL_ImageIO/include/CGAL/SEP_header.h index e6ffe0b13f4..17c40493ef5 100644 --- a/CGAL_ImageIO/include/CGAL/SEP_header.h +++ b/CGAL_ImageIO/include/CGAL/SEP_header.h @@ -72,7 +72,7 @@ private: template void operator()(const T& t) { - // std::cerr << "My assignement (" + // std::cerr << "My assignment (" // << typeid(t).name() << "): " // << key << "=" << t << std::endl; self->add(key, t); diff --git a/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp b/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp index abd2a7842b5..23bbb451377 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/hull.cpp @@ -112,7 +112,7 @@ void enveloppeIpelet::protected_run(int fn) return; } - Apollonius::Vertex_circulator Cvert = apo.incident_vertices(apo.infinite_vertex()); //take points incident to infinte vertex + Apollonius::Vertex_circulator Cvert = apo.incident_vertices(apo.infinite_vertex()); //take points incident to infinite vertex Apollonius::Vertex_circulator Cvert0 = Cvert; std::vector Vsite0; do{ diff --git a/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp b/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp index 12a7d30c5e9..e0725a743e9 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp @@ -38,8 +38,8 @@ const std::string sublabel[] = { }; const std::string helpmsg[] = { - "Draw the hyperbolic line trough two points in Poincare disk", - "Draw the hyperbolic segment trough two points in Poincare disk", + "Draw the hyperbolic line through two points in Poincare disk", + "Draw the hyperbolic segment through two points in Poincare disk", "Draw the hyperbolic bisector of two points in Poincare disk", "Draw the hyperbolic circle given the center (primary selection) and a point in Poincare disk", "Draw the hyperbolic center given a circle (primary selection) in Poincare disk", diff --git a/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h b/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h index 16495ef32ce..7709eb5df26 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h +++ b/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h @@ -68,7 +68,7 @@ void k_delaunay(Regular& rt,input_DS& input_wpt,int order){ pt_x = pt_x + give_x((**it_it_wpt)); pt_y = pt_y + give_y((**it_it_wpt)); weight = weight + order * give_weight((**it_it_wpt)); - //substract form the weight the sum of the squared distances between each pair of wpoints selected + //subtract form the weight the sum of the squared distances between each pair of wpoints selected for(typename std::vector::iterator le_WptI_cgal0 = it_it_wpt+1 ;le_WptI_cgal0!=Current_sel.end();++le_WptI_cgal0){ weight = weight - CGAL::to_double(CGAL::squared_distance( typename Kernel::Construct_point_2()(**le_WptI_cgal0), diff --git a/CGAL_ipelets/demo/CGAL_ipelets/multi_delaunay.cpp b/CGAL_ipelets/demo/CGAL_ipelets/multi_delaunay.cpp index 58f490ab9e6..9361353d575 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/multi_delaunay.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/multi_delaunay.cpp @@ -102,14 +102,14 @@ void MdelaunayIpelet::protected_run(int fn) pt_list.push_back(pt1); vertI_cgal -> info() = pt_list; } - if(fn==1){//Delauney 2 : just regular triangulation of all midpoints of delaunay segments with weight minus the squared lenght of the edge divided by 4 + if(fn==1){//Delauney 2 : just regular triangulation of all midpoints of delaunay segments with weight minus the squared length of the edge divided by 4 draw_in_ipe(rti); break; } if(fn==2 || fn==7){ //Pour l'order 3 //CAN WE ITERATE OVER DELAUNEY TRIANGLES??? //WE MAY COUNT SEVERAL TIME SAME TRIANGLE WITH THE FOLLOWING METHOD - //iterate over adjacent point in the regular triangulation and compute a new wpoint for those having one commun parent from delaunay + //iterate over adjacent point in the regular triangulation and compute a new wpoint for those having one common parent from delaunay for (RegularI::Finite_edges_iterator it=rti.finite_edges_begin();it!=rti.finite_edges_end();++it){ Point_2 pt0_ori0=it->first->vertex(Delaunay::cw(it->second))->info().front(); Point_2 pt0_ori1=it->first->vertex(Delaunay::cw(it->second))->info().back(); diff --git a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt index e5c3467650f..c282cfc1c38 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt +++ b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt @@ -123,7 +123,7 @@ Draws an half-Yao-graph with the even of k cones. Draws an half-theta-graph with the odd of k cones.
  • Half-Yao-k-graph with odd cones: Draws an half-Yao-graph with the odd of k cones. -
  • k cones: For earch selected point. +
  • k cones: For each selected point. Draws the k cones around the point. diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h index 52281e3e45d..1d55bf3269e 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v6.h @@ -403,9 +403,9 @@ public: { IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath; IpeVector ipeS=IpeVector( CGAL::to_double(std::get<1>(arc).x()), - CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<1>(arc).y()));//convert to ipe format IpeVector ipeT=IpeVector( CGAL::to_double(std::get<2>(arc).x()), - CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<2>(arc).y()));//convert to ipe format SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0, 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())), @@ -945,7 +945,7 @@ public: //retrieve circle arcs if(SSP_ipe -> Segment(j).Type()==IpePathSegment::EArc && is_only_rotated_or_scaled(object->AsPath()->Matrix())) - {//retreve circle arcs + {//retrieve circle arcs if ( !CGAL::Is_in_tuple::value ){ to_deselect=true; continue; diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index feb34f62f3b..cae6c0794f8 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -414,9 +414,9 @@ public: { ipe::Curve* SSP_ipe = new ipe::Curve; ipe::Vector ipeS=ipe::Vector( CGAL::to_double(std::get<1>(arc).x()), - CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<1>(arc).y()));//convert to ipe format ipe::Vector ipeT=ipe::Vector( CGAL::to_double(std::get<2>(arc).x()), - CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format + CGAL::to_double(std::get<2>(arc).y()));//convert to ipe format SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0, 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())), @@ -951,7 +951,7 @@ public: //retrieve circle arcs if(SSP_ipe -> segment(j).type()==ipe::CurveSegment::EArc && is_only_rotated_or_scaled(object->asPath()->matrix())) - {//retreve circle arcs + {//retrieve circle arcs if ( !CGAL::Is_in_tuple::value ){ to_deselect=true; continue; diff --git a/Cartesian_kernel/TODO b/Cartesian_kernel/TODO index d6c10ccd38e..a290949e9e7 100644 --- a/Cartesian_kernel/TODO +++ b/Cartesian_kernel/TODO @@ -14,7 +14,7 @@ Stuff to look at, as time permits: > > > so-called advanced kernel and the tag used to distinguish coordinate > > > rep. - > > > I asekd for this long time ago, and that time, I got no reply ... :) + > > > I asked for this long time ago, and that time, I got no reply ... :) > > I see... :) When was it ? As you know, I'm back to work since october, > > so. diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index a93004ad293..2196caa9cc7 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -2505,7 +2505,7 @@ namespace CartesianKernelFunctors { FT rsy = psz*qsx-psx*qsz; FT rsz = psx*qsy-psy*qsx; - // The following determinants can be developped and simplified. + // The following determinants can be developed and simplified. // // FT num_x = determinant(psy,psz,ps2, // qsy,qsz,qs2, diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h index 77fe5d05e7c..7b0e4631eee 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h @@ -427,7 +427,7 @@ determinants_for_circumcenterC3(const FT &px, const FT &py, const FT &pz, FT rsy = psz*qsx - psx*qsz; FT rsz = psx*qsy - psy*qsx; - // The following determinants can be developped and simplified. + // The following determinants can be developed and simplified. // // FT num_x = determinant(psy,psz,ps2, // qsy,qsz,qs2, @@ -677,7 +677,7 @@ determinants_for_weighted_circumcenterC3( FT sy = qpz*rpx - qpx*rpz; FT sz = qpx*rpy - qpy*rpx; - // The following determinants can be developped and simplified. +// The following determinants can be developed and simplified. // // FT num_x = determinant(qpy,qpz,qp2, // rpy,rpz,rp2, diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h index 8765d0cb587..d7e2c87c9e4 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC3.h @@ -407,7 +407,7 @@ cmp_dist_to_pointC3(const FT &px, const FT &py, const FT &pz, } // Because of the way the filtered predicates generator script works, -// cmp_dist_to_pointC3() must be defined _before_ ths following one. +// cmp_dist_to_pointC3() must be defined _before_ the following one. template CGAL_KERNEL_MEDIUM_INLINE typename Same_uncertainty_nt::type diff --git a/Circular_kernel_2/benchmark/README_benchmark_CK2.txt b/Circular_kernel_2/benchmark/README_benchmark_CK2.txt index 16dbab068e1..e4fd6e11799 100644 --- a/Circular_kernel_2/benchmark/README_benchmark_CK2.txt +++ b/Circular_kernel_2/benchmark/README_benchmark_CK2.txt @@ -56,7 +56,7 @@ The output: In std::cout : The number of elements to compute the arrangement -The number of circles and polygons (wich the side may be circular arcs) +The number of circles and polygons (which the side may be circular arcs) The time needed to compute it, The number of Vertices, Edges and Faces of the arrangement diff --git a/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp b/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp index c0c627086a4..3b548a20e2a 100644 --- a/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp +++ b/Circular_kernel_2/benchmark/benchmarks_arrangement.cpp @@ -116,9 +116,9 @@ else - //Bench bench(Htmlfilename,Texfilename,Dxffilename[i],true); // If you want to do benchmarks only with dxf files, you supose to use this defenition + //Bench bench(Htmlfilename,Texfilename,Dxffilename[i],true); // If you want to do benchmarks only with dxf files, you suppose to use this definition -Bench bench; //If you want create table with all datasets you supose to use this. +Bench bench; //If you want create table with all datasets you suppose to use this. diff --git a/Circular_kernel_2/benchmark/bff_reader/readme.txt b/Circular_kernel_2/benchmark/bff_reader/readme.txt index addb3f91fa7..8693d154410 100644 --- a/Circular_kernel_2/benchmark/bff_reader/readme.txt +++ b/Circular_kernel_2/benchmark/bff_reader/readme.txt @@ -1,5 +1,5 @@ -It's not finished reader off .bff it uses extendet version of -parser. I hope it will be usefull for yours future works. By using +It's not finished reader off .bff it uses extended version of +parser. I hope it will be useful for yours future works. By using this source you can easyly create yours own. missing diff --git a/Circular_kernel_2/benchmark/parser/benchmark_lexer.cpp b/Circular_kernel_2/benchmark/parser/benchmark_lexer.cpp index 1abdf904b1f..36d1e42f486 100644 --- a/Circular_kernel_2/benchmark/parser/benchmark_lexer.cpp +++ b/Circular_kernel_2/benchmark/parser/benchmark_lexer.cpp @@ -654,7 +654,7 @@ static int comment_nesting = 0; // counts nesting depth of () in Comments Parsing Modes: -- INITIAL: main mode for sequence of tokens -- IncludeMode: parses lciInclude filename, - -- CommentMode: Comment(...) parsing of nested parantheses + -- CommentMode: Comment(...) parsing of nested parentheses # comments and strings are correctly ignored -------------------------------------------------------------------- */ #define IncludeMode 1 diff --git a/Circular_kernel_2/benchmark/parser/benchmark_lexer.l b/Circular_kernel_2/benchmark/parser/benchmark_lexer.l index 3aa77b81a6c..0f3e8212f90 100644 --- a/Circular_kernel_2/benchmark/parser/benchmark_lexer.l +++ b/Circular_kernel_2/benchmark/parser/benchmark_lexer.l @@ -108,7 +108,7 @@ static int comment_nesting = 0; // counts nesting depth of () in Comments Parsing Modes: -- INITIAL: main mode for sequence of tokens -- IncludeMode: parses lciInclude filename, - -- CommentMode: Comment(...) parsing of nested parantheses + -- CommentMode: Comment(...) parsing of nested parentheses # comments and strings are correctly ignored -------------------------------------------------------------------- */ %} diff --git a/Circular_kernel_2/benchmark/parser/readme.txt b/Circular_kernel_2/benchmark/parser/readme.txt index 99a73ceaa57..deb9d0569a5 100644 --- a/Circular_kernel_2/benchmark/parser/readme.txt +++ b/Circular_kernel_2/benchmark/parser/readme.txt @@ -1 +1 @@ -This source of extendet parser. By using report.tex. You can easily extend it in you own way. +This source of extended parser. By using report.tex. You can easily extend it in you own way. diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h index 4288ef1657b..41334a5934e 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Circular_arc_2.h @@ -740,7 +740,7 @@ public: Filtered_bbox_circular_arc_2_base(const P_arc& arc) : P_arc(arc), bb(nullptr) {} - // otherwise it will lead to ambiguos definitions + // otherwise it will lead to ambiguous definitions explicit Filtered_bbox_circular_arc_2_base(const Circle_2 &c) : P_arc(c),bb(nullptr) {} diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/interface_macros.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/interface_macros.h index d4656409d73..ca10ee63135 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/interface_macros.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/interface_macros.h @@ -21,7 +21,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Circular_Kernel_pred and CGAL_Circular_Kernel_cons. // And they are #undefed at the end of this file. diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h index 30ec5072e41..61fdc75b4b6 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h @@ -1302,7 +1302,7 @@ template < class CK, class OutputIterator > } // This is the make_x_monotone function returning extra information: -// The ouput iterator refers to pairs, the first part of which is an +// The output iterator refers to pairs, the first part of which is an // object containing the x-monotone arc and the second part is a // boolean defining whether the arc is on the upper part of the // circle or not. This extra information returned by make_x_monotone @@ -1457,7 +1457,7 @@ template < class CK, class OutputIterator > // In the same as the advanced_make_x_monotone works, this make_xy_function // returns extra information, descriptive of the position of the returned // xy-monotone arcs on the circle: The output iterator refers to pairs, the -// first part of which is the object containing tha arc and the second part +// first part of which is the object containing the arc and the second part // is another pair containing 2 booleans which equavalently describe whether the // returned xy-monotone arc is on the upper part and the left side of the circle diff --git a/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h b/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h index f7eb9881227..32afcea5df7 100644 --- a/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h +++ b/Circular_kernel_2/include/CGAL/Filtered_bbox_circular_kernel_2/interface_macros.h @@ -21,7 +21,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Filtered_Bbox_Circular_Kernel_pred and CGAL_Filtered_Bbox_Circular_Kernel_cons. // And they are #undefed at the end of this file. diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h index 26d3e518d0a..dfb43c31298 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/interface_macros.h @@ -18,7 +18,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred and CGAL_Kernel_cons. // And they are #undefed at the end of this file. diff --git a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h index 4b9fd71b869..363d4b2087b 100644 --- a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h +++ b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_constructions.h @@ -1921,7 +1921,7 @@ void _test_intersection_construct(SK sk) { Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert(theEqual_3(cres, conf)); } else { - // This case sould never happen, because it already happen before + // This case should never happen, because it already happen before assert(intersection_1.size() == 2); assert(theDo_intersect_3(ca, cb)); assert(assign(cres,intersection_1[0])); @@ -2076,7 +2076,7 @@ void _test_intersection_construct(SK sk) { Circular_arc_3 conf = theConstruct_circular_arc_3(cc,cp[i],cp[t2]); assert(theEqual_3(cres, conf)); } else { - // This case sould never happen, because it already happen before + // This case should never happen, because it already happen before assert(intersection_1.size() == 2); assert(CGAL::do_intersect(ca, cb)); assert(assign(cres,intersection_1[0])); diff --git a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_predicates.h b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_predicates.h index 7fca79a5c3f..d49c0c7ab2d 100644 --- a/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_predicates.h +++ b/Circular_kernel_3/test/Circular_kernel_3/include/CGAL/_test_sphere_predicates.h @@ -394,7 +394,7 @@ void _test_has_on_predicate(SK sk) { std::cout << "Testing has_on(Circular_arc, Circular_arc_point)..." << std::endl; - // That cover all the cases, since the orientation is setted by default to be the + // That cover all the cases, since the orientation is set by default to be the // clockwise orientation for a well defined normal vector (read the comments on // include/CGAL/Circular_kernel_3/Circular_arc_3.h) Root_for_spheres_2_3 rt[10]; diff --git a/Circulator/doc/Circulator/PackageDescription.txt b/Circulator/doc/Circulator/PackageDescription.txt index 7c0967f4d33..4f6971cd65b 100644 --- a/Circulator/doc/Circulator/PackageDescription.txt +++ b/Circulator/doc/Circulator/PackageDescription.txt @@ -26,7 +26,7 @@ \cgalPkgPicture{circulator.png} \cgalPkgSummaryBegin \cgalPkgAuthors{Olivier Devillers, Lutz Kettner, Sylvain Pion, Michael Seel, and Mariette Yvinec} -\cgalPkgDesc{This package descibes handles and circulators. They are related to iterators. Handles allow to dereference but neither to increment nor to decrement. Circulators have no notion of past-the-end, and they are used in \cgal whenever we have cyclic stuctures. } +\cgalPkgDesc{This package describes handles and circulators. They are related to iterators. Handles allow to dereference but neither to increment nor to decrement. Circulators have no notion of past-the-end, and they are used in \cgal whenever we have cyclic structures. } \cgalPkgManuals{Chapter_Handles_Ranges_and_Circulators,PkgHandlesAndCirculatorsRef} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin @@ -39,7 +39,7 @@ The concept of iterators in the \stl is tailored for linear sequences. \cgal extends this in several directions. First, it supports the notion -of `Handle` (also sometimes refered to as the trivial iterator) which is +of `Handle` (also sometimes referred to as the trivial iterator) which is used to document that no traversal operation is needed, only reference to an element. It also uses the `Range` and `ConstRange` concepts which encapsulates the access to both the first and the past-the-end iterators of an diff --git a/Circulator/include/CGAL/circulator_bases.h b/Circulator/include/CGAL/circulator_bases.h index 245d40422fb..57dc7f3d587 100644 --- a/Circulator/include/CGAL/circulator_bases.h +++ b/Circulator/include/CGAL/circulator_bases.h @@ -47,7 +47,7 @@ struct Random_access_circulator_tag }; template diff --git a/Classification/doc/Classification/Classification.txt b/Classification/doc/Classification/Classification.txt index 2c4c11eee49..7a96d16cdbd 100644 --- a/Classification/doc/Classification/Classification.txt +++ b/Classification/doc/Classification/Classification.txt @@ -408,7 +408,7 @@ standard Potts model \cgalCite{cgal:l-mrfmi-09} : \f] where \f$\gamma>0\f$ is the parameter of the Potts model that -quantifies the strengh of the regularization, \f$i \sim j\f$ +quantifies the strength of the regularization, \f$i \sim j\f$ represents the pairs of neighboring items and \f$\mathbf{1}_{\{.\}}\f$ the characteristic function. @@ -429,7 +429,7 @@ results. The following snippet shows how to classify points using a graph cut regularization providing a model of -`CGAL::Classification::NeighborQuery`, a strengh parameter +`CGAL::Classification::NeighborQuery`, a strength parameter \f$\gamma\f$ and a number of subdivisions. \snippet Classification/example_classification.cpp Graph_cut diff --git a/Classification/include/CGAL/Classification/Point_set_neighborhood.h b/Classification/include/CGAL/Classification/Point_set_neighborhood.h index c204a337454..156bd68d1cb 100644 --- a/Classification/include/CGAL/Classification/Point_set_neighborhood.h +++ b/Classification/include/CGAL/Classification/Point_set_neighborhood.h @@ -73,7 +73,7 @@ class Point_set_neighborhood My_point_property_map (const PointRange *input, PointMap point_map) : input (input), point_map (point_map) { } - // we did not put `reference` here on purpose as the recommanded default + // we did not put `reference` here on purpose as the recommended default // is `Identity_property_map` and not `Identity_property_map` friend decltype(auto) get (const My_point_property_map& ppmap, key_type i) { return get(ppmap.point_map, *(ppmap.input->begin()+std::size_t(i))); } diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index 58ada384336..37ce36209f0 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -115,7 +115,7 @@ To answer this need, a combinatorial map allows to create attributes whic
  • an i-cell may have no associated i-attribute. -Since i-cells are not explicitely represented in combinatorial maps, the association between i-cells and i-attributes is transferred to darts: if attribute a is associated to i-cell c, all the darts belonging to c are associated to a. +Since i-cells are not explicitly represented in combinatorial maps, the association between i-cells and i-attributes is transferred to darts: if attribute a is associated to i-cell c, all the darts belonging to c are associated to a. We can see two examples of combinatorial maps having some attributes in \cgalFigureRef{fig_cmap_with_attribs}. In the first example (Left), a 2D combinatorial map has 1-attributes containing a float, for example corresponding to the length of the associated 1-cell, and 2-attributes containing a color in RGB format. In the second example (Right), a 3D combinatorial map has 2-attributes containing a color in RGB format. diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h index 8c1c3916212..9dda13fc7ef 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h @@ -679,7 +679,7 @@ Returns the status of the management of the attributes of the generic map. (ca1.dart()).size(); CMap_3::size_type nb2=mmap.darts_of_cell<2>(ca2.dart()).size(); mmap.info<2>(ca1.dart())*=(double(nb1)/(nb1+nb2)); diff --git a/Combinatorial_map/include/CGAL/Cell_attribute.h b/Combinatorial_map/include/CGAL/Cell_attribute.h index 091fb5730a1..0c931f0e30d 100644 --- a/Combinatorial_map/include/CGAL/Cell_attribute.h +++ b/Combinatorial_map/include/CGAL/Cell_attribute.h @@ -176,11 +176,11 @@ struct Init_id; { return !operator==(other); } protected: - /// Contructor without parameter. + /// Constructor without parameter. Cell_attribute_without_info(): mrefcounting(0), m_for_cc(Refs::null_descriptor) {} - /// Copy contructor. + /// Copy constructor. Cell_attribute_without_info(const Cell_attribute_without_info& acell): mrefcounting(acell.mrefcounting) {} @@ -301,12 +301,12 @@ struct Init_id; { return !operator==(other); } protected: - /// Contructor without parameter. + /// Constructor without parameter. Cell_attribute_without_info() : mdart(Refs::null_descriptor), mrefcounting(0) {} - /// Copy contructor. + /// Copy constructor. Cell_attribute_without_info(const Cell_attribute_without_info& acell): mdart(acell.mdart), mrefcounting(acell.mrefcounting) @@ -398,7 +398,7 @@ struct Init_id; typedef void Info; protected: - /// Default contructor. + /// Default constructor. Cell_attribute() {} }; @@ -461,11 +461,11 @@ struct Init_id; { return !operator==(other); } protected: - /// Default contructor. + /// Default constructor. Cell_attribute() {} - /// Contructor with an info in parameter. + /// Constructor with an info in parameter. Cell_attribute(const Info_& ainfo) : Info_for_cell_attribute(ainfo) {} diff --git a/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h b/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h index 768e0b82aeb..7366d118928 100644 --- a/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h +++ b/Combinatorial_map/include/CGAL/Cell_attribute_with_id.h @@ -42,11 +42,11 @@ namespace CGAL { friend class Concurrent_compact_container; protected: - /// Default contructor. + /// Default constructor. Cell_attribute_with_id() {} - /// Contructor with an info in parameter. + /// Constructor with an info in parameter. Cell_attribute_with_id(const Info_& ainfo) : Cell_attribute(ainfo) {} @@ -64,7 +64,7 @@ namespace CGAL { friend class Concurrent_compact_container; protected: - /// Default contructor. + /// Default constructor. Cell_attribute_with_id() {} }; diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index fa13fbe6d6c..b8b801102bf 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -219,7 +219,7 @@ namespace CGAL { * @param dartinfoconverter functor to transform original information of darts into information of copies * @param pointconverter functor to transform points in original map into points of copies. * @param copy_perforated_darts true to copy also darts marked perforated (if any) - * @param mark_perforated_darts true to mark darts wich are copies of perforated darts (if any) + * @param mark_perforated_darts true to mark darts which are copies of perforated darts (if any) * @post *this is valid. */ template ::value> (mattribute_containers).emplace(args...); // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". + // not required except if create_attribute is used as "copy constructor". this->template init_attribute_ref_counting(res); internal::Init_id::type>::run (this->template attributes(), res); @@ -3540,7 +3540,7 @@ namespace CGAL { ::run(*this, map2, current, other); } - // We test if the injection is valid with its neighboors. + // We test if the injection is valid with its neighbours. // We go out as soon as it is not satisfied. for (i=0; match && i<=dimension; ++i) { @@ -3769,7 +3769,7 @@ namespace CGAL { /** Test if a face is a combinatorial polygon of length alg * (a cycle of alg darts beta1 links together). - * @param adart an intial dart + * @param adart an initial dart * @return true iff the face containing adart is a polygon of length alg. */ bool is_face_combinatorial_polygon(Dart_const_descriptor adart, @@ -3855,7 +3855,7 @@ namespace CGAL { } /** Test if a volume is a combinatorial tetrahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial tetrahedron. */ bool is_volume_combinatorial_tetrahedron(Dart_const_descriptor d1) const @@ -3948,7 +3948,7 @@ namespace CGAL { } /** Test if a volume is a combinatorial hexahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial hexahedron. */ bool is_volume_combinatorial_hexahedron(Dart_const_descriptor d1) const @@ -4142,7 +4142,7 @@ namespace CGAL { } /** Insert a vertex in the given 2-cell which is split in triangles, - * once for each inital edge of the facet. + * once for each initial edge of the facet. * @param adart a dart of the facet to triangulate. * @param update_attributes a boolean to update the enabled attributes * (deprecated, now we use are_attributes_automatically_managed()) diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h index d3d11cbdfc7..5cbf7b7861a 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h @@ -41,7 +41,7 @@ namespace internal // **************************************************************************** // Map1 is the existing map, to convert into map2. // Functor called only when both i-attributes have non void info. -// General cases when both info are differents. +// General cases when both info are different. template< typename Map1, typename Map2, unsigned int i, typename Info1=typename Map1::template Attribute_type::type::Info, @@ -439,7 +439,7 @@ struct Default_converter_cmap_attributes }; // **************************************************************************** // Cast converter always copy attributes, doing a cast. This can work only -// if both types are convertible and this is user responsability +// if both types are convertible and this is user responsibility // to use it only in this case. template< typename Map1, typename Map2, unsigned int i> struct Cast_converter_cmap_attributes @@ -480,7 +480,7 @@ struct Default_converter_dart_info }; // **************************************************************************** // Cast converter of dart info. This can work only if both types are -// convertible and this is user responsability to use it only in this case. +// convertible and this is user responsibility to use it only in this case. template< typename Map1, typename Map2> struct Cast_converter_dart_info { diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h index 88594075511..1db4ec2cbda 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_group_functors.h @@ -33,7 +33,7 @@ * Group_attribute_functor to group the -attributes of two * given i-cells (except for j-adim). If one i-attribute is nullptr, we set the * darts of its i-cell to the second attribute. If both i-attributes are - * non nullptr, we overide all the i-attribute of the second i-cell to the + * non nullptr, we override all the i-attribute of the second i-cell to the * first i-attribute. * * Degroup_attribute_functor_run to degroup one i-attributes in two diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h index 5fe14f3217b..3e0b147942c 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h @@ -39,7 +39,7 @@ * valid (all its darts are linked to the same attribute, no other dart is * linked with this attribute). * - * internal::Count_cell_functor to count the nuber of i-cells. + * internal::Count_cell_functor to count the number of i-cells. * * internal::Count_bytes_one_attribute_functor to count the memory * occupied by i-attributes. @@ -66,7 +66,7 @@ * internal::Test_is_same_attribute_functor to test if two * i-attributes of two darts are isomorphic (ie they have the same info). * - * inernal::Test_is_same_attribute_point_functor to test if + * internal::Test_is_same_attribute_point_functor to test if * the point of two i-attributes are equal. * * internal::Reverse_orientation_of_map_functor to reverse the diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h index 542b5ab176a..2a8d24c0123 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h @@ -532,7 +532,7 @@ namespace CGAL struct Attribute_type { typedef Void type; }; - // Helper class allowing to retreive the d-cell-descriptor attribute + // Helper class allowing to retrieve the d-cell-descriptor attribute template::type, typename WithIndex=typename CMap::Use_index> struct Attribute_descriptor @@ -549,7 +549,7 @@ namespace CGAL struct Attribute_descriptor { typedef typename CMap::Dart_index type; }; - // Helper class allowing to retreive the d-cell-const descriptor attribute + // Helper class allowing to retrieve the d-cell-const descriptor attribute template::type> struct Attribute_const_descriptor { @@ -561,7 +561,7 @@ namespace CGAL struct Attribute_const_descriptor { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-iterator attribute + // Helper class allowing to retrieve the d-cell-iterator attribute template::type> struct Attribute_iterator { @@ -573,7 +573,7 @@ namespace CGAL struct Attribute_iterator { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-const descriptor attribute + // Helper class allowing to retrieve the d-cell-const descriptor attribute template::type> struct Attribute_const_iterator { @@ -585,7 +585,7 @@ namespace CGAL struct Attribute_const_iterator { typedef CGAL::Void* type; }; - // Helper class allowing to retreive the d-cell-attribute range + // Helper class allowing to retrieve the d-cell-attribute range template::type> struct Attribute_range { @@ -597,7 +597,7 @@ namespace CGAL struct Attribute_range { typedef CGAL::Void type; }; - // Helper class allowing to retreive the d-cell-attribute const range + // Helper class allowing to retrieve the d-cell-attribute const range template::type> struct Attribute_const_range { diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index eeb2c40b146..0b2c39bc720 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -28,7 +28,7 @@ namespace CGAL { * Basic classes that serve as tools for definition of iterators. There are 3 classes: * - CMap_dart_iterator is the basic generic class defining - * what is an interator on darts. + * what is an iterator on darts. * - CMap_extend_iterator to extend the given iterator by adding * the involution Bi. * - CMap_non_basic_iterator to transform the basic iterator Ite diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h index 31e8cff3946..e691fce122c 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_save_load.h @@ -347,7 +347,7 @@ namespace CGAL { using boost::property_tree::ptree; ptree pt; - // update pt adding nodes containing attributes informations + // update pt adding nodes containing attributes information CMap::Helper::template Foreach_enabled_attributes >::run(const_cast(amap), pt, myDarts); @@ -371,7 +371,7 @@ namespace CGAL { tree.put("data", ""); /** First we save general information of the map (by default nothing, - the fuction can be specialized by users). */ + the function can be specialized by users). */ f(tree); // map dart => number @@ -818,7 +818,7 @@ namespace CGAL { read_xml(input, pt); /** First we load general information of the map (by default nothing, - the fuction can be specialized by users). */ + the function can be specialized by users). */ f(pt); // Then we load darts and attributes. diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 761e9023249..8dca87a9158 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -241,7 +241,7 @@ namespace CGAL { } protected: - /// Neighboors for each dimension +1 (from 0 to dimension). + /// Neighbours for each dimension +1 (from 0 to dimension). Dart_descriptor mf[dimension+1]; /// Values of Boolean marks. diff --git a/Combinatorial_map/include/CGAL/Info_for_cell_attribute.h b/Combinatorial_map/include/CGAL/Info_for_cell_attribute.h index f45b23d76f8..ba13c664c21 100644 --- a/Combinatorial_map/include/CGAL/Info_for_cell_attribute.h +++ b/Combinatorial_map/include/CGAL/Info_for_cell_attribute.h @@ -19,10 +19,10 @@ namespace CGAL { class Info_for_cell_attribute { public: - /// Contructor without parameter. + /// Constructor without parameter. Info_for_cell_attribute()=default; // default => zero-initializing built-in types - /// Contructor with an info in parameter. + /// Constructor with an info in parameter. Info_for_cell_attribute(const Info& ainfo) : minfo(ainfo) {} diff --git a/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h b/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h index b76b5a64208..8f64b7622df 100644 --- a/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h +++ b/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h @@ -139,8 +139,8 @@ public: /* Destructor. * Frees memory used for storing key-value pair, thus invalidating any - * exisitng pointers to any keys and/or values in the tree. During and - * after destruction, neighbour nodes are not guarenteed to be consistent. + * existing pointers to any keys and/or values in the tree. During and + * after destruction, neighbour nodes are not guaranteed to be consistent. * Specifically, the linked list along the leaves of the B+ tree is * invalidated. */ virtual ~_Leaf() { diff --git a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h index 8d6e47a5663..d4b47ed33c2 100644 --- a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h @@ -88,7 +88,7 @@ public: \param k Number of cones to divide space into \param initial_direction A direction denoting one of the rays dividing the - cones. This allows arbitary rotations of the rays that divide + cones. This allows arbitrary rotations of the rays that divide the plane. (default: positive x-axis) \param cones_selected Indicates whether even, odd or all cones are selected to construct graph. diff --git a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h index 61b287f6e29..8f2b599f311 100644 --- a/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_yao_graph_2.h @@ -82,7 +82,7 @@ public: \param k Number of cones to divide space into \param initial_direction A direction denoting one of the rays dividing the - cones. This allows arbitary rotations of the rays that divide + cones. This allows arbitrary rotations of the rays that divide the plane. (default: positive x-axis) \param cones_selected Indicates whether even, odd or all cones are selected to construct graph. diff --git a/Convex_hull_2/doc/Convex_hull_2/CGAL/Convex_hull_traits_adapter_2.h b/Convex_hull_2/doc/Convex_hull_2/CGAL/Convex_hull_traits_adapter_2.h index 41d7ce038fa..051d148e06c 100644 --- a/Convex_hull_2/doc/Convex_hull_2/CGAL/Convex_hull_traits_adapter_2.h +++ b/Convex_hull_2/doc/Convex_hull_2/CGAL/Convex_hull_traits_adapter_2.h @@ -7,7 +7,7 @@ The class `Convex_hull_traits_adapter_2` serves as a traits class for all the tw convex hull and extreme point calculation functions. Given a property map associating a key to a point, the class `Convex_hull_traits_adapter_2` enables -to compute the sequence of keys for which the associted points form a convex hull, +to compute the sequence of keys for which the associated points form a convex hull, performing the predicates of the base traits class on the points associated to the keys. \cgalModels `ConvexHullTraits_2` diff --git a/Convex_hull_2/include/CGAL/convex_hull_constructive_traits_2.h b/Convex_hull_2/include/CGAL/convex_hull_constructive_traits_2.h index 4bc0c269bed..0aea59660de 100644 --- a/Convex_hull_2/include/CGAL/convex_hull_constructive_traits_2.h +++ b/Convex_hull_2/include/CGAL/convex_hull_constructive_traits_2.h @@ -11,7 +11,7 @@ // Author(s) : Stefan Schirra // This file's name must begin with a lower-case letter for backward -// compatability. Unfortunately, you can't have a file that differs only +// compatibility. Unfortunately, you can't have a file that differs only // in capitalization on the Windows platforms. #ifndef CGAL_CONVEX_HULL_CONSTRUCTIVE_TRAITS_2_H @@ -108,7 +108,7 @@ public: { return Equal_2(); } }; -// for backward compatability +// for backward compatibility template class convex_hull_constructive_traits_2 : public Convex_hull_constructive_traits_2 diff --git a/Convex_hull_2/include/CGAL/convex_hull_traits_2.h b/Convex_hull_2/include/CGAL/convex_hull_traits_2.h index 1174d81da74..079d0fe2aad 100644 --- a/Convex_hull_2/include/CGAL/convex_hull_traits_2.h +++ b/Convex_hull_2/include/CGAL/convex_hull_traits_2.h @@ -11,7 +11,7 @@ // Author(s) : Stefan Schirra // This file's name must begin with a lower-case letter for backward -// compatability. Unfortunately, you can't have a file that differs only +// compatibility. Unfortunately, you can't have a file that differs only // in capitalization on the Windows platforms. #ifndef CGAL_CONVEX_HULL_TRAITS_2_H diff --git a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index 92f1b7711ce..2c1bb194951 100644 --- a/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/doc/Convex_hull_3/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -6,7 +6,7 @@ namespace CGAL { \brief computes robustly the intersection of the halfspaces defined by the planes contained in the range [`begin`, `end`) without constructing the dual points. The result is stored in the polyhedron `pm`. If `origin` is given then it must be a point strictly inside the polyhedron. If an interior point is not given then it is computed using the function `halfspace_intersection_interior_point_3()` based on solving a linear program and thus is slower. -This version does not construct the dual points explicitely but uses a special traits class for the function `CGAL::convex_hull_3()` to handle predicates on dual points without constructing them. +This version does not construct the dual points explicitly but uses a special traits class for the function `CGAL::convex_hull_3()` to handle predicates on dual points without constructing them. Halfspaces are considered as lower halfspaces, that is if the plane equation is \f$ a\, x +b\, y +c\, z + d = 0 \f$ then the corresponding halfspace is defined by \f$ a\, x +b\, y +c\, z + d \le 0 \f$ . diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h index a1311e87c5f..16a685e08dd 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h @@ -242,7 +242,7 @@ namespace CGAL // find a point inside the intersection origin = halfspace_intersection_interior_point_3(begin, end); - CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_3: problem when determing a point inside the intersection"); + CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_3: problem when determining a point inside the intersection"); if (origin==boost::none) return; } diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h index 31dcb337b98..4a0b9c26d44 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_with_constructions_3.h @@ -101,7 +101,7 @@ namespace CGAL // find a point inside the intersection origin = halfspace_intersection_interior_point_3(pbegin, pend); - CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_with_constructions_3: problem when determing a point inside the intersection"); + CGAL_assertion_msg(origin!=boost::none, "halfspace_intersection_with_constructions_3: problem when determining a point inside the intersection"); if (origin==boost::none) return; } diff --git a/Convex_hull_d/include/CGAL/Convex_hull_d.h b/Convex_hull_d/include/CGAL/Convex_hull_d.h index e513f8ece4b..d056f150200 100644 --- a/Convex_hull_d/include/CGAL/Convex_hull_d.h +++ b/Convex_hull_d/include/CGAL/Convex_hull_d.h @@ -627,7 +627,7 @@ public: bool is_valid(bool throw_exceptions = false) const; /*{\Mop checks the validity of the data structure. - If |throw_exceptions == thrue| then the program throws + If |throw_exceptions == true| then the program throws the following exceptions to inform about the problem.\\ [[chull_has_center_on_wrong_side_of_hull_facet]] the hyperplane supporting a facet has the wrong orientation.\\ @@ -1304,7 +1304,7 @@ std::list< typename Convex_hull_d::Simplex_handle > Convex_hull_d::facets_visible_from(const Point_d& x) { std::list visible_simplices; - int location = -1; // intialization is important + int location = -1; // initialization is important std::size_t num_of_visited_simplices = 0; // irrelevant Facet_handle f; // irrelevant @@ -1319,7 +1319,7 @@ Bounded_side Convex_hull_d::bounded_side(const Point_d& x) { if ( is_dimension_jump(x) ) return ON_UNBOUNDED_SIDE; std::list visible_simplices; - int location = -1; // intialization is important + int location = -1; // initialization is important std::size_t num_of_visited_simplices = 0; // irrelevant Facet_handle f; diff --git a/Convex_hull_d/include/CGAL/Convex_hull_d_to_polyhedron_3.h b/Convex_hull_d/include/CGAL/Convex_hull_d_to_polyhedron_3.h index 361ba28fd72..e095889758a 100644 --- a/Convex_hull_d/include/CGAL/Convex_hull_d_to_polyhedron_3.h +++ b/Convex_hull_d/include/CGAL/Convex_hull_d_to_polyhedron_3.h @@ -105,7 +105,7 @@ include || template void convex_hull_d_to_polyhedron_3( const Convex_hull_d& C, Polyhedron_3& P) -/*{\Mfunc converts the convex hull |C| to polyedral surface stored in +/*{\Mfunc converts the convex hull |C| to polyhedral surface stored in |P|.\\ \precond |dim == 3| and |dcur == 3|. }*/ { typedef Convex_hull_d ChullType; diff --git a/Convex_hull_d/include/CGAL/Delaunay_d.h b/Convex_hull_d/include/CGAL/Delaunay_d.h index f127a352d4f..6087d65e369 100644 --- a/Convex_hull_d/include/CGAL/Delaunay_d.h +++ b/Convex_hull_d/include/CGAL/Delaunay_d.h @@ -830,7 +830,7 @@ locate(const Point_d& x) const // lift(p) is not a dimension jump std::list candidates; std::size_t dummy1 = 0; - int loc = -1; // intialization is important + int loc = -1; // initialization is important Simplex_handle f; this -> visibility_search(origin_simplex_,lp,candidates,dummy1,loc,f); this -> clear_visited_marks(origin_simplex_); diff --git a/Convex_hull_d/include/CGAL/Regular_complex_d.h b/Convex_hull_d/include/CGAL/Regular_complex_d.h index c5f00745004..47eeb263a45 100644 --- a/Convex_hull_d/include/CGAL/Regular_complex_d.h +++ b/Convex_hull_d/include/CGAL/Regular_complex_d.h @@ -266,7 +266,7 @@ vertices. A $0$-simplex is a point, a $1$-simplex is a line segment, a $2$-simplex is a triangle, a $3$-simplex is a tetrahedron, etc.. \emph{The simplices is a concrete simplicial complex must satisfy the additional conditions that the points associated with the -vertices of any simplex are affinely independet and that the +vertices of any simplex are affinely independent and that the intersection of any two simplices is a face of both.} We will write simplicial complex instead of concrete simplicial complex in the sequel. @@ -298,7 +298,7 @@ the functions |C.simplex(v)| and |C.index(v)| return a pair $(s,i)$ such that |v = C.vertex_of(s,i)|. The class |regl_complex| has a static member |nil_point| of type -|Point_d|. This point is different (= not indentical) from any user +|Point_d|. This point is different (= not identical) from any user defined point and is the point associated with every vertex of an abstract simplicial complex. It simulates the use of |nil| to denote an undefined object. From 40d8e9d7b2aec640d345fa9a92b3f6c694d8d175 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 14 Nov 2022 18:20:23 +0000 Subject: [PATCH 153/426] fix path to demo --- Snap_rounding_2/doc/Snap_rounding_2/Snap_rounding_2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Snap_rounding_2/doc/Snap_rounding_2/Snap_rounding_2.txt b/Snap_rounding_2/doc/Snap_rounding_2/Snap_rounding_2.txt index bffd43ef1dd..41d9f6872e4 100644 --- a/Snap_rounding_2/doc/Snap_rounding_2/Snap_rounding_2.txt +++ b/Snap_rounding_2/doc/Snap_rounding_2/Snap_rounding_2.txt @@ -128,8 +128,7 @@ Polyline number 4: The package is supplied with a graphical demo program that opens a window, allows the user to edit segments dynamically, applies a selected snap-rounding procedures, and displays the result onto the same window -(see `/demo/Snap_rounding_2/demo.cpp`). +(see `/demo/Snap_rounding_2/Snap_rounding_2.cpp`). */ } /* namespace CGAL */ - From 5f6f1e2e8d6543745ff73daa4b5b1df71eef87fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 14 Nov 2022 20:14:55 +0100 Subject: [PATCH 154/426] remove line that seems useless --- .github/install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/install.sh b/.github/install.sh index e06328da401..32b8552aa8f 100755 --- a/.github/install.sh +++ b/.github/install.sh @@ -1,5 +1,4 @@ #!/bin/bash -sudo add-apt-repository ppa:mikhailnov/pulseeffects -y sudo apt-get update sudo apt-get install -y libmpfr-dev \ libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \ From d43269cb4355de08a3c890ed31d141e91ac08cdb Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 15 Nov 2022 11:22:45 +0100 Subject: [PATCH 155/426] Update CHANGES.md --- Installation/CHANGES.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 5ec9848fddb..d639da0e917 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -4,7 +4,7 @@ Release History [Release 5.6](https://github.com/CGAL/cgal/releases/tag/v5.6) ----------- -Release date: December 2022 +Release date: June 2023 ### [Combinatorial Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgCombinatorialMaps) [Generalized Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgGeneralizedMaps) [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) @@ -48,6 +48,10 @@ CGAL tetrahedral Delaunay refinement algorithm. described by the concept `TriangulationDataStructure_2::Face`. The model `CGAL::Hyperbolic_triangulation_face_base_2` has been adapted correspondingly. +### [Surface Mesh Simplification](https://doc.cgal.org/5.6/Manual/packages.html#PkgSurfaceMeshSimplification) +- The stop predicates `Count_stop_predicate` and `Count_ratio_stop_predicate` are renamed to `Edge_count_stop_predicate` and `Edge_count_ratio_stop_predicate`. Older versions have been deprecated. +- Introduce `Face_count_stop_predicate` and `Face_count_ratio_stop_predicate` that can be used to stop the simplification algorithm based on a desired number of faces in the output, or a ratio between input and output face numbers. + [Release 5.5](https://github.com/CGAL/cgal/releases/tag/v5.5) ----------- From 45478184de22d9944557e87c94be81ddea12d0de Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 15 Nov 2022 13:39:40 +0100 Subject: [PATCH 156/426] spelling corrections Some spelling corrections (Directories starting with `E`-` L`), some backward work some forward work --- .../Arrangement_on_surface_2_global.h | 2 +- .../include/CGAL/Arrangement_on_surface_2.h | 2 +- .../include/CGAL/graph_traits_Arrangement_2.h | 4 +- .../CGAL/Circular_kernel_3/Circular_arc_3.h | 2 +- Documentation/doc/biblio/cgal_manual.bib | 2 +- Documentation/doc/biblio/geom.bib | 38 ++++++++--------- Envelope_2/doc/Envelope_2/CGAL/envelope_2.h | 2 +- .../doc/Envelope_2/PackageDescription.txt | 2 +- .../examples/Envelope_2/envelope_segments.cpp | 2 +- .../Env_divide_and_conquer_2_impl.h | 6 +-- .../Envelope_2/test_envelope_segments.cpp | 4 +- .../doc/Envelope_3/PackageDescription.txt | 2 +- Envelope_3/include/CGAL/Env_sphere_traits_3.h | 2 +- .../include/CGAL/Env_surface_data_traits_3.h | 6 +-- .../include/CGAL/Env_triangle_traits_3.h | 10 ++--- .../Envelope_3/Env_plane_traits_3_functions.h | 2 +- .../Envelope_divide_and_conquer_3.h | 14 +++---- .../Envelope_3/Envelope_element_visitor_3.h | 42 +++++++++---------- .../include/CGAL/Envelope_3/set_dividors.h | 2 +- Envelope_3/test/Envelope_3/Envelope_test_3.h | 6 +-- .../Envelope_3/Envelope_triangles_test_3.h | 4 +- Filtered_kernel/TODO | 4 +- .../Static_filters/Static_filter_error.h | 2 +- Filtered_kernel/include/CGAL/Lazy.h | 2 +- Filtered_kernel/include/CGAL/Lazy_kernel.h | 2 +- .../include/CGAL/Robust_construction.h | 2 +- .../doc/Generalized_map/Generalized_map.txt | 2 +- .../gmap_3_dynamic_onmerge.cpp | 2 +- .../include/CGAL/Generalized_map.h | 14 +++---- .../internal/Generalized_map_group_functors.h | 2 +- Generator/include/CGAL/point_generators_2.h | 2 +- .../CGAL/random_convex_hull_in_disc_2.h | 2 +- .../include/CGAL/L1_voronoi_traits_2.h | 2 +- .../doc/GraphicsView/CGAL/Qt/Converter.h | 2 +- GraphicsView/include/CGAL/Buffer_for_vao.h | 8 ++-- .../include/CGAL/Qt/Basic_viewer_qt.h | 2 +- .../CGAL/Qt/GraphicsViewPolylineInput.h | 4 +- GraphicsView/include/CGAL/Qt/camera_impl.h | 2 +- GraphicsView/include/CGAL/Qt/debug_impl.h | 2 +- GraphicsView/include/CGAL/Qt/frame.h | 4 +- GraphicsView/include/CGAL/Qt/frame_impl.h | 8 ++-- .../include/CGAL/Qt/keyFrameInterpolator.h | 2 +- .../CGAL/Qt/keyFrameInterpolator_impl.h | 2 +- .../include/CGAL/Qt/manipulatedCameraFrame.h | 2 +- .../include/CGAL/Qt/manipulatedFrame.h | 2 +- GraphicsView/include/CGAL/Qt/mouseGrabber.h | 2 +- GraphicsView/include/CGAL/Qt/qglviewer.h | 2 +- GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 2 +- GraphicsView/include/CGAL/Qt/quaternion.h | 2 +- GraphicsView/include/CGAL/Qt/vec_impl.h | 2 +- .../include/CGAL/HalfedgeDS_decorator.h | 2 +- .../CGAL/HalfedgeDS_iterator_adaptor.h | 4 +- HalfedgeDS/include/CGAL/HalfedgeDS_vector.h | 4 +- .../CGAL/Homogeneous/function_objects.h | 2 +- ...elaunay_triangulation_traits_2_functions.h | 2 +- .../LargestEmptyIsoRectangleTraits_2.h | 2 +- .../doc/Inscribed_areas/Inscribed_areas.txt | 2 +- .../CGAL/Largest_empty_iso_rectangle_2.h | 6 +-- .../package_info/Inscribed_areas/copyright | 4 +- .../largest_empty_iso_rectangle_2_test.cpp | 2 +- Installation/CHANGES.md | 34 +++++++-------- .../cmake/modules/CGALConfig_binary.cmake.in | 4 +- .../cmake/modules/CGALConfig_install.cmake.in | 4 +- .../cmake/modules/CGAL_CheckCXXFileRuns.cmake | 2 +- .../CGAL_GeneratorSpecificSettings.cmake | 2 +- Installation/cmake/modules/CGAL_Macros.cmake | 14 +++---- .../cmake/modules/CGAL_SetupBoost.cmake | 2 +- .../modules/CGAL_SetupCGALDependencies.cmake | 2 +- .../CGAL_SetupCGAL_CoreDependencies.cmake | 2 +- .../CGAL_SetupCGAL_ImageIODependencies.cmake | 2 +- .../CGAL_SetupCGAL_Qt5Dependencies.cmake | 2 +- .../cmake/modules/CGAL_SetupFlags.cmake | 2 +- .../cmake/modules/CGAL_SetupGMP.cmake | 2 +- .../cmake/modules/CGAL_SetupLEDA.cmake | 2 +- .../cmake/modules/FindSuiteSparse.cmake | 20 ++++----- Installation/cmake/modules/Help/cmake.py | 2 +- Installation/cmake/modules/Help/index.rst | 4 +- .../testfiles/CGAL_CFG_MATCHING_BUG_5.cpp | 2 +- .../disable_deprecation_warnings_and_errors.h | 4 +- .../include/CGAL/auto_link/auto_link.h | 2 +- Installation/include/CGAL/config.h | 2 +- Interpolation/TODO | 2 +- ...s_for_voronoi_intersection_cartesian_2_3.h | 2 +- .../CGAL/natural_neighbor_coordinates_3.h | 4 +- ...s_for_voronoi_intersection_cartesian_2_3.h | 4 +- .../Intersections_2/test_intersections_2.cpp | 6 +-- .../internal/Ray_3_Triangle_3_do_intersect.h | 2 +- .../internal/Ray_3_Triangle_3_intersection.h | 6 +-- .../test_intersections_Plane_3.cpp | 2 +- .../Interval_skip_list/Concepts/Interval.h | 2 +- .../include/CGAL/Interval_traits.h | 2 +- .../include/CGAL/Test/_test_interval_traits.h | 2 +- .../doc/Jet_fitting_3/Jet_fitting_3.txt | 4 +- .../Jet_fitting_3/PolyhedralSurf_operations.h | 2 +- Jet_fitting_3/examples/Jet_fitting_3/README | 4 +- .../Jet_fitting_3/Single_estimation.cpp | 2 +- .../include/CGAL/Monge_via_jet_fitting.h | 4 +- .../test/Jet_fitting_3/blind_1pt.cpp | 2 +- .../CGAL/Circular_kernel_intersections.h | 2 +- .../CGAL/Spherical_kernel_intersections.h | 6 +-- .../doc/Kernel_23/PackageDescription.txt | 2 +- .../include/CGAL/Kernel/interface_macros.h | 2 +- Kernel_23/include/CGAL/Kernel/mpl.h | 2 +- .../internal/Projection_traits_base_3.h | 2 +- .../include/CGAL/_test_cls_point_2.h | 2 +- .../include/CGAL/_test_cls_point_3.h | 2 +- .../include/CGAL/_test_cls_weighted_point_2.h | 2 +- .../include/CGAL/_test_cls_weighted_point_3.h | 2 +- Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h | 6 +-- Kernel_d/include/CGAL/Kernel_d/Line_d.h | 2 +- Kernel_d/include/CGAL/Kernel_d/Ray_d.h | 2 +- Kernel_d/include/CGAL/Kernel_d/Segment_d.h | 2 +- Kernel_d/include/CGAL/Kernel_d/Sphere_d.h | 2 +- .../CGAL/Kernel_d/function_objectsCd.h | 2 +- .../CGAL/Kernel_d/interface_macros_d.h | 2 +- Kernel_d/include/CGAL/Linear_algebraHd.h | 2 +- Kernel_d/include/CGAL/predicates_d.h | 2 +- .../cmake/FindCGAL.cmake | 2 +- .../surface_mesh/Surface_mesh.h | 2 +- .../surface_mesh/Vector.h | 2 +- .../cmake/ACGCommon.cmake | 2 +- Linear_cell_complex/benchmark/README.TXT | 4 +- .../demo/Linear_cell_complex/CMakeLists.txt | 2 +- .../demo/Linear_cell_complex/MainWindow.cpp | 2 +- .../Concepts/CellAttributeWithPoint.h | 6 +-- .../examples/Linear_cell_complex/README.txt | 2 +- .../Linear_cell_complex/basic_viewer.h | 4 +- .../CGAL/CMap_linear_cell_complex_storages.h | 2 +- ..._linear_cell_complex_storages_with_index.h | 2 +- .../CGAL/Cell_attribute_with_point_and_id.h | 10 ++--- .../CGAL/GMap_linear_cell_complex_storages.h | 2 +- ..._linear_cell_complex_storages_with_index.h | 2 +- .../include/CGAL/Linear_cell_complex_base.h | 2 +- .../CGAL/Linear_cell_complex_constructors.h | 2 +- .../include/CGAL/draw_linear_cell_complex.h | 2 +- Mesh_2/include/CGAL/Mesh_2/Clusters.h | 2 +- Mesh_2/include/CGAL/Mesh_2/Refine_faces.h | 2 +- .../Concepts/MeshCriteriaWithFeatures_3.h | 2 +- Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h | 2 +- .../Minkowski_sum_2/Arr_labeled_traits_2.h | 2 +- .../CGAL/Polygon_vertical_decomposition_2.h | 2 +- Nef_3/include/CGAL/Nef_3/Binary_operation.h | 2 +- Nef_3/include/CGAL/Nef_3/Vertex.h | 2 +- Number_types/include/CGAL/MP_Float.h | 2 +- .../test/Number_types/Interval_nt.cpp | 2 +- OpenNL/include/CGAL/OpenNL/linear_solver.h | 4 +- Orthtree/include/CGAL/Orthtree.h | 2 +- .../CGAL/Partition_2/Partition_vertex_map.h | 2 +- .../CGAL/draw_periodic_2_triangulation_2.h | 2 +- .../CGAL/Periodic_3_function_wrapper.h | 2 +- .../include/CGAL/refine_periodic_3_mesh_3.h | 2 +- .../CGAL/_test_cls_periodic_3_alpha_shape_3.h | 2 +- .../include/CGAL/_test_cls_periodic_3_tds_3.h | 2 +- .../scale_estimation_example.cpp | 2 +- .../CGAL/Mesh_3/Poisson_refine_cells_3.h | 2 +- .../CGAL/poisson_refine_triangulation.h | 2 +- Polygon/test/Polygon/PolygonTest.cpp | 2 +- .../Polygon_mesh_processing.txt | 2 +- .../Polygon_mesh_processing/orientation.h | 2 +- .../polygon_mesh_to_polygon_soup.h | 2 +- .../triangulate_faces.h | 2 +- .../Polyhedral_envelope_filter.h | 2 +- .../Polyhedron/Plugins/Mesh_3/Mesh_function.h | 2 +- .../Mesh_3/Optimization_plugin_cgal_code.cpp | 2 +- .../Animate_mesh_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Scene_lcc_item.cpp | 2 +- .../demo/Polyhedron/Scene_spheres_item.h | 2 +- Polyhedron/demo/Polyhedron/Viewer.cpp | 2 +- Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h | 4 +- .../doc/Polytope_distance_d/CGAL/Width_3.h | 2 +- Polytope_distance_d/include/CGAL/Width_3.h | 2 +- Ridges_3/doc/Ridges_3/PackageDescription.txt | 2 +- Ridges_3/doc/Ridges_3/Ridges_3.txt | 2 +- .../CGAL/Mesh_complex_3_in_triangulation_3.h | 6 +-- Segment_Delaunay_graph_2/TODO | 2 +- .../Concepts/SegmentDelaunayGraphTraits_2.h | 2 +- .../is_pullout_direction.h | 4 +- .../pullout_directions.h | 4 +- .../top_edges.h | 4 +- .../is_pullout_direction.h | 4 +- .../Snap_rounding_2/snap_rounding_data.cpp | 4 +- .../Straight_skeleton_cons_ftC2.h | 2 +- .../include/CGAL/IO/OFF/File_header_OFF.h | 6 +-- .../include/CGAL/IO/OFF/File_scanner_OFF.h | 2 +- .../Cactus_deformation_session.cpp | 2 +- .../Cactus_deformation_session_OpenMesh.cpp | 2 +- .../internal/Common.h | 2 +- .../Surface_mesh_topology.txt | 2 +- .../internal/Minimal_quadrangulation.h | 4 +- .../include/CGAL/draw_face_graph_with_paths.h | 2 +- .../CGAL/Surface_mesher/Surface_mesher.h | 2 +- .../CGAL/Surface_sweep_2/Default_subcurve.h | 2 +- .../Surface_sweep_2/No_overlap_subcurve.h | 2 +- .../test/TDS_3/include/CGAL/_test_cls_tds_3.h | 2 +- .../Polyhedron_demo_io_plugin_interface.h | 8 ++-- Three/include/CGAL/Three/Scene_group_item.h | 2 +- Three/include/CGAL/Three/Scene_item.h | 6 +-- Three/include/CGAL/Three/TextRenderer.h | 4 +- .../Concepts/TriangulationDSFace.h | 2 +- .../Concepts/TriangulationDataStructure.h | 6 +-- Triangulation_2/TODO | 2 +- .../Triangulation_2/CGAL/Triangulation_2.h | 2 +- .../Triangulation_2/adding_handles.cpp | 2 +- .../Constrained_Delaunay_triangulation_2.h | 2 +- .../internal/Constraint_hierarchy_2.h | 2 +- .../CGAL/draw_constrained_triangulation_2.h | 2 +- .../include/CGAL/draw_triangulation_2.h | 2 +- .../_test_cls_constrained_triangulation_2.h | 2 +- .../CGAL/_test_cls_regular_triangulation_2.h | 2 +- .../include/CGAL/draw_triangulation_3.h | 2 +- .../CGAL/Delaunay_triangulation_on_sphere_2.h | 4 +- .../Triangulation_on_sphere_2.txt | 2 +- .../Visibility_2/include/CGAL/test_utils.h | 2 +- 213 files changed, 367 insertions(+), 367 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h index 4b65cf0390f..c39c34099a5 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_global.h @@ -1466,7 +1466,7 @@ is_valid(const Arrangement_on_surface_2& arr) //----------------------------------------------------------------------------- // Compute the zone of the given x-monotone curve in the existing arrangement. -// Meaning, it output the arrangment's vertices, edges and faces that the +// Meaning, it output the arrangement's vertices, edges and faces that the // x-monotone curve intersects. template diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index b2106603695..a20f39b50f1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -3026,7 +3026,7 @@ template bool is_valid(const Arrangement_on_surface_2& arr); /*! Compute the zone of the given x-monotone curve in the existing arrangement. - * Meaning, it output the arrangment's vertices, edges and faces that the + * Meaning, it output the arrangement's vertices, edges and faces that the * x-monotone curve intersects. * \param arr The arrangement. * \param c the x-monotone curve that its zone is computed. diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h index 23ba40e5f00..76606679325 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h @@ -37,7 +37,7 @@ namespace boost { /*! \class * Specialization of the BGL graph-traits template, which serves as a (primal) - * adapter for Arrangment_on_surface_2, where the valid arrangement vertices + * adapter for Arrangement_on_surface_2, where the valid arrangement vertices * correspond to graph verices and arrangement halfedges correspond to * arrangement edges. * Note that non-fictitious vertices at infinity are also considered as graph @@ -333,7 +333,7 @@ public: /*! \class * Specialization of the BGL graph-traits template, which serves as a (primal) - * adapter for Arrangment_2, where the arrangement vertices correspond to graph + * adapter for Arrangement_2, where the arrangement vertices correspond to graph * verices and arrangement halfedges correspond to arrangement edges. */ template diff --git a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h index 06f929eecbd..9ef9b35f134 100644 --- a/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h +++ b/Circular_kernel_3/include/CGAL/Circular_kernel_3/Circular_arc_3.h @@ -80,7 +80,7 @@ namespace CGAL { // we can optimize the computations of the sign (for the has_on functor), // by computing the vector s-c and t-s, in order to use them directly on // another compute_sign_of_cross_product function - // we can save time computing the substractions + // we can save time computing the subtractions // the problem is: more memory space is needed _sign_cross_product = CGAL::SphericalFunctors::compute_sign_of_cross_product(s,t,c.center()); diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 1c49fe6ffd2..62f39bd8de2 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -1856,7 +1856,7 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio @article{ cgal:p-plcbd-93 ,author = "B. Piper" ,title = "Properties of Local Coordinates based on Dirichlet - tesselations" + Tessellations" ,journal = "Computing Suppl." ,year = "1993" ,volume = "8" diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index 270f537e139..c37509cf72a 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -230,7 +230,7 @@ @article{am-castd-90 , author = "D. J. Abel and D. M. Mark" , title = "A comparative analysis of some two-dimensional orderings" -, journal = "Intl. J. Geographic Informations Systems" +, journal = "Intl. J. Geographic Information Systems" , volume = 4 , year = 1990 , pages = "21--31" @@ -10917,7 +10917,7 @@ sites with respect to the geodesic metric within a simple $n$-sided polygon." @article{ab-rdt-85 , author = "Peter F. Ash and Ethan D. Bolker" -, title = "Recognizing {Dirichlet} Tesselations" +, title = "Recognizing {Dirichlet} Tessellations" , journal = "Geom. Dedicata" , volume = 19 , year = 1985 @@ -26077,7 +26077,7 @@ present a polynomial-time exact algorithm to solve this problem." @article{b-cdt-81 , author = "A. Bowyer" -, title = "Computing {Dirichlet} tesselations" +, title = "Computing {Dirichlet} Tessellations" , journal = "Comput. J." , volume = 24 , year = 1981 @@ -48682,7 +48682,7 @@ library." @article{dcn-accac-85 , author = "J. A. Dougenik and N. R. Chrisman and D. R. Niemeyer" -, title = "An algorithm to construct continous area cartograms" +, title = "An algorithm to construct continuous area cartograms" , journal = "Professional Geographer" , volume = 37 , year = 1985 @@ -56844,7 +56844,7 @@ points per bucket (on average) is fastest." @article{f-sodt-90 , author = "G. Farin" -, title = "Surfaces over {Dirichlet} tesselations" +, title = "Surfaces over {Dirichlet} Tessellations" , journal = "Comput. Aided Geom. Design" , volume = 7 , year = 1990 @@ -76188,7 +76188,7 @@ processing. Contains C code." @article{hm-mcedr-80 , author = "A. L. Hinde and R. E. Miles" -, title = "{Monte}-{Carlo} Estimates of the Distributions of the Random Polygons of the {Voronoi} Tesselation With Respect to a {Poisson} Process" +, title = "{Monte}-{Carlo} Estimates of the Distributions of the Random Polygons of the {Voronoi} Tessellation With Respect to a {Poisson} Process" , journal = "Journal of Statistics and Computer Simulation" , volume = 10 , year = 1980 @@ -80482,7 +80482,7 @@ fitting method." @inproceedings{ikm-owlac-93 , author = "Christian Icking and Rolf Klein and Lihong Ma" , title = "The Optimal Way for Looking Around a Corner" -, booktitle = "Proc. 4th IEEE--IEE Vehicle Navigation and Informations Systems Conference" +, booktitle = "Proc. 4th IEEE--IEE Vehicle Navigation and Information Systems Conference" , nickname = "VNIS '93" , site = "Ottawa, Canada" , year = 1993 @@ -92210,7 +92210,7 @@ some 2 curves cross exponentially many times." @article{kkbs-p3dpv-92 , author = "S. Kumar and S. K. Kurtz and J. R. Banavar and M. G. Sharma" -, title = "Properties of a 3-Dimensional {Poisson}-{Voronoi} Tesselation: a {Monte}-{Carlo} Study" +, title = "Properties of a 3-Dimensional {Poisson}-{Voronoi} Tessellation: a {Monte}-{Carlo} Study" , journal = "Journal Of Statistical Physics" , volume = 67 , number = "3--4" @@ -102836,7 +102836,7 @@ used in many computational geometry algorithms. Contains C++ code." @incollection{m-rtgh-84 , author = "J. Mecke" -, title = "Random tesselations generated by hyperplanes" +, title = "Random Tessellations generated by hyperplanes" , editor = "R. Ambartzumian and W. Weil" , booktitle = "Stochastic Geometry, Geometric Statistics, Stereology" , publisher = "B. G. Teubner" @@ -122558,7 +122558,7 @@ Previous title: On-Line Navigation Through Regions of Variable @article{rohg-nrgdv-88 , author = "R. Riedinger and P. Oelhafen and M. Habar and H. J. Guntherodt" -, title = "A New Realization of the Global {Delaunay}-{Voronoi} Tesselation in Arbitrary Dimension" +, title = "A New Realization of the Global {Delaunay}-{Voronoi} Tessellation in Arbitrary Dimension" , journal = "Zeitschrift Fur Physikalische Chemie Neue Folge" , volume = 157 , number = "P1" @@ -122569,7 +122569,7 @@ Previous title: On-Line Navigation Through Regions of Variable @article{rohg-advt-88 , author = "R. Riedinger and P. Oelhafen and M. Habar and H. J. Guntherodt" -, title = "About the {Delaunay}-{Voronoi} Tesselation" +, title = "About the {Delaunay}-{Voronoi} Tessellation" , journal = "J. Comput. Phys." , volume = 74 , number = 1 @@ -125934,7 +125934,7 @@ convex hulls." @article{st-pwvt-88 , author = "M. Sakamoto and M. Takagi" -, title = "Patterns of weighted {Voronoi} tesselations" +, title = "Patterns of weighted {Voronoi} Tessellations" , journal = "Science and Form" , volume = 3 , year = 1988 @@ -132348,7 +132348,7 @@ Contains C code." @article{sc-tdfem-85 , author = "D. N. Shenton and Z. J. Cendes" -, title = "Three-Dimensional Finite Element Mesh Generation Using {Delaunay} Tesselation" +, title = "Three-Dimensional Finite Element Mesh Generation Using {Delaunay} Tessellation" , journal = "IEEE Trans. Magn." , volume = "MAG-21" , number = 6 @@ -133265,7 +133265,7 @@ Contains C code." @article{s-vidt-80 , author = "R. Sibson" -, title = "A vector identity for the {Dirichlet} tesselation" +, title = "A vector identity for the {Dirichlet} Tessellation" , journal = "Math. Proc. Camb. Phil. Soc." , volume = 87 , year = 1980 @@ -133301,7 +133301,7 @@ Contains C code." @article{s-dtada-80 , author = "R. Sibson" -, title = "The {Dirichlet} tesselation as an aid in data analysis" +, title = "The {Dirichlet} Tessellation as an aid in data analysis" , journal = "Scand. J. Statist." , volume = 7 , year = 1980 @@ -137630,7 +137630,7 @@ depth." , author = "K. Sugihara" , title = "Algorithms for computing {Voronoi} diagrams" , editor = "A. Okabe and B. Boots and K. Sugihara" -, booktitle = "Spatial Tesselations: Concepts and Applications of Voronoi Diagrams" +, booktitle = "Spatial Tessellations: Concepts and Applications of Voronoi Diagrams" , publisher = "John Wiley \& Sons" , address = "Chichester, UK" , year = 1992 @@ -139848,7 +139848,7 @@ code." @article{too-natdv-83 , author = "M. Tanemura and T. Ogawa and W. Ogita" -, title = "A New Algorithm for Three-Dimensional {Voronoi} Tesselation" +, title = "A New Algorithm for Three-Dimensional {Voronoi} Tessellation" , journal = "J. Comput. Phys." , volume = 51 , year = 1983 @@ -146302,7 +146302,7 @@ multiple two-dimensional obstacles of convex and concave shapes are shown." @article{w-cnddt-81 , author = "D. F. Watson" -, title = "Computing the $n$-Dimensional {Delaunay} Tesselation with Applications to {Voronoi} Polytopes" +, title = "Computing the $n$-Dimensional {Delaunay} Tessellation with Applications to {Voronoi} Polytopes" , journal = "Comput. J." , volume = 24 , number = 2 @@ -148056,7 +148056,7 @@ Contains C code." @techreport{wl-pvatp-82 , author = "H. A. G. Wijshoff and J. van Leeuwen" -, title = "Periodic versus arbitrary tesselations of the plane using polyominos of a single type" +, title = "Periodic versus arbitrary Tessellations of the plane using polyominos of a single type" , type = "Report" , number = "RUU-CS-82-11" , institution = "Dept. Comput. Sci., Utrecht Univ." diff --git a/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h b/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h index 7a07ab96e3b..347374d63e2 100644 --- a/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h +++ b/Envelope_2/doc/Envelope_2/CGAL/envelope_2.h @@ -101,7 +101,7 @@ namespace CGAL { Computes the upper envelope of a set of \f$ x\f$-monotone curves in \f$ \mathbb{R}^2\f$, as given by the range `[begin, end)` with the help -of the arrangement traits object `traits` responsbile for their creation. +of the arrangement traits object `traits` responsible for their creation. Reusing the same traits object improves speed if the traits class caches data. The upper envelope is represented using the output maximization diagram `diag`. diff --git a/Envelope_2/doc/Envelope_2/PackageDescription.txt b/Envelope_2/doc/Envelope_2/PackageDescription.txt index 014370f6e12..28824ca8e7d 100644 --- a/Envelope_2/doc/Envelope_2/PackageDescription.txt +++ b/Envelope_2/doc/Envelope_2/PackageDescription.txt @@ -8,7 +8,7 @@ \cgalPkgPicture{Envelope_2/fig/Envelope_2.png} \cgalPkgSummaryBegin \cgalPkgAuthor{Ron Wein} -\cgalPkgDesc{This package consits of functions that computes the lower (or upper) envelope of a set of arbitrary curves in 2D. The output is represented as an envelope diagram, namely a subdivision of the \f$ x\f$-axis into intervals, such that the identity of the curves that induce the envelope on each interval is unique.} +\cgalPkgDesc{This package consists of functions that computes the lower (or upper) envelope of a set of arbitrary curves in 2D. The output is represented as an envelope diagram, namely a subdivision of the \f$ x\f$-axis into intervals, such that the identity of the curves that induce the envelope on each interval is unique.} \cgalPkgManuals{Chapter_Envelopes_of_Curves_in_2D,PkgEnvelope2Ref} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin diff --git a/Envelope_2/examples/Envelope_2/envelope_segments.cpp b/Envelope_2/examples/Envelope_2/envelope_segments.cpp index e3cd1d9fa99..12fbf25b093 100644 --- a/Envelope_2/examples/Envelope_2/envelope_segments.cpp +++ b/Envelope_2/examples/Envelope_2/envelope_segments.cpp @@ -24,7 +24,7 @@ typedef CGAL::Envelope_diagram_1 Diagram_1; int main () { - // Consrtuct the input segments and label them 'A' ... 'H'. + // Construct the input segments and label them 'A' ... 'H'. std::list segments; segments.push_back (Labeled_segment_2 (Segment_2 (Point_2 (0, 1), diff --git a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h index 0199e58322a..9503e338311 100644 --- a/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h +++ b/Envelope_2/include/CGAL/Envelope_2/Env_divide_and_conquer_2_impl.h @@ -507,7 +507,7 @@ compare_y_at_end(const X_monotone_curve_2& xcv1, if (ps_y1 != ARR_INTERIOR) { if (ps_y2 != ARR_INTERIOR) { - // The curve ends have boundary conditions with oposite signs in y, + // The curve ends have boundary conditions with opposite signs in y, // we readily know their relative position (recall that they do not // instersect). if ((ps_y1 == ARR_BOTTOM_BOUNDARY) && (ps_y2 == ARR_TOP_BOUNDARY)) @@ -678,7 +678,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, break; } - // Create a new vertex in the output diagram that corrsponds to the + // Create a new vertex in the output diagram that corresponds to the // current intersection point. if (is_in_x_range) { CGAL_assertion(current_res != EQUAL); @@ -903,7 +903,7 @@ _merge_two_intervals(Edge_const_handle e1, bool is_leftmost1, // origin_of_v could be EQUAL but the curves do not intersect. // This is because of the fact that v could be the endpoint of the NEXT - // curve (which is lower than the currrent curve. The second diagram, however, + // curve (which is lower than the current curve. The second diagram, however, // has a curve that ends at v. // For example: // First diagram is the segment: [(0, -1), (1, 0)] diff --git a/Envelope_2/test/Envelope_2/test_envelope_segments.cpp b/Envelope_2/test/Envelope_2/test_envelope_segments.cpp index 97cf344f197..f2f43b54ac5 100644 --- a/Envelope_2/test/Envelope_2/test_envelope_segments.cpp +++ b/Envelope_2/test/Envelope_2/test_envelope_segments.cpp @@ -35,7 +35,7 @@ enum Coord_input_format * \param filename The name of the input file. * \param format The coordinate format. * \param segs Output: The segments. - * \return Whether the segments were successfuly read. + * \return Whether the segments were successfully read. */ bool read_segments (const char* filename, Coord_input_format format, @@ -113,7 +113,7 @@ bool find_curve(I begin, I end, const Curve_2& c) * Check the envelope of a given set of segments. * \param segs The segments. * \param diag The diagram. - * \param is_lower Does the diagram reprsent the lower or the upper envelope. + * \param is_lower Does the diagram represent the lower or the upper envelope. * \return Whether the diagram structure is correct. */ bool check_envelope (const Curve_list& segs, diff --git a/Envelope_3/doc/Envelope_3/PackageDescription.txt b/Envelope_3/doc/Envelope_3/PackageDescription.txt index 44979adbf10..df0fb936667 100644 --- a/Envelope_3/doc/Envelope_3/PackageDescription.txt +++ b/Envelope_3/doc/Envelope_3/PackageDescription.txt @@ -8,7 +8,7 @@ \cgalPkgPicture{Envelope_3/fig/Envelope_3.png} \cgalPkgSummaryBegin \cgalPkgAuthors{Dan Halperin, Michal Meyerovitch, Ron Wein, and Baruch Zukerman} -\cgalPkgDesc{This package consits of functions that compute the lower (or upper) envelope of a set of arbitrary surfaces in 3D. The output is represented as an 2D envelope diagram, namely a planar subdivision such that the identity of the surfaces that induce the envelope over each diagram cell is unique.} +\cgalPkgDesc{This package consists of functions that compute the lower (or upper) envelope of a set of arbitrary surfaces in 3D. The output is represented as an 2D envelope diagram, namely a planar subdivision such that the identity of the surfaces that induce the envelope over each diagram cell is unique.} \cgalPkgManuals{Chapter_Envelopes_of_Surfaces_in_3D,PkgEnvelope3Ref} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index 0159d74f030..e36e284367f 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -847,7 +847,7 @@ public: // the curve cv (i.e. lower if computing the lower envelope, or upper if // computing the upper envelope) // precondition: the surfaces are defined above cv - // the choise between s1 and s2 for the envelope is the same + // the choice between s1 and s2 for the envelope is the same // for every point in the infinitesimal region above cv // the surfaces are EQUAL over the curve cv Comparison_result diff --git a/Envelope_3/include/CGAL/Env_surface_data_traits_3.h b/Envelope_3/include/CGAL/Env_surface_data_traits_3.h index d331050fca0..9624b70a79d 100644 --- a/Envelope_3/include/CGAL/Env_surface_data_traits_3.h +++ b/Envelope_3/include/CGAL/Env_surface_data_traits_3.h @@ -48,10 +48,10 @@ public: typedef typename Base_traits_3::Xy_monotone_surface_3 Base_xy_monotone_surface_3; - // Representation of a surface with an addtional data field: + // Representation of a surface with an additional data field: typedef _Curve_data_ex Surface_3; - // Representation of an xy-monotone surface with an addtional data field: + // Representation of an xy-monotone surface with an additional data field: typedef _Curve_data_ex Xy_monotone_surface_3; @@ -70,7 +70,7 @@ public: {} //@} - /// \name Overriden functors. + /// \name Overridden functors. //@{ class Make_xy_monotone_3 diff --git a/Envelope_3/include/CGAL/Env_triangle_traits_3.h b/Envelope_3/include/CGAL/Env_triangle_traits_3.h index e71a9404663..3587d922415 100644 --- a/Envelope_3/include/CGAL/Env_triangle_traits_3.h +++ b/Envelope_3/include/CGAL/Env_triangle_traits_3.h @@ -259,7 +259,7 @@ public: } /*! - * Check if the triangel is vertical. + * Check if the triangle is vertical. */ bool is_vertical() const { @@ -457,7 +457,7 @@ public: // the points should not be collinear CGAL_assertion(s1 != 0); - // should also take care for the original and trasformed direction of + // should also take care for the original and transformed direction of // the segment Sign s2 = CGAL_NTS sign(w3 - w1); Sign s = CGAL_NTS sign(int(s1 * s2)); @@ -756,7 +756,7 @@ public: // upper envelope) // precondition: the surfaces are defined above cv (to the left of cv, // if cv is directed from min point to max point) - // the choise between surf1 and surf2 for the envelope is + // the choice between surf1 and surf2 for the envelope is // the same for every point in the infinitesimal region // above cv // the surfaces are EQUAL over the curve cv @@ -1019,7 +1019,7 @@ public: return b; } - // check whethe two xy-monotone surfaces (3D-triangles or segments) + // check whether two xy-monotone surfaces (3D-triangles or segments) // intersect bool do_intersect(const Xy_monotone_surface_3& s1, const Xy_monotone_surface_3& s2) const @@ -1057,7 +1057,7 @@ public: return Object(); // if intersecting two segment - alculate the intersection - // as in the case of dimention 2 + // as in the case of dimension 2 if (s1.is_segment() && s2.is_segment()) { Object res = intersection_of_segments(s1, s2); diff --git a/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h b/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h index 4e773f323d2..b0facc7bee3 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h +++ b/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h @@ -73,7 +73,7 @@ Object half_plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, if(assign(ray, obj)) return ray_under_linear_constraint(ray, l1, k); - CGAL_error(); // doesnt suppose to reach here + CGAL_error(); // doesn't suppose to reach here return Object(); } diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h index af8315519b3..35b172c6233 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_divide_and_conquer_3.h @@ -183,7 +183,7 @@ public: } // compute the envelope of surfaces in 3D, using the default arbitrary - // dividor + // divider template void construct_lu_envelope(SurfaceIterator begin, SurfaceIterator end, Minimization_diagram_2& result) @@ -193,7 +193,7 @@ public: } - // compute the envelope of surfaces in 3D using the given set dividor + // compute the envelope of surfaces in 3D using the given set divider template void construct_lu_envelope(SurfaceIterator begin, SurfaceIterator end, Minimization_diagram_2& result, @@ -219,7 +219,7 @@ public: } // compute the envelope of xy-monotone surfaces in 3D, - // using the default arbitrary dividor + // using the default arbitrary divider template void construct_envelope_xy_monotone(SurfaceIterator begin, SurfaceIterator end, @@ -230,7 +230,7 @@ public: } // compute the envelope of xy-monotone surfaces in 3D using the given - // set dividor + // set divider template void construct_envelope_xy_monotone(SurfaceIterator begin, SurfaceIterator end, @@ -366,7 +366,7 @@ protected: he->twin()->face()->set_no_data(); } - // init auxiliary data for f and its boundarys. + // init auxiliary data for f and its boundaries. for(Outer_ccb_iterator ocit = f->outer_ccbs_begin(); ocit != f->outer_ccbs_end(); ocit++){ Ccb_halfedge_circulator face_hec = *ocit; @@ -475,7 +475,7 @@ public: { Halfedge_handle hh = ei; // there must be data from at least one map, because all the surfaces - // are continous + // are continuous if (!get_aux_is_set(hh, 0) || !get_aux_is_set(hh, 1)) continue; CGAL_assertion(get_aux_is_set(hh, 0)); @@ -604,7 +604,7 @@ public: if (vh->is_decision_set()) continue; // there must be data from at least one map, because all the surfaces - // are continous + // are continuous CGAL_assertion(get_aux_is_set(vh, 0)); CGAL_assertion(get_aux_is_set(vh, 1)); CGAL_assertion(!aux_has_no_data(vh, 1) || !aux_has_no_data(vh, 0)); diff --git a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h index 147ddaf717b..0376a0c1119 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h +++ b/Envelope_3/include/CGAL/Envelope_3/Envelope_element_visitor_3.h @@ -511,7 +511,7 @@ public: // we should have a list of points where we should split the edge's curve // we then will sort the list, and split the curve - // we should pay a special attension for overlaps, since we can get special + // we should pay a special attention for overlaps, since we can get special // edges // we associate with every point 2 flags: @@ -567,7 +567,7 @@ public: CGAL_assertion(icv != nullptr); // we will add the *icv end points to the split_points, unless - // but we should be carefull with infinite curves. + // but we should be careful with infinite curves. Arr_traits_adaptor_2 tr_adaptor(*m_traits); if (tr_adaptor.parameter_space_in_y_2_object() (*icv, ARR_MIN_END) == ARR_INTERIOR && @@ -825,7 +825,7 @@ protected: // and we compare the surfaces to the left/right of it // otherwise we compare the surfaces over an (arbitrary) edge of the face, // assuming this is the correct answer for the face since the surfaces are - // continous + // continuous // In either case, we try to copy decision from an incident face, is possible // before asking the geometric question Comparison_result resolve_minimal_face(Face_handle face, @@ -1000,7 +1000,7 @@ protected: const Xy_monotone_surface_3&, Arr_all_sides_oblivious_tag) { - CGAL_error(); // doesnt' suppose to reach here at all!!! + CGAL_error(); // doesn't suppose to reach here at all!!! return SMALLER; } @@ -1035,7 +1035,7 @@ protected: bool can_copy_decision_from_face_to_edge(Halfedge_handle h) { // can copy decision from face to its incident edge if the aux - // envelopes are continous over the face and edge + // envelopes are continuous over the face and edge return (h->get_has_equal_aux_data_in_face(0) && h->get_has_equal_aux_data_in_face(1)); } @@ -1043,7 +1043,7 @@ protected: bool can_copy_decision_from_edge_to_vertex(Halfedge_handle h) { // can copy decision from face to its incident edge if the aux - // envelopes are continous over the face and edge + // envelopes are continuous over the face and edge return (h->get_has_equal_aux_data_in_target(0) && h->get_has_equal_aux_data_in_target(1)); } @@ -1113,7 +1113,7 @@ protected: // intersection, there would also be intersection between the surfaces // over the face, and we know now that there isn't. - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the face to the edge, the envelope goes closer), then if the // second map wins on the face, it wins on the edge also else if (!hh->is_decision_set() && @@ -1125,7 +1125,7 @@ protected: hh->twin()->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the face, it wins on the edge also else if (!hh->is_decision_set() && face->get_decision() == DAC_DECISION_FIRST && @@ -1164,7 +1164,7 @@ protected: { vh->set_decision(hh->get_decision()); } - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the edge to the vertex, the envelope goes closer), then if the // second map wins on the edge, it wins on the vertex also else if (hh->get_decision() == DAC_DECISION_SECOND && @@ -1173,7 +1173,7 @@ protected: { vh->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the edge, it wins on the vertex also else if (hh->get_decision() == DAC_DECISION_FIRST && !hh->get_has_equal_aux_data_in_target(0) && @@ -1299,7 +1299,7 @@ protected: res = convert_decision_to_comparison_result(hh->get_decision()); result = true; } - // if the first map is continous, but the second isn't (i.e. when we + // if the first map is continuous, but the second isn't (i.e. when we // move from the edge to the face, the envelope goes farther), then // if the first map wins on the edge, it wins on the face also else if (hh->is_decision_set() && @@ -1310,7 +1310,7 @@ protected: res = convert_decision_to_comparison_result(DAC_DECISION_FIRST); result = true; } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // second map wins on the edge, it wins on the face also else if (hh->is_decision_set() && hh->get_decision() == DAC_DECISION_SECOND && @@ -1342,7 +1342,7 @@ protected: res = convert_decision_to_comparison_result(hh->get_decision()); result = true; } - // if the first map is continous, but the second isn't (i.e. when we + // if the first map is continuous, but the second isn't (i.e. when we // move from the edge to the face, the envelope goes farther), then // if the first map wins on the edge, it wins on the face also else if (hh->is_decision_set() && @@ -1354,7 +1354,7 @@ protected: result = true; } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // second map wins on the edge, it wins on the face also else if (hh->is_decision_set() && hh->get_decision() == DAC_DECISION_SECOND && @@ -1408,7 +1408,7 @@ protected: // can copy the data from the edge, since we already took care of // the vertices of projected intersections edge->source()->set_decision(edge->get_decision()); - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the edge to the vertex, the envelope goes closer), then if the // second map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_SECOND && @@ -1417,7 +1417,7 @@ protected: { edge->source()->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_FIRST && !edge->twin()->get_has_equal_aux_data_in_target(0) && @@ -1432,7 +1432,7 @@ protected: // can copy the data from the edge, since we already took care of // the vertices of projected intersections edge->target()->set_decision(edge->get_decision()); - // if the first map is continous, but the second isn't (i.e. when we move + // if the first map is continuous, but the second isn't (i.e. when we move // from the edge to the vertex, the envelope goes closer), then if the // second map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_SECOND && @@ -1441,7 +1441,7 @@ protected: { edge->target()->set_decision(DAC_DECISION_SECOND); } - // if the second map is continous, but the first isn't, then if the + // if the second map is continuous, but the first isn't, then if the // first map wins on the edge, it wins on the vertex also else if (edge->get_decision() == DAC_DECISION_FIRST && !edge->get_has_equal_aux_data_in_target(0) && @@ -2117,7 +2117,7 @@ protected: // this observer is used in the process of resolving a face - // it listens to what happpens in the copied arrangement, and copies back + // it listens to what happens in the copied arrangement, and copies back // the actions to result arrangements very efficiently class Copy_observer : public Md_observer { @@ -2263,7 +2263,7 @@ protected: virtual void after_create_edge(Halfedge_handle e) { - // a new edge e was created in small_arr, we should create a corresponing + // a new edge e was created in small_arr, we should create a corresponding // edge in big_arr CGAL_assertion(map_vertices.is_defined(create_edge_v1)); CGAL_assertion(map_vertices.is_defined(create_edge_v2)); @@ -3171,7 +3171,7 @@ protected: // for using its methods Self* parent; - // current type of interection curve that is inserted + // current type of intersection curve that is inserted Multiplicity itype; }; diff --git a/Envelope_3/include/CGAL/Envelope_3/set_dividors.h b/Envelope_3/include/CGAL/Envelope_3/set_dividors.h index c55a5e9a114..b5bdd117a26 100644 --- a/Envelope_3/include/CGAL/Envelope_3/set_dividors.h +++ b/Envelope_3/include/CGAL/Envelope_3/set_dividors.h @@ -46,7 +46,7 @@ public: }; //! The last element is stored in the second sequence and all the other (n-1) -// elments are stored in the first sequence. +// elements are stored in the first sequence. class Incremental_dividor { public: diff --git a/Envelope_3/test/Envelope_3/Envelope_test_3.h b/Envelope_3/test/Envelope_3/Envelope_test_3.h index c955dca7507..997c4aced68 100644 --- a/Envelope_3/test/Envelope_3/Envelope_test_3.h +++ b/Envelope_3/test/Envelope_3/Envelope_test_3.h @@ -34,7 +34,7 @@ // of general surfaces in 3d, used for testing. // The algorithm projects the surfaces on the plane, and projects all the intersections // between surfaces, to get an arrangement that is a partition of the real envelope. -// Then it computes for each part in the arragement the surfaces on the envelope over it +// Then it computes for each part in the arrangement the surfaces on the envelope over it // by comparing them all. namespace CGAL { @@ -214,7 +214,7 @@ public: for(; hi != result.halfedges_end(); ++hi, ++hi) { Halfedge_handle hh = hi; - // first we find the surfaces that are defined over the egde + // first we find the surfaces that are defined over the edge std::list defined_surfaces; for(std::size_t i=0; i defined_surfaces; for(std::size_t i=0; i(e) could be evaluated in any order, but // that's ok, "forward" itself does not modify e, it may only mark it as - // modifyable by the outer call, which is obviously sequenced after the inner + // modifiable by the outer call, which is obviously sequenced after the inner // call E2A()(e). template Lazy_rep_0(E&& e) diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index c88f93e3acf..08a6ebb41a0 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -89,7 +89,7 @@ protected: // Exact_kernel = exact kernel that will be made lazy // Kernel = lazy kernel -// the Generic base simplies applies the generic magic functor stupidly. +// the Generic base simply applies the generic magic functor stupidly. // then the real base fixes up a few special cases. template < typename EK_, typename AK_, typename E2A_, typename Kernel_ > class Lazy_kernel_generic_base : protected internal::Enum_holder diff --git a/Filtered_kernel/include/CGAL/Robust_construction.h b/Filtered_kernel/include/CGAL/Robust_construction.h index 78f707dbed4..4ad28f9f6c2 100644 --- a/Filtered_kernel/include/CGAL/Robust_construction.h +++ b/Filtered_kernel/include/CGAL/Robust_construction.h @@ -16,7 +16,7 @@ namespace CGAL { -// This template class is a functor adaptor targetting geometric constructions. +// This template class is a functor adaptor targeting geometric constructions. // // They are "robust" in the following sense : the input and output are // approximate (doubles), but the internal computation tries to guarantees the diff --git a/Generalized_map/doc/Generalized_map/Generalized_map.txt b/Generalized_map/doc/Generalized_map/Generalized_map.txt index 09ad37a4946..2d6ad5b52ba 100644 --- a/Generalized_map/doc/Generalized_map/Generalized_map.txt +++ b/Generalized_map/doc/Generalized_map/Generalized_map.txt @@ -117,7 +117,7 @@ To answer this need, a generalized map allows to create attributes which
  • an i-cell may have no associated i-attribute. -Since i-cells are not explicitely represented in generalized maps, the association between i-cells and i-attributes is transferred to darts: if attribute a is associated to i-cell c, all the darts belonging to c are associated to a. +Since i-cells are not explicitly represented in generalized maps, the association between i-cells and i-attributes is transferred to darts: if attribute a is associated to i-cell c, all the darts belonging to c are associated to a. We can see two examples of generalized maps having some attributes in \cgalFigureRef{fig_gmap_with_attribs}. In the first example (Left), a 2D generalized map has 1-attributes containing a float, for example corresponding to the length of the associated 1-cell, and 2-attributes containing a color in RGB format. In the second example (Right), a 3D generalized map has 2-attributes containing a color in RGB format. diff --git a/Generalized_map/examples/Generalized_map/gmap_3_dynamic_onmerge.cpp b/Generalized_map/examples/Generalized_map/gmap_3_dynamic_onmerge.cpp index 48651e5ef92..4c8717af339 100644 --- a/Generalized_map/examples/Generalized_map/gmap_3_dynamic_onmerge.cpp +++ b/Generalized_map/examples/Generalized_map/gmap_3_dynamic_onmerge.cpp @@ -40,7 +40,7 @@ struct Split_functor // operator() automatically called after a split. void operator()(Face_attribute& ca1, Face_attribute& ca2) { - // We need to reinitalize the weight of the two faces + // We need to reinitialize the weight of the two faces GMap_3::size_type nb1=mmap.darts_of_cell<2>(ca1.dart()).size(); GMap_3::size_type nb2=mmap.darts_of_cell<2>(ca2.dart()).size(); mmap.info<2>(ca1.dart())*=(double(nb1)/(nb1+nb2)); diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index 6aa6b56045e..2dee9593c5c 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -193,7 +193,7 @@ namespace CGAL { * @param dartinfoconverter functor to transform original information of darts into information of copies * @param pointconverter functor to transform points in original map into points of copies. * @param copy_perforated_darts true to copy also darts marked perforated (if any) - * @param mark_perforated_darts true to mark darts wich are copies of perforated darts (if any) + * @param mark_perforated_darts true to mark darts which are copies of perforated darts (if any) * @post *this is valid. */ template ::value> (mattribute_containers).emplace(args...); // Reinitialize the ref counting of the new attribute. This is normally - // not required except if create_attribute is used as "copy contructor". + // not required except if create_attribute is used as "copy constructor". this->template init_attribute_ref_counting(res); internal::Init_id::type>::run (this->template attributes(), res); @@ -2632,7 +2632,7 @@ namespace CGAL { ::run(*this, map2, current, other); } - // We test if the injection is valid with its neighboors. + // We test if the injection is valid with its neighbours. // We go out as soon as it is not satisfied. for (i = 0; match && i <= dimension; ++i) { @@ -3021,7 +3021,7 @@ namespace CGAL { /** Test if a face is a combinatorial polygon of length alg * (a cycle of alg edges alpha1 links together). - * @param adart an intial dart + * @param adart an initial dart * @return true iff the face containing adart is a polygon of length alg. */ bool is_face_combinatorial_polygon(Dart_const_descriptor adart, @@ -3115,7 +3115,7 @@ namespace CGAL { } /** Test if a volume is a combinatorial tetrahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial tetrahedron. */ bool is_volume_combinatorial_tetrahedron(Dart_const_descriptor d1) const @@ -3192,7 +3192,7 @@ namespace CGAL { } /** Test if a volume is a combinatorial hexahedron. - * @param adart an intial dart + * @param adart an initial dart * @return true iff the volume containing adart is a combinatorial hexahedron. */ bool is_volume_combinatorial_hexahedron(Dart_const_descriptor d1) const @@ -3385,7 +3385,7 @@ namespace CGAL { } /** Insert a vertex in the given 2-cell which is split in triangles, - * once for each inital edge of the facet. + * once for each initial edge of the facet. * @param adart a dart of the facet to triangulate. * @return A dart incident to the new vertex. */ diff --git a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h index 950a723bf21..cbde9898096 100644 --- a/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h +++ b/Generalized_map/include/CGAL/Generalized_map/internal/Generalized_map_group_functors.h @@ -34,7 +34,7 @@ * GMap_group_attribute_functor to group the -attributes of two * given i-cells (except for j-adim). If one i-attribute is nullptr, we set the * darts of its i-cell to the second attribute. If both i-attributes are - * non nullptr, we overide all the i-attribute of the second i-cell to the + * non nullptr, we override all the i-attribute of the second i-cell to the * first i-attribute. * * GMap_degroup_attribute_functor_run to degroup one i-attributes in two diff --git a/Generator/include/CGAL/point_generators_2.h b/Generator/include/CGAL/point_generators_2.h index ea08ed3170b..1eca3250632 100644 --- a/Generator/include/CGAL/point_generators_2.h +++ b/Generator/include/CGAL/point_generators_2.h @@ -658,7 +658,7 @@ struct Address_of { } }; -}//namesapce internal +}//namespace internal template ::Kernel::Triangle_2, diff --git a/Generator/include/CGAL/random_convex_hull_in_disc_2.h b/Generator/include/CGAL/random_convex_hull_in_disc_2.h index 5c124db0a8f..8aa000cd2d3 100644 --- a/Generator/include/CGAL/random_convex_hull_in_disc_2.h +++ b/Generator/include/CGAL/random_convex_hull_in_disc_2.h @@ -221,7 +221,7 @@ void random_convex_hull_in_disc_2(std::size_t n, double radius, std::list > bin(gen, dbin); - // How many points are falling in the small disc and wont be generated: + // How many points are falling in the small disc and won't be generated: long k_disc = bin(); simulated_points += k_disc; diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h index 7b23ba84ef7..93fc1a36525 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h @@ -59,7 +59,7 @@ public: // Returns the midpoint (under the L1 metric) that is on the rectangle // defined by the two points (the rectangle can be degenerate). - // As there are to enpoints, the index determines which is returned + // As there are to endpoints, the index determines which is returned static Point_2 midpoint(const Point_2& p1, const Point_2& p2, std::size_t index) { const Point_2 *pp1; const Point_2 *pp2; diff --git a/GraphicsView/doc/GraphicsView/CGAL/Qt/Converter.h b/GraphicsView/doc/GraphicsView/CGAL/Qt/Converter.h index 67f8c7982c3..874ab14b88a 100644 --- a/GraphicsView/doc/GraphicsView/CGAL/Qt/Converter.h +++ b/GraphicsView/doc/GraphicsView/CGAL/Qt/Converter.h @@ -8,7 +8,7 @@ objects in Qt, and the other way round. Note that some objects have no eq For example the `CGAL::Circle_2` cannot be converted to something in Qt, and the unbounded objects `CGAL::Ray_2` and `CGAL::Line_2` are clipped. Note also that \cgal and Qt sometimes also use the same word for different things. -For example line denotes an unbounded line in \cgal, wheras it denotes a bounded +For example line denotes an unbounded line in \cgal, whereas it denotes a bounded segment in Qt. \tparam K must be a model of `Kernel`. diff --git a/GraphicsView/include/CGAL/Buffer_for_vao.h b/GraphicsView/include/CGAL/Buffer_for_vao.h index 882bf7c98d7..fddd4a663ff 100644 --- a/GraphicsView/include/CGAL/Buffer_for_vao.h +++ b/GraphicsView/include/CGAL/Buffer_for_vao.h @@ -106,7 +106,7 @@ namespace internal } }; - // Specialization when K==Local_kernel, because there is no need of convertion here. + // Specialization when K==Local_kernel, because there is no need of conversion here. template struct Geom_utils { @@ -577,7 +577,7 @@ protected: add_gouraud_normal(m_vertex_normals_for_face[i]); } else - { // Here user does not provide all vertex normals: we use face normal istead + { // Here user does not provide all vertex normals: we use face normal instead // and thus we will not be able to use Gouraud add_gouraud_normal(normal); } @@ -703,7 +703,7 @@ protected: else { ++(edges[p1][p2]); } } - // (1) We insert all the edges as contraint in the CDT. + // (1) We insert all the edges as constraint in the CDT. typename CDT::Vertex_handle previous=nullptr, first=nullptr; for (unsigned int i=0; iconstrainedFrame, constrainedCamera and Derived classes The ManipulatedFrame class inherits Frame and implements a mouse motion - convertion, so that a Frame (and hence an object) can be manipulated in the + conversion, so that a Frame (and hence an object) can be manipulated in the scene with the mouse. \nosubgrouping */ diff --git a/GraphicsView/include/CGAL/Qt/frame_impl.h b/GraphicsView/include/CGAL/Qt/frame_impl.h index bb8089dc65c..491f37476c9 100644 --- a/GraphicsView/include/CGAL/Qt/frame_impl.h +++ b/GraphicsView/include/CGAL/Qt/frame_impl.h @@ -717,7 +717,7 @@ bool Frame::settingAsReferenceFrameWillCreateALoop(const Frame *const frame) { /*! Returns the Frame coordinates of a point \p src defined in the world coordinate system (converts from world to Frame). - inverseCoordinatesOf() performs the inverse convertion. transformOf() converts + inverseCoordinatesOf() performs the inverse conversion. transformOf() converts 3D vectors instead of 3D coordinates. See the frameTransform example @@ -733,7 +733,7 @@ Vec Frame::coordinatesOf(const Vec &src) const { /*! Returns the world coordinates of the point whose position in the Frame coordinate system is \p src (converts from Frame to world). - coordinatesOf() performs the inverse convertion. Use inverseTransformOf() to + coordinatesOf() performs the inverse conversion. Use inverseTransformOf() to transform 3D vectors instead of 3D coordinates. */ CGAL_INLINE_FUNCTION Vec Frame::inverseCoordinatesOf(const Vec &src) const { @@ -749,7 +749,7 @@ Vec Frame::inverseCoordinatesOf(const Vec &src) const { /*! Returns the Frame coordinates of a point \p src defined in the referenceFrame() coordinate system (converts from referenceFrame() to Frame). - localInverseCoordinatesOf() performs the inverse convertion. See also + localInverseCoordinatesOf() performs the inverse conversion. See also localTransformOf(). */ CGAL_INLINE_FUNCTION Vec Frame::localCoordinatesOf(const Vec &src) const { @@ -759,7 +759,7 @@ Vec Frame::localCoordinatesOf(const Vec &src) const { /*! Returns the referenceFrame() coordinates of a point \p src defined in the Frame coordinate system (converts from Frame to referenceFrame()). - localCoordinatesOf() performs the inverse convertion. See also + localCoordinatesOf() performs the inverse conversion. See also localInverseTransformOf(). */ CGAL_INLINE_FUNCTION Vec Frame::localInverseCoordinatesOf(const Vec &src) const { diff --git a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h index 30b87fe0507..16f53e3c99a 100644 --- a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h +++ b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator.h @@ -290,7 +290,7 @@ private Q_SLOTS: } private: - // Copy constructor and opertor= are declared private and undefined + // Copy constructor and operator= are declared private and undefined // Prevents everyone from trying to use them // KeyFrameInterpolator(const KeyFrameInterpolator& kfi); // KeyFrameInterpolator& operator=(const KeyFrameInterpolator& kfi); diff --git a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h index eed29d31c14..bb6222e0ddc 100644 --- a/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h +++ b/GraphicsView/include/CGAL/Qt/keyFrameInterpolator_impl.h @@ -355,7 +355,7 @@ void KeyFrameInterpolator::updateCurrentKeyFrameForTime(qreal time) { // TODO: Special case for loops when closed path is implemented !! if (!currentFrameValid_) - // Recompute everything from scrach + // Recompute everything from scratch currentFrame_[1]->toFront(); while (currentFrame_[1]->peekNext()->time() > time) { diff --git a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h index 4b9a7b6c563..a838b677761 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedCameraFrame.h @@ -174,7 +174,7 @@ public: Default value is (0,1,0), but it is updated by the Camera when this object is set as its Camera::frame(). Camera::setOrientation() and - Camera::setUpVector()) direclty modify this value and should be used instead. + Camera::setUpVector()) directly modify this value and should be used instead. */ Vec sceneUpVector() const { return sceneUpVector_; } diff --git a/GraphicsView/include/CGAL/Qt/manipulatedFrame.h b/GraphicsView/include/CGAL/Qt/manipulatedFrame.h index 88566c14097..b763a646580 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedFrame.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedFrame.h @@ -308,7 +308,7 @@ protected: const Camera *const camera); MouseAction action_; - Constraint *previousConstraint_; // When manipulation is without Contraint. + Constraint *previousConstraint_; // When manipulation is without Constraint. virtual void startAction( int ma, diff --git a/GraphicsView/include/CGAL/Qt/mouseGrabber.h b/GraphicsView/include/CGAL/Qt/mouseGrabber.h index c4cd90e0f4d..0493090aa02 100644 --- a/GraphicsView/include/CGAL/Qt/mouseGrabber.h +++ b/GraphicsView/include/CGAL/Qt/mouseGrabber.h @@ -269,7 +269,7 @@ protected: //@} private: - // Copy constructor and opertor= are declared private and undefined + // Copy constructor and operator= are declared private and undefined // Prevents everyone from trying to use them MouseGrabber(const MouseGrabber &); MouseGrabber &operator=(const MouseGrabber &); diff --git a/GraphicsView/include/CGAL/Qt/qglviewer.h b/GraphicsView/include/CGAL/Qt/qglviewer.h index 0599baf55d8..16fd9b123eb 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer.h @@ -385,7 +385,7 @@ public: * of the world and the origin of the scene. It is relevant when the whole scene is translated * of a big number, because there is a useless loss of precision when drawing. * - * The offset must be added to the drawn coordinates, and substracted from the computation + * The offset must be added to the drawn coordinates, and subtracted from the computation * \attention the result of pointUnderPixel is the real item translated by the offset. * */ diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 7b88310b16d..0950301c127 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -3370,7 +3370,7 @@ void CGAL::QGLViewer::copyBufferToTexture(GLint , GLenum ) { Use glBindTexture() to use this texture. Note that this is already done by copyBufferToTexture(). -Returns \c 0 is copyBufferToTexture() was never called or if the texure was +Returns \c 0 is copyBufferToTexture() was never called or if the texture was deleted using glDeleteTextures() since then. */ CGAL_INLINE_FUNCTION GLuint CGAL::QGLViewer::bufferTextureId() const { diff --git a/GraphicsView/include/CGAL/Qt/quaternion.h b/GraphicsView/include/CGAL/Qt/quaternion.h index 5322db4bea9..493e5e4af04 100644 --- a/GraphicsView/include/CGAL/Qt/quaternion.h +++ b/GraphicsView/include/CGAL/Qt/quaternion.h @@ -36,7 +36,7 @@ namespace qglviewer { You can apply the Quaternion \c q rotation to the OpenGL matrices using: \code glMultMatrixd(q.matrix()); - // equvalent to glRotate(q.angle()*180.0/M_PI, q.axis().x, q.axis().y, + // equivalent to glRotate(q.angle()*180.0/M_PI, q.axis().x, q.axis().y, q.axis().z); \endcode Quaternion is part of the \c qglviewer namespace, specify \c diff --git a/GraphicsView/include/CGAL/Qt/vec_impl.h b/GraphicsView/include/CGAL/Qt/vec_impl.h index 4ab54771d68..1f8e98db557 100644 --- a/GraphicsView/include/CGAL/Qt/vec_impl.h +++ b/GraphicsView/include/CGAL/Qt/vec_impl.h @@ -59,7 +59,7 @@ void Vec::projectOnPlane(const Vec &normal) { /*! Returns a Vec orthogonal to the Vec. Its norm() depends on the Vec, but is zero only for a null Vec. Note that the function that associates an - orthogonalVec() to a Vec is not continous. */ + orthogonalVec() to a Vec is not continuous. */ CGAL_INLINE_FUNCTION Vec Vec::orthogonalVec() const { // Find smallest component. Keep equal case for null values. diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_decorator.h b/HalfedgeDS/include/CGAL/HalfedgeDS_decorator.h index e65eb447e2e..525e47c167a 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_decorator.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_decorator.h @@ -427,7 +427,7 @@ public: insert_tip( inew->opposite(), hnew); insert_tip( jnew->opposite(), inew); insert_tip( hnew->opposite(), jnew); - // Make the new incidences with the old stucture. + // Make the new incidences with the old structure. CGAL_assertion_code( std::size_t termination_count = 0;) if ( h->next() != i) { Halfedge_handle g = h->next(); diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_iterator_adaptor.h b/HalfedgeDS/include/CGAL/HalfedgeDS_iterator_adaptor.h index 27a244afaf8..cf2c1e6d082 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_iterator_adaptor.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_iterator_adaptor.h @@ -33,7 +33,7 @@ namespace CGAL { // Instead, we rely now on a static local variable. Static variables are // first of all zero-initialized (Section 3.6.2), which guarantees that -// pointers and such are set to zero even if the construtor does not +// pointers and such are set to zero even if the constructor does not // initialize them (Section 8.5). With static variables, the order of // initialization could be critical, if the initialization of one // requires another one to be initialized already (I have not seen such a @@ -48,7 +48,7 @@ namespace CGAL { // for weird static initialization situations. Usually the std::vector // class uses a plain C-pointer as iterator, which would be a POD and // thus efficient. However, the std::list iterators might not be POD's if -// they define their own copy contructor. This is the case for +// they define their own copy constructor. This is the case for // std::list::iterator of the current SGI STL, but not for the // std::list::const_iterator, which is a funny side-effect of having // only a single class for both and a constructor that allows iterator to diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h b/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h index 5df62e4138c..f13214b9bf9 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h @@ -547,7 +547,7 @@ public: -- --rr; Hiterator rrhv = hvector.end(); -- --rrhv; - // The comments proove the invariant of the partitioning step. + // The comments prove the invariant of the partitioning step. // Note that + 1 or - 1 denotes plus one edge or minus one edge, // so they mean actually + 2 and - 2. // Pivot is in *ll @@ -617,7 +617,7 @@ public: CGAL_assertion( llhv >= rrhv); // rr + 1 >= ll >= rr // Elements in [rr+1..end) >= pivot - // Elemente in [begin..ll) < pivot + // Elements in [begin..ll) < pivot // Pivot is in a[ll] if ( ll == rr) { // Check for the possibly missed swap. diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index b7950205627..3028950d7af 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -30,7 +30,7 @@ namespace HomogeneousKernelFunctors { using namespace CommonKernelFunctors; - // For lazyness... + // For laziness... using CartesianKernelFunctors::Are_parallel_2; using CartesianKernelFunctors::Are_parallel_3; using CartesianKernelFunctors::Compute_squared_area_3; diff --git a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h index 4dbeb2bb382..16e863753e2 100644 --- a/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h +++ b/Hyperbolic_triangulation_2/include/CGAL/Hyperbolic_triangulation_2/internal/Hyperbolic_Delaunay_triangulation_traits_2_functions.h @@ -46,7 +46,7 @@ public: // TODO MT improve - // The cirle belongs to the pencil with limit points p and q + // The circle belongs to the pencil with limit points p and q // p, q are zero-circles // (x, y, xˆ2 + yˆ2 - rˆ2) = alpha*(xp, yp, xpˆ2 + ypˆ2) + (1-alpha)*(xq, yq, xqˆ2 + yqˆ2) // xˆ2 + yˆ2 - rˆ2 = 1 (= radius of the Poincare disc) diff --git a/Inscribed_areas/doc/Inscribed_areas/Concepts/LargestEmptyIsoRectangleTraits_2.h b/Inscribed_areas/doc/Inscribed_areas/Concepts/LargestEmptyIsoRectangleTraits_2.h index 03bf8050d88..2875e0a1aba 100644 --- a/Inscribed_areas/doc/Inscribed_areas/Concepts/LargestEmptyIsoRectangleTraits_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/Concepts/LargestEmptyIsoRectangleTraits_2.h @@ -76,7 +76,7 @@ typedef unspecified_type Less_y_2; /// @} /// \name Creation -/// Only a default constructor, copy constructor and an assignement +/// Only a default constructor, copy constructor and an assignment /// operator are required. Note that further constructors can be /// provided. /// @{ diff --git a/Inscribed_areas/doc/Inscribed_areas/Inscribed_areas.txt b/Inscribed_areas/doc/Inscribed_areas/Inscribed_areas.txt index 24e6adfefb8..02287d7c86c 100644 --- a/Inscribed_areas/doc/Inscribed_areas/Inscribed_areas.txt +++ b/Inscribed_areas/doc/Inscribed_areas/Inscribed_areas.txt @@ -36,7 +36,7 @@ return to the departure airfield. To score simply based on the total distance flown is not a good measure, since circling in thermals allows to increase it easily. -\section Inscribed_areasLargest Largest Empty Rectange +\section Inscribed_areasLargest Largest Empty Rectangle We further provide an algorithm for computing the maximal area inscribed axis parallel rectangle for a point set. diff --git a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h index 382c80e2c0b..95391cd85a5 100644 --- a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -265,8 +265,8 @@ public: std::set *right_tent; std::set *left_tent; - /* detemine whether the point is a bounding box corner - (thus not implicitely inserted as a point, or not. + /* determine whether the point is a bounding box corner + (thus not implicitly inserted as a point, or not). */ Point_type type; @@ -893,7 +893,7 @@ Largest_empty_iso_rectangle_2::phase_1_on_x() } // traverse over all possibilities for finding a larger empty rectangle - // rectangles here touch the top and the buttom of the bounding box + // rectangles here touch the top and the bottom of the bounding box while(iter != last_iter) { // filter false points if((*iter)->type != TOP_RIGHT && (*iter)->type != TOP_LEFT) { diff --git a/Inscribed_areas/package_info/Inscribed_areas/copyright b/Inscribed_areas/package_info/Inscribed_areas/copyright index d9d6b7079ec..5279d6171cb 100644 --- a/Inscribed_areas/package_info/Inscribed_areas/copyright +++ b/Inscribed_areas/package_info/Inscribed_areas/copyright @@ -1,4 +1,4 @@ -Largest Emtpy Rectangle 2: +Largest Empty Rectangle 2: Tel-Aviv University (Israel). Extremal Polygon 2: - ETH Zurich (Switzerland). \ No newline at end of file + ETH Zurich (Switzerland). diff --git a/Inscribed_areas/test/Inscribed_areas/largest_empty_iso_rectangle_2_test.cpp b/Inscribed_areas/test/Inscribed_areas/largest_empty_iso_rectangle_2_test.cpp index bfab38c8105..cbae60fdb89 100644 --- a/Inscribed_areas/test/Inscribed_areas/largest_empty_iso_rectangle_2_test.cpp +++ b/Inscribed_areas/test/Inscribed_areas/largest_empty_iso_rectangle_2_test.cpp @@ -202,7 +202,7 @@ int test(std::ifstream& is_ptr, const std::string& expected) empty_rectangle1.get_left_bottom_right_top(); output << "test left_bottom_right_top is " << q.first << ", " << q.second << ", " << q.third << ", " << q.fourth << std::endl; - // comapre output with expected + // compare output with expected std::string outputstring = output.str(); std::cout << outputstring << std::endl; diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 6f0523005e2..8b1050a721a 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -382,7 +382,7 @@ can be used to find out which CGAL data structures can be used given a specific ### [Surface Mesh Topology](https://doc.cgal.org/5.3/Manual/packages.html#PkgSurfaceMeshTopologySummary) - Added the function [`CGAL::Surface_mesh_topology::Curves_on_surface_topology::is_homotopic_to_simple_cycle()`](https://doc.cgal.org/5.3/Surface_mesh_topology/classCGAL_1_1Surface__mesh__topology_1_1Curves__on__surface__topology.html#a8d7c4cba2cf2cff542f5cd93117233db), - which can be used to determine whehter a closed path on a surface mesh can be continously + which can be used to determine whether a closed path on a surface mesh can be continuously transformed to a cycle without self intersection. ### [Surface Mesh Simplification](https://doc.cgal.org/5.3/Manual/packages.html#PkgSurfaceMeshSimplification) @@ -749,7 +749,7 @@ Release date: September 2020 the intersection of two constraint segments in a 'T'-like junction is an existing point and as such does not require any new construction). The former tag, `CGAL::No_constraint_intersection_tag`, does not allow any intersection, except for the configuration of two constraints having a single - common endpoints, for convience. + common endpoints, for convenience. - Added the function [`CGAL::split_subconstraint_graph_into_constraints()`](https://doc.cgal.org/5.1/Triangulation_2/classCGAL_1_1Constrained__triangulation__plus__2.html#adea77f5db5cd4dfae302e4502f1caa85) to [`Constrained_triangulation_plus_2`](https://doc.cgal.org/5.1/Triangulation_2/classCGAL_1_1Constrained__triangulation__plus__2.html) to initialize the constraints from a soup of disconnected segments that should first be split into polylines. @@ -894,7 +894,7 @@ Release date: November 2019 - **Breaking change**: The [graph traits](https://doc.cgal.org/5.0/BGL/group__PkgBGLTraits.html) enabling CGAL's 2D triangulations to be used as a parameter for any graph-based algorithm of CGAL (or boost) have been improved to fully model the [`FaceGraph`](https://doc.cgal.org/5.0/BGL/classFaceGraph.html) concept. In addition, only the finite simplicies (those not incident to the infinite vertex) of the 2D triangulations - are now visibile through this scope. The complete triangulation can still be accessed as a graph, + are now visible through this scope. The complete triangulation can still be accessed as a graph, by using the graph traits of the underlying triangulation data structure (usually, [`CGAL::Triangulation_data_structure_2`](https://doc.cgal.org/5.0/TDS_2/classCGAL_1_1Triangulation__data__structure__2.html)). - **Breaking change**: The `insert()` function @@ -2402,7 +2402,7 @@ Release date: October 2015 method, a variant of the method described in "2D Minkowski Sum of Polygons Using Reduced Convolution" by Behar and Lien. The new method supports polygons with holes and in many cases out - pergorms the implementation of the exsisting (full) convolution + performs the implementation of the existing (full) convolution method. - Introduced two new classes that decompose polygons into convex pieces (models of the `PolygonConvexDecomposition_2` concept) @@ -2422,7 +2422,7 @@ Release date: October 2015 ### 2D Conforming Triangulations and Meshes - Add an optimization method `CGAL::lloyd_optimize_mesh_2()` that - implements the Lloyd (or Centroidal Voronoi Tesselation) + implements the Lloyd (or Centroidal Voronoi Tessellation) optimization algorithm in a Constrained Delaunay Triangulation. For optimization, the triangulation data structure on which the mesher relies needs its `VertexBase` template parameter to be a model of @@ -3163,7 +3163,7 @@ Release date: March 2013 - Introduction of `CGAL::cpp11::result_of` as an alias to the tr1 implementation from boost of the `result_of` mechanism. When all compilers supported by CGAL will have a Standard compliant - implemention of the C++11 `decltype` feature, it will become an + implementation of the C++11 `decltype` feature, it will become an alias to `std::result_of`. ### Surface Reconstruction from Point Sets @@ -4216,7 +4216,7 @@ fixes for this release. compose, compose\_shared, swap\_\*, negate, along with the helper functions set\_arity\_\* and Arity class and Arity\_tag typedefs) which were provided by `` have been removed. - Please use the better boost::bind mecanism instead. The concept + Please use the better boost::bind mechanism instead. The concept AdaptableFunctor has been changed accordingly such that only a nested result\_type is required. - The accessory classes Twotuple, Threetuple, Fourtuple and Sixtuple @@ -4340,10 +4340,10 @@ This is a bug fix release. - Fixed bug in Arrangement\_2 in walk along a line point location for unbounded curves. - Fixed bug in aggregated insertion to Arrangement\_2. -- Fixed bug in Arrangment\_2 class when inserting an unbounded curve +- Fixed bug in Arrangement\_2 class when inserting an unbounded curve from an existing vertex. - Fixed bug when dealing with a degenerate conic arc in - Arr\_conic\_traits\_2 of the Arrangment package, meaning a line + Arr\_conic\_traits\_2 of the Arrangement package, meaning a line segment which is part of a degenerate parabola/hyperbola. - Fixed bug in the Bezier traits-class: properly handle line segments. properly handle comparison near a vertical tangency. @@ -4680,7 +4680,7 @@ static runtime (/ML). discrete conformal map, discrete authalic parameterization, Floater mean value coordinates or Tutte barycentric mapping. - Principal Component Analysis (new package) - This package provides functions to compute global informations on + This package provides functions to compute global information on the shape of a set of 2D or 3D objects such as points. It provides the computation of axis-aligned bounding boxes, centroids of point sets, barycenters of weighted point sets, as well as linear least @@ -5046,7 +5046,7 @@ The following functionality has been added or changed: implements the data structure for 2D triangulation class, now makes use of CGAL::Compact\_container (see Support Library section below). - - The triangulation classes use a Rebind mecanism to provide the + - The triangulation classes use a Rebind mechanism to provide the full flexibility on Vertex and Face base classes. This means that it is possible for the user to derive its own Face of Vertex base class, adding a functionality that makes use of @@ -5073,7 +5073,7 @@ The following functionality has been added or changed: - Triangulation\_3 now gives non-const access to the data structure. - Interval Skip List (new package) - An interval skip list is a data strucure for finding all intervals + An interval skip list is a data structure for finding all intervals that contain a point, and for stabbing queries, that is for answering the question whether a given point is contained in an interval or not. @@ -5394,11 +5394,11 @@ The following functionality has been added or changed: is transparent for the user of triangulation classes. - Constrained and Delaunay constrained triangulations are now able to handle intersecting input constraints. The behavior of - constrained triangulations with repect to intersection of input + constrained triangulations with respect to intersection of input constraints can be customized using an intersection tag. - A new class Constrained\_triangulation\_plus offers a constrained hierarchy on top of a constrained triangulations. - This additionnal data structure describes the subdivision of the + This additional data structure describes the subdivision of the original constraints into edges of the triangulations. @@ -5464,7 +5464,7 @@ The following functionality is no longer supported: Bugs in the following packages have been fixed: 3D Convex hull, 2D Polygon partition, simple polygon generator -Also attempts have been made to assure compatability with the upcoming +Also attempts have been made to assure compatibility with the upcoming LEDA release that introduces the leda namespace. ### Known problems @@ -5636,7 +5636,7 @@ kernels themselves can be used as traits classes in many instances. conform to the new CGAL kernels. CGAL kernel classes can be used as traits classes for all 2D triangulations except for regular triangulations. - - Additionnal functionality: + - Additional functionality: - dual method for regular triangulations (to build a power diagram) - unified names and signatures for various "find\_conflicts()" @@ -5743,7 +5743,7 @@ The following functionality has been added: spaces as well as planar triangulations. - The triangulation hierarchy which allows fast location query is now available. -- Inifinite objects can now be included in planar maps. +- Infinite objects can now be included in planar maps. - Removal as well as insertions of vertices for 3D Delaunay triangulations is now possible. - A generator for \`\`random'' simple polygons is now available. diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 769d18ab80d..b15db42aa7e 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -1,6 +1,6 @@ # # This files contains definitions needed to use CGAL in a program. -# DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time. +# DO NOT EDIT THIS. The definitions have been generated by CMake at configuration time. # This file is loaded by cmake via the command "find_package(CGAL)" # # This file correspond to a possibly out-of-sources CGAL configuration, thus the actual location @@ -139,7 +139,7 @@ macro(check_cgal_component COMPONENT) set( CGAL_Core_FOUND TRUE ) endif() else("${CGAL_LIB}" STREQUAL "CGAL_Qt5") - # Librairies that have no dependencies + # Libraries that have no dependencies set( ${CGAL_LIB}_FOUND TRUE ) endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5") else(TARGET CGAL::${CGAL_LIB}) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index ade24452f95..00db762aa76 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -1,6 +1,6 @@ # # This files contains definitions needed to use CGAL in a program. -# DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time. +# DO NOT EDIT THIS. The definitions have been generated by CMake at configuration time. # This file is loaded by cmake via the command "find_package(CGAL)" # # This file correspond to a CGAL installation with "make install", thus the actual location @@ -123,7 +123,7 @@ macro(check_cgal_component COMPONENT) set( CGAL_Core_FOUND TRUE ) endif() else("${CGAL_LIB}" STREQUAL "CGAL_Qt5") - # Librairies that have no dependencies + # Libraries that have no dependencies set( ${CGAL_LIB}_FOUND TRUE ) endif("${CGAL_LIB}" STREQUAL "CGAL_Qt5") else(TARGET CGAL::${CGAL_LIB}) diff --git a/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake b/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake index d38473c0322..35245c65696 100644 --- a/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake +++ b/Installation/cmake/modules/CGAL_CheckCXXFileRuns.cmake @@ -52,7 +52,7 @@ MACRO(CHECK_CXX_FILE_RUNS FILE VAR TEST) SET(${VAR} 1 CACHE INTERNAL "Test ${TEST}" FORCE ) MESSAGE(STATUS "Performing Test ${TEST} - Success") FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log - "Performing C++ SOURCE FILE Test ${TEST} succeded with the following output:\n" + "Performing C++ SOURCE FILE Test ${TEST} succeeded with the following output:\n" "${OUTPUT}\n" "Source file was:\n${SOURCE}\n") else() diff --git a/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake b/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake index b46f288685c..96329f11c0b 100644 --- a/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake +++ b/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake @@ -1,7 +1,7 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED ) set( CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED 1 ) - message( STATUS "Targetting ${CMAKE_GENERATOR}") + message( STATUS "Targeting ${CMAKE_GENERATOR}") if ( MSVC ) message( STATUS "Target build environment supports auto-linking" ) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 6cc009ec9aa..12daadbe567 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -384,8 +384,8 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) # Composes a tagged list of libraries: a list with interpersed keywords or tags # indicating that all following libraries, up to the next tag, are to be linked only for the # corresponding build type. The 'general' tag indicates libraries that corresponds to all build types. - # 'optimized' corresponds to release builds and 'debug' to debug builds. Tags are case sensitve and - # the inital range of libraries listed before any tag is implicitely 'general' + # 'optimized' corresponds to release builds and 'debug' to debug builds. Tags are case sensitive and + # the initial range of libraries listed before any tag is implicitly 'general' # # This macro takes 3 lists of general, optimized and debug libraries, resp, and populates the list # given in the fourth argument. @@ -425,9 +425,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) # where the general, optimized and debug libraries are collected. # # The first parameter must be a string containing a semi-colon separated list of elements. - # It cannot be ommitted, but it can be an empty string "" + # It cannot be omitted, but it can be an empty string "" # - # TThe next three arguments must be the names of the variables containing the result, and they + # The next three arguments must be the names of the variables containing the result, and they # will be APPENDED (retaining any previous contents) # # If there is a last parameter whose value is "PERSISTENT" then the result variables are internal in the cache, @@ -487,11 +487,11 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) # # tag_libraries( LIBS_1 SOME_UNDEFINED_VARIABLE_OR_EMPTY_LIST LIBS_R ) # - # LIBS_R -> libA.so;libB.so (implicitely 'general' since there is no tag) + # LIBS_R -> libA.so;libB.so (implicitly 'general' since there is no tag) # # tag_libraries( SOME_UNDEFINED_VARIABLE_OR_EMPTY_LIST LIBS_2 LIBS_R ) # - # LIBS_R -> libC.so (implicitely 'general' since there is no tag) + # LIBS_R -> libC.so (implicitly 'general' since there is no tag) # macro( tag_libraries libs_general_or_optimized libs_general_or_debug libs ) @@ -513,7 +513,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) # Appends the list of tagged libraries contained in the variable 'libA' to the list # of tagged libraries contained in the variable 'libR', properly redistributing each tagged subsequence. # - # The first argument is the name of the variable recieving the list. It will be APPENDED + # The first argument is the name of the variable receiving the list. It will be APPENDED # (retaining any previous contents). # The second parameter is a single string value containing the tagged # lists of libraries to append (as a semi-colon separated list). It can be empty, in which case noting is added. diff --git a/Installation/cmake/modules/CGAL_SetupBoost.cmake b/Installation/cmake/modules/CGAL_SetupBoost.cmake index 1fd9ad6ba3f..fccdd488a68 100644 --- a/Installation/cmake/modules/CGAL_SetupBoost.cmake +++ b/Installation/cmake/modules/CGAL_SetupBoost.cmake @@ -2,7 +2,7 @@ # CGAL_SetupBoost # --------------- # -# The module searchs for the `Boost` headers and library, by calling +# The module searches for the `Boost` headers and library, by calling # # .. code-block:: cmake # diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 790b13331b1..520abc2f854 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -2,7 +2,7 @@ # CGAL_SetupCGALDependencies # -------------------------- # -# The module searchs for the dependencies of the CGAL library: +# The module searches for the dependencies of the CGAL library: # - the `GMP/MPFR` couple, # - `LEDA` (optional) # - the `Boost` libraries (mostly the header-only libraries) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake index 3387eae26c8..88b5db13449 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_CoreDependencies.cmake @@ -2,7 +2,7 @@ # CGAL_SetupCGAL_CoreDependencies # ------------------------------- # -# The module searchs for the dependencies of the `CGAL_Core` library: +# The module searches for the dependencies of the `CGAL_Core` library: # - the `GMP/MPFR` couple, # # and defines the variable :variable:`CGAL_Core_FOUND` and the function diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake index fd1d2bd7f2a..f6a078aa516 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_ImageIODependencies.cmake @@ -2,7 +2,7 @@ # CGAL_SetupCGAL_ImageIODependencies # ---------------------------------- # -# The module searchs for the dependencies of the `CGAL_ImageIO` library: +# The module searches for the dependencies of the `CGAL_ImageIO` library: # - the `Zlib` library (optional) # # by calling diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index 7ff7dde7a48..0c11f8b5ffd 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -2,7 +2,7 @@ # CGAL_SetupCGAL_Qt5Dependencies # ------------------------------ # -# The module searchs for the dependencies of the `CGAL_Qt5` library: +# The module searches for the dependencies of the `CGAL_Qt5` library: # - the `Qt5` libraries # # by calling diff --git a/Installation/cmake/modules/CGAL_SetupFlags.cmake b/Installation/cmake/modules/CGAL_SetupFlags.cmake index 514ad5c58c8..6f652ee0933 100644 --- a/Installation/cmake/modules/CGAL_SetupFlags.cmake +++ b/Installation/cmake/modules/CGAL_SetupFlags.cmake @@ -6,7 +6,7 @@ if ( NOT CGAL_SETUP_FLAGS_INCLUDED ) # override the flags used to build the libraries # set( CGAL_DONT_OVERRIDE_CMAKE_FLAGS_DESCRIPTION - "Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. When this is FALSE, all the CMAKE_*_FLAGS flags are overriden with the values used when building the CGAL libs. For CGAL_*_flags (used for ADDITIONAL flags) , there is no need to set this to TRUE." + "Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. When this is FALSE, all the CMAKE_*_FLAGS flags are overridden with the values used when building the CGAL libs. For CGAL_*_flags (used for ADDITIONAL flags) , there is no need to set this to TRUE." ) option( CGAL_DONT_OVERRIDE_CMAKE_FLAGS diff --git a/Installation/cmake/modules/CGAL_SetupGMP.cmake b/Installation/cmake/modules/CGAL_SetupGMP.cmake index 4a1df74eabc..f4797f39e0a 100644 --- a/Installation/cmake/modules/CGAL_SetupGMP.cmake +++ b/Installation/cmake/modules/CGAL_SetupGMP.cmake @@ -2,7 +2,7 @@ # CGAL_SetupGMP # ------------- # -# The module searchs for the `GMP` and `MPFR` headers and libraries, +# The module searches for the `GMP` and `MPFR` headers and libraries, # by calling # # .. code-block:: cmake diff --git a/Installation/cmake/modules/CGAL_SetupLEDA.cmake b/Installation/cmake/modules/CGAL_SetupLEDA.cmake index 24bf2f547cc..8ad720b4767 100644 --- a/Installation/cmake/modules/CGAL_SetupLEDA.cmake +++ b/Installation/cmake/modules/CGAL_SetupLEDA.cmake @@ -2,7 +2,7 @@ # CGAL_SetupLEDA # -------------- # -# The module searchs for the `LEDA` headers and library, by calling +# The module searches for the `LEDA` headers and library, by calling # # .. code-block:: cmake # diff --git a/Installation/cmake/modules/FindSuiteSparse.cmake b/Installation/cmake/modules/FindSuiteSparse.cmake index 0793a17a8e0..8d55912f168 100644 --- a/Installation/cmake/modules/FindSuiteSparse.cmake +++ b/Installation/cmake/modules/FindSuiteSparse.cmake @@ -1,8 +1,8 @@ ## CMake file to locate SuiteSparse and its useful composite projects -## The first developpement of this file was made fro Windows users who -## use: +## The first development of this file was done by a Windows users who +## used: ## https://github.com/jlblancoc/suitesparse-metis-for-windows -## Anyway, it chould be work also on linux (tested on fedora 17 when you installed suitesparse from yum) +## Anyway, it could work also on linux (tested on fedora 17 when you installed suitesparse from yum) ## ## ## Inputs variables this file can process (variable must be given before find_package(SUITESPARES ...) command) : @@ -11,7 +11,7 @@ ## Note: SuiteSparse lib usually requires linking to a blas and lapack library. ## ## -## Help variables this file handle internaly : +## Help variables this file handle internally : ## * SuiteSparse_SEARCH_LIB_POSTFIX Is set in cache (as advanced) to look into the right lib/lib64 dir for libraries (user can change) ## ## @@ -22,17 +22,17 @@ ## If SuiteSparse_USE_LAPACK_BLAS is set to ON : ## * SuiteSparse_LAPACK_BLAS_LIBRARIES Which contain the libblas and liblapack libraries ## On windows: -## * SuiteSparse_LAPACK_BLAS_DLL Which contain all requiered binaries for use libblas and liblapack +## * SuiteSparse_LAPACK_BLAS_DLL Which contain all required binaries for use libblas and liblapack ## ## ## Detailed variables this file provide : ## * SuiteSparse__FOUND True if the given component to look for is found (INCLUDE DIR and LIBRARY) -## * SuiteSparse__INCLUDE_DIR The path directory where we can found all compenent header files +## * SuiteSparse__INCLUDE_DIR The path directory where we can be found all component header files ## * SuiteSparse__LIBRARY The file path to the component library ## Note: If a component is not found, a SuiteSparse__DIR cache variable is set to allow user set the search directory. ## ## -## Possible componnents to find are (maybe some others can be available): +## Possible components to find are (maybe some others can be available): ## * AMD ## * CAMD ## * COLAMD @@ -125,13 +125,13 @@ endif() ## we can use a generic way to find all of these with simple cmake lines of code macro(SuiteSparse_FIND_COMPONENTS ) - ## On windows : we absolutly need SuiteSparse_config.h every time for all projects + ## On windows : we absolutely need SuiteSparse_config.h every time for all projects if(WIN32) list(FIND SuiteSparse_FIND_COMPONENTS "suitesparseconfig" SS_config_index) if(${SS_config_index} MATCHES "-1") list(APPEND SuiteSparse_FIND_COMPONENTS suitesparseconfig) if(SuiteSparse_VERBOSE) - message(STATUS " On windows, we absolutly need SuiteSparse_config.h every time for all projects : add suitesparseconfig component to look for") + message(STATUS " On windows, we absolutely need SuiteSparse_config.h every time for all projects : add suitesparseconfig component to look for") endif() endif() endif() @@ -292,7 +292,7 @@ macro(SuiteSparse_FIND_COMPONENTS ) endif() if(NOT ${componentToCheck}) set(SuiteSparse_FOUND OFF) - break() ## one component not found is enought to failed + break() ## one component not found is enough to failed endif() endforeach() endmacro() diff --git a/Installation/cmake/modules/Help/cmake.py b/Installation/cmake/modules/Help/cmake.py index 32003d475e6..ce321e0b62f 100644 --- a/Installation/cmake/modules/Help/cmake.py +++ b/Installation/cmake/modules/Help/cmake.py @@ -270,7 +270,7 @@ class CMakeXRefRole(XRefRole): # We cannot insert index nodes using the result_nodes method # because CMakeXRefRole is processed before substitution_reference # nodes are evaluated so target nodes (with 'ids' fields) would be - # duplicated in each evaluted substitution replacement. The + # duplicated in each evaluated substitution replacement. The # docutils substitution transform does not allow this. Instead we # use our own CMakeXRefTransform below to add index entries after # substitutions are completed. diff --git a/Installation/cmake/modules/Help/index.rst b/Installation/cmake/modules/Help/index.rst index 7178feb71ac..b47d4211d9b 100644 --- a/Installation/cmake/modules/Help/index.rst +++ b/Installation/cmake/modules/Help/index.rst @@ -3,8 +3,8 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to CGAL CMake Modules's documentation! -============================================== +Welcome to CGAL CMake Modules' documentation! +============================================= Contents: diff --git a/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp b/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp index 48e131954e9..cc8a2c13235 100644 --- a/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp +++ b/Installation/cmake/modules/config/testfiles/CGAL_CFG_MATCHING_BUG_5.cpp @@ -16,7 +16,7 @@ //| This flag is set, if a compiler cannot distinguish the signature //| of overloaded function templates, which have one template parameter -//| to be passed explicitely when being called. +//| to be passed explicitly when being called. //| //| This bug appears for example on g++ 3.3 and 3.4 (but not on more recent //| g++ version). This bug appears also on Sun CC 5.90. diff --git a/Installation/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h b/Installation/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h index a4c752cd832..cd56d1456ec 100644 --- a/Installation/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h +++ b/Installation/include/CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h @@ -8,8 +8,8 @@ // // Author: Mael Rouxel-Labbé -// Some tests are explicitely used to check the sanity of deprecated code and should not -// give warnings/errors on plateforms that defined CGAL_NO_DEPRECATED_CODE CGAL-wide +// Some tests are explicitly used to check the sanity of deprecated code and should not +// give warnings/errors on platforms that defined CGAL_NO_DEPRECATED_CODE CGAL-wide // (or did not disable deprecation warnings). #if !defined(CGAL_NO_DEPRECATION_WARNINGS) diff --git a/Installation/include/CGAL/auto_link/auto_link.h b/Installation/include/CGAL/auto_link/auto_link.h index f87cfe3298c..5756b4fa34b 100644 --- a/Installation/include/CGAL/auto_link/auto_link.h +++ b/Installation/include/CGAL/auto_link/auto_link.h @@ -93,7 +93,7 @@ CGAL_VERSION: Defined in # endif #elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) // -// C language compatability (no, honestly) +// C language compatibility (no, honestly) // # define BOOST_MSVC _MSC_VER # define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 7d7d435a302..99b69bc79ba 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -549,7 +549,7 @@ namespace cpp11{ namespace CGAL { // Returns filename prefixed by the directory of CGAL containing data. -// This directory is either defined in the environement variable CGAL_DATA_DIR, +// This directory is either defined in the environment variable CGAL_DATA_DIR, // otherwise it is taken from the constant CGAL_DATA_DIR (defined in CMake), // otherwise it is empty (and thus returns filename unmodified). inline std::string data_file_path(const std::string& filename) diff --git a/Interpolation/TODO b/Interpolation/TODO index 574426e92ef..a52ff9f6d25 100644 --- a/Interpolation/TODO +++ b/Interpolation/TODO @@ -110,7 +110,7 @@ background presented to get into the subject without problems. Thus, I like the overall structure, and most of my remarks are minor comments, typos and suggestions. -- p. 1, maybe add that a sample point is a natural neigbor iff its +- p. 1, maybe add that a sample point is a natural neighbor iff its lambda is nonzero. - p. 2, end of paragraph "The interpolation package": I cannot find natural_neighbo_coordinates_3 in the manual/reference diff --git a/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h b/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h index d448c097269..8d818fa1191 100644 --- a/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h +++ b/Interpolation/include/CGAL/constructions/constructions_for_voronoi_intersection_cartesian_2_3.h @@ -73,7 +73,7 @@ plane_centered_circumcenterC3(const RT &ax, const RT &ay, const RT &az, // //precondition: p,q,r aren't collinear. //method: - // - tranlation of p to the origin. + // - translation of p to the origin. plane_centered_circumcenter_translateC3(ax-px, ay-py, az-pz, nx, ny, nz, qx-px, qy-py,qz-pz, diff --git a/Interpolation/include/CGAL/natural_neighbor_coordinates_3.h b/Interpolation/include/CGAL/natural_neighbor_coordinates_3.h index de50b9defa9..99e405fee91 100644 --- a/Interpolation/include/CGAL/natural_neighbor_coordinates_3.h +++ b/Interpolation/include/CGAL/natural_neighbor_coordinates_3.h @@ -48,7 +48,7 @@ construct_circumcenter(const typename DT::Facet& f, const typename DT::Geom_traits::Point_3& Q, const typename DT::Geom_traits& gt = typename DT::Geom_traits()); -// ====================== Natural Neighbors Querries ========================== +// ====================== Natural Neighbors Queries ========================== // === Definitions // Given a 3D point Q and a 3D Delaunay triangulation dt, @@ -358,7 +358,7 @@ construct_circumcenter(const typename DT::Facet& f, f.first->vertex((f.second+2)&3)->point(), f.first->vertex((f.second+3)&3)->point(), Q)); - // else the facet is not on the enveloppe of the conflict cavity associated to P + // else the facet is not on the envelope of the conflict cavity associated to P return gt.construct_circumcenter_3_object()( f.first->vertex((f.second+1)&3)->point(), f.first->vertex((f.second+2)&3)->point(), diff --git a/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h b/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h index 410f0f1972b..bfe731b8c8d 100644 --- a/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h +++ b/Interpolation/include/CGAL/predicates/predicates_for_voronoi_intersection_cartesian_2_3.h @@ -67,7 +67,7 @@ side_of_plane_centered_sphereC3(const RT &ax, const RT &ay, const RT &az, // return: sign( (c-p)(c-p) - (c-t)(c-t)) // //method: - // - tranlation of p to the origin. + // - translation of p to the origin. // - separate computation of det and norm of the expression return side_of_plane_centered_sphere_translateC3(ax-px, ay-py, az-pz, @@ -136,7 +136,7 @@ side_of_plane_centered_sphereC3(const RT &ax, const RT &ay, const RT &az, // return: sign( (c-p)(c-p) - (c-r)(c-r)) // //method: - // - tranlation of p to the origin. + // - translation of p to the origin. // - separate computation of det and nom of the expression return side_of_plane_centered_sphere_translateC3(ax-px, ay-py, az-pz, diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index 434123fcdd2..5c15555404a 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -772,9 +772,9 @@ struct Test check_no_intersection (Rec(p(-2, -6), p( 6, 3)), p(-2, -7)); // point intersection - check_intersection (Rec(p(-1, 4), p(-1, 4)), p(-1, 4), p(-1, 4)); // degenerate rectange (0d) - check_intersection (Rec(p(-2, 4), p(-2, 7)), p(-2, 6), p(-2, 6)); // degenerate rectange (1d) - check_intersection (Rec(p(-2, 4), p(-2, 7)), p(-2, 7), p(-2, 7)); // degenerate rectange (1d) + check_intersection (Rec(p(-1, 4), p(-1, 4)), p(-1, 4), p(-1, 4)); // degenerate rectangle (0d) + check_intersection (Rec(p(-2, 4), p(-2, 7)), p(-2, 6), p(-2, 6)); // degenerate rectangle (1d) + check_intersection (Rec(p(-2, 4), p(-2, 7)), p(-2, 7), p(-2, 7)); // degenerate rectangle (1d) check_intersection (Rec(p(-3, 0), p( 4, 2)), p(-3, 2), p(-3, 2)); // on vertex check_intersection (Rec(p( 7, 8), p( 9, 9)), p( 8, 9), p( 8, 9)); // on edge check_intersection (Rec(p(-2, 0), p( 6, 7)), p( 1, 1), p( 1, 1)); // within diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h index f0d6ea725d3..cddef251353 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h @@ -64,7 +64,7 @@ struct r3t3_do_intersect_endpoint_position_visitor void end_point_in_triangle(){ m_intersection_type = 4; } }; -//the template parameter Visitor here is used to offer the posibility to use +//the template parameter Visitor here is used to offer the possibility to use //r3t3_do_intersect_endpoint_position_visitor to track whether the endpoint of //the ray lies inside the plane of the triangle or not. It is used for example //in the function that checks whether a point is inside a polyhedron; if the ray diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h index 635e9e45453..35983013bba 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_intersection.h @@ -90,13 +90,13 @@ t3r3_intersection_coplanar_aux(const typename K::Point_3& a, const Point_3& p = point_on(r,0); - // A ray is not symetric, 2 cases depending on isolated side of c + // A ray is not symmetric, 2 cases depending on isolated side of c Orientation cap = negative_side ? coplanar_orientation(c,a,p) : coplanar_orientation(b,c,p); switch ( cap ) { case NEGATIVE: - // p is bellow [c,a] + // p is below [c,a] return intersection_return(); case COLLINEAR: @@ -111,7 +111,7 @@ t3r3_intersection_coplanar_aux(const typename K::Point_3& a, Point_3 p_side_end_point(p); Point_3 q_side_end_point; - // A ray is not symetric, 2 cases depending on isolated side of c + // A ray is not symmetric, 2 cases depending on isolated side of c if ( negative_side ) { if ( NEGATIVE == coplanar_orientation(b,c,p) ) diff --git a/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp index 9f6151dcba5..fc32a571b4c 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Plane_3.cpp @@ -440,7 +440,7 @@ int main(int, char**) std::cout << " |||||||| Test Simple_cartesian ||||||||" << std::endl; Plane_3_intersection_tester< CGAL::Simple_cartesian >(r).run(); - // Homogenous is broken for projection and Pln-Sphere + // Homogeneous is broken for projection and Pln-Sphere // std::cout << " |||||||| Test CGAL::Homogeneous ||||||||" << std::endl; // Plane_3_intersection_tester< CGAL::Homogeneous >(r).run(); diff --git a/Interval_skip_list/doc/Interval_skip_list/Concepts/Interval.h b/Interval_skip_list/doc/Interval_skip_list/Concepts/Interval.h index 6b573523c80..254de6b64cd 100644 --- a/Interval_skip_list/doc/Interval_skip_list/Concepts/Interval.h +++ b/Interval_skip_list/doc/Interval_skip_list/Concepts/Interval.h @@ -68,7 +68,7 @@ Equality test. bool operator==(const Interval& I) const; /*! -Unequality test. +Inequality test. */ bool operator!=(const Interval& I) const; diff --git a/Interval_support/include/CGAL/Interval_traits.h b/Interval_support/include/CGAL/Interval_traits.h index 2ee459c48d7..25b6878eb55 100644 --- a/Interval_support/include/CGAL/Interval_traits.h +++ b/Interval_support/include/CGAL/Interval_traits.h @@ -187,7 +187,7 @@ proper_subset(Interval interval1, Interval interval2) { } -// Set operations, functions returing Interval +// Set operations, functions returning Interval //the enable_if is need for MSVC as it is not able to eliminate //the function if Interval_traits::Intersection has no result_type //(like Null_functor) diff --git a/Interval_support/include/CGAL/Test/_test_interval_traits.h b/Interval_support/include/CGAL/Test/_test_interval_traits.h index 90c1658bf6e..d44384dff79 100644 --- a/Interval_support/include/CGAL/Test/_test_interval_traits.h +++ b/Interval_support/include/CGAL/Test/_test_interval_traits.h @@ -39,7 +39,7 @@ void test_with_empty_interval(CGAL::Tag_false) { CGAL_static_assertion( (::std::is_same< Empty, CGAL::Null_functor>::value)); - // this part chages in case we allow empty intersection + // this part changes in case we allow empty intersection // which seems to be not possible for CORE::BigFloat as Interval try{ try{ diff --git a/Jet_fitting_3/doc/Jet_fitting_3/Jet_fitting_3.txt b/Jet_fitting_3/doc/Jet_fitting_3/Jet_fitting_3.txt index e59ea98a495..991d49026dc 100644 --- a/Jet_fitting_3/doc/Jet_fitting_3/Jet_fitting_3.txt +++ b/Jet_fitting_3/doc/Jet_fitting_3/Jet_fitting_3.txt @@ -111,7 +111,7 @@ respective curvature line, while \f$ b_1,b_2\f$ are the directional derivatives of \f$ k_1,k_2\f$ along the other curvature lines. The Monge coordinate system can be computed from any \f$ d\f$-jet (\f$ d\geq -2\f$), and so are the Monge coefficients. These informations +2\f$), and so are the Monge coefficients. These information characterize the local geometry of the surface in a canonical way, and are the quantities returned by our algorithm. @@ -277,7 +277,7 @@ vertices of a given mesh. The neighborhood of a given vertex is computed using rings on the triangulation. Results are twofold:
    • a human readable text file featuring the `::CGAL::Monge_via_jet_fitting::Monge_form` and -numerical informations on the computation: condition number and the +numerical information on the computation: condition number and the PCA basis;
    • another text file that records raw data (better for a visualization post-processing). diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_operations.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_operations.h index 01ce9290663..bec4c5abc3c 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_operations.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_operations.h @@ -34,7 +34,7 @@ struct Facet_unit_normal { //---------------------------------------------------------------- -// operations on hedges, facets etc, handled using proeprty maps +// operations on hedges, facets etc, handled using property maps //---------------------------------------------------------------- template class T_PolyhedralSurf_hedge_ops diff --git a/Jet_fitting_3/examples/Jet_fitting_3/README b/Jet_fitting_3/examples/Jet_fitting_3/README index 9bb5e2e614e..9d15447af42 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/README +++ b/Jet_fitting_3/examples/Jet_fitting_3/README @@ -20,7 +20,7 @@ takes an filename.off file as input, it computes a fitting for each vertex it outputs the results in : -1. filename.off.4ogl.txt which records raw data (better for a vizualization +1. filename.off.4ogl.txt which records raw data (better for a visualization post-processing) 2. if option -vtrue, filename.off.verb.txt contains human readable results @@ -43,7 +43,7 @@ Allowed options: Note : if the nb of collected points is less than the required min number of - points to make the approxiamtion possible (which is constrained by the deg) + points to make the approximation possible (which is constrained by the deg) then the vertex is skipped. ./Mesh_estimation diff --git a/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp b/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp index cd4a53291fd..16e792caae5 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp +++ b/Jet_fitting_3/examples/Jet_fitting_3/Single_estimation.cpp @@ -36,7 +36,7 @@ int main(int argc, char *argv[]) exit(-1); } - //initalize the in_points container + //initialize the in_points container double x, y, z; std::vector in_points; while (inFile >> x) { diff --git a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h index d62dec1e589..7e73c6eb3fc 100644 --- a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h +++ b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h @@ -151,7 +151,7 @@ public: //translate_p0 changes the origin of the world to p0 the first point // of the input data points //change_world2fitting (coord of a vector in world) = coord of this - // vector in fitting. The matrix tranform has as lines the coord of + // vector in fitting. The matrix transform has as lines the coord of // the basis vectors of fitting in the world coord. //idem for change_fitting2monge Aff_transformation translate_p0, change_world2fitting, @@ -553,7 +553,7 @@ compute_Monge_coefficients(FT* A, std::size_t dprime, { //One has the equation w=J_A(u,v) of the fitted surface S // in the fitting_basis - //Substituing (u,v,w)=change_fitting2monge^{-1}(x,y,z) + //Substituting (u,v,w)=change_fitting2monge^{-1}(x,y,z) //One has the equation f(x,y,z)=0 on this surface S in the monge // basis //The monge form of the surface at the origin is the bivariate fct diff --git a/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp b/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp index b771304cc20..cf6e945bb7a 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp +++ b/Jet_fitting_3/test/Jet_fitting_3/blind_1pt.cpp @@ -25,7 +25,7 @@ int main() std::cerr << "cannot open file for input\n"; exit(-1); } - //initalize the in_points container + //initialize the in_points container double x, y, z; std::vector in_points; while (inFile >> x) { diff --git a/Kernel_23/doc/Kernel_23/CGAL/Circular_kernel_intersections.h b/Kernel_23/doc/Kernel_23/CGAL/Circular_kernel_intersections.h index 7024d483aa1..39b211e4e80 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Circular_kernel_intersections.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Circular_kernel_intersections.h @@ -46,7 +46,7 @@ the following function overloads are also available. The iterator versions of those functions can be used in conjunction with `Dispatch_output_iterator`. -Since both the number of intersections, if any, and types of the interesection results +Since both the number of intersections, if any, and types of the intersection results depend on the arguments, the function expects an output iterator on `K::Intersect_2(Type1, Type2)` as presented below. */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h b/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h index 0c1a977f305..f235beb0e79 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Spherical_kernel_intersections.h @@ -57,7 +57,7 @@ the following function overloads are also available. The iterator versions of those functions can be used in conjunction with `Dispatch_output_iterator`. -Since both the number of intersections, if any, and types of the interesection results +Since both the number of intersections, if any, and types of the intersection results depend on the arguments, the function expects an output iterator on `Kernel::Intersect_3(Type1, Type2)` as presented below. */ @@ -83,7 +83,7 @@ type can be where the unsigned integer is the multiplicity of the corresponding intersection point between `obj1` and `obj2`, - `SphericalType1`, when `SphericalType1` and `SphericalType2` are equal, - and if the two objets `obj1` and `obj2` are equal, + and if the two objects `obj1` and `obj2` are equal, - `Line_3` or `Circle_3` when `SphericalType1` and `SphericalType2` are two-dimensional objects intersecting along a curve (2 planes, or 2 @@ -119,7 +119,7 @@ and depending of these types, the computed return value intersection point, - `Circle_3` or - `Type1`, when `Type1`, `Type2` and - `Type3` are equal, and if the three objets `obj1` and `obj2` + `Type3` are equal, and if the three objects `obj1` and `obj2` and `obj3` are equal. */ template < typename Type1, typename Type2, typename Type3, typename OutputIterator > diff --git a/Kernel_23/doc/Kernel_23/PackageDescription.txt b/Kernel_23/doc/Kernel_23/PackageDescription.txt index 7063daeded7..7f433bef675 100644 --- a/Kernel_23/doc/Kernel_23/PackageDescription.txt +++ b/Kernel_23/doc/Kernel_23/PackageDescription.txt @@ -27,7 +27,7 @@ /// \defgroup kernel_enums Enumerations and Related Functions /// \ingroup PkgKernel23Ref -/// \defgroup kernel_conversion Cartesian/Homogenous Conversion +/// \defgroup kernel_conversion Cartesian/Homogeneous Conversion /// \ingroup PkgKernel23Ref /// \defgroup kernel_dimension Dimension Handling Tools diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index d0ba827fa37..31b59622d1f 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -18,7 +18,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred, CGAL_Kernel_cons and CGAL_Kernel_obj. // And they are #undefed at the end of this file. diff --git a/Kernel_23/include/CGAL/Kernel/mpl.h b/Kernel_23/include/CGAL/Kernel/mpl.h index 4c6af4c705e..6db61ec7515 100644 --- a/Kernel_23/include/CGAL/Kernel/mpl.h +++ b/Kernel_23/include/CGAL/Kernel/mpl.h @@ -24,7 +24,7 @@ namespace CGAL { -// The additionnal int parameter is to obtain different types. +// The additional int parameter is to obtain different types. template < typename A, typename B, int = 0 > struct First_if_different { typedef A Type; diff --git a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h index 93975795c57..42c3bc31859 100644 --- a/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h +++ b/Kernel_23/include/CGAL/Kernel_23/internal/Projection_traits_base_3.h @@ -567,7 +567,7 @@ public: // Special functor, not in the Kernel concept class Projection_to_plan { - // Remeber: Point_2 is K::Point_3 + // Remember: Point_2 is K::Point_3 const Point_2& plane_point; const Vector_3& normal; public: diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h index bee813d4044..6ea80be2a41 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_2.h @@ -183,7 +183,7 @@ _test_cls_point_2(const R& ) assert(bb.ymin() <= 50.0); assert(bb.ymax() >= 50.0); - // test compound assignement operator + // test compound assignment operator CGAL::Point_2 p_1(1,2); const CGAL::Point_2 p_1_const = p_1; CGAL::Vector_2 v_1(3,4); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h index 7cddab1e711..b09c11e47a7 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_point_3.h @@ -194,7 +194,7 @@ _test_cls_point_3(const R& ) assert(bb.zmin() <= -20.0); assert(bb.zmax() >= -20.0); - // test compound assignement operator + // test compound assignment operator CGAL::Point_3 p_1(1,2,3); const CGAL::Point_3 p_1_const = p_1; CGAL::Vector_3 v_1(4,5,6); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_2.h index 6b21992ad9f..9918e5b37fd 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_2.h @@ -54,7 +54,7 @@ bool _test_cls_weighted_point_2(const R& ) CGAL::Weighted_point_2 wp7(p0, int_w); use(wp0); use(wp4); use(wp5); - // assignement + // assignment wp1 = wp6; std::cout << "."; diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_3.h index 299b9344df5..505e068909f 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_cls_weighted_point_3.h @@ -54,7 +54,7 @@ bool _test_cls_weighted_point_3(const R& ) CGAL::Weighted_point_3 wp6(n1, n2, n3); // with coordinates use(wp0); use(wp4); use(wp5); - // assignement + // assignment wp1 = wp6; std::cout << "."; diff --git a/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h b/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h index 8137d560e3b..4fcacb5b584 100644 --- a/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h +++ b/Kernel_d/doc/Kernel_d/CGAL/Epeck_d.h @@ -105,7 +105,7 @@ double weight() const; class Construct_circumcenter_d { public: /*! returns the center of the sphere defined by `A=tuple[first,last)`. The sphere is centered in the affine hull of A and passes through all the points of A. The order of the points of A does not matter. - \pre A is affinely independant. + \pre A is affinely independent. \tparam ForwardIterator has `Epeck_d::Point_d` as value type. */ template @@ -114,7 +114,7 @@ Point_d operator()(ForwardIterator first, ForwardIterator last); class Compute_squared_radius_d { public: /*! returns the radius of the sphere defined by `A=tuple[first,last)`. The sphere is centered in the affine hull of A and passes through all the points of A. The order of the points of A does not matter. - \pre A is affinely independant. + \pre A is affinely independent. \tparam ForwardIterator has `Epeck_d::Point_d` as value type. */ template @@ -134,7 +134,7 @@ FT operator()(ForwardIterator first, ForwardIterator last); class Side_of_bounded_sphere_d { public: /*! returns the relative position of point p to the sphere defined by `A=tuple[first,last)`. The sphere is centered in the affine hull of A and passes through all the points of A. The order of the points of A does not matter. - \pre A is affinely independant. + \pre A is affinely independent. \tparam ForwardIterator has `Epeck_d::Point_d` as value type. */ template diff --git a/Kernel_d/include/CGAL/Kernel_d/Line_d.h b/Kernel_d/include/CGAL/Kernel_d/Line_d.h index babcb41fee3..833f21baab3 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Line_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Line_d.h @@ -44,7 +44,7 @@ class Line_d : public Handle_for< Pair_d > { /*{\Mdefinition An instance of data type |Line_d| is an oriented line in -$d$-dimensional Euclidian space.}*/ +$d$-dimensional Euclidean space.}*/ public: diff --git a/Kernel_d/include/CGAL/Kernel_d/Ray_d.h b/Kernel_d/include/CGAL/Kernel_d/Ray_d.h index 87cab417a15..b06f3d447cb 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Ray_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Ray_d.h @@ -45,7 +45,7 @@ class Ray_d : public Handle_for< Pair_d > { /*{\Mdefinition An instance of data type |Ray_d| is a ray in $d$-dimensional -Euclidian space. It starts in a point called the source of |\Mvar| and +Euclidean space. It starts in a point called the source of |\Mvar| and it goes to infinity.}*/ public: diff --git a/Kernel_d/include/CGAL/Kernel_d/Segment_d.h b/Kernel_d/include/CGAL/Kernel_d/Segment_d.h index bd30d04f3a7..43b9779809c 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Segment_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Segment_d.h @@ -45,7 +45,7 @@ class Segment_d : public Handle_for< Pair_d > { /*{\Mdefinition An instance $s$ of the data type |Segment_d| is a directed straight -line segment in $d$-dimensional Euclidian space connecting two points +line segment in $d$-dimensional Euclidean space connecting two points $p$ and $q$. $p$ is called the source point and $q$ is called the target point of $s$, both points are called endpoints of $s$. A segment whose endpoints are equal is called \emph{degenerate}.}*/ diff --git a/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h b/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h index 2c9a0e64955..ba208c8a14c 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/Sphere_d.h @@ -148,7 +148,7 @@ point_iterator points_end() const { return ptr()->P.end(); } /*{\Mop returns an iterator pointing beyond the last defining point.}*/ bool is_degenerate() const { return (ptr()->orient == CGAL::ZERO); } -/*{\Mop returns true iff the defining points are not full dimenional.}*/ +/*{\Mop returns true iff the defining points are not full dimensional.}*/ bool is_legal() const /*{\Mop returns true iff the set of defining points is legal. diff --git a/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h b/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h index 848d7901318..73353e3e848 100644 --- a/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h +++ b/Kernel_d/include/CGAL/Kernel_d/function_objectsCd.h @@ -279,7 +279,7 @@ public: * subspace on which the (full k-dim) predicates answers POSITIVE or NEGATIVE. * If no such subspace is found, return COPLANAR. * IMPORTANT TODO: Current implementation is VERY bad with filters: if one - * determinant fails in the filtering step, then all the subsequent ones wil be + * determinant fails in the filtering step, then all the subsequent ones will be * in exact arithmetic :-( * TODO: store the axis-aligned subspace that was found in order to avoid * re-searching for it for subsequent calls to operator() diff --git a/Kernel_d/include/CGAL/Kernel_d/interface_macros_d.h b/Kernel_d/include/CGAL/Kernel_d/interface_macros_d.h index fd297132e94..e498ae529e8 100644 --- a/Kernel_d/include/CGAL/Kernel_d/interface_macros_d.h +++ b/Kernel_d/include/CGAL/Kernel_d/interface_macros_d.h @@ -16,7 +16,7 @@ // It's aimed at being included from within a kernel traits class, this // way we share more code. -// It is the responsability of the including file to correctly set the 2 +// It is the responsibility of the including file to correctly set the 2 // macros CGAL_Kernel_pred, CGAL_Kernel_cons and CGAL_Kernel_obj. // And they are #undefed at the end of this file. diff --git a/Kernel_d/include/CGAL/Linear_algebraHd.h b/Kernel_d/include/CGAL/Linear_algebraHd.h index b37f05959ba..7b910b05334 100644 --- a/Kernel_d/include/CGAL/Linear_algebraHd.h +++ b/Kernel_d/include/CGAL/Linear_algebraHd.h @@ -184,7 +184,7 @@ $O(n^3)$, and all other operations take time $O(nm)$. These time bounds ignore the cost for multiprecision arithmetic operations. All functions on integer matrices compute the exact result, i.e., -there is no rounding error. The implemenation follows a proposal of +there is no rounding error. The implementation follows a proposal of J. Edmonds (J. Edmonds, Systems of distinct representatives and linear algebra, Journal of Research of the Bureau of National Standards, (B), 71, 241 - 245). Most functions of linear algebra are { \em checkable diff --git a/Kernel_d/include/CGAL/predicates_d.h b/Kernel_d/include/CGAL/predicates_d.h index e63982064e0..7b0edd91624 100644 --- a/Kernel_d/include/CGAL/predicates_d.h +++ b/Kernel_d/include/CGAL/predicates_d.h @@ -177,7 +177,7 @@ affinely independent. template Comparison_result compare_lexicographically( const Point_d& p1, const Point_d& p2) -/*{\Mfunc compares the Cartesian coordiantes of points |p1| and |p2| +/*{\Mfunc compares the Cartesian coordinates of points |p1| and |p2| lexicographically.}*/ { typename R::Compare_lexicographically_d cmp; return cmp(p1,p2); } diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindCGAL.cmake b/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindCGAL.cmake index 7dc0446bf45..a4b0902e60d 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindCGAL.cmake +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindCGAL.cmake @@ -10,7 +10,7 @@ # CGAL_USE_FILE - CMake file to use CGAL. # -# Construct consitent error messages for use below. +# Construct consistent error messages for use below. set(CGAL_DIR_DESCRIPTION "directory containing CGALConfig.cmake. This is either the binary directory where CGAL was configured or PREFIX/lib/CGAL for an installation.") set(CGAL_DIR_MESSAGE "CGAL not found. Set the CGAL_DIR cmake variable or environment variable to the ${CGAL_DIR_DESCRIPTION}") diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h index 889ee37db5d..f092321e4a9 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Surface_mesh.h @@ -705,7 +705,7 @@ public: //---------------------------------------------------- circulator types { public: - /// default constructur + /// default constructor Halfedge_around_face_circulator(const Surface_mesh* m=NULL, Face f=Face()) : mesh_(m) { diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Vector.h b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Vector.h index 8f9487c28cc..21aa768dbfb 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Vector.h +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/surface_mesh/Vector.h @@ -137,7 +137,7 @@ public: } - /// assign a scalar to all componenets + /// assign a scalar to all components Vector& operator=(const Scalar s) { for (int i=0; iset_dart_attribute<0>(scene.lcc->beta(d2,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d1))); (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d3,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d2))); (scene.lcc)->set_dart_attribute<0>(scene.lcc->beta(d1,1),(scene.lcc)->create_vertex_attribute(scene.lcc->point(d3))); diff --git a/Linear_cell_complex/doc/Linear_cell_complex/Concepts/CellAttributeWithPoint.h b/Linear_cell_complex/doc/Linear_cell_complex/Concepts/CellAttributeWithPoint.h index a926b664c4a..be301610300 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Concepts/CellAttributeWithPoint.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/Concepts/CellAttributeWithPoint.h @@ -41,15 +41,15 @@ CellAttributeWithPoint(); /*! Constructor initializing the point of this attribute by the -copy contructor \link Point `Point`\endlink`(apoint)`. +copy constructor \link Point `Point`\endlink`(apoint)`. */ CellAttributeWithPoint(const Point&apoint); /*! Constructor initializing the point of this attribute by the -copy contructor \link Point `Point`\endlink`(apoint)` and initializing the +copy constructor \link Point `Point`\endlink`(apoint)` and initializing the information of this attribute by the -copy contructor \link Info `Info`\endlink`(info)`. +copy constructor \link Info `Info`\endlink`(info)`. Defined only if `Info` is different from `void`. */ CellAttributeWithPoint(const Point&apoint, const Info& info); diff --git a/Linear_cell_complex/examples/Linear_cell_complex/README.txt b/Linear_cell_complex/examples/Linear_cell_complex/README.txt index 6326da0e665..e461312f2dd 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/README.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/README.txt @@ -5,7 +5,7 @@ Examples for Linear_cell_complex package: linear_cell_complex_3_with_colored_vertices.cpp linear_cell_complex_4.cpp - Three "basic" examples, detailled in the user manual. + Three "basic" examples, detailed in the user manual. * plane_graph_to_lcc_2.cpp diff --git a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h index ee1e9271c46..f01ab8208f2 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h +++ b/Linear_cell_complex/examples/Linear_cell_complex/basic_viewer.h @@ -419,7 +419,7 @@ public: SMOOTH_NORMAL_MONO_FACES]); } else - { // Here user does not provide all vertex normals: we use face normal istead + { // Here user does not provide all vertex normals: we use face normal instead // and thus we will not be able to use Gourod add_normal(normal, arrays[m_started_face_is_colored? SMOOTH_NORMAL_COLORED_FACES: @@ -438,7 +438,7 @@ public: bool with_vertex_normal=(vertex_normals_for_face.size()==points_of_face.size()); - // (1) We insert all the edges as contraint in the CDT. + // (1) We insert all the edges as constraint in the CDT. typename CDT::Vertex_descriptor previous=NULL, first=NULL; for (int i=0; i typename LCC::Dart_descriptor import_from_plane_graph(LCC& alcc, diff --git a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h index 073f4603bd3..84fc7564bf2 100644 --- a/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/draw_linear_cell_complex.h @@ -162,7 +162,7 @@ public: /// @param alcc the lcc to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleLCCViewerQt(QWidget* parent, const LCC* alcc=nullptr, const char* title="Basic LCC Viewer", diff --git a/Mesh_2/include/CGAL/Mesh_2/Clusters.h b/Mesh_2/include/CGAL/Mesh_2/Clusters.h index 93a42015025..3359d142846 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Clusters.h +++ b/Mesh_2/include/CGAL/Mesh_2/Clusters.h @@ -70,7 +70,7 @@ public: /** \name Clusters public types */ /** - * `Cluster` register several informations about clusters. + * `Cluster` register information about clusters. * A cluster is a set of vertices v_i incident to one vertice * v_0, so that angles between segments [v_0, v_i] is less than 60 * degres. diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h b/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h index f5e9dfc41c4..1e3d68db287 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_faces.h @@ -256,7 +256,7 @@ public: /** * Adds the sequence `[begin, end[` to the list * of bad faces. - * Use this overriden function if the list of bad faces can be + * Use this overridden function if the list of bad faces can be * computed easily without testing all faces. * \param Fh_it is an iterator of `Face_Handle`. */ diff --git a/Mesh_3/doc/Mesh_3/Concepts/MeshCriteriaWithFeatures_3.h b/Mesh_3/doc/Mesh_3/Concepts/MeshCriteriaWithFeatures_3.h index 84a1f461abb..1a64924802c 100644 --- a/Mesh_3/doc/Mesh_3/Concepts/MeshCriteriaWithFeatures_3.h +++ b/Mesh_3/doc/Mesh_3/Concepts/MeshCriteriaWithFeatures_3.h @@ -8,7 +8,7 @@ the concepts `MeshCellCriteria_3` and `MeshFacetCriteria_3` describing the refinement criteria for, respectively, mesh cells and surface facets. For domains with features, the concept `MeshCriteriaWithFeatures_3` -additionnally encapsulates the +additionally encapsulates the concept `MeshEdgeCriteria_3`, that describes the requirements, in terms of sizing, for the discretization of the domain \f$ 1\f$-dimensional features. diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h index 53461adecf3..ded63f9b139 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -1471,7 +1471,7 @@ before_insertion_impl(const Facet& facet, error_msg << boost::format("Mesh_3 ERROR: " "A facet is not in conflict with its refinement point!\n" - "Debugging informations:\n" + "Debugging information:\n" " Facet: (%1%, %2%) = (%6%, %7%, %8%)\n" " Dual: %3%\n" " Refinement point: %5%\n" diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h index f8e614a3142..49569c8cb96 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h @@ -115,7 +115,7 @@ public: Compare_y_at_x_right_2; typedef typename Base_traits_2::Equal_2 Equal_2; - /// \name Overriden functors. + /// \name Overridden functors. //@{ class Compare_x_2 { private: diff --git a/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h b/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h index 15889b136d1..84562669878 100644 --- a/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h +++ b/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h @@ -274,7 +274,7 @@ private: // Construct the vertical decomposition of the given arrangement. void vertical_decomposition(Arrangement_2& arr) const { - // For each vertex in the arrangment, locate the feature that lies + // For each vertex in the arrangement, locate the feature that lies // directly below it and the feature that lies directly above it. Vert_decomp_list vd_list; CGAL::decompose(arr, std::back_inserter(vd_list)); diff --git a/Nef_3/include/CGAL/Nef_3/Binary_operation.h b/Nef_3/include/CGAL/Nef_3/Binary_operation.h index 4bfed515639..558e3e09f1c 100644 --- a/Nef_3/include/CGAL/Nef_3/Binary_operation.h +++ b/Nef_3/include/CGAL/Nef_3/Binary_operation.h @@ -450,7 +450,7 @@ class Binary_operation : public CGAL::SNC_decorator { // SNC structure finds an intersection between the segment defined // by an edge on the other SNC structure, the call back method is // called with the intersecting objects and the intersection point. - // The responsability of the call back functor is to construct the + // The responsibility of the call back functor is to construct the // local view on the intersection point on both SNC structures, // overlay them and add the resulting sphere map to the result. diff --git a/Nef_3/include/CGAL/Nef_3/Vertex.h b/Nef_3/include/CGAL/Nef_3/Vertex.h index f669ba7fcfc..0a1d7bc280e 100644 --- a/Nef_3/include/CGAL/Nef_3/Vertex.h +++ b/Nef_3/include/CGAL/Nef_3/Vertex.h @@ -128,7 +128,7 @@ class Vertex_base { Refs*& sncp() { return sncp_; } /* all sobjects of the local graph are stored in a global list - where each vertex has a continous range in each list for its + where each vertex has a continuous range in each list for its sobjects. All objects of the range [sxxx_begin_,sxxx_last_] belong to a vertex. This range is empty iff sxxx_begin_ == sxxx_last_ == sncp()->sxxx_end() diff --git a/Number_types/include/CGAL/MP_Float.h b/Number_types/include/CGAL/MP_Float.h index 030367c4ee9..02a050a863c 100644 --- a/Number_types/include/CGAL/MP_Float.h +++ b/Number_types/include/CGAL/MP_Float.h @@ -324,7 +324,7 @@ public: return exp + exponent_type(v.size()); } - // Rescale the value by some factor (in limbs). (substract the exponent) + // Rescale the value by some factor (in limbs). (subtract the exponent) void rescale(exponent_type scale) { if (v.size() != 0) diff --git a/Number_types/test/Number_types/Interval_nt.cpp b/Number_types/test/Number_types/Interval_nt.cpp index 7af20f02874..ab6a0bfd65e 100644 --- a/Number_types/test/Number_types/Interval_nt.cpp +++ b/Number_types/test/Number_types/Interval_nt.cpp @@ -257,7 +257,7 @@ bool multiplication_test() } // Here we test the specialized functions for IA. -// They are usually templated in CGAL, but I've overriden them. +// They are usually templated in CGAL, but I've overridden them. template < typename IA_nt > bool utility_test() diff --git a/OpenNL/include/CGAL/OpenNL/linear_solver.h b/OpenNL/include/CGAL/OpenNL/linear_solver.h index 33dccdcc6cb..1ab49080d17 100644 --- a/OpenNL/include/CGAL/OpenNL/linear_solver.h +++ b/OpenNL/include/CGAL/OpenNL/linear_solver.h @@ -77,7 +77,7 @@ private: // Public operations public: - // Default contructor, copy constructor, operator=() and destructor are fine + // Default constructor, copy constructor, operator=() and destructor are fine // Solve the sparse linear system "A*X = B" // Return true on success. The solution is then (1/D) * X. @@ -138,7 +138,7 @@ private: // Public operations public: - // Default contructor, copy constructor, operator=() and destructor are fine + // Default constructor, copy constructor, operator=() and destructor are fine // Solve the sparse linear system "A*X = B" // Return true on success. The solution is then (1/D) * X. diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index b2931f84429..3ba95f14ee6 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -277,7 +277,7 @@ public: // Non-necessary but just to be clear on the rule of 5: - // assignement operators deleted (PointRange is a ref) + // assignment operators deleted (PointRange is a ref) Orthtree& operator= (const Orthtree& other) = delete; Orthtree& operator= (Orthtree&& other) = delete; // Destructor diff --git a/Partition_2/include/CGAL/Partition_2/Partition_vertex_map.h b/Partition_2/include/CGAL/Partition_2/Partition_vertex_map.h index 68d60b66625..c2865a2af6e 100644 --- a/Partition_2/include/CGAL/Partition_2/Partition_vertex_map.h +++ b/Partition_2/include/CGAL/Partition_2/Partition_vertex_map.h @@ -332,7 +332,7 @@ std::ostream& operator<<(std::ostream& os, const Edge_list& edges) return os; } -} // namesapce Partition_2 +} // namespace Partition_2 template class Partition_vertex_map diff --git a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h index 395edef7a12..21d2156cd21 100644 --- a/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/draw_periodic_2_triangulation_2.h @@ -60,7 +60,7 @@ public: /// @param ap2t2 the p2t2 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimplePeriodic2Triangulation2ViewerQt(QWidget* parent, const P2T2& ap2t2, const char* title="Basic P2T2 Viewer", bool anofaces=false, diff --git a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_function_wrapper.h b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_function_wrapper.h index fba61fc6749..8bd0a7c2d32 100644 --- a/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_function_wrapper.h +++ b/Periodic_3_mesh_3/doc/Periodic_3_mesh_3/CGAL/Periodic_3_function_wrapper.h @@ -43,7 +43,7 @@ Illustration in 2D (cut view) of a domain defined by an implicit function artifi Any value of the function outside of the canonical cube is ignored. \cgalFigureEnd -Note also that when constructing artificially periodic functions, it is the responsability of the user +Note also that when constructing artificially periodic functions, it is the responsibility of the user to provide an input function that is compatible with the canonical cube (that is, whose isovalues are periodically continuous and without intersections). \cgalFigureRef{Periodic_3_mesh_3ContinuityIssue} is an example of a bad choice diff --git a/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h b/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h index a26050181ae..f013a73e9d8 100644 --- a/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h +++ b/Periodic_3_mesh_3/include/CGAL/refine_periodic_3_mesh_3.h @@ -165,7 +165,7 @@ void project_points(C3T3& c3t3, * * \attention Note that the triangulation must form at all times a simplicial complex within * a single copy of the domain (see Sections \ref P3Triangulation3secspace and \ref P3Triangulation3secintro - * of the manual of 3D periodic triangulations). It is the responsability of the user to provide + * of the manual of 3D periodic triangulations). It is the responsibility of the user to provide * a triangulation that satisfies this condition when calling the refinement * function `refine_periodic_3_mesh_3`. The underlying triangulation of a mesh * complex obtained through `make_periodic_3_mesh_3()` or `refine_periodic_3_mesh_3()` diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h index eec43a9514a..cc0b1b09eef 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h @@ -191,7 +191,7 @@ _test_cls_alpha_shape_3_exact() test_filtration(a1, verbose); std::cout << std::endl; - std::cout << "test additionnal creators and set mode" << std::endl; + std::cout << "test additional creators and set mode" << std::endl; Triangulation dt2(Lc.begin(), Lc.end()); Alpha_shape_3 a2(dt2, 0, Alpha_shape_3::REGULARIZED); diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_tds_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_tds_3.h index c664ac9e55e..30ba49c17fd 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_tds_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_tds_3.h @@ -55,7 +55,7 @@ _test_cls_periodic_3_tds_3( const Tds &) // Test I/O for dimension -2 // the other dimensions are not tested here - // (they are implicitely tested in triangulation) + // (they are implicitly tested in triangulation) Tds tdsfromfile; std::cout << " I/O" << std::endl; { diff --git a/Point_set_processing_3/examples/Point_set_processing_3/scale_estimation_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/scale_estimation_example.cpp index 440d113728e..708d774afc4 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/scale_estimation_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/scale_estimation_example.cpp @@ -49,7 +49,7 @@ int main (int argc, char** argv) // Example: use estimated range for grid simplification points.erase(CGAL::grid_simplify_point_set(points, range_scale), points.end()); - // print some informations on runtime + // print some information on runtime std::size_t memory = CGAL::Memory_sizer().virtual_size(); double time = task_timer.time(); diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h index 835862545fb..df943c84d67 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h @@ -187,7 +187,7 @@ public: : Base(t, crit), surface(s), oracle(o) {} public: - /* \name Overriden functions of this level */ + /* \name Overridden functions of this level */ Zone conflicts_zone_impl(const Point& p, Cell_handle c) const { Zone zone; 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 04a712e080f..89be04b67da 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h @@ -86,7 +86,7 @@ protected: } public: - /* Overriden functions of this level: */ + /* Overridden functions of this level: */ /* we override all methods that call test_if_cell_is_bad() */ void scan_triangulation_impl() diff --git a/Polygon/test/Polygon/PolygonTest.cpp b/Polygon/test/Polygon/PolygonTest.cpp index a36aeb86c26..fdc4330c6c3 100644 --- a/Polygon/test/Polygon/PolygonTest.cpp +++ b/Polygon/test/Polygon/PolygonTest.cpp @@ -52,7 +52,7 @@ void test_default_methods( vector& pvec0, x=p0; assert(x == p0); - // move assignement and constructor + // move assignment and constructor x.clear(); assert(x.is_empty()); x = std::move(p0); diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index e7345cd3c4c..3ca658cc2bd 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -400,7 +400,7 @@ note that a whole face of the cube (2 triangles) is exactly contained in the pla \subsubsection coref_ex_refine_subsec Boolean Operation and Local Remeshing This example is similar to the previous one, but here we -substract a volume and update the first input triangulated surface mesh +subtract a volume and update the first input triangulated surface mesh (in-place operation). The edges that are on the intersection of the input meshes are marked and the region around them is remeshed isotropically while preserving the intersection polyline. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index 10ab1ec8854..39d23677627 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -1145,7 +1145,7 @@ volume_connected_components(const TriangleMesh& tm, if (is_cc_outward_oriented[cc_id]==is_cc_outward_oriented[ncc_id]) { // the surface component has an incorrect orientation wrt to its parent: - // we dump it and all included surface components as independant volumes. + // we dump it and all included surface components as independent volumes. cc_volume_ids[ncc_id] = next_volume_id++; error_codes.push_back(INCOMPATIBLE_ORIENTATION); if (used_as_a_predicate) return 0; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h index 5766b85593f..7c14738dcc2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h @@ -84,7 +84,7 @@ struct PM_to_PS_point_converter > /// /// \cgalAdvancedBegin /// `PolygonRange` can also be a model of the concepts `RandomAccessContainer` and `BackInsertionSequence` -/// whose value type is an array, but it is the user's responsability to ensure that +/// whose value type is an array, but it is the user's responsibility to ensure that /// all faces have the same number of vertices, and that this number is equal to the size of the array. /// \cgalAdvancedEnd /// diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h index 2a268e7844c..d479b6d7d1b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_faces.h @@ -51,7 +51,7 @@ namespace Triangulate_faces * %Default new face visitor model of `PMPTriangulateFaceVisitor`. * All its functions have an empty body. This class can be used as a * base class if only some of the functions of the concept require to be -* overriden. +* overridden. */ template struct Default_visitor { diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index 038dcee122d..d3cde58c956 100644 --- a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -42,7 +42,7 @@ namespace internal { }; -} // namesapce internal +} // namespace internal template class Polyhedral_envelope_filter diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h index 8a7c309017c..e90637f0b03 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_function.h @@ -329,7 +329,7 @@ launch() std::cerr << "Full refinement time (without fix_c3t3): " << t.time() << " seconds." << std::endl; #endif - // Ensure c3t3 is ok (usefull if process has been stop by the user) + // Ensure c3t3 is ok (useful if process has been stop by the user) mesher_->fix_c3t3(); std::cerr<<"Done."<helpButton, &QPushButton::clicked,this, [this](){ QMessageBox::information(dock_widget, QString("Animation"), - QString("The TRJS format contains informations for a succession of modifications on a Surface Mesh. " + QString("The TRJS format contains information for a succession of modifications on a Surface Mesh. " "Such a modification is called a frame, and every frame is composed with a ligne for the " "number of points modified, and one ligne per modified point and its index.\n\n" "Example:\n\n" diff --git a/Polyhedron/demo/Polyhedron/Scene_lcc_item.cpp b/Polyhedron/demo/Polyhedron/Scene_lcc_item.cpp index 474fa3a78ed..1247ab267f1 100644 --- a/Polyhedron/demo/Polyhedron/Scene_lcc_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_lcc_item.cpp @@ -164,7 +164,7 @@ struct lcc_priv{ P_traits cdt_traits(f.normal); CDT cdt(cdt_traits); - // (1) We insert all the edges as contraint in the CDT. + // (1) We insert all the edges as constraint in the CDT. typename CDT::Vertex_handle previous=nullptr, first=nullptr; for (unsigned int i=0; isetUniformValue("alpha", 1.0f); //overriden in item draw() if necessary + program->setUniformValue("alpha", 1.0f); //overridden in item draw() if necessary default: break; } diff --git a/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h b/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h index 95530350f51..363ef73cfa2 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h +++ b/Polyhedron/include/CGAL/Polyhedron_3_to_lcc.h @@ -24,7 +24,7 @@ namespace CGAL { /** Import a given Polyhedron_3 into a Linear_cell_complex. * @param alcc the linear cell complex where Polyhedron_3 will be converted. * @param apoly the Polyhedron. - * @return A dart created during the convertion. + * @return A dart created during the conversion. */ template< class LCC, class Polyhedron > typename LCC::Dart_descriptor import_from_polyhedron_3(LCC& alcc, @@ -94,7 +94,7 @@ namespace CGAL { /** Convert a Polyhedron_3 read into a flux into 3D linear cell complex. * @param alcc the linear cell complex where Polyhedron_3 will be converted. * @param ais the istream where read the Polyhedron_3. - * @return A dart created during the convertion. + * @return A dart created during the conversion. */ template < class LCC > typename LCC::Dart_descriptor diff --git a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h index 1b553c2dcca..45bacc2bcea 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h @@ -67,7 +67,7 @@ If during the algorithm the program should output some information (e.g., during the debugging phase) you can turn on the output information by giving the compiler flag debug. In the file width_assertions.h you can turn on/off the output of some -functions and additional informations by changing the defined values +functions and additional information by changing the defined values from 0 (no output) to 1 (output available). But then it is required that the `operator<<()` has to been overloaded for `Point_3`, `Plane_3`, `Vector_3` and `RT`. diff --git a/Polytope_distance_d/include/CGAL/Width_3.h b/Polytope_distance_d/include/CGAL/Width_3.h index f4e3e037c9f..b8ed054c3c5 100644 --- a/Polytope_distance_d/include/CGAL/Width_3.h +++ b/Polytope_distance_d/include/CGAL/Width_3.h @@ -264,7 +264,7 @@ class Width_3 { // *** NEIGHBORS_OF *** //---------------------- - //To compute the neighbors of a vertex. The vertex is implicitely given + //To compute the neighbors of a vertex. The vertex is implicitly given //as the vertex the halfedge points to. template void neighbors_of(const Halfedge_handle_& h, diff --git a/Ridges_3/doc/Ridges_3/PackageDescription.txt b/Ridges_3/doc/Ridges_3/PackageDescription.txt index 6146a981f78..d34109ac8e3 100644 --- a/Ridges_3/doc/Ridges_3/PackageDescription.txt +++ b/Ridges_3/doc/Ridges_3/PackageDescription.txt @@ -10,7 +10,7 @@ \cgalPkgPicture{RidgesMechPartDetail.png} \cgalPkgSummaryBegin \cgalPkgAuthors{Marc Pouget and Frédéric Cazals} -\cgalPkgDesc{Global features related to curvature extrema encode important informations used in segmentation, registration, matching and surface analysis. Given pointwise estimations of local differential quantities, this package allows the approximation of differential features on a triangulated surface mesh. Such curvature related features are curves: ridges or crests, and points: umbilics.} +\cgalPkgDesc{Global features related to curvature extrema encode important information used in segmentation, registration, matching and surface analysis. Given pointwise estimations of local differential quantities, this package allows the approximation of differential features on a triangulated surface mesh. Such curvature related features are curves: ridges or crests, and points: umbilics.} \cgalPkgManuals{Chapter_Approximation_of_Ridges_and_Umbilics_on_Triangulated_Surface_Meshes,PkgRidges3Ref} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin diff --git a/Ridges_3/doc/Ridges_3/Ridges_3.txt b/Ridges_3/doc/Ridges_3/Ridges_3.txt index e6ef0d7877d..e060ec4d1c4 100644 --- a/Ridges_3/doc/Ridges_3/Ridges_3.txt +++ b/Ridges_3/doc/Ridges_3/Ridges_3.txt @@ -20,7 +20,7 @@ umbilic is a point at which both principal curvatures are equal. Ridges define a singular curve, i.e., a self-intersecting curve, and umbilics are special points on this curve. Ridges are curves of extremal curvature and therefore encode important -informations used in segmentation, registration, matching and surface +information used in segmentation, registration, matching and surface analysis. Based on the results of the article \cgalCite{cgal:cp-tdare-05}, we propose algorithms to identify and extract different parts of this singular ridge curve as well as umbilics on a diff --git a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index 3ab95555707..1bb2cfd7ede 100644 --- a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -131,7 +131,7 @@ namespace CGAL { }; // end class template C3t3_helper_class } // end namespace SMDS_3::details - } //end namesapce SMDS_3 + } //end namespace SMDS_3 /*! \ingroup PkgSMDS3Classes @@ -298,7 +298,7 @@ public: Mesh_complex_3_in_triangulation_3(Self&& rhs); /** - * Assignement operator, also serves as move-assignement + * Assignement operator, also serves as move-assignment */ Self& operator=(Self rhs) { @@ -1729,7 +1729,7 @@ Mesh_complex_3_in_triangulation_3() , manifold_info_initialized_(false) //TODO: parallel! { // We don't put it in the initialization list because - // std::atomic has no contructors + // std::atomic has no constructor number_of_facets_ = 0; number_of_cells_ = 0; } diff --git a/Segment_Delaunay_graph_2/TODO b/Segment_Delaunay_graph_2/TODO index 50b898516f5..416e761e6c7 100644 --- a/Segment_Delaunay_graph_2/TODO +++ b/Segment_Delaunay_graph_2/TODO @@ -1,6 +1,6 @@ - For release: * add example that demostrates how to get edge info - * remove enumeration type Arrangment_type as an enum type and add small + * remove enumeration type Arrangement_type as an enum type and add small is_*() methods that query the type * add test suites for {insert,remove}_degree_2 in TDS_2 * add test suites for join_vertices & split_vertex in TDS_2 diff --git a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h index 677d942fe8f..3d1de41b15d 100644 --- a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h +++ b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphTraits_2.h @@ -374,7 +374,7 @@ Arrangement_type_2 arrangement_type_2_object(); /// @} -/// \name Access to contructor objects +/// \name Access to constructor objects /// @{ /*! diff --git a/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h b/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h index 0a2926ff5c1..0e47e201ea5 100644 --- a/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h +++ b/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h @@ -107,5 +107,5 @@ bool is_pullout_direction const CastingTraits_2& traits = CastingTraits_2()); } // namespace Single_mold_translational_casting -} // namesapce Set_movable_separability_2 -} // namesapce CGAL +} // namespace Set_movable_separability_2 +} // namespace CGAL diff --git a/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h b/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h index 756c3585de1..d4dcb95b7d8 100644 --- a/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h +++ b/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h @@ -65,5 +65,5 @@ pullout_directions CastingTraits_2& traits = CastingTraits_2()); } // namespace Single_mold_translational_casting -} // namesapce Set_movable_separability_2 -} // namesapce CGAL +} // namespace Set_movable_separability_2 +} // namespace CGAL diff --git a/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h b/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h index 7008a65cbb1..d6f1f4bd9d5 100644 --- a/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h +++ b/Set_movable_separability_2/doc/Set_movable_separability_2/CGAL/Set_movable_separability_2/Single_mold_translational_casting/top_edges.h @@ -63,5 +63,5 @@ OutputIterator top_edges(const CGAL::Polygon_2& polygon, CastingTraits_2& traits = CastingTraits_2()); } // namespace Single_mold_translational_casting -} // namesapce Set_movable_separability_2 -} // namesapce CGAL +} // namespace Set_movable_separability_2 +} // namespace CGAL diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h index c7af343c723..b545c91acaa 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h @@ -198,7 +198,7 @@ is_pullout_direction(const CGAL::Polygon_2& pgn, } } // namespace Single_mold_translational_casting -} // namesapce Set_movable_separability_2 -} // namesapce CGAL +} // namespace Set_movable_separability_2 +} // namespace CGAL #endif diff --git a/Snap_rounding_2/examples/Snap_rounding_2/snap_rounding_data.cpp b/Snap_rounding_2/examples/Snap_rounding_2/snap_rounding_data.cpp index 948497fdc98..75577b920ea 100644 --- a/Snap_rounding_2/examples/Snap_rounding_2/snap_rounding_data.cpp +++ b/Snap_rounding_2/examples/Snap_rounding_2/snap_rounding_data.cpp @@ -13,8 +13,8 @@ /* Usage * - * This example converts arbitrary-precision arrangment into fixed-precision using Snap Rounding and by using INPUT DATA FROM A USER SPECIFIED FILE. - * (Mandatory) path to the input file containing the arrangment information. + * This example converts arbitrary-precision arrangement into fixed-precision using Snap Rounding and by using INPUT DATA FROM A USER SPECIFIED FILE. + * (Mandatory) path to the input file containing the arrangement information. * (Optional) path to the output file where the results of snap rounding will be stored. * Not providing this argument will print the result on standard output. * diff --git a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h index a391e44029a..ea8ea6cb087 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h @@ -254,7 +254,7 @@ construct_trisegment ( Segment_2_with_ID const& e0, // If the lines intersect to the left, the returned distance is positive. // If the lines intersect to the right, the returned distance is negative. // If the lines do not intersect, for example, for collinear edges, or parallel edges but with the same orientation, -// returns 0 (the actual distance is undefined in this case, but 0 is a usefull return) +// returns 0 (the actual distance is undefined in this case, but 0 is a useful return) // // NOTE: The result is a explicit rational number returned as a tuple (num,den); the caller must check that den!=0 manually // (a predicate for instance should return indeterminate in this case) diff --git a/Stream_support/include/CGAL/IO/OFF/File_header_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_header_OFF.h index 90430f40805..42e74c13670 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_header_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_header_OFF.h @@ -29,7 +29,7 @@ class CGAL_EXPORT File_header_OFF : public File_header_extended_OFF { private: - // Publicly accessible file informations. + // Publicly accessible file information. std::size_t n_vertices; std::size_t n_facets; bool m_skel; // SKEL format instead of OFF. @@ -37,7 +37,7 @@ private: bool m_no_comments; // no comments in output. std::size_t m_offset; // index offset for vertices, usually 0. - // Publicly accessible but not that well supported file informations. + // Publicly accessible but not that well supported file information. bool m_textures; // STOFF detected. bool m_colors; // COFF detected. protected: @@ -46,7 +46,7 @@ protected: private: bool m_normals; // NOFF format stores also normals at vertices. - // More privately used file informations to scan the file. + // More privately used file information to scan the file. bool m_tag4; // 4OFF detected. bool m_tagDim; // nOFF detected (will not be supported). int m_dim; // dimension for nOFF (will not be supported). diff --git a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h index eab0b8e36f7..25a9223c968 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h @@ -789,7 +789,7 @@ public: void skip_to_next_facet(std::size_t current_facet) { - // Take care of trailing informations like color triples. + // Take care of trailing information like color triples. if(binary()) { boost::int32_t k; diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp index 2210c138abe..7f5113cfd2c 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session.cpp @@ -58,7 +58,7 @@ void read_handle_difs_and_deform(DeformMesh& deform_mesh, InputIterator begin, I CGAL::Timer timer; //the original behavior of translate was to overwrite the previous - //translation. Now that it is cumulative, we need to substract the + //translation. Now that it is cumulative, we need to subtract the //previous translation vector to mimic the overwrite Vector previous(0,0,0); for(std::size_t i = 0; i < dif_vector.size(); ++i) diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp index fe1aded57c0..2df25ab3374 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp @@ -75,7 +75,7 @@ void read_handle_difs_and_deform(DeformMesh& deform_mesh, InputIterator begin, I CGAL::Timer timer; //the original behavior of translate was to overwrite the previous - //translation. Now that it is cumulative, we need to substract the + //translation. Now that it is cumulative, we need to subtract the //previous translation vector to mimic the overwrite Vector previous(0,0,0); for(std::size_t i = 0; i < dif_vector.size(); ++i) diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h index 5c59ddf65fb..a11066435a3 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h @@ -48,7 +48,7 @@ namespace internal { }; -} // namesapce internal +} // namespace internal template inline bool handle_assigned(Handle h) { Handle null; return h != null; } diff --git a/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt b/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt index f5d5e9599aa..5b83016393d 100644 --- a/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt +++ b/Surface_mesh_topology/doc/Surface_mesh_topology/Surface_mesh_topology.txt @@ -48,7 +48,7 @@ The algorithms used are based on a paper by Erickson and Whittlesey \cgalCite{ew \subsection SMTopology_simplicity Simplicity Test -Given a cycle drawn on a surface one can ask if the cycle can be continously deformed to a cycle that does not intersect with itself. Any contractible cycle deforms to a simple cycle but this is not true for more complicated cycles. The algorithm in this section is purely topological and do not assume any geometry on the input surface. +Given a cycle drawn on a surface one can ask if the cycle can be continuously deformed to a cycle that does not intersect with itself. Any contractible cycle deforms to a simple cycle but this is not true for more complicated cycles. The algorithm in this section is purely topological and do not assume any geometry on the input surface. The algorithm implemented in this package builds a data structure to efficiently answer queries of the following forms: - Given a combinatorial surface \f$\cal{M}\f$ and a closed combinatorial curve specified as a sequence of edges of \f$\cal{M}\f$, decide if the curve is homotopic to a simple one on \f$\cal{M}\f$. diff --git a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h index e438852c8a4..847d6e2b7e9 100644 --- a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h +++ b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Minimal_quadrangulation.h @@ -1333,7 +1333,7 @@ protected: { return get_dart_id(dh2)-get_dart_id(dh1); } - // here we have to add the degree (i.e. substract the vertex info) + // here we have to add the degree (i.e. subtract the vertex info) return get_dart_id(dh2)-get_local_map().template info<0>(dh1)-get_dart_id(dh1); } // here we know there is a hole just before the dart 0 (plus maybe other ones) @@ -1356,7 +1356,7 @@ protected: { return get_dart_id(dh1)-get_dart_id(dh2); } - // here we have to add the degree (i.e. substract the vertex info) + // here we have to add the degree (i.e. subtract the vertex info) return get_dart_id(dh1)-get_local_map().template info<0>(dh1)-get_dart_id(dh2); } // here we know there is a hole just before the dart 0 (plus maybe other ones) diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index b2da95cc935..f76c4846d3c 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -101,7 +101,7 @@ public: /// @param alcc the lcc to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; - /// this can be usefull for very big object where this time could be long) + /// this can be useful for very big object where this time could be long) Face_graph_with_path_viewer(QWidget* parent, const Mesh& amesh, const std::vector diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h index e4bfadbdf72..e2b9cd4720a 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h @@ -387,7 +387,7 @@ namespace CGAL { error_msg << boost::format("Surface_mesher ERROR: " "A facet is not in conflict with its refinement point!\n" - "Debugging informations:\n" + "Debugging information:\n" " Facet: (%1%, %2%) = (%6%, %7%, %8%)\n" " Dual: (%3%, %4%)\n" " Refinement point: %5%\n") diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h index dd8215e67a1..4574a959a1e 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h @@ -299,7 +299,7 @@ public: * structure, and to construct/destroy the elements in that * memory. The type must meet the requirements of Allocator. * \tparam Subcurve_ the type of the subcurve or Default. If the default is not - * overriden it implies that the type is + * overridden it implies that the type is * No_overlap_subcurve */ template load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) = 0; //!Specifies if the io_plugin can save the item or not. - //!This must be overriden. + //!This must be overridden. virtual bool canSave(const Scene_item*) = 0; //!Saves one or more items in the file corresponding to the path //!contained in fileinfo. Returns false if error. - //! This must be overriden. + //! This must be overridden. //! @attention When a file is successfully saved, it must be removed from the //! list. virtual bool save(QFileInfo fileinfo,QList& ) = 0; diff --git a/Three/include/CGAL/Three/Scene_group_item.h b/Three/include/CGAL/Three/Scene_group_item.h index 09b0cdec6cb..af3f89ceb01 100644 --- a/Three/include/CGAL/Three/Scene_group_item.h +++ b/Three/include/CGAL/Three/Scene_group_item.h @@ -203,7 +203,7 @@ public : //! //! When a `Scene_group_item` is added to the selection of the scene, //! this function defines which of its children will be added too. - //! Typically overriden to allow applying an operation from the + //! Typically overridden to allow applying an operation from the //! Operation menu only to the parent item and not to its children. virtual QList getChildrenForSelection() const {return *children;} //!Removes a Scene_item from the list of children. diff --git a/Three/include/CGAL/Three/Scene_item.h b/Three/include/CGAL/Three/Scene_item.h index 6c2c43de591..824b2279d8f 100644 --- a/Three/include/CGAL/Three/Scene_item.h +++ b/Three/include/CGAL/Three/Scene_item.h @@ -301,13 +301,13 @@ public: //! //! \brief newViewer adds Vaos for `viewer`. //! - //! Must be overriden; + //! Must be overridden; //! virtual void newViewer(CGAL::Three::Viewer_interface* viewer) = 0; //! //! \brief removeViewer removes the Vaos fo `viewer`. //! - //! Must be overriden; + //! Must be overridden; //! virtual void removeViewer(CGAL::Three::Viewer_interface* viewer) = 0; @@ -384,7 +384,7 @@ public Q_SLOTS: //! Sets the value of the aplha Slider for this item. //! - //! Must be overriden; + //! Must be overridden; //! \param alpha must be between 0 and 255 virtual void setAlpha(int alpha); //!Selects a point through raycasting. diff --git a/Three/include/CGAL/Three/TextRenderer.h b/Three/include/CGAL/Three/TextRenderer.h index f55f2b83999..c5c729ec032 100644 --- a/Three/include/CGAL/Three/TextRenderer.h +++ b/Three/include/CGAL/Three/TextRenderer.h @@ -38,7 +38,7 @@ public : */ TextItem() {} /*! - * \brief The construtor for the TextItem + * \brief The constructor for the TextItem * \param p_x, p_y, p_z the coordinates of the TextItem. * \param p_text the text to render. * \param p_3D @@ -183,7 +183,7 @@ protected: QList textItems; //!\brief List of `TextItem`s //! - //! Usually fed by the viewer, it holds the text informations from the + //! Usually fed by the viewer, it holds the text information from the //! viewer that are displayed directly on the screen, like the fps, //! the distances, etc. QList local_textItems; diff --git a/Triangulation/doc/Triangulation/Concepts/TriangulationDSFace.h b/Triangulation/doc/Triangulation/Concepts/TriangulationDSFace.h index a5ce1162ecf..24188ada103 100644 --- a/Triangulation/doc/Triangulation/Concepts/TriangulationDSFace.h +++ b/Triangulation/doc/Triangulation/Concepts/TriangulationDSFace.h @@ -10,7 +10,7 @@ It gives access to a handle to a full cell `c` containing the face `c`. It must hold that `f` is a proper face of full cell `c`, i.e., the dimension of `f` is strictly less than the dimension of `c`. -The dimension of a face is implicitely set when +The dimension of a face is implicitly set when `TriangulationDSFace::set_index` is called. For example, if `TriangulationDSFace::set_index` is called two times to set the first two vertices (`i = 0` and `i = 1`), then the dimension is 1. diff --git a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h index 9a68ba05686..3160ff8dadf 100644 --- a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h +++ b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h @@ -618,7 +618,7 @@ When `verbose` is set to `true`, messages are printed to give a precise indication on the kind of invalidity encountered. Returns `true` if all the tests pass, `false` if any test fails. See -the documentation for the models of this concept to see the additionnal (if +the documentation for the models of this concept to see the additional (if any) validity checks that they implement. \cgalDebugEnd */ @@ -711,7 +711,7 @@ It must at least check that `v` has an incident full cell, which in turn must contain `v` as one of its vertices. Returns `true` if all the tests pass, `false` if any test fails. See -the documentation for the models of this concept to see the additionnal (if +the documentation for the models of this concept to see the additional (if any) validity checks that they implement. \cgalDebugEnd */ @@ -985,7 +985,7 @@ It must at least check that for each existing neighbor `n`, `c` is also a neighbor of `n`. Returns `true` if all the tests pass, `false` if any test fails. See -the documentation for the models of this concept to see the additionnal (if +the documentation for the models of this concept to see the additional (if any) validity checks that they implement. \cgalDebugEnd */ diff --git a/Triangulation_2/TODO b/Triangulation_2/TODO index de29fdc9bdb..c4e68d1d6f0 100644 --- a/Triangulation_2/TODO +++ b/Triangulation_2/TODO @@ -52,7 +52,7 @@ ou de la face infini par power_test_2(p,q,r) -- Check if copy constructor and assignement operator of +- Check if copy constructor and assignment operator of constrained triangulation transfers the contrained marks. - Something still tobe done for remove in Constrained Delaunay_constrained and Constrained_triangulation_plus diff --git a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h index eb0becc4918..e8e4341b76f 100644 --- a/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h +++ b/Triangulation_2/doc/Triangulation_2/CGAL/Triangulation_2.h @@ -413,7 +413,7 @@ Triangulation_2 operator=(const Triangulation_2& tr); /*! The triangulations `tr` and `*this` are swapped. -This method should be used instead of assignment of copy construtor. +This method should be used instead of assignment of copy constructor. if `tr` is deleted after that. */ void swap(Triangulation_2& tr); diff --git a/Triangulation_2/examples/Triangulation_2/adding_handles.cpp b/Triangulation_2/examples/Triangulation_2/adding_handles.cpp index e032e761a9a..5af7f54aa2f 100644 --- a/Triangulation_2/examples/Triangulation_2/adding_handles.cpp +++ b/Triangulation_2/examples/Triangulation_2/adding_handles.cpp @@ -2,7 +2,7 @@ #include #include -/* A vertex class with an additionnal handle */ +/* A vertex class with an additional handle */ template < class Gt, class Vb = CGAL::Triangulation_vertex_base_2 > class My_vertex_base : public Vb diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 56a07c13fa8..1db5d55874a 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -690,7 +690,7 @@ flip (Face_handle& f, int i) Face_handle g = f->neighbor(i); int j = mirror_index(f,i); - // save wings neighbors to be able to restore contraint status + // save wings neighbors to be able to restore constraint status Face_handle f1 = f->neighbor(cw(i)); int i1 = mirror_index(f,cw(i)); Face_handle f2 = f->neighbor(ccw(i)); diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h index fd9ecd9244d..ceb6d598707 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h @@ -457,7 +457,7 @@ remove_constraint(T va, T vb){ CGAL_assertion(scit != sc_to_c_map.end()); H_context_list* hcl = scit->second; - // and remove the contraint from the context list of the subcontraint + // and remove the constraint from the context list of the subcosntraints for(H_context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) { if(ctit->enclosing == hvl){ hcl->erase(ctit); diff --git a/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h b/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h index d8aa3ccf92f..322f4837f4e 100644 --- a/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_constrained_triangulation_2.h @@ -40,7 +40,7 @@ public: /// @param at2 the t2 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleConstrainedTriangulation2ViewerQt(QWidget* parent, const T2& at2, InDomainPmap ipm, const char* title="Basic CDT2 Viewer", diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 8a82e5e3dcb..4c194f40dd4 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -54,7 +54,7 @@ public: /// @param at2 the t2 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleTriangulation2ViewerQt(QWidget* parent, const T2& at2, const char* title="Basic T2 Viewer", bool anofaces=false, diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_constrained_triangulation_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_constrained_triangulation_2.h index 2fc501ad48c..558f714c546 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_constrained_triangulation_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_constrained_triangulation_2.h @@ -211,7 +211,7 @@ _test_cls_constrained_triangulation(const Triang &) T2_5.is_valid(); - // test assignement operator + // test assignment operator Triang Taux = T2_2; assert( Taux.dimension() == 2 ); assert( Taux.number_of_vertices() == 20); diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_regular_triangulation_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_regular_triangulation_2.h index 26c097e2f91..2d5656c93b2 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_regular_triangulation_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_regular_triangulation_2.h @@ -311,7 +311,7 @@ _test_cls_regular_triangulation_2( const Triangulation & ) assert( T0_1_1.number_of_vertices() == 1 ); assert( T0_1_1.is_valid(verbose) ); - // test assignement + // test assignment Cls T0_1_2; T0_1_2 = T0_1; assert( T0_1_2.dimension() == 0 ); diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index d7b294fa164..ddea4548d1b 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -56,7 +56,7 @@ public: /// @param at3 the t3 to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be - /// usefull for very big object where this time could be long) + /// useful for very big object where this time could be long) SimpleTriangulation3ViewerQt(QWidget* parent, const T3& at3, const char* title="Basic T3 Viewer", diff --git a/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h index 58ba387b755..b8dd0b0678c 100644 --- a/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/CGAL/Delaunay_triangulation_on_sphere_2.h @@ -76,7 +76,7 @@ public: introduces an empty triangulation whose center and radius are set according to values within the traits and inserts the point range `[first;beyond[`. - \warning It is the user's responsability to ensure that the center and radius are set as intended in `gt`. + \warning It is the user's responsibility to ensure that the center and radius are set as intended in `gt`. \tparam PointOnSphereIterator must be a model of `InputIterator` with value type `Point_on_sphere_2` or `Point_3`. */ @@ -164,7 +164,7 @@ public: \tparam OutItBoundaryEdges is an output iterator with `Edge` as value type. \warning This function makes uses of the member `tds_data` (see the concept `TriangulationDSFaceBase_2`) - of the face to mark faces in conflict. It is the responsability of the user to make sure the flags are cleared. + of the face to mark faces in conflict. It is the responsibility of the user to make sure the flags are cleared. \pre `dimension() == 2`. */ diff --git a/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/Triangulation_on_sphere_2.txt b/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/Triangulation_on_sphere_2.txt index 71cdf0206ac..eb04ce3ebc2 100644 --- a/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/Triangulation_on_sphere_2.txt +++ b/Triangulation_on_sphere_2/doc/Triangulation_on_sphere_2/Triangulation_on_sphere_2.txt @@ -181,7 +181,7 @@ is also interesting. The two natural embedding of edges and faces of a triangula of points on \f$ \mathbb{S}\f$ are to use either straight simplex, that is using three-dimensional segments and triangles for the edges and faces of the triangulation, or to use a curved embedding, where the edges are arc segments of great circles over \f$ \mathbb{S}\f$. -In the latter choice, the geometrical embedding of the face is defined implicitely by its three edges. +In the latter choice, the geometrical embedding of the face is defined implicitly by its three edges. Both choices are available to users, for example using either `Triangulation_on_sphere_2::segment()` or `Triangulation_on_sphere_2::segment_on_sphere()`. Similar choices are available in the construction diff --git a/Visibility_2/test/Visibility_2/include/CGAL/test_utils.h b/Visibility_2/test/Visibility_2/include/CGAL/test_utils.h index a57dee947cf..ae73bcd811e 100644 --- a/Visibility_2/test/Visibility_2/include/CGAL/test_utils.h +++ b/Visibility_2/test/Visibility_2/include/CGAL/test_utils.h @@ -503,7 +503,7 @@ void run_tests_with_changes_to_arr() { if (!all_passed) { - std::cout << "\tFailed: Modifying attached arrangment causes wrong output.\n"; + std::cout << "\tFailed: Modifying attached arrangement causes wrong output.\n"; assert(false); } else { std::cout << "\tPassed.\n" ; From 3674c937f768925f82ac2d4c7508c9c7b3f3e7bc Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 15 Nov 2022 15:21:01 +0100 Subject: [PATCH 157/426] spelling corrections Some spelling corrections (Directories starting with `M`-` N`), some backward work some forward work --- .../doc/AABB_tree/Concepts/AABBGeomTraits.h | 2 +- .../CGAL/Arr_accessor.h | 2 +- .../Concepts/ArrangementInputFormatter.h | 2 +- .../Concepts/ArrangementOutputFormatter.h | 2 +- .../dcel_extension.cpp | 2 +- .../include/CGAL/Arr_accessor.h | 6 ++--- .../include/CGAL/Arr_extended_dcel.h | 2 +- .../Arr_landmarks_pl_impl.h | 6 ++--- .../Arr_walk_along_line_pl_impl.h | 2 +- .../Arr_spherical_construction_helper.h | 2 +- .../Arr_unb_planar_construction_helper.h | 2 +- .../Arr_unb_planar_topology_traits_2_impl.h | 4 +-- .../Arrangement_on_surface_2_impl.h | 2 +- .../Arrangement_2/Arrangement_zone_2_impl.h | 2 +- .../include/CGAL/Arrangement_on_surface_2.h | 22 ++++++++-------- .../include/CGAL/IO/Arrangement_2_reader.h | 2 +- .../include/CGAL/IO/Arrangement_2_writer.h | 2 +- .../Arr_construction_ss_visitor.h | 2 +- .../include/CGAL/graph_traits_Arrangement_2.h | 2 +- .../include/CGAL/connect_holes.h | 2 +- Documentation/doc/biblio/geom.bib | 2 +- Maintenance/deb/sid/debian/NEWS.Debian | 2 +- Maintenance/deb/sid/debian/README.Debian | 2 +- Maintenance/deb/sid/debian/changelog | 4 +-- Maintenance/deb/sid/debian/copyright | 4 +-- Maintenance/deb/squeeze/debian/NEWS.Debian | 2 +- Maintenance/deb/squeeze/debian/README.Debian | 2 +- Maintenance/deb/squeeze/debian/changelog | 4 +-- Maintenance/deb/squeeze/debian/copyright | 4 +-- Maintenance/deb/wheezy/debian/NEWS.Debian | 2 +- Maintenance/deb/wheezy/debian/README.Debian | 2 +- Maintenance/deb/wheezy/debian/changelog | 4 +-- Maintenance/deb/wheezy/debian/copyright | 4 +-- .../boost/user-config.jam | 2 +- .../testsuite_comparison/fill_empty_lines.js | 2 +- .../doc/Matrix_search/CGAL/Dynamic_matrix.h | 2 +- Mesh_2/TODO | 2 +- .../Mesh_2/Concepts/DelaunayMeshFaceBase_2.h | 2 +- Mesh_2/examples/Mesh_2/mesh_class.cpp | 6 ++--- .../CGAL/Constrained_voronoi_diagram_2.h | 2 +- .../Delaunay_mesher_no_edge_refinement_2.h | 6 ++--- Mesh_2/include/CGAL/Mesh_2/Clusters.h | 6 ++--- .../include/CGAL/Mesh_2/Do_not_refine_edges.h | 2 +- Mesh_2/include/CGAL/Mesh_2/Refine_edges.h | 4 +-- .../CGAL/Mesh_2/Refine_edges_visitor.h | 2 +- .../CGAL/Mesh_2/Refine_edges_with_clusters.h | 4 +-- .../include/CGAL/Triangulation_conformer_2.h | 2 +- Mesh_3/doc/Mesh_3/CGAL/Image_3.h | 2 +- .../Mesh_3/CGAL/Polyhedral_mesh_domain_3.h | 2 +- .../Mesh_3/mesh_hybrid_mesh_domain.cpp | 2 +- Mesh_3/include/CGAL/Mesh_3/Mesher_level.h | 2 +- .../CGAL/Mesh_3/Protect_edges_sizing_field.h | 2 +- .../Mesh_3/Robust_intersection_traits_3.h | 2 +- Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h | 10 +++---- Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h | 2 +- .../CGAL/Meshes/Filtered_deque_container.h | 2 +- .../CGAL/Meshes/Filtered_multimap_container.h | 2 +- Mesher_level/include/CGAL/Mesher_level.h | 2 +- .../CGAL/Meshes/Double_map_container.h | 2 +- .../CGAL/Meshes/Filtered_queue_container.h | 2 +- .../CGAL/Meshes/Simple_map_container.h | 2 +- .../CGAL/Meshes/Simple_queue_container.h | 2 +- .../CGAL/Meshes/Simple_set_container.h | 2 +- .../Minkowski_sum_2/Arr_labeled_traits_2.h | 2 +- .../Decomposition_strategy_adapter.h | 2 +- .../CGAL/Minkowski_sum_2/Hole_filter_2.h | 4 +-- .../include/CGAL/Minkowski_sum_2/Labels.h | 2 +- .../Minkowski_sum_by_reduced_convolution_2.h | 2 +- .../Minkowski_sum_2/Minkowski_sum_conv_2.h | 4 +-- .../Minkowski_sum_2/Minkowski_sum_decomp_2.h | 8 +++--- .../CGAL/Polygon_vertical_decomposition_2.h | 4 +-- ...mall_side_angle_bisector_decomposition_2.h | 6 ++--- .../CGAL/Minkowski_sum_3/Gaussian_map.h | 2 +- .../Miscellany/CGAL/Handle_hash_function.h | 2 +- Miscellany/doc/Miscellany/CGAL/Real_timer.h | 2 +- Miscellany/doc/Miscellany/CGAL/Timer.h | 2 +- .../doc/Miscellany/CGAL/Unique_hash_map.h | 2 +- .../Modular_arithmetic/modular_filter.cpp | 2 +- .../CGAL/Modular_arithmetic/Residue_type.h | 2 +- .../Modular_arithmetic/Modular_traits.cpp | 2 +- .../test/Modular_arithmetic/Residue.cpp | 2 +- Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h | 2 +- Nef_2/include/CGAL/Nef_2/PM_const_decorator.h | 2 +- Nef_2/include/CGAL/Nef_2/PM_decorator.h | 10 +++---- Nef_2/include/CGAL/Nef_2/PM_overlayer.h | 2 +- Nef_2/include/CGAL/Nef_2/Polynomial.h | 6 ++--- Nef_2/include/CGAL/Nef_2/gen_point_location.h | 2 +- Nef_2/include/CGAL/Nef_polyhedron_2.h | 2 +- Nef_3/doc/Nef_3/CGAL/Nef_polyhedron_3.h | 4 +-- Nef_3/doc/Nef_3/CGAL/OFF_to_nef_3.h | 2 +- .../convert_nef_polyhedron_to_polygon_mesh.h | 4 +-- Nef_3/doc/Nef_3/PackageDescription.txt | 2 +- Nef_3/include/CGAL/Nef_3/Infimaximal_box.h | 2 +- Nef_3/include/CGAL/Nef_3/K3_tree.h | 10 +++---- Nef_3/include/CGAL/Nef_3/OGL_helper.h | 2 +- .../include/CGAL/Nef_3/SNC_const_decorator.h | 8 +++--- .../CGAL/Nef_3/SNC_external_structure.h | 4 +-- Nef_3/include/CGAL/Nef_3/SNC_intersection.h | 4 +-- Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h | 8 +++--- Nef_3/include/CGAL/Nef_3/SNC_simplify.h | 6 ++--- Nef_3/include/CGAL/Nef_polyhedron_3.h | 8 +++--- Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h | 4 +-- .../include/CGAL/Nef_S2/SM_const_decorator.h | 4 +-- Nef_S2/include/CGAL/Nef_S2/SM_decorator.h | 4 +-- Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h | 2 +- Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h | 2 +- Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h | 2 +- Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h | 2 +- .../include/CGAL/Nef_S2/sphere_predicates.h | 2 +- NewKernel_d/include/CGAL/NewKernel_d/utils.h | 2 +- Number_types/doc/Number_types/CGAL/FPU.h | 6 ++--- .../doc/Number_types/CGAL/Lazy_exact_nt.h | 2 +- .../include/CGAL/CORE_coercion_traits.h | 2 +- Number_types/include/CGAL/FPU.h | 2 +- Number_types/include/CGAL/GMP/Gmpfi_type.h | 4 +-- Number_types/include/CGAL/GMP/Gmpfr_type.h | 6 ++--- Number_types/include/CGAL/GMP/Gmpzf_type.h | 8 +++--- Number_types/include/CGAL/Lazy_exact_nt.h | 4 +-- Number_types/include/CGAL/MP_Float.h | 2 +- Number_types/include/CGAL/MP_Float_impl.h | 2 +- .../include/CGAL/Number_type_checker.h | 2 +- .../CGAL/Sqrt_extension/Fraction_traits.h | 4 +-- .../CGAL/Sqrt_extension/Sqrt_extension_type.h | 4 +-- .../CGAL/Sqrt_extension/convert_to_bfi.h | 2 +- Number_types/include/CGAL/int.h | 2 +- Number_types/include/CGAL/leda_integer.h | 2 +- .../test/Number_types/CORE_BigRat.cpp | 2 +- Number_types/test/Number_types/Gmpq_new.cpp | 2 +- .../test/Number_types/Interval_nt_new.cpp | 2 +- .../test/Number_types/Lazy_exact_nt.cpp | 2 +- .../test/Number_types/Quotient_new.cpp | 2 +- .../test/Number_types/Sqrt_extension.h | 2 +- .../test/Number_types/leda_rational.cpp | 2 +- Number_types/test/Number_types/mpq_class.cpp | 2 +- .../Partition_2/Concepts/PartitionTraits_2.h | 2 +- .../Point_set_processing_3.txt | 2 +- .../internal/Corefinement/Visitor.h | 4 +-- .../internal/Corefinement/face_graph_utils.h | 2 +- .../CGAL/Polygon_mesh_processing/locate.h | 26 +++++++++---------- .../test_pmp_distance.cpp | 2 +- .../polyhedron_self_intersection.cpp | 2 +- Polyhedron/include/CGAL/Polyhedron_3.h | 4 +-- .../include/CGAL/QP_solver/Initialization.h | 2 +- STL_Extension/include/CGAL/Multiset.h | 8 +++--- STL_Extension/include/CGAL/assertions.h | 2 +- .../internal/validity.h | 2 +- .../Surface_mesh_shortest_path.h | 2 +- .../test_self_intersection.h | 2 +- .../PackageDescription.txt | 2 +- .../test/TDS_2/include/CGAL/_test_cls_tds_2.h | 4 +-- Three/include/CGAL/Three/Scene_interface.h | 4 +-- .../test_delaunay_hierarchy_2.cpp | 2 +- 152 files changed, 251 insertions(+), 251 deletions(-) diff --git a/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h b/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h index 808f4506c5c..191b388edf9 100644 --- a/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h +++ b/AABB_tree/doc/AABB_tree/Concepts/AABBGeomTraits.h @@ -74,7 +74,7 @@ typedef unspecified_type Construct_projected_point_3; /*! A functor object to compare the distance of two points wrt a third one. Provides the operator: -`CGAL::Comparision_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`, +`CGAL::Comparison_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`, which compares the distance between `p1 and `p2`, and between `p2` and `p3`. */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h index 2b8cfcb815d..786eacc5092 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/Arr_accessor.h @@ -203,7 +203,7 @@ bool move_isolated_vertex(Face_handle f1, Face_handle f2, Vertex_handle v); /*! relocates all inner ccbs and isolated vertices to their proper position * immediately after a face has split due to the insertion of a new halfedge, * namely after `insert_at_vertices_ex()` was invoked and indicated that a new - * face has been created. `he` is the halfegde returned by + * face has been created. `he` is the halfedge returned by * `insert_at_vertices_ex()`, such that `he->twin()->face` is the face that has * just been split and `he->face()` is the newly created face. */ diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h index bf467bfa2e8..09e87373c1e 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementInputFormatter.h @@ -131,7 +131,7 @@ void read_x_monotone_curve(X_monotone_curve_2& c); /*! reads an auxiliary halfedge-data object and associates it with the halfedge * `he`. */ -void read_halfegde_data(Halfedge_handle he); +void read_halfedge_data(Halfedge_handle he); /*! reads a message indicating the beginning of a single face record. */ void read_face_begin(); diff --git a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOutputFormatter.h b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOutputFormatter.h index b5d12b7ba6c..0418ee873b5 100644 --- a/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOutputFormatter.h +++ b/Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementOutputFormatter.h @@ -124,7 +124,7 @@ void write_halfedge_index (std::size_t idx); void write_x_monotone_curve (const X_monotone_curve_2& c); /*! writes the auxiliary data associated with the halfedge. */ -void write_halfegde_data (Halfedge_const_handle he); +void write_halfedge_data (Halfedge_const_handle he); /*! writes a message indicating the beginning of a single face record. */ void write_face_begin(); diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp index 2e453015468..3801d3126ae 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension.cpp @@ -32,7 +32,7 @@ int main() { auto equal = traits.equal_2_object(); for (auto eit = arr.edges_begin(); eit != arr.edges_end(); ++eit) { - // Check whether the halfegde has the same direction as its segment. + // Check whether the halfedge has the same direction as its segment. bool flag = equal(eit->source()->point(),eit->curve().source()); eit->set_data(flag); eit->twin()->set_data(!flag); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h index e66d8d62cfa..90ae69d90ca 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_accessor.h @@ -619,7 +619,7 @@ public: /*! * Split a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is p. @@ -641,7 +641,7 @@ public: /*! * Split a given edge into two at the given vertex, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is v's point. @@ -663,7 +663,7 @@ public: /*! * Split a fictitious edge at the given vertex. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \return A handle for the first split halfedge, whose source equals the * source of e, and whose target is the split vertex v. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h index c2e25828ee7..dc863fe57e8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h @@ -223,7 +223,7 @@ public: * The Traits parameter corresponds to a geometric traits class, which * defines the Point_2 and X_monotone_curve_2 types. * The VertexData, HalfedgeData and FaceData parameter specify the object types - * stored with each vertex, halfegde and face, respectively. + * stored with each vertex, halfedge and face, respectively. */ template face() == curr->twin()->face()); @@ -251,7 +251,7 @@ _find_face_around_vertex(Vertex_const_handle vh, (next->direction() == ARR_RIGHT_TO_LEFT), vp, eq_curr, eq_next)) { - // Break the loop if seg equals one of the halfegdes next to v. + // Break the loop if seg equals one of the halfedges next to v. if (eq_curr) { equal_curr = true; break; @@ -276,7 +276,7 @@ _find_face_around_vertex(Vertex_const_handle vh, } // In case seg is not equal to curr's curve, just return the incident face - // of the halfegde we have located. + // of the halfedge we have located. if (! equal_curr) return make_result(curr->face()); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h index 74bea960eed..863365cd63d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Arr_walk_along_line_pl_impl.h @@ -98,7 +98,7 @@ Arr_walk_along_line_point_location::locate(const Point_2& p) const // | | // +--------------+ // - // In this case, we find the first halfegde whose target is x + // In this case, we find the first halfedge whose target is x // in a clockwise direction from "6 o'clock" around x and take // its incident face. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h index 4384be25014..51bcab049d6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_construction_helper.h @@ -151,7 +151,7 @@ public: bool swap_predecessors(Event* event) const { // If we insert an edge whose right end lies on the north pole, we have - // to flip the order of predecessor halfegdes. + // to flip the order of predecessor halfedges. // TODO what about the corner? return (event->parameter_space_in_x() == ARR_INTERIOR && event->parameter_space_in_y() == ARR_TOP_BOUNDARY); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h index e0dc96dd823..6f7aa9d607b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_construction_helper.h @@ -165,7 +165,7 @@ public: { // If we insert an edge whose right end lies on the top edge of the // ficititous bounding rectangle, we have to flip the order of predecessor - // halfegdes. + // halfedges. return ((event->parameter_space_in_x() == ARR_INTERIOR) && (event->parameter_space_in_y() == ARR_TOP_BOUNDARY)); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h index fa5d9095cfe..4be3568c3a6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_unb_planar_topology_traits_2_impl.h @@ -323,12 +323,12 @@ place_boundary_vertex(Face* f, return Result(curr); } - // Move to the next halfegde along the CCB. + // Move to the next halfedge along the CCB. curr = curr->next(); } while (curr != first); - // If we reached here, we did not find a suitable halfegde, which should + // If we reached here, we did not find a suitable halfedge, which should // never happen. CGAL_error(); return boost::none; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h index a05c76ee9d5..78e0850352d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_on_surface_2_impl.h @@ -4709,7 +4709,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target) // RWRW: NEW! CGAL_assertion((oc1 != nullptr) && (oc2 != nullptr)); - // In case both halfegdes he1 and he2 are incident to the same face + // In case both halfedges he1 and he2 are incident to the same face // but lie on different outer CCBs of this face, removing this pair of // halfedge causes the two components two merge and to become an // inner CCB in the face. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h index 1a489be166b..feb429273ee 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arrangement_zone_2_impl.h @@ -595,7 +595,7 @@ _compute_next_intersection(Halfedge_handle he, // The intersections with the curve have not been computed yet, so we // have to compute them now. Note that the first curve we intersect is - // always the subcurve associated with the given halfegde and the second + // always the subcurve associated with the given halfedge and the second // curve is the one we insert. Even though the order seems unimportant, we // exploit this fact in some of the traits classes in order to optimize // computations. diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index a20f39b50f1..438f46ced1c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -708,19 +708,19 @@ public: Halfedge_const_handle twin() const { return (DHalfedge_const_iter(Base::opposite())); } - /*! Get the previous halfegde in the chain (non-const version). */ + /*! Get the previous halfedge in the chain (non-const version). */ Halfedge_handle prev() { return (DHalfedge_iter(Base::prev())); } - /*! Get the previous halfegde in the chain (const version). */ + /*! Get the previous halfedge in the chain (const version). */ Halfedge_const_handle prev() const { return (DHalfedge_const_iter(Base::prev())); } - /*! Get the next halfegde in the chain (non-const version). */ + /*! Get the next halfedge in the chain (non-const version). */ Halfedge_handle next() { return (DHalfedge_iter(Base::next())); } - /*! Get the next halfegde in the chain (const version). */ + /*! Get the next halfedge in the chain (const version). */ Halfedge_const_handle next() const { return (DHalfedge_const_iter(Base::next())); } @@ -1486,7 +1486,7 @@ public: /*! * Split a given edge into two, and associate the given x-monotone * curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param cv1 The curve that should be associated with the first split edge. * \param cv2 The curve that should be associated with the second split edge. @@ -1503,8 +1503,8 @@ public: /*! * Merge two edges to form a single edge, and associate the given x-monotone * curve with the merged edge. - * \param e1 The first edge to merge (one of the pair of twin halfegdes). - * \param e2 The second edge to merge (one of the pair of twin halfegdes). + * \param e1 The first edge to merge (one of the pair of twin halfedges). + * \param e2 The second edge to merge (one of the pair of twin halfedges). * \param cv The curve that should be associated with merged edge. * \return A handle for the merged halfedge. */ @@ -1513,7 +1513,7 @@ public: /*! * Remove an edge from the arrangement. - * \param e The edge to remove (one of the pair of twin halfegdes). + * \param e The edge to remove (one of the pair of twin halfedges). * \param remove_source Should the source vertex of e be removed if it * becomes isolated (true by default). * \param remove_target Should the target vertex of e be removed if it @@ -2213,7 +2213,7 @@ protected: /*! * Split a given edge into two at a given point, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param p The split point. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is p. @@ -2229,7 +2229,7 @@ protected: /*! * Split a given edge into two at a given vertex, and associate the given * x-monotone curves with the split edges. - * \param e The edge to split (one of the pair of twin halfegdes). + * \param e The edge to split (one of the pair of twin halfedges). * \param v The split vertex. * \param cv1 The curve that should be associated with the first split edge, * whose source equals e's source and its target is v. @@ -2967,7 +2967,7 @@ void insert_non_intersecting_curves * the edges incident to the end-vertices of the removed edge after its * deletion, the function performs these merges as well. * \param arr The arrangement. - * \param e The edge to remove (one of the pair of twin halfegdes). + * \param e The edge to remove (one of the pair of twin halfedges). * \return A handle for the remaining face. */ template diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h index 1dcdb21736e..b98ee25813d 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_reader.h @@ -197,7 +197,7 @@ namespace CGAL { // Read the x-monotone curve associated with the edge. formatter.read_x_monotone_curve(m_curve); - // Allocate a pair of new DCEL halfegdes and associate them with the + // Allocate a pair of new DCEL halfedges and associate them with the // x-monotone curve we read. new_he = m_arr_access.new_edge(&m_curve); } diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h index f6949fe1b5c..cf2026e7ef4 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Arrangement_2_writer.h @@ -307,7 +307,7 @@ namespace CGAL { return (pos->second); } - /*! Get the mapped index of a given halfegde. */ + /*! Get the mapped index of a given halfedge. */ int _index(const DHalfedge* he) const { typename Halfedge_index_map::const_iterator pos = m_he_index.find(he); diff --git a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h index c15ce315c9a..798cd0f0c18 100644 --- a/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h +++ b/Arrangement_on_surface_2/include/CGAL/Surface_sweep_2/Arr_construction_ss_visitor.h @@ -637,7 +637,7 @@ add_subcurve(const X_monotone_curve_2& cv, Subcurve* sc) #endif } - // Update the last event with the inserted halfegde (if necessary) + // Update the last event with the inserted halfedge (if necessary) // and check if we have to update the auxiliary information on the location // of holes. if ((last_event->number_of_left_curves() == 0) && diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h index 76606679325..cd31fc96daf 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Arrangement_2.h @@ -83,7 +83,7 @@ private: /*! \class * Iteratator over all outgoing halfedges around a given vertex., skipping * fictitious halfedges. - * This is by adapting the Halfegde_around_vertex_circulator type to an + * This is by adapting the Halfedge_around_vertex_circulator type to an * iterator. Moreover, as the circulator goes over all ingoing halfedges * of the vertex, the iterator adapter may return their twin halfedges, if * we need the outgoing halfedges. diff --git a/Boolean_set_operations_2/include/CGAL/connect_holes.h b/Boolean_set_operations_2/include/CGAL/connect_holes.h index 3c1f8e39d7e..8ae06574970 100644 --- a/Boolean_set_operations_2/include/CGAL/connect_holes.h +++ b/Boolean_set_operations_2/include/CGAL/connect_holes.h @@ -213,7 +213,7 @@ OutputIterator connect_holes(const Polygon_with_holes_2second.second)) { // v_top lies below the interior of the hafledge he_above: - // Find the intersection of this halfegde with a vertical ray + // Find the intersection of this halfedge with a vertical ray // emanating from v_top. he_above = arr.non_const_handle (he); diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index c37509cf72a..a3e0323ab88 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -94440,7 +94440,7 @@ and implement some of them." @techreport{ll-cvpe-84 , author = "D. T. Lee and A. Lin" -, title = "Computing the Visibility Polygon from an Egde" +, title = "Computing the Visibility Polygon from an Edge" , type = "Technical {Report}" , institution = "Northwestern University" , year = 1984 diff --git a/Maintenance/deb/sid/debian/NEWS.Debian b/Maintenance/deb/sid/debian/NEWS.Debian index 580feb1e62f..938dde2d1fe 100644 --- a/Maintenance/deb/sid/debian/NEWS.Debian +++ b/Maintenance/deb/sid/debian/NEWS.Debian @@ -2,7 +2,7 @@ cgal (4.2-1) unstable; urgency=low The Qt4 support library libCGAL_Qt4.so.10.0.0 has been moved from the package libcgal10 to the new package libcgal-qt4-10. Similarly, the corresponding - headers and the static library have been moved from the pacakge libcgal-dev + headers and the static library have been moved from the package libcgal-dev to the new package libcgal-qt4-dev. That is the packages libcgal10 and libcgal-dev do not any longer depend on the Qt packages. diff --git a/Maintenance/deb/sid/debian/README.Debian b/Maintenance/deb/sid/debian/README.Debian index 4be997664d7..76740e49f58 100644 --- a/Maintenance/deb/sid/debian/README.Debian +++ b/Maintenance/deb/sid/debian/README.Debian @@ -22,7 +22,7 @@ Tarballs with demos and examples can be found in /usr/share/doc/libcgal-demo. Extract the tarballs somewhere and call "cmake ." to configure the demos/examples. Call "make" to build them, either in the top-level directory to build all demos/examples (which takes some time and needs quite some disk -space), or in the subdirectory of the desired demo/exmaple. The cmake option +space), or in the subdirectory of the desired demo/example. The cmake option -DCMAKE_VERBOSE_MAKEFILE=ON is useful to generate verbose makefiles that show each executed command. diff --git a/Maintenance/deb/sid/debian/changelog b/Maintenance/deb/sid/debian/changelog index c92864f871c..aafd8ca8c0c 100644 --- a/Maintenance/deb/sid/debian/changelog +++ b/Maintenance/deb/sid/debian/changelog @@ -3,7 +3,7 @@ cgal (4.1-1) unstable; urgency=low * New upstream release. * Rename binary package libcgal9 to libcgal10 to reflect SONAME change. * Configure CGAL using -DCGAL_ENABLE_PRECONFIG=OFF since we do not want - that the accidential presence of optional libraries (for demos and + that the accidental presence of optional libraries (for demos and examples) influences the build of the library. * Move the Qt4 support library and the corresponding headers into new binary packages libcgal-qt4-10 and libcgal-qt4-dev (Closes: #683214). @@ -345,4 +345,4 @@ cgal (3.2-1) unstable; urgency=low * First upload to Debian archive. (Closes: #251885) -- Joachim Reichel Mon, 29 May 2006 20:24:27 +0200 -5~ \ No newline at end of file +5~ diff --git a/Maintenance/deb/sid/debian/copyright b/Maintenance/deb/sid/debian/copyright index ecc6058b7dc..20bb4cf216f 100644 --- a/Maintenance/deb/sid/debian/copyright +++ b/Maintenance/deb/sid/debian/copyright @@ -230,8 +230,8 @@ file to file. -Copright statement for files under the FREE_USE license -======================================================= +Copyright statement for files under the FREE_USE license +======================================================== Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 Utrecht University (The Netherlands), diff --git a/Maintenance/deb/squeeze/debian/NEWS.Debian b/Maintenance/deb/squeeze/debian/NEWS.Debian index 580feb1e62f..938dde2d1fe 100644 --- a/Maintenance/deb/squeeze/debian/NEWS.Debian +++ b/Maintenance/deb/squeeze/debian/NEWS.Debian @@ -2,7 +2,7 @@ cgal (4.2-1) unstable; urgency=low The Qt4 support library libCGAL_Qt4.so.10.0.0 has been moved from the package libcgal10 to the new package libcgal-qt4-10. Similarly, the corresponding - headers and the static library have been moved from the pacakge libcgal-dev + headers and the static library have been moved from the package libcgal-dev to the new package libcgal-qt4-dev. That is the packages libcgal10 and libcgal-dev do not any longer depend on the Qt packages. diff --git a/Maintenance/deb/squeeze/debian/README.Debian b/Maintenance/deb/squeeze/debian/README.Debian index 4be997664d7..76740e49f58 100644 --- a/Maintenance/deb/squeeze/debian/README.Debian +++ b/Maintenance/deb/squeeze/debian/README.Debian @@ -22,7 +22,7 @@ Tarballs with demos and examples can be found in /usr/share/doc/libcgal-demo. Extract the tarballs somewhere and call "cmake ." to configure the demos/examples. Call "make" to build them, either in the top-level directory to build all demos/examples (which takes some time and needs quite some disk -space), or in the subdirectory of the desired demo/exmaple. The cmake option +space), or in the subdirectory of the desired demo/example. The cmake option -DCMAKE_VERBOSE_MAKEFILE=ON is useful to generate verbose makefiles that show each executed command. diff --git a/Maintenance/deb/squeeze/debian/changelog b/Maintenance/deb/squeeze/debian/changelog index 22f58ff371b..b13607d6678 100644 --- a/Maintenance/deb/squeeze/debian/changelog +++ b/Maintenance/deb/squeeze/debian/changelog @@ -3,7 +3,7 @@ cgal (4.1-1~squeeze1) stable; urgency=low * New upstream release. * Rename binary package libcgal9 to libcgal10 to reflect SONAME change. * Configure CGAL using -DCGAL_ENABLE_PRECONFIG=OFF since we do not want - that the accidential presence of optional libraries (for demos and + that the accidental presence of optional libraries (for demos and examples) influences the build of the library. * Move the Qt4 support library and the corresponding headers into new binary packages libcgal-qt4-10 and libcgal-qt4-dev (Closes: #683214). @@ -345,4 +345,4 @@ cgal (3.2-1) unstable; urgency=low * First upload to Debian archive. (Closes: #251885) -- Joachim Reichel Mon, 29 May 2006 20:24:27 +0200 -5~ \ No newline at end of file +5~ diff --git a/Maintenance/deb/squeeze/debian/copyright b/Maintenance/deb/squeeze/debian/copyright index ecc6058b7dc..20bb4cf216f 100644 --- a/Maintenance/deb/squeeze/debian/copyright +++ b/Maintenance/deb/squeeze/debian/copyright @@ -230,8 +230,8 @@ file to file. -Copright statement for files under the FREE_USE license -======================================================= +Copyright statement for files under the FREE_USE license +======================================================== Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 Utrecht University (The Netherlands), diff --git a/Maintenance/deb/wheezy/debian/NEWS.Debian b/Maintenance/deb/wheezy/debian/NEWS.Debian index 580feb1e62f..938dde2d1fe 100644 --- a/Maintenance/deb/wheezy/debian/NEWS.Debian +++ b/Maintenance/deb/wheezy/debian/NEWS.Debian @@ -2,7 +2,7 @@ cgal (4.2-1) unstable; urgency=low The Qt4 support library libCGAL_Qt4.so.10.0.0 has been moved from the package libcgal10 to the new package libcgal-qt4-10. Similarly, the corresponding - headers and the static library have been moved from the pacakge libcgal-dev + headers and the static library have been moved from the package libcgal-dev to the new package libcgal-qt4-dev. That is the packages libcgal10 and libcgal-dev do not any longer depend on the Qt packages. diff --git a/Maintenance/deb/wheezy/debian/README.Debian b/Maintenance/deb/wheezy/debian/README.Debian index 4be997664d7..76740e49f58 100644 --- a/Maintenance/deb/wheezy/debian/README.Debian +++ b/Maintenance/deb/wheezy/debian/README.Debian @@ -22,7 +22,7 @@ Tarballs with demos and examples can be found in /usr/share/doc/libcgal-demo. Extract the tarballs somewhere and call "cmake ." to configure the demos/examples. Call "make" to build them, either in the top-level directory to build all demos/examples (which takes some time and needs quite some disk -space), or in the subdirectory of the desired demo/exmaple. The cmake option +space), or in the subdirectory of the desired demo/example. The cmake option -DCMAKE_VERBOSE_MAKEFILE=ON is useful to generate verbose makefiles that show each executed command. diff --git a/Maintenance/deb/wheezy/debian/changelog b/Maintenance/deb/wheezy/debian/changelog index d94451ccdb9..56c3f83f203 100644 --- a/Maintenance/deb/wheezy/debian/changelog +++ b/Maintenance/deb/wheezy/debian/changelog @@ -3,7 +3,7 @@ cgal (4.1-1~wheezy1) testing; urgency=low * New upstream release. * Rename binary package libcgal9 to libcgal10 to reflect SONAME change. * Configure CGAL using -DCGAL_ENABLE_PRECONFIG=OFF since we do not want - that the accidential presence of optional libraries (for demos and + that the accidental presence of optional libraries (for demos and examples) influences the build of the library. * Move the Qt4 support library and the corresponding headers into new binary packages libcgal-qt4-10 and libcgal-qt4-dev (Closes: #683214). @@ -345,4 +345,4 @@ cgal (3.2-1) unstable; urgency=low * First upload to Debian archive. (Closes: #251885) -- Joachim Reichel Mon, 29 May 2006 20:24:27 +0200 -5~ \ No newline at end of file +5~ diff --git a/Maintenance/deb/wheezy/debian/copyright b/Maintenance/deb/wheezy/debian/copyright index ecc6058b7dc..20bb4cf216f 100644 --- a/Maintenance/deb/wheezy/debian/copyright +++ b/Maintenance/deb/wheezy/debian/copyright @@ -230,8 +230,8 @@ file to file. -Copright statement for files under the FREE_USE license -======================================================= +Copyright statement for files under the FREE_USE license +======================================================== Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 Utrecht University (The Netherlands), diff --git a/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam b/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam index 60d4ad326c3..1ca967f086c 100644 --- a/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam +++ b/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam @@ -22,7 +22,7 @@ # This file uses Jam language syntax to describe available tools. Mostly, # there are 'using' lines, that contain the name of the used tools, and -# parameters to pass to those tools -- where paremeters are separated by +# parameters to pass to those tools -- where parameters are separated by # semicolons. Important syntax notes: # # - Both ':' and ';' must be separated from other tokens by whitespace diff --git a/Maintenance/test_handling/testsuite_comparison/fill_empty_lines.js b/Maintenance/test_handling/testsuite_comparison/fill_empty_lines.js index 366df662d7c..736d2182cc2 100644 --- a/Maintenance/test_handling/testsuite_comparison/fill_empty_lines.js +++ b/Maintenance/test_handling/testsuite_comparison/fill_empty_lines.js @@ -9,7 +9,7 @@ Output: the arrays, alphabetically sorted, of the same size, filled with empty strings. - Short: Equalizes the sizes of the two inpu arrays by adding empty strings. + Short: Equalizes the sizes of the two input arrays by adding empty strings. Detailed: for each element of the smaller input, if base[i] != newtest[i] (not taking the last char into account), diff --git a/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h b/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h index fe87e65a7b1..341f51327f9 100644 --- a/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h +++ b/Matrix_search/doc/Matrix_search/CGAL/Dynamic_matrix.h @@ -69,7 +69,7 @@ void replace_column( int old, int new); /*! returns -a new matrix consisting of all rows of the dynmic matrix with even index, +a new matrix consisting of all rows of the dynamic matrix with even index, (i.e.\ first row is row \f$ 0\f$ of the dynamic matrix, second row is row \f$ 2\f$ of the dynamic matrix, etc.). \pre `number_of_rows()` \f$ > 0\f$. */ diff --git a/Mesh_2/TODO b/Mesh_2/TODO index a9dce01dadb..5785f0b4296 100644 --- a/Mesh_2/TODO +++ b/Mesh_2/TODO @@ -17,7 +17,7 @@ == Old TODO list == -- Implement a method to split all clusters at the beginnning. +- Implement a method to split all clusters at the beginning. - Histograms in the demo diff --git a/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h b/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h index c107408c29c..7964f79f162 100644 --- a/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h +++ b/Mesh_2/doc/Mesh_2/Concepts/DelaunayMeshFaceBase_2.h @@ -65,7 +65,7 @@ sets the edge that makes this face blind. \pre is_blind() returns `true` \pre e is a constrained edge */ -void set_blinding_constraint(const Egde& e); +void set_blinding_constraint(const Edge& e); /// @} diff --git a/Mesh_2/examples/Mesh_2/mesh_class.cpp b/Mesh_2/examples/Mesh_2/mesh_class.cpp index b1db4a3a759..396e624a1ae 100644 --- a/Mesh_2/examples/Mesh_2/mesh_class.cpp +++ b/Mesh_2/examples/Mesh_2/mesh_class.cpp @@ -34,7 +34,7 @@ int main() std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl; - std::cout << "Meshing the triangulation with default criterias..." + std::cout << "Meshing the triangulation with default criteria..." << std::endl; Mesher mesher(cdt); @@ -42,9 +42,9 @@ int main() std::cout << "Number of vertices: " << cdt.number_of_vertices() << std::endl; - std::cout << "Meshing with new criterias..." << std::endl; + std::cout << "Meshing with new criteria..." << std::endl; // 0.125 is the default shape bound. It corresponds to abound 20.6 degree. - // 0.5 is the upper bound on the length of the longuest edge. + // 0.5 is the upper bound on the length of the longest edge. // See reference manual for Delaunay_mesh_size_traits_2. mesher.set_criteria(Criteria(0.125, 0.5)); mesher.refine_mesh(); diff --git a/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h b/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h index eb61e4bf50a..33e3d541a1b 100644 --- a/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h +++ b/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h @@ -146,7 +146,7 @@ public: // Cdt should be of the type Constrained_Delaunay_triangulation_2 -// and the face base shoul be Constrained_Delaunay_triangulation_face_base_2 +// and the face base should be Constrained_Delaunay_triangulation_face_base_2 template class Constrained_voronoi_diagram_2 { diff --git a/Mesh_2/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h b/Mesh_2/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h index 9caf4f52b7b..1729fc795f6 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesher_no_edge_refinement_2.h @@ -33,7 +33,7 @@ class Delaunay_mesher_no_edge_refinement_2 typedef typename Tr::Point Point; - /** \name Types needed for private member datas */ + /** \name Types needed for private member data */ typedef Mesh_2::Do_not_refine_edges > Edges_level_base; typedef Mesh_2::Refine_edges is less than 60 degres. + * Tells if the angle is less than 60 degrees. * Uses squared_cosine_of_angle_times_4() and used by * create_clusters_of_vertex(). */ diff --git a/Mesh_2/include/CGAL/Mesh_2/Do_not_refine_edges.h b/Mesh_2/include/CGAL/Mesh_2/Do_not_refine_edges.h index f52606ddaf0..17ffcb17162 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Do_not_refine_edges.h +++ b/Mesh_2/include/CGAL/Mesh_2/Do_not_refine_edges.h @@ -54,7 +54,7 @@ public: Do_not_refine_edges(Tr& tr_) : Super(tr_) {} - /** \name FUNCTIONS NEEDED BY Mesher_level OVERIDDEN BY THIS CLASS. */ + /** \name FUNCTIONS NEEDED BY Mesher_level OVERRIDDEN BY THIS CLASS. */ void scan_triangulation_impl() { diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h index 94a585cf134..988d00fce53 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h @@ -301,7 +301,7 @@ public: template friend class Refine_edges_visitor; protected: - /* --- protected datas --- */ + /* --- protected data --- */ Tr& tr; /**< The triangulation itself. */ @@ -632,7 +632,7 @@ protected: // base class } -private: /** \name DEBUGGING TYPES AND DATAS */ +private: /** \name DEBUGGING TYPES AND DATA */ class From_pair_of_vertex_to_edge : public CGAL::cpp98::unary_function { diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges_visitor.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges_visitor.h index e6efb736235..216ed38c035 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges_visitor.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges_visitor.h @@ -24,7 +24,7 @@ namespace Mesh_2 { /** * This class is the visitor needed when Refine_edges if called from * Refine_faces. - * \param Faces_mesher should be instanciated with Refine_face_base. + * \param Faces_mesher should be instantiated with Refine_face_base. */ template class Refine_edges_visitor : public ::CGAL::Null_mesh_visitor diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h index 889403114c4..26febd2b2a0 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges_with_clusters.h @@ -82,7 +82,7 @@ public: } - /** \name FUNCTIONS NEEDED BY Mesher_level OVERIDDEN BY THIS CLASS. */ + /** \name FUNCTIONS NEEDED BY Mesher_level OVERRIDDEN BY THIS CLASS. */ Point refinement_point_impl(const Edge& edge) { @@ -104,7 +104,7 @@ public: vb_has_a_cluster = false; cluster_splitted = false; - // true bellow to remove ca and cb because they will + // true below to remove ca and cb because they will // be restored by update_cluster(...). if( clusters.get_cluster(this->va,this->vb,ca,ca_it) ) { if( clusters.get_cluster(this->vb,this->va,cb,cb_it) ) diff --git a/Mesh_2/include/CGAL/Triangulation_conformer_2.h b/Mesh_2/include/CGAL/Triangulation_conformer_2.h index 28e8c5868e3..428e7a5389d 100644 --- a/Mesh_2/include/CGAL/Triangulation_conformer_2.h +++ b/Mesh_2/include/CGAL/Triangulation_conformer_2.h @@ -44,7 +44,7 @@ protected: GABRIEL /**< `this` has been \e Gabriel-initialized. */ }; -// --- PROTECTED DATAS --- +// --- PROTECTED DATA --- Initialization initialized; Tr& tr; Null_mesher_level null_level; diff --git a/Mesh_3/doc/Mesh_3/CGAL/Image_3.h b/Mesh_3/doc/Mesh_3/CGAL/Image_3.h index 415638914a4..9112f6cd883 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/Image_3.h +++ b/Mesh_3/doc/Mesh_3/CGAL/Image_3.h @@ -16,7 +16,7 @@ public: /// Open an 3D image file. /// - /// Returns `true` if the file was sucessfully loaded. + /// Returns `true` if the file was successfully loaded. bool read(const char* file); }; diff --git a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h index b2abcae935a..a084e25bfcf 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_3.h @@ -39,7 +39,7 @@ public: /// @{ /*! -Construction from a bouding polyhedral surface which must be closed, and free of intersections. +Construction from a bounding polyhedral surface which must be closed, and free of intersections. The inside of `bounding_polyhedron` will be meshed. */ Polyhedral_mesh_domain_3(const Polyhedron& bounding_polyhedron); diff --git a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp index d2ab9f47a39..fb528891cd1 100644 --- a/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_hybrid_mesh_domain.cpp @@ -12,7 +12,7 @@ #include #include -// Ouput +// Output #include // Read 1D features from input file diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h index 752e7630119..5f2754c869f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h @@ -175,7 +175,7 @@ protected: return derived().debug_info_element_impl(e); } - /** \name Private member datas */ + /** \name Private member data */ Previous_level& previous_level; /**< The previous level of the refinement process. */ diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index a32cbaf4709..2fe2261344c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -947,7 +947,7 @@ insert_balls_on_edges() Input_features input_features; domain_.get_curves(std::back_inserter(input_features)); - // Interate on edges + // Iterate on edges for ( typename Input_features::iterator fit = input_features.begin(), end = input_features.end() ; fit != end ; ++fit ) { diff --git a/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h b/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h index 944916523a0..584e148f726 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Robust_intersection_traits_3.h @@ -94,7 +94,7 @@ struct Vector_plane_orientation_3_static_filter : fit_in_double(get_approx(b).z(), bz) && fit_in_double(get_approx(c).x(), cx) && fit_in_double(get_approx(c).y(), cy) && fit_in_double(get_approx(c).z(), cz)) - { // This bloc is not indented because it was added in a second step, + { // This block is not indented because it was added in a second step, // and one wants to avoid the reindentation of the whole code double abx = bx - ax; diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 222eb87cc76..87a0416f7b3 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -71,7 +71,7 @@ namespace Mesh_3 { /** * @class PVertex -* Vertex with associated perturbation datas +* Vertex with associated perturbation data */ // Sequential template< typename FT @@ -171,7 +171,7 @@ void update_saved_erase_counter() {} bool is_zombie() { return false; } private: -/// Private datas +/// Private data Vertex_handle vertex_handle_; unsigned int incident_sliver_nb_; FT min_value_; @@ -294,7 +294,7 @@ bool operator<(const Self& pv) const } private: -/// Private datas +/// Private data Vertex_handle vertex_handle_; unsigned int vh_erase_counter_when_added_; int in_dimension_; @@ -1032,7 +1032,7 @@ perturb(const FT& sliver_bound, PQueue& pqueue, Visitor& visitor) const } } - // Update pqueue in every cases, because pv was poped + // Update pqueue in every cases, because pv was popped pqueue_size += update_priority_queue(pv, pqueue); visitor.end_of_perturbation_iteration(pqueue_size); @@ -1378,7 +1378,7 @@ perturb_vertex( PVertex pv ++bcounter; #endif - // Update pqueue in every cases, because pv was poped + // Update pqueue in every cases, because pv was popped if (pv.is_perturbable()) { enqueue_task(pv, sliver_bound, visitor, bad_vertices); diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index 0f77cd3e283..e8c2c214e48 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -1559,7 +1559,7 @@ update_mesh(const Weighted_point& new_point, if (could_lock_zone && *could_lock_zone == false) return false; - // Get some datas to restore mesh + // Get some data to restore mesh Boundary_facets_from_outside boundary_facets_from_outside = get_boundary_facets_from_outside(boundary_facets); diff --git a/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h b/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h index 9dd439a4ff7..62892dd0e2d 100644 --- a/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h +++ b/Mesh_3/include/CGAL/Meshes/Filtered_deque_container.h @@ -189,7 +189,7 @@ namespace Meshes { typedef Element_ Element; protected: - // --- protected datas --- + // --- protected data --- Container container; Predicate test; diff --git a/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h b/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h index 94d5d1a9cb9..291d07a4f99 100644 --- a/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h +++ b/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h @@ -187,7 +187,7 @@ namespace CGAL { typedef typename Base::size_type size_type; protected: - // --- protected datas --- + // --- protected data --- Map container; Predicate test; diff --git a/Mesher_level/include/CGAL/Mesher_level.h b/Mesher_level/include/CGAL/Mesher_level.h index 7d8de6fffb4..a008298f1ab 100644 --- a/Mesher_level/include/CGAL/Mesher_level.h +++ b/Mesher_level/include/CGAL/Mesher_level.h @@ -108,7 +108,7 @@ private: } //@} - /** \name Private member datas */ + /** \name Private member data */ Previous& previous_level; /**< The previous level of the refinement process. */ diff --git a/Mesher_level/include/CGAL/Meshes/Double_map_container.h b/Mesher_level/include/CGAL/Meshes/Double_map_container.h index cc4c7bbface..b4f72a10687 100644 --- a/Mesher_level/include/CGAL/Meshes/Double_map_container.h +++ b/Mesher_level/include/CGAL/Meshes/Double_map_container.h @@ -33,7 +33,7 @@ namespace CGAL { typedef Elt Element; protected: - // --- protected datas --- + // --- protected data --- Double_map m; public: diff --git a/Mesher_level/include/CGAL/Meshes/Filtered_queue_container.h b/Mesher_level/include/CGAL/Meshes/Filtered_queue_container.h index 18b71c4ff48..057669c803c 100644 --- a/Mesher_level/include/CGAL/Meshes/Filtered_queue_container.h +++ b/Mesher_level/include/CGAL/Meshes/Filtered_queue_container.h @@ -31,7 +31,7 @@ namespace CGAL { typedef typename std::deque::const_iterator const_iterator; private: - // --- private datas --- + // --- private data --- std::deque d; Predicate test; diff --git a/Mesher_level/include/CGAL/Meshes/Simple_map_container.h b/Mesher_level/include/CGAL/Meshes/Simple_map_container.h index 6f5e3ce4e0d..156357bcfbd 100644 --- a/Mesher_level/include/CGAL/Meshes/Simple_map_container.h +++ b/Mesher_level/include/CGAL/Meshes/Simple_map_container.h @@ -28,7 +28,7 @@ namespace CGAL { typedef typename Map::value_type value_type; protected: - // --- protected datas --- + // --- protected data --- Map map; public: diff --git a/Mesher_level/include/CGAL/Meshes/Simple_queue_container.h b/Mesher_level/include/CGAL/Meshes/Simple_queue_container.h index b65265fa1f9..123832665f3 100644 --- a/Mesher_level/include/CGAL/Meshes/Simple_queue_container.h +++ b/Mesher_level/include/CGAL/Meshes/Simple_queue_container.h @@ -28,7 +28,7 @@ namespace CGAL { typedef typename Queue::size_type size_type; protected: - // --- protected datas --- + // --- protected data --- Queue q; public: diff --git a/Mesher_level/include/CGAL/Meshes/Simple_set_container.h b/Mesher_level/include/CGAL/Meshes/Simple_set_container.h index c6d04c7290b..65f88d03dd0 100644 --- a/Mesher_level/include/CGAL/Meshes/Simple_set_container.h +++ b/Mesher_level/include/CGAL/Meshes/Simple_set_container.h @@ -27,7 +27,7 @@ namespace CGAL { typedef typename Set::size_type size_type; protected: - // --- protected datas --- + // --- protected data --- Set s; public: diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h index 49569c8cb96..8db0bd9849a 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Arr_labeled_traits_2.h @@ -21,7 +21,7 @@ namespace CGAL { /*! \class - * A meta-traits class that adds lables to points and to x-monotone curves, + * A meta-traits class that adds labels to points and to x-monotone curves, * such that the comparison of two points, as well as the computation of the * intersections between two segments can be easily filtered. */ diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h index d1d828284b6..7ebde777261 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Decomposition_strategy_adapter.h @@ -48,7 +48,7 @@ protected: // Data members: const Traits_2* m_traits; - bool m_own_traits; // inidicates whether the kernel should be freed up. + bool m_own_traits; // indicates whether the kernel should be freed up. public: // The pointer to the traits and the flag that indicate ownership should be diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Hole_filter_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Hole_filter_2.h index 8b20a16ee6b..cfb2cedde6f 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Hole_filter_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Hole_filter_2.h @@ -41,7 +41,7 @@ public: /*! Filter out holes of a polygon with holes. * \param[in] pgn1 The polygon with holes to filter. * \param[in] pgn2 The reference polygon with holes. - * \param[out] filtered_pgn1 the filterd polygon. + * \param[out] filtered_pgn1 the filtered polygon. */ void operator()(const Polygon_with_holes_2& pgn1, const Polygon_2& pgn2, @@ -73,7 +73,7 @@ public: /*! Filter out holes of a polygon with holes. * \param[in] pgn1 The polygon with holes to filter. * \param[in] pgn2 The reference polygon polygon with holes. - * \param[out] filtered_pgn1 the filterd polygon. + * \param[out] filtered_pgn1 the filtered polygon. */ void operator()(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Labels.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Labels.h index 589d87f183d..ec44ee99567 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Labels.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Labels.h @@ -182,7 +182,7 @@ public: (label._is_last && _index == 0))); } - /*! Check whether the given label is the succcessor of this label. */ + /*! Check whether the given label is the successor of this label. */ bool is_next (const X_curve_label& label) const { if (_component == 0) diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h index 07c56481531..ece0d7788d7 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h @@ -235,7 +235,7 @@ private: std::vector p1_vertices = vertices_of_polygon(pgn1); std::vector p2_vertices = vertices_of_polygon(pgn2); - // Init the direcions of both polygons + // Init the directions of both polygons std::vector p1_dirs = directions_of_polygon(p1_vertices); std::vector p2_dirs = directions_of_polygon(p2_vertices); diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h index 5793cc99e49..7b1bd67d5d0 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h @@ -104,7 +104,7 @@ private: typedef Union_of_segment_cycles_2 Union_2; const Kernel* m_kernel; - bool m_own_kernel; // inidicates whether the kernel should be freed up. + bool m_own_kernel; // indicates whether the kernel should be freed up. // Data members: Equal_2 f_equal; @@ -192,7 +192,7 @@ public: * polygon. * \param pgn1 The first polygon. * \param pgn2 The second polygon. - * \param sum_bound Output: A polygon respresenting the outer boundary + * \param sum_bound Output: A polygon representing the outer boundary * of the Minkowski sum. * \param sum_holes Output: An output iterator for the holes in the sum, * represented as simple polygons. diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h index 0b63f66612b..bc3d4eb1441 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_decomp_2.h @@ -75,11 +75,11 @@ private: // Data members: const Decomposition_strategy1* m_decomposition_strategy1; const Decomposition_strategy2* m_decomposition_strategy2; - bool m_own_strategy1; // inidicates whether the stategy should be freed up. - bool m_own_strategy2; // inidicates whether the stategy should be freed up. + bool m_own_strategy1; // indicates whether the strategy should be freed up. + bool m_own_strategy2; // indicates whether the strategy should be freed up. const Traits_2* m_traits; - bool m_own_traits; // inidicates whether the kernel should be freed up. + bool m_own_traits; // indicates whether the kernel should be freed up. Compare_angle_2 f_compare_angle; Translate_point_2 f_add; @@ -348,7 +348,7 @@ public: } private: - /*! Merge mergable edges + /*! Merge mergeable edges * \param arr (in) The underlying arrangement. */ void simplify(Arrangement_2& arr) const diff --git a/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h b/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h index 84562669878..5db68c8abaa 100644 --- a/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h +++ b/Minkowski_sum_2/include/CGAL/Polygon_vertical_decomposition_2.h @@ -93,7 +93,7 @@ private: // Data members: const Traits_2* m_traits; - bool m_own_traits; // inidicates whether the kernel should be freed up. + bool m_own_traits; // indicates whether the kernel should be freed up. Compare_x_2 f_cmp_x; Intersect_2 f_intersect; @@ -280,7 +280,7 @@ private: CGAL::decompose(arr, std::back_inserter(vd_list)); // Go over the vertices (given in ascending lexicographical xy-order), - // and add segements to the feautres below and above it. + // and add segments to the feautres below and above it. typename Vert_decomp_list::iterator it, prev = vd_list.end(); for (it = vd_list.begin(); it != vd_list.end(); ++it) { // If the feature above the previous vertex is not the current vertex, diff --git a/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h b/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h index d69531af6a3..088de66e7c1 100644 --- a/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h +++ b/Minkowski_sum_2/include/CGAL/Small_side_angle_bisector_decomposition_2.h @@ -94,7 +94,7 @@ private: typedef std::vector Point_vector_2; const Kernel* m_kernel; - bool m_own_kernel; // inidicates whether the kernel should be freed up. + bool m_own_kernel; // indicates whether the kernel should be freed up. // Data members: Equal_2 f_equal; @@ -256,7 +256,7 @@ public: private: - /*! Return the succesive index of a 'point info' vector. */ + /*! Return the successive index of a 'point info' vector. */ inline unsigned int _vec_succ(const Point_vector_2& vec, unsigned int i) const { @@ -357,7 +357,7 @@ private: { CGAL_precondition(vec[v_ind].is_reflex); - // Check whether the visiblity status is already known. + // Check whether the visibility status is already known. if (vec[v_ind].is_visible(u_ind)) return (true); if (vec[v_ind].is_non_visible(u_ind)) return (false); diff --git a/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map.h b/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map.h index 01e82619780..57186ab5da6 100644 --- a/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map.h +++ b/Minkowski_sum_3/include/CGAL/Minkowski_sum_3/Gaussian_map.h @@ -180,7 +180,7 @@ class Gaussian_map : CGAL_NEF_TRACEN( "first+current:" << first << "+" << current ); typename Nef_polyhedron_3::SHalfedge_around_sface_const_circulator sfc(sec), send(sfc); CGAL_For_all(sfc, send) { - CGAL_NEF_TRACEN( "sedge->cirlce() " << sfc->circle() ); + CGAL_NEF_TRACEN( "sedge->circle() " << sfc->circle() ); if(sfc->circle() != current) { if(sfc->circle() != first) ++circles; diff --git a/Miscellany/doc/Miscellany/CGAL/Handle_hash_function.h b/Miscellany/doc/Miscellany/CGAL/Handle_hash_function.h index 9f1af1e48c5..89f0849e800 100644 --- a/Miscellany/doc/Miscellany/CGAL/Handle_hash_function.h +++ b/Miscellany/doc/Miscellany/CGAL/Handle_hash_function.h @@ -16,7 +16,7 @@ return a unique address. \cgalHeading{Implementation} -Plain type cast of `&*key` to `std::size_t` and devided +Plain type cast of `&*key` to `std::size_t` and divided by the size of the `std::iterator_traits::%value_type` to avoid correlations with the internal table size, which is a power of two. diff --git a/Miscellany/doc/Miscellany/CGAL/Real_timer.h b/Miscellany/doc/Miscellany/CGAL/Real_timer.h index c1fa7a4637a..502ec13ba39 100644 --- a/Miscellany/doc/Miscellany/CGAL/Real_timer.h +++ b/Miscellany/doc/Miscellany/CGAL/Real_timer.h @@ -12,7 +12,7 @@ time elapsed since its creation or last reset. It counts only the time where it is in the running state. The time information is given in seconds. The timer counts also the number of intervals it was running, i.e.\ it counts the number of calls of the `Real_timer::start()` member function since the -last reset. If the reset occures while the timer is running it counts as the +last reset. If the reset occurs while the timer is running it counts as the first interval. \cgalHeading{Implementation} diff --git a/Miscellany/doc/Miscellany/CGAL/Timer.h b/Miscellany/doc/Miscellany/CGAL/Timer.h index d180a70fef6..755ec50955b 100644 --- a/Miscellany/doc/Miscellany/CGAL/Timer.h +++ b/Miscellany/doc/Miscellany/CGAL/Timer.h @@ -18,7 +18,7 @@ time elapsed since its creation or last reset. It counts only the time where it is in the running state. The time information is given in seconds. The timer counts also the number of intervals it was running, i.e.\ it counts the number of calls of the `Timer::start()` member function since the -last reset. If the reset occures while the timer is running it counts as the +last reset. If the reset occurs while the timer is running it counts as the first interval. \cgalHeading{Implementation} diff --git a/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h b/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h index 5d980a1aafa..05debda348d 100644 --- a/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h +++ b/Miscellany/doc/Miscellany/CGAL/Unique_hash_map.h @@ -162,7 +162,7 @@ const Data& operator[](const Key& key) const; /*! inserts all keys from the range `[first1,beyond1)`. -The data variable for each inserted `key` is initilized with the +The data variable for each inserted `key` is initialized with the corresponding value from the range `[first2, first2 + (beyond1-first1))`. Returns `first2 + (beyond1-first1)`. \pre The increment operator must be defined for values diff --git a/Modular_arithmetic/examples/Modular_arithmetic/modular_filter.cpp b/Modular_arithmetic/examples/Modular_arithmetic/modular_filter.cpp index 4d6f223fc32..de680af448d 100644 --- a/Modular_arithmetic/examples/Modular_arithmetic/modular_filter.cpp +++ b/Modular_arithmetic/examples/Modular_arithmetic/modular_filter.cpp @@ -13,7 +13,7 @@ bool may_have_common_factor( std::cout<< "The type is modularizable" << std::endl; // Enforce IEEE double precision and rounding mode to nearest - // before useing modular arithmetic + // before using modular arithmetic CGAL::Protect_FPU_rounding pfr(CGAL_FE_TONEAREST); // Use Modular_traits to convert to polynomials with modular coefficients diff --git a/Modular_arithmetic/include/CGAL/Modular_arithmetic/Residue_type.h b/Modular_arithmetic/include/CGAL/Modular_arithmetic/Residue_type.h index ac3fc8633c8..9ac7177f6b5 100644 --- a/Modular_arithmetic/include/CGAL/Modular_arithmetic/Residue_type.h +++ b/Modular_arithmetic/include/CGAL/Modular_arithmetic/Residue_type.h @@ -148,7 +148,7 @@ private: } - /* a^-1, using Bezout (extended Euclidian algorithm). */ + /* a^-1, using Bezout (extended Euclidean algorithm). */ static inline double RES_inv (double ri1){ CGAL_precondition (ri1 != 0.0); diff --git a/Modular_arithmetic/test/Modular_arithmetic/Modular_traits.cpp b/Modular_arithmetic/test/Modular_arithmetic/Modular_traits.cpp index b5e01b01cd7..389174cdb47 100644 --- a/Modular_arithmetic/test/Modular_arithmetic/Modular_traits.cpp +++ b/Modular_arithmetic/test/Modular_arithmetic/Modular_traits.cpp @@ -3,7 +3,7 @@ /*! \file CGAL/Residue.C - test for number type modul + test for number type module */ #include diff --git a/Modular_arithmetic/test/Modular_arithmetic/Residue.cpp b/Modular_arithmetic/test/Modular_arithmetic/Residue.cpp index 82e98bba62d..388cb4f8e1b 100644 --- a/Modular_arithmetic/test/Modular_arithmetic/Residue.cpp +++ b/Modular_arithmetic/test/Modular_arithmetic/Residue.cpp @@ -1,7 +1,7 @@ // Author(s) : Michael Hemmer /*! \file CGAL/Residue.C - test for number type modul + test for number type module */ #include diff --git a/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h b/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h index 8d3572e3f0e..361b38fe561 100644 --- a/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h +++ b/Nef_2/doc/Nef_2/CGAL/Nef_polyhedron_2.h @@ -45,7 +45,7 @@ point location time is either logarithmic when LEDA's persistent dictionaries are present or if not then the point location time is worst-case linear, but experiments show often sublinear runtimes. Ray shooting equals point location plus a walk in the constrained -triangulation overlayed on the plane map representation. The cost of +triangulation overlaid on the plane map representation. The cost of the walk is proportional to the number of triangles passed in direction `d` until an obstacle is met. In a minimum weight triangulation of the obstacles (the plane map representing the diff --git a/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h b/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h index f95e1daefbd..7748f4b1f61 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_const_decorator.h @@ -496,7 +496,7 @@ check_integrity_and_topological_planarity(bool faces) const /* this means all face cycles and all isolated vertices are indeed referenced from a face */ /* every isolated vertex increases the component count - one face cycle per component is redundent except one + one face cycle per component is redundant except one finally check the Euler formula: */ CGAL_assertion( v_num - e_num + f_num == 1 + c_num ); } diff --git a/Nef_2/include/CGAL/Nef_2/PM_decorator.h b/Nef_2/include/CGAL/Nef_2/PM_decorator.h index 1d5bfb36cb4..914a6a58d6a 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_decorator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_decorator.h @@ -102,7 +102,7 @@ The type generalizes |Vertex_handle|.}*/ /* note: originally I had the mhavs, mhafs hardwired to Halfedge in this class scope. egcs 290.60 reacted with an internal compiler - error; this recursive instatiation scheme works however! + error; this recursive instantiation scheme works however! what a shitty world */ enum { BEFORE = -1, AFTER = 1 }; @@ -352,7 +352,7 @@ void link_as_isolated_vertex(Face_handle f, Vertex_handle v) const void clear_face_cycle_entries(Face_handle f) const /*{\Mop removes all isolated vertices and halfedges that -are entrie points into face cycles from the lists of |f|.}*/ +are entry points into face cycles from the lists of |f|.}*/ { f->clear_all_entries(); } @@ -608,7 +608,7 @@ void make_first_out_edge(Halfedge_handle e) const void set_adjacency_at_source_between(Halfedge_handle e, Halfedge_handle en) const -/*{\Mop makes |e| and |en| neigbors in the cyclic ordered adjacency list +/*{\Mop makes |e| and |en| neighbors in the cyclic ordered adjacency list around |v=source(e)|. \precond |source(e)==source(en)|.}*/ { CGAL_assertion(source(e)==source(en)); link_as_prev_next_pair(en->opposite(),e); @@ -800,7 +800,7 @@ void PM_decorator::clone(const HDS& H) const CGAL::Unique_hash_map Hnew; CGAL::Unique_hash_map Fnew; - /* First clone all objects and store correspondance in three maps.*/ + /* First clone all objects and store correspondence in three maps.*/ Vertex_const_iterator vit, vend = H.vertices_end(); for (vit = H.vertices_begin(); vit!=vend; ++vit) Vnew[vit] = this->phds->vertices_push_back(Vertex_base()); @@ -867,7 +867,7 @@ clone_skeleton(const HDS& H, const LINKDA& L) const CGAL::Unique_hash_map Vnew; CGAL::Unique_hash_map Hnew; - /* First clone all objects and store correspondance in the two maps.*/ + /* First clone all objects and store correspondence in the two maps.*/ Vertex_const_iterator vit, vend = H.vertices_end(); for (vit = H.vertices_begin(); vit!=vend; ++vit) { Vertex_handle v = this->phds->vertices_push_back(Vertex_base()); diff --git a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h index 8fb5be2f3fb..a28160ed477 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_overlayer.h +++ b/Nef_2/include/CGAL/Nef_2/PM_overlayer.h @@ -458,7 +458,7 @@ and |\Mvar.mark(v,1) = D1.mark(f1)|.}*/ create_face_objects(Out); - CGAL_NEF_TRACEN("transfering marks"); + CGAL_NEF_TRACEN("transferring marks"); Face_iterator f = this->faces_begin(); assoc_info(f); for (i=0; i<2; ++i) mark(f,i) = PI[i].mark(PI[i].faces_begin()); diff --git a/Nef_2/include/CGAL/Nef_2/Polynomial.h b/Nef_2/include/CGAL/Nef_2/Polynomial.h index 30c5963b4ad..a389fd9aae6 100644 --- a/Nef_2/include/CGAL/Nef_2/Polynomial.h +++ b/Nef_2/include/CGAL/Nef_2/Polynomial.h @@ -366,7 +366,7 @@ template class Polynomial : /*{\Mtext Additionally |\Mname| offers standard arithmetic ring - opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can + operations like |+,-,*,+=,-=,*=|. By means of the sign operation we can also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$ holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/ @@ -690,7 +690,7 @@ class Polynomial : } /*{\Xtext Additionally |\Mname| offers standard arithmetic ring - opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can + operations like |+,-,*,+=,-=,*=|. By means of the sign operation we can also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$ holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/ @@ -991,7 +991,7 @@ determines the sign for the limit process $x \rightarrow \infty$. /*{\Xtext Additionally |\Mname| offers standard arithmetic ring - opertions like |+,-,*,+=,-=,*=|. By means of the sign operation we can + operations like |+,-,*,+=,-=,*=|. By means of the sign operation we can also offer comparison predicates as $<,>,\leq,\geq$. Where $p_1 < p_2$ holds iff $|sign|(p_1 - p_2) < 0$. This data type is fully compliant to the requirements of CGAL number types. \setopdims{3cm}{2cm}}*/ diff --git a/Nef_2/include/CGAL/Nef_2/gen_point_location.h b/Nef_2/include/CGAL/Nef_2/gen_point_location.h index e575b68f8b7..f63bed48dfd 100644 --- a/Nef_2/include/CGAL/Nef_2/gen_point_location.h +++ b/Nef_2/include/CGAL/Nef_2/gen_point_location.h @@ -345,7 +345,7 @@ public: /*{\Mtypes}*/ // define additional types typedef GenericLocation Location; - /*{\Mtypedef usual return value for the point loaction.}*/ + /*{\Mtypedef usual return value for the point loction.}*/ enum Direction { downwards, upwards}; /*{\Menum used to specify the direction for the point location.}*/ diff --git a/Nef_2/include/CGAL/Nef_polyhedron_2.h b/Nef_2/include/CGAL/Nef_polyhedron_2.h index 62aad3e5649..2cc07b6d983 100644 --- a/Nef_2/include/CGAL/Nef_polyhedron_2.h +++ b/Nef_2/include/CGAL/Nef_polyhedron_2.h @@ -1031,7 +1031,7 @@ public: dictionaries are present or if not then the point location time is worst-case linear, but experiments show often sublinear runtimes. Ray shooting equals point location plus a walk in the constrained - triangulation overlayed on the plane map representation. The cost of + triangulation overlaid on the plane map representation. The cost of the walk is proportional to the number of triangles passed in direction |d| until an obstacle is met. In a minimum weight triangulation of the obstacles (the plane map representing the diff --git a/Nef_3/doc/Nef_3/CGAL/Nef_polyhedron_3.h b/Nef_3/doc/Nef_3/CGAL/Nef_polyhedron_3.h index d5a4486f7b6..ff3fd4c57e8 100644 --- a/Nef_3/doc/Nef_3/CGAL/Nef_polyhedron_3.h +++ b/Nef_3/doc/Nef_3/CGAL/Nef_polyhedron_3.h @@ -35,7 +35,7 @@ namespace CGAL { The second parameter and the third parameter are for future considerations. Neither `Nef_polyhedronItems_3` nor `Nef_polyhedronMarks` is - specifed, yet. Do not use any other than the default types for these two + specified, yet. Do not use any other than the default types for these two template parameters. \sa `CGAL::Nef_polyhedron_3::Vertex` @@ -74,7 +74,7 @@ public: illustrate the incidence of a svertex on a sphere map and of a halfedge in the global structure. - As part of the global incidence structure, the member fuctions `source` + As part of the global incidence structure, the member functions `source` and `target` return the source and target vertex of an edge. The member function `twin()` returns the opposite halfedge. diff --git a/Nef_3/doc/Nef_3/CGAL/OFF_to_nef_3.h b/Nef_3/doc/Nef_3/CGAL/OFF_to_nef_3.h index 68ad627f758..ee4d429515b 100644 --- a/Nef_3/doc/Nef_3/CGAL/OFF_to_nef_3.h +++ b/Nef_3/doc/Nef_3/CGAL/OFF_to_nef_3.h @@ -7,7 +7,7 @@ This function creates a 3D Nef polyhedron from an OFF file which is read from input stream `in`. The purpose of `OFF_to_nef_3` is to create a Nef polyhedron from an OFF file that cannot be handled by the `Nef_polyhedron_3` constructors. It handles double -coordinates while using a homogenous kernel, non-coplanar facets, +coordinates while using a homogeneous kernel, non-coplanar facets, surfaces with boundaries, self-intersecting surfaces, and single facets. Every closed volume gets marked. The function returns the number of facets it could not handle. diff --git a/Nef_3/doc/Nef_3/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h b/Nef_3/doc/Nef_3/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h index b5ca0a2bcb3..558c6321280 100644 --- a/Nef_3/doc/Nef_3/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h +++ b/Nef_3/doc/Nef_3/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h @@ -1,7 +1,7 @@ namespace CGAL { /// \ingroup PkgNef3IOFunctions -/// Converts an objet of type `Nef_polyhedron_3` into a polygon mesh model of `MutableFaceGraph`. +/// Converts an object of type `Nef_polyhedron_3` into a polygon mesh model of `MutableFaceGraph`. /// Note that contrary to `Nef_polyhedron_3::convert_to_polyhedron()`, the output is not triangulated /// (but faces with more than one connected component of the boundary). /// The polygon mesh can be triangulated by setting `triangulate_all_faces` to `true` or by calling the function `triangulate_faces()`. @@ -24,7 +24,7 @@ namespace CGAL { void convert_nef_polyhedron_to_polygon_mesh(const Nef_polyhedron& nef, Polygon_mesh& pm, bool triangulate_all_faces = false); /// \ingroup PkgNef3IOFunctions - /// Converts an objet of type `Nef_polyhedron_3` into a polygon soup. + /// Converts an object of type `Nef_polyhedron_3` into a polygon soup. /// The polygons can be triangulated by setting `triangulate_all_faces` to `true`. /// @tparam Nef_polyhedron an object of type `Nef_polyhedron_3`. /// @tparam PointRange a model of the concept `BackInsertionSequence` diff --git a/Nef_3/doc/Nef_3/PackageDescription.txt b/Nef_3/doc/Nef_3/PackageDescription.txt index 91de0089d8d..7edd3f45d4b 100644 --- a/Nef_3/doc/Nef_3/PackageDescription.txt +++ b/Nef_3/doc/Nef_3/PackageDescription.txt @@ -47,7 +47,7 @@ description, and a data structure that connects these neighborhoods up to a global data structure with edges, facets, and volumes. We offer a rich interface to investigate these data structures, their different elements and their connectivity. We provide affine (rigid) -tranformations and a point location query operation. We have a custom +transformations and a point location query operation. We have a custom file format for storing and reading Nef polyhedra from files. We offer a simple OpenGL visualization for debugging and illustrations. diff --git a/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h index 75f7f378dac..05aabb0edd2 100644 --- a/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h +++ b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h @@ -151,7 +151,7 @@ class Infimaximal_box { create_vertices_on_infibox(SNC_constructor&, const Plane_3&, const std::list&, const Mark&, const Mark&, const Mark&) { - // TODO: warning oder assertion einbauen + // TODO: create warning or assertion return std::list(); } diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 77afbf5e629..e147621b163 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -249,7 +249,7 @@ public: Iterator( const Node_handle root, const Segment_3& s) { CGAL_assertion_code( first_segment = true); S.push_front( Candidate( root, s)); - ++(*this); // place the interator in the first intersected cell + ++(*this); // place the iterator in the first intersected cell } Iterator( const Self& i) : S(i.S), node(i.node) {} Self& operator++() { @@ -553,7 +553,7 @@ Node_handle build_kdtree(Vertex_list& V, Halfedge_list& E, Halffacet_list& F, non_efective_splits = 0; if(non_efective_splits > 2) { - CGAL_NEF_TRACEN("build_kdtree: non efective splits reached maximum"); + CGAL_NEF_TRACEN("build_kdtree: non effective splits reached maximum"); nodes.push_back(Node(V, E, F)); return &(nodes.back()); } @@ -671,10 +671,10 @@ Segment_3 ray_to_segment(const Ray_3& r) const { CGAL_NEF_TRACEN("Objects_along_ray: input ray: "< Coord_vector; typedef std::vector Cycle_vector; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h b/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h index a8b0123f3df..83f89e413b3 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_const_decorator.h @@ -303,7 +303,7 @@ public: } else if(fc.is_svertex()) { #ifdef CGAL_USE_TRACE - // TODO: is there any warranty that the outter facet cycle enty point is always at first + // TODO: is there any warranty that the outer facet cycle entry point is always at first // in the cycles list? ++fc; while( fc != fce) { CGAL_assertion( fc.is_svertex()); ++fc; } CGAL_NEF_TRACEN( "no adjacent facets were found (but incident edge(s))."); @@ -369,10 +369,10 @@ public: continue; } - // We have to comapare the two skalar products sk0 and sk1. Therefore + // We have to comapare the two scalar products sk0 and sk1. Therefore // we have to normalize the input vectors vec0 and vec1, which means // that we have to divide them by their lengths len0 and len1. - // To cicumvent irrational numbers, we sqaure the whole inequality. + // To cicumvent irrational numbers, we square the whole inequality. FT len0 = vec0.x()*vec0.x()+vec0.y()*vec0.y()+vec0.z()*vec0.z(); FT len1 = vec1.x()*vec1.x()+vec1.y()*vec1.y()+vec1.z()*vec1.z(); @@ -441,7 +441,7 @@ public: Objects are marked as done, when placed in the output list. We have to maintain a stack of sface candidates (the spherical rubber sectors that provide connectivity at the local graphs of vertices) and facet -candiates (the plane pieces in three space also providing +candidates (the plane pieces in three space also providing connectivity). Note that we have to take care about the orientation of sobjects and facets. We have to take care that (1) the search along the shell extends along the whole shell structure (2) does not visit diff --git a/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h b/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h index c9e0fe5b49b..038843e9fa1 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h @@ -809,7 +809,7 @@ public: SFace_iterator f; // First, we classify all the Shere Faces per Shell. For each Shell we - // determine its minimum lexicographyly vertex and we check wheter the + // determine its minimum lexicographyly vertex and we check whether the // Shell encloses a region (closed surface) or not. CGAL_forall_sfaces(f,*this->sncp()) { // progress++; @@ -926,7 +926,7 @@ public: // The ray here has an special property since it is shooted from the lowest // vertex in a shell, so it would be expected that the ray goes along the // interior of a volume before it hits a 2-skeleton element. - // Unfortunatelly, it seems to be possible that several shells are incident + // Unfortunately, it seems to be possible that several shells are incident // to this lowest vertex, and in consequence, the ray could also go along // an edge or a facet belonging to a different shell. // This fact invalidates the precondition of the get_visible_facet method, diff --git a/Nef_3/include/CGAL/Nef_3/SNC_intersection.h b/Nef_3/include/CGAL/Nef_3/SNC_intersection.h index a804f7099b5..a3a26fb3041 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_intersection.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_intersection.h @@ -197,7 +197,7 @@ class SNC_intersection { if( outer_bound_pos != CGAL::ON_BOUNDED_SIDE ) return outer_bound_pos; /* The point p is not in the relative interior of the outer face cycle - so it is not necesary to know the possition of p with respect to the + so it is not necessary to know the position of p with respect to the inner face cycles */ Halffacet_cycle_const_iterator fe = f->facet_cycles_end(); ++fc; @@ -226,7 +226,7 @@ class SNC_intersection { if( inner_bound_pos != CGAL::ON_UNBOUNDED_SIDE ) return opposite(inner_bound_pos); /* At this point the point p belongs to relative interior of the facet's - outer cycle, and its possition is completely known when it belongs + outer cycle, and its position is completely known when it belongs to the clousure of any inner cycle */ } return CGAL::ON_BOUNDED_SIDE; diff --git a/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h b/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h index d32f5be6d89..01dcea98951 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h @@ -185,7 +185,7 @@ Comparison_result cr; /* An edge is considered intersecting a plane if its endpoints lie on the - plane or if they lie on diferent sides. Partial tangency is not considered + plane or if they lie on different sides. Partial tangency is not considered as intersection, due the fact that a lower dimensional face (the vertex) should be already reported as an object intersecting the plane. */ @@ -209,9 +209,9 @@ Side_of_plane::operator()(Halfedge_handle e) { /* - As for the edges, if a facet is tanget to the plane it is not considered as - a interesection since lower dimensional faces, like the edges and vertices - where the tangency occurrs, should be reported as the objects intersecting + As for the edges, if a facet is tangent to the plane it is not considered as + a intersection since lower dimensional faces, like the edges and vertices + where the tangency occurs, should be reported as the objects intersecting the plane. So, an intersection is reported if all vertices of the facet lie on plane, for which it is only necessary to check three vertices, or if the facet diff --git a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h index 6ee8676523d..573b58fb172 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_simplify.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_simplify.h @@ -111,7 +111,7 @@ class SNC_simplify_base : public SNC_decorator { if ( SD.is_closed_at_source( u->twin()) ) SD.set_face( tgt, fu); /* TO VERIFY: does is_closed_at_source(u) imply is_isolated(src)? - if it is true, the svertex face update is not necesary. */ + if it is true, the svertex face update is not necessary. */ SHalfedge_around_facet_circulator next = u; ++next; @@ -127,7 +127,7 @@ class SNC_simplify_base : public SNC_decorator { } else if(fc.is_shalfloop()) { SHalfloop_handle l(fc); - // this code is currenlty not used, but it is potentially need + // this code is currently not used, but it is potentially need // in the future, e.g for complex marks or a relative interior // function SFace_handle fu = l->incident_sface(), ftu = l->twin()->incident_sface(); @@ -144,7 +144,7 @@ class SNC_simplify_base : public SNC_decorator { } bool is_part_of_volume(Vertex_handle v) - /* determines if a vertex v is part of a volume, cheking if its local + /* determines if a vertex v is part of a volume, checking if its local graph is trivial (only one sface with no boundary). */ { SM_decorator SD(&*v); CGAL_assertion( !is_empty_range( SD.sfaces_begin(), SD.sfaces_end())); diff --git a/Nef_3/include/CGAL/Nef_polyhedron_3.h b/Nef_3/include/CGAL/Nef_polyhedron_3.h index 9f34a254636..74bb56ba885 100644 --- a/Nef_3/include/CGAL/Nef_polyhedron_3.h +++ b/Nef_3/include/CGAL/Nef_polyhedron_3.h @@ -128,7 +128,7 @@ class Nef_polyhedron_3_rep /*{\Mdefinition An instance of data type |\Mname| is a subset of 3-space which is the result of forming complements and intersections starting from a set |H| of -halfspaces. |\Mtype| is closed under all binary set opertions |intersection|, +halfspaces. |\Mtype| is closed under all binary set operations |intersection|, |union|, |difference|, |complement| and under the topological operations |boundary|, |closure|, and |interior|.}*/ @@ -1461,7 +1461,7 @@ protected: symmetric_difference(const Nef_polyhedron_3& N1) const /*{\Mop returns the symmectric difference |\Mvar - T| $\cup$ |T - \Mvar|. }*/ { - CGAL_NEF_TRACEN(" symmetic difference between nef3 "<<&*this<<" and "<<&N1); + CGAL_NEF_TRACEN(" symmetric difference between nef3 "<<&*this<<" and "<<&N1); if (is_empty()) return N1; if (N1.is_empty()) return *this; if (is_space()) return Nef_polyhedron_3(EMPTY); @@ -1527,11 +1527,11 @@ protected: or equal, equality, inequality.}*/ bool operator==(const Nef_polyhedron_3& N1) const - { CGAL_NEF_TRACEN(" equality comparision between nef3 "<<&*this<<" and "<<&N1); + { CGAL_NEF_TRACEN(" equality comparison between nef3 "<<&*this<<" and "<<&N1); return symmetric_difference(N1).is_empty(); } bool operator!=(const Nef_polyhedron_3& N1) const - { CGAL_NEF_TRACEN(" inequality comparision between nef3 "<<&*this<<" and "<<&N1); + { CGAL_NEF_TRACEN(" inequality comparison between nef3 "<<&*this<<" and "<<&N1); return !operator==(N1); } bool operator<(const Nef_polyhedron_3& N1) const diff --git a/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h b/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h index 43096bf5721..7a297d61838 100644 --- a/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h +++ b/Nef_S2/doc/Nef_S2/CGAL/Nef_polyhedron_S2.h @@ -31,7 +31,7 @@ type modeling \f$\mathbb{Q}\f$. The second parameter and the third parameter are for future considerations. Neither `Nef_polyhedronItems_S2` nor `Nef_polyhedronMarks` is -specifed, yet. Do not use other than the default types for these two +specified, yet. Do not use other than the default types for these two template parameters. \cgalHeading{Exploration - Point location - Ray shooting} @@ -257,7 +257,7 @@ Sphere_point antipode() ; \ingroup PkgNefS2Ref An object `s` of type `Sphere_segment` is a segment in the -surface of a unit sphere that is part of a great circle trough the +surface of a unit sphere that is part of a great circle through the origin. Sphere segments are represented by two sphere points \f$ p\f$ and \f$ q\f$ plus an oriented plane \f$ h\f$ that contains \f$ p\f$ and \f$ q\f$. The plane determines the sphere segment as follows. Let \f$ c\f$ be the circle in the diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h b/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h index 336dac05c93..2f71b2cc9d6 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_const_decorator.h @@ -192,7 +192,7 @@ SHalfedge_around_svertex_const_circulator SFace_cycle_const_iterator sface_cycles_begin(SFace_const_handle f) const /*{\Mop returns an iterator for all bounding face cycles of |f|. -The iterator is is convertable to |SVertex_const_handle|, +The iterator is is convertible to |SVertex_const_handle|, |SHalfloop_const_handle|, or |SHalfedge_const_handle|.}*/ { return f->boundary_entry_objects_.begin(); } @@ -370,7 +370,7 @@ check_integrity_and_topological_planarity(bool faces) const /* this means all face cycles and all isolated vertices are indeed referenced from a face */ /* every isolated vertex increases the component count - one face cycle per component is redundent except one + one face cycle per component is redundant except one finally check the Euler formula: */ CGAL_assertion( v_num - e_num + f_num == 1 + c_num ); } diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h b/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h index 13b938deba9..4328b38f44c 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_decorator.h @@ -231,7 +231,7 @@ Size_type number_of_sfaces() const SFace_cycle_iterator sface_cycles_begin(SFace_handle f) const /*{\Mop returns an iterator for all bounding face cycles of |f|. -The iterator is is convertable to |SVertex_handle|, +The iterator is is convertible to |SVertex_handle|, |SHalfloop_handle|, or |SHalfedge_handle|.}*/ { return f->boundary_entry_objects().begin(); } @@ -659,7 +659,7 @@ void link_as_target_of(SHalfedge_handle e, SVertex_handle v) const { link_as_source_of(e->twin(),v); } void set_adjacency_at_source_between(SHalfedge_handle e, SHalfedge_handle en) -/*{\Mop makes |e| and |en| neigbors in the cyclic ordered adjacency list +/*{\Mop makes |e| and |en| neighbors in the cyclic ordered adjacency list around |v=e->source()|. \precond |e->source()==en->source()|.}*/ { CGAL_assertion(e->source()==en->source()); link_as_prev_next_pair(en->twin(),e); diff --git a/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h b/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h index 68d5f25883e..52c94bad708 100644 --- a/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h +++ b/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h @@ -1043,7 +1043,7 @@ check_sphere(const Seg_list& L, bool compute_halfsphere[3][2]) const { CGAL_assertion(n<3); CGAL_NEF_TRACEN("n " << n); - CGAL_NEF_TRACEN("number of coordinats =0:" << n); + CGAL_NEF_TRACEN("number of coordinates =0:" << n); if(n==0) { if((chsp&60)!=60 && it->sphere_circle().orthogonal_vector().x()!=0) chsp|=60; diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h index 6c227872582..138c5ba91a6 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_direction.h @@ -82,7 +82,7 @@ Plane_3 plane() const { return Base(*this); } /* We have: 1) all directions fixed at p 2) d1==d3 possible - return true iff d1,d2,d3 are stricly ccw ordered around p + return true iff d1,d2,d3 are strictly ccw ordered around p Note: Sphere_directions are Plane_3 we therefore compare the normal vectors of the planes that underly the directions d1,d2,d3 in the plane diff --git a/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h b/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h index 4976ad38672..e6ff36dd0ce 100644 --- a/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h +++ b/Nef_S2/include/CGAL/Nef_S2/Sphere_segment.h @@ -85,7 +85,7 @@ class Sphere_segment : public Handle_for< Sphere_segment_rep > { /*{\Mdefinition An object |\Mvar| of type |\Mname| is a segment in the -surface of a unit sphere that is part of a great circle trough the +surface of a unit sphere that is part of a great circle through the origin. Sphere segments are represented by two sphere points $p$ and $q$ plus an oriented plane $h$ that contains $p$ and $q$. The plane determines the sphere segment. Let $c$ be the circle in the diff --git a/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h b/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h index dacc49f74d8..9f6a8a216c7 100644 --- a/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h +++ b/Nef_S2/include/CGAL/Nef_S2/leda_sphere_map.h @@ -100,7 +100,7 @@ template void subdivide(Iterator start, Iterator end) /* subdivision is done in phases - first we partition all segments into the pieces in the - closed postive xy-halfspace and into the pieces in the + closed positive xy-halfspace and into the pieces in the negative xy-halfspace - we sweep both halfspheres separate. Note that the boundary carries the same topology diff --git a/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h b/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h index 01316e8951f..1924d4a26e1 100644 --- a/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h +++ b/Nef_S2/include/CGAL/Nef_S2/sphere_predicates.h @@ -51,7 +51,7 @@ points are part of the equator first. Otherwise we sort according to the angle of the halfcircle through $S$, $N$, and the points with respect to the xy-plane. If both lie on the same halfcircle then the angle with respect to $OS$ decides. The parameter $pos=1$ does -everthing in the positive halfsphere. If $pos=-1$ then we rotate the +everything in the positive halfsphere. If $pos=-1$ then we rotate the whole scenery around the y-axis by $\pi$. Then the x-axis points left and the z-axis into the equatorial plane. */ diff --git a/NewKernel_d/include/CGAL/NewKernel_d/utils.h b/NewKernel_d/include/CGAL/NewKernel_d/utils.h index ddfdbab3ac2..487eae5bc10 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/utils.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/utils.h @@ -46,7 +46,7 @@ struct Has_type_different_from // tell a function f(a,b,c) that its real argument is a(b,c) struct Eval_functor {}; - // forget the first argument. Useful to make something dependant + // forget the first argument. Useful to make something dependent // (and thus usable in SFINAE), although that's not a great design. template struct Second_arg { typedef B type; diff --git a/Number_types/doc/Number_types/CGAL/FPU.h b/Number_types/doc/Number_types/CGAL/FPU.h index 20921ef706a..98596d05189 100644 --- a/Number_types/doc/Number_types/CGAL/FPU.h +++ b/Number_types/doc/Number_types/CGAL/FPU.h @@ -43,7 +43,7 @@ to the correct 64 bit precision, hence providing a similar effect to `Set_ieee_double_precision`. This notably affects the `Residue` class. Note for Visual C++ 64-bit users: due to a compiler bug, the stack unwinding -process happenning when an exception is thrown does not correctly execute the +process happening when an exception is thrown does not correctly execute the rounding mode restoration when the `Protect_FPU_rounding` object is destroyed. Therefore, for this configuration, some explicit code has to be added. @@ -135,12 +135,12 @@ startup process, and this is notably the case of LEDA (at least some versions of it). \cgal does not enforce this at startup as it would impact computations with long double performed by other codes in the same program. -Note that this property is notably required for proper functionning of the +Note that this property is notably required for proper functioning of the `Residue` class that performs modular arithmetic using efficient floating-point operations. Note concerning Visual C++ 64-bit: due to a compiler bug, the stack unwinding -process happenning when an exception is thrown does not correctly execute the +process happening when an exception is thrown does not correctly execute the restoring operation when the `Set_ieee_double_precision` object is destroyed. Therefore, for this configuration, some explicit code has to be added if you care about the state being restored. diff --git a/Number_types/doc/Number_types/CGAL/Lazy_exact_nt.h b/Number_types/doc/Number_types/CGAL/Lazy_exact_nt.h index 4b04b476540..03b0097a903 100644 --- a/Number_types/doc/Number_types/CGAL/Lazy_exact_nt.h +++ b/Number_types/doc/Number_types/CGAL/Lazy_exact_nt.h @@ -18,7 +18,7 @@ function on the same number of type `Lazy_exact_nt` might not return the same value as the exact representation might have been computed between the two calls, thus refining the double approximation. If you want to avoid this behavior, you need to first call `exact()` -(loosing the benefit of the lazyness if done systematically). +(losing the benefit of the laziness if done systematically). \tparam NT must be a model of concept `RealEmbeddable`, and at least model of concept `IntegralDomainWithoutDivision`. diff --git a/Number_types/include/CGAL/CORE_coercion_traits.h b/Number_types/include/CGAL/CORE_coercion_traits.h index 3a7151ef861..cf1df0bab3e 100644 --- a/Number_types/include/CGAL/CORE_coercion_traits.h +++ b/Number_types/include/CGAL/CORE_coercion_traits.h @@ -138,7 +138,7 @@ template <> struct Coercion_traits< ::CORE::Expr, CORE::BigFloat > -// not provieded by CORE +// not provided by CORE // Note that this is not symmetric to LEDA //CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long ,::CORE::BigInt) //CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long long ,::CORE::BigRat) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 429941be991..6fb1d9a1815 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -25,7 +25,7 @@ #include // for HUGE_VAL #endif -// This file specifies some platform dependant functions, regarding the FPU +// This file specifies some platform dependent functions, regarding the FPU // directed rounding modes. There is only support for double precision. // // It also contains the definition of the Protect_FPU_rounding<> class, diff --git a/Number_types/include/CGAL/GMP/Gmpfi_type.h b/Number_types/include/CGAL/GMP/Gmpfi_type.h index 6700913271b..2a43ef0788d 100644 --- a/Number_types/include/CGAL/GMP/Gmpfi_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfi_type.h @@ -303,7 +303,7 @@ CGAL_GMPFI_CONSTRUCTOR_FROM_SCALAR(Gmpz); Gmpfi::Precision_type get_precision()const; Gmpfi round(Gmpfi::Precision_type)const; - // arithmetics + // arithmetic Gmpfi operator+()const; Gmpfi operator-()const; @@ -427,7 +427,7 @@ Gmpfi Gmpfi::round(Gmpfi::Precision_type p)const{ return Gmpfi(*this,p); } -// arithmetics +// arithmetic inline Gmpfi Gmpfi::operator+()const{ diff --git a/Number_types/include/CGAL/GMP/Gmpfr_type.h b/Number_types/include/CGAL/GMP/Gmpfr_type.h index 33d7108b159..6d1959cf7cc 100644 --- a/Number_types/include/CGAL/GMP/Gmpfr_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfr_type.h @@ -378,7 +378,7 @@ class Gmpfr: #undef CGAL_GMPFR_CONSTRUCTOR_FROM_OBJECT - // When Gmpfr is refence counted, we inherit the assignment + // When Gmpfr is reference counted, we inherit the assignment // operator and the copy constructor from Handle_for. #ifdef CGAL_GMPFR_NO_REFCOUNT Gmpfr& operator=(const Gmpfr &a){ @@ -455,7 +455,7 @@ class Gmpfr: static bool inex_flag(); static bool erange_flag(); - // arithmetics + // arithmetic Gmpfr operator+()const; Gmpfr operator-()const; @@ -620,7 +620,7 @@ bool Gmpfr::erange_flag(){ return mpfr_erangeflag_p()!=0; } -// arithmetics +// arithmetic inline Gmpfr Gmpfr::operator+()const{ diff --git a/Number_types/include/CGAL/GMP/Gmpzf_type.h b/Number_types/include/CGAL/GMP/Gmpzf_type.h index 28befabf3e7..c983de55d65 100644 --- a/Number_types/include/CGAL/GMP/Gmpzf_type.h +++ b/Number_types/include/CGAL/GMP/Gmpzf_type.h @@ -166,8 +166,8 @@ public: canonicalize(); } - // arithmetics - // ----------- + // arithmetic + // ---------- Gmpzf operator+() const; Gmpzf operator-() const; Gmpzf& operator+=( const Gmpzf& b); @@ -203,8 +203,8 @@ private: // implementation // ============== -// arithmetics -// ----------- +// arithmetic +// ---------- inline Gmpzf Gmpzf::operator+() const diff --git a/Number_types/include/CGAL/Lazy_exact_nt.h b/Number_types/include/CGAL/Lazy_exact_nt.h index 7b749ae6251..38c55c62d32 100644 --- a/Number_types/include/CGAL/Lazy_exact_nt.h +++ b/Number_types/include/CGAL/Lazy_exact_nt.h @@ -68,7 +68,7 @@ * TODO : * - Generalize it for constructions at the kernel level. * - Add mixed operations with ET too ? - * - Interval refinement functionnality ? + * - Interval refinement functionality ? * - Separate the handle and the representation(s) in 2 files (?) * maybe not a good idea, better if everything related to one operation is * close together. @@ -174,7 +174,7 @@ struct Lazy_exact_Ex_Cst final : public Lazy_exact_nt_rep } }; -// Construction from a Lazy_exact_nt (which keeps the lazyness). +// Construction from a Lazy_exact_nt (which keeps the laziness). template class Lazy_lazy_exact_Cst final : public Lazy_exact_nt_rep { diff --git a/Number_types/include/CGAL/MP_Float.h b/Number_types/include/CGAL/MP_Float.h index 02a050a863c..f6811a0f116 100644 --- a/Number_types/include/CGAL/MP_Float.h +++ b/Number_types/include/CGAL/MP_Float.h @@ -617,7 +617,7 @@ division(const MP_Float & n, const MP_Float & d) CGAL_precondition(divisor != 0); - // Rescale d to have a to_double() value with reasonnable exponent. + // Rescale d to have a to_double() value with reasonable exponent. exponent_type scale_d = divisor.find_scale(); divisor.rescale(scale_d); const double dd = INTERN_MP_FLOAT::to_double(divisor); diff --git a/Number_types/include/CGAL/MP_Float_impl.h b/Number_types/include/CGAL/MP_Float_impl.h index 9266af09eff..ee5d7887f46 100644 --- a/Number_types/include/CGAL/MP_Float_impl.h +++ b/Number_types/include/CGAL/MP_Float_impl.h @@ -69,7 +69,7 @@ void MP_Float::construct_from_builtin_fp_type(T d) CGAL_assertion(is_finite(d)); - // This is subtle, because ints are not symetric against 0. + // This is subtle, because ints are not symmetric against 0. // First, scale d, and adjust exp accordingly. while (d < INTERN_MP_FLOAT::trunc_min || d > INTERN_MP_FLOAT::trunc_max) { diff --git a/Number_types/include/CGAL/Number_type_checker.h b/Number_types/include/CGAL/Number_type_checker.h index 6c582ff8c68..907bbff34d3 100644 --- a/Number_types/include/CGAL/Number_type_checker.h +++ b/Number_types/include/CGAL/Number_type_checker.h @@ -61,7 +61,7 @@ public: Number_type_checker(const NT1 &n1, const NT2 &n2) : _n1(n1), _n2(n2) { CGAL_assertion(is_valid()); } - // The following need to be dependant on NT1 != {NT2,int,double} ... + // The following need to be dependent on NT1 != {NT2,int,double} ... //Number_type_checker(const NT1 &n1) : _n1(n1), _n2(n1) {} //Number_type_checker(const NT2 &n2) : _n1(n2), _n2(n2) {} diff --git a/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h b/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h index 863a9800027..80e67f1ea86 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h @@ -24,11 +24,11 @@ namespace CGAL { //################################# CGAL::Fraction_traits ################## // Select the right alternative as Fraction_traits // The actual Type traits is Intern::Sqrt_ext_Ftr_base_2 -// The selction is done in two steps: +// The selection is done in two steps: // 1. Inter::Sqrt_ext_Ftr_base_1 selects by the BOOL_TAG whether the COEFF type // Is_fraction // 2. Intern::Sqrt_ext_Ftr_base_2 checks whether the internal type of the ROOT -// is still implicite convertible to the new COEFF type. +// is still implicitly convertible to the new COEFF type. // since the ROOT type it self can not be converted. namespace Intern{ template class Sqrt_ext_Ftr_base_2; diff --git a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h index e98d91c45ca..98effda949e 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -595,7 +595,7 @@ CGAL::Comparison_result sign_right = ZERO; } - // Check whether on of the terms is zero. In this case, the comparsion + // Check whether on of the terms is zero. In this case, the comparison // result is simpler: if (sign_left == ZERO) { @@ -628,7 +628,7 @@ CGAL::Comparison_result // We now square both terms and look at the sign of the one-root number: // ((a1 - a2)^2 - (b12*c1 + b22*c2)) + 2*b1*b2*sqrt(c1*c2) // - // If both signs are negative, we should swap the comparsion result + // If both signs are negative, we should swap the comparison result // we eventually compute. const NT A = diff_a0*diff_a0 - (x_sqr + y_sqr); const NT B = 2 * a1_ * y.a1_; diff --git a/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h b/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h index 544f8fb8790..727a8270d68 100644 --- a/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h +++ b/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h @@ -23,7 +23,7 @@ #include -// Disbale SQRT_EXTENSION_TO_BFI_CACHE by default +// Disable SQRT_EXTENSION_TO_BFI_CACHE by default #ifndef CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE #define CGAL_USE_SQRT_EXTENSION_TO_BFI_CACHE 0 #endif diff --git a/Number_types/include/CGAL/int.h b/Number_types/include/CGAL/int.h index d5a587c11d5..3b6cd321102 100644 --- a/Number_types/include/CGAL/int.h +++ b/Number_types/include/CGAL/int.h @@ -157,7 +157,7 @@ template<> class Algebraic_structure_traits< short int > typedef Tag_true Is_numerical_sensitive; // Explicitly defined functors which have no support for implicit - // interoperability. This is nescessary because of the implicit conversion + // interoperability. This is necessary because of the implicit conversion // to int for binary operations between short ints. class Integral_division : public CGAL::cpp98::binary_function< Type, Type, diff --git a/Number_types/include/CGAL/leda_integer.h b/Number_types/include/CGAL/leda_integer.h index 1edb1635aaa..eedd073aa18 100644 --- a/Number_types/include/CGAL/leda_integer.h +++ b/Number_types/include/CGAL/leda_integer.h @@ -93,7 +93,7 @@ template <> class Algebraic_structure_traits< leda_integer > // Div defined via base using Div_mod // Mod defined via base using Div_mod - // This code results in an inconsisten div/mod for some leda versions + // This code results in an inconsistent div/mod for some leda versions // TODO: reactivate this code // typedef INTERN_AST::Div_per_operator< Type > Div; diff --git a/Number_types/test/Number_types/CORE_BigRat.cpp b/Number_types/test/Number_types/CORE_BigRat.cpp index 60124ec0277..cb3f1f199c7 100644 --- a/Number_types/test/Number_types/CORE_BigRat.cpp +++ b/Number_types/test/Number_types/CORE_BigRat.cpp @@ -69,7 +69,7 @@ int main() { CGAL::test_real_embeddable(); CGAL::test_fraction_traits(); - // backward compatiblity + // backward compatibility CGAL::test_rational_traits(); test_io(); diff --git a/Number_types/test/Number_types/Gmpq_new.cpp b/Number_types/test/Number_types/Gmpq_new.cpp index c4d2d41472c..5ad80d7c26d 100644 --- a/Number_types/test/Number_types/Gmpq_new.cpp +++ b/Number_types/test/Number_types/Gmpq_new.cpp @@ -28,7 +28,7 @@ int main() { CGAL::test_real_embeddable(); CGAL::test_fraction_traits(); - // backward compatiblity + // backward compatibility CGAL::test_rational_traits(); } diff --git a/Number_types/test/Number_types/Interval_nt_new.cpp b/Number_types/test/Number_types/Interval_nt_new.cpp index 706a2a57bcc..c2481700c7d 100644 --- a/Number_types/test/Number_types/Interval_nt_new.cpp +++ b/Number_types/test/Number_types/Interval_nt_new.cpp @@ -11,7 +11,7 @@ { \ bool b = false; \ try{(void) expr;}catch(error){ b = true;} \ - if(!b) CGAL_error_msg( "Expr should throw expetion"); \ + if(!b) CGAL_error_msg( "Expr should throw exception"); \ } int main() { diff --git a/Number_types/test/Number_types/Lazy_exact_nt.cpp b/Number_types/test/Number_types/Lazy_exact_nt.cpp index b15b8c7d28e..c9a024aa49c 100644 --- a/Number_types/test/Number_types/Lazy_exact_nt.cpp +++ b/Number_types/test/Number_types/Lazy_exact_nt.cpp @@ -113,7 +113,7 @@ void test_to_double() std::cout << "Approximated interval for 1 : " << tmp.approx() << std::endl; // Now we square it repeatedly (the interval is going to grow), and we check - // that to_double() stays reasonnably close to 1. + // that to_double() stays reasonably close to 1. for (int i = 0; i < 20; ++i) { tmp = CGAL_NTS square(tmp); double d = CGAL_NTS to_double(tmp); diff --git a/Number_types/test/Number_types/Quotient_new.cpp b/Number_types/test/Number_types/Quotient_new.cpp index 9b1d587f4fb..65450205e87 100644 --- a/Number_types/test/Number_types/Quotient_new.cpp +++ b/Number_types/test/Number_types/Quotient_new.cpp @@ -35,7 +35,7 @@ void test_quotient() { CGAL::test_real_embeddable(); CGAL::test_fraction_traits(); - // backward compatiblity + // backward compatibility CGAL::test_rational_traits(); } diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index 7861b52f165..b2c8f42d47d 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -311,7 +311,7 @@ void to_double_test(){ } } -//This test is dedicated to the comaprison of numbers from different extensions +//This test is dedicated to the comparison of numbers from different extensions template void test_compare(){ typedef typename EXT::NT NT; diff --git a/Number_types/test/Number_types/leda_rational.cpp b/Number_types/test/Number_types/leda_rational.cpp index b5a46ae664f..4561e56b61f 100644 --- a/Number_types/test/Number_types/leda_rational.cpp +++ b/Number_types/test/Number_types/leda_rational.cpp @@ -24,7 +24,7 @@ int main() { CGAL::test_real_embeddable(); CGAL::test_fraction_traits(); - // backward compatiblity + // backward compatibility CGAL::test_rational_traits(); return 0; diff --git a/Number_types/test/Number_types/mpq_class.cpp b/Number_types/test/Number_types/mpq_class.cpp index ca215c874c6..1923d7b4ce3 100644 --- a/Number_types/test/Number_types/mpq_class.cpp +++ b/Number_types/test/Number_types/mpq_class.cpp @@ -27,7 +27,7 @@ int main() { CGAL::test_real_embeddable(); CGAL::test_fraction_traits(); - // backward compatiblity + // backward compatibility CGAL::test_rational_traits(); } { diff --git a/Partition_2/doc/Partition_2/Concepts/PartitionTraits_2.h b/Partition_2/doc/Partition_2/Concepts/PartitionTraits_2.h index 191a8b1d511..c4c3827f664 100644 --- a/Partition_2/doc/Partition_2/Concepts/PartitionTraits_2.h +++ b/Partition_2/doc/Partition_2/Concepts/PartitionTraits_2.h @@ -77,7 +77,7 @@ typedef unspecified_type Orientation_2; /*! Predicate object type that provides -`CGAL::Comparision_result operator()(Point_2 p, Point_2 q)` to compare +`CGAL::Comparison_result operator()(Point_2 p, Point_2 q)` to compare the \f$ y\f$ values of two points. The operator must return `CGAL::SMALLER` if \f$ p_y < q_y\f$, `CGAL::LARGER` if \f$ p_y > q_y\f$ and `CGAL::EQUAL` if \f$ p_y = q_y\f$. diff --git a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt index f68a1a8eca3..7d62380935d 100644 --- a/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt +++ b/Point_set_processing_3/doc/Point_set_processing_3/Point_set_processing_3.txt @@ -255,7 +255,7 @@ found in other \cgal components: Point sets are often used to sample objects with a higher dimension, typically a curve in 2D or a surface in 3D. In such cases, finding the -scale of the objet is crucial, that is to say finding the minimal +scale of the object is crucial, that is to say finding the minimal number of points (or the minimal local range) such that the subset of points has the appearance of a curve in 2D or a surface in 3D \cgalCite{cgal:gcsa-nasr-13}. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index 846547a3bec..939027ad2b5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -465,7 +465,7 @@ private: typedef std::vector Node_ids; typedef std::unordered_map On_face_map; typedef std::unordered_map On_edge_map; - //to keep the correspondance between node_id and vertex_handle in each mesh + //to keep the correspondence between node_id and vertex_handle in each mesh typedef internal::Node_id_to_vertex @@ -1111,7 +1111,7 @@ public: Node_ids& node_ids=it2->second; CGAL_assertion( std::set(node_ids.begin(), node_ids.end()) .size()==node_ids.size() ); - //sort nodes along the egde to allow consecutive splits + //sort nodes along the edge to allow consecutive splits sort_vertices_along_hedge(node_ids,hedge,tm,vpm,nodes); //save original face and nodes for face of hedge (1) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index edc7d892bab..0c4664aa0c8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -944,7 +944,7 @@ void import_polyline( halfedge_descriptor prev1=h1; halfedge_descriptor prev2=h2; - //set the correspondance + //set the correspondence pm1_to_output_edges.insert( std::make_pair(edge(prev1, pm1), edge(prev_out, output)) ); pm2_to_output_edges.insert( 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 4bf778aca29..2d5d92374ba 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/locate.h @@ -44,7 +44,7 @@ // Everywhere in this file: // If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence // between the coordinates in `bc` and the vertices of the face `f` is the following: // - `w0` corresponds to `source(halfedge(f, tm), tm)` // - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -111,7 +111,7 @@ using Barycentric_coordinates = std::array; /// \ingroup PMP_locate_grp /// /// If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -631,7 +631,7 @@ construct_point(const std::pair::face /// \brief Given a location, returns whether the location is on the vertex `vd` or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -675,7 +675,7 @@ is_on_vertex(const std::pair::face_de /// \brief Given a location, returns whether this location is on the halfedge `hd` or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -724,7 +724,7 @@ is_on_halfedge(const std::pair::face_ /// that is, if all the barycentric coordinates are positive. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -764,7 +764,7 @@ is_in_face(const std::array& bar, /// \brief Given a location, returns whether the location is in the face (boundary included) or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -796,7 +796,7 @@ is_in_face(const std::pair::face_desc /// \brief Given a location, returns whether the location is on the boundary of the face or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -837,7 +837,7 @@ is_on_face_border(const std::pair::fa /// \brief Given a location, returns whether the location is on the border of the mesh or not. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -906,7 +906,7 @@ is_on_mesh_border(const std::pair::fa /// and the barycentric coordinates of the vertex `vd` in that face. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -967,7 +967,7 @@ locate_vertex(typename boost::graph_traits::vertex_descriptor vd, /// of the vertex in `fd`. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -1006,7 +1006,7 @@ locate_vertex(const typename boost::graph_traits::vertex_descripto /// barycentric coordinates of that location in that face. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -1046,7 +1046,7 @@ locate_on_halfedge(const typename boost::graph_traits::halfedge_de /// `query` with respect to the vertices of `fd`. /// /// \details If `tm` is the input triangulated surface mesh and given the pair (`f`, `bc`) -/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondance +/// such that `bc` is the triplet of barycentric coordinates `(w0, w1, w2)`, the correspondence /// between the coordinates in `bc` and the vertices of the face `f` is the following: /// - `w0` corresponds to `source(halfedge(f, tm), tm)` /// - `w1` corresponds to `target(halfedge(f, tm), tm)` @@ -1157,7 +1157,7 @@ locate_in_face(const typename internal::Location_traits triangles; struct Intersect_facets { void operator()( const Box* b, const Box* c) const { Halfedge_const_handle h = b->handle()->halfedge(); - // check for shared egde --> no intersection + // check for shared edge --> no intersection if ( h->opposite()->facet() == c->handle() || h->next()->opposite()->facet() == c->handle() || h->next()->next()->opposite()->facet() == c->handle()) diff --git a/Polyhedron/include/CGAL/Polyhedron_3.h b/Polyhedron/include/CGAL/Polyhedron_3.h index 255bb786289..e694033db6a 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3.h +++ b/Polyhedron/include/CGAL/Polyhedron_3.h @@ -1310,7 +1310,7 @@ public: // Three copies of the vertices and two new triangles will be // created. h,i,j will be incident to the first new triangle. The // returnvalue will be an halfedge iterator denoting the new - // halfegdes of the second new triangle which was h beforehand. + // halfedges of the second new triangle which was h beforehand. // Precondition: h,i,j are distinct, consecutive vertices of the // polyhedron and form a cycle: i.e. `h->vertex() == i->opposite() // ->vertex()', ..., `j->vertex() == h->opposite()->vertex()'. The @@ -1591,7 +1591,7 @@ public: << std::endl; break; } - // Distinct facets on each side of an halfegde. + // Distinct facets on each side of an halfedge. valid = valid && ( ! check_tag( Supports_halfedge_face()) || D.get_face(i) != D.get_face(i->opposite())); if ( ! valid) { diff --git a/QP_solver/include/CGAL/QP_solver/Initialization.h b/QP_solver/include/CGAL/QP_solver/Initialization.h index 2d81aa018fb..0ff5f1bef34 100644 --- a/QP_solver/include/CGAL/QP_solver/Initialization.h +++ b/QP_solver/include/CGAL/QP_solver/Initialization.h @@ -182,7 +182,7 @@ init_x_O_v_i() x_O_v_i.reserve(qp_n); x_O_v_i.resize (qp_n); - // constants for comparisions: + // constants for comparisons: const L_entry l0(0); const U_entry u0(0); diff --git a/STL_Extension/include/CGAL/Multiset.h b/STL_Extension/include/CGAL/Multiset.h index 9382923dbc6..fe82fa680d4 100644 --- a/STL_Extension/include/CGAL/Multiset.h +++ b/STL_Extension/include/CGAL/Multiset.h @@ -624,7 +624,7 @@ public: //@{ /*! - * Get the comparsion object used by the tree (non-const version). + * Get the comparison object used by the tree (non-const version). */ inline Compare& key_comp () { @@ -632,7 +632,7 @@ public: } /*! - * Get the comparsion object used by the tree (non-const version). + * Get the comparison object used by the tree (non-const version). */ inline Compare& value_comp () { @@ -641,7 +641,7 @@ public: /*! - * Get the comparsion object used by the tree (const version). + * Get the comparison object used by the tree (const version). */ inline const Compare& key_comp () const { @@ -649,7 +649,7 @@ public: } /*! - * Get the comparsion object used by the tree (const version). + * Get the comparison object used by the tree (const version). */ inline const Compare& value_comp () const { diff --git a/STL_Extension/include/CGAL/assertions.h b/STL_Extension/include/CGAL/assertions.h index b9e145ec9e7..b64d63a92aa 100644 --- a/STL_Extension/include/CGAL/assertions.h +++ b/STL_Extension/include/CGAL/assertions.h @@ -351,7 +351,7 @@ inline bool possibly(Uncertain c); } //namespace CGAL -// This comes last as it is dependant on the macros to be defined. +// This comes last as it is dependent on the macros to be defined. // But the macros need CGAL::possibly(). #include diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/validity.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/validity.h index 23519e878bf..f0a325b63ed 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/validity.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/validity.h @@ -132,7 +132,7 @@ public: halfedge_descriptor h = halfedge(a->info(), mesh); halfedge_descriptor g = halfedge(b->info(), mesh); - // check for shared egde + // check for shared edge if(face(opposite(h, mesh), mesh) == b->info() || face(opposite(prev(h, mesh), mesh), mesh) == b->info() || face(opposite(next(h, mesh), mesh), mesh) == b->info()) { diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index 1792fdddbbb..8dd320bbff4 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -144,7 +144,7 @@ public: /// \brief An ordered pair specifying a location on the surface of the `Triangle_mesh`. /// \details If `tm` is the input graph and given the pair (`f`, `bc`) such that `bc` is `(w0, w1, w2)`, - /// the correspondance with the weights in `bc` and the vertices of the face `f` is the following: + /// the correspondence with the weights in `bc` and the vertices of the face `f` is the following: /// - `w0 = source(halfedge(f,tm),tm)` /// - `w1 = target(halfedge(f,tm),tm)` /// - `w2 = target(next(halfedge(f,tm),tm),tm)` diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_self_intersection.h b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_self_intersection.h index d16e1cbb54b..483cdef89d7 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_self_intersection.h +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_self_intersection.h @@ -16,7 +16,7 @@ struct Intersect_facets void operator()(const Box* b, const Box* c) const { Halfedge_const_handle h = b->handle()->halfedge(); - // check for shared egde --> no intersection + // check for shared edge --> no intersection if(h->opposite()->facet() == c->handle() || h->next()->opposite()->facet() == c->handle() || h->next()->next()->opposite()->facet() == c->handle()) diff --git a/Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/PackageDescription.txt b/Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/PackageDescription.txt index c5cc5801f09..fa4c5ae7fdb 100644 --- a/Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/PackageDescription.txt +++ b/Surface_mesh_skeletonization/doc/Surface_mesh_skeletonization/PackageDescription.txt @@ -39,7 +39,7 @@ \todo doc+code: mention that to get a better skeleton that is closer to the medial axis, the surface must be sufficiently well sampled so that the Voronoi poles lie on the media axis (see Amenta's paper). - Propose the usage of the isotropic remeshing and see if we add a boolean to do it automatically in the api (correspondance would be broken) + Propose the usage of the isotropic remeshing and see if we add a boolean to do it automatically in the api (correspondence would be broken) \todo code: implement the random sampling of surface using the work started by Alexandru during its gsoc to get a better approximation of poles \todo code: expose in polygon mesh processing the function to compute the voronoi pole of a close triangle mesh \todo code: expose in polygon mesh processing the function to remesh locally a triangle mesh with the angle and edge length parameters diff --git a/TDS_2/test/TDS_2/include/CGAL/_test_cls_tds_2.h b/TDS_2/test/TDS_2/include/CGAL/_test_cls_tds_2.h index 0545aa79748..2789ed9f143 100644 --- a/TDS_2/test/TDS_2/include/CGAL/_test_cls_tds_2.h +++ b/TDS_2/test/TDS_2/include/CGAL/_test_cls_tds_2.h @@ -128,7 +128,7 @@ _test_cls_tds_2( const Tds &) assert(tds3.is_valid()); v3 = tds3.insert_dim_up(w3,true); assert(tds3.is_valid()); - // test insert_in_egde dim==1 + // test insert_in_edge dim==1 tds3.insert_in_edge(v3->face(), 2); assert(tds3.dimension()== 1); assert(tds3.number_of_vertices() == 4); @@ -174,7 +174,7 @@ _test_cls_tds_2( const Tds &) assert(tds4.is_valid() ); v4_3 = tds4.insert_dim_up(w4,true); assert(tds4.is_valid() ); - // test insert-in-face, insert_in_egde dim==2 + // test insert-in-face, insert_in_edge dim==2 // Find the face v4_1 v4_2 v4_3 for insertion Face_circulator fc= tds4.incident_faces(v4_1); while( ! (fc->has_vertex(v4_2) && fc->has_vertex(v4_3)) ) fc++; diff --git a/Three/include/CGAL/Three/Scene_interface.h b/Three/include/CGAL/Three/Scene_interface.h index 2290fb6642a..e64bcd987bc 100644 --- a/Three/include/CGAL/Three/Scene_interface.h +++ b/Three/include/CGAL/Three/Scene_interface.h @@ -116,10 +116,10 @@ public: //!The id of the currently selected item. //!@returns the list of currently selected items indices. virtual QList selectionIndices() const = 0; - //!Item_A is designated with the column A/B in the Geometric Objetcts widget. + //!Item_A is designated with the column A/B in the Geometric Objects widget. //!@returns the index of the Item_A virtual Item_id selectionAindex() const = 0; - //!Item_B is designated with the column A/B in the Geometric Objetcts widget. + //!Item_B is designated with the column A/B in the Geometric Objects widget. //!@returns the index of the Item_B virtual Item_id selectionBindex() const = 0; diff --git a/Triangulation_2/test/Triangulation_2/test_delaunay_hierarchy_2.cpp b/Triangulation_2/test/Triangulation_2/test_delaunay_hierarchy_2.cpp index 976dd0858d5..f82cb7a23ec 100644 --- a/Triangulation_2/test/Triangulation_2/test_delaunay_hierarchy_2.cpp +++ b/Triangulation_2/test/Triangulation_2/test_delaunay_hierarchy_2.cpp @@ -36,7 +36,7 @@ typedef CGAL::Triangulation_face_base_2 Fb; typedef CGAL::Triangulation_data_structure_2 Tds; typedef CGAL::Delaunay_triangulation_2 Dt; // Explicit instantiation of the whole class : -// does not work anymore because of the tag dependant copy +// does not work anymore because of the tag dependent copy template class CGAL::Triangulation_hierarchy_2
      ; From eed54a0ae5e7e19a5d47a28a5f4e7748f7a6bdee Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 15 Nov 2022 18:45:39 +0100 Subject: [PATCH 158/426] spelling corrections Some spelling corrections (Directories starting with `O`-`S` , first part), some backward work some forward work --- .../CGAL/_test_circles_constructions.h | 4 +-- .../include/CGAL/Polyhedral_mesh_domain_3.h | 2 +- .../Optimal_bounding_box/internal/evolution.h | 2 +- .../Optimal_transportation_reconstruction_2.h | 4 +-- Orthtree/include/CGAL/Orthtree/Node.h | 2 +- .../CGAL/Partition_2/Rotation_tree_2.h | 2 +- .../CGAL/Partition_2/partition_y_monotone_2.h | 2 +- .../Periodic_2_Delaunay_triangulation_2.h | 4 +-- .../Periodic_2_triangulation_hierarchy_2.h | 2 +- .../Protect_edges_sizing_field.h | 6 ++-- .../CGAL/Periodic_3_mesh_triangulation_3.h | 2 +- .../demo/Periodic_3_triangulation_3/Scene.cpp | 2 +- .../demo/Periodic_Lloyd_3/CMakeLists.txt | 2 +- .../CGAL/Periodic_3_regular_triangulation_3.h | 4 +-- .../include/CGAL/Periodic_3_triangulation_3.h | 4 +-- .../CGAL/_test_cls_periodic_3_alpha_shape_3.h | 4 +-- .../test_p3rt3_versus_rt3.cpp | 2 +- .../hyperbolic_free_motion_animation.h | 2 +- .../CGAL/Hyperbolic_octagon_translation.h | 2 +- .../include/CGAL/range_search_delaunay_2.h | 2 +- .../doc/Point_set_3/PackageDescription.txt | 6 ++-- Point_set_3/include/CGAL/Point_set_3.h | 4 +-- Point_set_3/include/CGAL/Point_set_3/IO/LAS.h | 4 +-- Point_set_3/include/CGAL/Point_set_3/IO/OFF.h | 2 +- Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h | 2 +- .../Point_set_processing_3/property_map.cpp | 2 +- .../include/CGAL/IO/write_las_points.h | 2 +- .../compute_registration_transformation.h | 2 +- .../include/CGAL/OpenGR/register_point_sets.h | 2 +- .../internal/Rich_grid.h | 4 +-- .../include/CGAL/compute_average_spacing.h | 2 +- .../include/CGAL/jet_smooth_point_set.h | 2 +- .../include/CGAL/mst_orient_normals.h | 4 +-- .../include/CGAL/scanline_orient_normals.h | 2 +- .../include/CGAL/structure_point_set.h | 6 ++-- .../tutorial_example.cpp | 2 +- .../CGAL/Mesh_3/Poisson_refine_cells_3.h | 4 +-- .../CGAL/poisson_refine_triangulation.h | 2 +- Polygon/include/CGAL/Polygon_with_holes_2.h | 2 +- .../Concepts/PMPCorefinementVisitor.h | 2 +- .../Concepts/PMPTriangulateFaceVisitor.h | 2 +- .../Polygon_mesh_processing.txt | 4 +-- .../locate_example.cpp | 2 +- .../Polygon_mesh_processing/compute_normal.h | 2 +- .../CGAL/Polygon_mesh_processing/extrude.h | 2 +- .../CGAL/Polygon_mesh_processing/fair.h | 4 +-- .../Corefinement/Face_graph_output_builder.h | 4 +-- .../internal/Corefinement/Visitor.h | 8 ++--- .../internal/Corefinement/face_graph_utils.h | 2 +- .../internal/Corefinement/intersection_impl.h | 2 +- .../intersection_of_coplanar_triangles_3.h | 2 +- .../Hole_filling/Triangulate_hole_polyline.h | 2 +- .../Isotropic_remeshing/remesh_impl.h | 2 +- .../internal/Smoothing/mesh_smoothing_impl.h | 6 ++-- .../internal/Snapping/snap_vertices.h | 6 ++-- .../internal/fair_impl.h | 2 +- .../internal/simplify_polyline.h | 4 +-- .../Polygon_mesh_processing/intersection.h | 2 +- .../merge_border_vertices.h | 2 +- .../orient_polygon_soup.h | 4 +-- .../Polygon_mesh_processing/orientation.h | 2 +- .../repair_degeneracies.h | 8 ++--- .../repair_self_intersections.h | 2 +- .../triangulate_hole.h | 8 ++--- .../include/CGAL/Polygon_mesh_slicer.h | 4 +-- .../include/CGAL/Polyhedral_envelope.h | 4 +-- .../Polyhedral_envelope_filter.h | 2 +- .../connected_component_surface_mesh.cpp | 2 +- .../test_hausdorff_bounded_error_distance.cpp | 2 +- .../test_pmp_distance.cpp | 2 +- .../test_pmp_repair_degeneracies.cpp | 2 +- Polyhedron/demo/Polyhedron/CMakeLists.txt | 8 ++--- Polyhedron/demo/Polyhedron/MainWindow.cpp | 4 +-- .../demo/Polyhedron/Plugins/IO/CMakeLists.txt | 2 +- .../Plugins/IO/Polylines_io_plugin.cpp | 4 +-- .../Plugins/Mesh_3/include/gsl/gsl_assert | 2 +- .../Clip_polyhedron_plugin.cpp | 2 +- .../Mean_curvature_flow_skeleton_plugin.cpp | 2 +- .../PMP/Point_inside_polyhedron_plugin.cpp | 2 +- .../Scene_facegraph_item_k_ring_selection.h | 2 +- .../Plugins/PMP/Selection_plugin.cpp | 2 +- .../Surface_reconstruction_plugin.cpp | 2 +- .../Surface_mesh_approximation_plugin.cpp | 6 ++-- .../Edit_polyhedron_plugin.cpp | 2 +- .../Scene_edit_polyhedron_item.cpp | 2 +- .../Plugins/Three_examples/Example_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Scene.cpp | 2 +- Polyhedron/demo/Polyhedron/Scene.h | 2 +- .../Scene_points_with_normal_item.cpp | 2 +- .../Polyhedron/Scene_polygon_soup_item.cpp | 2 +- .../Scene_polyhedron_selection_item.cpp | 6 ++-- .../demo/Polyhedron/Scene_polylines_item.cpp | 4 +-- .../demo/Polyhedron/Scene_surface_mesh_item.h | 2 +- .../demo/Polyhedron/include/CGAL/Use_ssh.h | 2 +- .../demo/Polyhedron/include/Point_set_3.h | 2 +- .../demo/Polyhedron/testing/test_demo.js | 2 +- Polyhedron/demo/Polyhedron/texture.cpp | 8 ++--- Polyhedron/doc/Polyhedron/Polyhedron.txt | 2 +- Polyhedron/include/CGAL/Polyhedron_3.h | 4 +-- .../CGAL/Polyhedron_incremental_builder_3.h | 4 +-- .../test/Polyhedron/test_polyhedron.cpp | 2 +- .../Polyline_simplification_2.cpp | 4 +-- .../Stop_below_count_ratio_threshold.h | 2 +- .../include/CGAL/Polynomial/Polynomial_type.h | 2 +- Polynomial/include/CGAL/Polynomial/misc.h | 2 +- .../Polynomial/modular_gcd_utcf_algorithm_M.h | 2 +- .../CGAL/Polynomial/modular_gcd_utcf_dfai.h | 2 +- .../polynomial_gcd_implementations.h | 4 +-- .../include/CGAL/Polynomial/resultant.h | 6 ++-- Polynomial/include/CGAL/Polynomial_traits_d.h | 2 +- Polynomial/test/Polynomial/test_polynomial.h | 2 +- .../CGAL/Polytope_distance_d.h | 2 +- Polytope_distance_d/include/CGAL/Width_3.h | 2 +- Profiling_tools/include/CGAL/Real_timer.h | 2 +- Profiling_tools/include/CGAL/Timer.h | 2 +- Property_map/include/CGAL/property_map.h | 2 +- QP_solver/doc/QP_solver/CGAL/QP_solution.h | 6 ++-- .../doc/QP_solver/Concepts/LinearProgram.h | 4 +-- QP_solver/doc/QP_solver/Concepts/MPSFormat.h | 4 +-- .../doc/QP_solver/Concepts/QuadraticProgram.h | 4 +-- QP_solver/doc/QP_solver/QP_solver.txt | 2 +- QP_solver/include/CGAL/QP_models.h | 2 +- QP_solver/include/CGAL/QP_options.h | 2 +- QP_solver/include/CGAL/QP_solution.h | 2 +- .../include/CGAL/QP_solver/Initialization.h | 4 +-- QP_solver/include/CGAL/QP_solver/QP_solver.h | 6 ++-- .../include/CGAL/QP_solver/QP_solver_impl.h | 4 +-- .../test/QP_solver/create_test_solver_cin | 4 +-- QP_solver/test/QP_solver/test_solver.cpp | 2 +- Ridges_3/examples/Ridges_3/README | 2 +- .../include/CGAL/PolyhedralSurf_neighbors.h | 2 +- Ridges_3/include/CGAL/Umbilics.h | 2 +- Ridges_3/test/Ridges_3/ridge_test.cpp | 2 +- .../CGAL/Mesh_complex_3_in_triangulation_3.h | 4 +-- .../doc/STL_Extension/CGAL/Default.h | 2 +- .../doc/STL_Extension/CGAL/result_of.h | 2 +- .../Concepts/SurjectiveLockDataStructure.h | 4 +-- .../doc/STL_Extension/STL_Extension.txt | 4 +-- .../CGAL/Concurrent_compact_container.h | 2 +- .../include/CGAL/Handle_with_policy.h | 10 +++--- STL_Extension/include/CGAL/Multiset.h | 34 +++++++++---------- .../include/CGAL/Small_unordered_set.h | 2 +- .../include/CGAL/Spatial_lock_grid_3.h | 2 +- STL_Extension/include/CGAL/exceptions.h | 2 +- .../SearchStructures/CGAL/Segment_tree_d.h | 2 +- .../include/CGAL/Triangulation_2.h | 4 +-- .../include/CGAL/Triangulation_hierarchy_2.h | 2 +- .../CGAL/Delaunay_triangulation_on_sphere_2.h | 2 +- .../include/CGAL/Triangulation_on_sphere_2.h | 4 +-- 149 files changed, 240 insertions(+), 240 deletions(-) diff --git a/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h b/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h index c612807576a..6755d363444 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h +++ b/Circular_kernel_2/test/Circular_kernel_2/include/CGAL/_test_circles_constructions.h @@ -88,7 +88,7 @@ void _test_circle_construct(CK ck) assert(cp_y_min.y() < cp_y_max.y()); } - //Constuct_intersections_2 with 2 intersection's points + //Construct_intersections_2 with 2 intersection's points std::cout << std::endl << "construct_intersection_2" << std::endl; Do_intersect_2 theDo_intersect_2 = ck.do_intersect_2_object(); Intersect_2 theConstruct_intersect_2 @@ -131,7 +131,7 @@ void _test_circle_construct(CK ck) Compare_xy_2 theCompare_xy_2 = ck.compare_xy_2_object(); assert(theCompare_xy_2(first, second) == CGAL::SMALLER); - //Constuct_intersections_2 with 1 intersection's point + //Construct_intersections_2 with 1 intersection's point Point_2 center_circ_intersections_2_3(center_circ_intersection_2_1_x + 2 * circ_intersection_2_1_r, center_circ_intersection_2_1_y); diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 4b69af4550d..2d9bf625f57 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -207,7 +207,7 @@ public: } /** - * @brief Constructor. Contruction from a polyhedral surface + * @brief Constructor. Construction from a polyhedral surface * @param polyhedron the polyhedron describing the polyhedral surface */ Polyhedral_mesh_domain_3(const Polyhedron& p, diff --git a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/evolution.h b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/evolution.h index 4680993e372..813794c21fd 100644 --- a/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/evolution.h +++ b/Optimal_bounding_box/include/CGAL/Optimal_bounding_box/internal/evolution.h @@ -129,7 +129,7 @@ public: const std::size_t nelder_mead_iterations, const std::size_t max_random_mutations = 0) { - // stopping criteria prameters + // stopping criteria parameters FT prev_fit_value = 0; const FT tolerance = 1e-10; int stale = 0; diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index 9617930d52f..810adde69a2 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -230,11 +230,11 @@ public: /// @} - /// \name Settting Parameters + /// \name Setting Parameters /// @{ /*! If `sample_size == 0`, the simplification is performed using an exhaustive priority queue. - If `sample_size` is stricly positive the simplification is performed using a + If `sample_size` is strictly positive the simplification is performed using a multiple choice approach, ie, a best-choice selection in a random sample of edge collapse operators, of size `sample_size`. A typical value for the sample size is 15, but this value must be enlarged when targeting a very coarse simplification. diff --git a/Orthtree/include/CGAL/Orthtree/Node.h b/Orthtree/include/CGAL/Orthtree/Node.h index cfa49fb5366..a16d2fff192 100644 --- a/Orthtree/include/CGAL/Orthtree/Node.h +++ b/Orthtree/include/CGAL/Orthtree/Node.h @@ -365,7 +365,7 @@ public: } /*! - \brief returns the nth child fo this node. + \brief returns the nth child of this node. \pre `!is_null()` \pre `!is_leaf()` diff --git a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index fa78978a4dd..389263ff0cc 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -107,7 +107,7 @@ public: // the point that comes first in the right-to-left ordering is first - // in the ordering, after the auxilliary points p_minus_inf and p_inf + // in the ordering, after the auxiliary points p_minus_inf and p_inf Self_iterator rightmost_point_ref() { return this->begin(); diff --git a/Partition_2/include/CGAL/Partition_2/partition_y_monotone_2.h b/Partition_2/include/CGAL/Partition_2/partition_y_monotone_2.h index d74bc9b9db8..a2d04cf3c5b 100644 --- a/Partition_2/include/CGAL/Partition_2/partition_y_monotone_2.h +++ b/Partition_2/include/CGAL/Partition_2/partition_y_monotone_2.h @@ -11,7 +11,7 @@ // Author(s) : Susan Hert // -// Implementaion of the algorithm from pp 49--55 of "Computational Geometry +// Implementation of the algorithm from pp 49--55 of "Computational Geometry // Algorithms and Applications" by de Berg, van Kreveld, Overmars, and // Schwarzkopf for producing a partitioning of a polygon into y-monotone // pieces. diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h index 03537714d2a..b737a7a6edc 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_Delaunay_triangulation_2.h @@ -572,7 +572,7 @@ private: void propagating_flip(const Face_handle& f, int i); #endif - // auxilliary functions for remove + // auxiliary functions for remove // returns false if we first need to convert to a 9-cover before the vertex can be removed bool remove_single_vertex(Vertex_handle v, const Offset &v_o); void remove_degree_triangulate(Vertex_handle v, std::vector &f, @@ -763,7 +763,7 @@ private: true) == ON_POSITIVE_SIDE; } -// end of auxilliary functions for remove +// end of auxiliary functions for remove diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_hierarchy_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_hierarchy_2.h index c3df3a7274d..32ed8cf311a 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_hierarchy_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_hierarchy_2.h @@ -209,7 +209,7 @@ Periodic_2_triangulation_hierarchy_2(const Periodic_2_triangulation_hierarchy_2< } -//Assignement +//Assignment template Periodic_2_triangulation_hierarchy_2 & Periodic_2_triangulation_hierarchy_2:: diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index 0f5d2765947..a8936abb6ff 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -1155,7 +1155,7 @@ try_to_remove_close_dummy_vertex(Vertex_handle& protection_vertex, protection_vertex, weight, is_special(protection_vertex), dummy_point)) { #if CGAL_MESH_3_PROTECTION_DEBUG & 4 - std::cerr << "Successfuly removed the dummy point and changed the vertex weight" << std::endl; + std::cerr << "Successfully removed the dummy point and changed the vertex weight" << std::endl; #endif return true; } @@ -1657,7 +1657,7 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, } else { - // The corner has already been inserted and necessary adjustements to its weight + // The corner has already been inserted and necessary adjustments to its weight // have already been performed during its insertion and during the insertion // of other points. Only thing missing is to add it the correspondence map. insert_in_correspondence_map(v, p, curve_indices); @@ -1884,7 +1884,7 @@ insert_balls_on_edges() Input_features input_features; domain_.get_curves(std::back_inserter(input_features)); - // Interate on edges + // Iterate on edges for(typename Input_features::iterator fit = input_features.begin(), end = input_features.end() ; fit != end ; ++fit) { diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_triangulation_3.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_triangulation_3.h index 61d39cf6279..44a6ed0a7b9 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_triangulation_3.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_triangulation_3.h @@ -49,7 +49,7 @@ namespace CGAL { -/// This class currently provides an interface between the classe +/// This class currently provides an interface between the class /// `CGAL::Periodic_3_regular_triangulation_3` and the mesher `Mesh_3`. /// As periodic triangulations are parallelized, a lot of these functions will /// become obsolete. diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp index 64ed148670d..dce2e60972d 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp @@ -1,4 +1,4 @@ -//The function project() is a modified version of the function gluProject(),whcich license is : +//The function project() is a modified version of the function gluProject(),which license is : /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt index eccdac1b231..dab9ad4ecd9 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -33,7 +33,7 @@ if(CGAL_Qt5_FOUND include_directories(BEFORE ./) - # ui file, created wih Qt Designer + # ui file, created with Qt Designer qt5_wrap_ui(uis MainWindow.ui) # qrc files (resources files, that contain icons, at least) diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index d59967f0055..59aafb7f27a 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -177,11 +177,11 @@ private: }; /// This threshold is chosen such that if all orthosphere radii are shorter - /// than this treshold, then we can be sure that there are no self-edges anymore. + /// than this threshold, then we can be sure that there are no self-edges anymore. FT orthosphere_radius_threshold; /// This container stores all the cells whose orthosphere radius is larger - /// than the treshold `orthosphere_radius_threshold`. + /// than the threshold `orthosphere_radius_threshold`. boost::unordered_set cells_with_too_big_orthoball; class Cover_manager diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h index 7f3f5de89a4..f12ce7c719c 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h @@ -680,7 +680,7 @@ public: // --------------------------------------------------------------------------- // The following functions return objects of type Point and Periodic_point, // _not_ Point_3 and Periodic_point_3. - // They are templated by `construct_point` to distingush between Delaunay and + // They are templated by `construct_point` to distinguish between Delaunay and // regular triangulations // --------------------------------------------------------------------------- @@ -3332,7 +3332,7 @@ periodic_remove(Vertex_handle v, PointRemover& remover, CoverManager& cover_mana _tds.delete_vertex(v); _tds.delete_cells(hole.begin(), hole.end()); CGAL_expensive_assertion(is_valid()); - return true; // sucessfully removed the vertex + return true; // successfully removed the vertex } // ############################################################################ diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h index cc0b1b09eef..43d86912ae4 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_test_cls_periodic_3_alpha_shape_3.h @@ -71,10 +71,10 @@ _test_cls_alpha_shape_3() if(verbose) { std::cerr << " optimal de 1 " << *opt - << "nb of componants " << a1.number_of_solid_components(*opt) + << "nb of components " << a1.number_of_solid_components(*opt) << std::endl; std::cerr << " previous " << *previous - << "nb of componants " + << "nb of components " << a1.number_of_solid_components(*previous) << std::endl; } assert(a1.number_of_solid_components(*opt) == 1); diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_p3rt3_versus_rt3.cpp b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_p3rt3_versus_rt3.cpp index 93eecea63e7..f47f2f88f31 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_p3rt3_versus_rt3.cpp +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_p3rt3_versus_rt3.cpp @@ -20,7 +20,7 @@ #include // A basic test to check that P3RT3 and RT3 produces the same regular triangulations -// In the case of RT3, a fake periodicity is obtained by addding 26 copies +// In the case of RT3, a fake periodicity is obtained by adding 26 copies // of the same input point set (similarly to how we copy in P3RT3 when it cannot // yet be converted to 1 sheet) around the cube. diff --git a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h index a244831dc76..5651f2c614a 100644 --- a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h +++ b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/include/internal/hyperbolic_free_motion_animation.h @@ -203,7 +203,7 @@ MainWindow::animate() { break; } } - //std::cout << " DONE! " << (found ? "Fount it!" : "Didn't find it!") << std::endl; + //std::cout << " DONE! " << (found ? "Found it!" : "Didn't find it!") << std::endl; // If the correct translation is NOT one of the generators, it will diff --git a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h index 7e5edf95a96..026bb2efaa2 100644 --- a/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h +++ b/Periodic_4_hyperbolic_triangulation_2/doc/Periodic_4_hyperbolic_triangulation_2/CGAL/Hyperbolic_octagon_translation.h @@ -19,7 +19,7 @@ A translation \f$g\f$ in \f$\mathcal G\f$ is a mapping acting on the hyperbolic \f$\mathbb H^2\f$. It has the form \f[ g(z) = \frac{ \alpha\cdot z + \beta }{ \overline{\beta}\cdot z + \overline{\alpha} }, \qquad \alpha,\beta \in \mathbb C, \qquad z \in \mathbb H^2, \qquad |\alpha|^2 - |\beta|^2 = 1, \f] -where \f$\overline{\alpha}\f$ ane \f$\overline{\beta}\f$ are the complex conjugates of +where \f$\overline{\alpha}\f$ and \f$\overline{\beta}\f$ are the complex conjugates of \f$\alpha\f$ and \f$\beta\f$ respectively. In this implementation, the translation \f$g\f$ is uniquely defined by its coefficients \f$\alpha\f$ and \f$\beta\f$. diff --git a/Point_set_2/include/CGAL/range_search_delaunay_2.h b/Point_set_2/include/CGAL/range_search_delaunay_2.h index 40d5809bd4e..c6b81efcd41 100644 --- a/Point_set_2/include/CGAL/range_search_delaunay_2.h +++ b/Point_set_2/include/CGAL/range_search_delaunay_2.h @@ -204,7 +204,7 @@ OutputIterator range_search(Dt& delau, // and then performs a range query with this circle. // When vertices of the trinagulation are on the circle the outcome // is not deterministic. -// A solution would be to not constuct a circle, but to use the +// A solution would be to not construct a circle, but to use the // function CGAL::side_of_bounded_circle template diff --git a/Point_set_3/doc/Point_set_3/PackageDescription.txt b/Point_set_3/doc/Point_set_3/PackageDescription.txt index 966775eda7c..0b747c1f538 100644 --- a/Point_set_3/doc/Point_set_3/PackageDescription.txt +++ b/Point_set_3/doc/Point_set_3/PackageDescription.txt @@ -11,13 +11,13 @@ /// \defgroup PkgPointSet3IO Input/Output /// \ingroup PkgPointSet3Ref /// -/// This module offers convenience overloads of input/ouput +/// This module offers convenience overloads of input/output /// functions available in the \ref PkgPointSetProcessing3 package. /// These overloads, available after including `CGAL/Point_set_3/IO.h`, /// allow the user to call point set processing algorithms without having /// to handle manually property maps and iterators. /// -/// Input functions instanciate all the necessary property maps: +/// Input functions instantiate all the necessary property maps: /// /// - if found in the input, normal vectors are stored in the usual /// `CGAL::Point_set_3` property `normal` with template type `Vector` @@ -77,7 +77,7 @@ \cgalCRPSection{I/O Functions} This package offers convenience overloads for the class `CGAL::Point_set_3` -of the input/ouput functions available in the \ref PkgPointSetProcessing3 package. +of the input/output functions available in the \ref PkgPointSetProcessing3 package. These overloads, available after including `CGAL/Point_set_3/IO.h`, allow the user to call point set processing algorithms without having to handle manually property maps and iterators. diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 304cf589d5f..25191bf873f 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -963,8 +963,8 @@ public: - `geom_traits`: contains the kernel `typename Kernel_traits`::`Kernel` \warning this method does not check if the normal map was - instanciated or not. The normal map named parameter should not be - used if this property was not instanciated first. + instantiated or not. The normal map named parameter should not be + used if this property was not instantiated first. */ #ifdef DOXYGEN_RUNNING unspecified_type diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h b/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h index 7ecf30255ba..2a48f9a3a41 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/LAS.h @@ -52,7 +52,7 @@ void check_if_property_is_used(PointSet& point_set, /*! \ingroup PkgPointSet3IOLAS - \brief reads the content of an intput stream in the \ref IOStreamLAS into a point set. + \brief reads the content of an input stream in the \ref IOStreamLAS into a point set. \attention To read a binary file, the flag `std::ios::binary` must be set during the creation of the `ifstream`. @@ -147,7 +147,7 @@ bool read_LAS(std::istream& is, /*! \ingroup PkgPointSet3IOLAS - \brief reads the content of an intput file in the \ref IOStreamLAS into a point set. + \brief reads the content of an input file in the \ref IOStreamLAS into a point set. \param fname the path to the input file \param point_set the point set diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h index 5bd35941615..7fc677cff37 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/OFF.h @@ -36,7 +36,7 @@ namespace IO { /*! \ingroup PkgPointSet3IOOFF - \brief reads the content of an intput stream in the \ref IOStreamOFF into a point set. + \brief reads the content of an input stream in the \ref IOStreamOFF into a point set. If normals are present in the input (NOFF), a normal map will be created and filled. diff --git a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h index 72c00bd528e..bdf76f541eb 100644 --- a/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h +++ b/Point_set_3/include/CGAL/Point_set_3/IO/XYZ.h @@ -35,7 +35,7 @@ namespace IO { /*! \ingroup PkgPointSet3IOXYZ - \brief reads the content of an intput stream in the \ref IOStreamXYZ into a point set. + \brief reads the content of an input stream in the \ref IOStreamXYZ into a point set. If normals are present in the input stream, a normal map will be created and filled. diff --git a/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp b/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp index 2b940185cc3..2e3e440931a 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/property_map.cpp @@ -53,7 +53,7 @@ void process_point_set(Iterator beg, Iterator end, PointPMap pmap) std::sort(beg,end,less); } -// We can call it just with points. Then interally we use a property map +// We can call it just with points. Then internally we use a property map // that maps point iterators on points. template diff --git a/Point_set_processing_3/include/CGAL/IO/write_las_points.h b/Point_set_processing_3/include/CGAL/IO/write_las_points.h index d7d719d3978..c1ccb1596c6 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_las_points.h @@ -164,7 +164,7 @@ namespace LAS { handlers. A `PropertyHandle` is a `std::pair` used to write a scalar value `LAS_property::Tag::type` as a %LAS property (for example, - writing an `int` vairable as an `int` %LAS property). An exception + writing an `int` variable as an `int` %LAS property). An exception is used for points that are written using a `std::tuple` object. See documentation of `read_LAS_with_properties()` for the diff --git a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h index 3bbddd10130..dcda82d9555 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/compute_registration_transformation.h @@ -276,7 +276,7 @@ compute_registration_transformation(const PointRange1& range1, const PointRan \cgalParamNEnd \cgalParamNBegin{normal_map} - \cgalParamDescription{a property map associating normals to the elements of the poing set `point_set_2`} + \cgalParamDescription{a property map associating normals to the elements of the point set `point_set_2`} \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type of the iterator of `PointRange2` and whose value type is `geom_traits::Vector_3`} \cgalParamDefault{Normals are computed and stored internally.} diff --git a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h index 81fb00fc5e3..5e5d7853bee 100644 --- a/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h +++ b/Point_set_processing_3/include/CGAL/OpenGR/register_point_sets.h @@ -196,7 +196,7 @@ register_point_sets(const PointRange1& range1, PointRange2& range2, \cgalParamNEnd \cgalParamNBegin{normal_map} - \cgalParamDescription{a property map associating normals to the elements of the poing set `point_set_2`} + \cgalParamDescription{a property map associating normals to the elements of the point set `point_set_2`} \cgalParamType{a model of `ReadablePropertyMap` whose key type is the value type of the iterator of `PointRange2` and whose value type is `geom_traits::Vector_3`} \cgalParamDefault{Normals are computed and stored internally.} diff --git a/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h b/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h index b29d1c24b4c..d2e78a2b2ec 100644 --- a/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h +++ b/Point_set_processing_3/include/CGAL/Point_set_processing_3/internal/Rich_grid.h @@ -266,7 +266,7 @@ void Rich_grid::travel_itself( for(int x = 0; x < x_side; x++) { int origin = cell(x, y, z); self(get_start_iter(origin), get_end_iter(origin), radius); - // compute between other girds + // compute between other grids for(int d = 2; d < 28; d += 2) { // skipping self const int *cs = corner + 3*diagonals[d]; const int *ce = corner + 3*diagonals[d+1]; @@ -284,7 +284,7 @@ void Rich_grid::travel_itself( } } -/// define how to travel in other gird +/// define how to travel in other grid template void Rich_grid::travel_others( Rich_grid &points, diff --git a/Point_set_processing_3/include/CGAL/compute_average_spacing.h b/Point_set_processing_3/include/CGAL/compute_average_spacing.h index 750bc40ae23..db515781d25 100644 --- a/Point_set_processing_3/include/CGAL/compute_average_spacing.h +++ b/Point_set_processing_3/include/CGAL/compute_average_spacing.h @@ -181,7 +181,7 @@ compute_average_spacing( // precondition: at least 2 nearest neighbors CGAL_precondition(k >= 2); - // Instanciate a KD-tree search. + // Instantiate a KD-tree search. Neighbor_query neighbor_query (points, point_map); // iterate over input points, compute and output normal diff --git a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h index 4f6f308c274..c8982be7517 100644 --- a/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/jet_smooth_point_set.h @@ -223,7 +223,7 @@ jet_smooth_point_set( // precondition: at least 2 nearest neighbors CGAL_precondition(k >= 2); - // Instanciate a KD-tree search. + // Instantiate a KD-tree search. Neighbor_query neighbor_query (points, point_map); // Iterates over input points and mutates them. diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index 2a284b2e859..6b09f9b5def 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -156,7 +156,7 @@ public: /// Helper class: Propagate_normal_orientation /// /// This class is used internally by mst_orient_normals() -/// to propage the normal orientation, starting from a source point +/// to propagate the normal orientation, starting from a source point /// and following the adjacency relations of vertices in a Minimum Spanning Tree. /// It does not orient normals that are already oriented. /// It does not propagate the orientation if the angle between 2 normals > angle_max. @@ -548,7 +548,7 @@ create_mst_graph( \ingroup PkgPointSetProcessing3Algorithms Orients the normals of the range of `points` using the propagation of a seed orientation through a minimum spanning tree of the Riemannian graph. - This method modifies the order of input points so as to pack all sucessfully oriented points first, + This method modifies the order of input points so as to pack all successfully oriented points first, and returns an iterator over the first point with an unoriented normal (see erase-remove idiom). For this reason it should not be called on sorted containers. It is based on \cgalCite{cgal:hddms-srup-92}. diff --git a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h index 62c0ea1f76d..9dc44aa32e2 100644 --- a/Point_set_processing_3/include/CGAL/scanline_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/scanline_orient_normals.h @@ -373,7 +373,7 @@ void orient_scanline (Iterator begin, Iterator end, iterating on `points`: - if the named parameter `scanline_id_map` is provided, the range - is cutted everytime the id changes. + is cut everytime the id changes. - if no scanline ID map is provided, a fallback method simply cuts the range everytime 3 consecutive points form an acute angle on diff --git a/Point_set_processing_3/include/CGAL/structure_point_set.h b/Point_set_processing_3/include/CGAL/structure_point_set.h index f2d9bd447c3..805b2c0b8d3 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -678,7 +678,7 @@ private: for (std::size_t i = 0; i < Nx; ++ i) if( point_map[i][j].size()>0) { - //inside: recenter (cell center) the first point of the cell and desactivate the others points + //inside: recenter (cell center) the first point of the cell and deactivate the others points if (!Mask_border[i][j] && Mask[i][j]) { double x2pt = (i+0.5) * grid_length + box_2d.xmin(); @@ -703,7 +703,7 @@ private: m_status[point_map[i][j][np]] = SKIPPED; } - //border: recenter (barycenter) the first point of the cell and desactivate the others points + //border: recenter (barycenter) the first point of the cell and deactivate the others points else if (Mask_border[i][j] && Mask[i][j]) { std::vector pts; @@ -982,7 +982,7 @@ private: std::size_t inde = division_tab[j][k]; if (CGAL::squared_distance (line, m_points[inde]) < d_DeltaEdge * d_DeltaEdge) - m_status[inde] = SKIPPED; // Deactive points too close (except best, see below) + m_status[inde] = SKIPPED; // Deactivate points too close (except best, see below) double distance = CGAL::squared_distance (perfect, m_points[inde]); if (distance < dist_min) 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 00a61abf680..b67e90210b5 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 @@ -74,7 +74,7 @@ int main(int argc, char*argv[]) // Applying point set processing algorithm to a CGAL::Point_set_3 // object does not erase the points from memory but place them in - // the garbage of the object: memory can be freeed by the user. + // the garbage of the object: memory can be freed by the user. points.collect_garbage(); //! [Outlier removal] diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h index df943c84d67..0831862bc72 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Mesh_3/Poisson_refine_cells_3.h @@ -70,7 +70,7 @@ public: : Triangulation_mesher_level_traits_3(t), criteria(crit) {} protected: - /* --- protected datas --- */ + /* --- protected data --- */ // Tr& tr; /**< The triangulation itself. */ Criteria criteria; /**< Meshing criteria for tetrahedra. */ @@ -256,7 +256,7 @@ public: } protected: - /* --- protected datas --- */ + /* --- protected data --- */ Surface& surface; Oracle& oracle; 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 89be04b67da..c103468f3f1 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/poisson_refine_triangulation.h @@ -130,7 +130,7 @@ public: private: - /* --- private datas --- */ + /* --- private data --- */ unsigned int max_vertices; ///< number of vertices bound (ignored if zero) }; // end Poisson_mesher_level_impl_base diff --git a/Polygon/include/CGAL/Polygon_with_holes_2.h b/Polygon/include/CGAL/Polygon_with_holes_2.h index 2c0c87960e5..b5a842710e9 100644 --- a/Polygon/include/CGAL/Polygon_with_holes_2.h +++ b/Polygon/include/CGAL/Polygon_with_holes_2.h @@ -136,7 +136,7 @@ std::ostream& operator<<(std::ostream &os, default: os << "Polygon_with_holes_2(" << std::endl; if(p.is_unbounded()) - os << "No outer bounary" << std::endl; + os << "No outer boundary" << std::endl; else { os << "Boundary(" << std::endl; diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h index c30553b5519..1db30f8aaae 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPCorefinementVisitor.h @@ -161,7 +161,7 @@ public: void end_building_output(); /// called before filtering intersection edges in the interior of a set of coplanar faces. void filter_coplanar_edges(); - /// called before segmenting input meshes in patches defined by connected components seperated by intersection edges. + /// called before segmenting input meshes in patches defined by connected components separated by intersection edges. void detect_patches(); /// called before classifying which patches contribute to each Boolean operation. void classify_patches(); diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPTriangulateFaceVisitor.h b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPTriangulateFaceVisitor.h index 1ab5a7b94e8..b7106277b52 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPTriangulateFaceVisitor.h +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Concepts/PMPTriangulateFaceVisitor.h @@ -11,7 +11,7 @@ class PMPTriangulateFaceVisitor { public: -/// Face decriptor type +/// Face descriptor type typedef unspecified_type face_descriptor; /// @name Functions used by triangulate_face() and triangulate_faces() diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index 3ca658cc2bd..5c34d6eda9a 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -583,7 +583,7 @@ The latter has cylindrical and spherical patches at convex edges and vertices of Given a distance \f$ \delta = \epsilon / \sqrt(3)\f$ we can associate a prism to each triangle by intersecting two halfspaces parallel to the triangle, three halfspaces orthogonal to the triangle and parallel to the edges, -and additionaly halfspaces for clipping obtuse angles, with the face normal corresponding to the bisector +and additionally halfspaces for clipping obtuse angles, with the face normal corresponding to the bisector of the angle. These halfspaces are at distance \f$ \delta \f$ and such that they contain the triangle. @@ -820,7 +820,7 @@ to the input non-manifold vertex. \subsubsection FixNMVerticeExample Manifoldness Repair Example -In the following example, a non-manifold configuration is artifically created and +In the following example, a non-manifold configuration is artificially created and fixed with the help of the functions described above. \cgalExample{Polygon_mesh_processing/manifoldness_repair_example.cpp} diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/locate_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/locate_example.cpp index 1f82e441566..829af8a5da3 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/locate_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/locate_example.cpp @@ -74,7 +74,7 @@ int main(int /*argc*/, char** /*argv*/) std::cout << "Is it on the face's border? " << (PMP::is_on_face_border(ray_location, tm) ? "Yes" : "No") << "\n\n"; // ----------------------------------------------------------------------------------------------- - // Now, we artifically project the mesh to the natural 2D dimensional plane, with a little translation + // Now, we artificially project the mesh to the natural 2D dimensional plane, with a little translation // via a custom vertex point property map typedef CGAL::dynamic_vertex_property_t Point_2_property; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 47dd64b4f36..0332bb1fc90 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -618,7 +618,7 @@ compute_vertex_normal_as_sum_of_weighted_normals(typename boost::graph_traits::%vertex_descriptor` * as key type and `%Point_3` as value type} - * \cgalParamDefault{`boost::get(CGAL::vertex_point, ouput)`} + * \cgalParamDefault{`boost::get(CGAL::vertex_point, output)`} * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` * should be available for the vertices of `ouput`.} * \cgalParamNEnd diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h index d02ef3a9023..2b492cb55ff 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -98,8 +98,8 @@ namespace internal { \cgalParamNEnd \cgalParamNBegin{fairing_continuity} - \cgalParamDescription{A value controling the tangential continuity of the output surface patch. - The possible values are 0, 1 and 2, refering to the C0, C1 + \cgalParamDescription{A value controlling the tangential continuity of the output surface patch. + The possible values are 0, 1 and 2, referring to the C0, C1 and C2 continuity.} \cgalParamType{unsigned int} \cgalParamDefault{`1`} 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 8c7b8702366..b9e1102f32d 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 @@ -273,7 +273,7 @@ class Face_graph_output_builder }; // detect if a polyline is incident to two patches that won't be imported - // for the current operation (polylines skipt are always incident to a + // for the current operation (polylines skipped are always incident to a // coplanar patch) template static @@ -1228,7 +1228,7 @@ public: } } #ifdef CGAL_COREFINEMENT_POLYHEDRA_DEBUG - #warning At some point we should have a check if a patch status is already set, what we do is consistant otherwise --> ambiguous + #warning At some point we should have a check if a patch status is already set, what we do is consistent otherwise --> ambiguous #endif //CGAL_COREFINEMENT_POLYHEDRA_DEBUG CGAL_assertion( diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h index 939027ad2b5..6b2964e8ae6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h @@ -818,7 +818,7 @@ public: break; case ON_VERTEX: { - //grab original vertex that is on commom intersection + //grab original vertex that is on common intersection mesh_to_vertices_on_inter[tm2_ptr].insert(std::make_pair(node_id,h_2)); Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm2_ptr]; if (node_id_to_vertex.size()<=node_id) @@ -841,7 +841,7 @@ public: if ( is_target_coplanar ) { - //grab original vertex that is on commom intersection + //grab original vertex that is on common intersection mesh_to_vertices_on_inter[tm1_ptr].insert(std::make_pair(node_id,h_1)); Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm1_ptr]; if (node_id_to_vertex.size()<=node_id) @@ -854,7 +854,7 @@ public: } else{ if ( is_source_coplanar ){ - //grab original vertex that is on commom intersection + //grab original vertex that is on common intersection halfedge_descriptor h_1_opp=opposite(h_1,tm1); mesh_to_vertices_on_inter[tm1_ptr].insert(std::make_pair(node_id,h_1_opp)); Node_id_to_vertex& node_id_to_vertex=mesh_to_node_id_to_vertex[tm1_ptr]; @@ -1438,7 +1438,7 @@ public: insert_constrained_edges(node_ids,cdt,id_to_CDT_vh,constrained_edges); // insert constraints between points that are on the boundary - // (not a contrained on the triangle boundary) + // (not a constrained on the triangle boundary) if (it_fb!=face_boundaries.end()) //is f not a triangle ? { for (int i=0;i<3;++i) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h index 0c4664aa0c8..721f4fd5773 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/face_graph_utils.h @@ -1363,7 +1363,7 @@ void fill_new_triangle_mesh( typedef typename GT::vertex_descriptor vertex_descriptor; typedef typename GT::edge_descriptor edge_descriptor; - // this is the miminal number of edges that will be marked (intersection edge). + // this is the minimal number of edges that will be marked (intersection edge). // We cannot easily have the total number since some patch interior edges might be marked output_shared_edges.reserve( std::accumulate(polylines.lengths.begin(),polylines.lengths.end(),std::size_t(0)) ); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h index 3452384bd82..d037c881cd4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_impl.h @@ -293,7 +293,7 @@ class Intersection_of_triangle_meshes if (non_manifold_feature_map.non_manifold_edges[eid].front()!=ed) continue; else - // make sure the halfedge used is consistant with stored one + // make sure the halfedge used is consistent with stored one h = halfedge(non_manifold_feature_map.non_manifold_edges[eid].front(), tm_e); } edge_boxes.push_back( Box( diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h index 3d4a6777fcc..0e73d4be013 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/intersection_of_coplanar_triangles_3.h @@ -81,7 +81,7 @@ struct Intersect_coplanar_faces_3 //an intersection point between two edges. Otherwise, the point is a vertex of the second facet included into //the first facet. // - //(V,F) : point initialy constructed + //(V,F) : point initially constructed //(V,E) : (V,F) updated by get_orientation_and_update_info_2 (i.e lies on one edge) //(V,V) : (V,E) updated by get_orientation_and_update_info_2 (i.e lies on two edges) //(E,E) : created in the following function when prev and curr lie on the same edge diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h index 3af5e28b102..def1f0c9ee5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Hole_filling/Triangulate_hole_polyline.h @@ -1270,7 +1270,7 @@ bool is_planar_2( const double n = static_cast(points.size() - 1); // the first equals to the last if (n < 3) { - return false; // cant be a plane! + return false; // can't be a plane! } // Compute centroid. diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 837d16467e8..5a40954093c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -1219,7 +1219,7 @@ private: halfedge_descriptor hopp = opposite(h, mesh_); //check whether h is the longest edge in its associated face - //overwise refinement will go for an endless loop + //otherwise refinement will go into an endless loop double sqh = sqlength(h); return sqh >= sqlength(next(h, mesh_)) && sqh >= sqlength(next(next(h, mesh_), mesh_)) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h index 9f04800cea6..1756dfd5c47 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Smoothing/mesh_smoothing_impl.h @@ -386,15 +386,15 @@ private: T* residual) const { // Defining this because I haven't found much difference empirically (auto-diff being maybe - // a couple % faster), but numeric differenciation should be stronger in the face - // of difficult cases. Leaving the auto-differenciation formulation in case somebody really + // a couple % faster), but numeric differentiation should be stronger in the face + // of difficult cases. Leaving the auto-differentiation formulation in case somebody really // cares about the extra speed. #define CGAL_CERES_USE_NUMERIC_DIFFERENCIATION #ifdef CGAL_CERES_USE_NUMERIC_DIFFERENCIATION residual[0] = evaluate(x[0], y[0], z[0]); #else - // Computations must be explicit so that automatic differenciation can be used + // Computations must be explicit so that automatic differentiation can be used T dqx = qx - x[0]; T dqy = qy - y[0]; T dqz = qz - z[0]; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index a31a91b2c96..379e4ff6460 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -99,7 +99,7 @@ struct Snapping_pair #ifdef CGAL_LINKED_WITH_TBB // Functor that forwards the pair of the two intersecting boxes // Note that Box_intersection_d does a lot of copies of the callback functor, but we are passing it -// with std::ref, so is always refering to the same reporter object (and importantly, the same counter) +// with std::ref, so is always referring to the same reporter object (and importantly, the same counter) template struct Intersecting_boxes_pairs_parallel_report { @@ -611,7 +611,7 @@ void find_vertex_vertex_matches_with_box_d(const Unique_positions& unique_positi // Shenanigans to pass a reference as callback (which is copied by value by 'box_intersection_d') std::function callback(std::ref(box_callback)); - // Grab the boxes that are interesecting but don't do any extra filtering (in parallel) + // Grab the boxes that are intersecting but don't do any extra filtering (in parallel) CGAL::box_intersection_d(boxes_A_ptr.begin(), boxes_A_ptr.end(), boxes_B_ptr.begin(), boxes_B_ptr.end(), callback); @@ -1029,7 +1029,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, const vertex_descriptor va = target(ha, tm_A); const vertex_descriptor vb = target(hb, tm_B); - // The two folloing halfedges might not be in the range to snap, but it doesn't matter + // The two following halfedges might not be in the range to snap, but it doesn't matter const halfedge_descriptor nha = next(ha, tm_A); const halfedge_descriptor nhb = next(hb, tm_B); const bool is_stitchable_left = gt.equal_3_object()(get(vpm_A, source(ha, tm_A)), diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h index 36e39436766..dac9b2d57fc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/fair_impl.h @@ -76,7 +76,7 @@ private: vertex_descriptor v, int row_id, // which row to insert in [ frees stay left-hand side ] Solver_matrix& matrix, - double& x, double& y, double& z, // constants transfered to right-hand side + double& x, double& y, double& z, // constants transferred to right-hand side double multiplier, const std::map& vertex_id_map, unsigned int depth) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h index 016dedea22d..8159632107b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h @@ -103,7 +103,7 @@ void simplify_polyline(const PointRangeIn& input, ++ei; // we skip ei-1 else { - bi=ei-1; // ei-1 shall not be skipt + bi=ei-1; // ei-1 shall not be skipped break; } } @@ -178,7 +178,7 @@ void simplify_polyline(const PointRangeIn& input, output.push_back(input[i]); put(out_pm, output.back(), get(in_pm, input[i])); } - //TODO if is_closed-==true, shall we add en extra step to see if we can remove output.front() and output[output.size()-2] (inital endpoints) + //TODO if is_closed-==true, shall we add en extra step to see if we can remove output.front() and output[output.size()-2] (initial endpoints) } } } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h index 23256eb00b6..7d1b1b6e6bf 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -1575,7 +1575,7 @@ struct Mesh_callback * * detects and reports all the pairs of meshes intersecting in a range of triangulated surface meshes. * A pair of meshes intersecting is put in the output iterator `out` as a `std::pair`, - * each index refering to the index of the triangle mesh in the input range. + * each index referring to the index of the triangle mesh in the input range. * If `do_overlap_test_of_bounded_sides` is `true`, the overlap of bounded sides are tested as well. In that case, the meshes must be closed. * This function depends on the package \ref PkgBoxIntersectionD. * diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index 2bcd6f06ad0..3df7d233b1d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -65,7 +65,7 @@ struct Less_on_point_of_target // Given a container of vectors of halfedges whose target are geometrically identical, // check that the intervals described by these pairs are either disjoint or nested. // This is done to ensure valid combinatorics when we merge the vertices. -// If incompatible (overlapping) intervals are found, the pair representating the longest +// If incompatible (overlapping) intervals are found, the pair representing the longest // interval (arbitrary choice) is removed from the candidate list. template void sanitize_candidates(const std::vector::halfedge_descriptor, std::size_t> >& cycle_hedges, diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h index bcf2f9f6211..2ffc899b549 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup.h @@ -228,7 +228,7 @@ struct Polygon_soup_orienter /// If the polygon was already marked as oriented, then we cut the dual edge /// in the graph and the primal edge is marked. /// At the same time, we assign an id to each polygon in the same connected - /// componenet of the dual graph. + /// component of the dual graph. void orient() { std::vector oriented; @@ -520,7 +520,7 @@ struct Polygon_soup_orienter * \cgalParamNEnd * \cgalNamedParamsEnd * - * @return `true` if the orientation operation succeded. + * @return `true` if the orientation operation succeeded. * @return `false` if some points were duplicated, thus producing a self-intersecting polyhedron. * * @sa `orient_triangle_soup_with_reference_triangle_mesh()` diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index 39d23677627..121842d8f7f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -953,7 +953,7 @@ volume_connected_components(const TriangleMesh& tm, // init the main loop // similar as above but exclusively contains cc ids included by more that one CC. - // The result will be then merged with nested_cc_per_cc but temporarilly we need + // The result will be then merged with nested_cc_per_cc but temporarily we need // another container to not more than once the inclusion testing (in case a CC is // included by more than 2 CC) + associate such CC to only one volume std::vector > nested_cc_per_cc_shared(nb_cc); 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 90fd92adca4..0c850d50db0 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 @@ -1410,7 +1410,7 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, std::cout << "Found " << degenerate_edges_to_remove.size() << " null edges.\n"; #endif - // first try to remove all collapsable edges + // first try to remove all collapsible edges typename std::set::iterator it = degenerate_edges_to_remove.begin(); while(it != degenerate_edges_to_remove.end()) { @@ -1741,7 +1741,7 @@ bool remove_degenerate_edges(const EdgeRange& edge_range, while(true); // @todo use the area criteria? this means maybe continue exploration of larger cc - // mark faces of completetly explored cc + // mark faces of completely explored cc for(index=0; index typename boost::property_traits::value_type diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index f246500b49a..63267b3a379 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -296,7 +296,7 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{density_control_factor} - \cgalParamDescription{factor to control density of the ouput mesh, + \cgalParamDescription{factor to control density of the output mesh, where larger values cause denser refinements, as in `refine()`} \cgalParamType{double} \cgalParamDefault{\f$ \sqrt{2}\f$} @@ -410,15 +410,15 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{density_control_factor} - \cgalParamDescription{factor to control density of the ouput mesh, + \cgalParamDescription{factor to control density of the otuput mesh, where larger values cause denser refinements, as in `refine()`} \cgalParamType{double} \cgalParamDefault{\f$ \sqrt{2}\f$} \cgalParamNEnd \cgalParamNBegin{fairing_continuity} - \cgalParamDescription{A value controling the tangential continuity of the output surface patch. - The possible values are 0, 1 and 2, refering to the C0, C1 + \cgalParamDescription{A value controlling the tangential continuity of the output surface patch. + The possible values are 0, 1 and 2, referring to the C0, C1 and C2 continuity.} \cgalParamType{unsigned int} \cgalParamDefault{`1`} diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h index 9712dc9926f..ff04ca9bfcc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_slicer.h @@ -56,7 +56,7 @@ namespace CGAL { /// orthogonal to a frame axis, the non-null coefficient being 1 or -1. /// The default is `true`. /// -/// The implemenation of this class depends on the package \ref PkgAABBTree. +/// The implementation of this class depends on the package \ref PkgAABBTree. /// \todo Shall we document more in details what is required? /// `Traits` must provide: /// - `Plane_3` @@ -316,7 +316,7 @@ class Polygon_mesh_slicer } /// Other private functions /// handle edge insertion in the adjacency_list graph - /// we add an edge betweem two edge_descriptor if they + /// we add an edge between two edge_descriptor if they /// share a common facet void update_al_graph_connectivity( edge_descriptor ed, diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index 759ae6c3cdd..01403b4fccc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -358,7 +358,7 @@ public: * \cgalParamNEnd * \cgalNamedParamsEnd * - * \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument, + * \note The triangle mesh gets copied internally, that is it can be modified after having passed as argument, * while the queries are performed */ template @@ -458,7 +458,7 @@ public: * \cgalParamNEnd * \cgalNamedParamsEnd * - * \note The triangle mesh gets copied internally, that is it can be modifed after having passed as argument, + * \note The triangle mesh gets copied internally, that is it can be modified after having passed as argument, * while the queries are performed */ template diff --git a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h index d3cde58c956..00bc1225b14 100644 --- a/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h +++ b/Polygon_mesh_processing/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Polyhedral_envelope_filter.h @@ -140,7 +140,7 @@ public: Point pw = get(profile.vertex_point_map(),w); if(! (*m_envelope)(p, pv, pw)){ - // the triange intersects the envelope + // the triangle intersects the envelope return boost::none; } pv = pw; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/connected_component_surface_mesh.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/connected_component_surface_mesh.cpp index f521e933e3d..bff0cb6d083 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/connected_component_surface_mesh.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/connected_component_surface_mesh.cpp @@ -124,7 +124,7 @@ void test_CC_with_default_size_map(Mesh sm, if (i!=id_of_cc_to_remove) ff.push_back(one_face_per_cc[i]); - // default face size map, but explicitely passed + // default face size map, but explicitly passed PMP::keep_connected_components(copy1, ff, CGAL::parameters::edge_is_constrained_map(Constraint(copy1, k, bound)) .face_size_map(CGAL::Constant_property_map(1))); diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp index 055a50a32c0..dc5269ac716 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_hausdorff_bounded_error_distance.cpp @@ -241,7 +241,7 @@ void interior_triangle_example(const double error_bound, } // Read a real mesh given by the user, perturb it slightly, and compute the -// Hausdorff distance between the original mesh and its pertubation. +// Hausdorff distance between the original mesh and its perturbation. void perturbing_surface_mesh_example(const std::string& filepath, const double error_bound, const bool save = true) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp index c9e608da754..5ecd9b9530b 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_distance.cpp @@ -144,7 +144,7 @@ struct Custom_traits_Hausdorff Compute_squared_distance_3 compute_squared_distance_3_object() const {return Compute_squared_distance_3();} Do_intersect_3 do_intersect_3_object() const {return Do_intersect_3();} Equal_3 equal_3_object() const {return Equal_3();} -// } end of requirments from AABBGeomTraits +// } end of requirements from AABBGeomTraits // requirements from SearchGeomTraits_3 { diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp index 94857b088bb..de7e7a2d49e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_repair_degeneracies.cpp @@ -262,7 +262,7 @@ void remove_negligible_connected_components(const std::string filename) PMP::remove_connected_components_of_negligible_size(mesh, CP::area_threshold(1e15)); assert(is_empty(mesh)); - // Could also have used default paramaters, which does the job by itself + // Could also have used default parameters, which does the job by itself std::cout << "---------\ndefault values..." << std::endl; std::vector faces_to_be_removed; diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 68b0afc77d6..373a439efe8 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -70,7 +70,7 @@ set_package_properties( Eigen3 PROPERTIES DESCRIPTION "A library for mathematical tools." PURPOSE - "Requiered for the Polyhedron Edit, Parameterization, Jet fitting, Classification plugin, Surface reconstruction, Normal estimation, Smoothing, Average spacing, Feature detection, Hole Filling and Fairing plugins ." + "Required for the Polyhedron Edit, Parameterization, Jet fitting, Classification plugin, Surface reconstruction, Normal estimation, Smoothing, Average spacing, Feature detection, Hole Filling and Fairing plugins ." ) include(CGAL_Eigen3_support) @@ -79,7 +79,7 @@ include(CGAL_METIS_support) set_package_properties( METIS PROPERTIES DESCRIPTION "A library for partitioning." - PURPOSE "Requiered for the partition plugin.") + PURPOSE "Required for the partition plugin.") # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) @@ -100,7 +100,7 @@ find_package(LibSSH) set_package_properties( LibSSH PROPERTIES DESCRIPTION "A library used to enable the SSH features. " - PURPOSE "Requiered for loading (saving) a scene to (from) a distant server.") + PURPOSE "Required for loading (saving) a scene to (from) a distant server.") if(NOT LIBSSH_FOUND) message("NOTICE : The SSH features will be disabled.") @@ -135,7 +135,7 @@ set_package_properties( TBB PROPERTIES DESCRIPTION "A library for parallelism. Mesh_3, Bilateral smoothing and WLOP plugins are faster if TBB is linked." - PURPOSE "Requiered for running some algorithms in parallel.") + PURPOSE "Required for running some algorithms in parallel.") if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 6457e785e94..b797ecf7a70 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -2544,7 +2544,7 @@ void MainWindow::setAddKeyFrameKeyboardModifiers(::Qt::KeyboardModifiers m) void MainWindow::recenterScene() { - //force the recomputaion of the bbox + //force the recomputation of the bbox bbox_need_update = true; CGAL::qglviewer::Vec min, max; computeViewerBBox(min, max); @@ -2621,7 +2621,7 @@ void MainWindow::recenterSceneView(const QModelIndex &id) if(id.isValid()) { // mapFromSource is necessary to convert the QModelIndex received - // from the Scene into a valid QModelIndex in the view, beacause of + // from the Scene into a valid QModelIndex in the view, because of // the proxymodel sceneView->scrollTo(proxyModel->mapFromSource(id)); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt index d7ed3ec6bb8..73c99106598 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt @@ -4,7 +4,7 @@ find_package(LASLIB) set_package_properties( LASLIB PROPERTIES DESCRIPTION "A library for some I/O." - PURPOSE "Requiered for reading or writing LAS files.") + PURPOSE "Required for reading or writing LAS files.") include(CGAL_LASLIB_support) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp index 4063d2107ed..474caa1ebc0 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp @@ -262,7 +262,7 @@ save(QFileInfo fileinfo,QList& items) void Polyhedron_demo_polylines_io_plugin::split() { Scene_polylines_item* item = qobject_cast(scene->item(scene->mainSelectionIndex())); - Scene_group_item* group = new Scene_group_item("Splitted Polylines"); + Scene_group_item* group = new Scene_group_item("Split Polylines"); scene->addItem(group); group->setColor(item->color()); int i=0; @@ -273,7 +273,7 @@ void Polyhedron_demo_polylines_io_plugin::split() Scene_polylines_item *new_polyline = new Scene_polylines_item(); new_polyline->polylines = container; new_polyline->setColor(item->color()); - new_polyline->setName(QString("Splitted %1 #%2").arg(item->name()).arg(i++)); + new_polyline->setName(QString("Split %1 #%2").arg(item->name()).arg(i++)); scene->addItem(new_polyline); scene->changeGroup(new_polyline, group); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/include/gsl/gsl_assert b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/include/gsl/gsl_assert index 3c952e6e01a..772988108ff 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/include/gsl/gsl_assert +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/include/gsl/gsl_assert @@ -22,7 +22,7 @@ // // make suppress attributes parse for some compilers -// Hopefully temporary until suppresion standardization occurs +// Hopefully temporary until suppression standardization occurs // #if defined (_MSC_VER) #define GSL_SUPPRESS(x) [[gsl::suppress(x)]] diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp index 6001c47738a..02af6fc0272 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/Clip_polyhedron_plugin.cpp @@ -439,7 +439,7 @@ public Q_SLOTS: } Scene_surface_mesh_item* new_item = new Scene_surface_mesh_item(pos_side); - new_item->setName(QString("Splitted %1").arg(sm_item->name())); + new_item->setName(QString("Split %1").arg(sm_item->name())); new_item->setColor(sm_item->color()); new_item->setRenderingMode(sm_item->renderingMode()); new_item->setVisible(sm_item->visible()); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp index 0162a55e482..6684a48e7b7 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Mean_curvature_flow_skeleton_plugin.cpp @@ -174,7 +174,7 @@ public: [this]{QMessageBox::about(mw, QString("Help"), QString("This widget gives access to the low level steps of the mean curvature flow sketonization algorithm. " "The algorithm is iterative. Each iteration consist in calls to Contract, Collapse, Split, " - "and Degeneracy (repectively mesh contraction, edge collapse, edge split, and degenerate edge" + "and Degeneracy (respectively mesh contraction, edge collapse, edge split, and degenerate edge" "removal). The skeleton extraction can be called at any time but for a better result it should be" "called when the iterations are converging. A segmentation of the surface can be extracted using" "the distance of the mesh to the skeleton computed.\n" diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp index f32c322c16d..c57159cfde1 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp @@ -228,7 +228,7 @@ public Q_SLOTS: if(!ok) { return; } QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::processEvents(); - // sample random points and constuct item + // sample random points and construct item Scene_points_with_normal_item* point_item = new Scene_points_with_normal_item(); point_item->setName(QString("sample-%1").arg(nb_points)); CGAL::Random rg(1340818006); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h b/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h index 99cd3b27fe9..8370faf5e35 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Scene_facegraph_item_k_ring_selection.h @@ -275,7 +275,7 @@ public Q_SLOTS: boost::property_map::type> fccmap(static_cast(num_faces(poly))); - //get connected componant from the picked face + //get connected component from the picked face std::set final_sel; //std::vector cc; std::size_t nb_cc = CGAL::Polygon_mesh_processing::connected_components(poly diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index 92568b3e193..cf03238cf37 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -278,7 +278,7 @@ public Q_SLOTS: filter_operations(); } // If the selection_item or the polyhedron_item associated to the k-ring_selector is currently selected, - // set the k-ring_selector as currently selected. (A k-ring_selector tha tis not "currently selected" will + // set the k-ring_selector as currently selected. (A k-ring_selector that is not "currently selected" will // not process selection events) void isCurrentlySelected(Scene_facegraph_item_k_ring_selection* item) { diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp index db3fb136c39..675c6e83fab 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Surface_reconstruction_plugin.cpp @@ -226,7 +226,7 @@ void Polyhedron_demo_surface_reconstruction_plugin::on_actionSurfaceReconstructi polygonal_reconstruction (dialog); break; default: - std::cerr << "Error: unkown method." << std::endl; + std::cerr << "Error: unknown method." << std::endl; return; } std::cerr << "Reconstruction achieved in " << t.time() << "s" << std::endl; diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Surface_mesh_approximation_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Surface_mesh_approximation_plugin.cpp index bd422befbd7..d0714d3f41b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Surface_mesh_approximation_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Surface_mesh_approximation_plugin.cpp @@ -201,7 +201,7 @@ public: !(boost::math::isfinite)(fit_plane.d())) { // PCA may return plane with NaN efficients // we replace it with an inaccurate plane - std::cout << "WARNING: Replacing invalide plane." << std::endl; + std::cout << "WARNING: Replacing invalid plane." << std::endl; fit_plane = EPICK::Plane_3( tris.front().vertex(0), EPICK::Vector_3(0.0, 0.0, 1.0)); @@ -525,11 +525,11 @@ void Polyhedron_demo_surface_mesh_approximation_plugin::on_buttonSplit_clicked() if (!approx.split(ui_widget.split_proxy_idx->value(), ui_widget.split_nb_sections->value(), ui_widget.split_nb_relaxations->value())) { - CGAL::Three::Three::information(QString("No proxy splitted, #proxies = %1.").arg(approx.number_of_proxies())); + CGAL::Three::Three::information(QString("No proxy split, #proxies = %1.").arg(approx.number_of_proxies())); QApplication::restoreOverrideCursor(); return; } - CGAL::Three::Three::information(QString("One proxy splitted, #proxies = %1.").arg(approx.number_of_proxies())); + CGAL::Three::Three::information(QString("One proxy split, #proxies = %1.").arg(approx.number_of_proxies())); Patch_id_pmap pidmap(get(CGAL::face_patch_id_t(), *pmesh)); approx.output(CGAL::parameters::face_proxy_map(pidmap)); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp index 13c597b5d3b..9385ee2442b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Edit_polyhedron_plugin.cpp @@ -45,7 +45,7 @@ public: public Q_SLOTS: void on_actionDeformation_triggered(); /////// Dock window signal handlers ////// - // what they do is simply transmiting required 'action' to selected scene_edit_polyhedron_item object + // what they do is simply transmitting required 'action' to selected scene_edit_polyhedron_item object void on_AddCtrlVertPushButton_clicked(); void on_PrevCtrlVertPushButton_clicked(); void on_NextCtrlVertPushButton_clicked(); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp index 903e6977073..28163a38043 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/Scene_edit_polyhedron_item.cpp @@ -120,7 +120,7 @@ struct Scene_edit_polyhedron_item_priv double length_of_axis; // for drawing axis at a group of control vertices - // by interleaving 'viewer's events (check constructor), keep followings: + // by interleaving 'viewer's events (check constructor), keep following: Mouse_keyboard_state_deformation state; //For constraint rotation diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp index f58b2ed469a..e733323eed4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp @@ -109,7 +109,7 @@ void Scene_triangle_item::draw(CGAL::Three::Viewer_interface* viewer) const } //set the uniform properties for the TriangleContainer. - //Uniform values are setted at each draw call and are defined for the whole item. + //Uniform values are setd at each draw call and are defined for the whole item. //Values per simplex are computed as buffers in ComputeElements() and bound in initializeBuffers(). getTriangleContainer(0)->setColor(this->color()); getTriangleContainer(0)->draw(viewer, true); diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index c502b5df0cd..b148e8df46b 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -739,7 +739,7 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) // we distinguish the case were there is no alpha, to let the viewer //perform it, and the case where the pixel is not found. In the first case, //we erase the property, in the latter we return an empty list. - //According ot that, in the viewer, either we perform the picking, either we do nothing. + //According to that, in the viewer, either we perform the picking, either we do nothing. if(has_alpha()) { bool found = false; CGAL::qglviewer::Vec point = viewer->camera()->pointUnderPixel(picked_pixel, found) - viewer->offset(); diff --git a/Polyhedron/demo/Polyhedron/Scene.h b/Polyhedron/demo/Polyhedron/Scene.h index d06d7bcbfe4..b661ed7baa8 100644 --- a/Polyhedron/demo/Polyhedron/Scene.h +++ b/Polyhedron/demo/Polyhedron/Scene.h @@ -133,7 +133,7 @@ public: // auxiliary public function for QMainWindow //Selects the row at index i in the sceneView. QItemSelection createSelection(int i); - //same fo lists + //same for lists QItemSelection createSelection(QList is); //Selects all the rows in the sceneView. QItemSelection createSelectionAll(); diff --git a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp index db4de5ef72d..e2b93295cbc 100644 --- a/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_points_with_normal_item.cpp @@ -40,7 +40,7 @@ #include #endif // CGAL_LINKED_WITH_TBB -const std::size_t limit_fast_drawing = 300000; //arbitraty large value +const std::size_t limit_fast_drawing = 300000; //arbitrary large value typedef CGAL::Three::Point_container Pc; typedef CGAL::Three::Edge_container Ec; diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index d704582ece1..b258e0c5714 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -761,7 +761,7 @@ void Scene_polygon_soup_item::load(const std::vector& points, const std:: d->soup->vcolors.reserve (vcolors.size()); std::copy (vcolors.begin(), vcolors.end(), std::back_inserter (d->soup->vcolors)); } -// Force the instanciation of the template function for the types used in the STL_io_plugin. This is needed +// Force the instantiation of the template function for the types used in the STL_io_plugin. This is needed // because the d-pointer forbid the definition in the .h for this function. template SCENE_POLYGON_SOUP_ITEM_EXPORT void Scene_polygon_soup_item::load > (const std::vector& points, const std::vector >& polygons); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index ea21767f2da..561f3f7c8fb 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -1599,7 +1599,7 @@ void Scene_polyhedron_selection_item::selectPath(fg_vertex_descriptor vh) static Scene_polyhedron_selection_item_priv::vertex_on_path first; if(!d->first_selected) { - //if the path doesnt exist, add the vertex as the source of the path. + //if the path doesn't exist, add the vertex as the source of the path. if(!replace) { d->addVertexToPath(vh, first); @@ -1700,11 +1700,11 @@ void Scene_polyhedron_selection_item::selectPath(fg_vertex_descriptor vh) //get first's index for(it = d->path.begin(); it!=d->path.end(); ++it) { - bool end_of_path_is_prio = true;//makes the end of the path prioritary over the other points when there is a conflict + bool end_of_path_is_prio = true;//makes the end of the path priority over the other points when there is a conflict if(first.vertex == (d->path.end()-1)->vertex) if(it != d->path.end()-1) end_of_path_is_prio = false; - //makes the end of the path prioritary over the other points when there is a conflict + //makes the end of the path priority over the other points when there is a conflict if(it->vertex == first.vertex && !(it == d->path.begin())&&// makes the beginning of the path impossible to move end_of_path_is_prio) diff --git a/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp index 966acaf34e4..329d4b3f719 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polylines_item.cpp @@ -248,7 +248,7 @@ Scene_polylines_item_private::computeSpheres() colors[2] = 0; break; default: - colors[0] = 200; //fuschia + colors[0] = 200; //fuchsia colors[1] = 0; colors[2] = 200; } @@ -637,7 +637,7 @@ void Scene_polylines_item::split_at_sharp_angles() std::cerr << "Split polyline (small angle) " << std::acos(sqrt(CGAL::square(sc_prod) / ((av*av) * (bv*bv)))) * 180 /CGAL_PI - << " degres\n"; + << " degrees\n"; #endif Bare_polyline new_polyline; std::copy(it, bare_polyline.end(), diff --git a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h index eadae28b8eb..7639c066a5e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h @@ -74,7 +74,7 @@ public: //of the colors_ vector to scale on min_patch value. // For example, the Mesh_segmentation_plugin computes the colors_ // vector itself, so it must set recompute_colors to false to avoid - // having it ovewritten + // having it overwritten // in the code of this item. void computeItemColorVectorAutomatically(bool); bool isItemMulticolor(); diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/Use_ssh.h b/Polyhedron/demo/Polyhedron/include/CGAL/Use_ssh.h index 5d24a129302..d006e6704fe 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/Use_ssh.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/Use_ssh.h @@ -9,7 +9,7 @@ namespace CGAL{ namespace ssh_internal{ //should be used inside a try/catch(ssh::SshException e) -//give an unitialized session. +//give an uninitialized session. bool establish_ssh_session(ssh_session& session, const char *user, const char *server, diff --git a/Polyhedron/demo/Polyhedron/include/Point_set_3.h b/Polyhedron/demo/Polyhedron/include/Point_set_3.h index e347e5bddb3..b9237b9f67c 100644 --- a/Polyhedron/demo/Polyhedron/include/Point_set_3.h +++ b/Polyhedron/demo/Polyhedron/include/Point_set_3.h @@ -34,7 +34,7 @@ /// - User is responsible to call invalidate_bounds() after adding, moving or removing points. /// - Selecting points changes the order of the points in the /// container. If selection is *not* empty, it becomes invalid after -/// adding, moving or removing points, user is reponsible to call +/// adding, moving or removing points, user is responsible to call /// unselect_all() in those cases. /// /// @heading Parameters: diff --git a/Polyhedron/demo/Polyhedron/testing/test_demo.js b/Polyhedron/demo/Polyhedron/testing/test_demo.js index b14a92cbeb0..50f20f99207 100644 --- a/Polyhedron/demo/Polyhedron/testing/test_demo.js +++ b/Polyhedron/demo/Polyhedron/testing/test_demo.js @@ -67,7 +67,7 @@ scene.erase(0); testItem = "./testing/data/mini.surf"; main_window.open(testItem, 'surf_io_plugin'); -scene.erase(3); //id of the group contaning the items. +scene.erase(3); //id of the group containing the items. testItem = "./testing/data/sphere.inr"; main_window.open(testItem, 'segmented images'); diff --git a/Polyhedron/demo/Polyhedron/texture.cpp b/Polyhedron/demo/Polyhedron/texture.cpp index 836a4397534..8135b404017 100644 --- a/Polyhedron/demo/Polyhedron/texture.cpp +++ b/Polyhedron/demo/Polyhedron/texture.cpp @@ -253,7 +253,7 @@ int Texture::Extract(int left, int top, int right, int bottom) for(k=0;k is an auxiliary class that // supports the incremental construction of polyhedral surfaces. This is -// for example convinient when constructing polyhedral surfaces from +// for example convenient when constructing polyhedral surfaces from // files. The incremental construction starts with a list of all point // coordinates and concludes with a list of all facet polygons. Edges are // not explicitly specified. They are derived from the incidence @@ -205,7 +205,7 @@ public: // starts the construction. v is the number of new // vertices to expect, f the number of new facets, and h the number of // new halfedges. If h is unspecified (`== 0') it is estimated using - // Euler equations (plus 5% for the so far unkown holes and genus + // Euler equations (plus 5% for the so far unknown holes and genus // of the object). These values are used to reserve space in the // polyhedron representation `HDS'. If the representation // supports insertion these values do not restrict the class of diff --git a/Polyhedron/test/Polyhedron/test_polyhedron.cpp b/Polyhedron/test/Polyhedron/test_polyhedron.cpp index 0f565b2f046..89dc7db3146 100644 --- a/Polyhedron/test/Polyhedron/test_polyhedron.cpp +++ b/Polyhedron/test/Polyhedron/test_polyhedron.cpp @@ -90,7 +90,7 @@ Build_tetrahedron:: operator()( HDS& target) { // A polyhedron modifier that creates a tetrahedron using the // incremental builder, but in two steps with a second incr. builder -// continueing what the first one started. +// continuing what the first one started. template < class HDS > class Build_tetrahedron_2 : public CGAL::Modifier_base { public: diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp index 52bc9061b0c..2e15255eaef 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp @@ -321,7 +321,7 @@ void MainWindow::on_actionSimplify_triggered() } catch(...) { - statusBar()->showMessage(QString("Exception ocurred")); + statusBar()->showMessage(QString("Exception occurred")); } // default cursor @@ -478,7 +478,7 @@ void MainWindow::loadOSM(QString fileName) } catch(...) { - statusBar()->showMessage(QString("Exception ocurred")); + statusBar()->showMessage(QString("Exception occurred")); } Q_EMIT( changed()); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h index c7b13463470..2c98b695a20 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Stop_below_count_ratio_threshold.h @@ -25,7 +25,7 @@ namespace Polyline_simplification_2 /// \ingroup PkgPolylineSimplification2Classes /// This class is a stop predicate returning `true` when the percentage -/// of remaning vertices is smaller than a certain threshold. +/// of remaining vertices is smaller than a certain threshold. /// /// \cgalModels `PolylineSimplificationStopPredicate`. class Stop_below_count_ratio_threshold diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index 4b92dd03e1b..f1055bedbd0 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -173,7 +173,7 @@ Polynomial_rep::Polynomial_rep(size_type n, ...) The important invariant to be preserved by all methods is that the coefficient sequence does not contain leading zero coefficients - (where leading means at the high-degree end), with the excpetion that + (where leading means at the high-degree end), with the exception that the zero polynomial is represented by a single zero coefficient. An empty coefficient sequence denotes an undefined value. diff --git a/Polynomial/include/CGAL/Polynomial/misc.h b/Polynomial/include/CGAL/Polynomial/misc.h index 02092ec0a9b..a352558f39c 100644 --- a/Polynomial/include/CGAL/Polynomial/misc.h +++ b/Polynomial/include/CGAL/Polynomial/misc.h @@ -19,7 +19,7 @@ namespace CGAL{ namespace internal{ // template meta function Innermost_coefficient_type -// returns the tpye of the innermost coefficient +// returns the type of the innermost coefficient template struct Innermost_coefficient_type{ typedef T Type; }; template struct Innermost_coefficient_type >{ diff --git a/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h b/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h index 7fe86d217dd..c2b8cfd6634 100644 --- a/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h +++ b/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_algorithm_M.h @@ -118,7 +118,7 @@ Polynomial modular_gcd_utcf_algorithm_M( while(!solved){ do{ //--------------------------------------- - //choose prime not deviding f1 or f2 + //choose prime not dividing f1 or f2 MScalar tmp1, tmp2; do{ int current_prime = -1; diff --git a/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h b/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h index 550699c033f..d0f2885c83a 100644 --- a/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h +++ b/Polynomial/include/CGAL/Polynomial/modular_gcd_utcf_dfai.h @@ -152,7 +152,7 @@ Polynomial modular_gcd_utcf_dfai( while(!solved){ do{ //--------------------------------------- - //choose prime not deviding f1 or f2 + //choose prime not dividing f1 or f2 MScalar tmp1, tmp2; do{ prime_index++; diff --git a/Polynomial/include/CGAL/Polynomial/polynomial_gcd_implementations.h b/Polynomial/include/CGAL/Polynomial/polynomial_gcd_implementations.h index 0550e9bd762..a23b110d7f9 100644 --- a/Polynomial/include/CGAL/Polynomial/polynomial_gcd_implementations.h +++ b/Polynomial/include/CGAL/Polynomial/polynomial_gcd_implementations.h @@ -168,7 +168,7 @@ Polynomial gcd_utcf_Integral_domain( Polynomial p1, Polynomial p2){ Polynomial q, r; - // TODO measure preformance of both methodes with respect to + // TODO measure performance of both methodes with respect to // univariat polynomials on Integeres // univariat polynomials on Sqrt_extension // multivariat polynomials @@ -190,7 +190,7 @@ Polynomial gcd_utcf_Integral_domain( Polynomial p1, Polynomial p2){ CGAL::internal::hgdelta_update(h, g, delta); } #else - // implentaion using just the 'naive' methode + // implementation using just the 'naive' method // but performed much better as the one by Cohen // (for univariat polynomials with Sqrt_extension coeffs ) NT dummy; diff --git a/Polynomial/include/CGAL/Polynomial/resultant.h b/Polynomial/include/CGAL/Polynomial/resultant.h index 1bfeafbd467..c70f8a073fa 100644 --- a/Polynomial/include/CGAL/Polynomial/resultant.h +++ b/Polynomial/include/CGAL/Polynomial/resultant.h @@ -45,8 +45,8 @@ namespace CGAL { // all other functions are used for dispatching. // The implementation uses interpolatation for multivariate polynomials // Due to the recursive structuture of CGAL::Polynomial it is better -// to write the function such that the inner most variabel is eliminated. -// However, CGAL::internal::resultant(F,G) eliminates the outer most variabel. +// to write the function such that the inner most variable is eliminated. +// However, CGAL::internal::resultant(F,G) eliminates the outer most variabl. // This is due to backward compatibility issues with code base on EXACUS. // In turn CGAL::internal::resultant_(F,G) eliminates the innermost variable. @@ -390,7 +390,7 @@ inline Coeff resultant( const CGAL::Polynomial& F_, const CGAL::Polynomial& G_){ - // make the variable to be elimnated the innermost one. + // make the variable to be eliminated the innermost one. typedef CGAL::Polynomial_traits_d > PT; CGAL::Polynomial F = typename PT::Move()(F_, PT::d-1, 0); CGAL::Polynomial G = typename PT::Move()(G_, PT::d-1, 0); diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 5711d385ae3..8172dd12395 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -389,7 +389,7 @@ public: struct Substitute_homogeneous{ public: // this is the end of the recursion - // begin contains the homogeneous variabel + // begin contains the homogeneous variable // hdegree is the remaining degree template typename diff --git a/Polynomial/test/Polynomial/test_polynomial.h b/Polynomial/test/Polynomial/test_polynomial.h index 2753de712d2..5637578e945 100644 --- a/Polynomial/test/Polynomial/test_polynomial.h +++ b/Polynomial/test/Polynomial/test_polynomial.h @@ -445,7 +445,7 @@ void unigcdres(CGAL::Integral_domain_tag) { assert( v*d == (-c)*a*fh + c*b*gh ); // Michael Kerber's example for the hgdelta_update() bug: - // These polynomials cretate a situation where h does not divide g, + // These polynomials create a situation where h does not divide g, // but h^(delta-1) divides g^delta (as predicted by subresultant theory). // TODO: Uncomment following code /*CGAL::Creator_1 int2nt; diff --git a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d.h b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d.h index a11d190f190..998e2a42005 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d.h @@ -18,7 +18,7 @@ sets, the points in \f$ S_P\f$ and \f$ S_Q\f$ are the support points. A pair of support sets has size at most \f$ d+2\f$ (by size we mean \f$ |S_P|+|S_Q|\f$). The distance between the two polytopes is realized by a pair of points \f$ p\f$ and -\f$ q\f$ lying in the convex hull of \f$ S_P\f$ and \f$ S_Q\f$, repectively, +\f$ q\f$ lying in the convex hull of \f$ S_P\f$ and \f$ S_Q\f$, respectively, i.e.\ \f$ \sqrt{||p-q||}=pd(P,Q)\f$. In general, neither the support sets nor the realizing points are necessarily unique. diff --git a/Polytope_distance_d/include/CGAL/Width_3.h b/Polytope_distance_d/include/CGAL/Width_3.h index b8ed054c3c5..8ebc1cd0cdc 100644 --- a/Polytope_distance_d/include/CGAL/Width_3.h +++ b/Polytope_distance_d/include/CGAL/Width_3.h @@ -294,7 +294,7 @@ class Width_3 { } //During the algorithm we have to build union and minus set - //of two sets and check wheater two sets are cutting each othe ror not + //of two sets and check whether two sets are cutting each other or not // *** SETMINUS *** //------------------ diff --git a/Profiling_tools/include/CGAL/Real_timer.h b/Profiling_tools/include/CGAL/Real_timer.h index da35e31b87e..757e8056977 100644 --- a/Profiling_tools/include/CGAL/Real_timer.h +++ b/Profiling_tools/include/CGAL/Real_timer.h @@ -68,7 +68,7 @@ public: double time() const; int intervals() const { return interv; } double precision() const; - // Returns timer precison. Computes it dynamically at first call. + // Returns timer precision. Computes it dynamically at first call. // Returns -1.0 if timer system call fails, which, for a proper coded // test towards precision leads to an immediate stop of an otherwise // infinite loop (fixed tolerance * total time >= precision). diff --git a/Profiling_tools/include/CGAL/Timer.h b/Profiling_tools/include/CGAL/Timer.h index ac9cac696b0..1de1c0f1c3d 100644 --- a/Profiling_tools/include/CGAL/Timer.h +++ b/Profiling_tools/include/CGAL/Timer.h @@ -66,7 +66,7 @@ public: double time() const; int intervals() const { return interv; } double precision() const; - // Returns timer precison. Computes it dynamically at first call. + // Returns timer precision. Computes it dynamically at first call. // Returns -1.0 if timer system call fails, which, for a proper coded // test towards precision leads to an immediate stop of an otherwise // infinite loop (fixed tolerance * total time >= precision). diff --git a/Property_map/include/CGAL/property_map.h b/Property_map/include/CGAL/property_map.h index a917d413e85..2a17deb4b83 100644 --- a/Property_map/include/CGAL/property_map.h +++ b/Property_map/include/CGAL/property_map.h @@ -437,7 +437,7 @@ struct Pointer_property_map{ /// \ingroup PkgPropertyMapRef /// Starting from boost 1.55, the use of raw pointers as property maps has been deprecated. -/// This function is a shortcut to the recommanded replacement: +/// This function is a shortcut to the recommended replacement: /// `boost::make_iterator_property_map(, boost::typed_identity_property_map())` /// Note that the property map is a mutable `LvaluePropertyMap` with `std::size_t` as key. template diff --git a/QP_solver/doc/QP_solver/CGAL/QP_solution.h b/QP_solver/doc/QP_solver/CGAL/QP_solution.h index a77ce3dbf03..e5698c90c3a 100644 --- a/QP_solver/doc/QP_solver/CGAL/QP_solution.h +++ b/QP_solver/doc/QP_solver/CGAL/QP_solution.h @@ -177,14 +177,14 @@ bool is_unbounded() const; /*! returns the status of the solution; this is one of the values `QP_OPTIMAL`, `QP_INFEASIBLE`, and -`QP_UNBOUNDED`, depending on whether the program asociated +`QP_UNBOUNDED`, depending on whether the program associated to `sol` has an optimal solution, is infeasible, or is unbounded. */ Quadratic_program_status status() const; /*! returns the number of iterations that it took to solve the -program asociated to `sol`. +program associated to `sol`. */ int number_of_iterations() const; @@ -518,7 +518,7 @@ Infeasibility_certificate_iterator infeasibility_certificate_end() const; /*! -returns a random acess iterator over the unbounded direction \f$ \qpw\f$ +returns a random access iterator over the unbounded direction \f$ \qpw\f$ as given in Lemma 3,with respect to the solution \f$ \qpx^*\f$ obtained from `sol``.variable_values_begin()`. The value type is `ET`, and the valid iterator range has length \f$ n\f$. diff --git a/QP_solver/doc/QP_solver/Concepts/LinearProgram.h b/QP_solver/doc/QP_solver/Concepts/LinearProgram.h index d685c489899..6cc3639cff5 100644 --- a/QP_solver/doc/QP_solver/Concepts/LinearProgram.h +++ b/QP_solver/doc/QP_solver/Concepts/LinearProgram.h @@ -82,7 +82,7 @@ The value type of `FL_iterator` is `bool`. typedef unspecified_type FL_iterator; /*! -A random acess iterator type to go over +A random access iterator type to go over the entries of the lower bound vector \f$ \qpl\f$. */ typedef unspecified_type L_iterator; @@ -95,7 +95,7 @@ The value type of `UL_iterator` is `bool`. typedef unspecified_type UL_iterator; /*! -A random acess iterator type to go over +A random access iterator type to go over the entries of the upper bound vector \f$ \qpu\f$. */ typedef unspecified_type U_iterator; diff --git a/QP_solver/doc/QP_solver/Concepts/MPSFormat.h b/QP_solver/doc/QP_solver/Concepts/MPSFormat.h index 496e2e92405..00be29746cc 100644 --- a/QP_solver/doc/QP_solver/Concepts/MPSFormat.h +++ b/QP_solver/doc/QP_solver/Concepts/MPSFormat.h @@ -71,7 +71,7 @@ In the (mandatory) ROW section, you find one line for every constraint, where the letter L indicates relation \f$ \leq\f$, letter G stands for \f$ \geq\f$, and E for \f$ =\f$. In addition, there is a row for the linear objective function (indicated -by letter N). In that section, names are asigned to the +by letter N). In that section, names are assigned to the constraints (here: c0, c1) and the objective function (here: obj). An MPS file may encode several linear objective functions by using several rows starting with N, but we ignore @@ -123,7 +123,7 @@ having an identifier different from that of the first line. The first token \f$ t\f$ itself determines the type of the bound, and the token \f$ j\f$ after the bound identifier names the variable to which the bound applies In case of bound types FX, LO, and -UP, there is another token \f$ val\f$ that specifices the bound +UP, there is another token \f$ val\f$ that specifies the bound value. Here is how bound type and value determine a bound for variable \f$ x_j\f$. There may be several bound specifications for a single variable, and they are processed in order of appearance. diff --git a/QP_solver/doc/QP_solver/Concepts/QuadraticProgram.h b/QP_solver/doc/QP_solver/Concepts/QuadraticProgram.h index 906ff67621e..6070e27ceb9 100644 --- a/QP_solver/doc/QP_solver/Concepts/QuadraticProgram.h +++ b/QP_solver/doc/QP_solver/Concepts/QuadraticProgram.h @@ -82,7 +82,7 @@ The value type of `FL_iterator` is `bool`. typedef unspecified_type FL_iterator; /*! -A random acess iterator type to go over +A random access iterator type to go over the entries of the lower bound vector \f$ \qpl\f$. */ typedef unspecified_type L_iterator; @@ -95,7 +95,7 @@ The value type of `UL_iterator` is `bool`. typedef unspecified_type UL_iterator; /*! -A random acess iterator type to go over +A random access iterator type to go over the entries of the upper bound vector \f$ \qpu\f$. */ typedef unspecified_type U_iterator; diff --git a/QP_solver/doc/QP_solver/QP_solver.txt b/QP_solver/doc/QP_solver/QP_solver.txt index 993dc2174bd..56c6a0aa44e 100644 --- a/QP_solver/doc/QP_solver/QP_solver.txt +++ b/QP_solver/doc/QP_solver/QP_solver.txt @@ -273,7 +273,7 @@ can easily be overlooked by a novice. \cgalExample{QP_solver/first_qp.cpp} -Asuming that GMP is installed, the +Assuming that GMP is installed, the output of the of the above program is: \verbatim status: OPTIMAL diff --git a/QP_solver/include/CGAL/QP_models.h b/QP_solver/include/CGAL/QP_models.h index c2c19285096..28c0b583651 100644 --- a/QP_solver/include/CGAL/QP_models.h +++ b/QP_solver/include/CGAL/QP_models.h @@ -1514,7 +1514,7 @@ private: return this->err2("expected number after '%' in section '%'", t, D_section); - // multiply by two if approriate: + // multiply by two if appropriate: if (multiply_by_two) val *= NT(2); diff --git a/QP_solver/include/CGAL/QP_options.h b/QP_solver/include/CGAL/QP_options.h index 32fe826efce..9270e1d4e40 100644 --- a/QP_solver/include/CGAL/QP_options.h +++ b/QP_solver/include/CGAL/QP_options.h @@ -86,7 +86,7 @@ private: // verbosity // --------- // 0: silent - // 1: short iteration summary (recommened for the user) + // 1: short iteration summary (recommended for the user) // >= 2: output of internal details (not recommend for the user) int verbosity_; diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index 722acf3e7dc..9bd3353bf63 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -297,7 +297,7 @@ public: Quadratic_program_solution () : Handle_for*>(), et0(0) { - *(this->ptr()) = 0; // unitialized solution + *(this->ptr()) = 0; // uninitialized solution } Quadratic_program_solution (const QP_solver_base* s) diff --git a/QP_solver/include/CGAL/QP_solver/Initialization.h b/QP_solver/include/CGAL/QP_solver/Initialization.h index 0ff5f1bef34..88eb0636fb3 100644 --- a/QP_solver/include/CGAL/QP_solver/Initialization.h +++ b/QP_solver/include/CGAL/QP_solver/Initialization.h @@ -372,7 +372,7 @@ init_basis() // Note: we maintain the information about the special artificial column in // the variable art_s_i and the vector s_art; in addition, however, we also // add a special "fake" column to art_A. This "fake" column has (in - // constrast to the special artificial column) only one nonzero entry, + // contrast to the special artificial column) only one nonzero entry, // namely a +-1 for the most infeasible row (see (C1) above). // add "fake" column to art_A: @@ -578,7 +578,7 @@ init_solution() if (art_s_i > 0) minus_c_B[art_A.size()-1] *= ET(qp_n+qp_m); // Note: the idea here is to // give more weight to the - // special artifical variable + // special artificial variable // so that it gets removed very // early, - todo kf: why? diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver.h b/QP_solver/include/CGAL/QP_solver/QP_solver.h index 889fdf25a1b..4b18f9a8b30 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver.h @@ -55,7 +55,7 @@ class QP_solver; template class QP_solution; -namespace QP_solver_impl { // namespace for implemenation details +namespace QP_solver_impl { // namespace for implementation details // -------------- // Tags generator // -------------- @@ -266,7 +266,7 @@ private: A_row_by_index_iterator; // Access to the matrix D sometimes converts to ET, and - // sometimes retruns the original input type + // sometimes returns the original input type typedef QP_matrix_pairwise_accessor< D_iterator, ET > D_pairwise_accessor; typedef boost::transform_iterator @@ -671,7 +671,7 @@ public: // only the pricing strategies (including user-defined ones // - UPPER: the variable is sitting on its upper bound. // - FIXED: the variable is sitting on its lower and upper bound. // - ZERO: the variable has value zero and is sitting on its lower - // bound, its upper bound, or betweeen the two bounds. + // bound, its upper bound, or between the two bounds. // // Note: in the latter case you can call state_of_zero_nonbasic_variable() // to find out which bound is active, if any. diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h b/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h index 2d3a66015ef..bc62b5ae88f 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver_impl.h @@ -1024,7 +1024,7 @@ ratio_test_2( Tag_false) // where x(mu_j(t_1)) is the current solution of the solver at this point // (i.e., at the beginning of ratio step 2). // - // By subtracting (2) from (1) we can thus eliminate the "unkown" x(0) + // By subtracting (2) from (1) we can thus eliminate the "unknown" x(0) // (which is cheaper than computing it): // // x(mu_j) = x(mu_j(t_1)) + (mu_j-mu_j(t_1)) q_it @@ -2831,7 +2831,7 @@ check_basis_inverse( Tag_true) Value_iterator q_it; - // BG: is this a real check?? How does the special artifical + // BG: is this a real check?? How does the special artificial // variable come in, e.g.? OK: it comes in through // ratio_test_init__A_Cj for ( col = 0; col < cols; ++col, ++i_it) { diff --git a/QP_solver/test/QP_solver/create_test_solver_cin b/QP_solver/test/QP_solver/create_test_solver_cin index c6d8a99ab75..b375b36db4a 100755 --- a/QP_solver/test/QP_solver/create_test_solver_cin +++ b/QP_solver/test/QP_solver/create_test_solver_cin @@ -32,7 +32,7 @@ function create_derivatives() ./master_mps_to_derivatives "$file" "$name" test_solver_data/derivatives } -# echo usuage: +# echo usage: if [ "x$1" == "xCGAL" ]; then echo "Generating CGAL testsuite." elif [ "x$1" == "xall" ]; then @@ -89,7 +89,7 @@ GIT_UNVERSIONED=$(cd test_solver_data; git status --porcelain | awk '{if($1=="?? #echo "$GIT_UNVERSIONED" # generate derivates and, in parallel, add them to the list of files that -# will finally consitute test_solver.cin: +# will finally constitute test_solver.cin: LIST="" MISSINGFILES="" echo "Generating derivates..." diff --git a/QP_solver/test/QP_solver/test_solver.cpp b/QP_solver/test/QP_solver/test_solver.cpp index 6044cf8716d..ad298449b55 100644 --- a/QP_solver/test/QP_solver/test_solver.cpp +++ b/QP_solver/test/QP_solver/test_solver.cpp @@ -310,7 +310,7 @@ bool process(const std::string& filename, number_type = "double"; } // now, some combinations of IT and the file's number-type are - // incomaptible: + // incompatible: // file's input type | input type IT to be used in parsing the file // ----------------------------------------------------------------- // double | int (can't convert double to it) diff --git a/Ridges_3/examples/Ridges_3/README b/Ridges_3/examples/Ridges_3/README index 568bb4b0f60..b5a87991f0a 100644 --- a/Ridges_3/examples/Ridges_3/README +++ b/Ridges_3/examples/Ridges_3/README @@ -42,7 +42,7 @@ Allowed options: Note : if the nb of collected points is less than the required min number of - points to make the approxiamtion possible (which is constrained by the deg) + points to make the approximation possible (which is constrained by the deg) then the program exits. diff --git a/Ridges_3/include/CGAL/PolyhedralSurf_neighbors.h b/Ridges_3/include/CGAL/PolyhedralSurf_neighbors.h index 8632edc3fc6..775fec7d89d 100644 --- a/Ridges_3/include/CGAL/PolyhedralSurf_neighbors.h +++ b/Ridges_3/include/CGAL/PolyhedralSurf_neighbors.h @@ -100,7 +100,7 @@ public: // vertex_neigh stores the vertex v and its 1Ring neighbors contour // stores halfedges, oriented CW, following the 1Ring disk border // OneRingSize is the max distance from v to its OneRing - // neighbors. (the tag is_visited is not mofified) + // neighbors. (the tag is_visited is not modified) void compute_one_ring(const vertex_descriptor v, std::vector &vertex_neigh, std::list &contour, diff --git a/Ridges_3/include/CGAL/Umbilics.h b/Ridges_3/include/CGAL/Umbilics.h index dcf8eecac23..c681ce4a2c1 100644 --- a/Ridges_3/include/CGAL/Umbilics.h +++ b/Ridges_3/include/CGAL/Umbilics.h @@ -31,7 +31,7 @@ enum Umbilic_type { NON_GENERIC_UMBILIC = 0, ELLIPTIC_UMBILIC, HYPERBOLIC_UMBILI //------------------------------------------------------------------- //Umbilic : stores umbilic data, its location given by a vertex, its -//type and a circle of edges bording a disk containing the vertex +//type and a circle of edges bordering a disk containing the vertex //------------------------------------------------------------------ template < class TriangleMesh > class Umbilic diff --git a/Ridges_3/test/Ridges_3/ridge_test.cpp b/Ridges_3/test/Ridges_3/ridge_test.cpp index 13ee1569185..d9149c48032 100644 --- a/Ridges_3/test/Ridges_3/ridge_test.cpp +++ b/Ridges_3/test/Ridges_3/ridge_test.cpp @@ -11,7 +11,7 @@ // Functions declared in PolyhedralSurf.h // They were previously defined in a separate file PolyhedralSurf.cpp, -// but I prefere to avoid custom CMakeLists.txt files in the testsuite. +// but I prefer to avoid custom CMakeLists.txt files in the testsuite. // -- Laurent Rineau, 2008/11/10 typedef PolyhedralSurf::Traits Kernel; diff --git a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index 1bb2cfd7ede..baa81fc5f76 100644 --- a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -298,7 +298,7 @@ public: Mesh_complex_3_in_triangulation_3(Self&& rhs); /** - * Assignement operator, also serves as move-assignment + * Assignment operator, also serves as move-assignment */ Self& operator=(Self rhs) { @@ -1729,7 +1729,7 @@ Mesh_complex_3_in_triangulation_3() , manifold_info_initialized_(false) //TODO: parallel! { // We don't put it in the initialization list because - // std::atomic has no constructor + // std::atomic has no constructors number_of_facets_ = 0; number_of_cells_ = 0; } diff --git a/STL_Extension/doc/STL_Extension/CGAL/Default.h b/STL_Extension/doc/STL_Extension/CGAL/Default.h index 00c8e929931..4f58c260c36 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Default.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Default.h @@ -11,7 +11,7 @@ to use the default argument of a template parameter of a class template. This can be useful in several cases: (a) when one needs a non-default value for another template parameter coming next (since \cpp only supports defaults at the end of lists), (b) when the default is actually a complex expression, e.g. -refering to previous template parameters (in this case, it shortens compiler +referring to previous template parameters (in this case, it shortens compiler error messages and mangled symbol names), (c) when defining the default involves circular dependencies of type instantiations (there, it breaks the cycle in a nice way). diff --git a/STL_Extension/doc/STL_Extension/CGAL/result_of.h b/STL_Extension/doc/STL_Extension/CGAL/result_of.h index 507efb3645c..823c335b599 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/result_of.h +++ b/STL_Extension/doc/STL_Extension/CGAL/result_of.h @@ -4,7 +4,7 @@ namespace cpp11 { /*! \ingroup PkgSTLExtensionRef Alias to the implementation of the `std::result_of` mechanism. When all compilers - supported by \cgal have a Standard compliant implemention of the `std::invoke_result` + supported by \cgal have a Standard compliant implementation of the `std::invoke_result` mechanism, it will become an alias to the std::invoke_result. \sa std::result_of diff --git a/STL_Extension/doc/STL_Extension/Concepts/SurjectiveLockDataStructure.h b/STL_Extension/doc/STL_Extension/Concepts/SurjectiveLockDataStructure.h index bfa2bde02af..e11d85a35a1 100644 --- a/STL_Extension/doc/STL_Extension/Concepts/SurjectiveLockDataStructure.h +++ b/STL_Extension/doc/STL_Extension/Concepts/SurjectiveLockDataStructure.h @@ -44,7 +44,7 @@ public: /// Try to lock `object`. Returns `true` if the object is already locked by this thread or if the object could be locked. /// \tparam no_spin If `true`, force non-blocking operation (in any case, the /// function will return immediately, i.e.\ it will not - /// wait for the ressource to be free). + /// wait for the resource to be free). /// If `false`, use the default behavior (same as previous function). template bool try_lock(const T &object); @@ -56,4 +56,4 @@ public: template void unlock_everything_locked_by_this_thread_but_one(const T &object); /// @} -}; \ No newline at end of file +}; diff --git a/STL_Extension/doc/STL_Extension/STL_Extension.txt b/STL_Extension/doc/STL_Extension/STL_Extension.txt index 947faab8ba2..b793a86550a 100644 --- a/STL_Extension/doc/STL_Extension/STL_Extension.txt +++ b/STL_Extension/doc/STL_Extension/STL_Extension.txt @@ -398,7 +398,7 @@ void foo() Prior to \cgal 5.6, some packages were using Boost parameters to provide a user friendly way to set parameters of classes and functions. In an attempt to remove a dependency and -to get a more uniform API accross packages, these packages have been updated to now use +to get a more uniform API across packages, these packages have been updated to now use \cgal \ref bgl_namedparameters inspired by the function named parameters from the \boost graph library. In practice this means that the following call: \code @@ -424,4 +424,4 @@ to remain valid. However, if new parameters are introduced for those functions, no guarantee that they will be ported to the old API. So we strongly encourage users to upgrade to the new API. Additionally, passing parameters without names is deprecated and even removed for some functions. -*/ \ No newline at end of file +*/ diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 6bbdeee9176..7795fab734e 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -749,7 +749,7 @@ void Concurrent_compact_container::merge(Self &d) #else // not CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE m_capacity += d.m_capacity; #endif // not CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE - // It seems reasonnable to take the max of the block sizes. + // It seems reasonable to take the max of the block sizes. m_block_size = (std::max)(m_block_size, d.m_block_size); // Clear d. d.init(); diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index 8a5e7ebae8a..004c8b4d96f 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -279,7 +279,7 @@ public: //! pointer. One example would be cleaning up dynamically allocated //! data, or another example would be overwriting a \c leda::real with //! a default constructed value to free its old expression tree. However, - //! this function can also be savely ignored and kept empty. + //! this function can also be safely ignored and kept empty. virtual void clear() {} }; @@ -396,7 +396,7 @@ public: * of representations. * * The base classes can be used directly, but this - * rebind mechamism allows the implementation of handle-rep classes + * rebind mechanism allows the implementation of handle-rep classes * that are parameterized with the policy class only and adapt to * the necessary base class. */ @@ -456,7 +456,7 @@ public: * of representations. * * The base classes can be used directly, but this - * rebind mechamism allows the implementation of handle-rep classes + * rebind mechanism allows the implementation of handle-rep classes * that are parameterized with the policy class only and adapt to * the necessary base class. */ @@ -589,7 +589,7 @@ public: * of representations. * * The base classes can be used directly, but this - * rebind mechamism allows the implementation of handle-rep classes + * rebind mechanism allows the implementation of handle-rep classes * that are parameterized with the policy class only and adapt to * the necessary base class. */ @@ -1138,7 +1138,7 @@ template class Handle_with_policy { public: - //! first template paramter + //! first template parameter typedef T_ Handled_type; //! the handle type itself. diff --git a/STL_Extension/include/CGAL/Multiset.h b/STL_Extension/include/CGAL/Multiset.h index fe82fa680d4..e0193fb4b9a 100644 --- a/STL_Extension/include/CGAL/Multiset.h +++ b/STL_Extension/include/CGAL/Multiset.h @@ -31,10 +31,10 @@ namespace CGAL { * 3. The number of black nodes from every path from the tree root to a leaf * is the same for all tree leaves (it is called the 'black height' of the * tree). - * Due to propeties 2-3, the height of a red-black tree containing n nodes + * Due to properties 2-3, the height of a red-black tree containing n nodes * is bounded by 2*log_2(n). * - * The Multiset template requires three template parmeters: + * The Multiset template requires three template parameters: * - The contained Type class represents the objects stored in the tree. * It has to support the default constructor, the copy constructor and * the assignment operator (operator=). @@ -42,7 +42,7 @@ namespace CGAL { * class Type: It has to support an operator() that receives two objects from * the Type class and returns SMALLER, EQUAL or LARGER, depending on the * comparison result. - * In case the deafult parameter is supplied, the Type class has to support + * In case the default parameter is supplied, the Type class has to support * the less-than (<) and the equal (==) operators. * - The Allocator represents an allocator class. By default, it is the CGAL * allocator. @@ -291,7 +291,7 @@ protected: public: - // Forward decleration: + // Forward declaration: class const_iterator; /*! \class @@ -325,7 +325,7 @@ public: public: - /*! Deafult constructor. */ + /*! Default constructor. */ iterator () : nodeP (nullptr) {} @@ -435,7 +435,7 @@ public: public: - /*! Deafult constructor. */ + /*! Default constructor. */ const_iterator () : nodeP (nullptr) {} @@ -1275,7 +1275,7 @@ protected: /*! Check whether a node is black. */ inline bool _is_black (const Node *nodeP) const { - // Note that invalid nodes are considered ro be black as well. + // Note that invalid nodes are considered to be black as well. return (nodeP == nullptr || nodeP->color != Node::RED); } //@} @@ -1979,7 +1979,7 @@ Multiset::insert (iterator positi if (k > max_steps) { // In case the given position is too far away (more than log(n) steps) - // from the true poisition of the object, break the loop. + // from the true position of the object, break the loop. found_pos = false; break; } @@ -2003,7 +2003,7 @@ Multiset::insert (iterator positi if (k > max_steps) { // In case the given position is too far away (more than log(n) steps) - // from the true poisition of the object, break the loop. + // from the true position of the object, break the loop. found_pos = false; break; } @@ -2463,7 +2463,7 @@ void Multiset::catenate (Self& tr if (max1_P != rootP) { - // Splice max1_P from its current poisition in our tree. + // Splice max1_P from its current position in our tree. // We know it is has no right child, so we just have to connect its // left child with its parent. max1_P->parentP->rightP = max1_P->leftP; @@ -2479,7 +2479,7 @@ void Multiset::catenate (Self& tr } else if (min2_P != tree.rootP) { - // Splice min2_P from its current poisition in the other tree. + // Splice min2_P from its current position in the other tree. // We know it is has no left child, so we just have to connect its // right child with its parent. if (min2_P->parentP != nullptr) @@ -2749,7 +2749,7 @@ void Multiset::split (iterator po if (_is_valid (childP) && rightTree.rootP == nullptr) { - // Assing T_r to rightTree. + // Assign T_r to rightTree. rightTree.rootP = childP; rightTree.iBlackHeight = iCurrBHeight; @@ -2884,7 +2884,7 @@ void Multiset::split (iterator po if (_is_valid (childP) && leftTree.rootP == nullptr) { - // Assing T_l to leftTree. + // Assign T_l to leftTree. leftTree.rootP = childP; leftTree.iBlackHeight = iCurrBHeight; @@ -3158,7 +3158,7 @@ void Multiset::_remove_at (Node* // Now physically swap nodeP and its successor. Notice this may temporarily // violate the tree properties, but we are going to remove nodeP anyway. - // This way we have moved nodeP to a position were it is more convinient + // This way we have moved nodeP to a position were it is more convenient // to delete it. _swap (nodeP, succP); } @@ -3735,7 +3735,7 @@ void Multiset::_insert_fixup (Nod { CGAL_precondition (_is_red (nodeP)); - // Fix the red-black propreties: we may have inserted a red leaf as the + // Fix the red-black properties: we may have inserted a red leaf as the // child of a red parent - so we have to fix the coloring of the parent // recursively. Node *currP = nodeP; @@ -3895,7 +3895,7 @@ void Multiset::_remove_fixup (Nod else { // In this case, at least one of the sibling's children is red. - // It is therfore obvious that the sibling itself is black. + // It is therefore obvious that the sibling itself is black. if (_is_black (siblingP->rightP)) { // The left child is red: Color it black, and color the sibling red. @@ -3960,7 +3960,7 @@ void Multiset::_remove_fixup (Nod else { // In this case, at least one of the sibling's children is red. - // It is therfore obvious that the sibling itself is black. + // It is therefore obvious that the sibling itself is black. if (_is_black (siblingP->leftP)) { // The right child is red: Color it black, and color the sibling red. diff --git a/STL_Extension/include/CGAL/Small_unordered_set.h b/STL_Extension/include/CGAL/Small_unordered_set.h index e0329180bc4..777a4da5e9f 100644 --- a/STL_Extension/include/CGAL/Small_unordered_set.h +++ b/STL_Extension/include/CGAL/Small_unordered_set.h @@ -33,7 +33,7 @@ namespace CGAL unicity test is done element by element, in linear time - when the number of elements exceed MaxSize, a - `std::unordered_set` is instanciated, all the elements of the + `std::unordered_set` is instantiated, all the elements of the array are inserted in it and from that point the container behaves like a `std::unordered_set` diff --git a/STL_Extension/include/CGAL/Spatial_lock_grid_3.h b/STL_Extension/include/CGAL/Spatial_lock_grid_3.h index b50211b0199..7c6ab2d39b8 100644 --- a/STL_Extension/include/CGAL/Spatial_lock_grid_3.h +++ b/STL_Extension/include/CGAL/Spatial_lock_grid_3.h @@ -556,7 +556,7 @@ public: } else if (old_value > this_thread_priority) { - // Another "more prioritary" thread owns the lock, we back off + // Another "more priority" thread owns the lock, we back off return false; } else diff --git a/STL_Extension/include/CGAL/exceptions.h b/STL_Extension/include/CGAL/exceptions.h index 9c03348f122..edb926383f9 100644 --- a/STL_Extension/include/CGAL/exceptions.h +++ b/STL_Extension/include/CGAL/exceptions.h @@ -33,7 +33,7 @@ namespace CGAL { -// [Sylvain] This was originaly written in the Exacus library. +// [Sylvain] This was originally written in the Exacus library. // I kept most doxygen comments. diff --git a/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h b/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h index 910fe710ea3..21986c30679 100644 --- a/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h +++ b/SearchStructures/doc/SearchStructures/CGAL/Segment_tree_d.h @@ -116,7 +116,7 @@ vertex either the sublayer tree is a tree anchor, or it stores a (possibly empty) list of data items. In the first case, the sublayer tree of the vertex is checked on being valid. In the second case, each data -item is checked weather it contains the associated interval of +item is checked whether it contains the associated interval of the vertex and does not contain the associated interval of the parent vertex or not. `true` is returned if the tree structure is valid, `false` otherwise. diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 5b5725f86de..66ccda87d47 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -254,7 +254,7 @@ public: insert(first,last); } - //Assignement + //Assignment Triangulation_2 &operator=(const Triangulation_2 &tr); Triangulation_2 &operator=(Triangulation_2 &&) = default; @@ -787,7 +787,7 @@ Triangulation_2(const Triangulation_2 &tr) _infinite_vertex = _tds.copy_tds(tr._tds, tr.infinite_vertex()); } -//Assignement +//Assignment template Triangulation_2 & Triangulation_2:: diff --git a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h index 48333eab34a..93e00b1680f 100644 --- a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h @@ -309,7 +309,7 @@ Triangulation_hierarchy_2(const Triangulation_hierarchy_2 &tr) } -//Assignement +//Assignment template Triangulation_hierarchy_2 & Triangulation_hierarchy_2:: 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 9ccb879cffc..a447bc7e335 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 @@ -147,7 +147,7 @@ public: { } - // Assignement + // Assignment Delaunay_triangulation_on_sphere_2& operator=(Delaunay_triangulation_on_sphere_2 other) // intentional copy { Base::swap(static_cast(other)); diff --git a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h index 743a1ca7026..8b3fb4f448e 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h +++ b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2.h @@ -123,7 +123,7 @@ public: _gt.set_radius(radius); } - // Assignement + // Assignment void swap(Triangulation_on_sphere_2& tr); Triangulation_on_sphere_2& operator=(Triangulation_on_sphere_2 tr); // intentional copy @@ -512,7 +512,7 @@ clear() _tds.clear(); } -// Assignement +// Assignment template void Triangulation_on_sphere_2:: From 0fb05d14800de6db73b5d6f0bdf2170fa19c407c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 15 Nov 2022 20:04:23 +0100 Subject: [PATCH 159/426] fix warning --- Point_set_3/include/CGAL/Point_set_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index 5a833713161..c9e6ba4f0ba 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -1365,7 +1365,7 @@ struct Point_set_processing_3_np_helper, NamedParamet return !(is_default_parameter::value); } - static constexpr bool has_normal_map(Point_set_3& ps, const NamedParameters&) + static constexpr bool has_normal_map(Point_set_3&, const NamedParameters&) { return true; // either available in named parameters, and always available in Point_set_3 otherwise } From c32b1f412756edc4e4055b4a603905fb9d5ac4f0 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 16 Nov 2022 13:22:39 +0100 Subject: [PATCH 160/426] spelling corrections Some spelling corrections (Directories starting with `S` rest - `W`), --- .../scale_space_incremental.cpp | 2 +- .../Shape_construction_3.h | 2 +- SearchStructures/include/CGAL/Range_tree_d.h | 6 ++--- .../include/CGAL/Segment_tree_d.h | 2 +- SearchStructures/include/CGAL/Tree_base.h | 2 +- Segment_Delaunay_graph_2/TODO | 2 +- ...egmentDelaunayGraphHierarchyVertexBase_2.h | 4 ++-- .../Segment_Delaunay_graph_2_impl.h | 8 +++---- .../Voronoi_vertex_ring_C2.h | 2 +- .../Voronoi_vertex_sqrt_field_C2.h | 2 +- .../Basic_predicates_C2.h | 2 +- .../Bisector_Linf.h | 6 ++--- .../Constructions_C2.h | 14 ++++++------ .../Voronoi_vertex_ring_C2.h | 2 +- ...llout_direction_single_mold_trans_cast.cpp | 2 +- .../is_pullout_direction.h | 2 +- .../pullout_directions.h | 4 ++-- .../internal/Circle_arrangment.h | 4 ++-- .../long_description.txt | 2 +- .../doc/Shape_detection/Shape_detection.txt | 2 +- .../Least_squares_plane_fit_region.h | 2 +- .../regularize_100_segments_angles.cpp | 2 +- .../regularize_100_segments_offsets.cpp | 2 +- .../regularize_15_segments.cpp | 2 +- .../regularize_real_data_2.cpp | 2 +- .../Concepts/SnapRoundingTraits_2.h | 2 +- .../include/CGAL/Snap_rounding_kd_2.h | 20 ++--------------- .../Spatial_searching/include/nanoflann.hpp | 4 ++-- .../Spatial_searching/Spatial_searching.txt | 4 ++-- .../Spatial_searching/circular_query.cpp | 2 +- .../iso_rectangle_2_query.cpp | 4 ++-- .../searching_with_circular_query.cpp | 4 ++-- Spatial_searching/include/CGAL/Kd_tree.h | 2 +- .../Orthogonal_incremental_neighbor_search.h | 4 ++-- .../Orthogonal_k_neighbor_search.cpp | 2 +- .../Spatial_searching/Range_searching.cpp | 2 +- .../iso_rectangle_2_query_2.cpp | 2 +- .../Straight_skeleton_2/CGAL/Trisegment_2.h | 4 ++-- .../StraightSkeletonBuilder_2_Visitor.h | 2 +- .../Straight_skeleton_2/Low_level_API.cpp | 2 +- .../Straight_skeleton_builder_2_impl.h | 22 +++++++++---------- .../Straight_skeleton_builder_traits_2_aux.h | 2 +- .../Straight_skeleton_cons_ftC2.h | 20 ++++++++--------- .../predicates/Straight_skeleton_pred_ftC2.h | 10 ++++----- .../Straight_skeleton_2/description.txt | 2 +- .../doc/Stream_support/IOstream.txt | 2 +- Stream_support/include/CGAL/IO/OBJ.h | 2 +- .../include/CGAL/IO/OI/Inventor_ostream.h | 2 +- .../include/CGAL/IO/PLY/PLY_reader.h | 2 +- .../include/CGAL/IO/VRML/VRML_2_ostream.h | 2 +- .../doc/Surface_mesh/Surface_mesh.txt | 2 +- .../include/CGAL/Surface_mesh/IO/OFF.h | 8 +++---- .../include/CGAL/Surface_mesh/Surface_mesh.h | 6 ++--- .../vsa_class_interface_test.cpp | 2 +- .../vsa_correctness_test.cpp | 2 +- .../all_roi_assign_example.cpp | 4 ++-- .../all_roi_assign_example_Surface_mesh.cpp | 4 ++-- ...l_roi_assign_example_custom_polyhedron.cpp | 4 ++-- .../all_roi_assign_example_with_OpenMesh.cpp | 4 ++-- .../ARAP_parameterizer_3.h | 4 ++-- .../Fixed_border_parameterizer_3.h | 2 +- .../Iterative_authalic_parameterizer_3.h | 2 +- .../MVC_post_processor_3.h | 2 +- .../Orbifold_Tutte_parameterizer_3.h | 4 ++-- .../internal/orbifold_cone_helper.h | 2 +- .../measure_distortion.h | 2 +- .../internal/AABB_traversal_traits.h | 2 +- .../internal/Disk_samplers.h | 2 +- .../internal/Expectation_maximization.h | 4 ++-- .../internal/Filters.h | 2 +- .../internal/K_means_clustering.h | 2 +- .../internal/auxiliary/graph.h | 6 ++--- .../Surface_mesh_shortest_path.h | 22 +++++++++---------- .../EdgeCollapseSimplificationVisitor.h | 2 +- .../edge_collapse_OpenMesh.cpp | 2 +- .../edge_collapse_enriched_polyhedron.cpp | 2 +- .../edge_collapse_garland_heckbert.cpp | 2 +- .../edge_collapse_visitor_surface_mesh.cpp | 4 ++-- .../Edge_collapse/FastEnvelope_filter.h | 2 +- .../internal/Lindstrom_Turk_core.h | 2 +- .../internal/Edge_collapse.h | 14 ++++++------ .../test_edge_collapse_Envelope.cpp | 2 +- .../test_edge_collapse_Polyhedron_3.cpp | 2 +- .../mcf_scale_invariance.cpp | 2 +- .../Mean_curvature_flow_skeletonization.h | 4 ++-- .../path_homotopy_with_schema.cpp | 2 +- .../map_2_constructor.cpp | 2 +- .../shortest_noncontractible_cycle_2.cpp | 2 +- .../include/CGAL/Curves_on_surface_topology.h | 2 +- .../include/CGAL/Path_on_surface.h | 4 ++-- .../internal/Minimal_quadrangulation.h | 6 ++--- .../internal/Path_on_surface_with_rle.h | 12 +++++----- .../fundamental_group_of_the_circle.cpp | 2 +- .../fundamental_group_of_the_torus.cpp | 2 +- .../test/Surface_mesh_topology/path_tests.cpp | 2 +- .../path_with_rle_deformation_tests.cpp | 2 +- .../test_shortest_cycle_non_contractible.cpp | 2 +- .../CGAL/Complex_2_in_triangulation_3.h | 2 +- .../CGAL/Surface_mesh_traits_generator_3.h | 6 ++--- .../CGAL/Surface_mesher/Sphere_oracle_3.h | 2 +- .../CGAL/vtkSurfaceMesherContourFilter.h | 2 +- .../test/Surface_mesher/combined_spheres.cpp | 6 ++--- .../implicit_surface_mesher_test.cpp | 6 ++--- .../CGAL/No_intersection_surface_sweep_2.h | 6 ++--- .../include/CGAL/Surface_sweep_2.h | 10 ++++----- .../CGAL/Surface_sweep_2/Default_event.h | 4 ++-- .../CGAL/Surface_sweep_2/Default_event_base.h | 6 ++--- .../CGAL/Surface_sweep_2/Default_subcurve.h | 4 ++-- .../No_intersection_surface_sweep_2_impl.h | 4 ++-- .../CGAL/Surface_sweep_2/No_overlap_event.h | 4 ++-- .../Surface_sweep_2/No_overlap_event_base.h | 4 ++-- .../Surface_sweep_2/No_overlap_subcurve.h | 4 ++-- .../Surface_sweep_2/Surface_sweep_2_impl.h | 10 ++++----- .../Concepts/TriangulationDataStructure_2.h | 2 +- TDS_2/doc/TDS_2/TDS_2.txt | 2 +- .../CGAL/Triangulation_data_structure_2.h | 10 ++++----- .../include/CGAL/Triangulation_ds_vertex_2.h | 2 +- TDS_2/test/TDS_2/include/CGAL/_test_traits.h | 2 +- TDS_2/test/TDS_2/test_triangulation_tds.cpp | 2 +- TDS_3/doc/TDS_3/TriangulationDS_3.txt | 2 +- TDS_3/include/CGAL/Triangulation_utils_3.h | 2 +- .../include/CGAL/Testsuite/vc_debug_hook.h | 4 ++-- Testsuite/test/post_process_ctest_results.py | 2 +- .../Concepts/RemeshingTriangulationTraits_3.h | 2 +- .../Tetrahedral_remeshing/internal/FMLS.h | 10 ++++----- Three/doc/Three/Three.txt | 6 ++--- .../Three/Polyhedron_demo_plugin_interface.h | 2 +- Three/include/CGAL/Three/Scene_interface.h | 4 ++-- Three/include/CGAL/Three/Scene_item.h | 6 ++--- .../CGAL/Three/Scene_item_rendering_helper.h | 2 +- .../CGAL/Three/Scene_item_with_properties.h | 2 +- Three/include/CGAL/Three/Viewer_interface.h | 4 ++-- .../Triangulation/Td_vs_T2_and_T3.cpp | 2 +- .../CGAL/Triangulation_full_cell.h | 2 +- .../Triangulation/CGAL/Triangulation_vertex.h | 2 +- .../Concepts/TriangulationDataStructure.h | 8 +++---- .../examples/Triangulation/convex_hull.cpp | 2 +- .../include/CGAL/Delaunay_triangulation.h | 2 +- .../include/CGAL/Regular_triangulation.h | 2 +- .../test/Triangulation/test_delaunay.cpp | 2 +- Triangulation/test/Triangulation/test_tds.cpp | 2 +- .../test/Triangulation/test_torture.cpp | 2 +- .../test/Triangulation/test_triangulation.cpp | 2 +- Triangulation_2/TODO | 4 ++-- .../doc/Triangulation_2/Triangulation_2.txt | 2 +- .../Constrained_Delaunay_triangulation_2.h | 2 +- .../CGAL/Constrained_triangulation_2.h | 4 ++-- .../include/CGAL/Delaunay_triangulation_2.h | 4 ++-- .../include/CGAL/Triangulation_2.h | 8 +++---- .../internal/Constraint_hierarchy_2.h | 4 ++-- .../CGAL/_test_cls_const_triang_plus_2.h | 2 +- .../include/CGAL/_test_traits.h | 2 +- .../test_delaunay_triangulation_2.cpp | 2 +- Triangulation_3/TODO | 2 +- .../demo/Triangulation_3/Viewer.cpp | 8 +++---- .../CGAL/Delaunay_triangulation_cell_base_3.h | 2 +- ...angulation_cell_base_with_circumcenter_3.h | 2 +- ...n_cell_base_with_weighted_circumcenter_3.h | 4 ++-- .../doc/Triangulation_3/Triangulation_3.txt | 2 +- ...lel_insertion_and_removal_in_regular_3.cpp | 2 +- ..._weighted_circumcenter_filtered_traits_3.h | 16 +++++++------- .../include/CGAL/Triangulation_3.h | 2 +- .../CGAL/Triangulation_segment_traverser_3.h | 4 ++-- .../include/CGAL/_test_cls_delaunay_3.h | 4 ++-- .../CGAL/_test_cls_parallel_triangulation_3.h | 2 +- .../include/CGAL/_test_cls_triangulation_3.h | 2 +- .../test_dt_deterministic_3.cpp | 2 +- .../test/Triangulation_3/test_regular_3.cpp | 2 +- .../test_regular_insert_range_with_info.cpp | 6 ++--- .../Triangulation_on_sphere_2/CMakeLists.txt | 2 +- .../internal/get_precision_bounds.h | 2 +- .../simple_polygon_visibility_2.cpp | 4 ++-- .../CGAL/Simple_polygon_visibility_2.h | 6 ++--- .../CGAL/Triangular_expansion_visibility_2.h | 10 ++++----- .../Voronoi_diagram_2/Voronoi_diagram_2.txt | 2 +- Weights/include/CGAL/Weights/internal/utils.h | 4 ++-- 176 files changed, 334 insertions(+), 350 deletions(-) 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 6adcc5234c3..7164d7aa376 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 @@ -81,6 +81,6 @@ int main(int argc, char* argv[]) } } - std::cout << "Reconstructions are ready to be examinated in your favorite viewer" << std::endl; + std::cout << "Reconstructions are ready to be examined in your favorite viewer" << std::endl; return EXIT_SUCCESS; } diff --git a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h index 21a764c8f56..bb323648ee1 100644 --- a/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h +++ b/Scale_space_reconstruction_3/include/CGAL/Scale_space_reconstruction_3/Shape_construction_3.h @@ -117,7 +117,7 @@ public: /** Important note: Shape_construction_3 does not take responsibility for destroying * the object after use. * - * \tparam InputIterator an interator over the points. + * \tparam InputIterator an iterator over the points. * The iterator should point to a model of Point. * \param begin is an iterator to the first point of the shape. * \param end is a past-the-end iterator for the points. diff --git a/SearchStructures/include/CGAL/Range_tree_d.h b/SearchStructures/include/CGAL/Range_tree_d.h index 0a1cae56d43..385295ae978 100644 --- a/SearchStructures/include/CGAL/Range_tree_d.h +++ b/SearchStructures/include/CGAL/Range_tree_d.h @@ -27,7 +27,7 @@ // A d-dimensional Range Tree or a multilayer tree consisting of Range // and other trees that are derived public // Tree_base -// can be construced within this class. +// can be constructed within this class. // C_Data: container class which contains the d-dimensional data the tree holds. // C_Window: Query window -- a d-dimensional interval // C_Interface: Interface for the class with functions that allow to @@ -202,7 +202,7 @@ protected: // recursive function // (current,last) describe an interval of length n of sorted elements, // for this interval a tree is build containing these elements. - // the most left child is returend in prevchild. + // the most left child is returned in prevchild. template void build_range_tree(int n, link_type& leftchild, @@ -268,7 +268,7 @@ protected: } else { - // recursiv call for the construction. the interval is devided. + // recursiv call for the construction. the interval is divided. T sublevel_left, sublevel_right; build_range_tree(n - (int)n/2, leftchild, rightchild, prevchild, leftmostlink, current, last, diff --git a/SearchStructures/include/CGAL/Segment_tree_d.h b/SearchStructures/include/CGAL/Segment_tree_d.h index 732a9596f91..0755ad1312a 100644 --- a/SearchStructures/include/CGAL/Segment_tree_d.h +++ b/SearchStructures/include/CGAL/Segment_tree_d.h @@ -263,7 +263,7 @@ protected: } else { - // recursiv call for the construction. the interval is devided. + // recursiv call for the construction. the interval is divided. build_segment_tree(n - (int)n/2, leftchild, rightchild, prevchild, leftmostlink, index, last, keys); link_type vparent = new_Segment_tree_node_t diff --git a/SearchStructures/include/CGAL/Tree_base.h b/SearchStructures/include/CGAL/Tree_base.h index fd011f90a2f..77f020e7b11 100644 --- a/SearchStructures/include/CGAL/Tree_base.h +++ b/SearchStructures/include/CGAL/Tree_base.h @@ -131,7 +131,7 @@ public: // ------------------------------------------------------------------- // Tree Anchor: this class is used as a recursion anchor. // The derived tree classes can be nested. Use this class as the -// most inner class. This class is doing nothin exept stopping the recursion +// most inner class. This class is doing nothing except stopping the recursion template class Tree_anchor: public Tree_base< C_Data, C_Window> diff --git a/Segment_Delaunay_graph_2/TODO b/Segment_Delaunay_graph_2/TODO index 416e761e6c7..5aad7177a50 100644 --- a/Segment_Delaunay_graph_2/TODO +++ b/Segment_Delaunay_graph_2/TODO @@ -1,5 +1,5 @@ - For release: - * add example that demostrates how to get edge info + * add example that demonstrates how to get edge info * remove enumeration type Arrangement_type as an enum type and add small is_*() methods that query the type * add test suites for {insert,remove}_degree_2 in TDS_2 diff --git a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphHierarchyVertexBase_2.h b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphHierarchyVertexBase_2.h index 626239edae2..6b70d36fb87 100644 --- a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphHierarchyVertexBase_2.h +++ b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Concepts/SegmentDelaunayGraphHierarchyVertexBase_2.h @@ -6,10 +6,10 @@ The vertex of a segment Delaunay graph included in a segment Delaunay graph hierarchy has to provide some pointers to the corresponding vertices in the -graphs of the next and preceeding levels. +graphs of the next and preceding levels. Therefore, the concept `SegmentDelaunayGraphHierarchyVertexBase_2` refines the concept `SegmentDelaunayGraphVertexBase_2`, by -adding two vertex handles to the correponding vertices for the +adding two vertex handles to the corresponding vertices for the next and previous level graphs. \cgalRefines `SegmentDelaunayGraphVertexBase_2` diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h index 43c1ca7b1ef..88d634e0324 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2_impl.h @@ -2118,9 +2118,9 @@ remove_degree_d_vertex(const Vertex_handle& v) // here we find a site in the small diagram that serves as a // starting point for finding all conflicts. // To do that we find the nearest neighbor of t if t is a point; - // t is guarranteed to have a conflict with its nearest neighbor + // t is guaranteed to have a conflict with its nearest neighbor // If t is a segment, then one endpoint of t is enough; t is - // guarranteed to have a conflict with the Voronoi edges around + // guaranteed to have a conflict with the Voronoi edges around // this endpoint if ( t.is_point() ) { vn = sdg_small.nearest_neighbor( t.point() ); @@ -2876,7 +2876,7 @@ copy(Segment_Delaunay_graph_2& other, Handle_map& hm) // then copy the diagram DG::operator=(other); - // now we have to update the sotrage sites in each vertex of the + // now we have to update the storage sites in each vertex of the // diagram and also update the // then update the storage sites for each vertex @@ -3127,7 +3127,7 @@ Segment_Delaunay_graph_2:: file_output(std::ostream& os, Point_handle_mapper& P, bool print_point_container) const { - // ouput to a file + // output to a file size_type n = this->_tds.number_of_vertices(); size_type m = this->_tds.number_of_full_dim_faces(); diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h index 6f304df41b4..92f4f646845 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_ring_C2.h @@ -1502,7 +1502,7 @@ private: vertex_t v_type; - // index that indicates the refence point for the case PPS + // index that indicates the reference point for the case PPS short pps_idx; // the case ppp diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h index 32200fe8c45..436e7f1786c 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2/Voronoi_vertex_sqrt_field_C2.h @@ -1260,7 +1260,7 @@ private: vertex_t v_type; - // index that indicates the refence point for the case PPS + // index that indicates the reference point for the case PPS short pps_idx; FT ux, uy, uz; diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h index e518a044550..7f126709867 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Basic_predicates_C2.h @@ -1010,7 +1010,7 @@ public: // with the ray starting from corner and going to the // direction of the center of the infinite box - // corner has homogenuous coordinates cx, cy, cw + // corner has homogeneous coordinates cx, cy, cw RT cx, cy, cw; compute_intersection_of_lines(lhor, lver, cx, cy, cw); diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h index a54257f481e..133f8675f42 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Bisector_Linf.h @@ -200,7 +200,7 @@ private: else { Oriented_side side = lseg.oriented_side(pnt); - // point pp sould not lie on the supporting line of q + // point pp should not lie on the supporting line of q CGAL_assertion(! (side == ON_ORIENTED_BOUNDARY)); Point_2 points[3]; @@ -298,7 +298,7 @@ private: && lseg.has_on_negative_side(pnt)) ) { // pcfirst is center of square, // pfirst = phor, upward direction - // pclast is center of sqaure, plast = pver, left direction + // pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -321,7 +321,7 @@ private: && lseg.has_on_negative_side(pnt)) ) { // pcfirst is center of square, // pfirst = pver, right direction - // pclast is center of sqaure, plast = phor, upward dir + // pclast is center of square, plast = phor, upward dir pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h index b356e9e0d27..5730782ee6d 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h @@ -341,7 +341,7 @@ public: && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square, //pfirst = phor, upward direction - //pclast is center of sqaure, plast = pver, left direction + //pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -363,7 +363,7 @@ public: && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square, //pfirst = pver, right direction - //pclast is center of sqaure, plast = phor, upward direction + //pclast is center of square, plast = phor, upward direction pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), @@ -637,7 +637,7 @@ public: || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square , pfirst = phor, upward direction - //pclast is center of sqaure, plast = pver, left direction + //pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -658,7 +658,7 @@ public: || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square , pfirst = pver, right direction - //pclast is center of sqaure, plast = phor, upward direction + //pclast is center of square, plast = phor, upward direction pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), @@ -947,7 +947,7 @@ public: Point_2 pnt = (p.is_point()) ? p.point() : q.point(); Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment(); Site_2 siteseg = (p.is_point()) ? q : p; - // lseg is the suporting line of the segment site + // lseg is the supporting line of the segment site Line_2 lseg = siteseg.supporting_site().segment().supporting_line(); // segment site is horizontal if (lseg.is_horizontal()) { @@ -1104,7 +1104,7 @@ public: || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square, pfirst = phor, upward direction - //pclast is center of sqaure, plast = pver, left direction + //pclast is center of square, plast = pver, left direction pcfirst = Point_2(pmid_pfirst_pnt.x(), pmid_pfirst_pnt.y()+seglenhalffirst); pclast = Point_2(pmid_plast_pnt.x()-seglenhalflast, @@ -1125,7 +1125,7 @@ public: || (compare_x_2(seg.source(),seg.target()) == LARGER && lseg.has_on_negative_side(pnt)) ) { //pcfirst is center of square , pfirst = pver, right direction - //pclast is center of sqaure, plast = phor, upward direction + //pclast is center of square, plast = phor, upward direction pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst, pmid_pfirst_pnt.y()); pclast = Point_2(pmid_plast_pnt.x(), diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h index 2140ad749a9..cf35f9476c8 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Voronoi_vertex_ring_C2.h @@ -3937,7 +3937,7 @@ private: vertex_t v_type; - // index that indicates the refence point for the case PPS + // index that indicates the reference point for the case PPS short pps_idx; // philaris: different types are not needed any more diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp b/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp index 0c616b34635..f6661d3ca81 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp @@ -40,7 +40,7 @@ int main(int argc, char* argv[]) auto res = casting::is_pullout_direction(polygon, e_it, d); std::cout << "The polygon is " << (res ? "" : "not ") << "castable using edge " - << index << " in vartical translation (" << d << ")" << std::endl; + << index << " in vertical translation (" << d << ")" << std::endl; } diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h index b545c91acaa..a521d29ed2b 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/is_pullout_direction.h @@ -151,7 +151,7 @@ is_pullout_direction(const CGAL::Polygon_2& pgn, segment_outer_circle.second, segment_outer_circle.first); if (!isordered) { - // unlikely, this if must be true atleast once for any polygon - add ref + // unlikely, this if must be true at least once for any polygon - add ref // to paper if (top_edge== pgn.edges_end()) top_edge=e_it; else return pgn.edges_end(); diff --git a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h index 8c0a4a80baa..7073c0392fc 100644 --- a/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h +++ b/Set_movable_separability_2/include/CGAL/Set_movable_separability_2/Single_mold_translational_casting/pullout_directions.h @@ -32,7 +32,7 @@ namespace Single_mold_translational_casting { * intersection in [firstClockwise,secondClockwise]. * When a new semicircle appear the possible cases are as such: * (let f:=firstClockwise, s:=secondClockwise, a:=newSemicircleFirstClockwise , b:=newSemicircleSecondClockwise) - * REMEBER THAT THIS ARE SEGMENTS ON A CIRCLE! NOT ON A LINE! + * REMEMBER THAT THIS ARE SEGMENTS ON A CIRCLE! NOT ON A LINE! * 1. [f,s] contained in [a,b] * f s * f s * f s * f s * a b * a b * a b * a b @@ -61,7 +61,7 @@ namespace Single_mold_translational_casting { * f s * f s * a b * b a * __________________* __________________ - * THIS CASE CANT HAPPEN!! [a,b] is an semicircle, and (f,s) is a semicircle or less + * THIS CASE CAN'T HAPPEN!! [a,b] is a semicircle, and (f,s) is a semicircle or less */ template std::pair, -// Waqar Khan - -#ifndef CGAL_SNAP_ROUNDING_KD_2_H -#define CGAL_SNAP_ROUNDING_KD_2_H - -#include +include #include @@ -411,7 +395,7 @@ public: int * kd_counter = new int[number_of_trees]; std::size_t number_of_segments = seg_list.size(); - // auxilary directions + // auxiliary directions Direction_list directions; double buffer_angle; Line_2 li; diff --git a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp index 766b41c77fc..5dd61bbfb52 100644 --- a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp +++ b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp @@ -97,7 +97,7 @@ namespace nanoflann { CountType i; for (i=count; i>0; --i) { -#ifdef NANOFLANN_FIRST_MATCH // If defined and two poins have the same distance, the one with the lowest-index will be returned first. +#ifdef NANOFLANN_FIRST_MATCH // If defined and two points have the same distance, the one with the lowest-index will be returned first. if ( (dists[i-1]>dist) || ((dist==dists[i-1])&&(indices[i-1]>index)) ) { #else if (dists[i-1]>dist) { @@ -577,7 +577,7 @@ namespace nanoflann // ---------------- CArray ------------------------- /** A STL container (as wrapper) for arrays of constant size defined at compile time (class imported from the MRPT project) - * This code is an adapted version from Boost, modifed for its integration + * This code is an adapted version from Boost, modified for its integration * within MRPT (JLBC, Dec/2009) (Renamed array -> CArray to avoid possible potential conflicts). * See * http://www.josuttis.com/cppcode diff --git a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt index 6d2cc43b974..b935e352414 100644 --- a/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt +++ b/Spatial_searching/doc/Spatial_searching/Spatial_searching.txt @@ -109,7 +109,7 @@ Orthogonal distance computation technique \cgalFigureEnd Assume we are searching the nearest neighbor, descending the kd-tree, with \f$ R_{p} \f$ -as the parent rectangle and \f$ R_{lo} \f$ and \f$ R_{hi}\f$ as its childs in the current step. +as the parent rectangle and \f$ R_{lo} \f$ and \f$ R_{hi}\f$ as its children in the current step. Further assume \f$ R_{lo} \f$ is closer to query point \f$q\f$. Let \f$cd\f$ denote the cutting dimension and let \f$cv\f$ denote the cutting value. At this point we already know the distance \f$rd_{p}\f$ to the parent rectangle and need to check if \f$R_{hi}\f$ could contain @@ -159,7 +159,7 @@ When using fuzzy items, queries are reported as follows: - Points that are within the inner approximation are always reported. - Points that are within the outer approximation but not within the inner approximation might or might not be reported. -- Points thare not within the outer approximation are never reported. +- Points that are not within the outer approximation are never reported. For exact range searching the fuzziness parameter \f$ \epsilon\f$ is set to zero. diff --git a/Spatial_searching/examples/Spatial_searching/circular_query.cpp b/Spatial_searching/examples/Spatial_searching/circular_query.cpp index 1d0d57349c9..419629e8e42 100644 --- a/Spatial_searching/examples/Spatial_searching/circular_query.cpp +++ b/Spatial_searching/examples/Spatial_searching/circular_query.cpp @@ -37,7 +37,7 @@ int main() // approximate range searching using value 0.4 for fuzziness parameter - // We do not write into a list but directly in the outpout stream + // We do not write into a list but directly in the output stream std::cout << "The points in the fuzzy circle centered at (0., 0.) "; std::cout << "with fuzzy radius (0.1, 0.9) are: " << std::endl; diff --git a/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp index 21a36102f39..a8ecbd13a50 100644 --- a/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp +++ b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp @@ -33,7 +33,7 @@ int main() Point_d q(0.7, 0.7); // Searching an exact range - // using default value 0.0 for epsilon fuzziness paramater + // using default value 0.0 for epsilon fuzziness parameter Fuzzy_iso_box exact_range(p,q); tree.search( std::back_inserter( result ), exact_range); std::cout << "The points in the box [0.2, 0.7]^2 are: " << std::endl; @@ -43,7 +43,7 @@ int main() result.clear(); // Searching a fuzzy range - // using value 0.1 for fuzziness paramater + // using value 0.1 for fuzziness parameter Fuzzy_iso_box approximate_range(p, q, 0.1); tree.search(std::back_inserter( result ), approximate_range); std::cout << "The points in the fuzzy box [[0.1, 0.3], [0.6, 0.9]]^2 are: " << std::endl; diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp index 51d5b24f417..3f08f1278a4 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_with_circular_query.cpp @@ -39,7 +39,7 @@ int main() std::list result; tree.search(std::back_inserter(result), default_range); - std::cout << "\nPoints in cirle with center " << center << " and radius 0.2" << std::endl; + std::cout << "\nPoints in circle with center " << center << " and radius 0.2" << std::endl; std::list::iterator it; for (it=result.begin(); (it != result.end()); ++it) @@ -51,7 +51,7 @@ int main() tree.search(std::back_inserter( result ), approximate_range); - std::cout << "\n\nPoints in cirle with center " << center << " and fuzzy radius [0.1,0.3]" << std::endl; + std::cout << "\n\nPoints in circle with center " << center << " and fuzzy radius [0.1,0.3]" << std::endl; for (it=result.begin(); (it != result.end()); ++it) std::cout << *it << std::endl; diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 239d3a2b290..b0958bc44ee 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -175,7 +175,7 @@ private: #endif } - // TODO: Similiar to the leaf_init function above, a part of the code should be + // TODO: Similar to the leaf_init function above, a part of the code should be // moved to a the class Kd_tree_node. // It is not proper yet, but the goal was to see if there is // a potential performance gain through the Compact_container diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index faa51c87042..8e640a798a0 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -401,7 +401,7 @@ namespace CGAL { next_neighbour_found = search_in_leaf(node, dummy, false); } } // next_neighbour_found or priority queue is empty - // in the latter case also the item priority quee is empty + // in the latter case also the item priority queue is empty } @@ -465,7 +465,7 @@ namespace CGAL { next_neighbour_found = search_in_leaf(node, dummy, true); } } // next_neighbour_found or priority queue is empty - // in the latter case also the item priority quee is empty + // in the latter case also the item priority queue is empty } }; // class Iterator_implementaion diff --git a/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp b/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp index a3cd8075d36..cf7b2c829f3 100644 --- a/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp +++ b/Spatial_searching/test/Spatial_searching/Orthogonal_k_neighbor_search.cpp @@ -14,7 +14,7 @@ typedef CGAL::Random_points_in_square_2 Random_p typedef CGAL::Counting_iterator N_Random_points_iterator; typedef CGAL::Search_traits_2 TreeTraits; typedef CGAL::Orthogonal_k_neighbor_search Neighbor_search; -//typdefs fo Point_with_info +//typdefs of Point_with_info typedef Point_with_info_helper::type Point_with_info; typedef Point_property_map Ppmap; typedef CGAL::Search_traits_adapter Traits_with_info; diff --git a/Spatial_searching/test/Spatial_searching/Range_searching.cpp b/Spatial_searching/test/Spatial_searching/Range_searching.cpp index 94b0e5bf8d8..62c0aac2e20 100644 --- a/Spatial_searching/test/Spatial_searching/Range_searching.cpp +++ b/Spatial_searching/test/Spatial_searching/Range_searching.cpp @@ -71,7 +71,7 @@ void run(std::list all_points) tree.search(std::back_inserter( result ), approximate_range); // test the results of the approximate query for (typename std::list::iterator pt=result.begin(); (pt != result.end()); ++pt) { - // a point we found may be slighlty outside the isocuboid + // a point we found may be slightly outside the isocuboid assert(! outer_ic.has_on_unbounded_side(get_point(*pt))); all_points.remove(get_point(*pt)); } diff --git a/Spatial_searching/test/Spatial_searching/iso_rectangle_2_query_2.cpp b/Spatial_searching/test/Spatial_searching/iso_rectangle_2_query_2.cpp index 7cf4213c15d..978791512a2 100644 --- a/Spatial_searching/test/Spatial_searching/iso_rectangle_2_query_2.cpp +++ b/Spatial_searching/test/Spatial_searching/iso_rectangle_2_query_2.cpp @@ -59,7 +59,7 @@ main() { result.clear(); // Searching a fuzzy range - // using value 0.1 for fuzziness paramater + // using value 0.1 for fuzziness parameter Fuzzy_iso_box approximate_range(p, q, 0.1); tree.search(std::back_inserter( result ), approximate_range); std::cout << "The points in the fuzzy box [<0.1-0.3>,<0.6-0.9>]x[<0.1-0.3>,<0.6-0.9>] are: " diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Trisegment_2.h b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Trisegment_2.h index 03b713a4195..32417257da7 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Trisegment_2.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/CGAL/Trisegment_2.h @@ -3,8 +3,8 @@ namespace CGAL { /*! \ingroup PkgStraightSkeleton2Classes -A straight skeleton event is the simultaneous collision of three offseted oriented straight line segments -`e0*`,`e1*`,`e2*` (`e*` denotes an _offseted_ edge). +A straight skeleton event is the simultaneous collision of three offsetted oriented straight line segments +`e0*`,`e1*`,`e2*` (`e*` denotes an _offsetted_ edge). This record stores the segments corresponding to the INPUT edges `(e0,e1,e2)` whose offsets intersect at the event along with their collinearity. diff --git a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilder_2_Visitor.h b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilder_2_Visitor.h index a59bbdf0a7e..bc924744809 100644 --- a/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilder_2_Visitor.h +++ b/Straight_skeleton_2/doc/Straight_skeleton_2/Concepts/StraightSkeletonBuilder_2_Visitor.h @@ -73,7 +73,7 @@ Called after all initial events have been discovered. void on_initialization_finished() const; /*! -Called before the propagation stage (when events are poped off the queue and processed) +Called before the propagation stage (when events are popped off the queue and processed) is started. */ void on_propagation_started() const; diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp b/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp index 8ed3cf49c1b..798228788ba 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/Low_level_API.cpp @@ -58,7 +58,7 @@ int main() // Since the package doesn't support that operation directly, we use the following trick: // (1) Place the polygon as a hole of a big outer frame. // (2) Construct the skeleton on the interior of that frame (with the polygon as a hole) - // (3) Construc the offset contours + // (3) Construct the offset contours // (4) Identify the offset contour that corresponds to the frame and remove it from the result diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index c2abf5e77ca..1268f414121 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -70,7 +70,7 @@ template void Straight_skeleton_builder_2::InsertEventInPQ( EventPtr aEvent ) { mPQ.push(aEvent); - CGAL_STSKEL_BUILDER_TRACE(4, "Enque: " << *aEvent); + CGAL_STSKEL_BUILDER_TRACE(4, "Enqueue: " << *aEvent); } template @@ -318,10 +318,10 @@ void Straight_skeleton_builder_2::CollectNewEvents( Vertex_handle aNode // // An 'Event' is the collision of 2 wavefronts. // Each event changes the topology of the shrinking polygon; that is, at the event, the current polygon differs from the - // inmediately previous polygon in the number of vertices. + // immediately previous polygon in the number of vertices. // // If 2 vertex wavefronts sharing a common edge collide, the event is called an edge event. At the time of the event, the current - // polygon doex not have the common edge anynmore, and the two vertices become one. This new 'skeleton' vertex generates a new + // polygon doex not have the common edge anymore, and the two vertices become one. This new 'skeleton' vertex generates a new // vertex wavefront which can further collide with other wavefronts, producing for instance, more edge events. // // If a refex vertex wavefront collide with an edge wavefront, the event is called a split event. At the time of the event, the current @@ -367,7 +367,7 @@ void Straight_skeleton_builder_2::CollectNewEvents( Vertex_handle aNode // Handles the special case of two simultaneous edge events, that is, two edges // collapsing along the line/point were they meet at the same time. -// This ocurrs when the bisector emerging from vertex 'aA' is defined by the same pair of +// This occurs when the bisector emerging from vertex 'aA' is defined by the same pair of // contour edges as the bisector emerging from vertex 'aB' (but in opposite order). // template @@ -1001,7 +1001,7 @@ bool Straight_skeleton_builder_2::IsValidEdgeEvent( EdgeEvent const& aE } else { - // Triangle collapse. No need to test explicitely. + // Triangle collapse. No need to test explicitly. rResult = true ; } return rResult ; @@ -1145,7 +1145,7 @@ void Straight_skeleton_builder_2::HandleSplitEvent( EventPtr aEvent, Ve CGAL_assertion(lOppIBisector_L->prev() == lOppOBisector_R ) ; CGAL_assertion(lOppFicNode->has_infinite_time()); - CGAL_STSKEL_BUILDER_TRACE(2,"Splitted face: N" << lOppR->id() + CGAL_STSKEL_BUILDER_TRACE(2,"Split face: N" << lOppR->id() << "->B" << lOppOBisector_R->id() << "->N" << lOppFicNode->id() << "->B" << lOppIBisector_L->id() @@ -1892,7 +1892,7 @@ template bool Straight_skeleton_builder_2::MergeCoincidentNodes() { // - // NOTE: This code might be executed on a topologically incosistent HDS, thus the need to check + // NOTE: This code might be executed on a topologically inconsistent HDS, thus the need to check // the structure along the way. // @@ -1902,16 +1902,16 @@ bool Straight_skeleton_builder_2::MergeCoincidentNodes() // // While circulating the bisectors along the face for edge Ei we find all those edges E* which // are or become consecutive to Ei during the wavefront propagation. Each bisector along the face: - // (Ei,Ea), (Ei,Eb), (Ei,Ec), etcc pairs Ei with such other edge. + // (Ei,Ea), (Ei,Eb), (Ei,Ec), etc pairs Ei with such other edge. // Between one bisector (Ei,Ea) and the next (Ei,Eb) there is skeleton node which represents // the collision between the 3 edges (Ei,Ea,Eb). - // It follows from the pairing that any skeleton node Ni, for example (Ei,Ea,Eb), neccesarily + // It follows from the pairing that any skeleton node Ni, for example (Ei,Ea,Eb), necessarily // shares two edges (Ei and Eb precisely) with any next skeleton node Ni+1 around the face. // That is, the triedge of defining edges that correspond to each skeleton node around the face follow this // sequence: (Ei,Ea,Eb), (Ei,Eb,Ec), (Ei,Ec,Ed), ... // // Any 2_ consecutive_ skeleton nodes around a face share 2 out of the 3 defining edges, which is one of the - // neccesary conditions for "coincidence". Therefore, coincident nodes can only come as consecutive along a face + // necessary conditions for "coincidence". Therefore, coincident nodes can only come as consecutive along a face // MultinodeVector lMultinodes ; @@ -2023,7 +2023,7 @@ bool Straight_skeleton_builder_2::FinishUp() // MergeCoincidentNodes() locks all extremities of halfedges that have a vertex involved in a multinode. // However, both extremities might have different (combinatorially and geometrically) vertices. // With a single pass, it would prevent one of the extremities from being properly simplified. - // The simpliest is to just run it again as the skeleton structure is small compared to the rest + // The simplest is to just run it again as the skeleton structure is small compared to the rest // of the algorithm. for(;;) { diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h index 6939ad21b72..86d167f1ccd 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h @@ -482,7 +482,7 @@ struct Get_protector // -// This macro defines a global functor adapter which allows users to use it in the followig ways: +// This macro defines a global functor adapter which allows users to use it in the following ways: // // Given a 'Functor' provided by a given 'Traits' (or Kernel): // diff --git a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h index ea8ea6cb087..92ae1164ec2 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h @@ -364,7 +364,7 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // -// Given 3 oriented straight line segments: e0, e1, e2 and the corresponding offseted segments: e0*, e1* and e2*, +// Given 3 oriented straight line segments: e0, e1, e2 and the corresponding offsetted segments: e0*, e1* and e2*, // returns the point of the left or right seed (offset vertex) (e0*,e1*) or (e1*,e2*) // // If the current event (defined by e0,e1,e2) is a propagated event, that is, it follows from a previous event, @@ -375,7 +375,7 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // That trisegment is exactly the trisegment tree that defined the previous event which produced the skeleton node // (so the trisegment tree is basically a lazy representation of the seed point). // -// If a seed is a contour vertex, its point is then simply the target endoint of e0 or e1 (for the left/right seed). +// If a seed is a contour vertex, its point is then simply the target endpoint of e0 or e1 (for the left/right seed). // // This method returns the specified seed point (left or right) // @@ -385,9 +385,9 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // If you ask for the right child point for a trisegment tree corresponding to a split event you will just get e1.target() // which is nonsensical for a non initial split event. // -// NOTE: There is an abnormal collinearity case which ocurrs when e0 and e2 are collinear. +// NOTE: There is an abnormal collinearity case which occurs when e0 and e2 are collinear. // In this case, these lines do not correspond to an offset vertex (because e0* and e2* are never consecutive before the event), -// so the degenerate seed is neither the left or the right seed. In this case, the SEED ID for the degenerate pseudo seed is UNKOWN. +// so the degenerate seed is neither the left or the right seed. In this case, the SEED ID for the degenerate pseudo seed is UNKNOWN. // If you request the point of such degenerate pseudo seed the oriented midpoint bettwen e0 and e2 is returned. // template @@ -438,7 +438,7 @@ compute_degenerate_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 boost::optional< Rational< typename K::FT > > @@ -560,7 +560,7 @@ compute_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 boost::optional< Point_2 > diff --git a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h index 082968ba60d..d1c1b02a8cf 100644 --- a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h @@ -363,12 +363,12 @@ is_edge_facing_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2input/output (I/O) streams of data, which enables reading and writing to and from files, the console, or other custom structures. diff --git a/Stream_support/include/CGAL/IO/OBJ.h b/Stream_support/include/CGAL/IO/OBJ.h index 4e1a5c95a00..32f783eeeee 100644 --- a/Stream_support/include/CGAL/IO/OBJ.h +++ b/Stream_support/include/CGAL/IO/OBJ.h @@ -140,7 +140,7 @@ bool read_OBJ(std::istream& is, s == "scrv" || s == "sp" || s == "end" || s == "con" || s == "surf_1" || s == "q0_1" || s == "q1_1" || s == "curv2d_1" || s == "surf_2" || s == "q0_2" || s == "q1_2" || s == "curv2d_2" || - // supersed statements + // superseded statements s == "bsp" || s == "bzp" || s == "cdc" || s == "cdp" || s == "res") { // valid, but unsupported diff --git a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h index 45324fb7c7a..94c2f8b5787 100644 --- a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h +++ b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h @@ -61,7 +61,7 @@ public: { // The behaviour if m_os == nullptr could be changed to return // cerr or a file handle to /dev/null. The latter one would - // mimick the behaviour that one can still use a stream with + // mimic the behaviour that one can still use a stream with // an invalid stream, but without producing any output. CGAL_assertion( m_os != nullptr ); return *m_os; diff --git a/Stream_support/include/CGAL/IO/PLY/PLY_reader.h b/Stream_support/include/CGAL/IO/PLY/PLY_reader.h index 17251cc43a1..ddbb1835054 100644 --- a/Stream_support/include/CGAL/IO/PLY/PLY_reader.h +++ b/Stream_support/include/CGAL/IO/PLY/PLY_reader.h @@ -156,7 +156,7 @@ public: // The two following functions prevent the stream to only extract // ONE character (= what the types char imply) by requiring - // explicitely an integer object when reading the stream + // explicitly an integer object when reading the stream void read_ascii(std::istream& stream, char& c) const { short s; diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index d664810e8ee..23d94c3f9d5 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -57,7 +57,7 @@ public: { // The behaviour if m_os == nullptr could be changed to return // cerr or a file handle to /dev/null. The latter one would - // mimick the behaviour that one can still use a stream with + // mimic the behaviour that one can still use a stream with // an invalid stream, but without producing any output. CGAL_assertion( m_os != nullptr ); return *m_os; diff --git a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt index 9890f1c64d5..68ffffa3ee8 100644 --- a/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt +++ b/Surface_mesh/doc/Surface_mesh/Surface_mesh.txt @@ -367,7 +367,7 @@ associated with the surface mesh. Note however that by garbage collecting elements get new indices. In case you keep vertex descriptors they are most probably no longer -refering to the right vertices. +referring to the right vertices. \subsection SubsectionSurfaceMeshMemoryManagementExample Example \cgalExample{Surface_mesh/sm_memory.cpp} diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h index d422ad55b3f..fced570172d 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h @@ -286,7 +286,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating normals to the vertices of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Vertex_index` /// as key type and a 3D vector type issued from the same kernel as `Point` as value type} -/// \cgalParamDefault{If this parameter is unsused, vertex normals (if they exist) +/// \cgalParamDefault{If this parameter is unused, vertex normals (if they exist) /// will be written in an internal property map called `v:normal`.} /// \cgalParamNEnd /// @@ -294,7 +294,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating colors to the vertices of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Vertex_index` /// as key type and `CGAL::IO::Color` as value type} -/// \cgalParamDefault{If this parameter is unsused, vertex colors (if they exist) +/// \cgalParamDefault{If this parameter is unused, vertex colors (if they exist) /// will be written in an internal property map called `v:color`.} /// \cgalParamNEnd /// @@ -302,7 +302,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating textures to the vertices of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Vertex_index` /// as key type and a 2D vector type issued from the same kernel as `Point` as value type} -/// \cgalParamDefault{If this parameter is unsused, vertex textures (if they exist) +/// \cgalParamDefault{If this parameter is unused, vertex textures (if they exist) /// will be written in an internal property map called `v:texcoords`.} /// \cgalParamNEnd /// @@ -310,7 +310,7 @@ bool read_OFF_with_or_without_vnormals(std::istream& is, /// \cgalParamDescription{a property map associating colors to the faces of `sm`} /// \cgalParamType{a class model of `WritablePropertyMap` with `Surface_mesh::Face_index` /// as key type and `CGAL::IO::Color` as value type} -/// \cgalParamDefault{If this parameter is unsused, face colors (if they exist) +/// \cgalParamDefault{If this parameter is unused, face colors (if they exist) /// will be written in an internal property map called `f:color`.} /// \cgalParamNEnd /// \cgalNamedParamsEnd diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 5191f3b1397..3e3194e4f19 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -1327,7 +1327,7 @@ public: /// Note however that by garbage collecting elements get new indices. /// In case you store indices in an auxiliary data structure /// or in a property these indices are potentially no longer - /// refering to the right elements. + /// referring to the right elements. /// When adding elements, by default elements that are marked as removed /// are recycled. @@ -1395,7 +1395,7 @@ public: /// \attention By garbage collecting elements get new indices. /// In case you store indices in an auxiliary data structure /// or in a property these indices are potentially no longer - /// refering to the right elements. + /// referring to the right elements. void collect_garbage(); //undocumented convenience function that allows to get old-index->new-index information @@ -2248,7 +2248,7 @@ private: //------------------------------------------------------- private data /// \relates Surface_mesh /// Inserts `other` into `sm`. /// Shifts the indices of vertices of `other` by `sm.number_of_vertices() + sm.number_of_removed_vertices()` - /// and analoguously for halfedges, edges, and faces. + /// and analogously for halfedges, edges, and faces. /// Copies entries of all property maps which have the same name in `sm` and `other`. /// that is, property maps which are only in `other` are ignored. /// Also copies elements which are marked as removed, and concatenates the freelists of `sm` and `other`. diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp index 19714d0b9f0..5b7b2f370eb 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_class_interface_test.cpp @@ -92,7 +92,7 @@ int main() // split proxy 0 into 2 proxies // precondition: proxy 0 should have more than 2 faces - std::cout << "spliting" << std::endl; + std::cout << "splitting" << std::endl; if (!approx.split(0, 2, 10)) return EXIT_FAILURE; if (approx.number_of_proxies() != 17) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp index f30944b1ed0..40e6885e5ec 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/vsa_correctness_test.cpp @@ -113,7 +113,7 @@ int main() mesh_cube2.collect_garbage(); // the second parameter of operator+= should not have garbage, or merge will crash mesh_merged += mesh_cube2; - std::cout << "Mege done \n#F " + std::cout << "Merge done \n#F " << std::distance(faces(mesh_merged).first, faces(mesh_merged).second) << "\n#V " << std::distance(vertices(mesh_merged).first, vertices(mesh_merged).second) << std::endl; diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example.cpp b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example.cpp index 343e8617319..5f429231d84 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example.cpp +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example.cpp @@ -51,7 +51,7 @@ int main() return 1; } - // Use set_target_position() to set the constained position + // Use set_target_position() to set the constrained position // of control_1. control_2 remains at the last assigned positions Surface_mesh_deformation::Point constrained_pos_1(-0.35, 0.40, 0.60); deform_mesh.set_target_position(control_1, constrained_pos_1); @@ -61,7 +61,7 @@ int main() // The function deform() can be called several times if the convergence has not been reached yet deform_mesh.deform(); - // Set the constained position of control_2 + // Set the constrained position of control_2 Surface_mesh_deformation::Point constrained_pos_2(0.55, -0.30, 0.70); deform_mesh.set_target_position(control_2, constrained_pos_2); diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp index 2a420d245f4..fe91ed58baf 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_Surface_mesh.cpp @@ -47,7 +47,7 @@ int main(int argc, char** argv) return 1; } - // Use set_target_position() to set the constained position + // Use set_target_position() to set the constrained position // of control_1. control_2 remains at the last assigned positions Surface_mesh_deformation::Point constrained_pos_1(-0.35, 0.40, 0.60); deform_mesh.set_target_position(control_1, constrained_pos_1); @@ -57,7 +57,7 @@ int main(int argc, char** argv) // The function deform() can be called several times if the convergence has not been reached yet deform_mesh.deform(); - // Set the constained position of control_2 + // Set the constrained position of control_2 Surface_mesh_deformation::Point constrained_pos_2(0.55, -0.30, 0.70); deform_mesh.set_target_position(control_2, constrained_pos_2); diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp index 8b7a64c3289..74590db427b 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_custom_polyhedron.cpp @@ -112,7 +112,7 @@ int main() return 1; } - // Use set_target_position() to set the constained position + // Use set_target_position() to set the constrained position // of control_1. control_2 remains at the last assigned positions Surface_mesh_deformation::Point constrained_pos_1(-0.35, 0.40, 0.60); deform_mesh.set_target_position(control_1, constrained_pos_1); @@ -122,7 +122,7 @@ int main() // The function deform() can be called several times if the convergence has not been reached yet deform_mesh.deform(); - // Set the constained position of control_2 + // Set the constrained position of control_2 Surface_mesh_deformation::Point constrained_pos_2(0.55, -0.30, 0.70); deform_mesh.set_target_position(control_2, constrained_pos_2); diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp index 2fe39c0de23..88ad5c127df 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/all_roi_assign_example_with_OpenMesh.cpp @@ -42,7 +42,7 @@ int main() return 1; } - // Use set_target_position() to set the constained position + // Use set_target_position() to set the constrained position // of control_1. control_2 remains at the last assigned positions Surface_mesh_deformation::Point constrained_pos_1(-0.35, 0.40, 0.60); deform_mesh.set_target_position(control_1, constrained_pos_1); @@ -52,7 +52,7 @@ int main() // The function deform() can be called several times if the convergence has not been reached yet deform_mesh.deform(); - // Set the constained position of control_2 + // Set the constrained position of control_2 Surface_mesh_deformation::Point constrained_pos_2(0.55, -0.30, 0.70); deform_mesh.set_target_position(control_2, constrained_pos_2); diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index 65bd6659902..ee523ae7d77 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h @@ -504,7 +504,7 @@ private: // - compute w_ii = - sum of w_ijs. // // \pre Vertices must be indexed. - // \pre Vertex i musn't be already parameterized. + // \pre Vertex i mustn't be already parameterized. // \pre Line i of A must contain only zeros. template Error_code fill_linear_system_matrix(Matrix& A, @@ -1016,7 +1016,7 @@ private: // - call compute_b_ij() for each neighbor v_j to compute the B coefficient b_i // // \pre Vertices must be indexed. - // \pre Vertex i musn't be already parameterized. + // \pre Vertex i mustn't be already parameterized. // \pre Lines i of Bu and Bv must be zero. template Error_code fill_linear_system_rhs(const Triangle_mesh& mesh, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h index 44f86383d32..3bf9f7f8f91 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h @@ -361,7 +361,7 @@ protected: /// - compute w_ii = - sum of w_ijs. /// /// \pre Vertices must be indexed. - /// \pre Vertex i musn't be already parameterized. + /// \pre Vertex i mustn't be already parameterized. /// \pre Line i of A must contain only zeros. // TODO: check if this must be virtual // virtual diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index 24cf892b964..834ccd15968 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -1014,7 +1014,7 @@ public: if(CGAL_SMP_IA_DEBUG_L0) std::cout << " *****" << std::flush; } - else if(err[i] > 100) // @fixme is that reasonnable + else if(err[i] > 100) // @fixme is that reasonable { break; } diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h index 665f2077fd4..dc5c3802d82 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/MVC_post_processor_3.h @@ -460,7 +460,7 @@ private: CGAL_precondition(!ct.is_infinite(fh)); typedef typename CT::Vertex_handle Vertex_handle; - // Doing it explicitely rather than a loop for clarity + // Doing it explicitly rather than a loop for clarity Vertex_handle vh0 = fh->vertex(0); Vertex_handle vh1 = fh->vertex(1); Vertex_handle vh2 = fh->vertex(2); diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h index 39070956d64..a8fecd0d6c1 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Orbifold_Tutte_parameterizer_3.h @@ -64,7 +64,7 @@ namespace Surface_mesh_parameterization { /// \ingroup PkgSurfaceMeshParameterizationOrbifoldHelperFunctions /// -/// reads a serie of cones from an input stream. Cones are passed as an +/// reads a series of cones from an input stream. Cones are passed as an /// integer value that is the index of a vertex handle in the mesh tm`, using /// the vertex index property map `vpmap` for correspondency. /// @@ -501,7 +501,7 @@ private: // ( L A' ) ( Xf ) = ( C ) // ( A 0 ) ( Xf ) = ( 0 ) - // Iterate on both rows ot the 2x2 matrix T + // Iterate on both rows of the 2x2 matrix T for(int vert_ind=0; vert_ind<2; ++vert_ind) { // building up the equations by summing up the terms diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h index 480f8dd77a0..48610f5e523 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/orbifold_cone_helper.h @@ -193,7 +193,7 @@ bool check_cone_validity(const SeamMesh& mesh, } else { if(it->second != Duplicated_cone) { - std::cerr << "Error: Unknow cone type: " << it->second << std::endl; + std::cerr << "Error: Unknown cone type: " << it->second << std::endl; return false; } ++duplicated_cone_counter; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/measure_distortion.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/measure_distortion.h index 30a8b885b3e..e88b52f3001 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/measure_distortion.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/measure_distortion.h @@ -50,7 +50,7 @@ double compute_L2_stretch(const VertexRange& vertex_range, Face_double_map area_2D = get(Face_double_tag(), tmesh); Face_double_map area_3D = get(Face_double_tag(), tmesh); - // iterate fpr all inner vertices and for each vertex + // iterate for all inner vertices and for each vertex std::vector area_dist; double A_3D = 0.; diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h index ad436b9f666..18a7c1f2fa7 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/AABB_traversal_traits.h @@ -23,7 +23,7 @@ namespace CGAL /** * @class Special case for ray/segment-triangle - * the only difference with the offical one (Listing_intersection_traits) is that + * the only difference with the official one (Listing_intersection_traits) is that * is the do_intersect which is made prior to the intersection call. */ template diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h index aca2e52cef4..be5051a3715 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Disk_samplers.h @@ -98,7 +98,7 @@ public: for(std::size_t i = 0; i < number_of_points; ++i) { double Q = i * golden_ratio * CGAL_PI; double R = std::pow(static_cast(i) / number_of_points, custom_power); - // use uniform weigths, since we already give importance to locations that are close to center. + // use uniform weights, since we already give importance to locations that are close to center. *out_it++ = Tuple(R * cos(Q), R * sin(Q), 1.0); } } diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h index a7799a1188c..4265488f122 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Expectation_maximization.h @@ -66,7 +66,7 @@ private: } /** * Probability density function (pdf). - * Note that result is not devided to \f$ \sqrt {2\pi} \f$ , since it does not effect EM algorithm. + * Note that result is not divided to \f$ \sqrt {2\pi} \f$ , since it does not effect EM algorithm. * @param x data * @return pdf result (without dividing \f$ \sqrt {2\pi} \f$) */ @@ -238,7 +238,7 @@ private: for(std::size_t i = 0; i < centers.size(); ++i) { if(member_count[i] == 0) { CGAL_assertion( false && - "There is a cluster which does not contain any points, it will not cause an error but associated probabilites to this cluster will be 0."); + "There is a cluster which does not contain any points, it will not cause an error but associated probabilities to this cluster will be 0."); } else { centers[i].deviation = std::sqrt(centers[i].deviation / member_count[i]); } diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h index f1733ef2ac4..2f361642acf 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/Filters.h @@ -319,7 +319,7 @@ public: // if insertion is OK, then check its level facet_queue.push( new_pair); // if its level is equal to max_level do not put it in - } // queue since we do not want to traverse its childs + } // queue since we do not want to traverse its children } } while(++vertex_circulator != done); } while((edge = next(edge,polyhedron)) != halfedge(facet_front,polyhedron)); diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h index 9ca194cac17..60892a3a56a 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/K_means_clustering.h @@ -141,7 +141,7 @@ public: // this can not select end(), since random_ds < total_probability (i.e. distance_square_cumulative.back()) // this can not select an already selected item since either (by considering that upper bounds returns greater) - // - aready selected item is at 0, and its value is 0.0 + // - already selected item is at 0, and its value is 0.0 // - or its value is equal to value of previous element std::size_t selection_index = std::upper_bound( distance_square_cumulative.begin(), distance_square_cumulative.end(), random_ds) diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h index 5f357c809ab..b27f9f5226b 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h @@ -56,7 +56,7 @@ Note that any program that incorporates the code under this licence must, under GNU General Public License can be found at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 2) Proprietary Licence from UCL Business PLC. -To enable programers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html +To enable programmers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html ################################################################## @@ -637,7 +637,7 @@ private: arcs_for[MF_ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */ union { arc_forward dummy; - node *LAST_NODE; /* used in graph consruction */ + node *LAST_NODE; /* used in graph construction */ } LAST_NODE; } arc_for_block; @@ -651,7 +651,7 @@ private: arcs_rev[MF_ARC_BLOCK_SIZE]; /* all arcs must be at even addresses */ union { arc_reverse dummy; - node *LAST_NODE; /* used in graph consruction */ + node *LAST_NODE; /* used in graph construction */ } LAST_NODE; } arc_rev_block; diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index 8dd320bbff4..0b94bf1d71c 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -846,10 +846,10 @@ private: * \ / * v3 * The source S must reach all Vi, so for each side of the edge, there are two windwows being spawned: - * - v0v1 targetting v2 propagating only on the left (v0v2) - * - v2v0 targetting v1 propagating only on the left (v2v1) - * - v1v0 targetting v3 propagating only on the left (v1v3) - * - v3v1 targetting v0 propagating only on the left (v3v0) + * - v0v1 targeting v2 propagating only on the left (v0v2) + * - v2v0 targeting v1 propagating only on the left (v2v1) + * - v1v0 targeting v3 propagating only on the left (v1v3) + * - v3v1 targeting v0 propagating only on the left (v3v0) * * If v0v1 is a border edge, spawn 3 children in the face, and none on the other side */ @@ -879,11 +879,11 @@ private: Triangle_2 layoutFace(pt3t2(face3d)); Point_2 sourcePoint(construct_barycenter_in_triangle_2(layoutFace, edgeSourceLocations[side])); - // v0v1 targetting v2 + // v0v1 targeting v2 if (m_debugOutput) { std::cout << std::endl << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl; - std::cout << "\tExpanding edge root, side #" << side << ", targetting LOCAL 'v2'" << std::endl; + std::cout << "\tExpanding edge root, side #" << side << ", targeting LOCAL 'v2'" << std::endl; std::cout << "\t\t3D Face = " << face3d << std::endl; std::cout << "\t\t2D Face = " << layoutFace << std::endl; std::cout << "\t\tBarycentric coordinates: " << edgeSourceLocations[side][0] @@ -904,7 +904,7 @@ private: edgeRoot->push_middle_child(v2_Child); process_node(v2_Child); - // v2v0 targetting v1 + // v2v0 targeting v1 face3d = triangle_from_halfedge(prev(baseEdges[side], m_graph)); layoutFace = pt3t2(face3d); @@ -916,7 +916,7 @@ private: if (m_debugOutput) { std::cout << std::endl << " ~~~~~~~~~~~~~~~~~~~~~~~~~~~" << std::endl; - std::cout << "\tExpanding edge root, side #" << side << ", targetting LOCAL 'v1'" << std::endl; + std::cout << "\tExpanding edge root, side #" << side << ", targeting LOCAL 'v1'" << std::endl; std::cout << "\t\t3D Face = " << face3d << std::endl; std::cout << "\t\t2D Face = " << layoutFace << std::endl; std::cout << "\t\tBarycentric coordinates: " << edgeSourceLocations[side][0] @@ -1348,7 +1348,7 @@ private: // Propagating a pseudo-source on a boundary vertex can result in a cone on a null face // In such a case, we only care about the part of the cone pointing at the vertex (i.e. the middle child), - // so we can avoid propagating over the (non-existant) left opposite edge + // so we can avoid propagating over the (non-existent) left opposite edge if (node->is_null_face()) { propagateLeft = false; @@ -1446,7 +1446,7 @@ private: else // there is already an occupier, at a strictly smaller distance { // this is an application of "one angle one split" - if (c != CGAL::LARGER) // propage on the left if the node's ray is left of the occupier's + if (c != CGAL::LARGER) // propagate on the left if the node's ray is left of the occupier's propagateLeft = true; if (c != CGAL::SMALLER && !node->is_source_node()) // by convention a source node only points at the left edge propagateRight = true; @@ -2495,7 +2495,7 @@ public: { // It is a feature of C++11 that `const_iterator` may be used in calls to `erase()`, however // in order to support C++98, we must use `iterator`. Semantically, this is correct, but - // I must cast away the const-ness to hide the internal uglyness + // I must cast away the const-ness to hide the internal ugliness return Source_point_iterator(const_cast&>(m_faceLocations).begin()); } diff --git a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h index 234c2ccd683..264f56319c7 100644 --- a/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h +++ b/Surface_mesh_simplification/doc/Surface_mesh_simplification/Concepts/EdgeCollapseSimplificationVisitor.h @@ -53,7 +53,7 @@ void OnCollected(const Edge_profile& profile, Called during the processing phase (when edges are collapsed), for each edge that is selected. -This method is called before the algorithm checks if the edge is collapsable. +This method is called before the algorithm checks if the edge is collapsible. `cost` indicates the current collapse cost for the edge. If absent (meaning that it could not be computed) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp index ae8c50b4c45..a90d0f46d95 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_OpenMesh.cpp @@ -61,7 +61,7 @@ int main(int argc, char** argv) return EXIT_FAILURE; } - // For the pupose of the example we mark 100 edges as constrained edges + // For the purpose of the example we mark 100 edges as constrained edges int count = 0; for(edge_descriptor e : edges(surface_mesh)) put(constraints_map, e, (count++ < 100)); diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp index d8b574b241f..b239ca291c8 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp @@ -58,7 +58,7 @@ int main(int argc, char** argv) // The index maps are not explicitelty passed as in the previous // example because the surface mesh items have a proper id() field. // On the other hand, we pass here explicit cost and placement - // function which differ from the default policies, ommited in + // function which differ from the default policies, omitted in // the previous example. std::cout << "Collapsing edges of mesh: " << filename << ", aiming for " << 100 * ratio << "% of the input edges..." << std::endl; int r = SMS::edge_collapse(surface_mesh, stop); diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp index ef14f4f94ba..afd3957287d 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_garland_heckbert.cpp @@ -56,7 +56,7 @@ void collapse_gh(Surface_mesh& mesh, } // Usage: -// ./command [input] [ratio] [policy] [outpout] +// ./command [input] [ratio] [policy] [output] // policy can be "cp" (classic plane), "ct" (classic triangle), "pp" (probabilistic plane), "pt" (probabilistic triangle) int main(int argc, char** argv) { diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp index 2568e555755..b711df9683d 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/edge_collapse_visitor_surface_mesh.cpp @@ -120,12 +120,12 @@ int main(int argc, char** argv) // The index maps are not explicitelty passed as in the previous // example because the surface mesh items have a proper id() field. // On the other hand, we pass here explicit cost and placement - // function which differ from the default policies, ommited in + // function which differ from the default policies, omitted in // the previous example. int r = SMS::edge_collapse(surface_mesh, stop, CGAL::parameters::visitor(vis)); std::cout << "\nEdges collected: " << stats.collected - << "\nEdges proccessed: " << stats.processed + << "\nEdges processed: " << stats.processed << "\nEdges collapsed: " << stats.collapsed << std::endl << "\nEdges not collapsed due to topological constraints: " << stats.non_collapsable diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h index bc86fa4921e..28b22b3e079 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/FastEnvelope_filter.h @@ -133,7 +133,7 @@ public: std::array triangle = { vecp, vecv, vecw}; if(m_fast_envelope->is_outside(triangle)){ - // the triange intersects the envelope + // the triangle intersects the envelope return boost::none; } vecv = vecw; diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h index fd02ec777fa..b0fce64b6d9 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h @@ -264,7 +264,7 @@ compute_placement() // 'Ai' is a (row) vector and 'bi' a scalar. // // The vertex is completely determined with 3 such constraints, - // so is the solution to the folloing system: + // so is the solution to the following system: // // A.r0(). * v = b0 // A1 * v = b1 diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h index d6565d40748..a662b4c24c0 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Edge_collapse.h @@ -151,7 +151,7 @@ public: { // NOTE: A cost is a boost::optional<> value. // Absent optionals are ordered first; that is, "none < T" and "T > none" for any defined T != none. - // In consequence, edges with undefined costs will be promoted to the top of the priority queue and poped out first. + // In consequence, edges with undefined costs will be promoted to the top of the priority queue and popped out first. return m_algorithm->get_data(a).cost() < m_algorithm->get_data(b).cost(); } @@ -179,7 +179,7 @@ public: : CGAL_BOOST_PENDING_MUTABLE_QUEUE; typedef Modifiable_priority_queue PQ; - // An Edge_data is associated with EVERY _ edge in the mesh (collapsable or not). + // An Edge_data is associated with EVERY _ edge in the mesh (collapsible or not). // It contains the edge status wrt the priority queue // It also relates the edge with a policy-based cache struct Edge_data @@ -499,7 +499,7 @@ collect() if(is_constrained(h)) { CGAL_assertion_code(++num_not_inserted); - continue; // no not insert constrainted edges + continue; // no not insert constrained edges } const Profile profile = create_profile(h); @@ -639,7 +639,7 @@ loop() m_visitor.OnNonCollapsable(profile); - CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsable" ); + CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsible" ); } #ifdef CGAL_SURF_SIMPL_INTERMEDIATE_STEPS_PRINTING @@ -660,7 +660,7 @@ loop() m_visitor.OnNonCollapsable(profile); - CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsable" ); + CGAL_SMS_TRACE(1, edge_to_string(*opt_h) << " NOT Collapsible" ); } } else @@ -696,7 +696,7 @@ is_constrained(const vertex_descriptor v) const return false; } -// Some edges are NOT collapsable: doing so would break the topological consistency of the mesh. +// Some edges are NOT collapsible: doing so would break the topological consistency of the mesh. // This function returns true if a edge 'p->q' can be collapsed. // // An edge p->q can be collapsed iff it satisfies the "link condition" @@ -1183,7 +1183,7 @@ collapse(const Profile& profile, << "(V" << get(m_vim, profile.v0()) << "->V" << get(m_vim, profile.v1()) << ")"); - // Perform the actuall collapse. + // Perform the actual collapse. // This is an external function. // It's REQUIRED to remove ONLY 1 vertex (P or Q) and edges PQ, PT and QB // (PT and QB are removed if they are not null). diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp index d7228a1406a..19f988bb697 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Envelope.cpp @@ -148,7 +148,7 @@ int main(int argc, char** argv) std::cout << "\nEdges collected: " << stats.collected - << "\nEdges proccessed: " << stats.processed + << "\nEdges processed: " << stats.processed << "\nEdges collapsed: " << stats.collapsed << std::endl << "\nEdges not collapsed due to topological constraints: " << stats.non_collapsable diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp index 7c641c5eb69..b315643245b 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp @@ -487,7 +487,7 @@ int main(int argc, char** argv) } cout << endl - << lOK << " cases succedded." << endl + << lOK << " cases suceceded." << endl << (lCases.size() - lOK) << " cases failed." << endl; return lOK == lCases.size() ? 0 : 1; diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/mcf_scale_invariance.cpp b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/mcf_scale_invariance.cpp index eaf6787626f..68724128bb9 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/mcf_scale_invariance.cpp +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/mcf_scale_invariance.cpp @@ -73,7 +73,7 @@ int main(int argc, char* argv[]) std::cout << "Number of edges of the skeleton: " << boost::num_edges(skeleton) << "\n"; -//scale skelton +//scale skeleton for(Skeleton_vertex v : vertices(skeleton)) { Point new_point = skeleton[v].point+to_origin; diff --git a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index 3c11f859619..79bc2d3ddd4 100644 --- a/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h +++ b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h @@ -269,9 +269,9 @@ private: /** Traits class. */ Traits m_traits; - /** Controling the velocity of movement and approximation quality. */ + /** Controlling the velocity of movement and approximation quality. */ double m_omega_H; - /** Controling the smoothness of the medial approximation. */ + /** Controlling the smoothness of the medial approximation. */ double m_omega_P; /** Edges with length less than `min_edge_length` will be collapsed. */ double m_min_edge_length; diff --git a/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp b/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp index 446367cf332..9a5f36d352b 100644 --- a/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp +++ b/Surface_mesh_topology/benchmark/Surface_mesh_topology/path_homotopy_with_schema.cpp @@ -12,7 +12,7 @@ <<"into a second path and test that the two paths are homotope." <::max)(); } - /// @return the positive turn given two darts using their ids (unsed for CGAL_PWRLE_TURN_V2 and V3) + /// @return the positive turn given two darts using their ids (unused for CGAL_PWRLE_TURN_V2 and V3) std::size_t compute_positive_turn_given_ids(Dart_const_descriptor dh1, Dart_const_descriptor dh2) const { @@ -1346,7 +1346,7 @@ protected: return get_dart_id(dh2)-get_dart_id(dh1); } - /// @return the negative turn given two darts using their ids (unsed for CGAL_PWRLE_TURN_V2 and V3) + /// @return the negative turn given two darts using their ids (unused for CGAL_PWRLE_TURN_V2 and V3) std::size_t compute_negative_turn_given_ids(Dart_const_descriptor dh1, Dart_const_descriptor dh2) const { @@ -1382,7 +1382,7 @@ protected: } /// @return true iff the edge containing adart is associated with a path - /// of only 1 dart (case of an edge bewteen two perforated faces) + /// of only 1 dart (case of an edge between two perforated faces) bool edge_path_has_only_one_dart(Original_dart_const_descriptor adart) const { return diff --git a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h index 7953421e86e..f56db8e5cb9 100644 --- a/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h +++ b/Surface_mesh_topology/include/CGAL/Surface_mesh_topology/internal/Path_on_surface_with_rle.h @@ -729,10 +729,10 @@ public: } /// Reduce the length of the flat part starting at 'it' from its beginning - /// 'it' moves to the previous flat if the current flat disapeared. + /// 'it' moves to the previous flat if the current flat disappeared. /// The path could be not valid after this operation (consistency with next /// element should be ensure, by possibly updating the next flat part). - /// @return true iff the flat disapeared after its reduction. + /// @return true iff the flat disappeared after its reduction. bool reduce_flat_from_beginning(List_iterator& it, Set_of_it& modified_flats) { @@ -755,10 +755,10 @@ public: } /// Reduce the length of the flat part starting at 'it' from its end. - /// 'it' moves to the previous flat if the current flat disapeared. + /// 'it' moves to the previous flat if the current flat disappeared. /// The path could be not valid after this operation (consistency with next /// element should be ensure, by possibly updating the next flat part). - /// @return true iff the flat disapeared after its reduction. + /// @return true iff the flat disappeared after its reduction. bool reduce_flat_from_end(List_iterator& it, Set_of_it& modified_flats) { @@ -1167,7 +1167,7 @@ public: if (!m_use_only_positive && m_MQ.negative_turn(end_of_flat(ittemp), dh)==2) { negative_flat=true; } - if (flat_length(ittemp)==0) // Case of flat lengh 0 + if (flat_length(ittemp)==0) // Case of flat length 0 { return positive_flat || negative_flat; } return (flat_length(ittemp)>0 && positive_flat) || @@ -1200,7 +1200,7 @@ public: if (!m_use_only_positive && m_MQ.negative_turn(dh, begin_of_flat(ittemp))==2) { negative_flat=true; } - if (flat_length(ittemp)==0) // Case of flat lengh 0 + if (flat_length(ittemp)==0) // Case of flat length 0 { return positive_flat || negative_flat; } return (flat_length(ittemp)>0 && positive_flat) || diff --git a/Surface_mesh_topology/test/Surface_mesh_topology/fundamental_group_of_the_circle.cpp b/Surface_mesh_topology/test/Surface_mesh_topology/fundamental_group_of_the_circle.cpp index 1d725cc1fa6..cd3097c19a0 100644 --- a/Surface_mesh_topology/test/Surface_mesh_topology/fundamental_group_of_the_circle.cpp +++ b/Surface_mesh_topology/test/Surface_mesh_topology/fundamental_group_of_the_circle.cpp @@ -161,7 +161,7 @@ int main() if (!h22) { std::cout<<"FAILURE : a path associated with int "< p4(p3); - p4.reverse(); // Here p3==p4 because the path is symetric (it does a round trip) + p4.reverse(); // Here p3==p4 because the path is symmetric (it does a round trip) if (p3!=p4 || !p3.are_paths_equals(p4)) { std::cerr<<"path_tests ERROR: p3!=p4 || !p3.are_paths_equals(p4)."<& path, Transformation t, draw #endif =false, - std::size_t repeat=0) // If 0, repeat as long as there is one modifcation; + std::size_t repeat=0) // If 0, repeat as long as there is one modification; // otherwise repeat the given number of times { #ifdef CGAL_USE_BASIC_VIEWER diff --git a/Surface_mesh_topology/test/Surface_mesh_topology/test_shortest_cycle_non_contractible.cpp b/Surface_mesh_topology/test/Surface_mesh_topology/test_shortest_cycle_non_contractible.cpp index 55ee3038438..fc26adb25c6 100644 --- a/Surface_mesh_topology/test/Surface_mesh_topology/test_shortest_cycle_non_contractible.cpp +++ b/Surface_mesh_topology/test/Surface_mesh_topology/test_shortest_cycle_non_contractible.cpp @@ -91,7 +91,7 @@ bool test_weighted(const LCC_CM& map, dh=map.next(dh); // 2) Here dh is on the parallel of the first cycle. We mark darts of the cycle parallel - // to the first one. Its lenght is 24. + // to the first one. Its length is 24. auto mark=map.get_new_mark(); std::size_t nbedges=0; typename LCC_CM::Dart_const_descriptor dh2=dh; 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 5863952086e..79122ed5f60 100644 --- a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h @@ -767,7 +767,7 @@ operator>> (std::istream& is, Complex_2_in_triangulation_3& c2t3) c2t3.clear(); is >> c2t3.triangulation(); - // restore datas of c2t3 + // restore data of c2t3 for(typename Tr::Finite_facets_iterator fit = c2t3.triangulation().finite_facets_begin(); fit != c2t3.triangulation().finite_facets_end(); 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 a04a2c523fd..28b57b62dfa 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_traits_generator_3.h @@ -22,14 +22,14 @@ namespace CGAL { template class Sphere_3; -/** Defaut traits class. +/** Default traits class. * Partial specialization will be in other headers */ template struct Surface_mesh_traits_generator_3 { typedef typename Surface::Surface_mesher_traits_3 Type; - typedef Type type; // for Boost compatiblity (meta-programming) + typedef Type type; // for Boost compatibility (meta-programming) }; // specialization for Kernel::Sphere_3 @@ -37,7 +37,7 @@ template struct Surface_mesh_traits_generator_3 > { typedef Surface_mesher::Sphere_oracle_3 Type; - typedef Type type; // for Boost compatiblity (meta-programming) + typedef Type type; // for Boost compatibility (meta-programming) }; } // end namespace CGAL 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 6826673e88a..55d4e1dc104 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h @@ -298,7 +298,7 @@ namespace CGAL { 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 iif root_2 <=1 + if( root_2 <= FT(1) ) /// move b if root_2 <=1 { b = translated_point(original_a, scaled_vector(ab, root_2)); } diff --git a/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h b/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h index 2ed27b9df3a..76f3a81590d 100644 --- a/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h +++ b/Surface_mesher/include/CGAL/vtkSurfaceMesherContourFilter.h @@ -107,7 +107,7 @@ int vtkCGALSurfaceMesherContourFilter::RequestData( vtkInformation *inInfo = inputVector[0]->GetInformationObject(0); vtkInformation *outInfo = outputVector->GetInformationObject(0); - // get the input and ouptut + // get the input and output vtkImageData *inData = vtkImageData::SafeDownCast( inInfo->Get(vtkDataObject::DATA_OBJECT())); vtkPolyData *output = vtkPolyData::SafeDownCast( diff --git a/Surface_mesher/test/Surface_mesher/combined_spheres.cpp b/Surface_mesher/test/Surface_mesher/combined_spheres.cpp index 8da7ab4732f..631ed4d355a 100644 --- a/Surface_mesher/test/Surface_mesher/combined_spheres.cpp +++ b/Surface_mesher/test/Surface_mesher/combined_spheres.cpp @@ -74,7 +74,7 @@ typedef Oracle_5 Oracle; int main(int, char**) { /*** Spheres radiuss ***/ - FT r1; // 93 milimeters + FT r1; // 93 millimeters FT r2; FT r3; FT r4; @@ -102,7 +102,7 @@ int main(int, char**) const int number_of_initial_points = 20; const double facets_uniform_size_bound = 0.5; // mm - const double facets_aspect_ratio_bound = 30; // degres + const double facets_aspect_ratio_bound = 30; // degrees Sphere_3 sphere1(CGAL::ORIGIN, r1*r1); Sphere_3 sphere2(CGAL::ORIGIN, r2*r2); @@ -180,7 +180,7 @@ int main(int, char**) CGAL::Non_manifold_tag()); std::string filename; - std::cout << "Ouput file name (without extension):" << std::endl; + std::cout << "Output file name (without extension):" << std::endl; std::cin >> filename; std::ofstream out_cgal((filename+".off").c_str()); 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 6b05353c91f..31dd6c11652 100644 --- a/Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp +++ b/Surface_mesher/test/Surface_mesher/implicit_surface_mesher_test.cpp @@ -111,7 +111,7 @@ struct Test_with_kernel { timer.stop(); std::cout << "Final number of points: " << tr.number_of_vertices() - << " (elasped time: " << timer.time() << ")\n\n"; + << " (elapsed time: " << timer.time() << ")\n\n"; // same test, with a Sphere_3 std::cout << " Kernel::Sphere_3(ORIGIN, 1.)\n"; @@ -125,7 +125,7 @@ struct Test_with_kernel { initial_number_of_points); timer.stop(); std::cout << "Final number of points: " << tr_2.number_of_vertices() - << " (elasped time: " << timer.time() << ")\n\n"; + << " (elapsed time: " << timer.time() << ")\n\n"; typedef CGAL::Implicit_surface_3 > Surface2; typedef typename CGAL::Surface_mesh_traits_generator_3::Type Surface_mesh_traits; @@ -154,7 +154,7 @@ struct Test_with_kernel { initial_number_of_points); timer.stop(); std::cout << "Final number of points: " << tr_3.number_of_vertices() - << " (elasped time: " << timer.time() << ")\n\n"; + << " (elapsed time: " << timer.time() << ")\n\n"; } diff --git a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h index 1a55d18baa6..21aa9eaa8c7 100644 --- a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h +++ b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h @@ -278,7 +278,7 @@ public: m_visitor->after_sweep(); } - /*! Run the sweep-line alogrithm on a range of x-monotone curves, a range + /*! Run the sweep-line algorithm on a range of x-monotone curves, a range * of action event points (if a curve passed through an action point, it will * be split) and a range of query points (if a curve passed through a * query point,it will not be split). @@ -476,7 +476,7 @@ protected: } } - /*! Initiliaze the sweep algorithm. */ + /*! Initialize the sweep algorithm. */ template void _init_sweep(CurveInputIterator curves_begin, CurveInputIterator curves_end) @@ -487,7 +487,7 @@ protected: _init_curves(curves_begin, curves_end); // initialize the curves } - /*! Initiliaze the sweep algorithm. */ + /*! Initialize the sweep algorithm. */ template void _init_indexed_sweep(const EdgeRange& edges, const Accessor& accessor) diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2.h index 1e3ec6edf75..16c2fdedb38 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2.h @@ -122,12 +122,12 @@ protected: // Data members: Subcurve_container m_overlap_subCurves; // Contains all of the new sub-curves - // creaed by an overlap. + // created by an overlap. Intersection_vector m_x_objects; // Auxiliary vector for storing the // intersection objects. - X_monotone_curve_2 m_sub_cv1; // Auxiliary varibales + X_monotone_curve_2 m_sub_cv1; // Auxiliary variables X_monotone_curve_2 m_sub_cv2; // (for splitting curves). public: @@ -145,7 +145,7 @@ public: Base(traits, visitor) {} - /*! Destrcut. */ + /*! Destruct. */ virtual ~Surface_sweep_2() {} protected: @@ -184,10 +184,10 @@ protected: * \param overlap_cv the overlapping curve. * \param c1 first subcurve contributing to the overlap. * \param c2 second subcurve contributing to the overlap. - * \param all_leaves_diff not empty in case c1 and c2 have common ancesters. + * \param all_leaves_diff not empty in case c1 and c2 have common ancestors. * It contains the set of curves not contained in first_parent * that are in the other subcurve - * \param first_parent only used when c1 and c2 have common ancesters. + * \param first_parent only used when c1 and c2 have common ancestors. * It is either c1 or c2 (the one having the more leaves) * */ diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event.h index 3728912b1e6..8dbba084103 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Default_event class. + * Definition of the Default_event class. */ #include @@ -44,7 +44,7 @@ namespace Surface_sweep_2 { * parameters of the surface-sweep visitor class templates. It enables the * definition of these two types, which refer one to another; (the curves to the * right of an event and the curves to its left are data members of the event, - * and the two events associated with the endpoints of a curve are data memebrs + * and the two events associated with the endpoints of a curve are data members * of the curve.) * * If you need to represent an event with additional data members, introduce a diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h index e29127505f7..953c25463b9 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_event_base.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Default_event_base class. + * Definaition of the Default_event_base class. */ #include @@ -30,7 +30,7 @@ namespace Surface_sweep_2 { /*! \class Default_event_base * * A class associated with an event in a sweep line algorithm. - * An intersection point in the sweep line algorithm is refered to as an event. + * An intersection point in the sweep line algorithm is referred to as an event. * This class contains the information that is associated with any given * event point. This information contains the following: * - the actual point @@ -86,7 +86,7 @@ public: if ((curve == *iter) || (*iter)->is_inner_node(curve)) return; // Replace the existing curve in case of overlap, only if the set of - // ancesters of curve contains the set of ancesters of *iter + // ancestors of curve contains the set of ancestors of *iter if (curve->has_common_leaf(*iter)) { if (curve->number_of_original_curves() > (*iter)->number_of_original_curves()) diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h index 4574a959a1e..2e15d64e7b7 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Default_subcurve.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the Default_subcurve class, which is an extended curve + * Definition of the Default_subcurve class, which is an extended curve * type, referred to as Subcurve, used by the surface-sweep framework. * * The surface-sweep framework is implemented as a template that is @@ -59,7 +59,7 @@ namespace Surface_sweep_2 { * * The information contained in this class is: * - two pointers to subcurves that are the originating subcurves in case of - * an overlap, otherwise thay are both nullptr. + * an overlap, otherwise they are both nullptr. */ template diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h index d0c54478599..4cd15688254 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h @@ -70,7 +70,7 @@ No_intersection_surface_sweep_2(const Gt2* traits, Visitor* visitor) : { m_visitor->attach(this); } //----------------------------------------------------------------------------- -// Destrcutor. +// Destructor. // template No_intersection_surface_sweep_2::~No_intersection_surface_sweep_2() @@ -402,7 +402,7 @@ void No_intersection_surface_sweep_2::_handle_left_curves() { print_event_info(m_currentEvent); }); // Use the status-line to sort all left subcurves incident to the current - // event (no geometric comparisons are neede at all). + // event (no geometric comparisons are needed at all). _sort_left_curves(); // Now the event is updated, with its left subcurved properly sorted, and diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event.h index bc9c341a77d..6f7cb679c9a 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the No_overlap_event class. + * Definition of the No_overlap_event class. */ #include @@ -45,7 +45,7 @@ namespace Surface_sweep_2 { * parameters of the surface-sweep visitor class templates. It enables the * definition of these two types, which refer one to another; (the curves to the * right of an event and the curves to its left are data members of the event, - * and the two events associated with the endpoints of a curve are data memebrs + * and the two events associated with the endpoints of a curve are data members * of the curve.) * * If you need to represent an event with additional data members, introduce a diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h index f18037868ae..ff9101e4f35 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the No_overlap_event_base class. + * Definition of the No_overlap_event_base class. */ #include @@ -84,7 +84,7 @@ public: /*! \class No_overlap_event_base * * A class associated with an event in a surface-sweep algorithm. - * An intersection point in the sweep line algorithm is refered to as an event. + * An intersection point in the sweep line algorithm is referred to as an event. * This class contains the information that is associated with any given * event point. This information contains the following: * - the actual point diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h index 32385a84f1d..09ed0811dcc 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h @@ -19,7 +19,7 @@ /*! \file * - * Defintion of the No_overlap_subcurve class, which is an + * Definition of the No_overlap_subcurve class, which is an * extended curve type, referred to as Subcurve, used by the surface-sweep * framework. * @@ -122,7 +122,7 @@ public: * No_overlap_subcurve_base class template. * * The information contained in this class (in addition to the information - * contaisn in its base) is: + * contained in its base) is: * - the remaining x-monotone curve that is to the right of the current sweep * line. * \tparam GeometryTraits_2 the geometry traits. diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index de98db8e9a0..29be6e0d944 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -30,7 +30,7 @@ namespace Surface_sweep_2 { template void Surface_sweep_2::_init_structures() { - // Initailize the structures maintained by the base sweep-line class. + // Initialize the structures maintained by the base sweep-line class. Base::_init_structures(); } @@ -515,13 +515,13 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, CGAL_assertion(c1 != c2); - // look up for c1 in the table of c2 (or vice versa if c2intersection_exists(c2) : c2->intersection_exists(c1))) { CGAL_SS_PRINT_END_EOL("computing intersection (already computed)"); return; //the curves have already been checked for intersection } - // handle overlapping curves with common ancesters + // handle overlapping curves with common ancestors Subcurve_vector all_leaves_diff; Subcurve* first_parent = nullptr; if ((c1->originating_subcurve1() != nullptr) || @@ -605,7 +605,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, // This is needed rather than simply computing the intersection of // the last curves of first_parent and second_parent as some traits // classes (such as Arr_curve_data_traits_2) override the Intersect_2 - // functor and expects the curve to have no common ancesters + // functor and expects the curve to have no common ancestors // (Arr_curve_data_traits_2 is used in the testsuite to sum up // the overlapping degree of a curve) CGAL_SS_PRINT_TEXT("First parent is: "); @@ -804,7 +804,7 @@ void Surface_sweep_2::_create_intersection_point(const Point_2& xp, // Act according to the multiplicity: if (multiplicity == 0) { - // The multiplicity of the intersection point is unkown or undefined: + // The multiplicity of the intersection point is unknown or undefined: _add_curve_to_right(e, c1); _add_curve_to_right(e, c2); if (e->is_right_curve_bigger(c1, c2, this->m_traits)) std::swap(c1, c2); diff --git a/TDS_2/doc/TDS_2/Concepts/TriangulationDataStructure_2.h b/TDS_2/doc/TDS_2/Concepts/TriangulationDataStructure_2.h index 1732b9fa648..b2c1b5a0886 100644 --- a/TDS_2/doc/TDS_2/Concepts/TriangulationDataStructure_2.h +++ b/TDS_2/doc/TDS_2/Concepts/TriangulationDataStructure_2.h @@ -692,7 +692,7 @@ vertex has been omitted when output. Vertex_handle file_input( istream& is, bool skip_first=false); /*! -reads a combinatorial triangulation data structure from `is` and assigns it to tthe triangulation data structure. +reads a combinatorial triangulation data structure from `is` and assigns it to the triangulation data structure. */ istream& operator>> (istream& is, TriangulationDataStructure_2 & tds); diff --git a/TDS_2/doc/TDS_2/TDS_2.txt b/TDS_2/doc/TDS_2/TDS_2.txt index 2444eb1fb60..f326e6e1ebf 100644 --- a/TDS_2/doc/TDS_2/TDS_2.txt +++ b/TDS_2/doc/TDS_2/TDS_2.txt @@ -24,7 +24,7 @@ of the space the triangulation is embedded in. The representation of \cgal 2D triangulations is based on faces and vertices, Edges are only implicitly -represented trough the adjacency relations between two +represented through the adjacency relations between two faces. The triangulation data structure can be seen diff --git a/TDS_2/include/CGAL/Triangulation_data_structure_2.h b/TDS_2/include/CGAL/Triangulation_data_structure_2.h index 79f0b1b4022..322e6cef1b8 100644 --- a/TDS_2/include/CGAL/Triangulation_data_structure_2.h +++ b/TDS_2/include/CGAL/Triangulation_data_structure_2.h @@ -1084,7 +1084,7 @@ insert_dim_up(Vertex_handle w, bool orient) } } - // couldn't unify the code for reorientation mater + // couldn't unify the code for reorientation matter lfit = faces_list.begin() ; if (dim == 1){ if (orient) { @@ -1542,7 +1542,7 @@ Triangulation_data_structure_2:: split_vertex(Vertex_handle v, Face_handle f1, Face_handle g1) { /* - // The following method preforms a split operation of the vertex v + // The following method performs a split operation of the vertex v // using the faces f1 and g1. The split operation is shown // below. // The names of the variables in the method correspond to the @@ -1694,7 +1694,7 @@ join_vertices(Face_handle f, int i, Vertex_handle v) } /* - // The following drawing corrsponds to the variables + // The following drawing corresponds to the variables // used in this part... // The vertex v1 is returned... // @@ -2107,7 +2107,7 @@ void Triangulation_data_structure_2:: file_output( std::ostream& os, Vertex_handle v, bool skip_first) const { - // ouput to a file + // output to a file // if non nullptr, v is the vertex to be output first // if skip_first is true, the point in the first vertex is not output // (it may be for instance the infinite vertex of the triangulation) @@ -2243,7 +2243,7 @@ void Triangulation_data_structure_2:: vrml_output( std::ostream& os, Vertex_handle v, bool skip_infinite) const { - // ouput to a vrml file style + // output to a vrml file style // Point are assumed to be 3d points with a stream oprator << // if non nullptr, v is the vertex to be output first // if skip_inf is true, the point in the first vertex is not output diff --git a/TDS_2/include/CGAL/Triangulation_ds_vertex_2.h b/TDS_2/include/CGAL/Triangulation_ds_vertex_2.h index ca17923ec49..e9e2597a2dd 100644 --- a/TDS_2/include/CGAL/Triangulation_ds_vertex_2.h +++ b/TDS_2/include/CGAL/Triangulation_ds_vertex_2.h @@ -68,7 +68,7 @@ public: bool is_valid(bool verbose = false, int level = 0); private: - // used to implement deprected access to circulators + // used to implement deprecated access to circulators Vertex_handle handle(); }; diff --git a/TDS_2/test/TDS_2/include/CGAL/_test_traits.h b/TDS_2/test/TDS_2/include/CGAL/_test_traits.h index 3bb76a7bbe2..631c1375e3e 100644 --- a/TDS_2/test/TDS_2/include/CGAL/_test_traits.h +++ b/TDS_2/test/TDS_2/include/CGAL/_test_traits.h @@ -27,7 +27,7 @@ namespace CGAL { -// Create a mininal traits class +// Create a minimal traits class class Triangulation_test_point { public: typedef Triangulation_test_point Point; diff --git a/TDS_2/test/TDS_2/test_triangulation_tds.cpp b/TDS_2/test/TDS_2/test_triangulation_tds.cpp index bf7fd53dae5..8bde0f0b67c 100644 --- a/TDS_2/test/TDS_2/test_triangulation_tds.cpp +++ b/TDS_2/test/TDS_2/test_triangulation_tds.cpp @@ -45,7 +45,7 @@ int main() typedef CGAL::Triangulation_data_structure_2<> Cls1; _test_cls_tds_2( Cls1()); - std::cout << "Testing bakward compatibility" << std::endl; + std::cout << "Testing backward compatibility" << std::endl; std::cout << "Testing Triangulation_defaut_data_structure_2" << std::endl; typedef CGAL::_Triangulation_test_traits Gt; diff --git a/TDS_3/doc/TDS_3/TriangulationDS_3.txt b/TDS_3/doc/TDS_3/TriangulationDS_3.txt index 2c84bad159b..5607b5b19c7 100644 --- a/TDS_3/doc/TDS_3/TriangulationDS_3.txt +++ b/TDS_3/doc/TDS_3/TriangulationDS_3.txt @@ -38,7 +38,7 @@ Following the standard vocabulary of simplicial complexes, an \f$ i\f$-face \f$ f_i\f$ and a \f$ j\f$-face \f$ f_j\f$ \f$ (0 \leq j < i \leq 3)\f$ are said to be incident in the triangulation if \f$ f_j\f$ is a (sub)face of \f$ f_i\f$, and two \f$ i\f$-faces \f$ (0 \leq i \leq 3)\f$ are said to be adjacent if -they share a commun incident (sub)face. +they share a common incident (sub)face. Each cell gives access to its four incident vertices and to its four adjacent cells. Each vertex gives direct access to one of its incident diff --git a/TDS_3/include/CGAL/Triangulation_utils_3.h b/TDS_3/include/CGAL/Triangulation_utils_3.h index 2f6646a2087..d563fda6954 100644 --- a/TDS_3/include/CGAL/Triangulation_utils_3.h +++ b/TDS_3/include/CGAL/Triangulation_utils_3.h @@ -87,7 +87,7 @@ struct Triangulation_utils_3 static int vertex_triple_index(const int i, const int j) { // indexes of the jth vertex of the facet of a cell - // opposite to vertx i + // opposite to vertex i CGAL_precondition( ( i >= 0 && i < 4 ) && ( j >= 0 && j < 3 ) ); return tab_vertex_triple_index[i][j]; diff --git a/Testsuite/include/CGAL/Testsuite/vc_debug_hook.h b/Testsuite/include/CGAL/Testsuite/vc_debug_hook.h index cb4d1dce665..cf15aee8c98 100644 --- a/Testsuite/include/CGAL/Testsuite/vc_debug_hook.h +++ b/Testsuite/include/CGAL/Testsuite/vc_debug_hook.h @@ -9,7 +9,7 @@ // // Author(s) : Fernando Cacciola // -// This is used by the testsuite to prevent Visual C++ from poping up an error window. +// This is used by the testsuite to prevent Visual C++ from popping up an error window. // #ifndef CGAL_VC_DEBUG_HOOK_H @@ -40,7 +40,7 @@ namespace switch(n) { case SIGSEGV: std::cerr << "In CGAL_handle_signal, Program received signal SIGSEGV: Segmentation Fault." << std::endl; break ; - case SIGFPE : std::cerr << "In CGAL_handle_signal, Program received signal SIGFPE: Floating Point Execption." << std::endl; break ; + case SIGFPE : std::cerr << "In CGAL_handle_signal, Program received signal SIGFPE: Floating Point Exception." << std::endl; break ; case SIGILL : std::cerr << "In CGAL_handle_signal, Program received signal SIGILL: Illegal Instruction." << std::endl; break ; default: std::cerr << "In CGAL_handle_signal, Program received signal " << n << std::endl; break ; diff --git a/Testsuite/test/post_process_ctest_results.py b/Testsuite/test/post_process_ctest_results.py index 77998c21ef8..120094cabbb 100644 --- a/Testsuite/test/post_process_ctest_results.py +++ b/Testsuite/test/post_process_ctest_results.py @@ -15,7 +15,7 @@ rx_examples=re.compile('.*in examples\/') #For each NAME, check if NAME is a directory. If not, create one, create a #text report, and write everything that is in the report until the next NAME #in it. Then, add 'NAME r' in the global report. This should allow to get all -#the NOTICE and other info explaining why the configuration is skiped. +#the NOTICE and other info explaining why the configuration is skipped. name="" is_writing=False diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Concepts/RemeshingTriangulationTraits_3.h b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Concepts/RemeshingTriangulationTraits_3.h index 8f001943705..451a9425179 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Concepts/RemeshingTriangulationTraits_3.h +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Concepts/RemeshingTriangulationTraits_3.h @@ -67,7 +67,7 @@ A constructor object model of `ConstructMidpoint_3` typedef unspecified_type Construct_midpoint_3; /*! -A constructor obeject model of `ComputeApproximateDihedralAngle_3` +A constructor object model of `ComputeApproximateDihedralAngle_3` */ typedef unspecified_type Compute_approximate_dihedral_angle_3; diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h index c83946e592b..22f353ddb70 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/FMLS.h @@ -228,8 +228,8 @@ public: } // // Compute the MLS projection of the list of point stored in pv and store the resulting -// // positions and normal in qv. qv must be preallocated to stroe 6*pvSize float32. -// // The strid indicates the offsets in qv (the defautl value of 3 means that the qv +// // positions and normal in qv. qv must be preallocated to store 6*pvSize float32. +// // The strid indicates the offsets in qv (the default value of 3 means that the qv // // is compact: pv={x0,y0,z0,x1,y1,z1...}. If pv contains also normals for instance, // // the stride should be set to 6. // void fastProjectionCPU(const std::vector& pv, @@ -297,7 +297,7 @@ public: // Accessors // -------------------------------------------------------------- - // Number of elements of the PN. One elemnt is a 6-float32 chunk. + // Number of elements of the PN. One element is a 6-float32 chunk. inline std::size_t getPNSize() const { return PNSize; } inline std::vector& getPN() { return PN; } inline const std::vector& getPN() const { return PN; } @@ -508,7 +508,7 @@ private: // -------------------------------------------------------------- - // Memory Managment + // Memory Management // -------------------------------------------------------------- void freeCPUMemory() @@ -773,7 +773,7 @@ void createMLSSurfaces(Subdomain__FMLS& subdomain_FMLS, std::size_t nb_of_mls_to_create = 0; double average_point_spacing = 0; - //Cretaing the actual MLS surfaces + //Creating the actual MLS surfaces for (typename SurfaceIndexMap::iterator it = current_subdomain_FMLS_indices.begin(); it != current_subdomain_FMLS_indices.end(); ++it) { diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index 5d44b6c8eac..4379f480372 100644 --- a/Three/doc/Three/Three.txt +++ b/Three/doc/Three/Three.txt @@ -115,7 +115,7 @@ It is really simple to add a pop-up box with Qt. Use a QMessageBox and give it s \subsection examplePluginDockWidget Adding a Dock Widget This section describes how to add a dock widget to the application.\n -You can make your plugin inherit from CGAL::Three::Polyhedron_demo_plugin_helper, which gives acces to the function CGAL::Three::Polyhedron_demo_plugin_helper#addDockWidget. +You can make your plugin inherit from CGAL::Three::Polyhedron_demo_plugin_helper, which gives access to the function CGAL::Three::Polyhedron_demo_plugin_helper#addDockWidget. This will manage automatically the position and tabification of a dock widget. \n Just like with the Dialog, create a new Qt Designer form (file->New file or Project->Qt->Qt Designer Form), choose `QDockWidget in Widgets * \image html menu_6.png @@ -221,14 +221,14 @@ One way to store the data you computed is to use member std::vector. It must be The application uses OpenGL VBOs to display the geometry. Those are buffers that will stream their data to the GPU. This step consists to put the data stored in the std::vector in those buffers. This mechanism is wrapped using a bunch of classes called Geometry_containers. There is one type for each basic type of geometry in OpenGL(triangles, lines and points). They embark a SHaderProgram and everything that can be bound to it (one VAO and vbos). -In this exemple, we only need one Triangle_container, as we are only storing one kind of data. If we wanted to store normals and colors, for instance, we could provide it the same way the points are given to the Triangle_container. +In this example, we only need one Triangle_container, as we are only storing one kind of data. If we wanted to store normals and colors, for instance, we could provide it the same way the points are given to the Triangle_container. If we wanted to define different king of lighting, we would need a Triangle_container for each, and if we wanted to draw the edges of the triangle, we would need an Edge_container, etc. \snippet Three_examples/Example_plugin.cpp creation The code above creates a Triangle_container, that holds the characteristics of the display (here a basic lighting), as a non-indexed data container. It means the vertices will be duplicated. \snippet Three_examples/Example_plugin.cpp allocateelements -Once the Triangle_container exists, we must feed it the previously computed data. This step initializes the embeded VAO with the correct size. +Once the Triangle_container exists, we must feed it the previously computed data. This step initializes the embedded VAO with the correct size. \snippet Three_examples/Example_plugin.cpp fillbuffers And here, the data previously given to the Triangle_container is actually bound. It is like a green light to the program, letting it embark the data previously prepared for it. diff --git a/Three/include/CGAL/Three/Polyhedron_demo_plugin_interface.h b/Three/include/CGAL/Three/Polyhedron_demo_plugin_interface.h index 0a5032cbb8f..c0478ae29a8 100644 --- a/Three/include/CGAL/Three/Polyhedron_demo_plugin_interface.h +++ b/Three/include/CGAL/Three/Polyhedron_demo_plugin_interface.h @@ -41,7 +41,7 @@ public: //! \brief indicates if an action is usable or not. //! This function usually tests the type of the selected item to determine if `action` can be applied to it, - //! but not necessarly. + //! but not necessarily. //! @returns \c true if `action` can be called in the current state, \c false //! otherwise virtual bool applicable(QAction* action) const = 0; diff --git a/Three/include/CGAL/Three/Scene_interface.h b/Three/include/CGAL/Three/Scene_interface.h index e64bcd987bc..e60049c91a0 100644 --- a/Three/include/CGAL/Three/Scene_interface.h +++ b/Three/include/CGAL/Three/Scene_interface.h @@ -94,7 +94,7 @@ public: */ virtual int erase(QList) = 0; - /*! Creates a copy of the item whith the id `id`. + /*! Creates a copy of the item with the id `id`. * @returns the index of the new item (-1 on error). */ virtual Item_id duplicate(Item_id id) = 0; @@ -146,7 +146,7 @@ public: //! \brief ignore data updating. //! //! This will ignore all the individual calls to `itemChanged()` until - //! `setUpdatesEnabled()` is called whith `b` being `true`. + //! `setUpdatesEnabled()` is called with `b` being `true`. //! virtual void setUpdatesEnabled(bool b) =0; //! diff --git a/Three/include/CGAL/Three/Scene_item.h b/Three/include/CGAL/Three/Scene_item.h index 824b2279d8f..f22b9be5f52 100644 --- a/Three/include/CGAL/Three/Scene_item.h +++ b/Three/include/CGAL/Three/Scene_item.h @@ -305,7 +305,7 @@ public: //! virtual void newViewer(CGAL::Three::Viewer_interface* viewer) = 0; //! - //! \brief removeViewer removes the Vaos fo `viewer`. + //! \brief removeViewer removes the Vaos of `viewer`. //! //! Must be overridden; //! @@ -375,14 +375,14 @@ public Q_SLOTS: //!Emits an aboutToBeDestroyed() signal. //!Override this function to delete what needs to be deleted on destruction. - //!This might be needed as items are not always deleted right away by Qt and this behaviour may cause a simily + //!This might be needed as items are not always deleted right away by Qt and this behaviour may cause simply a //!memory leak, for example when multiple items are created at the same time. virtual void itemAboutToBeDestroyed(Scene_item*); //!Returns the alpha value for the item. //! Must be called within a valid openGl context. virtual float alpha() const; - //! Sets the value of the aplha Slider for this item. + //! Sets the value of the alpha Slider for this item. //! //! Must be overridden; //! \param alpha must be between 0 and 255 diff --git a/Three/include/CGAL/Three/Scene_item_rendering_helper.h b/Three/include/CGAL/Three/Scene_item_rendering_helper.h index 8e73d38987c..66857738ccc 100644 --- a/Three/include/CGAL/Three/Scene_item_rendering_helper.h +++ b/Three/include/CGAL/Three/Scene_item_rendering_helper.h @@ -51,7 +51,7 @@ public: //! //! \brief The `Gl_data_name` enum is used as a flag to specify what should be //! re-computed during `computeElements()`. The flag corresponding to this enum is - //! `Gl_data_names`, and multiple flags can be combined whith the operator `|`. + //! `Gl_data_names`, and multiple flags can be combined with the operator `|`. //! For instance, you can use `GEOMETRY|COLORS` as a single value. //! @todo Review Laurent Rineau We need to find a better name. 1. Do not refer to OpenGL. 2. Why "name"? //! diff --git a/Three/include/CGAL/Three/Scene_item_with_properties.h b/Three/include/CGAL/Three/Scene_item_with_properties.h index d6d3cab1845..e900fad06a5 100644 --- a/Three/include/CGAL/Three/Scene_item_with_properties.h +++ b/Three/include/CGAL/Three/Scene_item_with_properties.h @@ -26,7 +26,7 @@ namespace Three { class Scene_item; //! Base class to allow an item to copy properties from another. -//! Properties reprensent the current state of an item : its color, +//! Properties represent the current state of an item : its color, //! the position of its manipulated frame, ... class DEMO_FRAMEWORK_EXPORT Scene_item_with_properties { public: diff --git a/Three/include/CGAL/Three/Viewer_interface.h b/Three/include/CGAL/Three/Viewer_interface.h index a66f4afbf4b..c1330a12301 100644 --- a/Three/include/CGAL/Three/Viewer_interface.h +++ b/Three/include/CGAL/Three/Viewer_interface.h @@ -239,7 +239,7 @@ public Q_SLOTS: //! If b is true, faces will be ligted from both internal and external side. //! If b is false, only the side that is exposed to the light source will be lighted. virtual void setTwoSides(bool b) = 0; - //! If b is true, then a special color mask is applied to points and meshes to differenciate + //! If b is true, then a special color mask is applied to points and meshes to differentiate //! front-faced and back-faced elements. virtual void setBackFrontShading(bool b) =0; //! \brief sets the fast drawing mode @@ -266,7 +266,7 @@ public Q_SLOTS: virtual void SetOrthoProjection( bool b) =0; public: - //! Gives acces to recent openGL(4.3) features, allowing use of things like + //! Gives access to recent openGL(4.3) features, allowing use of things like //! Geometry Shaders or Depth Textures. //! @returns a pointer to an initialized QOpenGLFunctions_4_3_Core if `isOpenGL_4_3()` is `true` //! @returns nullptr if `isOpenGL_4_3()` is `false` diff --git a/Triangulation/benchmark/Triangulation/Td_vs_T2_and_T3.cpp b/Triangulation/benchmark/Triangulation/Td_vs_T2_and_T3.cpp index cb237ddd643..a608e6bc9dd 100644 --- a/Triangulation/benchmark/Triangulation/Td_vs_T2_and_T3.cpp +++ b/Triangulation/benchmark/Triangulation/Td_vs_T2_and_T3.cpp @@ -1,4 +1,4 @@ -// To deactivate statics filters in the 2D/3D case +// To deactivate static filters in the 2D/3D case //#define CGAL_NO_STATIC_FILTERS #include diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_full_cell.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_full_cell.h index 4248e2c6690..ba9f68848b1 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_full_cell.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_full_cell.h @@ -19,7 +19,7 @@ provides geometric types and predicates for use in the \tparam Data is an optional type of data to be stored in the full cell class. The class template `Triangulation_full_cell` accepts that no second parameter be specified. In this case, `Data` defaults to `CGAL::No_full_cell_data`. -`CGAL::No_full_cell_data` can explicitely be specified to access the third parameter. +`CGAL::No_full_cell_data` can explicitly be specified to access the third parameter. \tparam TriangulationDSFullCell_ must be a model of the concept `TriangulationDSFullCell`. diff --git a/Triangulation/doc/Triangulation/CGAL/Triangulation_vertex.h b/Triangulation/doc/Triangulation/CGAL/Triangulation_vertex.h index 14d54cbf60f..f3169d6a6d4 100644 --- a/Triangulation/doc/Triangulation/CGAL/Triangulation_vertex.h +++ b/Triangulation/doc/Triangulation/CGAL/Triangulation_vertex.h @@ -19,7 +19,7 @@ declaration of the `Point` type. \tparam Data is an optional type of data to be stored in the vertex class. The class template `Triangulation_vertex` accepts that no second parameter be specified. In this case, `Data` defaults to `CGAL::No_vertex_data`. -`CGAL::No_vertex_data` can be explicitely specified to allow to access the +`CGAL::No_vertex_data` can be explicitly specified to allow to access the third parameter. \tparam TriangulationDSVertex_ must be a model of the concept `TriangulationDSVertex`. The diff --git a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h index 3160ff8dadf..3e3228db4c9 100644 --- a/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h +++ b/Triangulation/doc/Triangulation/Concepts/TriangulationDataStructure.h @@ -245,7 +245,7 @@ bool is_full_cell(const Full_cell_handle & c) const; /*! This function computes (gathers) a connected set of full cells -satifying a common criterion. Call them good full cells. It is assumed +satisfying a common criterion. Call them good full cells. It is assumed that the argument `start` is a good full cell. The full cells are then recursively explored by examining if, from a given good full cell, its adjacent full cells are also good. @@ -335,7 +335,7 @@ Iterator to the first vertex of `tds`. User has no control on the order. Vertex_iterator vertices_begin(); /*! -Iterator refering beyond the last vertex of `tds`. +Iterator referring beyond the last vertex of `tds`. */ Vertex_iterator vertices_end(); @@ -365,7 +365,7 @@ Iterator to the first full cell of `tds`. User has no control on the order. Full_cell_iterator full_cells_begin(); /*! -Iterator refering beyond the last full cell of `tds`. +Iterator referring beyond the last full cell of `tds`. */ Full_cell_iterator full_cells_end(); @@ -380,7 +380,7 @@ Iterator to the first facet of the triangulation. Facet_iterator facets_begin(); /*! -Iterator refering beyond the last facet of the triangulation. +Iterator referring beyond the last facet of the triangulation. */ Facet_iterator facets_end(); diff --git a/Triangulation/examples/Triangulation/convex_hull.cpp b/Triangulation/examples/Triangulation/convex_hull.cpp index 4d36fcdfd07..761b7e32b32 100644 --- a/Triangulation/examples/Triangulation/convex_hull.cpp +++ b/Triangulation/examples/Triangulation/convex_hull.cpp @@ -12,7 +12,7 @@ const int D = 4; typedef CGAL::Epick_d< CGAL::Dimension_tag > K; typedef CGAL::Delaunay_triangulation T; -// The triangulation uses the default instanciation of the +// The triangulation uses the default instantiation of the // TriangulationDataStructure template parameter int main(int argc, char **argv) diff --git a/Triangulation/include/CGAL/Delaunay_triangulation.h b/Triangulation/include/CGAL/Delaunay_triangulation.h index 8572516de14..262f451fdc1 100644 --- a/Triangulation/include/CGAL/Delaunay_triangulation.h +++ b/Triangulation/include/CGAL/Delaunay_triangulation.h @@ -523,7 +523,7 @@ Delaunay_triangulation // 2. Find corresponding Facet on boundary of dark zone // 3. stitch. - // 1. Build a facet on the boudary of the light zone: + // 1. Build a facet on the boundary of the light zone: Full_cell_handle light_s = *simps.begin(); Facet light_ft(light_s, light_s->index(v)); diff --git a/Triangulation/include/CGAL/Regular_triangulation.h b/Triangulation/include/CGAL/Regular_triangulation.h index 86075657b06..2d63893e38a 100644 --- a/Triangulation/include/CGAL/Regular_triangulation.h +++ b/Triangulation/include/CGAL/Regular_triangulation.h @@ -652,7 +652,7 @@ Regular_triangulation // 2. Find corresponding Facet on boundary of dark zone // 3. stitch. - // 1. Build a facet on the boudary of the light zone: + // 1. Build a facet on the boundary of the light zone: Full_cell_handle light_s = *simps.begin(); Facet light_ft(light_s, light_s->index(v)); diff --git a/Triangulation/test/Triangulation/test_delaunay.cpp b/Triangulation/test/Triangulation/test_delaunay.cpp index bd31a2c7582..bab05e60662 100644 --- a/Triangulation/test/Triangulation/test_delaunay.cpp +++ b/Triangulation/test/Triangulation/test_delaunay.cpp @@ -19,7 +19,7 @@ void test(const int d, const string & type, const int N) { // we must write 'typename' below, because we are in a template-function, // so the parser has no way to know that DC contains sub-types, before - // instanciating the function. + // instantiating the function. typedef typename DC::Full_cell_handle Full_cell_handle; typedef typename DC::Face Face; typedef typename DC::Point Point; diff --git a/Triangulation/test/Triangulation/test_tds.cpp b/Triangulation/test/Triangulation/test_tds.cpp index a9e0154b16c..e87d57a13f3 100644 --- a/Triangulation/test/Triangulation/test_tds.cpp +++ b/Triangulation/test/Triangulation/test_tds.cpp @@ -11,7 +11,7 @@ void test(const int d, const string & type) { // we must write 'typename' below, because we are in a template-function, // so the parser has no way to know that TDS contains sub-types, before - // instanciating the function. + // instantiating the function. typedef typename TDS::Vertex_handle Vertex_handle; typedef typename TDS::Vertex_iterator Vertex_iterator; typedef typename TDS::Full_cell_handle Full_cell_handle; diff --git a/Triangulation/test/Triangulation/test_torture.cpp b/Triangulation/test/Triangulation/test_torture.cpp index 1e0e5c45a31..0d4889c8c5c 100644 --- a/Triangulation/test/Triangulation/test_torture.cpp +++ b/Triangulation/test/Triangulation/test_torture.cpp @@ -20,7 +20,7 @@ void test(const int D, const int d, const int N, bool no_transform) { // we must write 'typename' below, because we are in a template-function, // so the parser has no way to know that DC contains sub-types, before - // instanciating the function. + // instantiating the function. typedef typename DC::Point Point; typedef typename DC::Geom_traits::RT RT; diff --git a/Triangulation/test/Triangulation/test_triangulation.cpp b/Triangulation/test/Triangulation/test_triangulation.cpp index e913825dbaa..dae3afeb3a6 100644 --- a/Triangulation/test/Triangulation/test_triangulation.cpp +++ b/Triangulation/test/Triangulation/test_triangulation.cpp @@ -16,7 +16,7 @@ void test(const int d, const string & type, int N) { // we must write 'typename' below, because we are in a template-function, // so the parser has no way to know that T contains sub-types, before - // instanciating the function. + // instantiating the function. typedef typename T::Full_cell_handle Full_cell_handle; typedef typename T::Point Point; typedef typename T::Geom_traits::RT RT; diff --git a/Triangulation_2/TODO b/Triangulation_2/TODO index c4e68d1d6f0..a93ed96ea5b 100644 --- a/Triangulation_2/TODO +++ b/Triangulation_2/TODO @@ -33,7 +33,7 @@ ou de la face infini - doc : relier nerarest-vertex queries a localisation dans Voronoi - doc de la triangulation reguliere a mettre a jour - input output of regular triangulation - (may be outputing for each face the hidden points + (may be outputting for each face the hidden points in the output operator for faces) could be envisaged in a more thoroughfull treatment of input-output operation @@ -41,7 +41,7 @@ ou de la face infini temp< Pointit, OutFacesIt> bool finite_faces_inside( Pointit begin, Pointit end, OutFacesIt fit) given a range of point, find all finites faces inside or intersecting - the polygon discribed by the sequence of points. + the polygon described by the sequence of points. bool = false if none is found - bencher Delaunay_2 avec un insert utilisant find_conflict + star_hole diff --git a/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt b/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt index 641b2095e10..1c9dc8781e2 100644 --- a/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt +++ b/Triangulation_2/doc/Triangulation_2/Triangulation_2.txt @@ -1224,7 +1224,7 @@ at the different levels of the hierarchy. \cgalExample{Triangulation_2/hierarchy.cpp} The following program shows how to use -a triangulation hierarchy in conjunction with a constrained triangulation with a constaint hierarchy. +a triangulation hierarchy in conjunction with a constrained triangulation with a constraint hierarchy. \cgalExample{Triangulation_2/constrained_hierarchy_plus.cpp} diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 1db5d55874a..353539b9fc9 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -961,7 +961,7 @@ remove(Vertex_handle v) // // insert point p in edge(f,i) // // bypass the precondition for point a to be in edge(f,i) // // update constrained status -// // this member fonction is not robust with exact predicates +// // this member function is not robust with exact predicates // // and approximate construction. Should be removed // { // Vertex_handle vh=Ctr::special_insert_in_edge(a,f,i); diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 11531498530..042a4ca06c7 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -46,7 +46,7 @@ struct Exact_intersections_tag{}; // to be used with an exact number type struct Exact_predicates_tag{}; // to be used with filtered exact number // This was deprecated and replaced by ` No_constraint_intersection_tag` and `No_constraint_intersection_requiring_constructions_tag` -// due to an inconsistency between the code and the documenation. +// due to an inconsistency between the code and the documentation. struct CGAL_DEPRECATED No_intersection_tag : public No_constraint_intersection_requiring_constructions_tag { }; @@ -608,7 +608,7 @@ public: return out; } - // the following fonctions are overloaded + // the following functions are overloaded // to take care of constraint marks template Vertex_handle star_hole( const Point& p, diff --git a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h index f730bb08efc..5f066d7114a 100644 --- a/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Delaunay_triangulation_2.h @@ -193,7 +193,7 @@ private: void propagating_flip(const Face_handle& f,int i); #endif -// auxilliary functions for remove +// auxiliary functions for remove void remove_degree_init(Vertex_handle v, std::vector &f, std::vector &w, std::vector &i,int&d,int&maxd); void remove_degree_triangulate(Vertex_handle v, std::vector &f, @@ -269,7 +269,7 @@ private: std::vector &w, std::vector &i); void remove_degree7_rightfan (Vertex_handle&,int,std::vector &f, std::vector &w, std::vector &i); -// end of auxilliary functions for remove +// end of auxiliary functions for remove Vertex_handle nearest_vertex_2D(const Point& p, Face_handle f) const; Vertex_handle nearest_vertex_1D(const Point& p) const; diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 66ccda87d47..dd67392b84c 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -1696,7 +1696,7 @@ Triangulation_2:: fill_hole(Vertex_handle v, std::list< Edge > & hole) { // uses the fact that the hole is starshaped - // with repect to v->point() + // with respect to v->point() typedef std::list Hole; Face_handle ff, fn; @@ -1803,7 +1803,7 @@ fill_hole(Vertex_handle v, std::list< Edge > & hole) // now hole has three edges typename Hole::iterator hit; hit = hole.begin(); -// // I don't know why the following yelds a segmentation fault +// // I don't know why the following yields a segmentation fault // create_face( (*hit).first, (*hit).second, // (* ++hit).first, (*hit).second, // (* ++hit).first, (*hit).second); @@ -1821,7 +1821,7 @@ Triangulation_2:: fill_hole(Vertex_handle v, std::list & hole, OutputItFaces fit) { // uses the fact that the hole is starshaped - // with repect to v->point() + // with respect to v->point() typedef std::list Hole; Face_handle ff, fn; @@ -1928,7 +1928,7 @@ fill_hole(Vertex_handle v, std::list & hole, OutputItFaces fit) // now hole has three edges typename Hole::iterator hit; hit = hole.begin(); -// // I don't know why the following yelds a segmentation fault +// // I don't know why the following yields a segmentation fault // create_face( (*hit).first, (*hit).second, // (* ++hit).first, (*hit).second, // (* ++hit).first, (*hit).second); diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h index ceb6d598707..63ecf75fb7c 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Constraint_hierarchy_2.h @@ -208,7 +208,7 @@ template void Constraint_hierarchy_2:: copy(const Constraint_hierarchy_2& ch1, std::map& vmap) - // copy with a tranfer vertex map + // copy with a transfer vertex map { clear(); // copy c_to_sc_map @@ -457,7 +457,7 @@ remove_constraint(T va, T vb){ CGAL_assertion(scit != sc_to_c_map.end()); H_context_list* hcl = scit->second; - // and remove the constraint from the context list of the subcosntraints + // and remove the constraint from the context list of the subconstraints for(H_context_iterator ctit=hcl->begin(); ctit != hcl->end(); ctit++) { if(ctit->enclosing == hvl){ hcl->erase(ctit); diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_triang_plus_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_triang_plus_2.h index 2bb814db36d..e2cc92ba8b7 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_triang_plus_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_triang_plus_2.h @@ -46,7 +46,7 @@ _test_cls_const_triang_plus_2( const TrP & ) trp.push_back(Constraint(Point(4,3), Point(3,4))); // test access to the hierarchy - std::cout << " test acces to the constraint hierarchy" << std::endl; + std::cout << " test access to the constraint hierarchy" << std::endl; Vertices_in_constraint_iterator vit = trp.vertices_in_constraint_begin(cid); assert (*vit == vh[10] || *vit == vh[11] ); Vertex_handle va = *++vit; diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_traits.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_traits.h index b472c7fc8d2..29e66a38e1b 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_traits.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_traits.h @@ -27,7 +27,7 @@ namespace CGAL { -// Create a mininal traits class +// Create a minimal traits class class Triangulation_test_point { public: typedef Triangulation_test_point Point; diff --git a/Triangulation_2/test/Triangulation_2/test_delaunay_triangulation_2.cpp b/Triangulation_2/test/Triangulation_2/test_delaunay_triangulation_2.cpp index 8b23ef4c0b7..f58585c4810 100644 --- a/Triangulation_2/test/Triangulation_2/test_delaunay_triangulation_2.cpp +++ b/Triangulation_2/test/Triangulation_2/test_delaunay_triangulation_2.cpp @@ -25,7 +25,7 @@ #if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4661) // Explicit instantiation will not - // instatiate template member functions + // instantiate template member functions #endif diff --git a/Triangulation_3/TODO b/Triangulation_3/TODO index 93ab1024c36..01707e3e30c 100644 --- a/Triangulation_3/TODO +++ b/Triangulation_3/TODO @@ -7,7 +7,7 @@ TDS and it gives 4 cells back). - More compact representation [inspired by a CUJ article for lists] : instead of having a cell which stores 4 vertex pointers, it only stores the - XOR of them. And a Cell_handle now additionaly stores the 4 vertex pointers + XOR of them. And a Cell_handle now additionally stores the 4 vertex pointers of the cell, the "context". One problem is the Cell_iterator : it loses the context, so I think that one way to work around this is to write the Cell_iterator as based on the diff --git a/Triangulation_3/demo/Triangulation_3/Viewer.cpp b/Triangulation_3/demo/Triangulation_3/Viewer.cpp index 526dc7a2932..3975e951dc5 100644 --- a/Triangulation_3/demo/Triangulation_3/Viewer.cpp +++ b/Triangulation_3/demo/Triangulation_3/Viewer.cpp @@ -621,7 +621,7 @@ void Viewer::initialize_buffers() buffers[7].release(); vao[7].release(); - //Querry Point + //Query Point vao[8].bind(); buffers[8].bind(); buffers[8].allocate(pos_queryPoint->data(), pos_queryPoint->size()*sizeof(float)); @@ -863,7 +863,7 @@ void Viewer::initialize_buffers() } vao[16].release(); - //Querry point Sphere + //Query point Sphere vao[17].bind(); buffers[8].bind(); centerLocation[0] = rendering_program_spheres.attributeLocation("center"); @@ -2381,7 +2381,7 @@ void Viewer::toggleIncremental(bool on) { }//end-if-pts // sorts points in a way that improves space locality CGAL::spatial_sort( m_incrementalPts.begin(), m_incrementalPts.end() ); - // set the current to "hightlight the new point" + // set the current to "highlight the new point" m_curStep = INIT; }/* else resume play */ @@ -2472,7 +2472,7 @@ void Viewer::incremental_insert() { }//end-for // erase existing vertices initClean(); - // set the current to "hightlight the new point" + // set the current to "highlight the new point" m_curStep = INIT; } diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h index ee3290db8a7..dbfb816794c 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_3.h @@ -35,7 +35,7 @@ typedef Traits::Point_3 Point; As a model of the concept `DelaunayTriangulationCellBase_3`, `Delaunay_triangulation_cell_base_3` -provides a `circumcenter()` member fonction. +provides a `circumcenter()` member function. */ /// @{ diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h index ab8746d260e..171084a2170 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Delaunay_triangulation_cell_base_with_circumcenter_3.h @@ -38,7 +38,7 @@ typedef Traits::Point_3 Point; As a model of the concept `DelaunayTriangulationCellBase_3`, `Delaunay_triangulation_cell_base_3` -provides a `circumcenter()` member fonction. +provides a `circumcenter()` member function. If it has already been computed in the past, the cached value is returned. */ diff --git a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h index 24d0f9ed64e..39d05eb11c6 100644 --- a/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h +++ b/Triangulation_3/doc/Triangulation_3/CGAL/Regular_triangulation_cell_base_with_weighted_circumcenter_3.h @@ -42,9 +42,9 @@ typedef Traits::Weighted_point_3 Point; As a model of the concept `RegularTriangulationCellBase_3`, `Regular_triangulation_cell_base_with_weighted_circumcenter_3` -provides a `weighted_circumcenter()` member fonction. +provides a `weighted_circumcenter()` member function. -In this model, the `weighted_circumcenter()` member fonction returns the weighted circumcenter +In this model, the `weighted_circumcenter()` member function returns the weighted circumcenter of the cell. This `Point_3` is computed using the `Construct_weighted_circumcenter_3` functor of the traits class when this function is first called and its value is stored. diff --git a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt index 54b01bdaa9b..f8ebae52e97 100644 --- a/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt +++ b/Triangulation_3/doc/Triangulation_3/Triangulation_3.txt @@ -543,7 +543,7 @@ be hidden and do not result in vertices in the triangulation. \subsubsection Triangulation_3RegularTriangulationInfo Regular Triangulation with Custom Vertex This example shows that one must use the class `Regular_triangulation_vertex_base_3` as vertex base class, -if one has to specifiy the template parameter. +if one has to specify the template parameter. \cgalExample{Triangulation_3/regular_with_info_3.cpp} diff --git a/Triangulation_3/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp b/Triangulation_3/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp index 9cf87f57ff4..efd1ac780d4 100644 --- a/Triangulation_3/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp +++ b/Triangulation_3/examples/Triangulation_3/parallel_insertion_and_removal_in_regular_3.cpp @@ -36,7 +36,7 @@ int main() // Construct the locking data-structure, using the bounding-box of the points Rt::Lock_data_structure locking_ds( CGAL::Bbox_3(-1., -1., -1., 1., 1., 1.), 50); - // Contruct the triangulation in parallel + // Construct the triangulation in parallel std::cerr << "Construction and insertion" << std::endl; Rt rtr(V.begin(), V.end(), &locking_ds); diff --git a/Triangulation_3/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h b/Triangulation_3/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h index e90165ee89a..0ab43248e21 100644 --- a/Triangulation_3/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h +++ b/Triangulation_3/include/CGAL/Robust_weighted_circumcenter_filtered_traits_3.h @@ -54,7 +54,7 @@ public: if(! force_exact) { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_circumcenterC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -86,7 +86,7 @@ public: { CGAL_precondition(! traits.collinear_3_object()(p, q, r)); - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_circumcenterC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), @@ -171,7 +171,7 @@ public: typename Kernel::Compute_squared_radius_3 sq_radius = traits.compute_squared_radius_3_object(); - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 const FT denom = compute_denom(p,q,r,s); if( ! CGAL_NTS is_zero(denom) ) { @@ -265,7 +265,7 @@ public: if(! force_exact) { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; bool unweighted = (p.weight() == 0) && (q.weight() == 0) && (r.weight() == 0) && (s.weight() == 0); @@ -333,7 +333,7 @@ public: typename Kernel::Side_of_bounded_sphere_3 side_of_bounded_sphere = traits.side_of_bounded_sphere_3_object(); - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -417,7 +417,7 @@ public: const Weighted_point_3& r, const Weighted_point_3& s) const { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -447,7 +447,7 @@ public: const Weighted_point_3& q, const Weighted_point_3& r) const { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT num_x, num_y, num_z, den; determinants_for_weighted_circumcenterC3(p.x(), p.y(), p.z(), p.weight(), q.x(), q.y(), q.z(), q.weight(), @@ -475,7 +475,7 @@ public: FT operator()(const Weighted_point_3& p, const Weighted_point_3& q) const { - // Compute denominator to swith to exact if it is 0 + // Compute denominator to switch to exact if it is 0 FT qpx = q.x() - p.x(); FT qpy = q.y() - p.y(); FT qpz = q.z() - p.z(); diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 336f7f1bd24..add6a8519f9 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1471,7 +1471,7 @@ protected: } private: - // Here are the conflit tester function objects passed to + // Here are the conflict tester function objects passed to // insert_conflict_[23]() by insert_outside_convex_hull(). class Conflict_tester_outside_convex_hull_3 { diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 9aca45fae91..904421786ba 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -223,7 +223,7 @@ public: */ const Point& source() const { return _source; } - // gives the target point of the segment follwoed. + // gives the target point of the segment followed. /* \return the target point. */ const Point& target() const { return _target; } @@ -277,7 +277,7 @@ public: } // provides a conversion operator. - /* \return the simplex through wich the current cell was entered. + /* \return the simplex through which the current cell was entered. */ operator Simplex() const { return _cur; } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h index 1a6f6d7e78a..315e4b61a13 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_delaunay_3.h @@ -583,7 +583,7 @@ _test_cls_delaunay_3(const Triangulation &) size_type m = Tdel.remove(vertices.begin(), vertices.end()); assert(m == n - Tdel.number_of_vertices()); assert(Tdel.is_valid(false)); - std::cout << " successfull" << std::endl; + std::cout << " successful" << std::endl; } @@ -651,7 +651,7 @@ _test_cls_delaunay_3(const Triangulation &) std::cout << " Testing nearest_vertex()" << std::endl; // We do a nearest_vertex() and two nearest_vertex_in_cell() // queries on all points with integer coordinate - // in the cube [-1;6]^3. In each case we check explicitely that the + // in the cube [-1;6]^3. In each case we check explicitly that the // output is correct by comparing distance to other vertices. Cell_handle c1 = T3_13.finite_cells_begin(); Cell_handle c2 = T3_13.infinite_vertex()->cell(); diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h index 84f8cafb8c1..e93418c19cf 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_parallel_triangulation_3.h @@ -72,7 +72,7 @@ _test_cls_parallel_triangulation_3(const Parallel_triangulation &) // Construct the locking data-structure, using the bounding-box of the points typename Cls::Lock_data_structure locking_ds(CGAL::Bbox_3(-1., -1., -1., 1., 1., 1.), 50); - // Contruct the triangulation in parallel + // Construct the triangulation in parallel std::cout << "Construction and parallel insertion" << std::endl; Cls tr(points.begin(), points.end(), &locking_ds); std::cout << "Triangulation has " << tr.number_of_vertices() << " vertices" << std::endl; diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h index 9790692fd90..c8775dabbe2 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_3.h @@ -584,7 +584,7 @@ _test_cls_triangulation_3(const Triangulation &) // std::cout << " done" << std::endl; - // Test inserts function separatelly. + // Test inserts function separately. std::cout << " Testing insertions " << std::endl; Locate_type lt; diff --git a/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp b/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp index a3511fcb22c..35d2acc07c9 100644 --- a/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_dt_deterministic_3.cpp @@ -40,7 +40,7 @@ int main() buffer >> computed; if ( original!=computed ){ - std::cout <<"Error: triangulations are differents"<< std::endl; + std::cout <<"Error: triangulations are different"<< std::endl; std::cout << "|" << original <<"| vs |"<< computed << "|"<< std::endl; return EXIT_FAILURE; } diff --git a/Triangulation_3/test/Triangulation_3/test_regular_3.cpp b/Triangulation_3/test/Triangulation_3/test_regular_3.cpp index 430a2dee4ed..4aa9fa0654d 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_regular_3.cpp @@ -186,7 +186,7 @@ void test_RT() T111.insert(wp1); T111.insert(wp2); T111.insert(wp3); - T111.insert(wp13); // it doesnot work inserting wp13 here + T111.insert(wp13); // it doesn't work inserting wp13 here T111.insert(wp4); T111.insert(wp5); T111.insert(wp6); diff --git a/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp b/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp index f982cec76cb..675380a0684 100644 --- a/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp +++ b/Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info.cpp @@ -69,7 +69,7 @@ struct Tester // Construct the locking data-structure, using the bounding-box of the points typename RT_parallel::Lock_data_structure locking_ds(CGAL::Bbox_3(-1., 0., 0., 2, 2, 2), 50); - // Contruct the triangulation in parallel + // Construct the triangulation in parallel RT_parallel R(static_cast(points).begin(), static_cast(points).end(), &locking_ds); assert(R.number_of_vertices() == 9); @@ -124,7 +124,7 @@ struct Tester // Construct the locking data-structure, using the bounding-box of the points typename RT_parallel::Lock_data_structure locking_ds(CGAL::Bbox_3(-1., 0., 0., 2, 2, 2), 50); - // Contruct the triangulation in parallel + // Construct the triangulation in parallel RT_parallel R(boost::make_zip_iterator(boost::make_tuple(static_cast(points).begin(), indices.begin())), boost::make_zip_iterator(boost::make_tuple(static_cast(points).end(), indices.end())), &locking_ds); @@ -183,7 +183,7 @@ struct Tester // Construct the locking data-structure, using the bounding-box of the points typename RT_parallel::Lock_data_structure locking_ds(CGAL::Bbox_3(-1., 0., 0., 2, 2, 2), 50); - // Contruct the triangulation in parallel + // Construct the triangulation in parallel RT_parallel R(boost::make_transform_iterator(static_cast(points).begin(), Auto_count()), boost::make_transform_iterator(static_cast(points).end(), Auto_count()), &locking_ds); diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index 865b4681f0c..4245bf18870 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -34,7 +34,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) # Include this package's headers first include_directories(BEFORE ./ ./include) - # ui file, created wih Qt Designer + # ui file, created with Qt Designer qt5_wrap_ui( uis Mainwindow.ui ) #qt5_generate_moc( main.cpp Mainwindow.moc) diff --git a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h index 8a328f04a49..4e8263a3a47 100644 --- a/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h +++ b/Triangulation_on_sphere_2/include/CGAL/Triangulation_on_sphere_2/internal/get_precision_bounds.h @@ -25,7 +25,7 @@ namespace CGAL { namespace Triangulations_on_sphere_2 { namespace internal { -// @todo could do something more suble than requiring exact SQRT representation (Root_of_2 etc.) +// @todo could do something more subtle than requiring exact SQRT representation (Root_of_2 etc.) template (&obj); // compute non regularized visibility area - // Define visibiliy object type that computes non-regularized visibility area + // Define visibility object type that computes non-regularized visibility area typedef CGAL::Simple_polygon_visibility_2 NSPV; Arrangement_2 non_regular_output; NSPV non_regular_visibility(env); @@ -56,7 +56,7 @@ int main() { // compute non regularized visibility area - // Define visibiliy object type that computes regularized visibility area + // Define visibility object type that computes regularized visibility area typedef CGAL::Simple_polygon_visibility_2 RSPV; Arrangement_2 regular_output; RSPV regular_visibility(env); diff --git a/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h b/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h index a40ef5cb3e0..f5cf4d1873d 100644 --- a/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h +++ b/Visibility_2/include/CGAL/Simple_polygon_visibility_2.h @@ -205,7 +205,7 @@ namespace CGAL { mutable Arr_point_location point_location; - /*! Stack of visibile points; manipulated when going through the sequence + /*! Stack of visible points; manipulated when going through the sequence of input vertices; contains the vertices of the visibility region after the run of the algorithm*/ mutable std::stack stack; @@ -340,7 +340,7 @@ namespace CGAL { /*! Main method of the algorithm - initializes the stack and variables - and calles the corresponding methods acc. to the algorithm's state; + and calls the corresponding methods acc. to the algorithm's state; 'q' - query point; 'i' - current vertex' index 'w' - endpoint of ray shot from query point */ @@ -589,7 +589,7 @@ namespace CGAL { } } - /*! Find the first edge interecting the segment (v_0, s_t) */ + /*! Find the first edge intersecting the segment (v_0, s_t) */ void scanb(Size_type& i, Point_2& w) const { if ( i == vertices.size() - 1 ) { upcase = FINISH; diff --git a/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h b/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h index f8a723265d5..408bf95c847 100644 --- a/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h +++ b/Visibility_2/include/CGAL/Triangular_expansion_visibility_2.h @@ -481,7 +481,7 @@ private: //std::cout << vh->point() <<" -3- "<< nvh->point() <point(),nvh->point())); } - // but we may also contiue looking along the vertex + // but we may also continue looking along the vertex if(!p_cdt->is_constrained(re)) { collect_needle(q,nvh,nfh,rindex); } @@ -564,7 +564,7 @@ private: //std::cout<< "h1 done"<< std::endl; return oit; }else{ - // spliting at new vertex + // splitting at new vertex //std::cout<< "h2"<< std::endl; *oit++ = expand_edge(q,nvh->point(),right,nfh,rindex,oit); //std::cout<< "h2 done"<< std::endl; @@ -581,7 +581,7 @@ private: //std::cout << "rvh->point() "<< rvh->point() << std::endl<< std::endl; - // determin whether new vertex needs to be reported + // determine whether new vertex needs to be reported if(ro != CGAL::CLOCKWISE && lo != CGAL::COUNTERCLOCKWISE){ *oit++ = nvh->point(); } @@ -601,7 +601,7 @@ private: if(lo == CGAL::CLOCKWISE){ if(p_cdt->is_constrained(le)){ // the edge is constrained - // report interesection with right boarder if exists + // report intersection with right boarder if exists if(ro == CGAL::CLOCKWISE){ *oit++ = ray_seg_intersection(q,right,nvh->point(),lvh->point()); } @@ -620,7 +620,7 @@ private: //std::cout<< "h3 done"<< std::endl; return oit; }else{ - // spliting at new vertex + // splitting at new vertex //std::cout<< "h4"<< std::endl; oit = expand_edge(q,left,nvh->point(),nfh,lindex,oit); //std::cout<< "h4 done"<< std::endl; diff --git a/Voronoi_diagram_2/doc/Voronoi_diagram_2/Voronoi_diagram_2.txt b/Voronoi_diagram_2/doc/Voronoi_diagram_2/Voronoi_diagram_2.txt index 26640ab6d16..2ee66c16c18 100644 --- a/Voronoi_diagram_2/doc/Voronoi_diagram_2/Voronoi_diagram_2.txt +++ b/Voronoi_diagram_2/doc/Voronoi_diagram_2/Voronoi_diagram_2.txt @@ -491,7 +491,7 @@ location queries. \section secvda2drawvoronoi Draw a Voronoi Diagram A 2D Voronoi Diagram can be visualized by calling the \link PkgDrawVoronoiDiagram2 CGAL::draw() \endlink function as -shown in the following example. This function opens a new window showing the Voronoi Diagram of the given input sites/vertix locations. A call to this function is blocking, that is the program continues as soon as the user closes the window. +shown in the following example. This function opens a new window showing the Voronoi Diagram of the given input sites/vertex locations. A call to this function is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt5`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5` and add the definition `CGAL_USE_BASIC_VIEWER`. diff --git a/Weights/include/CGAL/Weights/internal/utils.h b/Weights/include/CGAL/Weights/internal/utils.h index 4e6ef42f96c..c27b39e66cd 100644 --- a/Weights/include/CGAL/Weights/internal/utils.h +++ b/Weights/include/CGAL/Weights/internal/utils.h @@ -193,7 +193,7 @@ namespace internal { } } - // Computes tanget between two 2D vectors. + // Computes tangent between two 2D vectors. template typename GeomTraits::FT tangent_2( const GeomTraits& traits, @@ -303,7 +303,7 @@ namespace internal { } } - // Computes tanget between two 3D vectors. + // Computes tangent between two 3D vectors. template typename GeomTraits::FT tangent_3( const GeomTraits& traits, From 96a8d910d3c9a8909e1eb4bf16351e6945220779 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 16 Nov 2022 13:45:12 +0100 Subject: [PATCH 161/426] spelling corrections New dircionary --- .../Approximate_min_ellipsoid_d_debug.h | 2 +- .../doc/Combinatorial_map/Concepts/GenericMap.h | 8 ++++---- .../CGAL/Envelope_3/Env_plane_traits_3_functions.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h index fc576c54583..f159077a840 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Approximate_min_ellipsoid_d_debug.h @@ -255,7 +255,7 @@ namespace CGAL { class Eps_export_2 { // An instance of the following class accepts circles and ellipses - // and procudes an Enhanced-PostScript figure. + // and produces an Enhanced-PostScript figure. public: enum Stroke_mode { Solid=0, Solid_filled=1, Dashed=2 }; enum Label_mode { None, Angle, Random_angle }; diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h index 9dda13fc7ef..530aa1a2b80 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/GenericMap.h @@ -450,28 +450,28 @@ template const Attribute_type::type::Info& info_of_attribute(typename Attribute_const_descriptor::type ah) const; /*! -A shorcut for \link GenericMap::info_of_attribute `info_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`. +A shortcut for \link GenericMap::info_of_attribute `info_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`. \pre \link GenericMap::attribute `attribute`\endlink`(adart)!=nullptr`. */ template typename Attribute_type::type::Info & info(Dart_descriptor adart); /*! -A shorcut for \link GenericMap::info_of_attribute(typename Attribute_const_descriptor::type)const `info_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor. +A shortcut for \link GenericMap::info_of_attribute(typename Attribute_const_descriptor::type)const `info_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor. \pre \link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart)!=nullptr`. */ template const typename Attribute_type::type::Info & info(Dart_const_descriptor adart) const; /*! -A shorcut for \link GenericMap::dart_of_attribute `dart_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`. +A shortcut for \link GenericMap::dart_of_attribute `dart_of_attribute`\endlink`(`\link GenericMap::attribute `attribute`\endlink`(adart))`. \pre `attribute(adart)!=nullptr`. */ template Dart_descriptor & dart(Dart_descriptor adart); /*! -A shorcut for \link GenericMap::dart_of_attribute(typename Attribute_const_descriptor::type)const `dart_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor. +A shortcut for \link GenericMap::dart_of_attribute(typename Attribute_const_descriptor::type)const `dart_of_attribute`\endlink`(`\link GenericMap::attribute(Dart_const_descriptor)const `attribute`\endlink`(adart))` for const descriptor. \pre `attribute(adart)!=nullptr`. */ template diff --git a/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h b/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h index b0facc7bee3..e0caf43d5cd 100644 --- a/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h +++ b/Envelope_3/include/CGAL/Envelope_3/Env_plane_traits_3_functions.h @@ -34,7 +34,7 @@ Object plane_half_plane_proj_intersection(const typename K::Plane_3 &h1, // intersect the two planes Object h_obj = k.intersect_3_object()(h1, h2); if(h_obj.is_empty()) - return Object(); // no intersection at all (paralles planes) + return Object(); // no intersection at all (parallel planes) Plane_3 p; if(assign(p, h_obj)) From b0fee15a64d3fa15be47b3b3f6ab8d1c02c1986d Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 16 Nov 2022 15:48:34 +0100 Subject: [PATCH 162/426] spelling corrections Correcting missing first part of file (and thus error during merge test for GitHub Actions) --- .../include/CGAL/Snap_rounding_kd_2.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index f38e7ed3366..ae424f2bc1c 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -1,4 +1,20 @@ -include +// Copyright (c) 2001, 2009, 2014 Tel-Aviv University (Israel), Max-Planck-Institute Saarbruecken (Germany). +// 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) : Eli Packer , +// Waqar Khan + +#ifndef CGAL_SNAP_ROUNDING_KD_2_H +#define CGAL_SNAP_ROUNDING_KD_2_H + +#include #include From d89d6b1b759175539c4050f48dbf9e0bd23cd285 Mon Sep 17 00:00:00 2001 From: SaillantNicolas <97436229+SaillantNicolas@users.noreply.github.com> Date: Wed, 16 Nov 2022 16:35:37 +0100 Subject: [PATCH 163/426] Fix javascript syntax --- .github/workflows/build_doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index b15b2658b6c..fe5614e4a78 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -155,7 +155,7 @@ jobs: if: ${{ failure() && steps.get_round.outputs.result != 'stop' }} with: script: | - const error = "${{steps.build_and_run.outputs.DoxygenError}}" + const error = `${{steps.build_and_run.outputs.DoxygenError}}` const msg = "There was an error while building the doc: \n"+error github.rest.issues.createComment({ owner: "CGAL", From 4af943d5ec351b7d1e4cc2c045f5f82c81de8517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 16 Nov 2022 20:05:20 +0100 Subject: [PATCH 164/426] delete random --- .../test/Surface_mesh_shortest_path/TestMesh.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 66ced595875..aaf41537b8b 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -72,6 +72,12 @@ struct TestMeshProgramInstance numIterations = 1; } + ~TestMeshProgramInstance() + { + if (randomizer) + delete randomizer; + } + size_t numIterations; std::string meshName; bool debugMode; From 781f9a29436bbdfa91fe155ed275901f895acbc9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 17 Nov 2022 10:25:10 +0100 Subject: [PATCH 165/426] spelling corrections After review: - outputhing -> outputting - neighbour -> neighbor --- .../CGAL/Arr_point_location/Td_X_trapezoid.h | 22 +++++++++---------- .../CGAL/Arr_point_location/Td_active_edge.h | 4 ++-- .../Td_active_fictitious_vertex.h | 2 +- .../Arr_point_location/Td_active_trapezoid.h | 22 +++++++++---------- .../Arr_point_location/Td_active_vertex.h | 2 +- .../Arr_point_location/Td_inactive_edge.h | 2 +- .../Td_inactive_fictitious_vertex.h | 2 +- .../Arr_point_location/Td_inactive_vertex.h | 2 +- .../Trapezoidal_decomposition_2.h | 4 ++-- .../Trapezoidal_decomposition_2_impl.h | 12 +++++----- .../Trapezoidal_decomposition_2_iostream.h | 12 +++++----- .../Arrangement_2/Arr_compute_zone_visitor.h | 2 +- .../gfx/Curve_renderer_2.h | 8 +++---- .../gfx/Curve_renderer_internals.h | 2 +- .../include/CGAL/Combinatorial_map.h | 2 +- Combinatorial_map/include/CGAL/Dart.h | 2 +- .../Cone_spanners_2/Plane_scan_tree_impl.h | 2 +- .../include/CGAL/Generalized_map.h | 2 +- .../examples/Jet_fitting_3/PolyhedralSurf.h | 2 +- .../Jet_fitting_3/PolyhedralSurf_rings.h | 2 +- .../include/CGAL/Polyhedral_envelope.h | 2 +- .../examples/Ridges_3/PolyhedralSurf_rings.h | 2 +- Ridges_3/include/CGAL/Umbilics.h | 2 +- .../Nearest_neighbor_searching.cpp | 2 +- .../Nearest_neighbor_searching_2D.cpp | 2 +- ...est_neighbor_searching_2D_user_defined.cpp | 2 +- .../Spatial_searching/distance_browsing.cpp | 2 +- .../searching_polyhedron_vertices.cpp | 2 +- .../searching_surface_mesh_vertices.cpp | 2 +- .../searching_with_point_with_info.cpp | 2 +- ...searching_with_point_with_info_inplace.cpp | 2 +- .../searching_with_point_with_info_pmap.cpp | 2 +- .../user_defined_point_and_distance.cpp | 4 ++-- .../CGAL/Incremental_neighbor_search.h | 2 +- .../Orthogonal_incremental_neighbor_search.h | 4 ++-- .../Building_kd_tree_with_own_pointtype.cpp | 2 +- .../Iterative_authalic_parameterizer_3.h | 6 ++--- .../Surface_sweep_2/Surface_sweep_2_impl.h | 8 +++---- 38 files changed, 80 insertions(+), 80 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index 9f10d237246..c81fafaaeac 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -45,7 +45,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ @@ -152,7 +152,7 @@ public: Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ + /*! Initialize the trapezoid's neighbors. */ CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0, Self* rb_ = 0, Self* rt_ = 0) { @@ -296,16 +296,16 @@ public: ptr()->e4 &= ~CGAL_TD_ON_TOP_BOUNDARY; } - /*! Set left bottom neighbour. */ + /*! Set left bottom neighbor. */ CGAL_TD_INLINE void set_lb(Self* lb) { ptr()->e5 = lb; } - /*! Set left top neighbour. */ + /*! Set left top neighbor. */ CGAL_TD_INLINE void set_lt(Self* lt) { ptr()->e6 = lt; } - /*! Set right bottom neighbour. */ + /*! Set right bottom neighbor. */ CGAL_TD_INLINE void set_rb(Self* rb) { ptr()->e7 = rb; } - /*! Set right top neighbour. */ + /*! Set right top neighbor. */ CGAL_TD_INLINE void set_rt(Self* rt) { ptr()->e8 = rt; } public: @@ -317,7 +317,7 @@ public: Td_X_trapezoid() { //define the initial trapezoid: left, right, btm, top are at infinity. - // its type is TD_TRAPEZOID ,it is on all boundaries, and has no neighbours + // its type is TD_TRAPEZOID ,it is on all boundaries, and has no neighbors PTR = new Trpz_parameter_space (Traits::vtx_at_left_infinity(), Traits::vtx_at_right_infinity(), @@ -647,16 +647,16 @@ public: return (ptr()->e4 & CGAL_TD_ON_ALL_BOUNDARIES) != 0; } - /*! Access left bottom neighbour. */ + /*! Access left bottom neighbor. */ Self* lb() const { return ptr()->e5; } - /*! Access left top neighbour. */ + /*! Access left top neighbor. */ Self* lt() const { return ptr()->e6; } - /*! Access right bottom neighbour. */ + /*! Access right bottom neighbor. */ Self* rb() const { return ptr()->e7; } - /*! Access right top neighbour. */ + /*! Access right top neighbor. */ Self* rt() const { return ptr()->e8; } /*! Access DAG node. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h index 9b82324fa33..2f400786e75 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h @@ -44,7 +44,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ @@ -144,7 +144,7 @@ public: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ + /*! Initialize the trapezoid's neighbors. */ inline void init_neighbours(boost::optional next) { set_next((next) ? *next : Td_map_item(0)); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index 0681f5b5779..06e13b29c24 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h @@ -43,7 +43,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index c61693a6616..84ba82d4fff 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -44,7 +44,7 @@ namespace CGAL { * bound the trapezoid from above and below. * There exist degenerate trapezoids called infinite trapezoid; this happens * when one of the four sides is on the parameter space boundary. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. */ template class Td_active_trapezoid : public Handle @@ -162,7 +162,7 @@ private: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ + /*! Initialize the trapezoid's neighbors. */ inline void init_neighbours(boost::optional lb, boost::optional lt, boost::optional rb, boost::optional rt) { @@ -227,16 +227,16 @@ private: } - /*! Set left bottom neighbour. */ + /*! Set left bottom neighbor. */ inline void set_lb(const Td_map_item& lb) { ptr()->lb = lb; } - /*! Set left top neighbour. */ + /*! Set left top neighbor. */ inline void set_lt(const Td_map_item& lt) { ptr()->lt = lt; } - /*! Set right bottom neighbour. */ + /*! Set right bottom neighbor. */ inline void set_rb(const Td_map_item& rb) { ptr()->rb = rb; } - /*! Set right top neighbour. */ + /*! Set right top neighbor. */ inline void set_rt(const Td_map_item& rt) { ptr()->rt = rt; } public: @@ -248,7 +248,7 @@ private: Td_active_trapezoid() { //define the initial trapezoid: left, right, btm, top are at infinity. - // has no neighbours + // has no neighbors PTR = new Data (Traits::empty_vtx_handle(), Traits::empty_vtx_handle(), @@ -392,16 +392,16 @@ private: is_on_bottom_boundary() || is_on_top_boundary() ); } - /*! Access left bottom neighbour. */ + /*! Access left bottom neighbor. */ Td_map_item& lb() const { return ptr()->lb; } - /*! Access left top neighbour. */ + /*! Access left top neighbor. */ Td_map_item& lt() const { return ptr()->lt; } - /*! Access right bottom neighbour. */ + /*! Access right bottom neighbor. */ Td_map_item& rb() const { return ptr()->rb; } - /*! Access right top neighbour. */ + /*! Access right top neighbor. */ Td_map_item& rt() const { return ptr()->rt; } /*! Access DAG node. */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h index 530debb43f8..514686d303d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_vertex.h @@ -44,7 +44,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h index f0187bf16ea..55c8e5a457b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_edge.h @@ -44,7 +44,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h index d6956380aa6..db3019d46b7 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_fictitious_vertex.h @@ -43,7 +43,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h index 93066874631..e9cad94daf8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_inactive_vertex.h @@ -43,7 +43,7 @@ namespace CGAL { * when one of the four sides is on the parameter space boundary. * Trapezoids are created as active and become inactive when Remove() member * function called. - * Each trapezoid has at most four neighbouring trapezoids. + * Each trapezoid has at most four neighboring trapezoids. * X_trapezoid structure can represent a real trapezoid, a Td-edge or an * edge-end (end point). */ diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h index f70204b0174..097e12d0dcb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2.h @@ -356,7 +356,7 @@ public: /* destription: - advances m_cur_item to one of the right neighbours according to the relation + advances m_cur_item to one of the right neighbors according to the relation between the separating Halfedge (m_sep) and the right() trapezoid point. precoditions: m_sep doesn't intersect any existing edges except possibly on common end @@ -1504,7 +1504,7 @@ public: // Remark: // Given an edge-degenerate trapezoid representing a Halfedge, // all the other trapezoids representing the Halfedge can be extracted - // via moving continuously to the left and right neighbours. + // via moving continuously to the left and right neighbors. Td_map_item insert(Halfedge_const_handle he); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h index fcc17f1d7cb..e7d8ae645f6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h @@ -1443,7 +1443,7 @@ is_last_edge(Halfedge_const_handle /* he */ , Td_map_item& vtx_item) // Remark: // Given an edge-degenerate trapezoid representing a Halfedge, // all the other trapezoids representing the Halfedge can be extracted -// via moving continuously to the left and right neighbours. +// via moving continuously to the left and right neighbors. template typename Trapezoidal_decomposition_2::Td_map_item Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) @@ -1587,7 +1587,7 @@ Trapezoidal_decomposition_2::insert(Halfedge_const_handle he) old_top_tr = prev_top_tr; m_number_of_dag_nodes--; //update number of DAG nodes after merge } - // update trapezoid's left/right neighbouring relations + // update trapezoid's left/right neighboring relations //MICHAL: if the assertion below fails then we need to check why CGAL_assertion(!traits->is_td_trapezoid(prev)); if (traits->is_td_trapezoid(prev)) { @@ -1661,7 +1661,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item)); Dag_node& p2_node = *(boost::apply_visitor(dag_node_visitor(), p2_item)); - //calculate the immediate lower, central and upper neighbourhood of + //calculate the immediate lower, central and upper neighborhood of // the curve in the data structure //In_face_iterator btm_it(follow_curve(tt1,he,SMALLER)); In_face_iterator btm_it(follow_curve(p1_node,he,SMALLER)); @@ -1764,7 +1764,7 @@ void Trapezoidal_decomposition_2::remove(Halfedge_const_handle he) //curr_it_tr = *(curr_it.trp()); end_reached = !btm_it || !top_it; - //copy neighbouring trapezoids in case top/btm are not the same for the old + //copy neighboring trapezoids in case top/btm are not the same for the old // trapezoid and the next trapezoid after incrementing the old one if (!btm_it || (inc_btm && !traits->is_trpz_bottom_equal(old_tr_item, *curr_it))) @@ -2409,7 +2409,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // // update top curves // bottom_tt.left_child()->set_top(left_he); // bottom_tt.right_child()->set_top(right_he); -// // left and right are not neighbours. +// // left and right are not neighbors. // bottom_tt.left_child()->set_rt(0); // bottom_tt.right_child()->set_lt(0); // @@ -2467,7 +2467,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // // update bottom side // top_tt.left_child()->set_bottom(left_he); // top_tt.right_child()->set_bottom(right_he); -// // left and right aren't neighbours +// // left and right aren't neighbors // top_tt.left_child()->set_rb(0); // top_tt.right_child()->set_lb(0); // diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h index 3e7115a08ff..b4b314cf50f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_iostream.h @@ -64,9 +64,9 @@ std::ostream& write(std::ostream &out,const Td_X_trapezoid& t, if (!t.is_on_bottom_boundary()) out << t.bottom(); else out << "-oo"; out << ","; if (!t.is_on_top_boundary()) out << t.top(); else out << "+oo"; - out << ",neighbours(" << std::flush; + out << ",neighbors(" << std::flush; - // debug neighbours equivalence relation + // debug neighbors equivalence relation int max_size=4+1; int null_size=2,size=null_size,i,j; @@ -110,7 +110,7 @@ std::ostream& write(std::ostream &out,const Td_X_trapezoid& t, if (pad) out << " "; else pad=true; out << name[j]; - // identify neighbours + // identify neighbors if (traits.is_td_vertex(t) && value[j]) out << "=" << value[j]->top(); } @@ -177,9 +177,9 @@ std::ostream& operator<<(std::ostream &out,const Td_X_trapezoid& t) if (!t.is_on_bottom_boundary()) out << t.bottom(); else out << "-oo"; out << ","; if (!t.is_on_top_boundary()) out << t.top(); else out << "+oo"; - out << ",neighbours(" << std::flush; + out << ",neighbors(" << std::flush; - // debug neighbours equivalence relation + // debug neighbors equivalence relation int max_size=4+1; int null_size=2,size=null_size,i,j; @@ -221,7 +221,7 @@ std::ostream& operator<<(std::ostream &out,const Td_X_trapezoid& t) for(j=null_size;j::run(*this, map2, current, other); } - // We test if the injection is valid with its neighbours. + // We test if the injection is valid with its neighbors. // We go out as soon as it is not satisfied. for (i=0; match && i<=dimension; ++i) { diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 8dca87a9158..3308def6103 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -241,7 +241,7 @@ namespace CGAL { } protected: - /// Neighbours for each dimension +1 (from 0 to dimension). + /// Neighbors for each dimension +1 (from 0 to dimension). Dart_descriptor mf[dimension+1]; /// Values of Boolean marks. diff --git a/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h b/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h index 8f64b7622df..106908b7d78 100644 --- a/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h +++ b/Cone_spanners_2/include/CGAL/Cone_spanners_2/Plane_scan_tree_impl.h @@ -140,7 +140,7 @@ public: /* Destructor. * Frees memory used for storing key-value pair, thus invalidating any * existing pointers to any keys and/or values in the tree. During and - * after destruction, neighbour nodes are not guaranteed to be consistent. + * after destruction, neighbor nodes are not guaranteed to be consistent. * Specifically, the linked list along the leaves of the B+ tree is * invalidated. */ virtual ~_Leaf() { diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index 2dee9593c5c..3e0f077a989 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -2632,7 +2632,7 @@ namespace CGAL { ::run(*this, map2, current, other); } - // We test if the injection is valid with its neighbours. + // We test if the injection is valid with its neighbors. // We go out as soon as it is not satisfied. for (i = 0; match && i <= dimension; ++i) { diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf.h index 700c716ef12..a08e8b64bd9 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf.h @@ -59,7 +59,7 @@ public: //My_facet(): ring_index(-1) {} //void setNormal(Vector_3 n) { normal = n; } -// //this is for collecting i-th ring neighbours +// //this is for collecting i-th ring neighbors // void setRingIndex(int i) { ring_index = i; } // int getRingIndex() { return ring_index; } // void resetRingIndex() { ring_index = -1; } diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h index cc13db2d6ac..6690a0874fa 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h @@ -39,7 +39,7 @@ protected: VertexPropertyMap& vpm); public: - //collect i>=1 rings : all neighbours up to the ith ring, + //collect i>=1 rings : all neighbors up to the ith ring, static void collect_i_rings(Vertex* v, int ring_i, diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index 01403b4fccc..568776e4171 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -1291,7 +1291,7 @@ private: const int &prismid, const unsigned int &faceid)const { for (unsigned int i = 0; i < halfspace[prismid].size(); i++) { - /*bool neib = is_two_facets_neighbouring(prismid, i, faceid);// this works only when the polyhedron is convex and no two neighbour facets are coplanar + /*bool neib = is_two_facets_neighbouring(prismid, i, faceid);// this works only when the polyhedron is convex and no two neighbor facets are coplanar if (neib == false) continue;*/ if (i == faceid) continue; if(oriented_side(halfspace[prismid][i].eplane, ip) == ON_POSITIVE_SIDE){ diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index 9cea6526bb8..f512f71cd9d 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -44,7 +44,7 @@ protected: public: T_PolyhedralSurf_rings(const TPoly& P); - //collect i>=1 rings : all neighbours up to the ith ring, + //collect i>=1 rings : all neighbors up to the ith ring, void collect_i_rings(const Vertex_const_handle v, const int ring_i, std::vector < Vertex_const_handle >& all); diff --git a/Ridges_3/include/CGAL/Umbilics.h b/Ridges_3/include/CGAL/Umbilics.h index c681ce4a2c1..945fb986ae7 100644 --- a/Ridges_3/include/CGAL/Umbilics.h +++ b/Ridges_3/include/CGAL/Umbilics.h @@ -192,7 +192,7 @@ compute(OutputIterator umbilics_it, FT size) vces.clear(); contour.clear(); is_umbilic = true; - //the size of neighbourhood is (size * OneRingSize) + //the size of neighborhood is (size * OneRingSize) poly_neighbors->compute_neighbors(vh, vces, contour, size); diff --git a/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching.cpp b/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching.cpp index 9b33b45c76e..2664bba3bdd 100644 --- a/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching.cpp +++ b/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching.cpp @@ -49,7 +49,7 @@ int main() { assert(N_data_points==N_query_points); N=N_data_points; - std::cout << "nearest neighbour number = " << NN_number << std::endl; + std::cout << "nearest neighbor number = " << NN_number << std::endl; std::cout << "approximation factor = " << Eps << std::endl; std::cout << "dimension = " << N << std::endl; std::cout << "query point number = " << query_point_number << std::endl; diff --git a/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D.cpp b/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D.cpp index 2f360cbf5a8..1b8550d0299 100644 --- a/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D.cpp +++ b/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D.cpp @@ -52,7 +52,7 @@ int main() { assert(N_data_points==N_query_points); N=N_data_points; - std::cout << "nearest neighbour number = " << NN_number << std::endl; + std::cout << "nearest neighbor number = " << NN_number << std::endl; std::cout << "approximation factor = " << Eps << std::endl; std::cout << "dimension = " << N << std::endl; std::cout << "query point number = " << query_point_number << std::endl; diff --git a/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D_user_defined.cpp b/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D_user_defined.cpp index d7e9cb74b83..c6e3ec0af08 100644 --- a/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D_user_defined.cpp +++ b/Spatial_searching/benchmark/Spatial_searching/Nearest_neighbor_searching_2D_user_defined.cpp @@ -57,7 +57,7 @@ int main() { assert(N_data_points==N_query_points); N=N_data_points; - std::cout << "nearest neighbour number = " << NN_number << std::endl; + std::cout << "nearest neighbor number = " << NN_number << std::endl; std::cout << "approximation factor = " << Eps << std::endl; std::cout << "dimension = " << N << std::endl; std::cout << "query point number = " << query_point_number << std::endl; diff --git a/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp b/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp index e889ac00ace..9350348ffd3 100644 --- a/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp +++ b/Spatial_searching/examples/Spatial_searching/distance_browsing.cpp @@ -33,7 +33,7 @@ int main() NN_incremental_search NN(tree, query); NN_positive_x_iterator it(NN.end(), X_not_positive(), NN.begin()), end(NN.end(), X_not_positive()); - std::cout << "The first 5 nearest neighbours with positive x-coord are: " << std::endl; + std::cout << "The first 5 nearest neighbors with positive x-coord are: " << std::endl; for (int j=0; (j < 5)&&(it!=end); ++j,++it) std::cout << (*it).first << " at squared distance = " << it->second << std::endl; diff --git a/Spatial_searching/examples/Spatial_searching/searching_polyhedron_vertices.cpp b/Spatial_searching/examples/Spatial_searching/searching_polyhedron_vertices.cpp index 69c6a0840bf..5756e8973f5 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_polyhedron_vertices.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_polyhedron_vertices.cpp @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) // Insert number_of_data_points in the tree Tree tree(vertices(mesh).begin(), vertices(mesh).end(), Splitter(), Traits(vppmap)); - // search K nearest neighbours + // search K nearest neighbors Point_3 query(0.0, 0.0, 0.0); Distance tr_dist(vppmap); diff --git a/Spatial_searching/examples/Spatial_searching/searching_surface_mesh_vertices.cpp b/Spatial_searching/examples/Spatial_searching/searching_surface_mesh_vertices.cpp index 575d580c030..92c8e409bb2 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_surface_mesh_vertices.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_surface_mesh_vertices.cpp @@ -41,7 +41,7 @@ int main(int argc, char* argv[]) // Insert number_of_data_points in the tree Tree tree(vertices(mesh).begin(), vertices(mesh).end(), Splitter(), Traits(vppmap)); - // search K nearest neighbours + // search K nearest neighbors Point_3 query(0.0, 0.0, 0.0); Distance tr_dist(vppmap); diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp index 1298707c2d1..c12301670fa 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info.cpp @@ -50,7 +50,7 @@ int main() Tree tree(boost::make_zip_iterator(boost::make_tuple( points.begin(),indices.begin())), boost::make_zip_iterator(boost::make_tuple( points.end(),indices.end()))); - // search K nearest neighbours + // search K nearest neighbors Point_3 query(0.0, 0.0, 0.0); Distance tr_dist; diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp index 38aab7884ba..8a2d971b4bc 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_inplace.cpp @@ -63,7 +63,7 @@ int main() Splitter(), Traits(ppmap)); - // search K nearest neighbours + // search K nearest neighbors Point_3 query(0.0, 0.0, 0.0); Distance tr_dist(ppmap); diff --git a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp index dfe94d8626d..31648e3d5d3 100644 --- a/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp +++ b/Spatial_searching/examples/Spatial_searching/searching_with_point_with_info_pmap.cpp @@ -44,7 +44,7 @@ int main() Splitter(), Traits(ppmap)); - // search K nearest neighbours + // search K nearest neighbors Point_3 query(0.0, 0.0, 0.0); Distance tr_dist(ppmap); diff --git a/Spatial_searching/examples/Spatial_searching/user_defined_point_and_distance.cpp b/Spatial_searching/examples/Spatial_searching/user_defined_point_and_distance.cpp index 1a9acf384a5..8387ba63f1c 100644 --- a/Spatial_searching/examples/Spatial_searching/user_defined_point_and_distance.cpp +++ b/Spatial_searching/examples/Spatial_searching/user_defined_point_and_distance.cpp @@ -26,7 +26,7 @@ int main() Point query(0.0, 0.0, 0.0); Distance tr_dist; - // search K nearest neighbours + // search K nearest neighbors K_neighbor_search search(tree, query, K); for(K_neighbor_search::iterator it = search.begin(); it != search.end(); it++) { @@ -34,7 +34,7 @@ int main() << tr_dist.inverse_of_transformed_distance(it->second) << std::endl; } - // search K furthest neighbour searching, with eps=0, search_nearest=false + // search K furthest neighbor searching, with eps=0, search_nearest=false K_neighbor_search search2(tree, query, K, 0.0, false); for(K_neighbor_search::iterator it = search2.begin(); it != search2.end(); it++) diff --git a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h index 23c2d269d6c..eb329488266 100644 --- a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h @@ -404,7 +404,7 @@ namespace CGAL { number_of_leaf_nodes_visited << std::endl; s << "Number of points visited:" << number_of_items_visited << std::endl; - s << "Number of neighbours computed:" << + s << "Number of neighbors computed:" << number_of_neighbours_computed << std::endl; return s; } diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index 8e640a798a0..549e904c8ab 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -232,7 +232,7 @@ namespace CGAL { << number_of_leaf_nodes_visited << std::endl; s << "Number of items visited:" << number_of_items_visited << std::endl; - s << "Number of neighbours computed:" + s << "Number of neighbors computed:" << number_of_neighbours_computed << std::endl; return s; } @@ -295,7 +295,7 @@ namespace CGAL { multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { next_neighbour_found = true; } diff --git a/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp b/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp index b5994706865..5a2a13d3522 100644 --- a/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp +++ b/Spatial_searching/test/Spatial_searching/Building_kd_tree_with_own_pointtype.cpp @@ -34,7 +34,7 @@ void run(const std::vector& points) Point query(0.0, 0.0, 0.0); - // search K nearest neighbours + // search K nearest neighbors K_search search(tree, query, K); // do checking diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index 834ccd15968..6c55c0a5fc1 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -547,9 +547,9 @@ private: for(int j=0; j::_handle_left_curves() ++left_iter; //remove curve from the status line (also checks intersection - //between the neighbouring curves,only if the curve is removed for good) + //between the neighboring curves,only if the curve is removed for good) _remove_curve_from_status_line(leftCurve, remove_for_good); } @@ -347,7 +347,7 @@ void Surface_sweep_2::_handle_right_curves() CGAL_SS_PRINT_STATUS_LINE(); - // If the two curves used to be neighbours before, we do not need to + // If the two curves used to be neighbors before, we do not need to // intersect them again. if (!this->m_currentEvent->are_left_neighbours(*currentOne, *prevOne)) _intersect(*prevOne, *currentOne); @@ -468,7 +468,7 @@ void Surface_sweep_2::_remove_curve_from_status_line(Subcurve* leftCurve, if (! remove_for_good) { // the subcurve is not removed for good, so we dont need to intersect - // its neighbours after its removal. + // its neighbors after its removal. CGAL_SS_PRINT_ERASE(*sliter); this->m_statusLine.erase(sliter); CGAL_SS_PRINT_END_EOL("Removing a curve from the status line"); @@ -476,7 +476,7 @@ void Surface_sweep_2::_remove_curve_from_status_line(Subcurve* leftCurve, } // the subcurve will be removed for good from the stauts line, we need - // to check for intersection between his two neighbours (below and above him) + // to check for intersection between his two neighbors (below and above him) // but we need to make sure that its not the first or last subcurve // at the status line. CGAL_assertion(sliter != this->m_statusLine.end()); From 8437eec29dc0207b9813beff6225f16344585c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 17 Nov 2022 11:17:54 +0100 Subject: [PATCH 166/426] Fix implicit conversion from std::size_t to bool creating ambiguous calls --- BGL/include/CGAL/boost/graph/selection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGL/include/CGAL/boost/graph/selection.h b/BGL/include/CGAL/boost/graph/selection.h index b63bb387efe..085b63a210a 100644 --- a/BGL/include/CGAL/boost/graph/selection.h +++ b/BGL/include/CGAL/boost/graph/selection.h @@ -543,7 +543,7 @@ regularize_face_selection_borders( (face_index_map)); for (mesh_face_descriptor fd : faces(mesh)) - put(is_selected, fd, graph.labels[get(face_index_map,fd)]); + put(is_selected, fd, (graph.labels[get(face_index_map,fd)] != 0)); } /// \cond SKIP_IN_MANUAL From 33cfc700b2a765c0dff2e225946fde5027ef52be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 17 Nov 2022 12:12:01 +0100 Subject: [PATCH 167/426] fix unused warning --- Number_types/include/CGAL/FPU.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index d5a123608c4..0c7c70a7ebb 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -500,6 +500,7 @@ void FPU_set_cw (FPU_CW_t cw) { #ifdef CGAL_ALWAYS_ROUND_TO_NEAREST + CGAL_USE(cw); CGAL_assertion(cw == CGAL_FE_TONEAREST); #else CGAL_IA_SETFPCW(cw); @@ -511,6 +512,7 @@ FPU_CW_t FPU_get_and_set_cw (FPU_CW_t cw) { #ifdef CGAL_ALWAYS_ROUND_TO_NEAREST + CGAL_USE(cw); CGAL_assertion(cw == CGAL_FE_TONEAREST); return CGAL_FE_TONEAREST; #else From 5fd1a8070cb4fc9b841662f1d27a9558cf4ac1cf Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 17 Nov 2022 16:34:41 +0100 Subject: [PATCH 168/426] add missing is_in_complex() check --- .../internal/tetrahedral_adaptive_remeshing_impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 4117c01bc89..870b60cb1a9 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -385,7 +385,8 @@ private: const Subdomain_index index = cit->subdomain_index(); if(!input_is_c3t3()) m_c3t3.remove_from_complex(cit); - m_c3t3.add_to_complex(cit, index); + if(Subdomain_index() != index) + m_c3t3.add_to_complex(cit, index); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbc; From 4d797b55c494f48dc1ffcfe558cd17dd3a29e9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 17 Nov 2022 19:03:30 +0100 Subject: [PATCH 169/426] try working around a warning --- STL_Extension/include/CGAL/Handle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/Handle.h b/STL_Extension/include/CGAL/Handle.h index 4fa3a17286b..07fb7748e21 100644 --- a/STL_Extension/include/CGAL/Handle.h +++ b/STL_Extension/include/CGAL/Handle.h @@ -122,7 +122,7 @@ class Handle int refs() const noexcept { return PTR->count.load(std::memory_order_relaxed); } - Id_type id() const noexcept { return PTR - static_cast(0); } + Id_type id() const noexcept { return std::distance(static_cast(0), PTR); } bool identical(const Handle& h) const noexcept { return PTR == h.PTR; } From 8bbbf8d494703e7b0487d8c93ae4ce4fdf0dea02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 17 Nov 2022 19:11:00 +0100 Subject: [PATCH 170/426] try workaround warnings --- .../CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h | 5 ++--- .../include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h | 3 +-- .../include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h | 5 +---- Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h | 5 +---- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index b02303fa6af..c3f2d09f1f2 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -356,10 +356,9 @@ public: const OuterFunctor& outer) : _inner(inner), _outer(outer) {} - Unary_compose(const Unary_compose& other) - : _inner(other._inner), _outer(other._outer) {} + Unary_compose(const Unary_compose& other) = default; - Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} + Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} typedef typename InnerFunctor::argument_type argument_type; typedef typename OuterFunctor::result_type result_type; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h index f1f45aab56c..88235d5d90a 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h @@ -1147,8 +1147,7 @@ public: Bitstream_descartes() : Base(new Rep()) {} //! Copy constructor - Bitstream_descartes(const Self& other) : Base(static_cast(other)) - {} + Bitstream_descartes(const Self& other) = default; /*! * \brief Constructor for a polynomial \c f diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h index b4b057ef2d0..27ca4692e72 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h @@ -35,10 +35,7 @@ public: { } - AABB_segment_2_primitive(const AABB_segment_2_primitive &primitive) - { - m_it = primitive.id(); - } + AABB_segment_2_primitive(const AABB_segment_2_primitive &primitive) = default; const Id &id() const { diff --git a/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h b/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h index 4a38ac41754..95440eb3bd8 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h @@ -30,10 +30,7 @@ class SNC_SM_explorer : public SMCDEC { public: SNC_SM_explorer(const Base& E) : Base(E) {} - Self& operator=(const Self& E) { - Base::operator=(E); - return *this; - } + Self& operator=(const Self& E) = default; }; } //namespace CGAL From 285dbb96bf05bbf68e93b86d4482d05f5b9e1f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 17 Nov 2022 19:17:32 +0100 Subject: [PATCH 171/426] value must be removed Was reported as a warning by MSVC 2022 --- Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index fa78978a4dd..284dda6df73 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -78,7 +78,7 @@ public: Greater greater (traits.less_xy_2_object()); Equal equal; std::sort(this->begin(), this->end(), greater); - std::unique(this->begin(), this->end(),equal); + this->erase(std::unique(this->begin(), this->end(),equal), this->end()); // front() is the point with the largest x coordinate From b8aa2558fd3dc56099bcfc77117a1261ac74a46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 17 Nov 2022 19:40:38 +0100 Subject: [PATCH 172/426] add missing using --- Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index 284dda6df73..8887bc4164b 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -47,7 +47,8 @@ public: typedef typename Traits::Point_2 Point_2; using internal::vector< Rotation_tree_node_2 >::push_back; - using internal::vector< Rotation_tree_node_2 >::back; + using internal::vector< Rotation_tree_node_2 >::back; + using internal::vector< Rotation_tree_node_2 >::erase; class Greater { typename Traits::Less_xy_2 less; From 9d709b12e5c5bc4e654d26f2e95300ae5fedd635 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 21 Nov 2022 10:40:28 +0100 Subject: [PATCH 173/426] spelling corrections After review --- .../CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h | 2 +- .../test/Boolean_set_operations_2/data/agg_op/README.txt | 2 +- .../L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h | 2 +- Installation/cmake/modules/FindSuiteSparse.cmake | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h index e061c1a2873..f993dd009af 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h @@ -128,7 +128,7 @@ public: } #endif /*!\brief - * constructs an arc from a given represetnation + * constructs an arc from a given representation */ Generic_point_2(Rep rep) : Base(rep) { diff --git a/Boolean_set_operations_2/test/Boolean_set_operations_2/data/agg_op/README.txt b/Boolean_set_operations_2/test/Boolean_set_operations_2/data/agg_op/README.txt index 65dc2e90489..03b8f679e37 100644 --- a/Boolean_set_operations_2/test/Boolean_set_operations_2/data/agg_op/README.txt +++ b/Boolean_set_operations_2/test/Boolean_set_operations_2/data/agg_op/README.txt @@ -2,7 +2,7 @@ ------------------------------------------------------------------------ structure of file: -----------------= +----------------- # polygons (range of Polygon_2) N # number of polygons diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h index 93fc1a36525..49be2350b4d 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/include/CGAL/L1_voronoi_traits_2.h @@ -59,7 +59,7 @@ public: // Returns the midpoint (under the L1 metric) that is on the rectangle // defined by the two points (the rectangle can be degenerate). - // As there are to endpoints, the index determines which is returned + // As there are two endpoints, the index determines which one is returned static Point_2 midpoint(const Point_2& p1, const Point_2& p2, std::size_t index) { const Point_2 *pp1; const Point_2 *pp2; diff --git a/Installation/cmake/modules/FindSuiteSparse.cmake b/Installation/cmake/modules/FindSuiteSparse.cmake index 8d55912f168..a58cdefdfcc 100644 --- a/Installation/cmake/modules/FindSuiteSparse.cmake +++ b/Installation/cmake/modules/FindSuiteSparse.cmake @@ -1,5 +1,5 @@ ## CMake file to locate SuiteSparse and its useful composite projects -## The first development of this file was done by a Windows users who +## The first development of this file was done by Windows users who ## used: ## https://github.com/jlblancoc/suitesparse-metis-for-windows ## Anyway, it could work also on linux (tested on fedora 17 when you installed suitesparse from yum) @@ -20,14 +20,14 @@ ## * SuiteSparse_INCLUDE_DIRS Paths containing SuiteSparse needed headers (depend on which COMPONENTS you gave) ## * SuiteSparse_LIBRARIES Absolute paths of SuiteSparse libs found (depend on which COMPONENTS you gave) ## If SuiteSparse_USE_LAPACK_BLAS is set to ON : -## * SuiteSparse_LAPACK_BLAS_LIBRARIES Which contain the libblas and liblapack libraries +## * SuiteSparse_LAPACK_BLAS_LIBRARIES Which contain the libblas and liblapack libraries ## On windows: ## * SuiteSparse_LAPACK_BLAS_DLL Which contain all required binaries for use libblas and liblapack ## ## ## Detailed variables this file provide : ## * SuiteSparse__FOUND True if the given component to look for is found (INCLUDE DIR and LIBRARY) -## * SuiteSparse__INCLUDE_DIR The path directory where we can be found all component header files +## * SuiteSparse__INCLUDE_DIR The path directory where all component header files can be found ## * SuiteSparse__LIBRARY The file path to the component library ## Note: If a component is not found, a SuiteSparse__DIR cache variable is set to allow user set the search directory. ## From 7322c7908dfe68c24590529a2f27aa16ba39c9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 21 Nov 2022 14:09:08 +0100 Subject: [PATCH 174/426] try to workaround warnings --- .../CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h | 1 + .../include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h | 1 + .../CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h | 1 + .../CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h | 1 + .../include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h | 3 ++- Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h | 1 + STL_Extension/include/CGAL/iterator.h | 4 ++++ 7 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index c3f2d09f1f2..2674b63e66b 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -357,6 +357,7 @@ public: : _inner(inner), _outer(outer) {} Unary_compose(const Unary_compose& other) = default; + Unary_compose& operator=(const Unary_compose& other) = default; Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h index 88235d5d90a..974e26d0a57 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h @@ -1148,6 +1148,7 @@ public: //! Copy constructor Bitstream_descartes(const Self& other) = default; + Bitstream_descartes& operator=(const Self& other) = default; /*! * \brief Constructor for a polynomial \c f diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index d78d50acfd0..a2caaa91aaf 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -467,6 +467,7 @@ private: log_C_eps_ = n.log_C_eps_; } + Bitstream_descartes_E08_node(const Self&) = delete; Self& operator= (const Self&) = delete; }; // struct Bitstream_descartes_E08_node diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 869b758cb12..6ba6d3d47a2 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -558,6 +558,7 @@ private: log_C_eps_ = n.log_C_eps_; } + Bitstream_descartes_rndl_node(const Self&)=delete; Self& operator= (const Self&)=delete; }; // struct Bitstream_descartes_rndl_node diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h index 27ca4692e72..59b5f208021 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_segment_2_primitive.h @@ -35,7 +35,8 @@ public: { } - AABB_segment_2_primitive(const AABB_segment_2_primitive &primitive) = default; + AABB_segment_2_primitive(const AABB_segment_2_primitive& primitive) = default; + AABB_segment_2_primitive& operator=(const AABB_segment_2_primitive& primitive) = default; const Id &id() const { diff --git a/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h b/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h index 95440eb3bd8..cef97636549 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_SM_explorer.h @@ -30,6 +30,7 @@ class SNC_SM_explorer : public SMCDEC { public: SNC_SM_explorer(const Base& E) : Base(E) {} + SNC_SM_explorer(const Self& E) = default; Self& operator=(const Self& E) = default; }; diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index e395ab3c76f..ea9a964c8a3 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1283,6 +1283,8 @@ template < typename D, typename V = std::tuple<>, typename O = std::tuple<> > struct Derivator { typedef Derivator Self; + Derivator() = default; + Derivator(const Self&) = default; Self& operator=(const Self&) = delete; template void tuple_dispatch(const Tuple&) @@ -1296,6 +1298,8 @@ struct Derivator, std::tuple > typedef Derivator, std::tuple > Self; typedef Derivator, std::tuple > Base; + Derivator() = default; + Derivator(const Self&) = default; Self& operator=(const Self&) = delete; using Base::operator=; From fd00ce2d02941a8547d3502c5b403d90d4f149c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 21 Nov 2022 16:02:04 +0100 Subject: [PATCH 175/426] seems that the no_parameter function is no longer needed --- .../test_corefinement_and_constraints.cpp | 4 ++-- STL_Extension/include/CGAL/Named_function_parameters.h | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp index 889a92636bf..1eec758737e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_corefinement_and_constraints.cpp @@ -176,8 +176,8 @@ void test_bool_op_no_copy( params::edge_is_constrained_map(ecm2), std::make_tuple(params::edge_is_constrained_map(ecm_out_union), params::edge_is_constrained_map(ecm_out_inter), - params::no_parameters(params::edge_is_constrained_map(ecm_out_union)), - params::no_parameters(params::edge_is_constrained_map(ecm_out_union)))); + params::default_values(), + params::default_values())); // dump_constrained_edges(*(*output[0]), ecm_out_union, "out_cst_union.cgal"); // dump_constrained_edges(*(*output[1]), ecm_out_inter, "out_cst_inter.cgal"); diff --git a/STL_Extension/include/CGAL/Named_function_parameters.h b/STL_Extension/include/CGAL/Named_function_parameters.h index 06d9043ab33..243ed7b4be5 100644 --- a/STL_Extension/include/CGAL/Named_function_parameters.h +++ b/STL_Extension/include/CGAL/Named_function_parameters.h @@ -426,14 +426,6 @@ inline all_default() } #endif -template -Named_function_parameters -inline no_parameters(Named_function_parameters) -{ - typedef Named_function_parameters Params; - return Params(); -} - template struct Boost_parameter_compatibility_wrapper { From 718214bf4fb3e6f2e42dd2bced44f5ac6a5c174a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 21 Nov 2022 19:26:35 +0100 Subject: [PATCH 176/426] fix include --- .../CGAL/Polygon_mesh_processing/repair_self_intersections.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index bee807468a2..0a52404278f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -20,10 +20,10 @@ #include #include #include -#include #include #include #include +#include #ifndef CGAL_PMP_REMOVE_SELF_INTERSECTION_NO_POLYHEDRAL_ENVELOPE_CHECK #include #endif From 5a992f60a44ea369fe9e20bef0d060ac935bd867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Nov 2022 10:31:34 +0100 Subject: [PATCH 177/426] split repair --- .../combinatorial_repair.h | 60 +++++++++++++++++++ .../{repair.h => geometric_repair.h} | 28 ++++----- .../include/CGAL/license/gpl_package_list.txt | 3 +- .../internal/Snapping/helper.h | 2 +- .../internal/Snapping/snap.h | 2 +- .../internal/Snapping/snap_vertices.h | 2 +- .../internal/repair_extra.h | 2 +- .../internal/simplify_polyline.h | 2 +- .../Polygon_mesh_processing/manifoldness.h | 2 +- .../merge_border_vertices.h | 2 +- .../orient_polygon_soup_extension.h | 2 +- .../polygon_mesh_to_polygon_soup.h | 2 +- .../polygon_soup_to_polygon_mesh.h | 2 +- .../CGAL/Polygon_mesh_processing/repair.h | 2 +- .../repair_degeneracies.h | 2 +- .../repair_polygon_soup.h | 2 +- .../repair_self_intersections.h | 2 +- .../shape_predicates.h | 2 +- .../Polygon_mesh_processing/stitch_borders.h | 2 +- 19 files changed, 92 insertions(+), 31 deletions(-) create mode 100644 Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h rename Installation/include/CGAL/license/Polygon_mesh_processing/{repair.h => geometric_repair.h} (53%) diff --git a/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h b/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h new file mode 100644 index 00000000000..cf07529839b --- /dev/null +++ b/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h @@ -0,0 +1,60 @@ +// Copyright (c) 2016 GeometryFactory SARL (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Andreas Fabri +// +// Warning: this file is generated, see include/CGAL/licence/README.md +// not entirely true due to the backward compatibility issue + +#ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_H +#define CGAL_LICENSE_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_H + +#include +#include + +// backward compatibility +#ifdef CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE +#define CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE +#endif + +#ifdef CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE + +# if CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +# if defined(CGAL_LICENSE_WARNING) + + CGAL_pragma_warning("Your commercial license for CGAL does not cover " + "this release of the Polygon Mesh Processing - Combinatorial Repair package.") +# endif + +# ifdef CGAL_LICENSE_ERROR +# error "Your commercial license for CGAL does not cover this release \ + of the Polygon Mesh Processing - Combinatorial Repair package. \ + You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +# endif // CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE + +#else // no CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE + +# if defined(CGAL_LICENSE_WARNING) + CGAL_pragma_warning("\nThe macro CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL Polygon Mesh Processing - Combinatorial Repair package under " + "the terms of the GPLv3+.") +# endif // CGAL_LICENSE_WARNING + +# ifdef CGAL_LICENSE_ERROR +# error "The macro CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL Polygon Mesh Processing - Combinatorial Repair package under the terms of \ + the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." +# endif // CGAL_LICENSE_ERROR + +#endif // no CGAL_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_COMMERCIAL_LICENSE + +#endif // CGAL_LICENSE_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_H diff --git a/Installation/include/CGAL/license/Polygon_mesh_processing/repair.h b/Installation/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h similarity index 53% rename from Installation/include/CGAL/license/Polygon_mesh_processing/repair.h rename to Installation/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h index 1c4e7be9825..affdde5cfc6 100644 --- a/Installation/include/CGAL/license/Polygon_mesh_processing/repair.h +++ b/Installation/include/CGAL/license/Polygon_mesh_processing/geometric_repair.h @@ -11,44 +11,44 @@ // // Warning: this file is generated, see include/CGAL/licence/README.md -#ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_REPAIR_H -#define CGAL_LICENSE_POLYGON_MESH_PROCESSING_REPAIR_H +#ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_H +#define CGAL_LICENSE_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_H #include #include -#ifdef CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE +#ifdef CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE -# if CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE +# if CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE # if defined(CGAL_LICENSE_WARNING) CGAL_pragma_warning("Your commercial license for CGAL does not cover " - "this release of the Polygon Mesh Processing - Repair package.") + "this release of the Polygon Mesh Processing - Geometric Repair package.") # endif # ifdef CGAL_LICENSE_ERROR # error "Your commercial license for CGAL does not cover this release \ - of the Polygon Mesh Processing - Repair package. \ + of the Polygon Mesh Processing - Geometric Repair package. \ You get this error, as you defined CGAL_LICENSE_ERROR." # endif // CGAL_LICENSE_ERROR -# endif // CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE +# endif // CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE < CGAL_RELEASE_DATE -#else // no CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE +#else // no CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE # if defined(CGAL_LICENSE_WARNING) - CGAL_pragma_warning("\nThe macro CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE is not defined." - "\nYou use the CGAL Polygon Mesh Processing - Repair package under " + CGAL_pragma_warning("\nThe macro CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE is not defined." + "\nYou use the CGAL Polygon Mesh Processing - Geometric Repair package under " "the terms of the GPLv3+.") # endif // CGAL_LICENSE_WARNING # ifdef CGAL_LICENSE_ERROR -# error "The macro CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE is not defined.\ - You use the CGAL Polygon Mesh Processing - Repair package under the terms of \ +# error "The macro CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE is not defined.\ + You use the CGAL Polygon Mesh Processing - Geometric Repair package under the terms of \ the GPLv3+. You get this error, as you defined CGAL_LICENSE_ERROR." # endif // CGAL_LICENSE_ERROR -#endif // no CGAL_POLYGON_MESH_PROCESSING_REPAIR_COMMERCIAL_LICENSE +#endif // no CGAL_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_COMMERCIAL_LICENSE -#endif // CGAL_LICENSE_POLYGON_MESH_PROCESSING_REPAIR_H +#endif // CGAL_LICENSE_POLYGON_MESH_PROCESSING_GEOMETRIC_REPAIR_H diff --git a/Installation/include/CGAL/license/gpl_package_list.txt b/Installation/include/CGAL/license/gpl_package_list.txt index 28c3cd25f87..79dc8fd362c 100644 --- a/Installation/include/CGAL/license/gpl_package_list.txt +++ b/Installation/include/CGAL/license/gpl_package_list.txt @@ -55,7 +55,8 @@ Polygon_mesh_processing/measure Polygon Mesh Processing - Geometric Measure Polygon_mesh_processing/meshing_hole_filling Polygon Mesh Processing - Meshing and Hole Filling Polygon_mesh_processing/orientation Polygon Mesh Processing - Orientation Polygon_mesh_processing/predicate Polygon Mesh Processing - Predicate -Polygon_mesh_processing/repair Polygon Mesh Processing - Repair +Polygon_mesh_processing/combinatorial_repair Polygon Mesh Processing - Combinatorial Repair +Polygon_mesh_processing/geometric_repair Polygon Mesh Processing - Geometric Repair Polygon_mesh_processing/miscellaneous Polygon Mesh Processing - Miscellaneous Polygon_mesh_processing/detect_features Polygon Mesh Processing - Feature Detection Polygon_mesh_processing/collision_detection Polygon Mesh Processing - Collision Detection diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h index ce67cc83a84..af813961029 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/helper.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_INTERNAL_SNAPPING_HELPER_H #define CGAL_POLYGON_MESH_PROCESSING_INTERNAL_SNAPPING_HELPER_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h index 4520e825de5..1ceaad6ce38 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h @@ -14,7 +14,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_SNAPPING_SNAP_H #define CGAL_POLYGON_MESH_PROCESSING_SNAPPING_SNAP_H -#include +#include #ifdef CGAL_PMP_SNAP_DEBUG_PP #ifndef CGAL_PMP_SNAP_DEBUG diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index 91f1a51952b..27ad666a2a0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_SNAPPING_SNAP_VERTICES_H #define CGAL_POLYGON_MESH_PROCESSING_SNAPPING_SNAP_VERTICES_H -#include +#include #ifdef CGAL_PMP_SNAP_DEBUG_PP #ifndef CGAL_PMP_SNAP_DEBUG diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h index af22ed1df25..2e3b8a63d7a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/repair_extra.h @@ -14,7 +14,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_INTERNAL_REPAIR_EXTRA_H #define CGAL_POLYGON_MESH_PROCESSING_INTERNAL_REPAIR_EXTRA_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h index 016dedea22d..74fc83d0ec8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/simplify_polyline.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_SIMPLIFY_POLYLINE_H #define CGAL_POLYGON_MESH_PROCESSING_SIMPLIFY_POLYLINE_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h index 096cbd61ff5..9df968777c2 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_MANIFOLDNESS_H #define CGAL_POLYGON_MESH_PROCESSING_MANIFOLDNESS_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index b0a97548d83..df7d51927e5 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -14,7 +14,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_MERGE_BORDER_VERTICES_H #define CGAL_POLYGON_MESH_PROCESSING_MERGE_BORDER_VERTICES_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h index 14defb6b29e..612620049a0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orient_polygon_soup_extension.h @@ -15,7 +15,7 @@ #ifndef CGAL_ORIENT_POLYGON_SOUP_EXTENSION_H #define CGAL_ORIENT_POLYGON_SOUP_EXTENSION_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h index 5766b85593f..a928499de25 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_mesh_to_polygon_soup.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_POLYGON_MESH_TO_POLYGON_SOUP_H #define CGAL_POLYGON_MESH_PROCESSING_POLYGON_MESH_TO_POLYGON_SOUP_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index 45f76b3aa71..bb2c5f68454 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH_H #define CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH_H -#include +#include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h index 9e9827f08fe..7ae0e9a75aa 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h @@ -14,7 +14,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_REPAIR_H #define CGAL_POLYGON_MESH_PROCESSING_REPAIR_H -#include +#include #include #include 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 818e5809e37..94c039965de 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 @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_REPAIR_DEGENERACIES_H #define CGAL_POLYGON_MESH_PROCESSING_REPAIR_DEGENERACIES_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h index 219a4925c24..7d42bfb0520 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h @@ -12,7 +12,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_REPAIR_POLYGON_SOUP #define CGAL_POLYGON_MESH_PROCESSING_REPAIR_POLYGON_SOUP -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index bee807468a2..a2af245c8b9 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -13,7 +13,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_REPAIR_SELF_INTERSECTIONS_H #define CGAL_POLYGON_MESH_PROCESSING_REPAIR_SELF_INTERSECTIONS_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h index 3eb3fa892e6..f56ac96e5eb 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/shape_predicates.h @@ -14,7 +14,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_SHAPE_PREDICATES_H #define CGAL_POLYGON_MESH_PROCESSING_SHAPE_PREDICATES_H -#include +#include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h index 7fdd1a05fc3..494251b3e21 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h @@ -14,7 +14,7 @@ #ifndef CGAL_POLYGON_MESH_PROCESSING_STITCH_BORDERS_H #define CGAL_POLYGON_MESH_PROCESSING_STITCH_BORDERS_H -#include +#include #include #include From 550d86cc0d3a754699cb19374942707e21f17e8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Nov 2022 10:48:27 +0100 Subject: [PATCH 178/426] update doc --- .../PackageDescription.txt | 10 +++- .../Polygon_mesh_processing.txt | 53 ++++++++++--------- .../internal/Snapping/snap.h | 2 +- .../internal/Snapping/snap_vertices.h | 2 +- .../Polygon_mesh_processing/manifoldness.h | 6 +-- .../merge_border_vertices.h | 6 +-- .../polygon_mesh_to_polygon_soup.h | 2 +- .../polygon_soup_to_polygon_mesh.h | 4 +- .../CGAL/Polygon_mesh_processing/repair.h | 4 +- .../repair_degeneracies.h | 8 +-- .../repair_polygon_soup.h | 18 +++---- .../Polygon_mesh_processing/stitch_borders.h | 10 ++-- 12 files changed, 66 insertions(+), 59 deletions(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index 1699ca2a0f9..3906fe9dab3 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -32,7 +32,11 @@ /// Functions to test if there are self intersections, and to report faces that do intersect. /// \ingroup PkgPolygonMeshProcessingRef -/// \defgroup PMP_repairing_grp Combinatorial Repairing +/// \defgroup PMP_combinatorial_repair_grp Combinatorial Repair +/// Functions to repair polygon soups and polygon meshes. +/// \ingroup PkgPolygonMeshProcessingRef + +/// \defgroup PMP_geometric_repair_grp Geometric Repair /// Functions to repair polygon soups and polygon meshes. /// \ingroup PkgPolygonMeshProcessingRef @@ -162,7 +166,7 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage. - `CGAL::Polyhedral_envelope` - `CGAL::Side_of_triangle_mesh` -\cgalCRPSection{Combinatorial Repairing Functions} +\cgalCRPSection{Combinatorial Repair Functions} - `CGAL::Polygon_mesh_processing::merge_duplicate_points_in_polygon_soup()` - `CGAL::Polygon_mesh_processing::merge_duplicate_polygons_in_polygon_soup()` - `CGAL::Polygon_mesh_processing::remove_isolated_points_in_polygon_soup()` @@ -179,6 +183,8 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage. - `CGAL::Polygon_mesh_processing::duplicate_non_manifold_vertices()` - `CGAL::Polygon_mesh_processing::merge_duplicated_vertices_in_boundary_cycle()` - `CGAL::Polygon_mesh_processing::merge_duplicated_vertices_in_boundary_cycles()` + +\cgalCRPSection{Geometric Repair Functions} - `CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()` \cgalCRPSection{Connected Components} diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index e7345cd3c4c..947c907a7b3 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -46,7 +46,8 @@ and smoothing algorithms. - \ref PMPPredicates : predicates that can be evaluated on the processed polygon. mesh, which includes point location and self intersection tests. - \ref PMPOrientation : checking or fixing the orientation of a polygon soup. -- \ref PMPRepairing : repair of polygon meshes and polygon soups. +- \ref PMPCombinatorialRepair : repair of polygon meshes and polygon soups. +- \ref PMPGeometricRepair : repair of the geometry of polygon meshes. - \ref PMPNormalComp : normal computation at vertices and on faces of a polygon mesh. - \ref PMPSlicer : functor able to compute the intersections of a polygon mesh with arbitrary planes (slicer). - \ref PMPConnectedComponents : methods to deal with connected @@ -746,7 +747,7 @@ This example shows how to correctly repair and orient a soup to get a mesh from **************************************** -\section PMPRepairing Combinatorial Repairing +\section PMPCombinatorialRepair Combinatorial Repair ******************* \subsection PSRepairing Polygon Soup Repairing @@ -785,31 +786,7 @@ with duplicated border edges. \cgalExample{Polygon_mesh_processing/stitch_borders_example.cpp} -\if READY_TO_PUBLISH - -\subsection DegenerateFaces Removing Degenerate Faces - -Some degenerate faces may be part of a given triangle mesh. -A face is considered \e degenerate if two of its vertices -share the same location, or more generally if its three vertices are collinear. -The function `CGAL::Polygon_mesh_processing::remove_degenerate_faces()` -removes those faces and fixes the connectivity of the newly cleaned up mesh. -It is also possible to remove isolated vertices from any polygon mesh, using the function -`CGAL::Polygon_mesh_processing::remove_isolated_vertices()`. - -\subsubsection RemoveDegenerateExample Example - -In the following example, the degenerate faces of a triangle mesh -are removed, the connectivity is fixed, and the number of removed faces -is output. - -\cgalExample{Polygon_mesh_processing/remove_degeneracies_example.cpp} -\endif - \subsection PMPManifoldness Polygon Mesh Manifoldness -This package offers repairing methods to clean ill-formed polygon soups, -see Section \ref PMPRepairing. - Non-manifold vertices can be detected using the function `CGAL::Polygon_mesh_processing::is_non_manifold_vertex()`. The function `CGAL::Polygon_mesh_processing::duplicate_non_manifold_vertices()` can be used to attempt to create a combinatorially manifold surface mesh by splitting any non-manifold vertex @@ -835,6 +812,9 @@ more than once (although, with different vertices) before reaching the initial b `CGAL::Polygon_mesh_processing::merge_duplicated_vertices_in_boundary_cycle()`, which merge vertices at identical positions, can be used to repair this configuration. +\section PMPGeometricRepair Geometric Repair +**************************************** + \subsection PMPRemoveCapsNeedles Removal of Almost Degenerate Triangle Faces Triangle faces of a mesh made up of almost collinear points are badly shaped elements that might not be desirable to have in a mesh. The function @@ -844,6 +824,27 @@ As some badly shaped elements are inevitable (the triangulation of a long cylind with only vertices on the top and bottom circles for example), extra parameters can be passed to prevent the removal of such elements (`collapse_length_threshold` and `flip_triangle_height_threshold`). +\if READY_TO_PUBLISH + +\subsection DegenerateFaces Removing Degenerate Faces + +Some degenerate faces may be part of a given triangle mesh. +A face is considered \e degenerate if two of its vertices +share the same location, or more generally if its three vertices are collinear. +The function `CGAL::Polygon_mesh_processing::remove_degenerate_faces()` +removes those faces and fixes the connectivity of the newly cleaned up mesh. +It is also possible to remove isolated vertices from any polygon mesh, using the function +`CGAL::Polygon_mesh_processing::remove_isolated_vertices()`. + +\subsubsection RemoveDegenerateExample Example + +In the following example, the degenerate faces of a triangle mesh +are removed, the connectivity is fixed, and the number of removed faces +is output. + +\cgalExample{Polygon_mesh_processing/remove_degeneracies_example.cpp} +\endif + **************************************** \section PMPNormalComp Computing Normals diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h index c25d805590f..1388ebaeb22 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap.h @@ -1009,7 +1009,7 @@ std::size_t snap_non_conformal_one_way(const HalfedgeRange& halfedge_range_S, } } -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // Attempts to snap the vertices in `halfedge_range_A` onto edges of `halfedge_range_B`, and reciprocally. // A vertex from the first range is only snapped to an edge of the second range if the distance to diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index e0d5e6163e2..10043e346a8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -1140,7 +1140,7 @@ std::size_t snap_vertices_two_way(const HalfedgeRange_A& halfedge_range_A, namespace experimental { -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // Attempts to snap the vertices in `halfedge_range_A` and `halfedge_range_B`. // A vertex from the first range and a vertex from the second range are only snapped diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h index a0ddbb6b2ef..de45ca3150e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/manifoldness.h @@ -33,7 +33,7 @@ namespace CGAL { namespace Polygon_mesh_processing { -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief returns whether a vertex of a polygon mesh is non-manifold. /// @@ -284,7 +284,7 @@ std::size_t make_umbrella_manifold(typename boost::graph_traits::ha } // end namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief collects the non-manifold vertices (if any) present in the mesh. /// @@ -394,7 +394,7 @@ OutputIterator non_manifold_vertices(const PolygonMesh& pm, return out; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// duplicates all the non-manifold vertices of the input mesh. /// diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h index 364cc32fc69..27bda80bc9c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/merge_border_vertices.h @@ -204,7 +204,7 @@ void detect_identical_mergeable_vertices( } } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // merges target vertices of a list of halfedges. // Halfedges must be sorted in the list. @@ -259,7 +259,7 @@ void merge_vertices_in_range(const HalfedgeRange& sorted_hedges, } // end of internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// merges identical vertices around a cycle of boundary edges. /// @@ -319,7 +319,7 @@ void merge_duplicated_vertices_in_boundary_cycle(typename boost::graph_traits > } // namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// adds the vertices and faces of a mesh into a (possibly non-empty) polygon soup. /// diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index 1ff8673eed6..7f4878648ae 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -153,7 +153,7 @@ private: } // namespace internal /** -* \ingroup PMP_repairing_grp +* \ingroup PMP_combinatorial_repair_grp * * \brief returns `true` if the soup of polygons defines a valid polygon * mesh that can be handled by @@ -231,7 +231,7 @@ bool is_polygon_soup_a_polygon_mesh(const PolygonRange& polygons) } /** -* \ingroup PMP_repairing_grp +* \ingroup PMP_combinatorial_repair_grp * * builds a polygon mesh from a soup of polygons. * diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h index 7ae0e9a75aa..73828b33115 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h @@ -29,7 +29,7 @@ namespace CGAL { namespace Polygon_mesh_processing { -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_geometric_repair_grp /// /// \brief removes the isolated vertices from any polygon mesh. /// @@ -60,7 +60,7 @@ std::size_t remove_isolated_vertices(PolygonMesh& pmesh) return nb_removed; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_geometric_repair_grp /// /// \brief removes connected components whose area or volume is under a certain threshold value. /// 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 c90ecc501c7..22be1f47e8e 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 @@ -535,7 +535,7 @@ struct Filter_wrapper_for_cap_needle_removalneedle @@ -1034,7 +1034,7 @@ bool remove_almost_degenerate_faces(const FaceRange& face_range, return false; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_geometric_repair_grp /// removes all almost degenerate faces from a triangulated surface mesh. /// Equivalent to `remove_almost_degenerate_faces(faces(tmesh), tmesh, np)` template @@ -1326,7 +1326,7 @@ remove_a_border_edge(typename boost::graph_traits::edge_descriptor return remove_a_border_edge(ed, tm, input_range, edge_set, face_set); } -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // removes the degenerate edges from a triangulated surface mesh. // An edge is considered degenerate if its two extremities share the same location. @@ -1880,7 +1880,7 @@ bool remove_degenerate_edges(TriangleMesh& tmesh, return remove_degenerate_edges(edges(tmesh), tmesh, face_set, np); } -// \ingroup PMP_repairing_grp +// \ingroup PMP_geometric_repair_grp // // removes the degenerate faces from a triangulated surface mesh. // A face is considered degenerate if two of its vertices share the same location, diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h index 84a84733584..cb24ce8ae7c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_polygon_soup.h @@ -140,7 +140,7 @@ bool simplify_polygon(PointRange& points, return (removed_points_n != 0); } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // For each polygon of the soup, removes consecutive identical (in a geometric sense) points. // @@ -194,7 +194,7 @@ std::size_t simplify_polygons_in_polygon_soup(PointRange& points, return simplified_polygons_n; } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // splits "pinched" polygons, that is polygons for which a point appears more than once, // into multiple non-pinched polygons. @@ -291,7 +291,7 @@ std::size_t split_pinched_polygons_in_polygon_soup(PointRange& points, return new_polygons_n; } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // removes polygons with fewer than 2 points from the soup. // @@ -334,7 +334,7 @@ std::size_t remove_invalid_polygons_in_polygon_soup(PointRange& /*points*/, return removed_polygons_n; } -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // Removes invalid array-based polygons, i.e. polygons which have two equal consecutive points. // @@ -397,7 +397,7 @@ std::size_t remove_invalid_polygons_in_array_polygon_soup(PointRange& points, } // end namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// removes the isolated points from a polygon soup. /// A point is considered isolated if it does not appear in any polygon of the soup. @@ -500,7 +500,7 @@ std::size_t remove_isolated_points_in_polygon_soup(PointRange& points, return removed_points_n; } -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief merges the duplicate points in a polygon soup. /// @@ -817,7 +817,7 @@ struct Duplicate_collector void dump(CGAL::Emptyset_iterator) { } }; -// \ingroup PMP_repairing_grp +// \ingroup PMP_combinatorial_repair_grp // // collects duplicate polygons in a polygon soup, that is polygons that share the same vertices in the same // order. @@ -897,7 +897,7 @@ DuplicateOutputIterator collect_duplicate_polygons(const PointRange& points, } // end namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// merges the duplicate polygons in a polygon soup. Two polygons are duplicate if they share the same /// vertices in the same order. Note that the first vertex of the polygon does not matter, that is @@ -1104,7 +1104,7 @@ struct Polygon_soup_fixer > } // namespace internal -/// \ingroup PMP_repairing_grp +/// \ingroup PMP_combinatorial_repair_grp /// /// \brief cleans a given polygon soup through various repairing operations. /// diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h index b2878954478..e30f95fd289 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h @@ -1119,7 +1119,7 @@ std::size_t stitch_boundary_cycle(const typename boost::graph_traits Date: Tue, 22 Nov 2022 11:14:14 +0100 Subject: [PATCH 179/426] fix compilation in debug code --- .../CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index ed60e69495c..dde882984b1 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -281,7 +281,8 @@ private: for (auto& kv : ons_map) { std::ostringstream oss; - oss << "dump_normals_normalized_" << kv.first << ".polylines.txt"; + oss << "dump_normals_normalized_[" + << kv.first.first << "_" << kv.first.second << "].polylines.txt"; std::ofstream ons(oss.str()); for (auto s : kv.second) ons << "2 " << s.source() << " " << s.target() << std::endl; From 85756cd8eae687945031333335de9ad501fbe212 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2022 11:19:49 +0100 Subject: [PATCH 180/426] default cell_selector selects all cells with non-0 subdomain index not all cells --- .../tetrahedral_adaptive_remeshing_impl.h | 18 ++++++++++++++++++ .../include/CGAL/tetrahedral_remeshing.h | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 870b60cb1a9..966548be7c9 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -55,6 +55,24 @@ public: void after_flip(CellHandle /* c */) {} }; +template +struct All_cells_selected +{ + using key_type = typename Tr::Cell_handle; + using value_type = bool; + using reference = bool; + using category = boost::read_write_property_map_tag; + + friend value_type get(const All_cells_selected&, const key_type& c) + { + using SI = typename Tr::Cell::Subdomain_index; + return c->subdomain_index() != SI(); + } + friend void put(All_cells_selected&, const key_type&, const value_type) + {} //nothing to do : subdomain indices are updated in remeshing}; +}; + + template//default + Tetrahedral_remeshing::internal::All_cells_selected//default > ::type SelectionFunctor; SelectionFunctor cell_select = choose_parameter(get_parameter(np, internal_np::cell_selector), - Constant_property_map(true)); + Tetrahedral_remeshing::internal::All_cells_selected()); typedef std::pair Edge_vv; typedef typename internal_np::Lookup_named_param_def < From 207cd1ad667147842c02285aae52dc180d0bf45d Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2022 11:59:48 +0100 Subject: [PATCH 181/426] add assertions --- .../internal/tetrahedral_adaptive_remeshing_impl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 966548be7c9..4c8fac7609c 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -189,6 +189,7 @@ public: "1-facets_in_complex_after_split.off"); CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( m_c3t3.triangulation(), "1-c3t3_vertices_after_split"); + CGAL::Tetrahedral_remeshing::debug::check_surface_patch_indices(m_c3t3); #endif #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "1-split"); @@ -210,6 +211,7 @@ public: CGAL_assertion(debug::are_cell_orientations_valid(tr())); CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( m_c3t3.triangulation(), "2-c3t3_vertices_after_collapse"); + CGAL::Tetrahedral_remeshing::debug::check_surface_patch_indices(m_c3t3); #endif #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "2-collapse"); @@ -226,6 +228,7 @@ public: CGAL_assertion(debug::are_cell_orientations_valid(tr())); CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( m_c3t3.triangulation(), "3-c3t3_vertices_after_flip"); + CGAL::Tetrahedral_remeshing::debug::check_surface_patch_indices(m_c3t3); #endif #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "3-flip"); @@ -241,6 +244,7 @@ public: CGAL_assertion(debug::are_cell_orientations_valid(tr())); CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( m_c3t3.triangulation(), "4-c3t3_vertices_after_smooth"); + CGAL::Tetrahedral_remeshing::debug::check_surface_patch_indices(m_c3t3); #endif #ifdef CGAL_DUMP_REMESHING_STEPS CGAL::Tetrahedral_remeshing::debug::dump_c3t3(m_c3t3, "4-smooth"); @@ -527,6 +531,7 @@ private: CGAL::Tetrahedral_remeshing::debug::dump_vertices_by_dimension( m_c3t3.triangulation(), "c3t3_vertices_"); + CGAL::Tetrahedral_remeshing::debug::check_surface_patch_indices(m_c3t3); #endif } From 3a4e230ac78d063c29f150ba68fc70665c27766a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 12:22:42 +0100 Subject: [PATCH 182/426] Do_intersect_23 should return K::Boolean Returning bool also created an issue because compilers could not figure out how to convert from Needs_FT > to bool --- .../include/CGAL/Intersection_traits.h | 14 +++--- .../CGAL/Intersections_2/Bbox_2_Circle_2.h | 25 +++++----- .../Intersections_2/Bbox_2_Iso_rectangle_2.h | 12 +++-- .../CGAL/Intersections_2/Bbox_2_Line_2.h | 22 +++++---- .../CGAL/Intersections_2/Bbox_2_Point_2.h | 26 ++++++---- .../CGAL/Intersections_2/Bbox_2_Ray_2.h | 22 +++++---- .../CGAL/Intersections_2/Bbox_2_Segment_2.h | 18 +++---- .../CGAL/Intersections_2/Bbox_2_Triangle_2.h | 14 +++--- .../CGAL/Intersections_2/Circle_2_Circle_2.h | 6 +-- .../Circle_2_Iso_rectangle_2.h | 19 ++++---- .../CGAL/Intersections_2/Circle_2_Line_2.h | 8 ++-- .../CGAL/Intersections_2/Circle_2_Point_2.h | 13 +++-- .../CGAL/Intersections_2/Circle_2_Ray_2.h | 8 ++-- .../CGAL/Intersections_2/Circle_2_Segment_2.h | 8 ++-- .../Intersections_2/Circle_2_Triangle_2.h | 6 +-- .../Iso_rectangle_2_Iso_rectangle_2.h | 9 ++-- .../Intersections_2/Iso_rectangle_2_Line_2.h | 24 ++++++---- .../Intersections_2/Iso_rectangle_2_Point_2.h | 12 ++--- .../Intersections_2/Iso_rectangle_2_Ray_2.h | 24 ++++++---- .../Iso_rectangle_2_Segment_2.h | 40 +++++++--------- .../Iso_rectangle_2_Triangle_2.h | 17 +++---- .../CGAL/Intersections_2/Line_2_Line_2.h | 21 +++++---- .../CGAL/Intersections_2/Line_2_Point_2.h | 14 +++--- .../CGAL/Intersections_2/Line_2_Ray_2.h | 39 +++++++-------- .../CGAL/Intersections_2/Line_2_Segment_2.h | 36 +++++++------- .../CGAL/Intersections_2/Line_2_Triangle_2.h | 20 ++++---- .../CGAL/Intersections_2/Point_2_Point_2.h | 9 ++-- .../CGAL/Intersections_2/Point_2_Ray_2.h | 12 ++--- .../CGAL/Intersections_2/Point_2_Segment_2.h | 4 +- .../CGAL/Intersections_2/Point_2_Triangle_2.h | 16 ++++--- .../CGAL/Intersections_2/Ray_2_Ray_2.h | 15 +++--- .../CGAL/Intersections_2/Ray_2_Segment_2.h | 24 ++++++---- .../CGAL/Intersections_2/Ray_2_Triangle_2.h | 28 +++++------ .../Intersections_2/Segment_2_Segment_2.h | 2 +- .../Intersections_2/Segment_2_Triangle_2.h | 39 +++++++-------- .../Triangle_2_Triangle_2_do_intersect_impl.h | 47 +++++++++---------- .../CGAL/Intersections_3/Bbox_3_Bbox_3.h | 2 +- .../Intersections_3/Bbox_3_Iso_cuboid_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Line_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Plane_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Point_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Ray_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Segment_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Sphere_3.h | 10 ++-- .../Intersections_3/Bbox_3_Tetrahedron_3.h | 10 ++-- .../CGAL/Intersections_3/Bbox_3_Triangle_3.h | 10 ++-- .../Intersections_3/Plane_3_Plane_3_Plane_3.h | 3 +- .../Bbox_3_Iso_cuboid_3_do_intersect.h | 14 +++--- .../internal/Bbox_3_Line_3_do_intersect.h | 26 +++++----- .../internal/Bbox_3_Plane_3_do_intersect.h | 14 +++--- .../internal/Bbox_3_Ray_3_do_intersect.h | 14 +++--- .../internal/Bbox_3_Segment_3_do_intersect.h | 14 +++--- .../internal/Bbox_3_Sphere_3_do_intersect.h | 14 +++--- .../Bbox_3_Tetrahedron_3_do_intersect.h | 16 ++++--- .../internal/Bbox_3_Triangle_3_do_intersect.h | 22 +++++---- .../Iso_cuboid_3_Iso_cuboid_3_do_intersect.h | 3 +- .../Iso_cuboid_3_Line_3_do_intersect.h | 14 +++--- .../Iso_cuboid_3_Plane_3_do_intersect.h | 20 ++++---- .../Iso_cuboid_3_Point_3_do_intersect.h | 4 +- .../Iso_cuboid_3_Ray_3_do_intersect.h | 15 +++--- .../Iso_cuboid_3_Segment_3_do_intersect.h | 14 +++--- .../Iso_cuboid_3_Sphere_3_do_intersect.h | 23 +++++---- .../Iso_cuboid_3_Triangle_3_do_intersect.h | 14 +++--- .../internal/Line_3_Line_3_do_intersect.h | 2 +- .../internal/Line_3_Plane_3_do_intersect.h | 4 +- .../internal/Line_3_Point_3_do_intersect.h | 4 +- .../internal/Line_3_Ray_3_do_intersect.h | 4 +- .../internal/Line_3_Segment_3_do_intersect.h | 4 +- .../internal/Line_3_Triangle_3_do_intersect.h | 14 +++--- .../Plane_3_Plane_3_Plane_3_do_intersect.h | 2 +- .../internal/Plane_3_Plane_3_do_intersect.h | 2 +- .../internal/Plane_3_Point_3_do_intersect.h | 4 +- .../internal/Plane_3_Ray_3_do_intersect.h | 4 +- .../internal/Plane_3_Segment_3_do_intersect.h | 4 +- .../internal/Plane_3_Sphere_3_do_intersect.h | 4 +- .../Plane_3_Triangle_3_do_intersect.h | 14 +++--- .../internal/Point_3_Ray_3_do_intersect.h | 6 +-- .../internal/Point_3_Segment_3_do_intersect.h | 4 +- .../internal/Point_3_Sphere_3_do_intersect.h | 4 +- .../Point_3_Tetrahedron_3_do_intersect.h | 4 +- .../Point_3_Triangle_3_do_intersect.h | 14 +++--- .../internal/Ray_3_Ray_3_do_intersect.h | 2 +- .../internal/Ray_3_Segment_3_do_intersect.h | 4 +- .../internal/Ray_3_Triangle_3_do_intersect.h | 14 +++--- .../Segment_3_Segment_3_do_intersect.h | 2 +- .../Segment_3_Triangle_3_do_intersect.h | 14 +++--- .../internal/Sphere_3_Sphere_3_do_intersect.h | 2 +- .../Triangle_3_Triangle_3_do_intersect.h | 37 ++++++++------- 88 files changed, 640 insertions(+), 542 deletions(-) diff --git a/Intersections_2/include/CGAL/Intersection_traits.h b/Intersections_2/include/CGAL/Intersection_traits.h index 6f0f260a594..9cc25059be9 100644 --- a/Intersections_2/include/CGAL/Intersection_traits.h +++ b/Intersections_2/include/CGAL/Intersection_traits.h @@ -62,19 +62,19 @@ #define CGAL_DO_INTERSECT_FUNCTION(A, B, DIM) \ template \ - inline bool \ + inline typename K::Boolean \ do_intersect(const A& a, const B& b) { \ return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \ } \ template \ - inline bool \ + inline typename K::Boolean \ do_intersect(const B& b, const A& a) { \ return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(b, a))); \ } #define CGAL_DO_INTERSECT_FUNCTION_SELF(A, DIM) \ template \ - inline bool \ + inline typename K::Boolean \ do_intersect(const A & a, const A & b) { \ return BOOST_PP_CAT(K().do_intersect_, BOOST_PP_CAT(DIM, _object()(a, b))); \ } @@ -152,21 +152,21 @@ intersection_impl(const A& a, const B& b, Dynamic_dimension_tag) { } template -inline bool +inline auto // K::Boolean do_intersect_impl(const A& a, const B& b, CGAL::Dimension_tag<2>) { typedef typename CGAL::Kernel_traits::Kernel Kernel; return Kernel().do_intersect_2_object()(a, b); } template -inline bool +inline auto // K::Boolean do_intersect_impl(const A& a, const B& b, Dimension_tag<3>) { typedef typename CGAL::Kernel_traits::Kernel Kernel; return Kernel().do_intersect_3_object()(a, b); } template -inline bool +inline auto // K::Boolean do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { typedef typename CGAL::Kernel_traits::Kernel Kernel; return Kernel().do_intersect_d_object()(a, b); @@ -188,7 +188,7 @@ do_intersect_impl(const A& a, const B& b, Dynamic_dimension_tag) { // template // inline -// bool +// auto // K::Boolean // do_intersect(const A& a, const B& b) { // CGAL_static_assertion_msg((std::is_same::value), // "do_intersect with objects of different dimensions not supported"); diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Circle_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Circle_2.h index c47b04b035c..399c9ac7046 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Circle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Circle_2.h @@ -24,18 +24,19 @@ namespace Intersections { namespace internal { template -bool do_intersect(const CGAL::Bbox_2& bbox, - const typename K::Circle_2& circle, - const K&) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const typename K::Circle_2& circle, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, bbox, K()); } - template -bool do_intersect(const typename K::Circle_2& circle, - const CGAL::Bbox_2& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Circle_2& circle, + const CGAL::Bbox_2& bbox, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, bbox, K()); } @@ -44,15 +45,17 @@ bool do_intersect(const typename K::Circle_2& circle, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& a, - const Circle_2& b) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& a, + const Circle_2& b) { return K().do_intersect_2_object()(a, b); } template -bool do_intersect(const Circle_2& a, - const CGAL::Bbox_2& b) +typename K::Boolean +do_intersect(const Circle_2& a, + const CGAL::Bbox_2& b) { return K().do_intersect_2_object()(a, b); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h index 1ada75030d3..1c389664308 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Iso_rectangle_2.h @@ -21,15 +21,19 @@ namespace CGAL { template -inline bool do_intersect(const Iso_rectangle_2 &rect, - const Bbox_2 &box) +inline +typename K::Boolean +do_intersect(const Iso_rectangle_2& rect, + const Bbox_2& box) { return do_intersect(K::Iso_rectangle_2(box), rect); } template -inline bool do_intersect(const Bbox_2 &box, - const Iso_rectangle_2 &rect) +inline +typename K::Boolean +do_intersect(const Bbox_2 &box, + const Iso_rectangle_2 &rect) { return do_intersect(rect, box); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Line_2.h index 3b762f0882e..76a4cf316a0 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Line_2.h @@ -27,18 +27,20 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Line_2& line, - const CGAL::Bbox_2& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Line_2& line, + const CGAL::Bbox_2& bbox, + const K& k) { typedef typename K::Iso_rectangle_2 Iso_rectangle_2; return Intersections::internal::do_intersect(line, Iso_rectangle_2(bbox), k); } template -bool do_intersect(const CGAL::Bbox_2& bbox, - const typename K::Line_2& line, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const typename K::Line_2& line, + const K& k) { return Intersections::internal::do_intersect(line, bbox, k); } @@ -47,13 +49,17 @@ bool do_intersect(const CGAL::Bbox_2& bbox, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& bbox, const Line_2& line) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const Line_2& line) { return K().do_intersect_2_object()(bbox, line); } template -bool do_intersect(const Line_2& line, const CGAL::Bbox_2& bbox) +typename K::Boolean +do_intersect(const Line_2& line, + const CGAL::Bbox_2& bbox) { return K().do_intersect_2_object()(line, bbox); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Point_2.h index 237407c60ba..1c214d44a4d 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Point_2.h @@ -24,9 +24,11 @@ namespace Intersections { namespace internal { template -inline bool do_intersect(const Bbox_2 &bbox, - const Point_2 &pt, - const K& k) +inline +typename K::Boolean +do_intersect(const Bbox_2 &bbox, + const Point_2 &pt, + const K& k) { Point_2 bl(bbox.xmin(), bbox.ymin()), tr(bbox.xmax(), bbox.ymax()); @@ -36,9 +38,11 @@ inline bool do_intersect(const Bbox_2 &bbox, } template -inline bool do_intersect(const Point_2 &pt, - const Bbox_2& bbox, - const K& k) +inline +typename K::Boolean +do_intersect(const Point_2 &pt, + const Bbox_2& bbox, + const K& k) { return do_intersect(bbox, pt, k); } @@ -69,15 +73,17 @@ intersection(const CGAL::Bbox_2& b, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& a, - const Point_2& b) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& a, + const Point_2& b) { return Intersections::internal::do_intersect(a,b,K()); } template -bool do_intersect(const Point_2& a, - const CGAL::Bbox_2& b) +typename K::Boolean +do_intersect(const Point_2& a, + const CGAL::Bbox_2& b) { return Intersections::internal::do_intersect(b,a,K()); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Ray_2.h index 75b2e71ebf7..ca5c4411e7e 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Ray_2.h @@ -27,18 +27,20 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Ray_2& ray, - const CGAL::Bbox_2& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Ray_2& ray, + const CGAL::Bbox_2& bbox, + const K& k) { typedef typename K::Iso_rectangle_2 Iso_rectangle_2; return Intersections::internal::do_intersect(ray, Iso_rectangle_2(bbox), k); } template -bool do_intersect(const CGAL::Bbox_2& bbox, - const typename K::Ray_2& ray, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const typename K::Ray_2& ray, + const K& k) { return Intersections::internal::do_intersect(ray, bbox, k); } @@ -47,13 +49,17 @@ bool do_intersect(const CGAL::Bbox_2& bbox, } // namespace Intersections template -bool do_intersect(const CGAL::Bbox_2& bbox, const Ray_2& ray) +typename K::Boolean +do_intersect(const CGAL::Bbox_2& bbox, + const Ray_2& ray) { return K().do_intersect_2_object()(bbox, ray); } template -bool do_intersect(const Ray_2& ray, const CGAL::Bbox_2& bbox) +typename K::Boolean +do_intersect(const Ray_2& ray, + const CGAL::Bbox_2& bbox) { return K().do_intersect_2_object()(ray, bbox); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h index 1bb05d61c91..0d359ca146b 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h @@ -20,20 +20,21 @@ namespace CGAL { - template -inline bool do_intersect( - const Segment_2 &seg, - const Bbox_2 &box) +inline +typename K::Boolean +do_intersect(const Segment_2& seg, + const Bbox_2& box) { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return do_intersect(rec, seg); } template -inline bool do_intersect( - const Bbox_2 &box, - const Segment_2 &seg) +inline +typename K::Boolean +do_intersect(const Bbox_2& box, + const Segment_2& seg) { return do_intersect(seg, box); } @@ -41,7 +42,8 @@ inline bool do_intersect( template typename Intersection_traits::result_type intersection(const CGAL::Bbox_2& box, - const Segment_2& seg) { + const Segment_2& seg) + { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return intersection(rec, seg); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h index 854499c7151..2f467cbee0b 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h @@ -22,18 +22,20 @@ namespace CGAL { template -inline bool do_intersect( - const Triangle_2 &tr, - const Bbox_2 &box) +inline +typename K::Boolean +do_intersect(const Triangle_2& tr, + const Bbox_2& box) { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return do_intersect(rec, tr); } template -inline bool do_intersect( - const Bbox_2 &box, - const Triangle_2 &tr) +inline +typename K::Boolean +do_intersect(const Bbox_2& box, + const Triangle_2& tr) { return do_intersect(tr, box); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h index 4f24b27c2de..ee7e48255a0 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Circle_2.h @@ -27,9 +27,9 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Circle_2 & circ1, - const typename K::Circle_2& circ2, - const K&) +typename K::Boolean do_intersect(const typename K::Circle_2& circ1, + const typename K::Circle_2& circ2, + const K&) { typedef typename K::FT FT; diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h index c1ab3dbc4e1..37a41c0b66d 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Iso_rectangle_2.h @@ -24,9 +24,9 @@ namespace internal { // Circle_2 is not a disk, thus if the box is contained within the circle, there is no intersection. template -bool do_intersect_circle_iso_rectangle_2(const typename K::Circle_2& circle, - const typename K::Iso_rectangle_2& rec, - const K&) +typename K::Boolean do_intersect_circle_iso_rectangle_2(const typename K::Circle_2& circle, + const typename K::Iso_rectangle_2& rec, + const K&) { typedef typename K::FT FT; typedef typename K::Point_2 Point; @@ -92,18 +92,17 @@ bool do_intersect_circle_iso_rectangle_2(const typename K::Circle_2& circle, } template -bool do_intersect(const typename K::Iso_rectangle_2& rec, - const typename K::Circle_2& circle, - const K&) +typename K::Boolean do_intersect(const typename K::Iso_rectangle_2& rec, + const typename K::Circle_2& circle, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, rec, K()); } - template -bool do_intersect(const typename K::Circle_2& circle, - const typename K::Iso_rectangle_2& rec, - const K&) +typename K::Boolean do_intersect(const typename K::Circle_2& circle, + const typename K::Iso_rectangle_2& rec, + const K&) { return do_intersect_circle_iso_rectangle_2(circle, rec, K()); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h index a850baa2253..1e6adff6c75 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h @@ -29,8 +29,8 @@ namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & c, +typename K::Boolean +do_intersect(const typename K::Circle_2& c, const typename K::Line_2& l, const K&) { @@ -38,9 +38,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Line_2& l, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return squared_distance(c.center(), l) <= c.squared_radius(); diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h index 3d908c6a26b..f63cfa8f049 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h @@ -25,20 +25,19 @@ namespace internal { template inline -bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Circle_2 &circle, +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Circle_2& circle, const K&) { return circle.has_on_boundary(pt); } - template inline -bool -do_intersect(const typename K::Circle_2 &circle, - const typename K::Point_2 &pt, +typename K::Boolean +do_intersect(const typename K::Circle_2& circle, + const typename K::Point_2& pt, const K&) { return circle.has_on_boundary(pt); diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h index 18c19fd8466..0a6980d0152 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h @@ -24,8 +24,8 @@ namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & c, +typename K::Boolean +do_intersect(const typename K::Circle_2& c, const typename K::Ray_2& r, const K&) { @@ -33,9 +33,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Ray_2& r, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return squared_distance(c.center(), r) <= c.squared_radius(); diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h index 71384fcc4e6..8aa1826cb88 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h @@ -24,8 +24,8 @@ namespace Intersections { namespace internal { template -bool -do_intersect(const typename K::Circle_2 & c, +typename K::Boolean +do_intersect(const typename K::Circle_2& c, const typename K::Segment_2& s, const K&) { @@ -33,9 +33,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Segment_2& s, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return squared_distance(c.center(), s) <= c.squared_radius(); diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h index 9353da936ba..3fa6486477f 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h @@ -25,7 +25,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Circle_2 & c, const typename K::Triangle_2& t, const K&) @@ -48,9 +48,9 @@ do_intersect(const typename K::Circle_2 & c, } template -bool +typename K::Boolean do_intersect(const typename K::Triangle_2& t, - const typename K::Circle_2 & c, + const typename K::Circle_2& c, const K&) { return do_intersect(c,t); diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h index a097eab4250..4ce4fdcace6 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h @@ -74,10 +74,11 @@ intersection( } template -inline bool -do_intersect(const typename K::Iso_rectangle_2 &irect1, - const typename K::Iso_rectangle_2 &irect2, - const K&) { +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& irect1, + const typename K::Iso_rectangle_2& irect2, + const K&) +{ return bool(intersection(irect1, irect2)); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h index a8d188a7a42..d1ff597c4f9 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h @@ -58,21 +58,25 @@ protected: }; template -inline bool do_intersect(const typename K::Line_2 &p1, - const typename K::Iso_rectangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Iso_rectangle_2& ir, + const K&) { - typedef Line_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Line_2_Iso_rectangle_2_pair pair_t; + pair_t pair(&l, &ir); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect(const typename K::Iso_rectangle_2 &p2, - const typename K::Line_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Line_2& l, + const K& k) { - return internal::do_intersect(p1, p2, k); + return internal::do_intersect(l, ir, k); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h index 853dcc54600..e3fe24df2c5 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h @@ -30,9 +30,9 @@ namespace internal { template inline -bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Iso_rectangle_2 &iso, +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Iso_rectangle_2& iso, const K&) { return !iso.has_on_unbounded_side(pt); @@ -40,9 +40,9 @@ do_intersect(const typename K::Point_2 &pt, template inline -bool -do_intersect(const typename K::Iso_rectangle_2 &iso, - const typename K::Point_2 &pt, +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& iso, + const typename K::Point_2& pt, const K&) { return !iso.has_on_unbounded_side(pt); diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h index 5f2b52a311a..f6682a584df 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h @@ -55,21 +55,25 @@ protected: }; template -inline bool do_intersect(const typename K::Ray_2 &p1, - const typename K::Iso_rectangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Iso_rectangle_2& ir, + const K&) { - typedef Ray_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Iso_rectangle_2_pair pair_t; + pair_t pair(&r, &ir); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect(const typename K::Iso_rectangle_2 &p2, - const typename K::Ray_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Ray_2& r, + const K& k) { - return do_intersect(p1, p2, k); + return do_intersect(r, ir, k); } template diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h index 28121109d10..e9f45e439ff 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h @@ -54,21 +54,6 @@ protected: _max; }; -template -inline bool do_intersect( - const typename K::Segment_2 &p1, - const typename K::Iso_rectangle_2 &p2, - const K&) -{ - typedef Segment_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} - - - - - template typename CGAL::Intersection_traits ::result_type @@ -208,17 +193,26 @@ intersection_point() const return translated_point(_ref_point, construct_scaled_vector(_dir,_min)); } - +template +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Iso_rectangle_2& ir, + const K&) +{ + typedef Segment_2_Iso_rectangle_2_pair pair_t; + pair_t pair(&s, &ir); + return pair.intersection_type() != pair_t::NO_INTERSECTION; +} template -inline bool do_intersect( - const typename K::Iso_rectangle_2 &p1, - const typename K::Segment_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Segment_2& s, + const K& k) { - typedef Segment_2_Iso_rectangle_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + return do_intersect(s, ir, k); } } // namespace internal diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h index 1409a6c7db8..30b4339109f 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h @@ -292,10 +292,10 @@ namespace internal { } template - bool do_intersect( - const typename K::Triangle_2 &tr, - const typename K::Iso_rectangle_2 &ir, - const K& k) + typename K::Boolean + do_intersect(const typename K::Triangle_2& tr, + const typename K::Iso_rectangle_2& ir, + const K& k) { //1) check if at least one vertex of tr is not outside ir //2) if not, check if at least on vertex of tr is not outside tr @@ -318,10 +318,11 @@ namespace internal { } template - inline bool do_intersect( - const typename K::Iso_rectangle_2 &ir, - const typename K::Triangle_2 &tr, - const K& k) + inline + typename K::Boolean + do_intersect(const typename K::Iso_rectangle_2& ir, + const typename K::Triangle_2& tr, + const K& k) { return do_intersect(tr,ir,k); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h index 8d2d3e6ae0d..5c0dfd90f10 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h @@ -52,17 +52,18 @@ protected: mutable typename K::Point_2 _intersection_point; }; -template -inline bool do_intersect( - const typename K::Line_2 &p1, - const typename K::Line_2 &p2, - const K&) -{ - typedef Line_2_Line_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} +template +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l1, + const typename K::Line_2& l2, + const K&) +{ + typedef Line_2_Line_2_pair pair_t; + pair_t pair(&l1, &l2); + return pair.intersection_type() != pair_t::NO_INTERSECTION; +} template diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h index 9e3c2525b44..c2072eb9eec 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h @@ -29,18 +29,20 @@ namespace Intersections { namespace internal { template -inline bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Line_2 &line, +inline +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Line_2& line, const K&) { return line.has_on(pt); } template -inline bool -do_intersect(const typename K::Line_2 &line, - const typename K::Point_2 &pt, +inline +typename K::Boolean +do_intersect(const typename K::Line_2& line, + const typename K::Point_2& pt, const K&) { return line.has_on(pt); diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Ray_2.h index 87f59d8a45a..8ea0cff4cd4 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Ray_2.h @@ -55,17 +55,26 @@ protected: }; template -inline bool do_intersect( - const typename K::Ray_2 &p1, - const typename K::Line_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Line_2& l, + const K&) { - typedef Ray_2_Line_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Line_2_pair pair_t; + pair_t pair(&r, &l); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } - +template +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Ray_2& r, + const K& k) +{ + return do_intersect(r, l, k); +} template typename Intersection_traits @@ -99,20 +108,6 @@ intersection(const typename K::Line_2 &line, return internal::intersection(ray, line, k); } - -template -inline bool do_intersect( - const typename K::Line_2 &p1, - const typename K::Ray_2 &p2, - const K&) -{ - typedef Ray_2_Line_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} - - - template typename Ray_2_Line_2_pair::Intersection_results Ray_2_Line_2_pair::intersection_type() const diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h index 5c2850af7a8..e2c3ec15d73 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h @@ -51,14 +51,25 @@ protected: }; template -inline bool do_intersect( - const typename K::Segment_2 &p1, - const typename K::Line_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Line_2& l, + const K& ) { - typedef Segment_2_Line_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Segment_2_Line_2_pair pair_t; + pair_t pair(&s, &l); + return pair.intersection_type() != pair_t::NO_INTERSECTION; +} + +template +inline +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Segment_2& s, + const K& k) +{ + return internal::do_intersect(s, l, k); } template @@ -92,17 +103,6 @@ intersection(const typename K::Line_2 &line, return internal::intersection(seg, line, k); } - -template -inline bool do_intersect( - const typename K::Line_2 &line, - const typename K::Segment_2 &seg, - const K& k) -{ - return internal::do_intersect(seg, line, k); -} - - template typename Segment_2_Line_2_pair::Intersection_results Segment_2_Line_2_pair::intersection_type() const diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h index 9f514030f8a..551e2f45703 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h @@ -55,24 +55,24 @@ protected: template inline -bool -do_intersect(const typename K::Line_2 &p1, - const typename K::Triangle_2 &p2, +typename K::Boolean +do_intersect(const typename K::Line_2& l, + const typename K::Triangle_2& tr, const K&) { - typedef Line_2_Triangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Line_2_Triangle_2_pair pair_t; + pair_t pair(&l, &tr); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template inline -bool -do_intersect(const typename K::Triangle_2 &p2, - const typename K::Line_2 &p1, +typename K::Boolean +do_intersect(const typename K::Triangle_2& tr, + const typename K::Line_2& l, const K& k) { - return internal::do_intersect(p1, p2, k); + return internal::do_intersect(l, tr, k); } template diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h index 7c67f3c4cf5..159c99bc3d6 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h @@ -28,10 +28,11 @@ namespace Intersections { namespace internal { template -inline bool -do_intersect(const typename K::Point_2 &pt1, - const typename K::Point_2 &pt2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Point_2& pt1, + const typename K::Point_2& pt2, + const K& k) { return pt1 == pt2; } diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h index ae67b94c503..bcdc75de506 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h @@ -30,9 +30,9 @@ namespace internal { template inline -bool -do_intersect(const typename K::Point_2 &pt, - const typename K::Ray_2 &ray, +typename K::Boolean +do_intersect(const typename K::Point_2& pt, + const typename K::Ray_2& ray, const K&) { return ray.has_on(pt); @@ -41,9 +41,9 @@ do_intersect(const typename K::Point_2 &pt, template inline -bool -do_intersect(const typename K::Ray_2 &ray, - const typename K::Point_2 &pt, +typename K::Boolean +do_intersect(const typename K::Ray_2& ray, + const typename K::Point_2& pt, const K&) { return ray.has_on(pt); diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h index 3486d58896f..a0fcc40d543 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h @@ -30,7 +30,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_2 &pt, const typename K::Segment_2 &seg, const K&) @@ -40,7 +40,7 @@ do_intersect(const typename K::Point_2 &pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_2 &seg, const typename K::Point_2 &pt, const K&) diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h index ba496198cd9..e23a39229a1 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h @@ -50,9 +50,11 @@ protected: }; template -inline bool do_intersect(const typename K::Point_2 &p1, - const typename K::Triangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Point_2& p1, + const typename K::Triangle_2& p2, + const K&) { typedef Point_2_Triangle_2_pair pair_t; pair_t pair(&p1, &p2); @@ -60,9 +62,11 @@ inline bool do_intersect(const typename K::Point_2 &p1, } template -inline bool do_intersect(const typename K::Triangle_2 &p2, - const typename K::Point_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Triangle_2& p2, + const typename K::Point_2& p1, + const K& k) { return internal::do_intersect(p1, p2, k); } diff --git a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h index 2b0c166797b..2069db1511c 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h @@ -54,14 +54,15 @@ protected: }; template -inline bool do_intersect( - const typename K::Ray_2 &p1, - const typename K::Ray_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r1, + const typename K::Ray_2& r2, + const K&) { - typedef Ray_2_Ray_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Ray_2_pair pair_t; + pair_t pair(&r1, &r2); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } diff --git a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h index 2cdebe84a13..b936a195f7d 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h @@ -54,21 +54,25 @@ protected: }; template -inline bool do_intersect(const typename K::Ray_2 &p1, - const typename K::Segment_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Segment_2& s, + const K&) { - typedef Ray_2_Segment_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Segment_2_pair pair_t; + pair_t pair(&r, &s); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect(const typename K::Segment_2 &p2, - const typename K::Ray_2 &p1, - const K& k) +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Ray_2& r, + const K& k) { - return internal::do_intersect(p1, p2, k); + return internal::do_intersect(r, s, k); } template diff --git a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h index 6db56586c55..dd1e66ec748 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h @@ -165,26 +165,26 @@ intersection(const typename K::Triangle_2&tr, template -inline bool do_intersect( - const typename K::Ray_2 &p1, - const typename K::Triangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Ray_2& r, + const typename K::Triangle_2& tr, + const K&) { - typedef Ray_2_Triangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Ray_2_Triangle_2_pair pair_t; + pair_t pair(&r, &tr); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } template -inline bool do_intersect( - const typename K::Triangle_2 &p1, - const typename K::Ray_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Triangle_2& tr, + const typename K::Ray_2& r, + const K& k) { - typedef Ray_2_Triangle_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + return do_intersect(r, tr, k); } } // namespace internal diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h index 5fd1545cc38..3e531a9416b 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -326,7 +326,7 @@ do_intersect_with_info(const typename K::Segment_2 &seg1, template -bool +typename K::Boolean do_intersect(const typename K::Segment_2 &seg1, const typename K::Segment_2 &seg2, const K& k) diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h index 4d2b93c05cf..df5f08aef9b 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h @@ -52,19 +52,26 @@ protected: }; template -inline bool do_intersect( - const typename K::Segment_2 &p1, - const typename K::Triangle_2 &p2, - const K&) +inline +typename K::Boolean +do_intersect(const typename K::Segment_2& s, + const typename K::Triangle_2& tr, + const K&) { - typedef Segment_2_Triangle_2_pair pair_t; - pair_t pair(&p1, &p2); - return pair.intersection_type() != pair_t::NO_INTERSECTION; + typedef Segment_2_Triangle_2_pair pair_t; + pair_t pair(&s, &tr); + return pair.intersection_type() != pair_t::NO_INTERSECTION; } - - - +template +inline +typename K::Boolean +do_intersect(const typename K::Triangle_2& tr, + const typename K::Segment_2& s, + const K& k) +{ + return do_intersect(s, tr, k); +} template typename Segment_2_Triangle_2_pair::Intersection_results @@ -174,18 +181,6 @@ intersection(const typename K::Triangle_2&tr, return internal::intersection(seg, tr, k); } - -template -inline bool do_intersect( - const typename K::Triangle_2 &p1, - const typename K::Segment_2 &p2, - const K&) -{ - typedef Segment_2_Triangle_2_pair pair_t; - pair_t pair(&p2, &p1); - return pair.intersection_type() != pair_t::NO_INTERSECTION; -} - } // namespace internal } // namespace Intersections diff --git a/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h b/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h index e5db80f33e1..ad3202287cb 100644 --- a/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h +++ b/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h @@ -23,15 +23,15 @@ namespace Intersections { namespace internal { template -bool intersection_test_vertex(const typename K::Point_2 * P1, - const typename K::Point_2 * Q1, - const typename K::Point_2 * R1, - const typename K::Point_2 * P2, - const typename K::Point_2 * Q2, - const typename K::Point_2 * R2, - const K & k ){ - - +typename K::Boolean +intersection_test_vertex(const typename K::Point_2* P1, + const typename K::Point_2* Q1, + const typename K::Point_2* R1, + const typename K::Point_2* P2, + const typename K::Point_2* Q2, + const typename K::Point_2* R2, + const K& k) +{ CGAL_kernel_precondition( k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE); CGAL_kernel_precondition( k.orientation_2_object() (*P2,*Q2,*R2) @@ -65,16 +65,15 @@ bool intersection_test_vertex(const typename K::Point_2 * P1, template -bool intersection_test_edge(const typename K::Point_2 * P1, - const typename K::Point_2 * Q1, - const typename K::Point_2 * R1, - const typename K::Point_2 * P2, - const typename K::Point_2 * - CGAL_kernel_precondition_code(Q2), - const typename K::Point_2 * R2, - const K & k ){ - - +typename K::Boolean +intersection_test_edge(const typename K::Point_2* P1, + const typename K::Point_2* Q1, + const typename K::Point_2* R1, + const typename K::Point_2* P2, + const typename K::Point_2* CGAL_kernel_precondition_code(Q2), + const typename K::Point_2* R2, + const K& k) +{ CGAL_kernel_precondition( k.orientation_2_object() (*P1,*Q1,*R1) == POSITIVE); CGAL_kernel_precondition( k.orientation_2_object() (*P2,*Q2,*R2) @@ -99,12 +98,12 @@ bool intersection_test_edge(const typename K::Point_2 * P1, } - template -bool do_intersect(const typename K::Triangle_2 &t1, - const typename K::Triangle_2 &t2, - const K & k ){ - +typename K::Boolean +do_intersect(const typename K::Triangle_2& t1, + const typename K::Triangle_2& t2, + const K& k) +{ CGAL_kernel_precondition( ! k.is_degenerate_2_object() (t1) ); CGAL_kernel_precondition( ! k.is_degenerate_2_object() (t2) ); diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h index f497eb4527f..bb244628c5a 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Bbox_3.h @@ -64,7 +64,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean inline do_intersect(const CGAL::Bbox_3& c, const CGAL::Bbox_3& bbox, diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h index fae76f0d787..9e509f0f405 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Iso_cuboid_3.h @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Iso_cuboid_3& ic) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Iso_cuboid_3& ic) { return K().do_intersect_3_object()(box, ic); } template -bool do_intersect(const Iso_cuboid_3& ic, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Iso_cuboid_3& ic, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(ic, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Line_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Line_3.h index 20a9e5e3d2a..d0aa3a8ddd3 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Line_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Line_3.h @@ -24,15 +24,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Line_3& l) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Line_3& l) { return K().do_intersect_3_object()(box, l); } template -bool do_intersect(const Line_3& l, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Line_3& l, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(l, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Plane_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Plane_3.h index ce7888e7539..1b83a30290f 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Plane_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Plane_3.h @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Plane_3& pl) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Plane_3& pl) { return K().do_intersect_3_object()(box, pl); } template -bool do_intersect(const Plane_3& pl, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Plane_3& pl, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(pl, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Point_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Point_3.h index 5737a04dba5..316e5ffc003 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Point_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Point_3.h @@ -30,8 +30,9 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Point_3& p) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Point_3& p) { Point_3 bl(box.xmin(), box.ymin(), box.zmin()), tr(box.xmax(), box.ymax(), box.zmax()); @@ -40,8 +41,9 @@ bool do_intersect(const CGAL::Bbox_3& box, } template -bool do_intersect(const Point_3& a, - const CGAL::Bbox_3& b) +typename K::Boolean +do_intersect(const Point_3& a, + const CGAL::Bbox_3& b) { return do_intersect(b,a); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Ray_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Ray_3.h index 3d557b0ecdd..5d53929d895 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Ray_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Ray_3.h @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Ray_3& r) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Ray_3& r) { return K().do_intersect_3_object()(box, r); } template -bool do_intersect(const Ray_3& r, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Ray_3& r, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(r, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Segment_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Segment_3.h index 35b20b8091d..cb8cd08bd88 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Segment_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Segment_3.h @@ -30,15 +30,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Segment_3& s) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Segment_3& s) { return K().do_intersect_3_object()(box, s); } template -bool do_intersect(const Segment_3& s, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Segment_3& s, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(s, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h index 913020d62cd..87171cfd3de 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Sphere_3.h @@ -28,15 +28,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Sphere_3& s) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Sphere_3& s) { return K().do_intersect_3_object()(box, s); } template -bool do_intersect(const Sphere_3& s, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Sphere_3& s, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(s, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h index 456973dbc6a..73fee00b20d 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Tetrahedron_3.h @@ -28,15 +28,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Tetrahedron_3& t) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Tetrahedron_3& t) { return K().do_intersect_3_object()(box, t); } template -bool do_intersect(const Tetrahedron_3& t, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Tetrahedron_3& t, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(t, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h index 202765284c7..ccf1a560256 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Bbox_3_Triangle_3.h @@ -29,15 +29,17 @@ namespace CGAL { template -bool do_intersect(const CGAL::Bbox_3& box, - const Triangle_3& tr) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& box, + const Triangle_3& tr) { return K().do_intersect_3_object()(box, tr); } template -bool do_intersect(const Triangle_3& tr, - const CGAL::Bbox_3& box) +typename K::Boolean +do_intersect(const Triangle_3& tr, + const CGAL::Bbox_3& box) { return K().do_intersect_3_object()(tr, box); } diff --git a/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h b/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h index 236fd2a9f50..3030089906c 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3_Plane_3.h @@ -30,7 +30,8 @@ namespace CGAL { template -inline bool +inline +typename K::Boolean do_intersect(const Plane_3& plane1, const Plane_3& plane2, const Plane_3& plane3) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h index 1a2ae1310e5..ab6a98443af 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Iso_cuboid_3_do_intersect.h @@ -23,9 +23,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const CGAL::Bbox_3& bb, - const typename K::Iso_cuboid_3& ic, - const K& /* k */) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bb, + const typename K::Iso_cuboid_3& ic, + const K& /* k */) { // use CGAL::compare to access the Coercion_traits between K::FT and double if(compare(bb.xmax(), ic.xmin()) == SMALLER || compare(ic.xmax(), bb.xmin()) == SMALLER) @@ -38,9 +39,10 @@ bool do_intersect(const CGAL::Bbox_3& bb, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const CGAL::Bbox_3& bb, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const CGAL::Bbox_3& bb, + const K& k) { return do_intersect(bb, ic, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h index 6062ba6085a..352515571d5 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h @@ -25,9 +25,9 @@ namespace CGAL { namespace Intersections { namespace internal { -template +template inline -bool +typename K::Boolean bbox_line_do_intersect_aux(const LFT px, const LFT py, const LFT pz, const LFT vx, const LFT vy, const LFT vz, const BFT bxmin, const BFT bymin, const BFT bzmin, @@ -135,9 +135,10 @@ bbox_line_do_intersect_aux(const LFT px, const LFT py, const LFT pz, } template -bool do_intersect(const typename K::Line_3& line, - const CGAL::Bbox_3& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Line_3& line, + const CGAL::Bbox_3& bbox, + const K&) { typedef typename K::Point_3 Point_3; typedef typename K::Vector_3 Vector_3; @@ -145,16 +146,17 @@ bool do_intersect(const typename K::Line_3& line, const Point_3& point = line.point(); const Vector_3& v = line.to_vector(); - return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), - v.x(), v.y(), v.z(), - bbox.xmin(), bbox.ymin(), bbox.zmin(), - bbox.xmax(), bbox.ymax(), bbox.zmax()); + return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), + v.x(), v.y(), v.z(), + bbox.xmin(), bbox.ymin(), bbox.zmin(), + bbox.xmax(), bbox.ymax(), bbox.zmax()); } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Line_3& line, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Line_3& line, + const K& k) { return do_intersect(line, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h index 803d8594e64..4e412f45d67 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Plane_3_do_intersect.h @@ -22,17 +22,19 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Plane_3& plane, - const Bbox_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Plane_3& plane, + const Bbox_3& bbox, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } template -bool do_intersect(const Bbox_3& bbox, - const typename K::Plane_3& plane, - const K& k) +typename K::Boolean +do_intersect(const Bbox_3& bbox, + const typename K::Plane_3& plane, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h index 36ca263a827..cb6813acf02 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h @@ -26,9 +26,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Ray_3& ray, - const CGAL::Bbox_3& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Ray_3& ray, + const CGAL::Bbox_3& bbox, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -49,9 +50,10 @@ bool do_intersect(const typename K::Ray_3& ray, } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Ray_3& ray, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Ray_3& ray, + const K& k) { return do_intersect(ray, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index 8a94ade50b7..72c9eee7692 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -467,9 +467,10 @@ do_intersect_bbox_segment_aux( } template -bool do_intersect(const typename K::Segment_3& segment, - const CGAL::Bbox_3& bbox, - const K&) +typename K::Boolean +do_intersect(const typename K::Segment_3& segment, + const CGAL::Bbox_3& bbox, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -483,9 +484,10 @@ bool do_intersect(const typename K::Segment_3& segment, } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Segment_3& segment, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Segment_3& segment, + const K& k) { return do_intersect(segment, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h index f37ede7b5fa..4c3c4f0c731 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Sphere_3_do_intersect.h @@ -23,9 +23,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Sphere_3& sphere, - const CGAL::Bbox_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Sphere_3& sphere, + const CGAL::Bbox_3& bbox, + const K& k) { return do_intersect_sphere_box_3(sphere, bbox.xmin(), bbox.ymin(), bbox.zmin(), @@ -34,9 +35,10 @@ bool do_intersect(const typename K::Sphere_3& sphere, } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Sphere_3& sphere, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Sphere_3& sphere, + const K& k) { return do_intersect(sphere, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h index 9be2c0ccef6..c842e5623ea 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Tetrahedron_3_do_intersect.h @@ -24,9 +24,11 @@ namespace Intersections { namespace internal { template -inline typename K::Boolean do_intersect(const CGAL::Bbox_3& aabb, - const typename K::Tetrahedron_3& tet, - const K& k) +inline +typename K::Boolean +do_intersect(const CGAL::Bbox_3& aabb, + const typename K::Tetrahedron_3& tet, + const K& k) { typename K::Construct_triangle_3 tr = k.construct_triangle_3_object(); typename K::Boolean result = false; @@ -57,9 +59,11 @@ inline typename K::Boolean do_intersect(const CGAL::Bbox_3& aabb, } template -inline typename K::Boolean do_intersect(const typename K::Tetrahedron_3& tet, - const CGAL::Bbox_3& bb, - const K &k) +inline +typename K::Boolean +do_intersect(const typename K::Tetrahedron_3& tet, + const CGAL::Bbox_3& bb, + const K &k) { return do_intersect(bb, tet, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h index 8eca9e6a517..81d93d25210 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Triangle_3_do_intersect.h @@ -397,9 +397,10 @@ do_intersect_bbox_or_iso_cuboid_impl(const std::array< std::array, 3>& tr } template -bool do_intersect_bbox_or_iso_cuboid(const typename K::Triangle_3& a_triangle, - const Box3& a_bbox, - const K& k) +typename K::Boolean +do_intersect_bbox_or_iso_cuboid(const typename K::Triangle_3& a_triangle, + const Box3& a_bbox, + const K& k) { if(certainly_not(do_bbox_intersect(a_triangle, a_bbox))) return false; @@ -423,22 +424,23 @@ bool do_intersect_bbox_or_iso_cuboid(const typename K::Triangle_3& a_triangle, { a_triangle[2][0], a_triangle[2][1], a_triangle[2][2] } }}; - // exception will be thrown in case the output is indeterminate return do_intersect_bbox_or_iso_cuboid_impl(triangle, a_bbox, do_axis_intersect_aux_impl); } template -bool do_intersect(const typename K::Triangle_3& triangle, - const CGAL::Bbox_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& triangle, + const CGAL::Bbox_3& bbox, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } template -bool do_intersect(const CGAL::Bbox_3& bbox, - const typename K::Triangle_3& triangle, - const K& k) +typename K::Boolean +do_intersect(const CGAL::Bbox_3& bbox, + const typename K::Triangle_3& triangle, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h index 3cdf1025537..18bc0e585f4 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Iso_cuboid_3_do_intersect.h @@ -18,7 +18,8 @@ namespace Intersections { namespace internal { template -inline bool +inline +typename K::Boolean do_intersect(const typename K::Iso_cuboid_3& icub1, const typename K::Iso_cuboid_3& icub2, const K&) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h index 0b3c26bf131..43c4db6c48c 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Line_3_do_intersect.h @@ -23,7 +23,8 @@ namespace Intersections { namespace internal { template -inline bool +inline +typename K::Boolean do_intersect(const typename K::Line_3& line, const typename K::Iso_cuboid_3& ic, const K&) @@ -34,14 +35,15 @@ do_intersect(const typename K::Line_3& line, const Point_3& point = line.point(); const Vector_3& v = line.to_vector(); - return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), - v.x(), v.y(), v.z(), - (ic.min)().x(), (ic.min)().y(), (ic.min)().z(), - (ic.max)().x(), (ic.max)().y(), (ic.max)().z()); + return bbox_line_do_intersect_aux(point.x(), point.y(), point.z(), + v.x(), v.y(), v.z(), + (ic.min)().x(), (ic.min)().y(), (ic.min)().z(), + (ic.max)().x(), (ic.max)().y(), (ic.max)().z()); } template -inline bool +inline +typename K::Boolean do_intersect(const typename K::Iso_cuboid_3& ic, const typename K::Line_3& l, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h index 17af49e0246..3510e29db64 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h @@ -79,9 +79,9 @@ Uncertain get_min_max(const typename K::Vector_3& p, } template // Iso_cuboid_3 or Bbox_3 -bool do_intersect_plane_box(const typename K::Plane_3& plane, - const Box3& bbox, - const K&) +typename K::Boolean do_intersect_plane_box(const typename K::Plane_3& plane, + const Box3& bbox, + const K&) { typedef typename K::Point_3 Point_3; @@ -114,17 +114,19 @@ bool do_intersect_plane_box(const typename K::Plane_3& plane, } template -bool do_intersect(const typename K::Plane_3& plane, - const typename K::Iso_cuboid_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Plane_3& plane, + const typename K::Iso_cuboid_3& bbox, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } template -bool do_intersect(const typename K::Iso_cuboid_3& bbox, - const typename K::Plane_3& plane, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& bbox, + const typename K::Plane_3& plane, + const K& k) { return do_intersect_plane_box(plane, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h index bafe971d903..32d01b5526a 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Point_3_do_intersect.h @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Iso_cuboid_3& iso, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Iso_cuboid_3& iso, const typename K::Point_3& pt, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h index e467d7ea327..6dd2a0ee646 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h @@ -27,9 +27,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Ray_3& ray, - const typename K::Iso_cuboid_3& ic, - const K&) +typename K::Boolean +do_intersect(const typename K::Ray_3& ray, + const typename K::Iso_cuboid_3& ic, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -51,9 +52,11 @@ bool do_intersect(const typename K::Ray_3& ray, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const typename K::Ray_3& ray, - const K& k) { +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const typename K::Ray_3& ray, + const K& k) +{ return do_intersect(ray, ic, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h index 3c42487730f..c14046c54aa 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h @@ -24,9 +24,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Segment_3& seg, - const typename K::Iso_cuboid_3& ic, - const K&) +typename K::Boolean +do_intersect(const typename K::Segment_3& seg, + const typename K::Iso_cuboid_3& ic, + const K&) { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; @@ -48,9 +49,10 @@ bool do_intersect(const typename K::Segment_3& seg, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const typename K::Segment_3& seg, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const typename K::Segment_3& seg, + const K& k) { return do_intersect(seg, ic, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h index f6090ba7cbf..a9ef6c3a50a 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Sphere_3_do_intersect.h @@ -22,10 +22,11 @@ namespace Intersections { namespace internal { template // Iso_cuboid_3 or Bbox_3 -bool do_intersect_sphere_box_3(const typename K::Sphere_3& sphere, - const BFT bxmin, const BFT bymin, const BFT bzmin, - const BFT bxmax, const BFT bymax, const BFT bzmax, - const K&) +typename K::Boolean +do_intersect_sphere_box_3(const typename K::Sphere_3& sphere, + const BFT bxmin, const BFT bymin, const BFT bzmin, + const BFT bxmax, const BFT bymax, const BFT bzmax, + const K&) { typedef typename K::FT SFT; typedef typename Coercion_traits::Type FT; @@ -94,9 +95,10 @@ bool do_intersect_sphere_box_3(const typename K::Sphere_3& sphere, } template -bool do_intersect(const typename K::Sphere_3& sphere, - const typename K::Iso_cuboid_3& ic, - const K& k) +typename K::Boolean +do_intersect(const typename K::Sphere_3& sphere, + const typename K::Iso_cuboid_3& ic, + const K& k) { return do_intersect_sphere_box_3(sphere, (ic.min)().x(), (ic.min)().y(), (ic.min)().z(), @@ -105,9 +107,10 @@ bool do_intersect(const typename K::Sphere_3& sphere, } template -bool do_intersect(const typename K::Iso_cuboid_3& ic, - const typename K::Sphere_3& sphere, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& ic, + const typename K::Sphere_3& sphere, + const K& k) { return do_intersect(sphere, ic, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h index 723ef269306..08a2e19e49d 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h @@ -21,17 +21,19 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& triangle, - const typename K::Iso_cuboid_3& bbox, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& triangle, + const typename K::Iso_cuboid_3& bbox, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } template -bool do_intersect(const typename K::Iso_cuboid_3& bbox, - const typename K::Triangle_3& triangle, - const K& k) +typename K::Boolean +do_intersect(const typename K::Iso_cuboid_3& bbox, + const typename K::Triangle_3& triangle, + const K& k) { return do_intersect_bbox_or_iso_cuboid(triangle, bbox, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h index 5da82672621..43a161c9c3f 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Line_3_do_intersect.h @@ -18,7 +18,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Line_3& l1, const typename K::Line_3& l2, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h index 2dc5b2122cd..72ead862807 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Plane_3_do_intersect.h @@ -21,7 +21,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Line_3& line, const K&) @@ -48,7 +48,7 @@ do_intersect(const typename K::Plane_3& plane, template inline -bool +typename K::Boolean do_intersect(const typename K::Line_3& line, const typename K::Plane_3& plane, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h index b4a0cf92113..a4407eb7f16 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Point_3_do_intersect.h @@ -18,7 +18,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Line_3& line, const K& k) @@ -27,7 +27,7 @@ do_intersect(const typename K::Point_3& pt, } template -inline bool +inline typename K::Boolean do_intersect(const typename K::Line_3& line, const typename K::Point_3& pt, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h index e6e125107f0..f4aa1e8e37c 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h @@ -23,7 +23,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Line_3& l, const typename K::Ray_3& r, const K& k) @@ -47,7 +47,7 @@ do_intersect(const typename K::Line_3& l, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& r, const typename K::Line_3& l, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h index d03d33e76e7..d080ac11279 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Segment_3_do_intersect.h @@ -24,7 +24,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Line_3& l, const typename K::Segment_3& s, const K& k) @@ -52,7 +52,7 @@ do_intersect(const typename K::Line_3& l, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& s, const typename K::Line_3& l, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h index 4b2635a3153..a5b5dd1fc76 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Triangle_3_do_intersect.h @@ -21,9 +21,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Line_3& l, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Line_3& l, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t)); CGAL_kernel_precondition(!k.is_degenerate_3_object()(l)); @@ -73,9 +74,10 @@ bool do_intersect(const typename K::Triangle_3& t, template inline -bool do_intersect(const typename K::Line_3& l, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean + do_intersect(const typename K::Line_3& l, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, l, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h index 2884506fc20..05ff652ccfa 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_Plane_3_do_intersect.h @@ -23,7 +23,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const typename K::Plane_3& plane3, diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h index fc984e41dcf..cf39bbe2c41 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Plane_3_do_intersect.h @@ -20,7 +20,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Plane_3& plane1, const typename K::Plane_3& plane2, const K&) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h index f53221b5700..d3798d69b6b 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Point_3_do_intersect.h @@ -18,7 +18,7 @@ namespace Intersections { namespace internal { template -inline bool +inline typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Plane_3& plane, const K& k) @@ -27,7 +27,7 @@ do_intersect(const typename K::Point_3& pt, } template -inline bool +inline typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Point_3& pt, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h index d254bc3f367..f57d4f9d25a 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Ray_3_do_intersect.h @@ -25,7 +25,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Ray_3& ray, const K& k) @@ -40,7 +40,7 @@ do_intersect(const typename K::Plane_3& plane, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& ray, const typename K::Plane_3& plane, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h index 581a9cfa9a8..509ef49ecee 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Segment_3_do_intersect.h @@ -20,7 +20,7 @@ namespace Intersections { namespace internal { template -bool +typename K::Boolean do_intersect(const typename K::Plane_3& plane, const typename K::Segment_3& seg, const K&) @@ -41,7 +41,7 @@ do_intersect(const typename K::Plane_3& plane, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& seg, const typename K::Plane_3& plane, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h index df7b7c738ae..9f1e51f8686 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Sphere_3_do_intersect.h @@ -21,7 +21,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Plane_3& p, const typename K::Sphere_3& s, const K&) @@ -37,7 +37,7 @@ do_intersect(const typename K::Plane_3& p, template inline -bool +typename K::Boolean do_intersect(const typename K::Sphere_3& s, const typename K::Plane_3& p, const K&) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h index 2d7cd516900..ea0462dadd6 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_do_intersect.h @@ -21,9 +21,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Plane_3& h, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Plane_3& h, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t)); CGAL_kernel_precondition(!k.is_degenerate_3_object()(h)); @@ -49,9 +50,10 @@ bool do_intersect(const typename K::Triangle_3& t, template inline -bool do_intersect(const typename K::Plane_3& h, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Plane_3& h, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, h, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h index 0aec93a129c..69f75948f8b 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Ray_3_do_intersect.h @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Ray_3& ray, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& ray, const typename K::Point_3& pt, const K& k) @@ -39,7 +39,7 @@ do_intersect(const typename K::Ray_3& ray, template -bool +typename K::Boolean Ray_3_has_on_collinear_Point_3(const typename K::Ray_3& r, const typename K::Point_3& p, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h index 2872694d6af..fa54c9bbaba 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Segment_3_do_intersect.h @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Segment_3& seg, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& seg, const typename K::Point_3& pt, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h index d825e2ff820..e9734dfdb23 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Sphere_3_do_intersect.h @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Sphere_3& sphere, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Sphere_3& sphere, const typename K::Point_3& pt, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h index 0518a305073..b22ffc8d0a2 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Tetrahedron_3_do_intersect.h @@ -19,7 +19,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Point_3& pt, const typename K::Tetrahedron_3& tetrahedron, const K& k) @@ -29,7 +29,7 @@ do_intersect(const typename K::Point_3& pt, template inline -bool +typename K::Boolean do_intersect(const typename K::Tetrahedron_3& tetrahedron, const typename K::Point_3& pt, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h index a116b4617a9..f22d551e842 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Point_3_Triangle_3_do_intersect.h @@ -21,9 +21,10 @@ namespace Intersections { namespace internal { template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Point_3& p, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Point_3& p, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t)); @@ -68,9 +69,10 @@ bool do_intersect(const typename K::Triangle_3& t, } template -bool do_intersect(const typename K::Point_3& p, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Point_3& p, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, p, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h index cf334475335..5ceb8e0eeb9 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Ray_3_do_intersect.h @@ -24,7 +24,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& r1, const typename K::Ray_3& r2, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h index bf57d977f0c..72d4ceec703 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Segment_3_do_intersect.h @@ -24,7 +24,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& s, const typename K::Ray_3& r, const K& k) @@ -56,7 +56,7 @@ do_intersect(const typename K::Segment_3& s, template inline -bool +typename K::Boolean do_intersect(const typename K::Ray_3& r, const typename K::Segment_3& s, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h index f0d6ea725d3..d349c2616e2 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Ray_3_Triangle_3_do_intersect.h @@ -328,18 +328,20 @@ do_intersect(const typename K::Triangle_3& t, } template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Ray_3& r, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Ray_3& r, + const K& k) { return do_intersect(t, r, k, r3t3_do_intersect_empty_visitor()); } template inline -bool do_intersect(const typename K::Ray_3& r, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Ray_3& r, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, r, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h index 5943325975b..db3b01bffb9 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Segment_3_do_intersect.h @@ -23,7 +23,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Segment_3& s1, const typename K::Segment_3& s2, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h index 70c0f3e0813..5a1f7ecff28 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h @@ -173,9 +173,10 @@ bool do_intersect_coplanar(const typename K::Triangle_3& t, } template -bool do_intersect(const typename K::Triangle_3& t, - const typename K::Segment_3& s, - const K& k) +typename K::Boolean +do_intersect(const typename K::Triangle_3& t, + const typename K::Segment_3& s, + const K& k) { CGAL_kernel_precondition(!k.is_degenerate_3_object()(t) ); CGAL_kernel_precondition(!k.is_degenerate_3_object()(s) ); @@ -269,9 +270,10 @@ bool do_intersect(const typename K::Triangle_3& t, template inline -bool do_intersect(const typename K::Segment_3& s, - const typename K::Triangle_3& t, - const K& k) +typename K::Boolean +do_intersect(const typename K::Segment_3& s, + const typename K::Triangle_3& t, + const K& k) { return do_intersect(t, s, k); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h index 52976148c05..b7bf1a8e5c0 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Sphere_3_Sphere_3_do_intersect.h @@ -21,7 +21,7 @@ namespace internal { template inline -bool +typename K::Boolean do_intersect(const typename K::Sphere_3& s1, const typename K::Sphere_3& s2, const K& k) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h index ce993540138..0ab18e3e0c8 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_do_intersect.h @@ -22,13 +22,14 @@ namespace Intersections { namespace internal { template -bool _intersection_test_vertex(const typename K::Point_3* p, - const typename K::Point_3* q, - const typename K::Point_3* r, - const typename K::Point_3* a, - const typename K::Point_3* b, - const typename K::Point_3* c, - const K& k) +typename K::Boolean +_intersection_test_vertex(const typename K::Point_3* p, + const typename K::Point_3* q, + const typename K::Point_3* r, + const typename K::Point_3* a, + const typename K::Point_3* b, + const typename K::Point_3* c, + const K& k) { CGAL_kernel_precondition(k.coplanar_orientation_3_object()(*p,*q,*r) == POSITIVE); CGAL_kernel_precondition(k.coplanar_orientation_3_object()(*a,*b,*c) == POSITIVE); @@ -64,13 +65,14 @@ bool _intersection_test_vertex(const typename K::Point_3* p, } template -bool _intersection_test_edge(const typename K::Point_3* p, - const typename K::Point_3* q, - const typename K::Point_3* r, - const typename K::Point_3* a, - const typename K::Point_3* CGAL_kernel_precondition_code(b), - const typename K::Point_3* c, - const K& k) +typename K::Boolean +_intersection_test_edge(const typename K::Point_3* p, + const typename K::Point_3* q, + const typename K::Point_3* r, + const typename K::Point_3* a, + const typename K::Point_3* CGAL_kernel_precondition_code(b), + const typename K::Point_3* c, + const K& k) { CGAL_kernel_precondition(k.coplanar_orientation_3_object() (*p,*q,*r) == POSITIVE); CGAL_kernel_precondition(k.coplanar_orientation_3_object() (*a,*b,*c) == POSITIVE); @@ -97,9 +99,10 @@ bool _intersection_test_edge(const typename K::Point_3* p, } template -bool do_intersect_coplanar(const typename K::Triangle_3& t1, - const typename K::Triangle_3& t2, - const K& k) +typename K::Boolean +do_intersect_coplanar(const typename K::Triangle_3& t1, + const typename K::Triangle_3& t2, + const K& k) { typedef typename K::Point_3 Point_3; From 8ba0b41f510f15460d52443187499920b3ecbff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 12:35:10 +0100 Subject: [PATCH 183/426] Drive-by cleaning --- .../include/CGAL/Intersections_2/Bbox_2_Segment_2.h | 6 ++++-- .../include/CGAL/Intersections_2/Bbox_2_Triangle_2.h | 10 ++++++---- .../include/CGAL/Intersections_2/Circle_2_Line_2.h | 2 +- .../include/CGAL/Intersections_2/Circle_2_Point_2.h | 11 ++++++----- .../include/CGAL/Intersections_2/Circle_2_Ray_2.h | 1 + .../include/CGAL/Intersections_2/Circle_2_Segment_2.h | 1 + .../CGAL/Intersections_2/Circle_2_Triangle_2.h | 1 + .../Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h | 5 ++--- .../CGAL/Intersections_2/Iso_rectangle_2_Line_2.h | 4 +--- .../CGAL/Intersections_2/Iso_rectangle_2_Point_2.h | 8 ++++---- .../CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h | 5 ++--- .../CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h | 2 +- .../CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h | 8 ++++---- .../include/CGAL/Intersections_2/Line_2_Line_2.h | 5 ++--- .../include/CGAL/Intersections_2/Line_2_Point_2.h | 8 ++++---- .../include/CGAL/Intersections_2/Line_2_Segment_2.h | 5 ++--- .../include/CGAL/Intersections_2/Line_2_Triangle_2.h | 4 ++-- .../include/CGAL/Intersections_2/Point_2_Point_2.h | 7 +++---- .../include/CGAL/Intersections_2/Point_2_Ray_2.h | 11 ++++------- .../include/CGAL/Intersections_2/Point_2_Segment_2.h | 5 ++--- .../include/CGAL/Intersections_2/Point_2_Triangle_2.h | 4 ++-- .../include/CGAL/Intersections_2/Ray_2_Ray_2.h | 5 ++--- .../include/CGAL/Intersections_2/Ray_2_Segment_2.h | 4 ++-- .../include/CGAL/Intersections_2/Ray_2_Triangle_2.h | 5 ++--- .../CGAL/Intersections_2/Segment_2_Segment_2.h | 4 ++-- .../CGAL/Intersections_2/Segment_2_Triangle_2.h | 4 ++-- .../CGAL/Intersections_2/Triangle_2_Triangle_2.h | 4 +++- .../CGAL/Intersections_2/internal/Straight_2.h | 5 ++--- .../Triangle_2_Triangle_2_do_intersect_impl.h | 4 ++-- .../CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h | 2 +- .../internal/Bbox_3_Segment_3_do_intersect.h | 7 +++---- .../internal/Iso_cuboid_3_Plane_3_do_intersect.h | 3 ++- .../internal/Iso_cuboid_3_Triangle_3_do_intersect.h | 3 --- .../internal/Segment_3_Triangle_3_do_intersect.h | 3 ++- 34 files changed, 80 insertions(+), 86 deletions(-) diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h index 0d359ca146b..25834353eb8 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Segment_2.h @@ -51,9 +51,11 @@ intersection(const CGAL::Bbox_2& box, template typename Intersection_traits::result_type intersection(const Segment_2& seg, - const CGAL::Bbox_2& box) { + const CGAL::Bbox_2& box) +{ return intersection(box, seg); } -} +} // namespace CGAL + #endif // CGAL_INTERSECTIONS_BBOX_2_SEGMENT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h index 2f467cbee0b..8dd4236f591 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h @@ -20,7 +20,6 @@ namespace CGAL { - template inline typename K::Boolean @@ -43,7 +42,8 @@ do_intersect(const Bbox_2& box, template typename Intersection_traits::result_type intersection(const Bbox_2& box, - const Triangle_2& tr) { + const Triangle_2& tr) + { typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return intersection(rec, tr); } @@ -51,9 +51,11 @@ intersection(const Bbox_2& box, template typename Intersection_traits::result_type intersection(const Triangle_2& tr, - const Bbox_2& box) { + const Bbox_2& box) +{ return intersection(box, tr); } -} +} // namespace CGAL + #endif // CGAL_INTERSECTIONS_BBOX_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h index 1e6adff6c75..2d2ac26fc56 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Line_2.h @@ -53,4 +53,4 @@ CGAL_DO_INTERSECT_FUNCTION(Circle_2, Line_2, 2) } // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_CIRCLE_2_LINE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h index f63cfa8f049..ac88c867d12 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Point_2.h @@ -47,8 +47,8 @@ do_intersect(const typename K::Circle_2& circle, template typename CGAL::Intersection_traits ::result_type -intersection(const typename K::Point_2 &pt, - const typename K::Circle_2 &circle, +intersection(const typename K::Point_2& pt, + const typename K::Circle_2& circle, const K& k) { if (do_intersect(pt,circle, k)) @@ -59,8 +59,8 @@ intersection(const typename K::Point_2 &pt, template typename CGAL::Intersection_traits ::result_type -intersection(const typename K::Circle_2 &circle, - const typename K::Point_2 &pt, +intersection(const typename K::Circle_2& circle, + const typename K::Point_2& pt, const K& k) { return internal::intersection(pt, circle, k); @@ -72,5 +72,6 @@ intersection(const typename K::Circle_2 &circle, CGAL_INTERSECTION_FUNCTION(Point_2, Circle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Circle_2, Point_2, 2) -} //namespace CGAL +} // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_POINT_2_CIRCLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h index 0a6980d0152..0bb6c56f331 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Ray_2.h @@ -47,4 +47,5 @@ do_intersect(const typename K::Ray_2& r, CGAL_DO_INTERSECT_FUNCTION(Circle_2, Ray_2, 2) } // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_CIRCLE_2_RAY_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h index 8aa1826cb88..d884d520332 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Segment_2.h @@ -47,4 +47,5 @@ do_intersect(const typename K::Segment_2& s, CGAL_DO_INTERSECT_FUNCTION(Circle_2, Segment_2, 2) } // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_CIRCLE_2_SEGMENT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h index 3fa6486477f..e74f1e80e8d 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Circle_2_Triangle_2.h @@ -62,4 +62,5 @@ do_intersect(const typename K::Triangle_2& t, CGAL_DO_INTERSECT_FUNCTION(Circle_2, Triangle_2, 2) } // namespace CGAL + #endif // CGAL_INTERSECTIONS_2_CIRCLE_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h index 4ce4fdcace6..0b73db82b88 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Iso_rectangle_2.h @@ -85,10 +85,9 @@ do_intersect(const typename K::Iso_rectangle_2& irect1, } // namespace internal } // namespace Intersections - CGAL_INTERSECTION_FUNCTION_SELF(Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Iso_rectangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_ISO_RECTANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h index d1ff597c4f9..74bb8ff2f82 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Line_2.h @@ -79,8 +79,6 @@ do_intersect(const typename K::Iso_rectangle_2& ir, return internal::do_intersect(l, ir, k); } - - template typename Line_2_Iso_rectangle_2_pair::Intersection_results Line_2_Iso_rectangle_2_pair::intersection_type() const @@ -221,4 +219,4 @@ CGAL_DO_INTERSECT_FUNCTION(Line_2, Iso_rectangle_2, 2) #include -#endif +#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_LINE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h index e3fe24df2c5..011eacf8e36 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Point_2.h @@ -35,7 +35,7 @@ do_intersect(const typename K::Point_2& pt, const typename K::Iso_rectangle_2& iso, const K&) { - return !iso.has_on_unbounded_side(pt); + return !iso.has_on_unbounded_side(pt); } template @@ -45,7 +45,7 @@ do_intersect(const typename K::Iso_rectangle_2& iso, const typename K::Point_2& pt, const K&) { - return !iso.has_on_unbounded_side(pt); + return !iso.has_on_unbounded_side(pt); } template @@ -77,6 +77,6 @@ intersection(const typename K::Iso_rectangle_2 &iso, CGAL_INTERSECTION_FUNCTION(Point_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Iso_rectangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_ISO_RECTANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h index f6682a584df..6d9bb8e6e91 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Ray_2.h @@ -204,9 +204,8 @@ Ray_2_Iso_rectangle_2_pair::intersection_point() const CGAL_INTERSECTION_FUNCTION(Ray_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Ray_2, Iso_rectangle_2, 2) - -} //namespace CGAL +} // namespace CGAL #include -#endif // CGAL_RAY_2_iSO_RECTANGLE_2_INTERSECTION_H +#endif // CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h index e9f45e439ff..be4c309f0df 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Segment_2.h @@ -221,7 +221,7 @@ do_intersect(const typename K::Iso_rectangle_2& ir, CGAL_INTERSECTION_FUNCTION(Segment_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Segment_2, Iso_rectangle_2, 2) -} //namespace CGAL +} // namespace CGAL #include diff --git a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h index 30b4339109f..0fb171e7b92 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Iso_rectangle_2_Triangle_2.h @@ -324,15 +324,15 @@ namespace internal { const typename K::Triangle_2& tr, const K& k) { - return do_intersect(tr,ir,k); + return do_intersect(tr, ir, k); } -} //namespace internal +} // namespace internal } // namespace Intersections CGAL_INTERSECTION_FUNCTION(Triangle_2, Iso_rectangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Triangle_2, Iso_rectangle_2, 2) -}//end namespace +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_ISO_RECTANGLE_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h index 5c0dfd90f10..6a48b777594 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Line_2.h @@ -201,7 +201,6 @@ Line_2_Line_2_pair::intersection_line() const CGAL_INTERSECTION_FUNCTION_SELF(Line_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Line_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_LINE_2_LINE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h index c2072eb9eec..96ede987ac4 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Point_2.h @@ -35,7 +35,7 @@ do_intersect(const typename K::Point_2& pt, const typename K::Line_2& line, const K&) { - return line.has_on(pt); + return line.has_on(pt); } template @@ -45,7 +45,7 @@ do_intersect(const typename K::Line_2& line, const typename K::Point_2& pt, const K&) { - return line.has_on(pt); + return line.has_on(pt); } template @@ -78,6 +78,6 @@ intersection(const typename K::Line_2 &line, CGAL_INTERSECTION_FUNCTION(Point_2, Line_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Line_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_LINE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h index e2c3ec15d73..f61d38c2a06 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Segment_2.h @@ -156,7 +156,6 @@ Segment_2_Line_2_pair::intersection_segment() const CGAL_INTERSECTION_FUNCTION(Segment_2, Line_2, 2) CGAL_DO_INTERSECT_FUNCTION(Segment_2, Line_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_SEGMENT_2_LINE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h index 551e2f45703..158ede462b6 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Line_2_Triangle_2.h @@ -190,6 +190,6 @@ intersection(const typename K::Triangle_2 &tr, CGAL_INTERSECTION_FUNCTION(Line_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Line_2, Triangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_LINE_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h index 159c99bc3d6..2981dad86ad 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h @@ -50,13 +50,12 @@ intersection(const typename K::Point_2 &pt1, return intersection_return(); } -}// namespace internal +} // namespace internal } // namespace Intersections CGAL_INTERSECTION_FUNCTION_SELF(Point_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Point_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_POINT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h index bcdc75de506..271e86184cf 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Ray_2.h @@ -51,8 +51,7 @@ do_intersect(const typename K::Ray_2& ray, template -typename CGAL::Intersection_traits -::result_type +typename CGAL::Intersection_traits::result_type intersection(const typename K::Point_2 &pt, const typename K::Ray_2 &ray, const K& k) @@ -64,8 +63,7 @@ intersection(const typename K::Point_2 &pt, } template -typename CGAL::Intersection_traits -::result_type +typename CGAL::Intersection_traits::result_type intersection(const typename K::Ray_2 &ray, const typename K::Point_2 &pt, const K& k) @@ -79,7 +77,6 @@ intersection(const typename K::Ray_2 &ray, CGAL_INTERSECTION_FUNCTION(Point_2, Ray_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Ray_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_RAY_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h index a0fcc40d543..8a48c10b6e3 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Segment_2.h @@ -77,10 +77,9 @@ intersection( const typename K::Segment_2 &seg, } // namespace internal } // namespace Intersections - CGAL_INTERSECTION_FUNCTION(Point_2, Segment_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Segment_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_SEGMENT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h index e23a39229a1..1d70d3b7d54 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Triangle_2.h @@ -137,6 +137,6 @@ intersection(const typename K::Triangle_2 &tr, CGAL_INTERSECTION_FUNCTION(Point_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Point_2, Triangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_POINT_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h index 2069db1511c..850f3e364b0 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Ray_2.h @@ -253,7 +253,6 @@ intersection(const typename K::Ray_2 &ray1, CGAL_INTERSECTION_FUNCTION_SELF(Ray_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Ray_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_RAY_2_RAY_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h index b936a195f7d..acc6d4a41df 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Segment_2.h @@ -269,6 +269,6 @@ intersection(const typename K::Segment_2 &seg, CGAL_INTERSECTION_FUNCTION(Ray_2, Segment_2, 2) CGAL_DO_INTERSECT_FUNCTION(Ray_2, Segment_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_RAY_2_SEGMENT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h index dd1e66ec748..cb915a1020b 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Ray_2_Triangle_2.h @@ -193,7 +193,6 @@ do_intersect(const typename K::Triangle_2& tr, CGAL_INTERSECTION_FUNCTION(Ray_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Ray_2, Triangle_2, 2) +} // namespace CGAL -} //namespace CGAL - -#endif +#endif // CGAL_INTERSECTIONS_2_RAY_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h index 3e531a9416b..663db4b19f2 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -492,6 +492,6 @@ intersection(const typename K::Segment_2 &seg1, CGAL_INTERSECTION_FUNCTION_SELF(Segment_2, 2) CGAL_DO_INTERSECT_FUNCTION_SELF(Segment_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_SEGMENT_2_SEGMENT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h index df5f08aef9b..f747ac083cf 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Triangle_2.h @@ -187,6 +187,6 @@ intersection(const typename K::Triangle_2&tr, CGAL_INTERSECTION_FUNCTION(Segment_2, Triangle_2, 2) CGAL_DO_INTERSECT_FUNCTION(Segment_2, Triangle_2, 2) -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_SEGMENT_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h index 27b2d9f8f67..405d6499696 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Triangle_2_Triangle_2.h @@ -22,8 +22,10 @@ #include namespace CGAL { + CGAL_DO_INTERSECT_FUNCTION_SELF(Triangle_2, 2) CGAL_INTERSECTION_FUNCTION_SELF(Triangle_2, 2) + } // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_TRIANGLE_2_TRIANGLE_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/internal/Straight_2.h b/Intersections_2/include/CGAL/Intersections_2/internal/Straight_2.h index 36cc7e06486..88176280301 100644 --- a/Intersections_2/include/CGAL/Intersections_2/internal/Straight_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/internal/Straight_2.h @@ -14,7 +14,6 @@ // // Author(s) : Geert-Jan Giezeman - #ifndef CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H #define CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H @@ -346,6 +345,6 @@ collinear_order(typename K::Point_2 const &pt1, typename K::Point_2 const & pt2) } // namespace internal } // namespace Intersections -} //namespace CGAL +} // namespace CGAL -#endif +#endif // CGAL_INTERSECTIONS_2_INTERNAL_STRAIGHT_2_H diff --git a/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h b/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h index ad3202287cb..774abba6178 100644 --- a/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h +++ b/Intersections_2/include/CGAL/Intersections_2/internal/Triangle_2_Triangle_2_do_intersect_impl.h @@ -163,6 +163,6 @@ do_intersect(const typename K::Triangle_2& t1, } // namespace internal } // namespace Intersections -} //namespace CGAL +} // namespace CGAL -#endif //CGAL_TRIANGLE_2_TRIANGLE_2_DO_INTERSECT_H +#endif // CGAL_TRIANGLE_2_TRIANGLE_2_DO_INTERSECT_H diff --git a/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h b/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h index b6d7c174b9f..764e6005cf3 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Iso_cuboid_3_Triangle_3.h @@ -34,4 +34,4 @@ CGAL_INTERSECTION_FUNCTION(Iso_cuboid_3, Triangle_3, 3) } // namespace CGAL -#endif // CGAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_H +#endif // CGAL_INTERSECTIONS_3_ISO_CUBOID_3_TRIANGLE_3_H diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index 72c9eee7692..1c4572bfb53 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -454,10 +454,9 @@ template inline typename Do_intersect_bbox_segment_aux_is_greater::result_type -do_intersect_bbox_segment_aux( - const FT& px, const FT& py, const FT& pz, - const FT& qx, const FT& qy, const FT& qz, - const Bbox_3& bb) +do_intersect_bbox_segment_aux(const FT& px, const FT& py, const FT& pz, + const FT& qx, const FT& qy, const FT& qz, + const Bbox_3& bb) { return do_intersect_bbox_segment_aux(px, py, pz, diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h index 3510e29db64..f35ddb65d2b 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Plane_3_do_intersect.h @@ -87,7 +87,8 @@ typename K::Boolean do_intersect_plane_box(const typename K::Plane_3& plane, Point_3 p_max, p_min; Uncertain b = get_min_max(plane.orthogonal_vector(), bbox, p_min, p_max); - if(is_certain(b)){ + if(is_certain(b)) + { return ! (plane.oriented_side(p_max) == ON_NEGATIVE_SIDE || plane.oriented_side(p_min) == ON_POSITIVE_SIDE); } diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h index 08a2e19e49d..6974c72ebad 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Triangle_3_do_intersect.h @@ -40,9 +40,6 @@ do_intersect(const typename K::Iso_cuboid_3& bbox, } // namespace internal } // namespace Intersections - - - } // namespace CGAL #endif // CGAL_INTERNAL_INTERSECTIONS_3_ISO_CUBOID_3_TRIANGLE_3_DO_INTERSECT_H diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h index 5a1f7ecff28..23fc5d897f4 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Segment_3_Triangle_3_do_intersect.h @@ -25,7 +25,8 @@ bool do_intersect_coplanar(const typename K::Point_3& A, const typename K::Point_3& B, const typename K::Point_3& C, const typename K::Point_3& p, - const typename K::Point_3& q, const K& k) + const typename K::Point_3& q, + const K& k) { typedef typename K::Point_3 Point_3; From dbe4c0fb5efb40ac5bde3e0ea82d9348e5996ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 12:35:22 +0100 Subject: [PATCH 184/426] Use a kernel functor instead of assuming kernel object operators exist --- .../CGAL/Intersections_2/Point_2_Point_2.h | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h index 2981dad86ad..3b13b6a461e 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Point_2_Point_2.h @@ -34,20 +34,19 @@ do_intersect(const typename K::Point_2& pt1, const typename K::Point_2& pt2, const K& k) { - return pt1 == pt2; + return k.equal_2_object()(pt1, pt2); } template -typename CGAL::Intersection_traits -::result_type -intersection(const typename K::Point_2 &pt1, - const typename K::Point_2 &pt2, - const K&) +typename CGAL::Intersection_traits::result_type +intersection(const typename K::Point_2& pt1, + const typename K::Point_2& pt2, + const K& k) { - if (pt1 == pt2) { - return intersection_return(pt1); - } - return intersection_return(); + if (k.equal_2_object()(pt1, pt2)) + return intersection_return(pt1); + + return intersection_return(); } } // namespace internal From a7581010386e659c0e6638f180630ab45c9524fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 12:35:44 +0100 Subject: [PATCH 185/426] Remove some useless includes --- .../include/CGAL/Intersections_2/Segment_2_Segment_2.h | 1 - .../test/Intersections_3/bbox_other_do_intersect_test.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h index 663db4b19f2..57f2e31b5bb 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -25,7 +25,6 @@ #include #include #include -#include #include namespace CGAL { diff --git a/Intersections_3/test/Intersections_3/bbox_other_do_intersect_test.cpp b/Intersections_3/test/Intersections_3/bbox_other_do_intersect_test.cpp index 29debe09068..5abda44ee23 100644 --- a/Intersections_3/test/Intersections_3/bbox_other_do_intersect_test.cpp +++ b/Intersections_3/test/Intersections_3/bbox_other_do_intersect_test.cpp @@ -11,8 +11,6 @@ // Author(s) : Stephane Tayeb // -#include - #include #if defined(BOOST_MSVC) @@ -22,17 +20,19 @@ // leda_rational, or Gmpq, or Quotient typedef CGAL::Exact_rational Rational; + #include #include #include #include #include #include - -#include +#include #include // for nextafter +#include +#include double random_in(const double a, const double b) From 517f4db59d3cf4f9f8f85e5ce50d1422ec8ab045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 12:35:54 +0100 Subject: [PATCH 186/426] Hide some ifs behind assertion_code macros --- .../internal/Bbox_3_Segment_3_do_intersect.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index 1c4572bfb53..9e5371814ad 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -224,10 +224,10 @@ do_intersect_bbox_segment_aux(const FT& px, const FT& py, const FT& pz, CGAL_assertion(! is_negative(dmin)); CGAL_assertion(! is_negative(dmax)); - if(bounded_0) { + CGAL_assertion_code(if(bounded_0) {) CGAL_assertion(! is_negative(tmin)); CGAL_assertion(! is_negative(tmax)); - } + CGAL_assertion_code(}) // ----------------------------------- // treat y coord @@ -365,11 +365,10 @@ do_intersect_bbox_segment_aux(const FT& px, const FT& py, const FT& pz, CGAL_assertion(! is_negative(dzmin)); CGAL_assertion(! is_negative(dzmax)); - if(bounded_0) - { + CGAL_assertion_code(if(bounded_0) {) CGAL_assertion(! is_negative(tzmin)); CGAL_assertion(! is_negative(tzmax)); - } + CGAL_assertion_code(}) typedef Do_intersect_bbox_segment_aux_is_greater Is_greater; typedef typename Is_greater::result_type Is_greater_value; From 4bb2d1327231572dd5db370e26fc6faa662d1f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 12:36:07 +0100 Subject: [PATCH 187/426] Rephrase comment --- Kernel_23/include/CGAL/Kernel/function_objects.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index c9a7391f225..3dee6912b54 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -3023,7 +3023,7 @@ namespace CommonKernelFunctors { public: typedef typename K::Boolean result_type; - // Needs FT because Line/Line (and variations) and Circle_2/X compute intersections + // Needs_FT because Line/Line (and variations) as well as Circle_2/X compute intersections template Needs_FT operator()(const T1& t1, const T2& t2) const From a1850bad44079aac19ceca111d75dc8f4510f077 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2022 15:06:51 +0100 Subject: [PATCH 188/426] fix debug display --- .../internal/smooth_vertices.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h index dde882984b1..dd71aba145d 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/smooth_vertices.h @@ -140,6 +140,20 @@ private: return n; } + template + std::string debug_to_string(const Patch_index i) + { + return std::to_string(i); + } + + template + std::string debug_to_string(const std::pair& pi) + { + std::string str = std::to_string(pi.first); + str.append("_").append(std::to_string(pi.second)); + return str; + } + template void compute_vertices_normals(const C3t3& c3t3, VertexNormalsMap& normals_map, @@ -282,7 +296,7 @@ private: { std::ostringstream oss; oss << "dump_normals_normalized_[" - << kv.first.first << "_" << kv.first.second << "].polylines.txt"; + << debug_to_string(kv.first) << "].polylines.txt"; std::ofstream ons(oss.str()); for (auto s : kv.second) ons << "2 " << s.source() << " " << s.target() << std::endl; From a90488fce5e5d7defb387d57560afda09819db38 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Nov 2022 15:09:16 +0100 Subject: [PATCH 189/426] fix init_c3t3 for internal C3t3 the dimensions stored in vertices are made consistent by scanning the triangulation/subdomains/patches/features/corners, in this order. Dimensions are tagged like that : all have dimension 3, - then surface vertices are overridden with dimension 2, - feature vertices overridden with dimension 1, - corner vertices overridden with dimension 0. --- .../tetrahedral_adaptive_remeshing_impl.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 4c8fac7609c..0d68c959ccb 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -417,10 +417,7 @@ private: if (!input_is_c3t3()) { for (int i = 0; i < 4; ++i) - { - if (cit->vertex(i)->in_dimension() == -1) - cit->vertex(i)->set_dimension(3); - } + cit->vertex(i)->set_dimension(3); } #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG else if (input_is_c3t3() && m_c3t3.is_in_complex(cit)) @@ -449,8 +446,7 @@ private: for (int j = 0; j < 3; ++j) { Vertex_handle vij = f.first->vertex(Tr::vertex_triple_index(i, j)); - if (vij->in_dimension() == -1 || vij->in_dimension() > 2) - vij->set_dimension(2); + vij->set_dimension(2); } #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbf; @@ -482,12 +478,10 @@ private: m_c3t3.add_to_complex(e, 1); Vertex_handle v = e.first->vertex(e.second); - if (v->in_dimension() == -1 || v->in_dimension() > 1) - v->set_dimension(1); + v->set_dimension(1); v = e.first->vertex(e.third); - if (v->in_dimension() == -1 || v->in_dimension() > 1) - v->set_dimension(1); + v->set_dimension(1); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbe; @@ -508,8 +502,7 @@ private: if(!m_c3t3.is_in_complex(vit)) m_c3t3.add_to_complex(vit, ++corner_id); - if (vit->in_dimension() == -1 || vit->in_dimension() > 0) - vit->set_dimension(0); + vit->set_dimension(0); vit->set_index(corner_id); From 16da969e88cf9ca926de63c40a1d21fea550d5f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 17:06:22 +0100 Subject: [PATCH 190/426] Use OpenMesh::DefaultTraitsDouble directly instead of using custom traits --- .../Linear_cell_complex_2/openmesh_performance.h | 11 +---------- .../Cactus_deformation_session_OpenMesh.cpp | 15 ++++----------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h b/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h index 71ff72ea813..afdb700c75b 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h @@ -22,19 +22,10 @@ public: mesh.request_face_normals(); } - private: - - struct MyTraits : public OpenMesh::DefaultTraits - { - typedef OpenMesh::Vec3d Point; - typedef OpenMesh::Vec3d Normal; - }; - - typedef OpenMesh::TriMesh_ArrayKernelT Mesh; + typedef OpenMesh::TriMesh_ArrayKernelT Mesh; Mesh mesh; - private: void display_info() { diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp index fe1aded57c0..06817a78b71 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp @@ -13,17 +13,10 @@ #include -struct DoubleTraits : public OpenMesh::DefaultTraits -{ - typedef OpenMesh::Vec3d Point; - typedef OpenMesh::Vec3d Normal; -}; - - -typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; -typedef Mesh::Point Point; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; +typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; +typedef Mesh::Point Point; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; typedef CGAL::Surface_mesh_deformation Deform_mesh_arap; typedef CGAL::Surface_mesh_deformation Deform_mesh_spoke; From adb10155fcc87552897a2ba1d245c768d932ec77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 17:22:05 +0100 Subject: [PATCH 191/426] Use kernel traits to adapt put() to point coordinates type --- BGL/include/CGAL/boost/graph/properties_OpenMesh.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h index 7f1d44979d1..6b2e69c1bb2 100644 --- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -13,6 +13,8 @@ #include #include #include +#include + #include #ifndef OPEN_MESH_CLASS @@ -231,8 +233,8 @@ public: #if defined(CGAL_USE_OM_POINTS) const_cast(*pm.sm_).set_point(v,p); #else - const_cast(*pm.sm_).set_point - (v, typename OpenMesh::Point((float)p[0], (float)p[1], (float)p[2])); + typedef typename CGAL::Kernel_traits::type FT; + const_cast(*pm.sm_).set_point(v, typename OpenMesh::Point(FT(p[0]), FT(p[1]), FT(p[2]))); #endif } From c0ba9b479ebb39a13f50c4d6ae0a38bde09c5c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Nov 2022 17:42:02 +0100 Subject: [PATCH 192/426] fix compilation issues --- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h | 6 +++--- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h index a2caaa91aaf..50ae06acee9 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_E08_tree.h @@ -436,6 +436,9 @@ public: friend class CGAL::internal::Bitstream_descartes_E08_tree; friend class CGAL::internal::Bitstream_descartes_E08_tree_rep; + Bitstream_descartes_E08_node(const Self&) = default; + Self& operator= (const Self&) = delete; + private: // "node data" (set individually in subdivision) Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead @@ -466,9 +469,6 @@ private: log_eps_ = n.log_eps_; log_C_eps_ = n.log_C_eps_; } - - Bitstream_descartes_E08_node(const Self&) = delete; - Self& operator= (const Self&) = delete; }; // struct Bitstream_descartes_E08_node diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index 6ba6d3d47a2..b86439473dd 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -524,6 +524,9 @@ public: friend class internal::Bitstream_descartes_rndl_tree; friend class internal::Bitstream_descartes_rndl_tree_rep; + + Bitstream_descartes_rndl_node(const Self&) = default; + Self& operator= (const Self&) = delete; private: // "node data" (set individually in subdivision) @@ -557,9 +560,6 @@ private: log_eps_ = n.log_eps_; log_C_eps_ = n.log_C_eps_; } - - Bitstream_descartes_rndl_node(const Self&)=delete; - Self& operator= (const Self&)=delete; }; // struct Bitstream_descartes_rndl_node From 3abb7366d5a5704a1e69cbb0eb15b9f2c5b67f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 17:46:01 +0100 Subject: [PATCH 193/426] Try to fix compatibility between Weights and OpenMesh --- .../include/CGAL/Weights/cotangent_weights.h | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Weights/include/CGAL/Weights/cotangent_weights.h b/Weights/include/CGAL/Weights/cotangent_weights.h index ba128a98502..dc070c5c493 100644 --- a/Weights/include/CGAL/Weights/cotangent_weights.h +++ b/Weights/include/CGAL/Weights/cotangent_weights.h @@ -193,6 +193,9 @@ public: // Surface_mesh_deformation -> Surface_mesh_deformation.h (default version) // Surface_mesh_parameterizer -> Orbifold_Tutte_parameterizer_3.h (default version) // Surface_mesh_skeletonization -> Mean_curvature_flow_skeletonization.h (clamped version) +// +// The API is a bit awkward: the template parameters VertexPointMap and GeomTraits +// are only meaningful in the API that calls the operator with a single parameter. template::type, typename GeomTraits = typename Kernel_traits< @@ -202,8 +205,6 @@ class Cotangent_weight using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; using halfedge_descriptor = typename boost::graph_traits::halfedge_descriptor; - using FT = typename GeomTraits::FT; - private: // These class members are used only when the constructor initializing them // is used, but Surface_mesh_deformation has its own weight API locked @@ -224,12 +225,14 @@ public: // Common API whether mesh/vpm/traits are initialized in the constructor, // or passed in the operator() template - FT operator()(const halfedge_descriptor he, - const PolygonMesh& pmesh, - const VPM vpm, - const GT& traits) const + typename GT::FT + operator()(const halfedge_descriptor he, + const PolygonMesh& pmesh, + const VPM vpm, + const GT& traits) const { using Point_ref = typename boost::property_traits::reference; + using FT = typename GT::FT; if(is_border(he, pmesh)) return FT{0}; @@ -265,9 +268,10 @@ public: // That is the API called by Surface_mesh_deformation template - FT operator()(const halfedge_descriptor he, - const PolygonMesh& pmesh, - const VPM vpm) const + auto // kernel_traits::type::FT + operator()(const halfedge_descriptor he, + const PolygonMesh& pmesh, + const VPM vpm) const { using Point = typename boost::property_traits::value_type; using GT = typename Kernel_traits::type; @@ -286,7 +290,7 @@ public: m_bound_from_below(bound_from_below) { } - FT operator()(const halfedge_descriptor he) const + typename GeomTraits::FT operator()(const halfedge_descriptor he) const { CGAL_precondition(m_pmesh_ptr != nullptr); return this->operator()(he, *m_pmesh_ptr, m_vpm, m_traits); From 6fd4c1694240636e60f8cf8e8436de052098b23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 22 Nov 2022 17:47:19 +0100 Subject: [PATCH 194/426] TWS --- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index b86439473dd..9d1084414cd 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -524,7 +524,7 @@ public: friend class internal::Bitstream_descartes_rndl_tree; friend class internal::Bitstream_descartes_rndl_tree_rep; - + Bitstream_descartes_rndl_node(const Self&) = default; Self& operator= (const Self&) = delete; From 613ae0d564c35b681d3f1745185d67a1b18a57c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 22 Nov 2022 18:33:43 +0100 Subject: [PATCH 195/426] Proper fix after botched fix (adb10155fcc) --- BGL/include/CGAL/boost/graph/properties_OpenMesh.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h index 6b2e69c1bb2..bdc9cec7ef0 100644 --- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -13,8 +13,6 @@ #include #include #include -#include - #include #ifndef OPEN_MESH_CLASS @@ -233,8 +231,9 @@ public: #if defined(CGAL_USE_OM_POINTS) const_cast(*pm.sm_).set_point(v,p); #else - typedef typename CGAL::Kernel_traits::type FT; - const_cast(*pm.sm_).set_point(v, typename OpenMesh::Point(FT(p[0]), FT(p[1]), FT(p[2]))); + typedef typename OpenMesh::vector_traits::value_type Scalar; + const_cast(*pm.sm_).set_point + (v, typename OpenMesh::Point(Scalar(p[0]), Scalar(p[1]), Scalar(p[2]))); #endif } From 386c6a3ac26f4d627773fee1a5a9f51b56bc8ab4 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 22 Nov 2022 18:42:13 +0100 Subject: [PATCH 196/426] Fix typo --- .../include/CGAL/Intersections_2/Bbox_2_Triangle_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h index 8dd4236f591..0cf76cbff32 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Bbox_2_Triangle_2.h @@ -43,7 +43,7 @@ template typename Intersection_traits::result_type intersection(const Bbox_2& box, const Triangle_2& tr) - { +{ typename K::Iso_rectangle_2 rec(box.xmin(), box.ymin(), box.xmax(), box.ymax()); return intersection(rec, tr); } From d157adcb6ec39ae8c51a545cbda913a0f29f334b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 23 Nov 2022 08:27:39 +0000 Subject: [PATCH 197/426] CGAL: Fixes for cmake 3.25 --- .../examples/Barycentric_coordinates_2/CMakeLists.txt | 4 ++-- .../test/Barycentric_coordinates_2/CMakeLists.txt | 4 ++-- .../examples/Polygonal_surface_reconstruction/CMakeLists.txt | 4 ++-- .../test/Polygonal_surface_reconstruction/CMakeLists.txt | 4 ++-- .../examples/Shape_regularization/CMakeLists.txt | 4 ++-- Shape_regularization/test/Shape_regularization/CMakeLists.txt | 4 ++-- Weights/examples/Weights/CMakeLists.txt | 4 ++-- Weights/test/Weights/CMakeLists.txt | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt index 772e3bb17a0..cc3c33324b5 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_cmake_script. # This is the CMake script for compiling a CGAL application. -project(Barycentric_coordinates_2_Examples) - cmake_minimum_required(VERSION 3.1...3.22) +project(Barycentric_coordinates_2_Examples) + find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("segment_coordinates.cpp") diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index aa85e483ff4..c1706930f9d 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_cmake_script. # This is the CMake script for compiling a CGAL application. -project(Barycentric_coordinates_2_Tests) - cmake_minimum_required(VERSION 3.1...3.22) +project(Barycentric_coordinates_2_Tests) + find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("test_almost_degenerate_segment.cpp") diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 78163e83f4d..e242a60619e 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -project(Polygonal_surface_reconstruction_Examples) - cmake_minimum_required(VERSION 3.1...3.22) +project(Polygonal_surface_reconstruction_Examples) + # CGAL and its components find_package(CGAL REQUIRED) diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index fc715b2c92e..c417ae3898d 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications. -project(Polygonal_surface_reconstruction_Tests) - cmake_minimum_required(VERSION 3.1...3.22) +project(Polygonal_surface_reconstruction_Tests) + # CGAL and its components find_package(CGAL REQUIRED) diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index 83cb84969cd..94b9bfa588c 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_CMakeLists. # This is the CMake script for compiling a set of CGAL applications. -project(Shape_regularization_Examples) - cmake_minimum_required(VERSION 3.1...3.22) +project(Shape_regularization_Examples) + find_package(CGAL REQUIRED COMPONENTS Core) # Find OSQP library and headers. diff --git a/Shape_regularization/test/Shape_regularization/CMakeLists.txt b/Shape_regularization/test/Shape_regularization/CMakeLists.txt index 3060457e2e2..17ed9754335 100644 --- a/Shape_regularization/test/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/test/Shape_regularization/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_CMakeLists. # This is the CMake script for compiling a set of CGAL applications. -project(Shape_regularization_Tests) - cmake_minimum_required(VERSION 3.1...3.22) +project(Shape_regularization_Tests) + find_package(CGAL REQUIRED COMPONENTS Core) # Find OSQP library and headers. diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 6d8beeaf6e7..74e406bfec5 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_cmake_script. # This is the CMake script for compiling a CGAL application. -project(Weights_Examples) - cmake_minimum_required(VERSION 3.1...3.22) +project(Weights_Examples) + find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("weights.cpp") diff --git a/Weights/test/Weights/CMakeLists.txt b/Weights/test/Weights/CMakeLists.txt index fee76719f00..eefbbda9a6d 100644 --- a/Weights/test/Weights/CMakeLists.txt +++ b/Weights/test/Weights/CMakeLists.txt @@ -1,10 +1,10 @@ # Created by the script cgal_create_cmake_script. # This is the CMake script for compiling a CGAL application. -project(Weights_Tests) - cmake_minimum_required(VERSION 3.1...3.22) +project(Weights_Tests) + find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("test_uniform_weights.cpp") From 20dacdb0c766ea1c715b0829ae1ec43eed0a1c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 Nov 2022 10:03:25 +0100 Subject: [PATCH 198/426] add check that cmake_minimum_required is the first line --- .../developer_scripts/test_merge_of_branch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Scripts/developer_scripts/test_merge_of_branch b/Scripts/developer_scripts/test_merge_of_branch index 50e7f8c8c37..5ddb20bcf9c 100755 --- a/Scripts/developer_scripts/test_merge_of_branch +++ b/Scripts/developer_scripts/test_merge_of_branch @@ -117,6 +117,30 @@ if [ -n "${project_name_demo}" ]; then exit 1 fi +# check minimal version is the first instruction in cmake scripts +echo '.. Checking if all CMakeLists.txt starts with cmake_minimum_required...' +cmr_tests=$(for i in ^build*/test/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); res=$(egrep -v "^\s*#" $i | grep -v "^\s*$" | head -n 1 | grep -v cmake_minimum_required); if [ -n "${res}" ]; then echo $pkg; fi; done) +cmr_examples=$(for i in ^build*/examples/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); res=$(egrep -v "^s*#" $i | grep -v "^\s*$" | head -n 1 | grep -v cmake_minimum_required); if [ -n "${res}" ]; then echo $pkg; fi; done) +cmr_demo=$(for i in ^build*/demo/*/CMakeLists.txt; do pkg=$(echo $i | awk -F "/" '{print $3}'); res=$(egrep -v "^s*#" $i | grep -v "^\s*$" | head -n 1 | grep -v cmake_minimum_required); if [ -n "${res}" ]; then echo $pkg; fi; done) + +if [ -n "${cmr_tests}" ]; then + echo "CMakeLists in test with issues:" + echo ${cmr_tests} + exit 1 +fi + +if [ -n "${cmr_examples}" ]; then + echo "CMakeLists in examples with issues:" + echo ${cmr_examples} + exit 1 +fi + +if [ -n "${cmr_demo}" ]; then + echo "CMakeLists in demo with issues:" + echo ${cmr_demo} + exit 1 +fi + #check header files without SPDX license identifier echo '.. Checking SPDX license identifier presence in header files...' file_without_SPDX_identifiers=$(for pkg in `find */package_info -name 'license.txt' | awk -F "/" '{print $1}'`; do if [ -e ${pkg}/include ]; then find ${pkg}/include -type f \( -name '*.h' -o -name '*.hpp' \) | xargs -r grep -L "SPDX-License-Identifier"; fi; done) From b404f7337090bfcc921b3cef6a22d5f77979ebad Mon Sep 17 00:00:00 2001 From: SaillantNicolas <97436229+SaillantNicolas@users.noreply.github.com> Date: Wed, 23 Nov 2022 15:57:09 +0100 Subject: [PATCH 199/426] use an intermediate environment variable also move emoji-comment script --- .github/workflows/build_doc.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index fe5614e4a78..3d2f2941c95 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -47,15 +47,7 @@ jobs: //get pullrequest url const pr_number = context.payload.issue.number return pr_number - - uses: actions/checkout@v3 - name: "checkout branch" - if: steps.get_round.outputs.result != 'stop' - with: - repository: ${{ github.repository }} - ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge - token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }} - fetch-depth: 2 - + - name: Emoji-comment uses: actions/github-script@v6 if: steps.get_round.outputs.result != 'stop' @@ -67,6 +59,16 @@ jobs: repo: context.repo.repo, content: 'rocket' }) + + - uses: actions/checkout@v3 + name: "checkout branch" + if: steps.get_round.outputs.result != 'stop' + with: + repository: ${{ github.repository }} + ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge + token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }} + fetch-depth: 2 + - name: install dependencies if: steps.get_round.outputs.result != 'stop' run: | @@ -151,11 +153,13 @@ jobs: }); - name: Post error + env: + ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}} uses: actions/github-script@v6 if: ${{ failure() && steps.get_round.outputs.result != 'stop' }} with: script: | - const error = `${{steps.build_and_run.outputs.DoxygenError}}` + const error = process.env.ERRORMSG const msg = "There was an error while building the doc: \n"+error github.rest.issues.createComment({ owner: "CGAL", From 876e69aeb4b886d83eb587aec52227668f79adfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 Nov 2022 18:08:13 +0100 Subject: [PATCH 200/426] add missing option that make the function almost useless if not present --- .../Polygon_mesh_processing/orientation.h | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index 31595ae0213..cf517731c0c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -1646,6 +1646,12 @@ void merge_reversible_connected_components(PolygonMesh& pm, * \cgalParamExtra{If this parameter is omitted, an internal property map for `CGAL::vertex_point_t` * should be available for the vertices of `pm`.} * \cgalParamNEnd + * \cgalParamNBegin{face_partition_id_map} + * \cgalParamDescription{a property map filled by this function and that will contain for each face + * the id of its surface component after reversal and stitching in the range in the range `[0, n - 1]`, + * with `n` the number of such components. + * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::face_descriptor` as key type and `std::size_t` as value type} + * \cgalParamNEnd * \cgalNamedParamsEnd * * \sa reverse_face_orientations() @@ -1667,6 +1673,15 @@ bool compatible_orientations(const PolygonMesh& pm, Vpm vpm = parameters::choose_parameter(parameters::get_parameter(np, internal_np::vertex_point), get_const_property_map(vertex_point, pm)); + typedef typename internal_np::Lookup_named_param_def < + internal_np::face_partition_id_t, + NamedParameters, + Constant_property_map // default + >::type Partition_map; + + // cc id map if compatible edges were stitched + Partition_map partition_map = parameters::choose_parameter(parameters::get_parameter(np, internal_np::face_partition_id)); + typedef std::size_t F_cc_id; // Face cc-id typedef std::size_t E_id; // Edge id @@ -1753,6 +1768,8 @@ bool compatible_orientations(const PolygonMesh& pm, sorted_ids.insert(cc_id); // consider largest CC first, default and set its bit to 0 + std::size_t partition_id = 0; + std::vector partition_ids(nb_cc); for(F_cc_id cc_id : sorted_ids) { if (cc_handled[cc_id]) continue; @@ -1821,6 +1838,8 @@ bool compatible_orientations(const PolygonMesh& pm, continue; } cc_handled[id]=true; + CGAL_assertion(cc_bits[id]==false); + partition_ids[id] = partition_id; } // set bit of incompatible patches @@ -1839,13 +1858,19 @@ bool compatible_orientations(const PolygonMesh& pm, continue; } cc_handled[id]=true; + partition_ids[id] = partition_id; cc_bits[id]=true; } + ++partition_id; } // set the bit per face for (face_descriptor f : faces(pm)) - put(fbm, f, cc_bits[get(f_cc_ids,f)]); + { + std::size_t f_cc_id = get(f_cc_ids,f); + put(fbm, f, cc_bits[f_cc_id]); + put(partition_map, f, partition_ids[f_cc_id]); + } return true; } From 75e08a9736b17b8bc80f614fadf10a0c602b61e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 23 Nov 2022 18:36:43 +0100 Subject: [PATCH 201/426] typo --- .../include/CGAL/Polygon_mesh_processing/orientation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index cf517731c0c..1458ca18b00 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -1648,7 +1648,7 @@ void merge_reversible_connected_components(PolygonMesh& pm, * \cgalParamNEnd * \cgalParamNBegin{face_partition_id_map} * \cgalParamDescription{a property map filled by this function and that will contain for each face - * the id of its surface component after reversal and stitching in the range in the range `[0, n - 1]`, + * the id of its surface component after reversal and stitching in the range `[0, n - 1]`, * with `n` the number of such components. * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::face_descriptor` as key type and `std::size_t` as value type} * \cgalParamNEnd From b5c21e1f5db33a30fd4e6ea9bf472e2c22e0aa6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 23 Nov 2022 18:48:43 +0100 Subject: [PATCH 202/426] Http -> https + update some dead links --- AABB_tree/demo/AABB_tree/resources/about.html | 4 +- ...ebraic_real_quadratic_refinement_rep_bfi.h | 2 +- .../include/CGAL/_test_real_root_isolator.h | 6 +- .../ColorItemEditor.cpp | 4 +- .../ColorItemEditor.h | 4 +- .../CGAL/Arr_polycurve_basic_traits_2.h | 2 +- .../include/CGAL/IO/Fig_stream.h | 2 +- BGL/examples/BGL_LCC/normals_lcc.cpp | 2 +- BGL/examples/BGL_polyhedron_3/normals.cpp | 2 +- .../graph_traits_PolyMesh_ArrayKernelT.h | 2 +- .../graph/graph_traits_TriMesh_ArrayKernelT.h | 2 +- .../Min_sphere_of_spheres_d_pair.h | 8 +- CGAL_Core/include/CGAL/CORE/BigFloat.h | 2 +- CGAL_Core/include/CGAL/CORE/BigFloatRep.h | 2 +- CGAL_Core/include/CGAL/CORE/BigFloat_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/BigInt.h | 2 +- CGAL_Core/include/CGAL/CORE/BigRat.h | 2 +- CGAL_Core/include/CGAL/CORE/CORE.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreAux.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreAux_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreDefs.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/CoreIO_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/Expr.h | 2 +- CGAL_Core/include/CGAL/CORE/ExprRep.h | 2 +- CGAL_Core/include/CGAL/CORE/Expr_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/Filter.h | 2 +- CGAL_Core/include/CGAL/CORE/MemoryPool.h | 2 +- CGAL_Core/include/CGAL/CORE/Promote.h | 2 +- CGAL_Core/include/CGAL/CORE/Real.h | 2 +- CGAL_Core/include/CGAL/CORE/RealRep.h | 2 +- CGAL_Core/include/CGAL/CORE/Real_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/RefCount.h | 2 +- CGAL_Core/include/CGAL/CORE/Timer.h | 2 +- CGAL_Core/include/CGAL/CORE/extLong.h | 2 +- CGAL_Core/include/CGAL/CORE/extLong_impl.h | 2 +- CGAL_Core/include/CGAL/CORE/linearAlgebra.h | 2 +- CGAL_Core/include/CGAL/CORE/poly/Curves.h | 2 +- CGAL_Core/include/CGAL/CORE/poly/Curves.tcc | 2 +- CGAL_Core/include/CGAL/CORE/poly/Poly.h | 2 +- CGAL_Core/include/CGAL/CORE/poly/Poly.tcc | 2 +- CGAL_Core/include/CGAL/CORE/poly/Sturm.h | 2 +- CGAL_Core/include/CGAL/export/CORE.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO.h | 6 +- CGAL_ImageIO/include/CGAL/ImageIO/convert.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/recline.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h | 2 +- .../doc/CGAL_ipelets/CGAL_ipelets.txt | 2 +- .../Circular_kernel_2/Circular_kernel_2.txt | 2 +- .../include/CGAL/IO/Dxf_reader.h | 2 +- .../include/CGAL/IO/Dxf_reader_doubles.h | 3 +- .../include/CGAL/IO/Dxf_variant_reader.h | 2 +- .../doc/Classification/Classification.txt | 5 +- .../Developer_manual/Chapter_checks.txt | 4 +- Documentation/doc/Documentation/License.txt | 6 +- .../doc/Documentation/Third_party.txt | 12 +- Documentation/doc/Documentation/main.txt | 2 +- Documentation/doc/biblio/cgal_manual.bib | 75 +++--- Documentation/doc/biblio/geom.bib | 229 ++++++++---------- .../doc/resources/1.8.13/BaseDoxyfile.in | 55 ++--- .../doc/resources/1.8.13/footer.html | 4 +- .../doc/resources/1.8.13/header.html | 2 +- .../doc/resources/1.8.13/header_package.html | 2 +- .../doc/resources/1.8.14/BaseDoxyfile.in | 16 +- .../doc/resources/1.8.14/footer.html | 4 +- .../doc/resources/1.8.14/header.html | 2 +- .../doc/resources/1.8.14/header_package.html | 2 +- .../doc/resources/1.8.20/BaseDoxyfile.in | 12 +- .../doc/resources/1.8.20/footer.html | 4 +- .../doc/resources/1.8.20/header.html | 2 +- .../doc/resources/1.8.20/header_package.html | 2 +- .../doc/resources/1.8.4/BaseDoxyfile.in | 32 +-- Documentation/doc/resources/1.8.4/footer.html | 4 +- Documentation/doc/resources/1.8.4/header.html | 8 +- .../doc/resources/1.8.4/header_package.html | 8 +- .../doc/resources/1.9.3/BaseDoxyfile.in | 14 +- Documentation/doc/resources/1.9.3/footer.html | 4 +- Documentation/doc/resources/1.9.3/header.html | 2 +- .../doc/resources/1.9.3/header_package.html | 2 +- .../doc/scripts/generate_how_to_cite.py | 6 +- .../scripts/html_output_post_processing.py | 4 +- Filtered_kernel/TODO | 2 +- .../internal/Static_filters/Angle_3.h | 2 +- .../internal/Static_filters/Do_intersect_3.h | 2 +- .../GraphicsView/fig_src/uml-design.graphml | 2 +- .../resources/about_CGAL.html | 2 +- Installation/CHANGES.md | 4 +- Installation/LICENSE.GPL | 8 +- Installation/LICENSE.LGPL | 2 +- Installation/cmake/modules/FindTBB.cmake | 2 +- Installation/doc_html/Manual/index.html | 4 +- Installation/doc_html/Manual/packages.html | 4 +- Installation/doc_html/index.html | 10 +- Installation/include/CGAL/config.h | 6 +- .../internal/Bbox_3_Line_3_do_intersect.h | 2 +- .../internal/Bbox_3_Ray_3_do_intersect.h | 2 +- .../internal/Bbox_3_Segment_3_do_intersect.h | 2 +- .../Iso_cuboid_3_Ray_3_do_intersect.h | 2 +- .../Iso_cuboid_3_Segment_3_do_intersect.h | 2 +- .../cmake/FindGoogleTest.cmake | 2 +- Linear_cell_complex/benchmark/README.TXT | 8 +- Maintenance/deb/sid/debian/README.Debian | 2 +- Maintenance/deb/sid/debian/copyright | 2 +- Maintenance/deb/sid/debian/rules | 6 +- Maintenance/deb/squeeze/debian/README.Debian | 2 +- Maintenance/deb/squeeze/debian/copyright | 2 +- Maintenance/deb/squeeze/debian/rules | 6 +- Maintenance/deb/wheezy/debian/README.Debian | 2 +- Maintenance/deb/wheezy/debian/copyright | 2 +- Maintenance/deb/wheezy/debian/rules | 6 +- .../cgal.geometryfactory.com/crontab | 2 +- .../boost/user-config.jam | 10 +- .../patch-qt-4.8/QtCore/qobjectdefs.h | 4 +- .../patch-qt-4.8/QtCore/qplugin.h | 4 +- .../patch-qt-4.8/QtCore/qobjectdefs.h | 4 +- .../patch-qt-4.8/QtCore/qplugin.h | 4 +- .../announcement/mailing-beta.eml | 2 +- .../public_release/announcement/mailing.eml | 2 +- .../test_handling/create_testresult_page | 6 +- .../filter_testsuite/create_testresult_page | 6 +- Mesh_3/benchmark/Mesh_3/concurrency.cpp | 2 +- .../doc/Number_types/CGAL/Sqrt_extension.h | 2 +- Number_types/include/CGAL/FPU.h | 14 +- Number_types/include/CGAL/GMP/Gmpz_type.h | 4 +- OpenNL/include/CGAL/OpenNL/bicgstab.h | 4 +- OpenNL/include/CGAL/OpenNL/blas.h | 4 +- .../include/CGAL/OpenNL/conjugate_gradient.h | 4 +- OpenNL/include/CGAL/OpenNL/full_vector.h | 4 +- OpenNL/include/CGAL/OpenNL/linear_solver.h | 4 +- OpenNL/include/CGAL/OpenNL/preconditioner.h | 4 +- OpenNL/include/CGAL/OpenNL/sparse_matrix.h | 4 +- .../package_info/OpenNL/long_description.txt | 2 +- .../test_p2t2_delaunay_performance.cpp | 2 +- .../demo/Periodic_3_triangulation_3/Scene.cpp | 2 +- .../resources/about.html | 4 +- .../icons/about_CGAL.html | 2 +- Polyhedron/demo/Polyhedron/Mainpage.md | 2 +- .../Display/Display_property_plugin.cpp | 2 +- .../Plugins/IO/Polylines_io_plugin.cpp | 2 +- .../PartitionDialog.ui | 2 +- .../Plugins/PCA/Basic_generator_widget.ui | 4 +- .../PMP/Point_inside_polyhedron_plugin.cpp | 2 +- .../Point_set/Register_point_sets_plugin.ui | 2 +- .../demo/Polyhedron/Polyhedron_demo.cpp | 2 +- .../Scene_polyhedron_selection_item.h | 2 +- .../demo/Polyhedron/Show_point_dialog.ui | 2 +- .../demo/Polyhedron/resources/about.html | 6 +- .../resources/about.html | 4 +- Profiling_tools/include/CGAL/Memory_sizer.h | 2 +- .../masters/additional/QBORE3D.mps | 4 +- .../masters/additional/QCAPRI.mps | 4 +- .../masters/additional/QRECIPE.mps | 4 +- .../masters/additional/fit1d.mps | 4 +- .../masters/additional/fit2d.mps | 4 +- .../masters/additional/scsd1.mps | 4 +- .../test_solver_data/masters/cgal/HS118.mps | 4 +- .../masters/cgal/PRIMALC1.mps | 4 +- .../test_solver_data/masters/cgal/QPTEST.mps | 2 +- .../masters/cgal/ZECEVIC2.mps | 4 +- .../CGAL/Mesh_complex_3_in_triangulation_3.h | 2 +- STL_Extension/include/CGAL/Handle_for.h | 2 +- .../internal/boost/relaxed_heap.hpp | 2 +- STL_Extension/include/CGAL/array.h | 2 +- .../include/CGAL/Eigen_diagonalize_traits.h | 2 +- Solver_interface/include/CGAL/Eigen_matrix.h | 2 +- .../include/CGAL/Eigen_solver_traits.h | 2 +- .../include/CGAL/Eigen_sparse_matrix.h | 4 +- Solver_interface/include/CGAL/Eigen_vector.h | 2 +- .../Spatial_searching/include/nanoflann.hpp | 8 +- .../include/CGAL/IO/Dxf_stream.h | 2 +- .../include/CGAL/IO/Dxf_writer.h | 2 +- .../File_formats/Supported_file_formats.txt | 4 +- .../internal/auxiliary/graph.h | 2 +- .../Triangulation_3/documentation/about.html | 2 +- .../include/CGAL/Regular_triangulation_3.h | 2 +- 176 files changed, 475 insertions(+), 496 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/resources/about.html b/AABB_tree/demo/AABB_tree/resources/about.html index 8d2c41d1ea0..1ab9dc84c1b 100644 --- a/AABB_tree/demo/AABB_tree/resources/about.html +++ b/AABB_tree/demo/AABB_tree/resources/about.html @@ -2,8 +2,8 @@

      AABB Tree Demo

      Copyright ©2009 - INRIA Sophia Antipolis - Mediterranee

      -

      This application illustrates the AABB tree component + INRIA Sophia Antipolis - Mediterranee

      +

      This application illustrates the AABB tree component of CGAL, applied to polyhedron facets and edges.

      See also the following chapters of the manual: diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h index 19f447c08f2..18b7fa805dd 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_real_quadratic_refinement_rep_bfi.h @@ -45,7 +45,7 @@ namespace internal { * @Unpublished{abbott-quadratic, * author = {John Abbott}, * title = {Quadratic Interval Refinement for Real Roots}, - * url = {http://www.dima.unige.it/~abbott/}, + * url = {https://www.dima.unige.it/~abbott/}, * note = {Poster presented at the 2006 Internat. Sympos. on Symbolic and Algebraic Computation (ISSAC 2006)} * } diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h index b79e47262b3..ce3d7b3fda1 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_real_root_isolator.h @@ -187,7 +187,7 @@ void test_real_root_isolator() { assert( n == number_of_roots); }{ //std::cout << "Kameny 3\n"; - // from http://www-sop.inria.fr/saga/POL/BASE/1.unipol + // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol/ NT c = CGAL::ipower(NT(10),12); Polynomial P(NT(-3),NT(0),c); @@ -202,7 +202,7 @@ void test_real_root_isolator() { assert(3 == internal::check_intervals_real_root_isolator(P)); }{ //std::cout << "Kameny 4\n"; - // from http://www-sop.inria.fr/saga/POL/BASE/1.unipol + // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol NT z(0); NT a = CGAL::ipower(NT(10),24); // a = 10^{24} @@ -218,7 +218,7 @@ void test_real_root_isolator() { assert( 4 == internal::check_intervals_real_root_isolator(P)); }{ //std::cout << "Polynomial with large and small clustered roots\n"; - // from http://www-sop.inria.fr/saga/POL/BASE/1.unipol + // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol // there seems to be some error or misunderstanding NT z(0); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp index 2de4a0d6e28..ee1772a644b 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.cpp @@ -19,7 +19,7 @@ ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements - ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be - ** met: http://www.gnu.org/copyleft/gpl.html. + ** met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h index 13c6c13b06e..ea1a2ba7a47 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ColorItemEditor.h @@ -19,7 +19,7 @@ ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements - ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception @@ -31,7 +31,7 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be - ** met: http://www.gnu.org/copyleft/gpl.html. + ** met: https://www.gnu.org/licenses/gpl-3.0.html. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index ca5e8ce1447..dab9ffa9248 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -1114,7 +1114,7 @@ public: // model of this concept. // // The following implementation is inspired by - // http://stackoverflow.com/a/11816999/1915421 + // https://stackoverflow.com/a/11816999/1915421 template struct Void { diff --git a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h index 0a89ec038a3..5fd87bc4e7b 100644 --- a/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h +++ b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h @@ -164,7 +164,7 @@ enum Fig_depth /*! * \class A class for writing geometric objects in a FIG format (version 3.2). - * For more details, see: http://www.xfig.org/userman/fig-format.html + * For more details, see: https://mcj.sourceforge.net/ */ template class Fig_stream diff --git a/BGL/examples/BGL_LCC/normals_lcc.cpp b/BGL/examples/BGL_LCC/normals_lcc.cpp index c5d1e671ff0..da1177a7062 100644 --- a/BGL/examples/BGL_LCC/normals_lcc.cpp +++ b/BGL/examples/BGL_LCC/normals_lcc.cpp @@ -74,7 +74,7 @@ int main(int argc, char** argv) // Ad hoc property_map to store normals. Face_index_map is used to // map face_descriptors to a contiguous range of indices. See - // http://www.boost.org/libs/property_map/doc/vector_property_map.html + // https://www.boost.org/libs/property_map/doc/vector_property_map.html // for details. boost::vector_property_map normals(static_cast(num_faces(lcc)), get(CGAL::face_index, lcc)); diff --git a/BGL/examples/BGL_polyhedron_3/normals.cpp b/BGL/examples/BGL_polyhedron_3/normals.cpp index 9a67ba42b2d..711800cb8ab 100644 --- a/BGL/examples/BGL_polyhedron_3/normals.cpp +++ b/BGL/examples/BGL_polyhedron_3/normals.cpp @@ -79,7 +79,7 @@ int main(int argc, char** argv) // Ad hoc property_map to store normals. Face_index_map is used to // map face_descriptors to a contiguous range of indices. See - // http://www.boost.org/libs/property_map/doc/vector_property_map.html + // https://www.boost.org/libs/property_map/doc/vector_property_map.html // for details. boost::vector_property_map normals(static_cast(num_faces(P)), get(CGAL::face_index, P)); diff --git a/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h b/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h index a6e5bfe287d..5127f692a24 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_PolyMesh_ArrayKernelT.h @@ -11,7 +11,7 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H -// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html +// https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html #include #include #include diff --git a/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h b/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h index 863dc50b075..512a4991e76 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_TriMesh_ArrayKernelT.h @@ -11,7 +11,7 @@ #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H -// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html +// https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html #include #include #include diff --git a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h index c3dcc29c393..e30576790c5 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h @@ -42,7 +42,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static double result() { @@ -55,7 +55,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static float result() { @@ -68,7 +68,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static double result() { @@ -81,7 +81,7 @@ namespace CGAL_MINIBALL_NAMESPACE { { // That constant is embedded in an inline static function, to // workaround a bug of g++>=4.1 - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // g++ does not like const floating expression when -frounding-math // is used. static float result() { diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat.h b/CGAL_Core/include/CGAL/CORE/BigFloat.h index 97183f63e50..6c7a8abff4c 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat.h @@ -14,7 +14,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h index 7439ce025a9..da8cb6967c8 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h @@ -14,7 +14,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index aa029b5c51b..dc828ae9379 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -23,7 +23,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/BigInt.h b/CGAL_Core/include/CGAL/CORE/BigInt.h index 7b16a960ac3..f88a5877c9b 100644 --- a/CGAL_Core/include/CGAL/CORE/BigInt.h +++ b/CGAL_Core/include/CGAL/CORE/BigInt.h @@ -14,7 +14,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/BigRat.h b/CGAL_Core/include/CGAL/CORE/BigRat.h index 29b99509d40..d57e4e44cd9 100644 --- a/CGAL_Core/include/CGAL/CORE/BigRat.h +++ b/CGAL_Core/include/CGAL/CORE/BigRat.h @@ -14,7 +14,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/CORE.h b/CGAL_Core/include/CGAL/CORE/CORE.h index 3fb78af5f83..a3e0b2ef83d 100644 --- a/CGAL_Core/include/CGAL/CORE/CORE.h +++ b/CGAL_Core/include/CGAL/CORE/CORE.h @@ -15,7 +15,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/CoreAux.h b/CGAL_Core/include/CGAL/CORE/CoreAux.h index 9d75668be3a..fdb6c5de7cf 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreAux.h +++ b/CGAL_Core/include/CGAL/CORE/CoreAux.h @@ -14,7 +14,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h index 3f22a4cdfa1..9b335c393b2 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h @@ -15,7 +15,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs.h b/CGAL_Core/include/CGAL/CORE/CoreDefs.h index 57c3da34645..e10ea21ec1a 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs.h @@ -17,7 +17,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h index d28326496f3..ecc29261130 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs_impl.h @@ -14,7 +14,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h index 0e4a2044e74..59f4a7a63f6 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h @@ -11,7 +11,7 @@ * Zilin Du * Chee Yap * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Expr.h b/CGAL_Core/include/CGAL/CORE/Expr.h index 5cd5092d7e9..94b086e24d3 100644 --- a/CGAL_Core/include/CGAL/CORE/Expr.h +++ b/CGAL_Core/include/CGAL/CORE/Expr.h @@ -18,7 +18,7 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/ExprRep.h b/CGAL_Core/include/CGAL/CORE/ExprRep.h index 7920485fff7..bc142c77b6c 100644 --- a/CGAL_Core/include/CGAL/CORE/ExprRep.h +++ b/CGAL_Core/include/CGAL/CORE/ExprRep.h @@ -18,7 +18,7 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Expr_impl.h b/CGAL_Core/include/CGAL/CORE/Expr_impl.h index 5e3806024fa..69ccc73b616 100644 --- a/CGAL_Core/include/CGAL/CORE/Expr_impl.h +++ b/CGAL_Core/include/CGAL/CORE/Expr_impl.h @@ -16,7 +16,7 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Filter.h b/CGAL_Core/include/CGAL/CORE/Filter.h index ea0a02da1fa..56649b80c86 100644 --- a/CGAL_Core/include/CGAL/CORE/Filter.h +++ b/CGAL_Core/include/CGAL/CORE/Filter.h @@ -17,7 +17,7 @@ * Zilin Du * Chee Yap * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/MemoryPool.h b/CGAL_Core/include/CGAL/CORE/MemoryPool.h index 606b9223b2b..60a95c862e2 100644 --- a/CGAL_Core/include/CGAL/CORE/MemoryPool.h +++ b/CGAL_Core/include/CGAL/CORE/MemoryPool.h @@ -14,7 +14,7 @@ * Chee Yap * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Promote.h b/CGAL_Core/include/CGAL/CORE/Promote.h index 62a98e434ef..d882b6abcf3 100644 --- a/CGAL_Core/include/CGAL/CORE/Promote.h +++ b/CGAL_Core/include/CGAL/CORE/Promote.h @@ -18,7 +18,7 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Real.h b/CGAL_Core/include/CGAL/CORE/Real.h index b79503eb4c2..11174960dd2 100644 --- a/CGAL_Core/include/CGAL/CORE/Real.h +++ b/CGAL_Core/include/CGAL/CORE/Real.h @@ -18,7 +18,7 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/RealRep.h b/CGAL_Core/include/CGAL/CORE/RealRep.h index 5a18d2748d1..85f7818a884 100644 --- a/CGAL_Core/include/CGAL/CORE/RealRep.h +++ b/CGAL_Core/include/CGAL/CORE/RealRep.h @@ -16,7 +16,7 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Real_impl.h b/CGAL_Core/include/CGAL/CORE/Real_impl.h index 8a6a4899c64..e7ac7379f4c 100644 --- a/CGAL_Core/include/CGAL/CORE/Real_impl.h +++ b/CGAL_Core/include/CGAL/CORE/Real_impl.h @@ -17,7 +17,7 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/RefCount.h b/CGAL_Core/include/CGAL/CORE/RefCount.h index 91fafbf074f..ba1c8416a4b 100644 --- a/CGAL_Core/include/CGAL/CORE/RefCount.h +++ b/CGAL_Core/include/CGAL/CORE/RefCount.h @@ -35,7 +35,7 @@ * Zilin Du * Chee Yap * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/Timer.h b/CGAL_Core/include/CGAL/CORE/Timer.h index a0f2ce9f152..0e998c0b020 100644 --- a/CGAL_Core/include/CGAL/CORE/Timer.h +++ b/CGAL_Core/include/CGAL/CORE/Timer.h @@ -23,7 +23,7 @@ * Written by * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/extLong.h b/CGAL_Core/include/CGAL/CORE/extLong.h index d20caf05589..52ba91e321a 100644 --- a/CGAL_Core/include/CGAL/CORE/extLong.h +++ b/CGAL_Core/include/CGAL/CORE/extLong.h @@ -17,7 +17,7 @@ * Chen Li * Zilin Du * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/extLong_impl.h b/CGAL_Core/include/CGAL/CORE/extLong_impl.h index 0baeb58fbcd..69d92131839 100644 --- a/CGAL_Core/include/CGAL/CORE/extLong_impl.h +++ b/CGAL_Core/include/CGAL/CORE/extLong_impl.h @@ -21,7 +21,7 @@ * Zilin Du * Sylvain Pion * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/linearAlgebra.h b/CGAL_Core/include/CGAL/CORE/linearAlgebra.h index 16da34e461a..3d760cc629b 100644 --- a/CGAL_Core/include/CGAL/CORE/linearAlgebra.h +++ b/CGAL_Core/include/CGAL/CORE/linearAlgebra.h @@ -22,7 +22,7 @@ * Written by * Shubin Zhao (shubinz@cs.nyu.edu) (2001) * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $Id$ diff --git a/CGAL_Core/include/CGAL/CORE/poly/Curves.h b/CGAL_Core/include/CGAL/CORE/poly/Curves.h index 65d1422d255..f1c9172e3e9 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Curves.h +++ b/CGAL_Core/include/CGAL/CORE/poly/Curves.h @@ -49,7 +49,7 @@ * Author: Vikram Sharma and Chee Yap * Date: April 12, 2004 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc index d9be84796c0..f21ddfec3a8 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Curves.tcc @@ -16,7 +16,7 @@ * Author: Vikram Sharma and Chee Yap * Date: April 12, 2004 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/poly/Poly.h b/CGAL_Core/include/CGAL/CORE/poly/Poly.h index bd56376a5b2..50ec728b685 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Poly.h +++ b/CGAL_Core/include/CGAL/CORE/poly/Poly.h @@ -36,7 +36,7 @@ * Author: Chee Yap * Date: May 28, 2002 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc index 325f64d528c..604a86ad6e1 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc @@ -30,7 +30,7 @@ * Author: Chee Yap, Sylvain Pion and Vikram Sharma * Date: May 28, 2002 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/CORE/poly/Sturm.h b/CGAL_Core/include/CGAL/CORE/poly/Sturm.h index 57fe5b26b7f..77ceab8c9ae 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Sturm.h +++ b/CGAL_Core/include/CGAL/CORE/poly/Sturm.h @@ -37,7 +37,7 @@ * Author: Chee Yap and Sylvain Pion, Vikram Sharma * Date: July 20, 2002 * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_Core/include/CGAL/export/CORE.h b/CGAL_Core/include/CGAL/export/CORE.h index 440239528a1..651387e610d 100644 --- a/CGAL_Core/include/CGAL/export/CORE.h +++ b/CGAL_Core/include/CGAL/export/CORE.h @@ -18,7 +18,7 @@ * Sylvain Pion * Vikram Sharma * - * WWW URL: http://cs.nyu.edu/exact/ + * WWW URL: https://cs.nyu.edu/exact/ * Email: exact@cs.nyu.edu * * $URL$ diff --git a/CGAL_ImageIO/include/CGAL/ImageIO.h b/CGAL_ImageIO/include/CGAL/ImageIO.h index 9c6b4281cc6..26ada2cfd76 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO.h @@ -24,7 +24,7 @@ #ifdef CGAL_USE_ZLIB #include -/* see http://www.gzip.org/zlib/ +/* see https://zlib.net/ for details and documentation */ #endif @@ -342,8 +342,8 @@ CGAL_IMAGEIO_EXPORT _image *_createImage(std::size_t x, std::size_t y, std::size GIS (CEA, IRISA, ENST 3D image format). See also: - http://www.dcs.ed.ac.uk/home/mxr/gfx/2d-hi.html and - http://www.gzip.org/zlib/ + https://www.martinreddy.net/gfx/2d-hi.html and + https://zlib.net/ @param name image file name or nullptr for stdin */ diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/convert.h b/CGAL_ImageIO/include/CGAL/ImageIO/convert.h index 4cb73637c49..0119d73736d 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/convert.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/convert.h @@ -19,7 +19,7 @@ * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h b/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h index 4fba58fb19b..9e35ebd637b 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/recbuffer.h @@ -23,7 +23,7 @@ * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/recline.h b/CGAL_ImageIO/include/CGAL/ImageIO/recline.h index b8ae7b398a3..588bd8d6434 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/recline.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/recline.h @@ -23,7 +23,7 @@ * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h b/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h index c4c612cc6e3..a77de031f64 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/typedefs.h @@ -19,7 +19,7 @@ * * AUTHOR: * Gregoire Malandain (greg@sophia.inria.fr) - * http://www.inria.fr/epidaure/personnel/malandain/ + * https://www-sop.inria.fr/members/Gregoire.Malandain/ * * CREATION DATE: * June, 9 1998 diff --git a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt index e5c3467650f..922e4e8f9bd 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt +++ b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt @@ -9,7 +9,7 @@ namespace CGAL { \section CGAL_ipeletsIntroduction Introduction -The Ipe extensible drawing editor (http://ipe.otfried.org) \cgalCite{schwarzkopf1995ede}, \cgalCite{ipe:man-09} +The Ipe extensible drawing editor (https://ipe.otfried.org/) \cgalCite{schwarzkopf1995ede}, \cgalCite{ipe:man-09} is a tool used by computational geometry researchers to produce 2D figures for inclusion in articles or presentations. The extensible adjective sheds a light on an important feature: the possibility for users to write small extensions (called ipelets) diff --git a/Circular_kernel_2/doc/Circular_kernel_2/Circular_kernel_2.txt b/Circular_kernel_2/doc/Circular_kernel_2/Circular_kernel_2.txt index 41a5e7b9db4..740788d9b14 100644 --- a/Circular_kernel_2/doc/Circular_kernel_2/Circular_kernel_2.txt +++ b/Circular_kernel_2/doc/Circular_kernel_2/Circular_kernel_2.txt @@ -90,7 +90,7 @@ also added more functionality in 2008. This work was partially supported by the IST Programme of the EU as a Shared-cost RTD (FET Open) Project under Contract No IST-2000-26473 -(ECG - Effective +(ECG - Effective Computational Geometry for Curves and Surfaces) and by the IST Programme of the 6th Framework Programme of the EU as a STREP (FET Open Scheme) Project under Contract No IST-006413 diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_reader.h b/Circular_kernel_2/include/CGAL/IO/Dxf_reader.h index bf00857272b..a66bd69bf63 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_reader.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_reader.h @@ -16,7 +16,7 @@ // (ACS -- Algorithms for Complex Shapes) // Description of the file format can be found at the following address: -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_READER_H #define CGAL_IO_DXF_READER_H diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h b/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h index 4da1adc4c96..900dd9aed87 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h @@ -16,8 +16,7 @@ // (ACS -- Algorithms for Complex Shapes) // Descriptions of the file format can be found at -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ -// http://www.tnt.uni-hannover.de/soft/compgraph/fileformats/docs/DXF.ascii +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_READER_DOUBLES_H #define CGAL_IO_DXF_READER_DOUBLES_H diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h index 84672c295f7..d0ace79c85c 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h @@ -17,7 +17,7 @@ // (ACS -- Algorithms for Complex Shapes) // Description of the file format can be found at the following address: -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_VARIANT_READER_H #define CGAL_IO_DXF_VARIANT_READER_H diff --git a/Classification/doc/Classification/Classification.txt b/Classification/doc/Classification/Classification.txt index 2c4c11eee49..10157e274ff 100644 --- a/Classification/doc/Classification/Classification.txt +++ b/Classification/doc/Classification/Classification.txt @@ -528,7 +528,10 @@ The following example: \section Classification_history History -This package is based on a research code by [Florent Lafarge](https://www-sop.inria.fr/members/Florent.Lafarge/) that was generalized, extended and packaged by [Simon Giraudot](http://geometryfactory.com/who-we-are/) in \cgal 4.12. %Classification of surface meshes and of clusters were introduced in \cgal 4.13. The Neural Network classifier was introduced in \cgal 4.14. +This package is based on a research code by [Florent Lafarge](https://www-sop.inria.fr/members/Florent.Lafarge/) +that was generalized, extended and packaged by [Simon Giraudot](https://geometryfactory.com/who-we-are/) +in \cgal 4.12. %Classification of surface meshes and of clusters were introduced in \cgal 4.13. +The Neural Network classifier was introduced in \cgal 4.14. diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt index 73cd228cf95..0583952c360 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt @@ -185,7 +185,7 @@ MSVC][msvc-assume], or [`__builtin_unreachable`][builtin-unreachable] recognized by both clang and g++. [msvc-assume]: https://msdn.microsoft.com/en-us/library/1b3fsfxw.aspx -[builtin-unreachable]: http://clang.llvm.org/docs/LanguageExtensions.html#builtin-unreachable +[builtin-unreachable]: https://clang.llvm.org/docs/LanguageExtensions.html#builtin-unreachable \section secexception_handling Exception handling @@ -193,7 +193,7 @@ Some parts of the library use exceptions, but there is no general specific policy concerning exception handling in \cgal. It is nevertheless good to target exception safety, as much as possible. Good references on exception safety are: Appendix E of \cgalCite{cgal:s-cpl-97} (also available at -http://www.stroustrup.com/3rd_safe0.html), +https://www.stroustrup.com/3rd_safe0.html), and \cgalCite{cgal:a-esgc-98} (also available at https://www.boost.org/community/exception_safety.html). Any destructor which might throw an exception, including a destructor which diff --git a/Documentation/doc/Documentation/License.txt b/Documentation/doc/Documentation/License.txt index cb272b4180f..1eaf49026dd 100644 --- a/Documentation/doc/Documentation/License.txt +++ b/Documentation/doc/Documentation/License.txt @@ -19,7 +19,7 @@ based on GPLed \cgal data structures, obliges you to distribute the source code of your software under the GPL. The exact license terms can be found at the Free Software Foundation -web site: http://www.gnu.org/copyleft/gpl.html. +web site: https://www.gnu.org/licenses/gpl-3.0.html. \section licensesLGPL GNU LGPL @@ -29,7 +29,7 @@ In contrast to the GPL, there is no obligation to distribute the source code of software you build on top of LGPLed \cgal data structures. The exact license terms can be found at the Free Software Foundation web site: -http://www.gnu.org/copyleft/lesser.html. +https://www.gnu.org/licenses/lgpl-3.0.html. \section licensesRationale Rationale of the License Choice @@ -46,7 +46,7 @@ The package overview states for each package under which license it is distribut Users who cannot comply with the Open Source license terms can buy individual data structures under various commercial licenses from GeometryFactory: -http://www.geometryfactory.com/. License fees paid by commercial +https://www.geometryfactory.com/. License fees paid by commercial customers are reinvested in R\&D performed by the \cgal project partners, as well as in evolutive maintenance. diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 1b281911cc8..b981472df6a 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -11,11 +11,11 @@ supporting C++14 or later. | Operating System | Compiler | | :---------- | :--------------- | -| Linux | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{http://gcc.gnu.org/}} | -| | `Clang` \cgalFootnote{\cgalFootnoteCode{http://clang.llvm.org/}} compiler version 13.0.1 | -| \ms Windows | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{http://gcc.gnu.org/}} | +| Linux | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | +| | `Clang` \cgalFootnote{\cgalFootnoteCode{https://clang.llvm.org/}} compiler version 13.0.1 | +| \ms Windows | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | | | \ms Visual `C++` 14.0, 15.9, 16.10, 17.0 (\visualstudio 2015, 2017, 2019, and 2022)\cgalFootnote{\cgalFootnoteCode{https://visualstudio.microsoft.com/}} | -| MacOS X | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{http://gcc.gnu.org/}} | +| MacOS X | \gnu `g++` 10.2.1 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | | | Apple `Clang` compiler versions 10.0.1, 12.0.5, and 13.0.0 | @@ -131,7 +131,7 @@ Overview page. In order to use Eigen in \cgal programs, the executables should be linked with the CMake imported target `CGAL::Eigen3_support` provided in `CGAL_Eigen3_support.cmake`. -The \eigen web site is `http://eigen.tuxfamily.org`. +The \eigen web site is `https://eigen.tuxfamily.org`. \subsection thirdpartyOpenGR OpenGR @@ -309,7 +309,7 @@ The \glpk web site is `https://www. In \cgal, \scip provides an optional linear integer program solver in the \ref PkgPolygonalSurfaceReconstruction package. In order to use \scip in \cgal programs, the executables should be linked with the CMake imported target `CGAL::SCIP_support` provided in `CGAL_SCIP_support.cmake`. -The \scip web site is `http://scip.zib.de/`. +The \scip web site is `https://www.scipopt.org/`. \subsection thirdpartyOSQP OSQP diff --git a/Documentation/doc/Documentation/main.txt b/Documentation/doc/Documentation/main.txt index 085a2ad83b6..2026356b76c 100644 --- a/Documentation/doc/Documentation/main.txt +++ b/Documentation/doc/Documentation/main.txt @@ -35,7 +35,7 @@ Head over to \ref general_intro to learn how to obtain, install, and use \cgal. \cgal is distributed under a dual-license scheme. \cgal can be used together with Open Source software free of charge. Using \cgal in other contexts can be done by obtaining a commercial license from -[GeometryFactory](http://www.geometryfactory.com). For more details +[GeometryFactory](https://www.geometryfactory.com). For more details see the \ref license "License" page.

      Acknowledgement

      diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 1c49fe6ffd2..34858e1e6b3 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -8,7 +8,7 @@ % - Entries are sorted alphabetically by their key % % - The key is created following the same rules as geombib, see -% http://compgeom.cs.uiuc.edu/~jeffe/compgeom/biblios.html +% https://jeffe.cs.illinois.edu/teaching/compgeom/ % % Here are roughly the rules: % initials of authors' last names '-' initials of 5 first title words @@ -264,7 +264,7 @@ Boissonnat} pages = {67--91}, volume = {4}, issue = {1}, - url = {http://dx.doi.org/10.1007/s11786-010-0043-4}, + url = {https://dx.doi.org/10.1007/s11786-010-0043-4}, year = {2010} } @@ -279,7 +279,7 @@ Boissonnat} pages = {45--66}, volume = {4}, issue = {1}, - url = {http://dx.doi.org/10.1007/s11786-010-0042-5}, + url = {https://dx.doi.org/10.1007/s11786-010-0042-5}, year = {2010} } @@ -335,8 +335,8 @@ Boissonnat} ,author = {Gavin Bell and Anthony Parisi and Mark Pesce} ,title = {VRML The Virtual Reality Modeling Language: Version 1.0 Specification} - ,howpublished = {\url{http://www.web3d.org/standards}} - ,url = "http://www.web3d.org/standards" + ,howpublished = {\url{https://www.web3d.org/standards}} + ,url = "https://www.web3d.org/standards" ,month = {May 26} ,year = 1995 ,update = "13.04 lrineau" @@ -674,7 +674,7 @@ Mourrain and Monique Teillaud" year = "1996", issn = "0377-2217", doi = "DOI: 10.1016/0377-2217(94)00366-1", - url = "http://www.sciencedirect.com/science/article/B6VCT-3VW8NPR-11/2/3cf4525c68d79c055676541418264043", + url = "https://www.sciencedirect.com/science/article/abs/pii/0377221794003661", keywords = "Convex hull problem, Frame, Linear programming, Data envelopment analysis, Redundancy" } @@ -791,7 +791,7 @@ Teillaud" @Misc{ cgal:e-esmr, title = {{EPFL} statue model repository}, howpublished = {{EPFL} Computer Graphics and Geometry Laboratory}, - url = {http://lgg.epfl.ch/statues_dataset.php} + url = {https://lgg.epfl.ch/statues_dataset.php} } @inproceedings{ cgal:eddhls-maam-95 @@ -995,7 +995,7 @@ Teillaud" ,number = {B 98-05} ,year = 1998 ,month = apr - ,url = {http://www.inf.fu-berlin.de/inst/pubs/tr-b-98-05.abstract.html} + ,url = {https://www.inf.fu-berlin.de/inst/pubs/tr-b-98-05.abstract.html} ,update = "98.06 schoenherr" } @@ -1008,7 +1008,7 @@ Teillaud" ,number = {B 98-04} ,year = 1998 ,month = apr - ,url = {http://www.inf.fu-berlin.de/inst/pubs/tr-b-98-04.abstract.html} + ,url = {https://www.inf.fu-berlin.de/inst/pubs/tr-b-98-04.abstract.html} ,update = "98.06 schoenherr" } @@ -1020,7 +1020,7 @@ Teillaud" ,number = {B 97-03} ,year = 1997 ,month = jun - ,url = {http://www.inf.fu-berlin.de/inst/pubs/tr-b-97-03.abstract.html} + ,url = {https://www.inf.fu-berlin.de/inst/pubs/tr-b-97-03.abstract.html} ,update = "97.06 schoenherr, 98.02 schoenherr, 98.06 schoenherr" } @@ -1061,7 +1061,7 @@ Teillaud" ,edition = {1.0.1} ,month = {June} ,year = {1999} - ,url = {http://clisp.cons.org/~haible/packages-cln.html} + ,url = {https://www.ginac.de/CLN/} ,update = "99.06 pion" } @@ -1297,7 +1297,7 @@ Teillaud" (full paper will be available shortly)}, YEAR = {2005}, MONTH = {November}, - URL = {http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics} + URL = {https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics} } @Article{ cgal:l-tmbrc-91, @@ -1555,7 +1555,7 @@ TITLE = {Intersecting Quadrics\,: An Efficient and Exact Implementation}, BOOKTITLE = {{ACM Symposium on Computational Geometry - SoCG'2004, Brooklyn, NY}}, YEAR ={ 2004}, MONTH ={ Jun}, -URL = {http://www.loria.fr/publications/2004/A04-R-021/A04-R-021.ps}, +URL = {https://www.loria.fr/publications/2004/A04-R-021/A04-R-021.ps}, ABSTRACT = {We present the first complete, exact and efficient C++ implementation of a method for parameterizing the intersection of two implicit quadrics with integer coefficients of arbitrary size. It is based on the near-optimal algorithm recently introduced by Dupont et al.~\cite{dupont03a}. Unlike existing implementations, it correctly identifies and parameterizes all the connected components of the intersection in all the possible cases, returning parameterizations with rational functions whenever such parameterizations exist. In addition, the coefficient field of the parameterizations is either minimal or involves one possibly unneeded square root.}, } @@ -1567,9 +1567,9 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio booktitle = {SEA}, year = {2009}, pages = {209-220}, - ee = {http://dx.doi.org/10.1007/978-3-642-02011-7_20}, + ee = {https://link.springer.com/chapter/10.1007/978-3-642-02011-7_20}, crossref = {cgal:v-ea-09}, - bibsource = {DBLP, http://dblp.uni-trier.de}, + bibsource = {DBLP, https://dblp.org/}, update = "09.11 penarand" } @@ -1582,8 +1582,8 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio year = "2011", note = "Advances in \{LIDAR\} Data Processing and Applications ", issn = "0924-2716", - doi = "http://dx.doi.org/10.1016/j.isprsjprs.2011.09.008", - url = "http://www.sciencedirect.com/science/article/pii/S0924271611001055", + doi = "https://dx.doi.org/10.1016/j.isprsjprs.2011.09.008", + url = "https://www.sciencedirect.com/science/article/abs/pii/S0924271611001055?via%3Dihub", author = "Clément Mallet and Frédéric Bretar and Michel Roux and Uwe Soergel and Christian Heipke" } @@ -1688,7 +1688,7 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio volume = {33}, number = {5}, issn = {1467-8659}, - url = {http://dx.doi.org/10.1111/cgf.12446}, + url = {https://onlinelibrary.wiley.com/doi/10.1111/cgf.12446}, doi = {10.1111/cgf.12446}, pages = {205--215}, year = {2014} @@ -1715,7 +1715,7 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio ,title = {The {LEDA} {U}ser {M}anual} ,organization = {Max-Planck-Insitut f\"ur Informatik} ,address = {66123 Saarbr\"ucken, Germany} - ,url = {http://www.mpi-sb.mpg.de/LEDA/leda.html} + ,url = {https://domino.mpi-inf.mpg.de/internet/reports.nsf/efc044f1568a0058c125642e0064c817/cff150e000ddc461c12562a80045cb82/$FILE/MPI-I-95-1-002.pdf} ,update = "99.05 schirra, 00.09 hert" } @@ -1724,7 +1724,7 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio ,title = {The {LEDA} {U}ser {M}anual} ,organization = {Algorithmic Solutions} ,address = {66123 Saarbr\"ucken, Germany} - ,url = {http://www.algorithmic-solutions.info/leda_manual/MANUAL.html} + ,url = {https://www.algorithmic-solutions.info/leda_manual/MANUAL.html} } @article{ cgal:mog-vbcfe-11 @@ -1979,7 +1979,7 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio title = {{MPFI} - The Multiple Precision Floating-Point Interval Library}, howpublished = {{R}evol, {N}athalie and {R}ouillier, {F}abrice}, - url = {http://perso.ens-lyon.fr/nathalie.revol/software.html}, + url = {https://perso.ens-lyon.fr/nathalie.revol/software.html}, update = "09.11 penarand" } @@ -2022,7 +2022,7 @@ ABSTRACT = {We present the first complete, exact and efficient C++ implementatio ,journal = "Comput. Geom. Theory Appl." , volume = 38 , pages = "100--110" - , url = "http://dx.doi.org/10.1016/j.comgeo.2006.11.008" + , url = "https://www.sciencedirect.com/science/article/pii/S0925772107000193?via%3Dihub" , publisher = "Elsevier Science Publishers B. V." ,update = "09.02 lrineau" } @@ -2298,8 +2298,8 @@ location = {Salt Lake City, Utah, USA} volume = {5526}, year = {2009}, isbn = {978-3-642-02010-0}, - ee = {http://dx.doi.org/10.1007/978-3-642-02011-7}, - bibsource = {DBLP, http://dblp.uni-trier.de}, + ee = {https://link.springer.com/book/10.1007/978-3-642-02011-7}, + bibsource = {DBLP, https://dblp.org/}, update = "09.11 penarand" } @@ -2368,7 +2368,7 @@ location = {Salt Lake City, Utah, USA} ,key = {VRML2} ,title = {The Virtual Reality Modeling Language Specification: Version 2.0, {ISO}/{IEC} {CD} 14772} - ,url = {http://www.web3d.org/documents/specifications/14772/V2.0/index.html} + ,url = {https://www.web3d.org/documents/specifications/14772/V2.0/index.html} ,month = {December} ,year = 1997 ,update = "13.04 lrineau" @@ -2503,7 +2503,6 @@ location = {Salt Lake City, Utah, USA} editor = "L{\'{a}}szl{\'{o}} Szirmay Kalos", pages = "210--218", year = "1998", - url = "http://citeseer.ist.psu.edu/article/felkel98straight.html" } @inproceedings{ cgal:ee-rrccpp-98, @@ -2512,7 +2511,7 @@ location = {Salt Lake City, Utah, USA} booktitle = "Symposium on Computational Geometry", pages = "58--67", year = "1998", - url = "http://citeseer.ist.psu.edu/eppstein98raising.html" + url = "https://jeffe.cs.illinois.edu/pubs/cycles.html" } @inproceedings{ cgal:ld-agrm-03, @@ -2525,11 +2524,9 @@ booktitle = {The 11-th International Conference in Central Europe year = 2003, volume = 11, issn = {ISSN 1213-6972}, -url = "http://wscg.zcu.cz/wscg2003/Papers_2003/G67.pdf" +url = "https://wscg.zcu.cz/wscg2003/Papers_2003/G67.pdf" } - - @InProceedings{cgal:k-vdc-06, author = {Menelaos I. Karavelas}, title = {Voronoi diagrams in {\sc Cgal}}, @@ -2576,7 +2573,7 @@ year = {1998}, pages = {69-79}, ee = {http://link.springer.de/link/service/series/0558/bibs/1766/17660069.htm}, crossref = {cgal:jlm-isgp-98}, -bibsource = {DBLP, http://dblp.uni-trier.de}, +bibsource = {DBLP, https://dblp.org/}, url = "https://www.boost.org/community/exception_safety.html" } @@ -2624,7 +2621,7 @@ url = "https://www.boost.org/community/exception_safety.html" volume = {1766}, year = {2000}, isbn = {3-540-41090-2}, - bibsource = {DBLP, http://dblp.uni-trier.de} + bibsource = {DBLP, https://dblp.org/} } @inproceedings{Kazhdan06, @@ -2719,14 +2716,14 @@ author = "Pedro M.M. de Castro and Frederic Cazals and Sebastien Loriot and Moni AUTHOR = {Otfried Cheong}, EDITION = {6.0pre32}, YEAR = {2009}, - URL = {http://ipe.otfried.org/} + URL = {https://ipe.otfried.org/} } @misc{cgal:t-ocdl-05, key = "opcode", author = {P. Terdiman}, title = "{{OPCODE 3D} Collision Detection library}", - note = "http://www.codercorner.com/Opcode.htm", + note = "https://www.codercorner.com/Opcode.htm", year = {2005} } @@ -2806,7 +2803,7 @@ ADDRESS = "Saarbr{\"u}cken, Germany" @misc{abbott-qir-06, author = "J. Abbott", title = "Quadratic Interval Refinement for Real Roots", - URL = "http://www.dima.unige.it/~abbott/", + URL = "https://www.dima.unige.it/~abbott/", year= "2006", note = "Poster presented at the 2006 Int.\ Symp.\ on Symb.\ and Alg.\ Comp.\ (ISSAC 2006)"} @@ -3035,9 +3032,9 @@ pages = "458--473" booktitle = {FOCS}, year = {1985}, pages = {155-164}, - ee = {http://doi.ieeecomputersociety.org/10.1109/SFCS.1985.65}, + ee = {https://doi.ieeecomputersociety.org/10.1109/SFCS.1985.65}, crossref = {DBLP:conf/focs/FOCS26}, - bibsource = {DBLP, http://dblp.uni-trier.de} + bibsource = {DBLP, https://dblp.org/} } @article{dtl-voasp-83, @@ -3061,8 +3058,8 @@ pages = "207--221" volume = {abs/1403.3905}, url = {https://arxiv.org/abs/1403.3905}, timestamp = {Wed, 17 Sep 2014 16:30:16 +0200}, - biburl = {http://dblp.uni-trier.de/rec/bib/journals/corr/BungiuHHHK14}, - bibsource = {dblp computer science bibliography, http://dblp.org} + biburl = {https://dblp.uni-trier.de/rec/bib/journals/corr/BungiuHHHK14}, + bibsource = {dblp computer science bibliography, https://dblp.org/} } @book{botsch2010PMP, diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index 270f537e139..3a19d0dccbb 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -78,7 +78,7 @@ , title = "IRIT $6.0$ User's Manual" , organization = "Technion" , year = 1996 -, url = "http://www.cs.technion.ac.il/~irit" +, url = "https://www.cs.technion.ac.il/~irit" , update = "98.07 bibrelex" } @@ -1925,7 +1925,7 @@ cell neighborhood in $O(m)$ time." , type = "Project Proposal (U. S. Army Research Office grant DAAH04-96-1-0013)" , institution = "Center for Geometric Computing" , year = 1995 -, url = "http://www.cs.brown.edu/cgc/" +, url = "https://www.cs.brown.edu/cgc/" , update = "98.07 bibrelex, 97.03 tamassia" } @@ -6908,7 +6908,7 @@ cell neighborhood in $O(m)$ time." @misc{a-dcgs- , author = "Nina Amenta" , title = "Directory of Computational Geometry Software" -, url = "http://www.geom.umn.edu/software/cglist/" +, url = "https://www.geom.uiuc.edu/software/cglist/" , update = "97.03 tamassia" } @@ -13110,7 +13110,6 @@ It is highly suitable for parallelization." , institution = "INRIA" , address = "BP93, 06902 Sophia-Antipolis, France" , year = 1994 -, url = "http://www.inria.fr/RRRT/RR-2306" , precedes = "abdpy-esdus-97" , update = "99.11 bibrelex, 99.07 devillers, 97.03 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers" , abstract = "We propose a method to evaluate signs of $2\times 2$ and @@ -14473,7 +14472,7 @@ whereas standard (polynomial) splines do not. Contains pseudocode." , number = 4 , year = 1995 , pages = "568--572" -, url = "http://www.cs.brown.edu/cgc/papers/bclt-nmaaw-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/bclt-nmaaw-95.ps.gz" , keywords = "algorithm animation, Java, Web, WWW, graph drawing, CGC, Brown" , update = "97.03 tamassia, 96.09 tamassia" } @@ -14485,7 +14484,7 @@ whereas standard (polynomial) splines do not. Contains pseudocode." , nickname = "AVI '96" , year = 1996 , pages = "203--212" -, url = "http://www.cs.brown.edu/cgc/papers/bclt-aawww-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/bclt-aawww-96.ps.gz" , keywords = "algorithm animation, Java, Web, WWW, CGC, Brown" , update = "97.03 tamassia, 96.09 tamassia" } @@ -14496,7 +14495,7 @@ whereas standard (polynomial) splines do not. Contains pseudocode." , booktitle = "Proc. 12th Annu. ACM Sympos. Comput. Geom." , year = 1996 , pages = "C3--C4" -, url = "http://www.cs.brown.edu/cgc/papers/bclt-agaow-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/bclt-agaow-96.ps.gz" , keywords = "algorithm animation, Java, Web, WWW, CGC, Brown" , cites = "bclt-nmaaw-95, ZZZ" , update = "97.11 bibrelex, 97.03 tamassia, 96.09 tamassia, 96.05 efrat" @@ -14509,7 +14508,7 @@ whereas standard (polynomial) splines do not. Contains pseudocode." , nickname = "AVI '96" , year = 1996 , pages = "248--250" -, url = "http://www.cs.brown.edu/cgc/papers/bclt-maas-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/bclt-maas-96.ps.gz" , keywords = "algorithm animation, Java, Web, WWW, CGC, Brown" , update = "97.03 tamassia, 96.09 tamassia" } @@ -18585,7 +18584,6 @@ the interior. Contains pseudocode." , institution = "INRIA" , address = "BP93, 06902 Sophia-Antipolis, France" , year = 1995 -, url = "http://www.inria.fr/RRRT/RR-2626" , precedes = "bdds-cscot-97" , update = "99.11 bibrelex, 99.07 devillers, 98.11 devillers, 97.03 devillers, 96.01 devillers" , abstract = "This note presents a non trivial combination of two techniques previously used with randomized incremental algorithms: the lazy cleaning scheme \cite{bds-lric-94} to maintain structures with `non local' definition and the $O(n\log^{\star}n)$ acceleration when some additional information about the data is known \cite{s-sfira-91,cct-rpatd-92,d-rysoa-92}. Authors assume that the reader is somehow familiar with this techniques. @@ -21935,7 +21933,7 @@ where $d > 3 \sqrt 3$ denotes the distance between S and T." , number = 7 , year = 1998 , pages = "1--31" -, url = "http://www.cs.brown.edu/publications/jgaa/accepted/98/Biedl98.2.7.ps.gz" +, url = "https://www.cs.brown.edu/publications/jgaa/accepted/98/Biedl98.2.7.ps.gz" , succeeds = "b-nlbog-96" , update = "00.03 vismara" } @@ -23872,7 +23870,6 @@ In [BSBL93], the synthesis problem has been solved for a , address = "Valbonne, France" , month = apr , year = 1991 -, url = "http://www.inria.fr/RRRT/RR-1415" , keywords = "Delaunay triangulation, Voronoi diagrams, output-sensitive algorithms, shape reconstructions, shelling, tomography" , precedes = "bcdt-osc3d-91i, bcdt-oscdt-96" , update = "99.11 bibrelex, 99.07 devillers, 97.03 devillers, 96.05 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers" @@ -23930,7 +23927,6 @@ of the output, and the extra storage is {$O(n)$}." , number = 2160 , institution = "INRIA" , year = 1994 -, url = "http://www-sop.inria.fr/RRRT/RR-2160.html" , precedes = "bcdkl-sppbd-99" , update = "99.11 devillers, 99.07 devillers, 98.03 mitchell" } @@ -24176,7 +24172,6 @@ must lie in the halfplanes delimited by the query lines." , address = "Sophia-Antipolis, France" , month = oct , year = 1990 -, url = "http://www.inria.fr/RRRT/RR-1293" , precedes = "bdp-cu3ct-91" , update = "99.11 bibrelex, 99.07 devillers, 97.03 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers, 93.09 milone+mitchell" } @@ -24203,7 +24198,6 @@ must lie in the halfplanes delimited by the query lines." , institution = "INRIA Sophia-Antipolis" , address = "Valbonne, France" , year = 1990 -, url = "http://www.inria.fr/RRRT/RR-1285" , succeeds = "bt-hrodt-86" , precedes = "bdsty-olgag-91i" , update = "99.11 bibrelex, 99.07 devillers, 98.07 bibrelex, 97.03 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers, 93.09 milone+mitchell" @@ -24271,7 +24265,6 @@ arrangements of curves in the plane and others." , institution = "INRIA Sophia-Antipolis" , address = "Valbonne, France" , year = 1990 -, url = "http://www.inria.fr/RRRT/RR-1207" , keywords = "randomized algorithms, higher order Voronoi diagrams, dynamic algorithms" , succeeds = "bdt-olcho-90, bt-hrodt-86" , precedes = "bdt-schov-93" @@ -24430,7 +24423,7 @@ the computational geometry algorithms library CGAL." , address = "Valbonne, France" , month = apr , year = 1992 -, url = "http://www-sop.inria.fr/cgi-bin/wais_ra_sophia?question=1697" +, url = "https://www-sop.inria.fr/cgi-bin/wais_ra_sophia?question=1697" , keywords = "shape reconstruction, medical images, Delaunay triangulation" , update = "99.07 devillers, 95.09 devillers, 95.01 devillers, 93.09 held" } @@ -24643,7 +24636,6 @@ present a polynomial-time exact algorithm to solve this problem." , number = 3825 , institution = "INRIA" , year = 1999 -, url = "http://www.inria.fr/RRRT/RR-3825" , cites = "b-oafsi-95, bo-arcgi-79, bs-ealcs-99, bp-rpsis-, c-stsar-94, ce-oails-92, cs-arscg-89, afl-rracg-98, k-ah-92, lpt-rpqid-99, p-iaeia-99, ps-cgi-90, s-ri-99, y-tegc-97, y-rgc-97" , update = "00.03 devillers" , abstract = "We propose several @@ -25563,7 +25555,7 @@ present a polynomial-time exact algorithm to solve this problem." , number = "RT-INF-9-96" , institution = "Dip. Discipline Scientifiche, Sez. Informatica, Univ. Roma III" , year = 1996 -, url = "http://www.cs.brown.edu/cgc/papers/bdll-pcrt-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/bdll-pcrt-96.ps.gz" , keywords = "graph drawing, proximity, CGC, Brown" , update = "97.03 tamassia" } @@ -26988,7 +26980,7 @@ and solids on dynamically evolving grids without remeshing." , title = "Optimal Compaction of Orthogonal Representations" , booktitle = "CGC Workshop on Geometric Computing" , year = 1998 -, url = "http://www.cs.brown.edu/cgc/cgc98/" +, url = "https://www.cs.brown.edu/cgc/cgc98/" , keywords = "graph drawing, planar, orthogonal" , update = "98.11 tamassia" } @@ -27016,7 +27008,7 @@ and solids on dynamically evolving grids without remeshing." , publisher = "Springer-Verlag" , year = 1997 , pages = "45--52" -, url = "http://www.cs.brown.edu/cgc/papers/bgt-gdtsw-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/bgt-gdtsw-97.ps.gz" , keywords = "graph drawing, system, WWW, orthogonal, planarization, CGC, Brown" , update = "98.07 vismara, 97.03 tamassia" } @@ -27448,7 +27440,6 @@ and solids on dynamically evolving grids without remeshing." , number = 3758 , institution = "INRIA" , year = 1999 -, url = "http://www.inria.fr/RRRT/RR-3758" , archive = "XXX:cs.CG/9907025" , cites = "h-bevv-56, bcddy-acchs-96" , update = "99.11 devillers" @@ -31078,7 +31069,7 @@ determinants." , publisher = "Springer-Verlag" , year = 1997 , pages = "63--75" -, url = "http://www.cs.brown.edu/cgc/papers/cgkt-oaars-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/cgkt-oaars-97.ps.gz" , keywords = "graph drawing, upward, tree, planar, straight-line, orthogonal, CGC, Brown" , update = "98.07 agarwal, 98.03 smid, 97.11 bibrelex, 97.03 tamassia" } @@ -31421,7 +31412,7 @@ determinants." , site = "Waterloo, Canada" , year = 1993 , pages = "67--72" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation, exact arithmetic" , cites = "m-cacau-89, dbs-gttd-92, fm-nsala-91, fv-eeacg-93, h-gsm-89, kln-edtur-91, m-vigau-88t, m-cacau-89, m-rfldd-90, m-rflp-89, fw-lnum-93, si-cvdom-89, f-pcg-93, ZZZ" , update = "98.11 bibrelex, 97.03 daniels, 93.09 milone+mitchell" @@ -31730,7 +31721,7 @@ determinants." , title = "Finding Basis Functions for Pyramidal Finite Elements" , booktitle = "CGC Workshop on Geometric Computing" , year = 1998 -, url = "http://www.cs.brown.edu/cgc/cgc98/" +, url = "https://www.cs.brown.edu/cgc/cgc98/" , update = "98.11 tamassia" } @@ -35104,7 +35095,7 @@ The algorithms can be extended to 3D with more complex data structures." , booktitle = "Proc. 6th ACM-SIAM Sympos. Discrete Algorithms" , year = 1995 , pages = "139--149" -, url = "http://www.cs.brown.edu/cgc/papers/cggtvv-emga-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/cggtvv-emga-95.ps.gz" , update = "97.03 tamassia, 95.05 tamassia, 95.01 tamassia" } @@ -35159,7 +35150,7 @@ The algorithms can be extended to 3D with more complex data structures." , volume = 25 , year = 1996 , pages = "207--233" -, url = "http://www.cs.brown.edu/cgc/papers/cpt-uadpl-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/cpt-uadpl-96.ps.gz" , succeeds = "cpt-uadpl-93" , update = "97.03 tamassia, 96.05 smid, 95.01 tamassia" } @@ -35259,7 +35250,7 @@ The algorithms can be extended to 3D with more complex data structures." , volume = 7 , year = 1997 , pages = "85--121" -, url = "http://www.cs.brown.edu/cgc/papers/ct-ospml-.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/ct-ospml-.ps.gz" , keywords = "Shortest Path, Minimum-Link Path, dynamic algorithm, CGC, Brown" , succeeds = "ct-ospml-94i" , update = "98.07 mitchell, 97.11 bibrelex, 97.07 devillers, 97.03 tamassia, 96.09 tamassia, 95.01 tamassia" @@ -36242,7 +36233,7 @@ avoids overlap. This is useful in cartography." , booktitle = "Proc. 12th Annu. ACM Sympos. Comput. Geom." , year = 1996 , pages = "319--328" -, url = "http://www.cs.brown.edu/cgc/papers/cgt-cdgtt-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/cgt-cdgtt-96.ps.gz" , keywords = "graph drawing, straight-line, 3D, convex, CGC, Brown" , cites = "a-lbvsc-63, bh-olpgf-87, bo-lwbl-87, con-dpgn-85, cyn-lacdp-84, ck-cgd3c-93, cn-mwgdp-95, cp-ltadp-95, celr-tdgd-95, c-re-82, cw-mmap-90, cw-sfmps-82, dg-caitd-95, fpp-sssfe-88, fpp-hdpgg-90, dett-adgab-94, dtt-arsdp-92, dtv-olcpt-95, ds-ltati-92, eg-dspg-96, esw-tkbtd-95, f-slrpg-48, fhhklsww-dgphr-93, gt-pdara-94, gt-anda-87, g-cp-67, hr-udfs-94, hrs-cchpc-92, ht-dgtc-73, ht-ept-74, hk-prga-92, jj-3dlrg-95, k-dpguc-96, k-dpgul-92, ls-cavg-92, ld-cpdt3-95, lrt-gnd-79, lt-apst-80, mp-arpg-94, m-orfdf-64, ps-cgi-85, r-3dvpi-95, r-e3vpi-95, s-epgg-90, st-ce3cp-92, s-cm-51, sr-vudtd-34, t-pdfip-80, t-prg-84, t-crg-60, t-hdg-63, w-mspp-82, ZZZ" , update = "98.11 bibrelex, 97.11 bibrelex, 97.03 tamassia, 96.09 tamassia" @@ -37879,7 +37870,7 @@ data. Contains C code." , number = 5 , year = 1995 , pages = "970--1001" -, url = "http://www.cs.brown.edu/cgc/papers/cdtt-dgdts-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/cdtt-dgdts-95.ps.gz" , keywords = "graph drawing, dynamic, planar, trees, series-parallel" , succeeds = "cdttb-fdgd-92" , update = "97.03 tamassia, 96.09 tamassia, 95.09 tamassia, 95 tamassia" @@ -37972,7 +37963,7 @@ data. Contains C code." , volume = 13 , year = 1995 , pages = "245--265" -, url = "http://www.cs.brown.edu/cgc/papers/ct-det-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/ct-det-95.ps.gz" , succeeds = "ct-detta-91" , update = "97.03 tamassia, 95.01 tamassia, 95.01 tamassia" } @@ -41130,7 +41121,7 @@ Contains C code." , booktitle = "Proc. 1st ACM Workshop on Appl. Comput. Geom." , year = 1996 , pages = "33--38" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "layout, nesting, placement, Minkowski sum, configuration space" , comments = "to appear in Lecture Notes in Computer Science; submitted to Internat. J. Comput. Geom. Appl." @@ -41143,7 +41134,7 @@ Contains C code." , booktitle = "Proc. 6th Canad. Conf. Comput. Geom." , year = 1994 , pages = "225--230" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "layout, packing, nesting, placement, reachability, Minkowski sum, configuration space, decomposition" , cites = "dmr-fmaap-93, f-savd-87, l-tdvdl-80, lm-ccp-93, ZZZ" , update = "98.11 bibrelex, 97.03 daniels, 94.09 jones" @@ -41155,7 +41146,7 @@ Contains C code." , booktitle = "Proc. 6th ACM-SIAM Sympos. Discrete Algorithms" , year = 1995 , pages = "205--214" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "packing, layout, placement, nesting, Minkowski sum, configuration space" , update = "97.03 daniels, 96.09 agarwal, 96.05 mitchell" } @@ -41208,7 +41199,7 @@ Contains C code." , site = "Waterloo, Canada" , year = 1993 , pages = "322--327" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "optimization, monotone matrices, polygons, inclusion" , precedes = "dmr-flaap -97" , cites = "akmsw-gamsa-87, as-facle-87, aw-cg-88, c-tsplt-90i, cdl-cler-86, kk-altag-90, mos-fmrio-85, mdl-amm-91, mdl-pcnpc-92, ow-rv-88, ps-cgi-85, srw-gsv-cccg-91, nhl-merp-84, wy-ocsp-88, ZZZ" @@ -41221,7 +41212,7 @@ Contains C code." , booktitle = "Proc. 8th Canad. Conf. Comput. Geom." , year = 1996 , pages = "196--201" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "concave, polygons, decomposition" , update = "97.03 agarwal+daniels, 96.09 mitchell" } @@ -43601,7 +43592,7 @@ Contains C code." , month = aug , year = 2000 , pages = "??--??" -, url = "http://cs.smith.edu/~orourke/papers.html" +, url = "https://www.science.smith.edu/~jorourke/papers.php" , cites = "ddo-ppnph2d-00" , update = "01.04 icking, 00.11 smid, 00.07 orourke" } @@ -43682,7 +43673,7 @@ Contains C code." , month = jan , year = 1999 , pages = "891--892" -, url = "http://www.siam.org/meetings/da99/" +, url = "https://archive.siam.org/meetings/da99/" , update = "99.07 orourke" } @@ -43759,7 +43750,7 @@ Contains C code." , address = "Northampton, MA, USA" , month = oct , year = 2001 -, url = "http://arXiv.org/abs/cs/0110054/" +, url = "https://arxiv.org/abs/cs/0110054" , succeeds = "deeho-vusp-01" , update = "01.11 orourke" } @@ -43773,7 +43764,7 @@ Contains C code." , address = "Northampton, MA, USA" , month = jul , year = 2001 -, url = "http://arXiv.org/abs/cs/0107023/" +, url = "https://arXiv.org/abs/cs/0107023/" , update = "01.11 orourke" } @@ -44318,7 +44309,6 @@ Contains C code." , number = 3451 , institution = "INRIA" , year = 1998 -, url = "http://www.inria.fr/RRRT/RR-3451" , precedes = "d-ddt-99" , update = "99.11 bibrelex, 99.07 devillers, 98.11 devillers" , abstract = "This paper present how space of spheres and shelling can be used to delete efficiently a point from d-dimensional triangulation. In 2-dimension, if k is the degree of the deleted vertex, the complexity is $O(k\log k)$, but we notice that this number apply only to low cost operations; time consuming computations are done only a linear number of times. This algorithm can be viewed as a variation of Heller algorithm which is popular in the geographic information system community. Unfortunately Heller algorithm is false as explained in this paper." @@ -44382,7 +44372,6 @@ minimum spanning tree)." , institution = "INRIA Sophia-Antipolis" , address = "Valbonne, France" , year = 1992 -, url = "http://www.inria.fr/RRRT/RR-1619" , keywords = "randomized algorithms, Delaunay triangulation, practical issue, degenerate cases" , update = "99.11 bibrelex, 99.07 devillers, 97.03 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers" } @@ -44408,7 +44397,6 @@ minimum spanning tree)." , institution = "INRIA Sophia-Antipolis" , address = "Valbonne, France" , year = 1990 -, url = "http://www.inria.fr/RRRT/RR-1179" , keywords = "polygon placement, contact configurations" , precedes = "d-scspa-93" , update = "99.11 bibrelex, 99.07 devillers, 97.03 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers, 94.05 devillers" @@ -44740,7 +44728,6 @@ respectively, we obtain a speedup of $\frac p{\log p}$." , institution = "INRIA Sophia-Antipolis" , address = "Valbonne, France" , year = 1992 -, url = "http://www.inria.fr/RRRT/RR-1620" , precedes = "dmt-ssgtu-92i" , update = "99.11 bibrelex, 99.07 devillers, 97.03 devillers, 96.01 devillers, 95.09 devillers, 95.01 devillers" } @@ -45657,7 +45644,7 @@ dimensions. Constants are small, and are given in the paper." , publisher = "Springer-Verlag" , year = 1997 , pages = "76--91" -, url = "http://www.cs.brown.edu/cgc/papers/dglpttvv-ddges-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/dglpttvv-ddges-97.ps.gz" , keywords = "graph drawing, upward, experiments, CGC, Brown" , update = "98.07 patrignani+tamassia+vismara, 97.11 bibrelex, 97.03 tamassia" } @@ -45680,7 +45667,7 @@ dimensions. Constants are small, and are given in the paper." , type = "Manuscript" , institution = "Dept. of Computer Sci., Brown University" , year = 1996 -, url = "http://www.cs.brown.edu/cgc/papers/dglttv-ecfgd-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/dglttv-ecfgd-96.ps.gz" , keywords = "graph drawing, experiments, orthogonal" , precedes = "dglttv-ecfgd-97" , update = "97.03 tamassia, 96.09 tamassia" @@ -45694,7 +45681,7 @@ dimensions. Constants are small, and are given in the paper." , volume = 7 , year = 1997 , pages = "303--325" -, url = "http://www.cs.brown.edu/cgc/papers/dglttv-ecfgd-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/dglttv-ecfgd-96.ps.gz" , keywords = "graph drawing, experiments, orthogonal, CGC, Brown" , succeeds = "dglttv-ecfgd-96" , update = "98.07 patrignani+tamassia+vismara, 97.07 devillers, 97.03 tamassia, 96.09 tamassia" @@ -45706,7 +45693,7 @@ dimensions. Constants are small, and are given in the paper." , booktitle = "Proc. 11th Annu. ACM Sympos. Comput. Geom." , year = 1995 , pages = "306--315" -, url = "http://www.cs.brown.edu/cgc/papers/dglttv-ectgd-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/dglttv-ectgd-95.ps.gz" , keywords = "graph drawing, experiments, orthogonal" , cites = "bcn-cdder-92, bfn-wigdp-85, bnt-ladfd-86, bbdl-tealf-91, bk-bhogd-94, con-dpgn-85, cp-ltadp-90, celr-tdgd-95, dh-dgnus-89, fpp-sssfe-88, fr-scpdt-84, dett-adgab-94, dgst-ads-90, dlv-sorod-93, dlt-pepg-84, eg-rpdfb-94, eg-glbdb-95, fr-gdfdp-91, gs-ssa-79, gnv-dptdd-88, h-celag-94, h-ggpig-95, jemwdt-npgda-91, jm-mpsne-96, k-vaor-89, kk-adgug-89, k-dpgul-92, k-adpg-93, k-mcvr-93, kb-pgap-92, l-aeglv-80, lmp-sbeac-94, lmps-trm1b-90, lms-gtrre-91, lms-la3be-93, nt-fapsd-84, pt-iabod-95, r-nmdpg-87, rt-rplbo-86, s-mncpe-84, stt-mvuhs-81, t-eggmn-87, tdb-agdrd-88, tt-uavrp-86, tt-pgelt-89, tt-gd-95, t-dgds-88, t-hdg-63, v-ucvc-81, w-npagt-90, w-cblsg-85, w-dpg-82, ZZZ" , update = "01.04 icking, 98.11 bibrelex, 98.03 bibrelex, 97.03 tamassia, 96.09 tamassia, 95.05 tamassia" @@ -45820,7 +45807,7 @@ dimensions. Constants are small, and are given in the paper." , publisher = "Springer-Verlag" , year = 1996 , pages = "178--189" -, url = "http://www.cs.brown.edu/cgc/papers/dlw-swp-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/dlw-swp-96.ps.gz" , keywords = "graph drawing" , update = "98.11 bibrelex, 97.11 bibrelex, 97.03 tamassia, 96.09 tamassia" } @@ -45842,7 +45829,7 @@ dimensions. Constants are small, and are given in the paper." , journal = "J. Graph Algorithms Appl." , volume = "3:4" , year = 1999 -, url = "http://www.cs.brown.edu/publications/jgaa/papers.html" +, url = "https://www.cs.brown.edu/publications/jgaa/papers.html" , update = "00.03 vismara" } @@ -46114,7 +46101,7 @@ dimensions. Constants are small, and are given in the paper." , publisher = "Springer-Verlag" , year = 1996 , pages = "81--91" -, url = "http://www.cs.brown.edu/cgc/papers/dtv-osrdp-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/dtv-osrdp-96.ps.gz" , update = "99.11 bibrelex, 98.07 vismara, 97.03 tamassia" } @@ -48478,7 +48465,7 @@ conjecture posed by O'Rourke and Supowit \cite{os-snhpd-83}." , address = "Northampton, MA, USA" , month = oct , year = 2001 -, url = "http://arXiv.org/abs/cs/0110059/" +, url = "https://arXiv.org/abs/cs/0110059/" , comments = "Answers a question posed in bls-wcnfp-99" , update = "01.11 orourke" } @@ -49693,7 +49680,7 @@ library." , author = "E. Durand" , title = "Quasitiler 3.0 documentation" , year = 1994 -, url = "http//www.geom.umn.edu/apps/quasitiler/about.html" +, url = "http://www.geom.uiuc.edu/apps/quasitiler/about.html" , update = "97.11 bibrelex" } @@ -50766,7 +50753,7 @@ library." , volume = 6 , year = 1996 , pages = "145--156" -, url = "http://www.cs.brown.edu/cgc/papers/elt-adhg-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/elt-adhg-96.ps.gz" , succeeds = "elt-adhg-92" , update = "97.03 tamassia, 96.09 devillers" } @@ -54611,7 +54598,7 @@ algebraic geometry." @misc{e-ga- , author = "David Eppstein" , title = "Geometry in Action" -, url = "http://www.ics.uci.edu/~eppstein/geom.html" +, url = "https://www.ics.uci.edu/~eppstein/geom.html" , update = "97.03 tamassia" } @@ -55925,7 +55912,7 @@ between all the vertices of the polygons." , site = "Pacific Grove, CA" , year = 1994 , pages = "498--502" -, url = "http://ptolemy.eecs.berkeley.edu" +, url = "https://ptolemy.berkeley.edu/" , update = "98.03 bibrelex" } @@ -59800,7 +59787,7 @@ reflection formula and derives a surprising relationship between them." , month = jun , year = 1991 , pages = "334--341" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "arrangements, implementing algorithms, robust geometric computation" , cites = "cgl-pgd-83, eg-tsa-86, eos-calha-86, f-smpst-90, gt-tgt-87, g-as-72, gss-egbra-89, gs-pmgsc-85, h-pargc-89, hhk-tirgc-88, hk-prga-89, k-rmrs-89, lm-cschu-90, m-dpggt-89, m-vigau-88p, m-vigau-88a, m-utcpc-89, si-gafpa-88, si-cvd10-89, ZZZ" , update = "98.11 bibrelex, 97.11 bibrelex, 97.03 daniels" @@ -63930,7 +63917,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , volume = 6 , year = 1996 , pages = "333--356" -, url = "http://www.cs.brown.edu/cgc/papers/ggt-aoutd-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/ggt-aoutd-96.ps.gz" , keywords = "graph drawing, tree, planar, upward" , succeeds = "ggt-aeutd-93" , update = "97.03 devillers+tamassia" @@ -63956,7 +63943,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , publisher = "Springer-Verlag" , year = 1997 , pages = "201--216" -, url = "http://www.cs.brown.edu/cgc/papers/gt-nmcfa-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/gt-nmcfa-97.ps.gz" , keywords = "graph drawing, planar, orthogonal, grid" , update = "99.03 vismara, 97.03 tamassia, 96.09 tamassia" } @@ -63971,7 +63958,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , publisher = "Springer-Verlag" , year = 1994 , pages = "12--21" -, url = "http://www.cs.brown.edu/cgc/papers/gt-agd-94.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/gt-agd-94.ps.gz" , keywords = "graph drawing" , update = "97.11 bibrelex, 97.03 tamassia, 94.05 tamassia" } @@ -63991,8 +63978,8 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , type = "Manuscript" , institution = "Dept. of Computer Sci., Brown University" , year = 1996 -, note = "Available at \url{http://www.cs.brown.edu/people/rt/fadiva/giotto3d.html}" -, url = "http://www.cs.brown.edu/people/rt/fadiva/giotto3d.html" +, note = "Available at \url{https://www.cs.brown.edu/people/rt/fadiva/giotto3d.html}" +, url = "https://www.cs.brown.edu/people/rt/fadiva/giotto3d.html" , keywords = "graph drawing, 3D" , update = "97.03 tamassia, 96.09 tamassia" } @@ -64015,7 +64002,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , series = "Lecture Notes Comput. Sci." , publisher = "Springer-Verlag" , year = 1997 -, url = "http://www.cs.brown.edu/cgc/papers/gt-gsvhs-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/gt-gsvhs-97.ps.gz" , keywords = "graph drawing, upward, 3D, CGC, Brown" , update = "99.11 bibrelex, 97.03 tamassia" } @@ -64059,7 +64046,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , publisher = "Springer-Verlag" , year = 1995 , pages = "286--297" -, url = "http://www.cs.brown.edu/cgc/papers/gt-ccurp-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/gt-ccurp-95.ps.gz" , keywords = "graph drawing, planar, upward, rectilinear, orthogonal, NP-hardness" , update = "97.03 tamassia, 95.01 tamassia" } @@ -64085,7 +64072,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , volume = 12 , year = 1995 , pages = "109--133" -, url = "http://www.cs.brown.edu/cgc/papers/gt-upt-95.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/gt-upt-95.ps.gz" , keywords = "graph drawing, planar, upward, survey" , update = "97.03 tamassia, 96.09 tamassia, 95.09 tamassia, 95.05 tamassia" } @@ -64100,7 +64087,7 @@ Complete thesis available only on microfilm from Harvard, since Harvard did not , publisher = "Springer-Verlag" , year = 1996 , pages = "12--26" -, url = "http://www.cs.brown.edu/cgc/papers/gtv-dc-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/gtv-dc-96.ps.gz" , keywords = "graph drawing, 3D, straight-line" , update = "97.03 smid+tamassia" } @@ -68869,7 +68856,7 @@ generated in O(dn2d+1) time. We present a simple proof that the (d - , title = "{GMP}, The {GNU} Multiple Precision Arithmetic Library" , edition = "2.0.2" , year = 1996 -, url = "http://gmplib.org/" +, url = "https://gmplib.org/" , update = "02.03 devillers, 00.03 devillers" } @@ -70364,7 +70351,7 @@ cos, etc." , number = "Report B 96-11" , institution = "Institut {f\"ur} Informatik, Freie Universit{\"a}t Berlin" , year = 1996 -, url = "http://www.inf.fu-berlin.de/pub/reports/tr-b-96-11.ps.gz, http://www.inf.fu-berlin.de/inst/pubs/tr-b-96-11.abstract.html" +, url = "https://www.inf.fu-berlin.de/pub/reports/tr-b-96-11.ps.gz, https://www.inf.fu-berlin.de/inst/pubs/tr-b-96-11.abstract.html" , update = "98.03 mitchell" } @@ -73908,7 +73895,7 @@ useful for geometric modeling or for ray tracing." , title = "Algebraic Topology" , publisher = "Cambridge University Press" , year = 2001 -, url = "http://www.math.cornell.edu/~hatcher/" +, url = "https://www.math.cornell.edu/~hatcher/" , update = "01.11 orourke" } @@ -76153,7 +76140,7 @@ processing. Contains C code." , type = "Manuscript" , institution = "Universit{\"a}t Passau, Innstra\ss e 33, 94030 Passau, Germany" , year = 1996 -, url = "http://www.uni-passau.de/~himsolt/Graphlet/GML" +, url = "https://www.uni-passau.de/~himsolt/Graphlet/GML" , keywords = "graph drawing" , update = "96.09 tamassia" } @@ -84058,7 +84045,7 @@ fitting method." , number = 1 , year = 1997 , pages = "1--25" -, url = "http://www.cs.brown.edu/publications/jgaa/accepted/97/JuengerMutzel97.1.1.ps.gz" +, url = "https://www.cs.brown.edu/publications/jgaa/accepted/97/JuengerMutzel97.1.1.ps.gz" , keywords = "graph drawing, straight-line, planarization, crossings, experiments" , succeeds = "jm-eha2s-96" , update = "99.07 vismara, 98.07 tamassia+vismara" @@ -84900,7 +84887,7 @@ fitting method." , month = aug , year = 2000 , pages = "139--146" -, url = "http://cs.smith.edu/~orourke/ShortestPaths/" +, url = "https://www.science.smith.edu/~jorourke/ShortestPaths//" , keywords = "shortest paths" , update = "02.03 icking, 01.11 orourke, 01.04 icking+orourke, 00.11 smid, 00.07 orourke" } @@ -85234,7 +85221,7 @@ fitting method." , number = 2 , year = 1997 , pages = "81--88" -, url = "http://www.cs.brown.edu/cgc/papers/kltt-arvrt-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/kltt-arvrt-97.ps.gz" , keywords = "graph drawing, visibility, tree, CGC, Brown" , update = "98.11 tamassia, 97.03 tamassia" } @@ -86661,7 +86648,6 @@ the R*-tree." , number = 2874 , institution = "INRIA" , year = 1996 -, url = "http://www.inria.fr/rrrt/rr-2874.html" , update = "02.03 devillers, 97.11 bibrelex" , abstract = "A set of objects is $k$-pierceable if there exists a set of $k$ poin ts such that each object is pierced by (contains) at least one of these points. Finding the smallest integer $k$ such that a set is $k$-pierceable is NP-complete. In this technical report, we present efficient algorithms for findi ng a piercing set (i.e., a set of $k$ points as above) for several classes of convex objects and small values of $k$. In some of the cases, our algorithms imply known as well as new Helly-type theorems, thus adding to previous results of Danzer and Gr{\"u}nbaum who studied the case of axis-parallel boxes. The problems studied here are related to the collection of optimization problems in which one seeks the smallest scaling factor of a centrally symmetric convex object $K$, so that a set of points can be covered by $k$ congruent homothets of $K$." } @@ -91777,7 +91763,7 @@ some 2 curves cross exponentially many times." , nickname = "WAFR '98" , year = 1998 , pages = "to appear" -, url = "http://www.cs.unc.edu/~dm/collision.html" +, url = "https://www.cs.unc.edu/~dm/collision.html" , update = "98.11 bibrelex, 98.07 bibrelex, 98.03 mitchell" } @@ -95357,7 +95343,7 @@ addition to their own purposes before conducting the conversion." , number = 5 , year = 1996 , pages = "253--260" -, url = "http://www.cs.brown.edu/cgc/papers/ll-domwt-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/ll-domwt-96.ps.gz" , keywords = "graph drawing, planar, minimum weight triangulation" , update = "98.11 tamassia, 97.03 tamassia, 96.01 liotta" } @@ -95372,7 +95358,7 @@ addition to their own purposes before conducting the conversion." , publisher = "Springer-Verlag" , year = 1996 , pages = "373--384" -, url = "http://www.cs.brown.edu/cgc/papers/ll-hdomw-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/ll-hdomw-96.ps.gz" , keywords = "graph drawing" , update = "97.03 tamassia, 96.09 tamassia" } @@ -95399,7 +95385,7 @@ addition to their own purposes before conducting the conversion." , publisher = "Springer-Verlag" , year = 1997 , pages = "286--302" -, url = "http://www.cs.brown.edu/cgc/papers/ll-pdog-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/ll-pdog-97.ps.gz" , keywords = "graph drawing, proximity, CGC, Brown" , update = "98.07 tamassia, 97.03 tamassia" } @@ -96347,7 +96333,7 @@ addition to their own purposes before conducting the conversion." , booktitle = "Proc. 9th Annu. ACM Sympos. Comput. Geom." , year = 1993 , pages = "153--162" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "optimization, CAD, CAM, packing, layout, linear programming, motion planning, separation, configuration space, Minkowski sum" , cites = "aks-oa1dt-90, b-amdsn-89, bb-msbdc-88, c-crmp-87, dhks-isccd-90, grs-kfcg-83, hss-cmpmi-84, kos-cmsrp-91i, l-sisri-84, m-hphc-90, mdl-amm-91, mdl-pcnpc-92, mw-cdrca-88, mfs-2dcmc-87, p-ccmsp-87, pb-cmfm-88, sss-tdczr-86, sp-cppca-92, w-otdcs-85, ZZZ" , update = "98.07 bibrelex, 98.03 bibrelex, 97.03 daniels, 93.09 rote" @@ -96360,7 +96346,7 @@ addition to their own purposes before conducting the conversion." , volume = 84 , year = 1995 , pages = "539--561" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "layout, packing, placement, linear programming, motion planning, Minkowski sum, configuration space" , update = "97.03 daniels" } @@ -96371,7 +96357,7 @@ addition to their own purposes before conducting the conversion." , booktitle = "Proc. 6th Annu. ACM Sympos. Comput. Geom." , year = 1990 , pages = "235--243" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , precedes = "lm-cschu-92" , cites = "f-smpst-89, g-eadch-72, gss-egbra-89, m-cacau-89, m-dpggt-89, m-vigau-88p, si-cvd10-89, ZZZ" @@ -96385,7 +96371,7 @@ addition to their own purposes before conducting the conversion." , volume = 8 , year = 1992 , pages = "345--364" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , succeeds = "lm-cschu-90" , update = "97.03 daniels" @@ -96398,7 +96384,7 @@ addition to their own purposes before conducting the conversion." , site = "Waterloo, Canada" , year = 1993 , pages = "7--11" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "packing, layout, motion planning, PSPACE" , cites = "cosw-cds-84, hss-cmpmi-84, lm-cancp-93, ZZZ" , update = "98.11 bibrelex, 98.03 mitchell, 97.03 daniels, 93.09 milone+mitchell" @@ -97363,7 +97349,7 @@ rectilinear polygon." , publisher = "Springer-Verlag" , year = 1997 , pages = "135--146" -, url = "http://www.cs.brown.edu/cgc/papers/lttv-argd-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/lttv-argd-97.ps.gz" , keywords = "graph drawing, proximity, CGC, Brown" , update = "98.07 tamassia, 97.03 tamassia" } @@ -104690,7 +104676,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 5th Annu. ACM Sympos. Comput. Geom." , year = 1989 , pages = "197--207" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , cites = "acm-aacad-88, acm-cad1b-84, acm-cad2a-84, c-qercf-75, cr-tlcra-88, em-sstcd-87, gy-frcg-86, hhk-tirgc-88, hhk-rsops-87, h-pargc-88, k-rmrs-89, kln-edtur-89, m-vigau-88a, m-vigau-88t, otu-nsga-87, r-paff-80, gss-egbra-89, ss-pmp2g-83, ss-ccsm-85, ss-pponp-88, s-aefsm-87, t-dmeag-51, y-gctsp-88, ZZZ" , update = "98.03 bibrelex, 97.03 daniels" @@ -104702,7 +104688,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 30th Annu. IEEE Sympos. Found. Comput. Sci." , year = 1989 , pages = "500--505" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , update = "98.03 agarwal, 97.03 daniels" } @@ -104713,7 +104699,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 7th Canad. Conf. Comput. Geom." , year = 1995 , pages = "79--84" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "computer graphics, simulation, physically-based modeling, linear programming, Minkowski sum, configuration space" , update = "97.03 daniels, 95.09 jones" } @@ -104725,7 +104711,7 @@ used in many computational geometry algorithms. Contains C++ code." , year = 1996 , pages = "129--136" , note = "Proc. SIGGRAPH '96" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "computer graphics, animation, physically-based modeling, linear programming, Minkowski sum, configuration space" , update = "97.03 daniels" } @@ -104737,7 +104723,7 @@ used in many computational geometry algorithms. Contains C++ code." , site = "Waterloo, Canada" , year = 1993 , pages = "473--478" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , cites = "ck-acp-70, b-tends-67, cs-arscg-89, e-acg-87, f-smpst-90, f-savd-87, fm-nsala-91, ghms-apsml-91, hhk-tirgc-88, iss-nriac-92, l-knnvd-82, ld-gvdp-81, lm-cschu-90, m-vigau-88a, m-cacau-89, ms-saps-92, sh-cpp-75, si-cvd10-89, ls-ippvd-87, ls-pptmc-87, m-dpggt-89, ZZZ" , update = "98.11 bibrelex, 97.03 daniels, 93.09 milone+mitchell" @@ -104750,7 +104736,7 @@ used in many computational geometry algorithms. Contains C++ code." , volume = 25 , number = 9 , year = 1993 -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "algorithms, polygons, geometric modeling" , update = "98.03 agarwal, 97.03 daniels, 96.05 pascucci" } @@ -104771,7 +104757,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 2nd Canad. Conf. Comput. Geom." , year = 1990 , pages = "40--45" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation, geometric rounding" , cites = "ZZZ" , update = "98.07 bibrelex, 97.03 daniels" @@ -104783,7 +104769,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Abstracts 1st Canad. Conf. Comput. Geom." , year = 1989 , pages = 12 -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation, geometric rounding" , update = "97.03 daniels" } @@ -104794,7 +104780,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 28th Annu. ACM Sympos. Theory Comput." , year = 1996 , pages = "109--118" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "layout, packing, placement, nesting, concave, polygons, Minkowski sum, configuration space" , update = "97.03 daniels" } @@ -104857,7 +104843,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 3rd Canad. Conf. Comput. Geom." , year = 1991 , pages = "243--246" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "layout, nesting, placement, optimization" , update = "97.03 daniels" } @@ -104868,7 +104854,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 4th Canad. Conf. Comput. Geom." , year = 1992 , pages = "236--243" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "concave, polygons, layout, nesting, packing, optimization, Minkowski sum, configuration space" , cites = "dhks-isccd-90, g-ctfsr-86, grs-kfcg-83, kos-cmsrp-91i, ml-sipat-91, mdl-amm-91, s-iamm-82, tw-cmm-73, nh-aplpg-84, s-iamm-88, ZZZ" , update = "98.07 bibrelex, 97.03 daniels" @@ -104881,7 +104867,7 @@ used in many computational geometry algorithms. Contains C++ code." , site = "Waterloo, Canada" , year = 1993 , pages = "485--490" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "geometric modeling, quaternion arithmetic, basis reduction, integer programming, exact arithmetic" , precedes = "mm-roaom-97" , cites = "cdr-rrmrg-92, c-sede-92, crss-igbra-91, e-sap-80, fw-eeacg-92, h-eq-69, kln-edtur-89, mn-fccrp-90a, m-rfldd-90, r-srsrf-77, lll-fprc-82, l-atngc-86, ls-gbra-92, m-rflp-89, s-qrm-78" @@ -104894,7 +104880,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 6th Annu. ACM Sympos. Comput. Geom." , year = 1990 , pages = "244--252" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , precedes = "mn-fccrp-90a" , cites = "gj-cigtn-79, gps-crotr-89, h-gsm-89, m-rflp-89, mn-fccrp-90a, m-utcpc-89, s-fprgo-89, tt-pgelt-89, ZZZ" @@ -104910,7 +104896,7 @@ used in many computational geometry algorithms. Contains C++ code." , month = sep , year = 1990 , pages = "753--769" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , succeeds = "mn-fccrp-90i" , update = "98.11 bibrelex, 97.03 daniels" @@ -104943,7 +104929,7 @@ used in many computational geometry algorithms. Contains C++ code." , booktitle = "Proc. 7th Canad. Conf. Comput. Geom." , year = 1995 , pages = "55--60" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation, shortest-path rounding, nonuniform grids, geometric modeling, geometric rounding" , update = "97.03 daniels, 95.09 jones" } @@ -104989,7 +104975,7 @@ used in many computational geometry algorithms. Contains C++ code." , volume = 37 , year = 1988 , pages = "377--401" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "robust geometric computation" , succeeds = "m-vigau-88p, m-vigau-88t" , update = "98.11 bibrelex, 97.03 daniels, 95.01 devillers" @@ -105010,7 +104996,7 @@ used in many computational geometry algorithms. Contains C++ code." , volume = 7 , year = 1997 , pages = "25--35" -, url = "http://www.cs.miami.edu/~vjm/papers.html" +, url = "https://www.cs.miami.edu/home/vjm/papers.html" , keywords = "geometric modeling, quaternion arithmetic, basis reduction, integer programming, exact arithmetic" , succeeds = "mm-roaom-93" , update = "97.03 daniels" @@ -109344,11 +109330,11 @@ problems in computational geometry is presented." , update = "96.01 held+mitchell" } -@article{nan2017polyfit, - title = {PolyFit: Polygonal Surface Reconstruction from Point Clouds}, - author = {Nan, Liangliang and Wonka, Peter}, - journal = {ICCV}, - year = {2017} +@article{nan2017polyfit, + title = {PolyFit: Polygonal Surface Reconstruction from Point Clouds}, + author = {Nan, Liangliang and Wonka, Peter}, + journal = {ICCV}, + year = {2017} } @article{nhl-merp-84 @@ -110721,7 +110707,6 @@ envelope of line segments." , number = 1 , year = 1998 , pages = "39--66" -, url = "http://www.inria.fr/RRRT/RR-2575" , succeeds = "ny-oscha-94" , update = "99.11 bibrelex, 99.07 devillers, 98.07 devillers" , abstract = "A set of planar objects is said to be of type $m$ if the @@ -111527,7 +111512,6 @@ encapsulated PostScript" , address = "France" , year = 1998 , note = "TU-0606" -, url = "http://www.inria.fr/RRRT/TU-0606" , keywords = "doctoral thesis" , update = "00.03 devillers" } @@ -113167,7 +113151,7 @@ small) triangulation of a convex polyhedron is NP-complete. Their 3SAT-reduction , edition = "2nd" , publisher = "Cambridge University Press" , year = 1998 -, url = "http://cs.smith.edu/~orourke/books/compgeom.html" +, url = "https://www.science.smith.edu/~jorourke/books/compgeom.html" , comments = "Printed 28 Sep 1998" , update = "01.11 orourke, 99.11 bibrelex, 98.11 orourke" , annote = "Textbook" @@ -113362,8 +113346,8 @@ small) triangulation of a convex polyhedron is NP-complete. Their 3SAT-reduction , month = jun , year = 2000 , note = "LANL arXiv cs.CG/0006035 v3, - \url{http://cs.smith.edu/~orourke/papers.html}" -, url = "http://cs.smith.edu/~orourke/papers.html" + \url{https://www.science.smith.edu/~jorourke/papers.php}" +, url = "https://www.science.smith.edu/~jorourke/papers.php" , archive = "LANL arXiv cs.CG/0006035 v3" , keywords = "polygonal chains, polytopes, polyhedra" , cites = "c-cses-89, s-usedkkk-21" @@ -117683,7 +117667,6 @@ both for rendering and for modeling. Contains C code." , address = "France" , year = 1999 , note = "TU-0619" -, url = "http://www.inria.fr/rrrt/tu-0619.html" , keywords = "doctoral thesis" , update = "02.03 devillers, 00.03 devillers" } @@ -128644,7 +128627,7 @@ Contains C code." , type = "Technical {Report}" , institution = "Courant Institute, New York University" , year = 1996 -, url = "http://cs.nyu.edu" +, url = "https://cs.nyu.edu/" , update = "97.11 bibrelex" } @@ -136211,7 +136194,7 @@ Contains C code." , number = 9 , year = 1990 , pages = "27--39" -, url = "http://www.cc.gatech.edu/gvu/softviz/algoanim/xtango.html" +, url = "https://www.cc.gatech.edu/gvu/ii/softvis/algoanim/xtango.html" , update = "96.01 tamassia" } @@ -139116,7 +139099,7 @@ code." , number = 1 , year = 1996 , pages = "23--26" -, url = "http://www.cs.brown.edu/cgc/papers/t-ds-96.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/t-ds-96.ps.gz" , keywords = "data structures, survey" , update = "97.03 tamassia" } @@ -139145,7 +139128,7 @@ code." @misc{t-gd- , author = "Roberto Tamassia" , title = "Graph Drawing" -, url = "http://www.cs.brown.edu/people/rt/gd.html" +, url = "http://graphdrawing.org/index.html" , update = "98.07 tamassia" } @@ -139159,7 +139142,7 @@ code." , address = "Boca Raton, FL" , year = 1997 , pages = "815--832" -, url = "http://www.cs.brown.edu/cgc/papers/t-gd-97.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/t-gd-97.ps.gz" , keywords = "graph drawing, survey" , update = "97.11 orourke, 97.07 orourke, 97.03 tamassia" } @@ -139254,7 +139237,7 @@ code." , publisher = "CRC Press" , year = 1997 , pages = "86--110" -, url = "http://www.cs.brown.edu/cgc/papers/tc-ds-.ps.gz" +, url = "https://www.cs.brown.edu/cgc/papers/tc-ds-.ps.gz" , keywords = "data structures, survey" , update = "97.03 tamassia" } @@ -139289,7 +139272,7 @@ code." , number = 4 , year = 1996 , pages = "591--606" -, url = "http://www.cs.brown.edu/people/rt/sdcr/report.html" +, url = "https://www.cs.brown.edu/people/rt/sdcr/report.html" , update = "98.07 tamassia+vismara, 97.03 tamassia" , annote = "short form of taacddfdhopsstvw-sdcg-96" } @@ -141035,7 +141018,7 @@ code." , title = "Hexahedral decomposition of polyhedra" , month = oct , year = 1993 -, url = "http://www.ics.uci.edu/~eppstein/gina/Thurston-hexahedra" +, url = "https://www.ics.uci.edu/~eppstein/gina/Thurston-hexahedra" , update = "97.11 bibrelex" } @@ -144105,7 +144088,7 @@ of geometric optics." @misc{v-qfemg-95 , author = "S. Vavasis" , title = "QMG: a finite element mesh generation package" -, url = "http://www.cs.cornell.edu/Info/People/vavasis/qmg-home.html" +, url = "https://www.cs.cornell.edu/info/people/vavasis/qmg-home.html" , update = "97.11 bibrelex" } @@ -151845,7 +151828,7 @@ amplification and suppression of local contrast. Contains C code." , keywords = {Computer Science - Computational Geometry, Computer Science - Data Structures and Algorithms} , year = 2012 , month = may -, adsurl = {http://adsabs.harvard.edu/abs/2012arXiv1205.5434H} +, adsurl = {https://ui.adsabs.harvard.edu/abs/2012arXiv1205.5434H/abstract} , adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @@ -152040,7 +152023,7 @@ pages = {179--189} Booktitle = {24rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA)}, Year = {2013}, Pages = {1646--1655}, - Url = {http://jeffe.cs.illinois.edu/pubs/pdf/dehn.pdf} + Url = {https://jeffe.cs.illinois.edu/pubs/pdf/dehn.pdf} } @InProceedings{lr-hts-12, @@ -152059,7 +152042,7 @@ pages = {179--189} Volume = {45}, Pages = {215--224}, Year = {2012}, - Url = {http://monge.univ-mlv.fr/~colinde/pub/09edgewidth.pdf} + Url = {https://monge.univ-mlv.fr/~colinde/pub/09edgewidth.pdf} @inproceedings{tang2009interactive, title={Interactive Hausdorff distance computation for general polygonal models}, diff --git a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in index 7d6685977cf..3d749fa16b6 100644 --- a/Documentation/doc/resources/1.8.13/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.13/BaseDoxyfile.in @@ -1,7 +1,7 @@ # Doxyfile 1.8.13 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# doxygen (https://www.doxygen.nl/) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. @@ -20,7 +20,7 @@ # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv/ # for the list of possible encodings. # The default value is: UTF-8. @@ -409,7 +409,7 @@ EXTENSION_MAPPING = txt=C++ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -451,7 +451,7 @@ BUILTIN_STL_SUPPORT = YES CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# https://riverbankcomputing.com/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. @@ -834,7 +834,7 @@ LAYOUT_FILE = ${CGAL_DOC_RESOURCE_DIR}/DoxygenLayoutPackage.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. @@ -922,7 +922,7 @@ INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of # possible encodings. # The default value is: UTF-8. @@ -1138,7 +1138,7 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: @@ -1283,7 +1283,7 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. @@ -1342,7 +1342,7 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# environment (see: https://developer.apple.com/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in @@ -1387,7 +1387,7 @@ DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# (see: https://www.microsoft.com/en-us/download/default.aspx) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output @@ -1463,7 +1463,7 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1471,8 +1471,7 @@ QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). +# Folders (see: https//doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. @@ -1480,23 +1479,21 @@ QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: https//doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). +# Filters (see: https//doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# https//doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = @@ -1601,7 +1598,7 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering +# https://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path @@ -1613,7 +1610,7 @@ USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# https://docs.mathjax.org/en/latest/output/index.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1628,7 +1625,7 @@ MATHJAX_FORMAT = HTML-CSS # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. +# MathJax from https://www.mathjax.org before deployment. # The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1644,7 +1641,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath \ # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: https://docs.mathjax.org/en/latest/output/index.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -1691,7 +1688,7 @@ SERVER_BASED_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). +# Xapian (see: https://xapian.org/). # # See the section "External Indexing and Searching" for details. # The default value is: NO. @@ -1704,7 +1701,7 @@ EXTERNAL_SEARCH = NO # # Doxygen ships with an example indexer (doxyindexer) and search engine # (doxysearch.cgi) which are based on the open source search engine library -# Xapian (see: http://xapian.org/). See the section "External Indexing and +# Xapian (see: https://xapian.org/). See the section "External Indexing and # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. @@ -1891,7 +1888,7 @@ LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. See -# http://en.wikipedia.org/wiki/BibTeX and \cite for more info. +# https://en.wikipedia.org/wiki/BibTeX and \cite for more info. # The default value is: plain. # This tag requires that the tag GENERATE_LATEX is set to YES. @@ -2074,7 +2071,7 @@ DOCBOOK_PROGRAMLISTING = NO #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sf.net) file that captures the +# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures the # structure of the code including all documentation. Note that this feature is # still experimental and incomplete at the moment. # The default value is: NO. @@ -2271,7 +2268,7 @@ CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the +# https://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. @@ -2293,7 +2290,7 @@ HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz (see: -# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO # The default value is: NO. @@ -2448,7 +2445,7 @@ DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: -# http://www.graphviz.org/)). +# https://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). diff --git a/Documentation/doc/resources/1.8.13/footer.html b/Documentation/doc/resources/1.8.13/footer.html index a1ef3c24ea8..9aab1a87eea 100644 --- a/Documentation/doc/resources/1.8.13/footer.html +++ b/Documentation/doc/resources/1.8.13/footer.html @@ -8,14 +8,14 @@ move the footer to the bottom of the page. -->
        $navpath
      diff --git a/Documentation/doc/resources/1.8.13/header.html b/Documentation/doc/resources/1.8.13/header.html index 8c8b86f5b9d..aaa5e95ea30 100644 --- a/Documentation/doc/resources/1.8.13/header.html +++ b/Documentation/doc/resources/1.8.13/header.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.8.13/header_package.html b/Documentation/doc/resources/1.8.13/header_package.html index 544fd3ced7f..9e6fe125d50 100644 --- a/Documentation/doc/resources/1.8.13/header_package.html +++ b/Documentation/doc/resources/1.8.13/header_package.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in index 44a6b9f72b3..1a59e5d2d97 100644 --- a/Documentation/doc/resources/1.8.14/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.14/BaseDoxyfile.in @@ -1,7 +1,7 @@ # Doxyfile 1.8.14 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# doxygen (https://www.doxygen.nl/) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. @@ -404,7 +404,7 @@ EXTENSION_MAPPING = txt=C++ # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. @@ -1333,7 +1333,7 @@ HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: https://developer.apple.com/tools/xcode/), introduced with +# environment (see: https://developer.apple.com/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in @@ -1601,7 +1601,7 @@ USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# https://docs.mathjax.org/en/latest/output/index.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1632,7 +1632,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath \ # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: https://docs.mathjax.org/en/latest/output/index.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -2062,7 +2062,7 @@ DOCBOOK_PROGRAMLISTING = NO #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures # the structure of the code including all documentation. Note that this feature # is still experimental and incomplete at the moment. # The default value is: NO. @@ -2266,7 +2266,7 @@ HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz (see: -# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO # The default value is: NO. @@ -2421,7 +2421,7 @@ DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: -# http://www.graphviz.org/)). +# https://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). diff --git a/Documentation/doc/resources/1.8.14/footer.html b/Documentation/doc/resources/1.8.14/footer.html index a1ef3c24ea8..379470c59e2 100644 --- a/Documentation/doc/resources/1.8.14/footer.html +++ b/Documentation/doc/resources/1.8.14/footer.html @@ -8,14 +8,14 @@ move the footer to the bottom of the page. -->
        $navpath
      diff --git a/Documentation/doc/resources/1.8.14/header.html b/Documentation/doc/resources/1.8.14/header.html index 8c8b86f5b9d..aaa5e95ea30 100644 --- a/Documentation/doc/resources/1.8.14/header.html +++ b/Documentation/doc/resources/1.8.14/header.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.8.14/header_package.html b/Documentation/doc/resources/1.8.14/header_package.html index 89f76a8a441..f429c63135d 100644 --- a/Documentation/doc/resources/1.8.14/header_package.html +++ b/Documentation/doc/resources/1.8.14/header_package.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.8.20/BaseDoxyfile.in b/Documentation/doc/resources/1.8.20/BaseDoxyfile.in index 7f258d33a4b..f950a6836db 100644 --- a/Documentation/doc/resources/1.8.20/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.20/BaseDoxyfile.in @@ -1,7 +1,7 @@ # Doxyfile 1.8.20 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# doxygen (https://www.doxygen.nl/) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. @@ -1683,7 +1683,7 @@ USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# https://docs.mathjax.org/en/latest/output/index.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1714,7 +1714,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath \ # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: https://docs.mathjax.org/en/latest/output/index.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -2146,7 +2146,7 @@ DOCBOOK_OUTPUT = docbook #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures # the structure of the code including all documentation. Note that this feature # is still experimental and incomplete at the moment. # The default value is: NO. @@ -2350,7 +2350,7 @@ HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz (see: -# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO # The default value is: NO. @@ -2505,7 +2505,7 @@ DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: -# http://www.graphviz.org/)). +# https://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). diff --git a/Documentation/doc/resources/1.8.20/footer.html b/Documentation/doc/resources/1.8.20/footer.html index cd9ad4553bc..28e5afe0f39 100644 --- a/Documentation/doc/resources/1.8.20/footer.html +++ b/Documentation/doc/resources/1.8.20/footer.html @@ -7,13 +7,13 @@ move the footer to the bottom of the page. --> diff --git a/Documentation/doc/resources/1.8.20/header.html b/Documentation/doc/resources/1.8.20/header.html index 50e4e4dcb49..c0530eec8bf 100644 --- a/Documentation/doc/resources/1.8.20/header.html +++ b/Documentation/doc/resources/1.8.20/header.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.8.20/header_package.html b/Documentation/doc/resources/1.8.20/header_package.html index 007d84e7b10..d2a1ed6051b 100644 --- a/Documentation/doc/resources/1.8.20/header_package.html +++ b/Documentation/doc/resources/1.8.20/header_package.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.8.4/BaseDoxyfile.in b/Documentation/doc/resources/1.8.4/BaseDoxyfile.in index 45d422384df..10f3050a8f3 100644 --- a/Documentation/doc/resources/1.8.4/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.8.4/BaseDoxyfile.in @@ -1,7 +1,7 @@ # Doxyfile 1.8.4 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# doxygen (https://www.doxygen.nl/) for a project. # # All text after a double hash (##) is considered a comment and is placed # in front of the TAG it is preceding . @@ -20,7 +20,7 @@ # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# https://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 @@ -409,7 +409,7 @@ EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. +# documentation. See https://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. @@ -754,7 +754,7 @@ LAYOUT_FILE = ${CGAL_DOC_RESOURCE_DIR}/DoxygenLayoutPackage.xml # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style +# https://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. Do not use # file names with spaces, bibtex cannot handle them. @@ -827,7 +827,7 @@ INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# into libc) for the transcoding. See https://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 @@ -1005,7 +1005,7 @@ REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# tagging system (see https://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO @@ -1110,7 +1110,7 @@ HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. +# see https://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. @@ -1251,25 +1251,25 @@ QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# https//doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see -# +# # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = @@ -1277,7 +1277,7 @@ QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. -# +# # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = @@ -1361,7 +1361,7 @@ FORMULA_FONTSIZE = 10 FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the +# (see https://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and @@ -1384,7 +1384,7 @@ MATHJAX_FORMAT = HTML-CSS # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local -# copy of MathJax from http://www.mathjax.org before deployment. +# copy of MathJax from https://www.mathjax.org before deployment. MATHJAX_RELPATH = ../../MathJax/ @@ -1560,7 +1560,7 @@ LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See -# http://en.wikipedia.org/wiki/BibTeX for more info. +# https://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain @@ -1850,7 +1850,7 @@ CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# https://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. diff --git a/Documentation/doc/resources/1.8.4/footer.html b/Documentation/doc/resources/1.8.4/footer.html index 8b23c63651f..5c8bc85e026 100644 --- a/Documentation/doc/resources/1.8.4/footer.html +++ b/Documentation/doc/resources/1.8.4/footer.html @@ -5,14 +5,14 @@
        $navpath
      diff --git a/Documentation/doc/resources/1.8.4/header.html b/Documentation/doc/resources/1.8.4/header.html index a98007ec2a5..8ffa7e46ea8 100644 --- a/Documentation/doc/resources/1.8.4/header.html +++ b/Documentation/doc/resources/1.8.4/header.html @@ -1,5 +1,5 @@ - + @@ -46,8 +46,8 @@ $mathjax onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> @@ -101,7 +101,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
      -
      diff --git a/Documentation/doc/resources/1.8.4/header_package.html b/Documentation/doc/resources/1.8.4/header_package.html index 4b3ae0e7cc2..e47f3e9a158 100644 --- a/Documentation/doc/resources/1.8.4/header_package.html +++ b/Documentation/doc/resources/1.8.4/header_package.html @@ -1,5 +1,5 @@ - + @@ -63,8 +63,8 @@ $mathjax onmouseout="return searchBox.OnSearchSelectHide()" alt=""/>
      @@ -116,7 +116,7 @@ var searchBox = new SearchBox("searchBox", "../Manual/search",false,'Search');
      -
      diff --git a/Documentation/doc/resources/1.9.3/BaseDoxyfile.in b/Documentation/doc/resources/1.9.3/BaseDoxyfile.in index d95cfc9dd5a..775ba2ce757 100644 --- a/Documentation/doc/resources/1.9.3/BaseDoxyfile.in +++ b/Documentation/doc/resources/1.9.3/BaseDoxyfile.in @@ -1,7 +1,7 @@ # Doxyfile 1.9.3 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. +# doxygen (https://www.doxygen.nl/) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. @@ -1688,7 +1688,7 @@ USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. +# https://docs.mathjax.org/en/latest/output/index.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. @@ -1719,7 +1719,7 @@ MATHJAX_EXTENSIONS = TeX/AMSmath \ # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# (see: https://docs.mathjax.org/en/latest/output/index.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. @@ -2151,7 +2151,7 @@ DOCBOOK_OUTPUT = docbook #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an -# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures +# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures # the structure of the code including all documentation. Note that this feature # is still experimental and incomplete at the moment. # The default value is: NO. @@ -2261,7 +2261,7 @@ PREDEFINED = DOXYGEN_RUNNING \ "CGAL_NP_TEMPLATE_PARAMETERS_2=NamedParameters2 = CGAL::parameters::Default_named_parameter" \ "CGAL_NP_CLASS_2=NamedParameters2" \ CGAL_DEPRECATED - + # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2347,7 +2347,7 @@ HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz (see: -# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent +# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent # Bell Labs. The other options in this section have no effect if this option is # set to NO # The default value is: NO. @@ -2507,7 +2507,7 @@ DIRECTORY_GRAPH = NO # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. For an explanation of the image formats see the section # output formats in the documentation of the dot tool (Graphviz (see: -# http://www.graphviz.org/)). +# https://www.graphviz.org/)). # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order # to make the SVG files visible in IE 9+ (other browsers do not have this # requirement). diff --git a/Documentation/doc/resources/1.9.3/footer.html b/Documentation/doc/resources/1.9.3/footer.html index cd9ad4553bc..28e5afe0f39 100644 --- a/Documentation/doc/resources/1.9.3/footer.html +++ b/Documentation/doc/resources/1.9.3/footer.html @@ -7,13 +7,13 @@ move the footer to the bottom of the page. --> diff --git a/Documentation/doc/resources/1.9.3/header.html b/Documentation/doc/resources/1.9.3/header.html index 50e4e4dcb49..c0530eec8bf 100644 --- a/Documentation/doc/resources/1.9.3/header.html +++ b/Documentation/doc/resources/1.9.3/header.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/resources/1.9.3/header_package.html b/Documentation/doc/resources/1.9.3/header_package.html index 007d84e7b10..d2a1ed6051b 100644 --- a/Documentation/doc/resources/1.9.3/header_package.html +++ b/Documentation/doc/resources/1.9.3/header_package.html @@ -1,6 +1,6 @@ - + diff --git a/Documentation/doc/scripts/generate_how_to_cite.py b/Documentation/doc/scripts/generate_how_to_cite.py index e1108d6a51f..470c71d4e45 100644 --- a/Documentation/doc/scripts/generate_how_to_cite.py +++ b/Documentation/doc/scripts/generate_how_to_cite.py @@ -46,7 +46,7 @@ software. If you want to cite the \cgal Library or project as a whole, please -- cite: \cgal, Computational Geometry Algorithms Library, https://www.cgal.org +- cite: \cgal, Computational Geometry Algorithms Library, https://www.cgal.org - use the first bibtex entry from the file how_to_cite_cgal.bib. ## Citing the User and Reference Manual ## @@ -65,7 +65,7 @@ If you want to refer to \cgal manual, please cite the appropriate The \cgal Project. \cgal User and Reference Manual. \cgal Editorial Board, ${CGAL_CREATED_VERSION_NUM} edition, ${CGAL_BUILD_YEAR4}. -[ bib | +[ bib | http ] @@ -80,7 +80,7 @@ result_txt_footer=r""" """ pre_html=r""" - + diff --git a/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index 44d15aa6d70..5402d7bc50f 100755 --- a/Documentation/doc/scripts/html_output_post_processing.py +++ b/Documentation/doc/scripts/html_output_post_processing.py @@ -55,7 +55,7 @@ def write_out_html(d, fn): f = codecs.open(fn, 'w', encoding='utf-8') # this is the normal doxygen doctype, which is thrown away by pyquery f.write('\n') - f.write('') + f.write('') if d.html() is not None: f.write(d.html()) f.write('\n') @@ -85,7 +85,7 @@ def clean_doc(): for fn in duplicate_files: os.remove(fn) -# from http://stackoverflow.com/a/1597755/105672 +# from https://stackoverflow.com/a/1597755/105672 def re_replace_in_file(pat, s_after, fname): # first, see if the pattern is even in the file. with codecs.open(fname, encoding='utf-8') as f: diff --git a/Filtered_kernel/TODO b/Filtered_kernel/TODO index 477746d7bce..7e1b5441ad9 100644 --- a/Filtered_kernel/TODO +++ b/Filtered_kernel/TODO @@ -140,7 +140,7 @@ except we could merge stuff with Olivier's Fixed ! So the good choice seems to be to have data stored in each predicate object, and having the kernel store a predicate object for each predicate. Then the orientation_2_object() simply returns a reference to it. - + Then it means algorithms should use one "global" object per predicate (e.g. one orientation object for a whole Triangulation). Except for cases where they actually want different contexts. diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h b/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h index ac57decb63e..e9428fd2917 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Angle_3.h @@ -21,7 +21,7 @@ #include #include -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf namespace CGAL { diff --git a/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h b/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h index 3b94f56663c..2b0ef97d7fc 100644 --- a/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h +++ b/Filtered_kernel/include/CGAL/Filtered_kernel/internal/Static_filters/Do_intersect_3.h @@ -26,7 +26,7 @@ #include -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf namespace CGAL { diff --git a/GraphicsView/doc/GraphicsView/fig_src/uml-design.graphml b/GraphicsView/doc/GraphicsView/fig_src/uml-design.graphml index b4d866c7279..39d1878397c 100644 --- a/GraphicsView/doc/GraphicsView/fig_src/uml-design.graphml +++ b/GraphicsView/doc/GraphicsView/fig_src/uml-design.graphml @@ -1,5 +1,5 @@ - + diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/about_CGAL.html b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/about_CGAL.html index 6b2b2a5d943..f2f0fb9318b 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/about_CGAL.html +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/resources/about_CGAL.html @@ -3,6 +3,6 @@

      Computational Geometry Algorithms Library

      CGAL provides efficient and reliable geometric algorithms in the form of a C++ library.

      -

      For more information visit www.cgal.org

      +

      For more information visit www.cgal.org

      diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index c0dca7da118..30e31329e62 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -3191,7 +3191,7 @@ Release date: October 2012 - Added more general script to create CMakeLists.txt files: `cgal_create_CMakeLists` - Availability tests for C++11 features are now performed with the - help of [Boost.Config](http://www.boost.org/libs/config). A Boost + help of [Boost.Config](https://www.boost.org/libs/config). A Boost version of 1.40.0 or higher is needed to use C++11 features. ### 2D Arrangement @@ -3683,7 +3683,7 @@ CGAL 3.7 offers the following improvements and new functionality : - Some demos now require a version of Qt4 >= 4.3. - CGAL\_PDB is no longer provided with CGAL. An alternative solution for people interested in reading PDB files is to use ESBTL - (http://esbtl.sourceforge.net/). + (https://esbtl.sourceforge.net/). - Fix issues of the CGAL wrappers around the CORE library, on 64 bits platforms. diff --git a/Installation/LICENSE.GPL b/Installation/LICENSE.GPL index 94a9ed024d3..ae0725d8014 100644 --- a/Installation/LICENSE.GPL +++ b/Installation/LICENSE.GPL @@ -1,7 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/Installation/LICENSE.LGPL b/Installation/LICENSE.LGPL index 65c5ca88a67..1cd6ad68146 100644 --- a/Installation/LICENSE.LGPL +++ b/Installation/LICENSE.LGPL @@ -1,7 +1,7 @@ GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. diff --git a/Installation/cmake/modules/FindTBB.cmake b/Installation/cmake/modules/FindTBB.cmake index 3cbea03d9b9..8b7aa08a92b 100644 --- a/Installation/cmake/modules/FindTBB.cmake +++ b/Installation/cmake/modules/FindTBB.cmake @@ -43,7 +43,7 @@ #------------------------------------------------------------------- # This file is part of the CMake build system for OGRE # (Object-oriented Graphics Rendering Engine) -# For the latest info, see http://www.ogre3d.org/ +# For the latest info, see https://www.ogre3d.org/ # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. diff --git a/Installation/doc_html/Manual/index.html b/Installation/doc_html/Manual/index.html index ce6b70c0d9a..446d46ff910 100644 --- a/Installation/doc_html/Manual/index.html +++ b/Installation/doc_html/Manual/index.html @@ -1,10 +1,10 @@ - + CGAL - Computational Geometry Algorithms Library - + diff --git a/Installation/doc_html/Manual/packages.html b/Installation/doc_html/Manual/packages.html index ce6b70c0d9a..446d46ff910 100644 --- a/Installation/doc_html/Manual/packages.html +++ b/Installation/doc_html/Manual/packages.html @@ -1,10 +1,10 @@ - + CGAL - Computational Geometry Algorithms Library - + diff --git a/Installation/doc_html/index.html b/Installation/doc_html/index.html index 24cd53e0c23..5638303fdc9 100644 --- a/Installation/doc_html/index.html +++ b/Installation/doc_html/index.html @@ -1,10 +1,10 @@ - + CGAL - Computational Geometry Algorithms Library - + @@ -19,7 +19,7 @@

      -The goal of the CGAL Open Source Project is to provide +The goal of the CGAL Open Source Project is to provide easy access to efficient and reliable geometric algorithms in the form of a C++ library.

      @@ -36,7 +36,7 @@ You can access the CGAL Online Manual from the @@ -46,7 +46,7 @@ You can access the CGAL Online Manual from the

      CGAL is distributed under a dual-license scheme. CGAL can be used together with Open Source software free of charge. Using CGAL in other contexts can be done by obtaining a commercial license from -GeometryFactory. +GeometryFactory. For more details see the License page.

      diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 7d7d435a302..c1e3605e862 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -52,7 +52,7 @@ #endif // CGAL_TEST_SUITE and NDEBUG // See [[Small features/Visual_Leak_Detector]] in CGAL developers wiki -// See also: http://vld.codeplex.com/ +// See also: https://kinddragon.github.io/vld/ #if defined(CGAL_ENABLE_VLD) # include #endif // CGAL_ENABLE_VLD @@ -296,7 +296,7 @@ using std::max; // Macros to detect features of clang. We define them for the other // compilers. -// See http://clang.llvm.org/docs/LanguageExtensions.html +// See https://clang.llvm.org/docs/LanguageExtensions.html // See also https://en.cppreference.com/w/cpp/experimental/feature_test #ifndef __has_feature #define __has_feature(x) 0 // Compatibility with non-clang compilers. @@ -473,7 +473,7 @@ namespace cpp11{ // The fallthrough attribute // See for clang: -// http://clang.llvm.org/docs/AttributeReference.html#statement-attributes +// https://clang.llvm.org/docs/AttributeReference.html#statement-attributes // See for gcc: // https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html #if __cplusplus > 201402L && __has_cpp_attribute(fallthrough) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h index 6062ba6085a..e5bea904e92 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Line_3_do_intersect.h @@ -14,7 +14,7 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_LINE_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_LINE_3_DO_INTERSECT_H -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf #include #include diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h index 36ca263a827..a96148099c5 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Ray_3_do_intersect.h @@ -14,7 +14,7 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_RAY_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_RAY_3_DO_INTERSECT_H -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf #include // for CGAL::internal::do_intersect_bbox_segment_aux diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h index 8a94ade50b7..fa1c0b8ba24 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Bbox_3_Segment_3_do_intersect.h @@ -22,7 +22,7 @@ #include -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf // This algorithm intersects the line with the x-, y-, and z-slabs of the // bounding box, and computes the interval [t1, t2], in the diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h index e467d7ea327..e389f17136f 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Ray_3_do_intersect.h @@ -20,7 +20,7 @@ #include // for CGAL::internal::do_intersect_bbox_segment_aux -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf namespace CGAL { namespace Intersections { diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h index 3c42487730f..5a961c3d5e2 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Iso_cuboid_3_Segment_3_do_intersect.h @@ -14,7 +14,7 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_ISO_CUBOID_3_SEGMENT_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_ISO_CUBOID_3_SEGMENT_3_DO_INTERSECT_H -// inspired from http://cag.csail.mit.edu/~amy/papers/box-jgt.pdf +// inspired from https://people.csail.mit.edu/amy/papers/box-jgt.pdf #include // for CGAL::internal::do_intersect_bbox_segment_aux diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_3/cmake/FindGoogleTest.cmake b/Linear_cell_complex/benchmark/Linear_cell_complex_3/cmake/FindGoogleTest.cmake index 37bd9a812d6..5e86a4dd4cf 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/cmake/FindGoogleTest.cmake +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/cmake/FindGoogleTest.cmake @@ -13,7 +13,7 @@ # use this file except in compliance with the License. You may obtain a copy # of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT diff --git a/Linear_cell_complex/benchmark/README.TXT b/Linear_cell_complex/benchmark/README.TXT index a721960047d..588995c5edb 100644 --- a/Linear_cell_complex/benchmark/README.TXT +++ b/Linear_cell_complex/benchmark/README.TXT @@ -18,9 +18,9 @@ INSTALLATION: 1) Install all the following libraries: CGAL: https://www.cgal.org/ -CGoGN: http://cgogn.u-strasbg.fr/ -OpenMesh: http://www.openmesh.org/ -OpenVolumeMesh: http://www.openvolumemesh.org/ +CGoGN: https://cgogn.github.io/ +OpenMesh: https://www.openmesh.org/ +OpenVolumeMesh: https://www.openvolumemesh.org/ 2) create links (or copy directory): * in the 2D directory: @@ -41,7 +41,7 @@ CGAL_BUILD_DIR being the build directory of the CGAL library. * In 2D, the programs take off files as input. * In 3D, lcc and cgogn take tetmesh and OpenVolumeMesh takes ovm. -You can create a tetmesh file using tetgen programm with an off file as input (http://tetgen.berlios.de/) with option -g to generate XXX.mesh file. Rename this file into XXX.tetmesh. Modify the file to keep only the two following sections: +You can create a tetmesh file using tetgen programm with an off file as input (https://www.berlios.de/software/tetgen/) with option -g to generate XXX.mesh file. Rename this file into XXX.tetmesh. Modify the file to keep only the two following sections: ********************** Vertices diff --git a/Maintenance/deb/sid/debian/README.Debian b/Maintenance/deb/sid/debian/README.Debian index 4be997664d7..e1056ac3ab7 100644 --- a/Maintenance/deb/sid/debian/README.Debian +++ b/Maintenance/deb/sid/debian/README.Debian @@ -44,7 +44,7 @@ and pass the option -DQGLVIEWER_INCLUDE_DIR=/some/dir -to cmake. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more +to cmake. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more information. -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 diff --git a/Maintenance/deb/sid/debian/copyright b/Maintenance/deb/sid/debian/copyright index ecc6058b7dc..6390c1a2874 100644 --- a/Maintenance/deb/sid/debian/copyright +++ b/Maintenance/deb/sid/debian/copyright @@ -318,7 +318,7 @@ src/CGALCore and include/CGAL/CORE. Copyright (c) 1995-2004 Exact Computation Project All rights reserved. - This file is part of CORE (http://cs.nyu.edu/exact/core/). + This file is part of CORE (https://cs.nyu.edu/exact/core/). You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/Maintenance/deb/sid/debian/rules b/Maintenance/deb/sid/debian/rules index 4e3de31d8e9..a3533b8b2cb 100755 --- a/Maintenance/deb/sid/debian/rules +++ b/Maintenance/deb/sid/debian/rules @@ -2,7 +2,7 @@ # export DH_VERBOSE=1 -# See http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake +# See https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake CFLAGS := $(CFLAGS) $(CPPFLAGS) CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS) @@ -26,11 +26,11 @@ override_dh_auto_configure: cd shared && QTDIR= cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE + -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE mkdir -p shared/demo/CGAL_ipelets cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=$(CURDIR)/shared + -DCGAL_DIR=$(CURDIR)/shared override_dh_auto_build: $(MAKE) -C static diff --git a/Maintenance/deb/squeeze/debian/README.Debian b/Maintenance/deb/squeeze/debian/README.Debian index 4be997664d7..e1056ac3ab7 100644 --- a/Maintenance/deb/squeeze/debian/README.Debian +++ b/Maintenance/deb/squeeze/debian/README.Debian @@ -44,7 +44,7 @@ and pass the option -DQGLVIEWER_INCLUDE_DIR=/some/dir -to cmake. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more +to cmake. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more information. -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 diff --git a/Maintenance/deb/squeeze/debian/copyright b/Maintenance/deb/squeeze/debian/copyright index ecc6058b7dc..6390c1a2874 100644 --- a/Maintenance/deb/squeeze/debian/copyright +++ b/Maintenance/deb/squeeze/debian/copyright @@ -318,7 +318,7 @@ src/CGALCore and include/CGAL/CORE. Copyright (c) 1995-2004 Exact Computation Project All rights reserved. - This file is part of CORE (http://cs.nyu.edu/exact/core/). + This file is part of CORE (https://cs.nyu.edu/exact/core/). You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/Maintenance/deb/squeeze/debian/rules b/Maintenance/deb/squeeze/debian/rules index 4e3de31d8e9..a3533b8b2cb 100755 --- a/Maintenance/deb/squeeze/debian/rules +++ b/Maintenance/deb/squeeze/debian/rules @@ -2,7 +2,7 @@ # export DH_VERBOSE=1 -# See http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake +# See https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake CFLAGS := $(CFLAGS) $(CPPFLAGS) CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS) @@ -26,11 +26,11 @@ override_dh_auto_configure: cd shared && QTDIR= cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE + -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE mkdir -p shared/demo/CGAL_ipelets cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=$(CURDIR)/shared + -DCGAL_DIR=$(CURDIR)/shared override_dh_auto_build: $(MAKE) -C static diff --git a/Maintenance/deb/wheezy/debian/README.Debian b/Maintenance/deb/wheezy/debian/README.Debian index 4be997664d7..e1056ac3ab7 100644 --- a/Maintenance/deb/wheezy/debian/README.Debian +++ b/Maintenance/deb/wheezy/debian/README.Debian @@ -44,7 +44,7 @@ and pass the option -DQGLVIEWER_INCLUDE_DIR=/some/dir -to cmake. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more +to cmake. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more information. -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 diff --git a/Maintenance/deb/wheezy/debian/copyright b/Maintenance/deb/wheezy/debian/copyright index ecc6058b7dc..6390c1a2874 100644 --- a/Maintenance/deb/wheezy/debian/copyright +++ b/Maintenance/deb/wheezy/debian/copyright @@ -318,7 +318,7 @@ src/CGALCore and include/CGAL/CORE. Copyright (c) 1995-2004 Exact Computation Project All rights reserved. - This file is part of CORE (http://cs.nyu.edu/exact/core/). + This file is part of CORE (https://cs.nyu.edu/exact/core/). You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/Maintenance/deb/wheezy/debian/rules b/Maintenance/deb/wheezy/debian/rules index 4e3de31d8e9..a3533b8b2cb 100755 --- a/Maintenance/deb/wheezy/debian/rules +++ b/Maintenance/deb/wheezy/debian/rules @@ -2,7 +2,7 @@ # export DH_VERBOSE=1 -# See http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake +# See https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake CFLAGS := $(CFLAGS) $(CPPFLAGS) CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS) @@ -26,11 +26,11 @@ override_dh_auto_configure: cd shared && QTDIR= cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE + -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE mkdir -p shared/demo/CGAL_ipelets cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=$(CURDIR)/shared + -DCGAL_DIR=$(CURDIR)/shared override_dh_auto_build: $(MAKE) -C static diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index ce30c5ee6d7..633a3f95570 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -107,7 +107,7 @@ LC_CTYPE=en_US.UTF-8 # - on trunk #0 21 * * Sat cd $HOME/CGAL/create_internal_release; scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/trunk --public --do-it -# Check the links of http://www.cgal.org/projects.html every sunday at 17:42 +# Check the links of https://www.cgal.org/projects.html every sunday at 17:42 #42 17 * * Sun linklint -host www.cgal.org -http /projects.html -net -no_anchors -quiet -silent -error # A test that does not work diff --git a/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam b/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam index 60d4ad326c3..cb26334a389 100644 --- a/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam +++ b/Maintenance/infrastructure/renoir.geometryfactory.com/boost/user-config.jam @@ -2,13 +2,13 @@ # Copyright 2004 John Maddock # Copyright 2002, 2003, 2004, 2007 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) +# (See accompanying file LICENSE_1_0.txt or https://www.boost.org/LICENSE_1_0.txt) # This file is used to configure your Boost.Build installation. You can modify # this file in place, or you can place it in a permanent location so that it # does not get overwritten should you get a new version of Boost.Build. See: # -# http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html +# https://www.boost.org/build/doc/html/bbv2/overview/configuration.html # # for documentation about possible permanent locations. @@ -17,7 +17,7 @@ # example lines and adjust them to taste. The complete list of supported tools, # and configuration instructions can be found at: # -# http://boost.org/boost-build2/doc/html/bbv2/reference/tools.html +# https://www.boost.org/build/doc/html/bbv2/reference/tools.html # # This file uses Jam language syntax to describe available tools. Mostly, @@ -31,7 +31,7 @@ # # More details about the syntax can be found at: # -# http://boost.org/boost-build2/doc/html/bbv2/advanced.html#bbv2.advanced.jam_language +# https://www.boost.org/build/doc/html/jam/language.html # # ------------------ @@ -96,7 +96,7 @@ using gcc : : /usr/local/packages/gcc-4.5/bin/g++ ; using gcc : cxxdebug : "/usr/lib64/ccache/g++" # your path to the C++ compiler - : -D_GLIBCXX_DEBUG + : -D_GLIBCXX_DEBUG ; using gcc diff --git a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h index 8cfc61a0e88..1b633566c73 100644 --- a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h +++ b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h @@ -13,7 +13,7 @@ ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception @@ -25,7 +25,7 @@ ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and diff --git a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qplugin.h b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qplugin.h index 559822a843e..d7e47535627 100644 --- a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qplugin.h +++ b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-4.8_CXX0X/patch-qt-4.8/QtCore/qplugin.h @@ -13,7 +13,7 @@ ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception @@ -25,7 +25,7 @@ ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and diff --git a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h index 8cfc61a0e88..1b633566c73 100644 --- a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h +++ b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qobjectdefs.h @@ -13,7 +13,7 @@ ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception @@ -25,7 +25,7 @@ ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and diff --git a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qplugin.h b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qplugin.h index 559822a843e..d7e47535627 100644 --- a/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qplugin.h +++ b/Maintenance/infrastructure/renoir.geometryfactory.com/reference-platforms/x86-64_Linux-Fedora19_g++-trunk_CXX0X/patch-qt-4.8/QtCore/qplugin.h @@ -13,7 +13,7 @@ ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception @@ -25,7 +25,7 @@ ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and diff --git a/Maintenance/public_release/announcement/mailing-beta.eml b/Maintenance/public_release/announcement/mailing-beta.eml index e6de484eb6d..11b4295f32f 100644 --- a/Maintenance/public_release/announcement/mailing-beta.eml +++ b/Maintenance/public_release/announcement/mailing-beta.eml @@ -160,7 +160,7 @@ Most modules are distributed under the terms of the GPL Open Source license (GNU General Public License v3 or later versions). If your intended usage does not meet the criteria of the aforementioned licenses, a commercial license can be purchased from -GeometryFactory (http://www.geometryfactory.com/). +GeometryFactory (https://www.geometryfactory.com/). For further information and for downloading the library and its diff --git a/Maintenance/public_release/announcement/mailing.eml b/Maintenance/public_release/announcement/mailing.eml index 67f9e890a9e..23ea320c941 100644 --- a/Maintenance/public_release/announcement/mailing.eml +++ b/Maintenance/public_release/announcement/mailing.eml @@ -159,7 +159,7 @@ Most modules are distributed under the terms of the GPL Open Source license (GNU General Public License v3 or later versions). If your intended usage does not meet the criteria of the aforementioned licenses, a commercial license can be purchased from -GeometryFactory (http://www.geometryfactory.com/). +GeometryFactory (https://www.geometryfactory.com/). For further information and for downloading the library and its diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index ac7d8d5c28a..386e5b8843c 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -40,7 +40,7 @@ my @testresults; my $testresult_dir=cwd()."/TESTRESULTS"; # Inspired from -# http://cpansearch.perl.org/src/EDAVIS/Sort-Versions-1.5/Versions.pm +# https://metacpan.org/pod/Sort::Versions sub sort_releases($$) { # Take arguments in revert order: one wants to sort from the recent to @@ -596,7 +596,7 @@ sub print_little_header(){ my $release_version = substr($release_name, 5); print OUTPUT<<"EOF"; + "https://www.w3.org/TR/html4/strict.dtd"> @@ -675,7 +675,7 @@ sub main() See the log here.

      - ">">Valid HTML 4.01 Strict

      diff --git a/Maintenance/test_handling/filter_testsuite/create_testresult_page b/Maintenance/test_handling/filter_testsuite/create_testresult_page index 399e57d5ddd..76ca849b01f 100755 --- a/Maintenance/test_handling/filter_testsuite/create_testresult_page +++ b/Maintenance/test_handling/filter_testsuite/create_testresult_page @@ -35,7 +35,7 @@ my @testresults; my $testresult_dir=cwd()."/TESTRESULTS"; # Inspired from -# http://cpansearch.perl.org/src/EDAVIS/Sort-Versions-1.5/Versions.pm +# https://metacpan.org/pod/Sort::Versions sub sort_releases($$) { # Take arguments in revert order: one wants to sort from the recent to @@ -591,7 +591,7 @@ sub print_little_header(){ my $release_version = substr($release_name, 5); print OUTPUT<<"EOF"; + "https://www.w3.org/TR/html4/strict.dtd"> @@ -665,7 +665,7 @@ sub main() See the log here.

      - ">">Valid HTML 4.01 Strict

      diff --git a/Mesh_3/benchmark/Mesh_3/concurrency.cpp b/Mesh_3/benchmark/Mesh_3/concurrency.cpp index ea383a78832..006c917b990 100644 --- a/Mesh_3/benchmark/Mesh_3/concurrency.cpp +++ b/Mesh_3/benchmark/Mesh_3/concurrency.cpp @@ -7,7 +7,7 @@ #endif // Without TBB_USE_THREADING_TOOL Intel Inspector XE will report false positives in Intel TBB -// (http://software.intel.com/en-us/articles/compiler-settings-for-threading-error-analysis-in-intel-inspector-xe/) +// (https://www.intel.com/content/www/us/en/developer/articles/technical/compiler-settings-for-threading-error-analysis-in-intel-inspector-xe.html) #ifdef _DEBUG # define TBB_USE_THREADING_TOOL #endif diff --git a/Number_types/doc/Number_types/CGAL/Sqrt_extension.h b/Number_types/doc/Number_types/CGAL/Sqrt_extension.h index e5869154551..a52f55780dc 100644 --- a/Number_types/doc/Number_types/CGAL/Sqrt_extension.h +++ b/Number_types/doc/Number_types/CGAL/Sqrt_extension.h @@ -13,7 +13,7 @@ An instance of this class represents an extension of the type `NT` by *one* squa For example, let `Integer` be some type representing \f$ \mathbb{Z}\f$, then `Sqrt_extension` is able to represent \f$ \mathbb{Z}[\sqrt{\mathrm{root}}]\f$ -for some arbitrary Integer \f$\mathrm{root}\f$. \cgalFootnote{\f$ R[a]\f$ denotes the extension of a ring \f$ R\f$ by an element \f$ a\f$. See also: \cgalFootnoteCode{http://mathworld.wolfram.com/ExtensionRing.html}} +for some arbitrary Integer \f$\mathrm{root}\f$. \cgalFootnote{\f$ R[a]\f$ denotes the extension of a ring \f$ R\f$ by an element \f$ a\f$. See also: \cgalFootnoteCode{https://mathworld.wolfram.com/ExtensionRing.html}} The value of \f$\mathrm{root}\f$ is set at construction time, or set to zero if it is not specified. diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 429941be991..04746f99211 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -143,8 +143,8 @@ inline double IA_opacify(double x) { #ifdef __llvm__ // LLVM's support for inline asm is completely messed up: - // http://llvm.org/bugs/show_bug.cgi?id=17958 - // http://llvm.org/bugs/show_bug.cgi?id=17959 + // https://bugs.llvm.org/show_bug.cgi?id=17958 + // https://bugs.llvm.org/show_bug.cgi?id=17959 // etc. // This seems to produce code that is ok (not optimal but better than // volatile). In case of trouble, use volatile instead. @@ -166,7 +166,7 @@ inline double IA_opacify(double x) // Intel used not to emulate this perfectly, we'll see. // If we create a version of IA_opacify for vectors, note that gcc < 4.8 // fails with "+g" and we need to use "+mx" instead. - // "+X" ICEs ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59155 ) and + // "+X" ICEs ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59155 ) and // may not be safe? // The constraint 'g' doesn't include floating point registers ??? // Intel has a bug where -mno-sse still defines __SSE__ and __SSE2__ @@ -180,10 +180,10 @@ inline double IA_opacify(double x) # endif # elif (defined __i386__ || defined __x86_64__) // "+f" doesn't compile on x86(_64) - // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59157 ) - // Don't mix "t" with "g": http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59180 + // ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59157 ) + // Don't mix "t" with "g": https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59180 // We can't put "t" with "x" either, prefer "x" for -mfpmath=sse,387. - // ( http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59181 ) + // ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59181 ) asm volatile ("" : "+mt"(x) ); # elif (defined __VFP_FP__ && !defined __SOFTFP__) || defined __aarch64__ // ARM @@ -217,7 +217,7 @@ inline double IA_force_to_double(double x) #if defined __GNUG__ # ifdef CGAL_HAS_SSE2 // For an explanation of volatile: - // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56027 + // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56027 asm volatile ("" : "+mx"(x) ); # else // Similar to writing to a volatile and reading back, except that calling diff --git a/Number_types/include/CGAL/GMP/Gmpz_type.h b/Number_types/include/CGAL/GMP/Gmpz_type.h index b6ace5743a0..bf91ddb5d91 100644 --- a/Number_types/include/CGAL/GMP/Gmpz_type.h +++ b/Number_types/include/CGAL/GMP/Gmpz_type.h @@ -324,9 +324,9 @@ gmpz_new_read(std::istream &is, Gmpz &z) // peek() sets also the failbit, one has to check for EOL twice. // // See the LWG C++ Issue 2036, classified as Not-A-Defect: - // http://lwg.github.com/issues/lwg-closed.html#2036 + // https://lwg.github.io/issues/lwg-closed.html#2036 // and a StackOverflow related question: - // http://stackoverflow.com/a/9020292/1728537 + // https://stackoverflow.com/a/9020292/1728537 // -- // Laurent Rineau, 2013/10/10 while (!is.eof()) { diff --git a/OpenNL/include/CGAL/OpenNL/bicgstab.h b/OpenNL/include/CGAL/OpenNL/bicgstab.h index dd8ea48a3ca..a9cef2c92e8 100644 --- a/OpenNL/include/CGAL/OpenNL/bicgstab.h +++ b/OpenNL/include/CGAL/OpenNL/bicgstab.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 2005-2008: Changes for CGAL: diff --git a/OpenNL/include/CGAL/OpenNL/blas.h b/OpenNL/include/CGAL/OpenNL/blas.h index 52c4810e2c8..8cea9da67ad 100644 --- a/OpenNL/include/CGAL/OpenNL/blas.h +++ b/OpenNL/include/CGAL/OpenNL/blas.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 01/2005: Change for CGAL: diff --git a/OpenNL/include/CGAL/OpenNL/conjugate_gradient.h b/OpenNL/include/CGAL/OpenNL/conjugate_gradient.h index c575aa6f0c8..6f2e6f5b2e8 100644 --- a/OpenNL/include/CGAL/OpenNL/conjugate_gradient.h +++ b/OpenNL/include/CGAL/OpenNL/conjugate_gradient.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 2005-2006: Changes for CGAL: diff --git a/OpenNL/include/CGAL/OpenNL/full_vector.h b/OpenNL/include/CGAL/OpenNL/full_vector.h index b0857dfa851..0459808b638 100644 --- a/OpenNL/include/CGAL/OpenNL/full_vector.h +++ b/OpenNL/include/CGAL/OpenNL/full_vector.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 01/2005: Change for CGAL: diff --git a/OpenNL/include/CGAL/OpenNL/linear_solver.h b/OpenNL/include/CGAL/OpenNL/linear_solver.h index 33dccdcc6cb..d4e928eec9a 100644 --- a/OpenNL/include/CGAL/OpenNL/linear_solver.h +++ b/OpenNL/include/CGAL/OpenNL/linear_solver.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 2005-2006: Changes for CGAL: diff --git a/OpenNL/include/CGAL/OpenNL/preconditioner.h b/OpenNL/include/CGAL/OpenNL/preconditioner.h index 2d7728a94ca..808b6f39eb1 100644 --- a/OpenNL/include/CGAL/OpenNL/preconditioner.h +++ b/OpenNL/include/CGAL/OpenNL/preconditioner.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 2006: Changes for CGAL: diff --git a/OpenNL/include/CGAL/OpenNL/sparse_matrix.h b/OpenNL/include/CGAL/OpenNL/sparse_matrix.h index 2d5b3812e30..4e4c01f46d4 100644 --- a/OpenNL/include/CGAL/OpenNL/sparse_matrix.h +++ b/OpenNL/include/CGAL/OpenNL/sparse_matrix.h @@ -1,7 +1,7 @@ // Copyright (c) 2005-2008 Inria Loria (France). /* * author: Bruno Levy, INRIA, project ALICE - * website: http://www.loria.fr/~levy/software + * website: https://www.loria.fr/~levy/software * * This file is part of CGAL (www.cgal.org) * @@ -13,7 +13,7 @@ * TITLE = Numerical Methods for Digital Geometry Processing, * BOOKTITLE =Israel Korea Bi-National Conference, * YEAR=November 2005, - * URL=http://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics + * URL=https://www.loria.fr/~levy/php/article.php?pub=../publications/papers/2005/Numerics * } * * Laurent Saboret 01/2005: Change for CGAL: diff --git a/OpenNL/package_info/OpenNL/long_description.txt b/OpenNL/package_info/OpenNL/long_description.txt index 8c0cd24b1f9..645de7254ee 100644 --- a/OpenNL/package_info/OpenNL/long_description.txt +++ b/OpenNL/package_info/OpenNL/long_description.txt @@ -15,7 +15,7 @@ Contact ======= The author is Bruno Levy . -OpenNL main page is http://www.loria.fr/~levy/software/. +OpenNL main page is https://www.loria.fr/~levy/software/. Caution ======= diff --git a/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_delaunay_performance.cpp b/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_delaunay_performance.cpp index ddef1fcc6de..3268d9dd881 100644 --- a/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_delaunay_performance.cpp +++ b/Periodic_2_triangulation_2/test/Periodic_2_triangulation_2/test_p2t2_delaunay_performance.cpp @@ -84,7 +84,7 @@ int main(int argc, char *argv[]) // For generating the plot: /* - + diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp index 64ed148670d..513e34d5ebc 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp @@ -12,7 +12,7 @@ * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to - * http://oss.sgi.com/projects/FreeB/ + * https://spdx.org/licenses/SGI-B-2.0.html * shall be included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/resources/about.html b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/resources/about.html index bf9e3becae7..9816a12a0c3 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/resources/about.html +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/resources/about.html @@ -2,8 +2,8 @@

      CGAL Periodic Delaunay Triangulation

      Copyright ©2008-2009
      - INRIA Sophia Antipolis - Mediterranee

      -

      This application illustrates the 3D Periodic Delaunay Triangulation + INRIA Sophia Antipolis - Mediterranee

      +

      This application illustrates the 3D Periodic Delaunay Triangulation of CGAL.

      See also the package manual:
      diff --git a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/icons/about_CGAL.html b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/icons/about_CGAL.html index 6b2b2a5d943..f2f0fb9318b 100644 --- a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/icons/about_CGAL.html +++ b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/icons/about_CGAL.html @@ -3,6 +3,6 @@

      Computational Geometry Algorithms Library

      CGAL provides efficient and reliable geometric algorithms in the form of a C++ library.

      -

      For more information visit www.cgal.org

      +

      For more information visit www.cgal.org

      diff --git a/Polyhedron/demo/Polyhedron/Mainpage.md b/Polyhedron/demo/Polyhedron/Mainpage.md index 0e8322a8f70..444a5ee8b98 100644 --- a/Polyhedron/demo/Polyhedron/Mainpage.md +++ b/Polyhedron/demo/Polyhedron/Mainpage.md @@ -197,7 +197,7 @@ class Polyhedron_demo_example_plugin : public : // To silent a warning -Woverloaded-virtual - // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings + // See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings using Polyhedron_demo_plugin_helper::init; void init(QMainWindow* mainWindow, diff --git a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp index 0d8687bd635..af1eef9e115 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Display/Display_property_plugin.cpp @@ -1694,7 +1694,7 @@ private: /*========================================================================= Copyright (c) 2006 Sandia Corporation. All rights reserved. - See Copyright.txt or http://www.kitware.com/Copyright.htm for details. + See Copyright.txt or https://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp index 4063d2107ed..db0d99bdb57 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/Polylines_io_plugin.cpp @@ -27,7 +27,7 @@ class Polyhedron_demo_polylines_io_plugin : public: // To silent a warning -Woverloaded-virtual - // See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings + // See https://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings using Polyhedron_demo_io_plugin_interface::init; //! Configures the widget diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/PartitionDialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/PartitionDialog.ui index 91f3b989f8a..9b8b669d72b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/PartitionDialog.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/PartitionDialog.ui @@ -62,7 +62,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "https://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> diff --git a/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_widget.ui index 5592bbbde5a..f2839e20f06 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PCA/Basic_generator_widget.ui @@ -1046,7 +1046,7 @@ QGroupBox::title { - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "https://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> @@ -1094,7 +1094,7 @@ p, li { white-space: pre-wrap; } - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "https://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp index f32c322c16d..f3be698c5ad 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Point_inside_polyhedron_plugin.cpp @@ -192,7 +192,7 @@ public Q_SLOTS: boost::optional bbox = boost::make_optional(false, CGAL::Three::Scene_interface::Bbox()); // Workaround a bug in g++-4.8.3: - // http://stackoverflow.com/a/21755207/1728537 + // https://stackoverflow.com/a/21755207/1728537 // Using boost::make_optional to copy-initialize 'bbox' hides the // warning about '*bbox' not being initialized. // -- Laurent Rineau, 2014/10/30 diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Register_point_sets_plugin.ui b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Register_point_sets_plugin.ui index 9cc5d979842..e527115cd2b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/Register_point_sets_plugin.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/Register_point_sets_plugin.ui @@ -187,7 +187,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "https://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;"> diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp index 4a1ec1d8a6d..7b6e5225dfe 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp @@ -104,7 +104,7 @@ Polyhedron_demo::Polyhedron_demo(int& argc, char **argv, // On Apple, the first time the application is launched, the menus are unclicable, and // the only way you can fix it is to unfocus and re-focus the application. // This is a hack that makes the application lose the focus after it is started, to force the user - // to re-focus it. (source : http://www.alecjacobson.com/weblog/?p=3910) + // to re-focus it. (source: https://www.alecjacobson.com/weblog/?p=3910) #ifdef __APPLE__ system("osascript -e 'tell application \"System Events\" " "to keystroke tab using {command down, shift down}'"); diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index 5b803274716..8164cdacf8f 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -288,7 +288,7 @@ public: void compute_bbox() const { // Workaround a bug in g++-4.8.3: - // http://stackoverflow.com/a/21755207/1728537 + // https://stackoverflow.com/a/21755207/1728537 // Using boost::make_optional to copy-initialize 'item_bbox' hides the // warning about '*item_bbox' not being initialized. // -- Laurent Rineau, 2014/10/30 diff --git a/Polyhedron/demo/Polyhedron/Show_point_dialog.ui b/Polyhedron/demo/Polyhedron/Show_point_dialog.ui index bbe92b716a9..1816683d2fe 100644 --- a/Polyhedron/demo/Polyhedron/Show_point_dialog.ui +++ b/Polyhedron/demo/Polyhedron/Show_point_dialog.ui @@ -43,7 +43,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "https://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'DejaVu LGC Sans'; font-size:11pt; font-weight:400; font-style:normal;"> diff --git a/Polyhedron/demo/Polyhedron/resources/about.html b/Polyhedron/demo/Polyhedron/resources/about.html index 3089144f7a1..b881e30bab7 100644 --- a/Polyhedron/demo/Polyhedron/resources/about.html +++ b/Polyhedron/demo/Polyhedron/resources/about.html @@ -1,9 +1,9 @@

      3D Polyhedral Surfaces

      -

      Copyright ©2008-2009 - GeometryFactory - and INRIA Sophia Antipolis - Mediterranee

      +

      Copyright ©2008-2009 + GeometryFactory + and INRIA Sophia Antipolis - Mediterranee

      This application illustrates the data structures of CGAL, and operations and algorithms that can be applied to.

      diff --git a/Principal_component_analysis/demo/Principal_component_analysis/resources/about.html b/Principal_component_analysis/demo/Principal_component_analysis/resources/about.html index 8d2c41d1ea0..d6b327c3558 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/resources/about.html +++ b/Principal_component_analysis/demo/Principal_component_analysis/resources/about.html @@ -2,8 +2,8 @@

      AABB Tree Demo

      Copyright ©2009 - INRIA Sophia Antipolis - Mediterranee

      -

      This application illustrates the AABB tree component + INRIA Sophia Antipolis - Mediterranee

      +

      This application illustrates the AABB tree component of CGAL, applied to polyhedron facets and edges.

      See also the following chapters of the manual: diff --git a/Profiling_tools/include/CGAL/Memory_sizer.h b/Profiling_tools/include/CGAL/Memory_sizer.h index 4bf90350f2e..6d0551ef7f9 100644 --- a/Profiling_tools/include/CGAL/Memory_sizer.h +++ b/Profiling_tools/include/CGAL/Memory_sizer.h @@ -125,7 +125,7 @@ private: #else // __APPLE__ is defined - // http://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html + // https://miknight.blogspot.com/2005/11/resident-set-size-in-mac-os-x.html // This is highly experimental. But still better than returning 0. // It appears that we might need certain 'rights' to get access to the kernel // task... It works if you have admin rights apparently diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/additional/QBORE3D.mps b/QP_solver/test/QP_solver/test_solver_data/masters/additional/QBORE3D.mps index be23f7d172f..966b92282a6 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/additional/QBORE3D.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/additional/QBORE3D.mps @@ -1,6 +1,6 @@ * Number-type: floating-point -* Description: QBORE3D http://www.doc.ic.ac.uk/~im/ -* Generated-by: http://www.doc.ic.ac.uk/%7Eim/QPDATA2.ZIP +* Description: QBORE3D https://www.doc.ic.ac.uk/~im/ +* Generated-by: https://www.doc.ic.ac.uk/%7Eim/QPDATA2.ZIP * Derivatives: none NAME BORE3D ROWS diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/additional/QCAPRI.mps b/QP_solver/test/QP_solver/test_solver_data/masters/additional/QCAPRI.mps index bdf64319be2..cecd01701f7 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/additional/QCAPRI.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/additional/QCAPRI.mps @@ -1,6 +1,6 @@ * Number-type: floating-point -* Description: QCAPRI http://www.doc.ic.ac.uk/~im/ -* Generated-by: http://www.doc.ic.ac.uk/%7Eim/QPDATA2.ZIP +* Description: QCAPRI https://www.doc.ic.ac.uk/~im/ +* Generated-by: https://www.doc.ic.ac.uk/%7Eim/QPDATA2.ZIP * Derivatives: none NAME CAPRI ROWS diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/additional/QRECIPE.mps b/QP_solver/test/QP_solver/test_solver_data/masters/additional/QRECIPE.mps index b38a5944b85..81306a3cfc8 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/additional/QRECIPE.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/additional/QRECIPE.mps @@ -1,6 +1,6 @@ * Number-type: floating-point -* Description: QRECIPE http://www.doc.ic.ac.uk/~im/ -* Generated-by: http://www.doc.ic.ac.uk/%7Eim/QPDATA2.ZIP +* Description: QRECIPE https://www.doc.ic.ac.uk/~im/ +* Generated-by: https://www.doc.ic.ac.uk/%7Eim/QPDATA2.ZIP * Derivatives: none NAME RECIPE ROWS diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit1d.mps b/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit1d.mps index 65e0935866b..dee88708b9a 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit1d.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit1d.mps @@ -1,6 +1,6 @@ * Number-type: floating-point -* Description: http://www.netlib.org/lp/data/ -* Generated-by: +* Description: https://www.netlib.org/lp/data/ +* Generated-by: * Derivatives: none NAME FIT1D ROWS diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit2d.mps b/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit2d.mps index aeacd42c629..c63185ec865 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit2d.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/additional/fit2d.mps @@ -1,6 +1,6 @@ * Number-type: floating-point -* Description: http://www.netlib.org/lp/data/ -* Generated-by: +* Description: https://www.netlib.org/lp/data/ +* Generated-by: * Derivatives: none NAME FIT2D ROWS diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/additional/scsd1.mps b/QP_solver/test/QP_solver/test_solver_data/masters/additional/scsd1.mps index 5766d6427fe..83cc8430687 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/additional/scsd1.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/additional/scsd1.mps @@ -1,6 +1,6 @@ * Number-type: floating-point -* Description: http://www.netlib.org/lp/data/ -* Generated-by: +* Description: https://www.netlib.org/lp/data/ +* Generated-by: * Derivatives: none NAME SCSD1 ROWS diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/HS118.mps b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/HS118.mps index 875d0b3c931..4f6af9720da 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/HS118.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/HS118.mps @@ -1,5 +1,5 @@ -* Description: from the benchmarks at http://www.doc.ic.ac.uk/~im/ -NAME HS118 +* Description: from the benchmarks at https://www.doc.ic.ac.uk/~im/ +NAME HS118 ROWS N OBJ.FUNC G R------1 diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/PRIMALC1.mps b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/PRIMALC1.mps index f0846c3402f..24aca9bb682 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/PRIMALC1.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/PRIMALC1.mps @@ -1,6 +1,6 @@ -* Description: from the benchmarks at http://www.doc.ic.ac.uk/~im/ +* Description: from the benchmarks at https://www.doc.ic.ac.uk/~im/ * Derivatives: none -NAME PRIMALC1 +NAME PRIMALC1 ROWS N OBJ.FUNC L R------1 diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/QPTEST.mps b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/QPTEST.mps index fb89b43794b..3b8f8bc546c 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/QPTEST.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/QPTEST.mps @@ -1,4 +1,4 @@ -* Description: from the benchmarks at http://www.doc.ic.ac.uk/~im/ +* Description: from the benchmarks at https://www.doc.ic.ac.uk/~im/ NAME QP example ROWS N obj diff --git a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/ZECEVIC2.mps b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/ZECEVIC2.mps index 2d2e36a96e6..a42199f6137 100644 --- a/QP_solver/test/QP_solver/test_solver_data/masters/cgal/ZECEVIC2.mps +++ b/QP_solver/test/QP_solver/test_solver_data/masters/cgal/ZECEVIC2.mps @@ -1,5 +1,5 @@ -* Description: from the benchmarks at http://www.doc.ic.ac.uk/~im/ -NAME ZECEVIC2 +* Description: from the benchmarks at https://www.doc.ic.ac.uk/~im/ +NAME ZECEVIC2 ROWS N OBJ.FUNC L R------1 diff --git a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index 3ab95555707..4bbe0d3caf0 100644 --- a/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -1461,7 +1461,7 @@ public: private: // Sequential: non-atomic // "dummy" is here to allow the specialization (see below) - // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 + // See https://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 template struct Number_of_elements { diff --git a/STL_Extension/include/CGAL/Handle_for.h b/STL_Extension/include/CGAL/Handle_for.h index 2a93662e69b..2f05c6be1ce 100644 --- a/STL_Extension/include/CGAL/Handle_for.h +++ b/STL_Extension/include/CGAL/Handle_for.h @@ -30,7 +30,7 @@ #if defined(BOOST_MSVC) # pragma warning(push) -# pragma warning(disable:4345) // Avoid warning http://msdn.microsoft.com/en-us/library/wewb47ee(VS.80).aspx +# pragma warning(disable:4345) // Avoid warning https://learn.microsoft.com/en-us/previous-versions/wewb47ee(v=vs.120) #endif namespace CGAL { diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp b/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp index c91dea7d62f..a02a831f044 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp +++ b/STL_Extension/include/CGAL/STL_Extension/internal/boost/relaxed_heap.hpp @@ -3,7 +3,7 @@ // Copyright 2004 The Trustees of Indiana University. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +// https://www.boost.org/LICENSE_1_0.txt) // // Authors: Douglas Gregor // Andrew Lumsdaine diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index cfaca0a0550..ff234183f99 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -30,7 +30,7 @@ namespace CGAL { // https://lists.boost.org/Archives/boost/2006/08/109003.php // // C++0x has it under discussion here : -// http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#851 +// https://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#851 // Hopefully C++0x will fix this properly with initializer_lists. // So, it's temporary, therefore I do not document it and keep it internal. diff --git a/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h b/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h index e0321f57395..2138c377e42 100644 --- a/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h +++ b/Solver_interface/include/CGAL/Eigen_diagonalize_traits.h @@ -53,7 +53,7 @@ struct Restricted_FT { typedef float type; }; /// /// \cgalModels `DiagonalizeTraits` /// -/// \sa http://eigen.tuxfamily.org/index.php?title=Main_Page +/// \sa https://eigen.tuxfamily.org/index.php?title=Main_Page template class Eigen_diagonalize_traits { diff --git a/Solver_interface/include/CGAL/Eigen_matrix.h b/Solver_interface/include/CGAL/Eigen_matrix.h index 4a34a022d0d..4f28c3f7c6f 100644 --- a/Solver_interface/include/CGAL/Eigen_matrix.h +++ b/Solver_interface/include/CGAL/Eigen_matrix.h @@ -23,7 +23,7 @@ namespace CGAL { \ingroup PkgSolverInterfaceLS The class `Eigen_matrix` is a wrapper around `Eigen` matrix type -`Eigen::Matrix`. +`Eigen::Matrix`. \cgalModels `SvdTraits::Matrix` diff --git a/Solver_interface/include/CGAL/Eigen_solver_traits.h b/Solver_interface/include/CGAL/Eigen_solver_traits.h index 9fe3457e84d..93820b7b827 100644 --- a/Solver_interface/include/CGAL/Eigen_solver_traits.h +++ b/Solver_interface/include/CGAL/Eigen_solver_traits.h @@ -75,7 +75,7 @@ The class `Eigen_solver_traits` provides an interface to the sparse solvers of \ \sa `CGAL::Eigen_sparse_matrix` \sa `CGAL::Eigen_sparse_symmetric_matrix` \sa `CGAL::Eigen_vector` -\sa http://eigen.tuxfamily.org/index.php?title=Main_Page +\sa https://eigen.tuxfamily.org/index.php?title=Main_Page \cgalHeading{Instantiation Example} diff --git a/Solver_interface/include/CGAL/Eigen_sparse_matrix.h b/Solver_interface/include/CGAL/Eigen_sparse_matrix.h index ff83d2a65fd..20e8962bb15 100644 --- a/Solver_interface/include/CGAL/Eigen_sparse_matrix.h +++ b/Solver_interface/include/CGAL/Eigen_sparse_matrix.h @@ -21,7 +21,7 @@ namespace CGAL { \ingroup PkgSolverInterfaceLS The class `Eigen_sparse_matrix` is a wrapper around `Eigen` matrix type -`Eigen::SparseMatrix` +`Eigen::SparseMatrix` that represents general matrices, be they symmetric or not. \cgalModels `SparseLinearAlgebraTraits_d::Matrix` @@ -301,7 +301,7 @@ private: \ingroup PkgSolverInterfaceRefLS The class `Eigen_sparse_symmetric_matrix` is a wrapper around `Eigen` matrix type -`Eigen::SparseMatrix` +`Eigen::SparseMatrix` Since the matrix is symmetric, only the lower triangle part is stored. diff --git a/Solver_interface/include/CGAL/Eigen_vector.h b/Solver_interface/include/CGAL/Eigen_vector.h index d080777a2f8..b50ac037eff 100644 --- a/Solver_interface/include/CGAL/Eigen_vector.h +++ b/Solver_interface/include/CGAL/Eigen_vector.h @@ -20,7 +20,7 @@ namespace CGAL { \ingroup PkgSolverInterfaceLS The class `Eigen_vector` is a wrapper around `Eigen` -vector type, +vector type, which is a simple array of numbers. \cgalModels `SvdTraits::Vector` diff --git a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp index 766b41c77fc..a999a5235ec 100644 --- a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp +++ b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp @@ -393,7 +393,7 @@ namespace nanoflann /** @addtogroup param_grp Parameter structs * @{ */ - /** Parameters (see http://code.google.com/p/nanoflann/ for help choosing the parameters) + /** Parameters (see https://github.com/jlblancoc/nanoflann for help choosing the parameters) */ struct KDTreeSingleIndexAdaptorParams { @@ -580,10 +580,10 @@ namespace nanoflann * This code is an adapted version from Boost, modifed for its integration * within MRPT (JLBC, Dec/2009) (Renamed array -> CArray to avoid possible potential conflicts). * See - * http://www.josuttis.com/cppcode + * https://www.josuttis.com/cppcode/ * for details and the latest version. * See - * http://www.boost.org/libs/array for Documentation. + * https://www.boost.org/libs/array for Documentation. * for documentation. * * (C) Copyright Nicolai M. Josuttis 2001. @@ -851,7 +851,7 @@ namespace nanoflann * * Params: * inputData = dataset with the input features - * params = parameters passed to the kdtree algorithm (see http://code.google.com/p/nanoflann/ for help choosing the parameters) + * params = parameters passed to the kdtree algorithm (see https://github.com/jlblancoc/nanoflann for help choosing the parameters) */ KDTreeSingleIndexAdaptor(const int dimensionality, const DatasetAdaptor& inputData, const KDTreeSingleIndexAdaptorParams& params = KDTreeSingleIndexAdaptorParams() ) : dataset(inputData), index_params(params), root_node(NULL), distance(inputData) diff --git a/Straight_skeleton_2/include/CGAL/IO/Dxf_stream.h b/Straight_skeleton_2/include/CGAL/IO/Dxf_stream.h index ed0dceb3efe..8e1d0387b18 100644 --- a/Straight_skeleton_2/include/CGAL/IO/Dxf_stream.h +++ b/Straight_skeleton_2/include/CGAL/IO/Dxf_stream.h @@ -10,7 +10,7 @@ // Author(s) : Fernando Cacciola // // Descriptions of the file format can be found at -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_DXF_STREAM_H #define CGAL_DXF_STREAM_H diff --git a/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h b/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h index 2c6e28c1fc7..11a41b3a204 100644 --- a/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h +++ b/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h @@ -10,7 +10,7 @@ // Author(s) : Fernando Cacciola // // Description of the file format can be found at the following address: -// http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ +// https://images.autodesk.com/adsk/files/autocad_2012_pdf_dxf-reference_enu.pdf #ifndef CGAL_IO_DXF_WRITER_H #define CGAL_IO_DXF_WRITER_H diff --git a/Stream_support/doc/Stream_support/File_formats/Supported_file_formats.txt b/Stream_support/doc/Stream_support/File_formats/Supported_file_formats.txt index 4834a83616b..5ca36ae8a8c 100644 --- a/Stream_support/doc/Stream_support/File_formats/Supported_file_formats.txt +++ b/Stream_support/doc/Stream_support/File_formats/Supported_file_formats.txt @@ -107,7 +107,7 @@ which offers combinatorial repairing while reading bad inputs. The `OBJ` file format, using the file extension `.obj`, is a simple \ascii data format that represents 3D geometry. Vertices are stored in a counter-clockwise order by default, making explicit declaration of face normals unnecessary. -A precise specification of the format is available here. +A precise specification of the format is available here. @@ -148,7 +148,7 @@ The `STL` file format, using the file extension `.stl`, is an \ascii or binary f to the stereolithography CAD software created by 3D Systems. STL files describe the surface geometry of a three-dimensional object. -A precise specification of those formats is available here. +A precise specification of those formats is available here.
      diff --git a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h index 5f357c809ab..03c90101c33 100644 --- a/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h +++ b/Surface_mesh_segmentation/include/CGAL/Surface_mesh_segmentation/internal/auxiliary/graph.h @@ -53,7 +53,7 @@ This program is available under dual licence: 1) Under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Note that any program that incorporates the code under this licence must, under the terms of the GNU GPL, be released under a licence compatible with the GPL. GNU GPL does not permit incorporating this program into proprietary programs. If you wish to do this, please see the alternative licence available below. -GNU General Public License can be found at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html +GNU General Public License can be found at https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 2) Proprietary Licence from UCL Business PLC. To enable programers to include the MaxFlow software in a proprietary system (which is not allowed by the GNU GPL), this licence gives you the right to incorporate the software in your program and distribute under any licence of your choosing. The full terms of the licence and applicable fee, are available from the Licensors at: http://www.uclb-elicensing.com/optimisation_software/maxflow_computervision.html diff --git a/Triangulation_3/demo/Triangulation_3/documentation/about.html b/Triangulation_3/demo/Triangulation_3/documentation/about.html index 1954aa1d7fa..d6077d7b567 100644 --- a/Triangulation_3/demo/Triangulation_3/documentation/about.html +++ b/Triangulation_3/demo/Triangulation_3/documentation/about.html @@ -2,7 +2,7 @@

      CGAL Triangulation_3 Demo

      Copyright ©2010-2011
      - INRIA Sophia Antipolis - Mediterranee

      + INRIA Sophia Antipolis - Mediterranee

      This application illustrates an interactive demo for 3D Delaunay Triangulation package of CGAL.

      See also the package manual:
      diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index ac6371c6484..482cb41c176 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_3.h @@ -1243,7 +1243,7 @@ protected: // Sequential version // "dummy" is here to allow the specialization (see below) - // See http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 + // See https://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/285ab1eec49e1cb6 template class Hidden_point_visitor { From deb1533957d8bab6899d2dbcb420a3a002a9ff02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 23 Nov 2022 20:16:17 +0100 Subject: [PATCH 203/426] Improve documentation of PMP::compute_vertex_normal() --- Documentation/doc/biblio/cgal_manual.bib | 11 +++++++++++ .../CGAL/Polygon_mesh_processing/compute_normal.h | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 1c49fe6ffd2..48ecda6b8ab 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -32,6 +32,17 @@ pages = "39--61" } +@article{cgal:al-otmnn-08, + title={On the most normal normal}, + author={Aubry, Romain and L{\"o}hner, Rainald}, + journal={Communications in Numerical Methods in Engineering}, + volume={24}, + number={12}, + pages={1641--1652}, + year={2008}, + publisher={Wiley Online Library} +} + @manual{ cgal:a-cclga-94 ,author = {Avnaim, F.} ,title = "{C}{\tt ++}{GAL}: {A} {C}{\tt ++} Library for Geometric diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 47dd64b4f36..ef4412e880b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -616,7 +616,11 @@ compute_vertex_normal_as_sum_of_weighted_normals(typename boost::graph_traits Date: Wed, 23 Nov 2022 21:15:38 +0100 Subject: [PATCH 204/426] Translate some French error messages / comments --- .../Advancing_front_surface_reconstruction.h | 168 ++++++++---------- ...ont_surface_reconstruction_vertex_base_3.h | 2 +- 2 files changed, 78 insertions(+), 92 deletions(-) diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h index 3e4d8ba7df9..c7f5e1325b2 100644 --- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h +++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h @@ -370,19 +370,19 @@ namespace CGAL { coord_type K, min_K; const coord_type eps; const coord_type inv_eps_2; // 1/(eps^2) - const coord_type eps_3; // test de ^3 donc points tel 1e-7 soit petit + const coord_type eps_3; // tests using cubed eps so points such that 1e-7 is small const criteria STANDBY_CANDIDATE; const criteria STANDBY_CANDIDATE_BIS; const criteria NOT_VALID_CANDIDATE; //--------------------------------------------------------------------- - //Pour une visu correcte - //pour retenir les facettes selectionnees + // For a correct visualization + // to retain the selected facets int _vh_number; int _facet_number; //--------------------------------------------------------------------- - //Pour le post traitement + // For post-processing mutable int _postprocessing_counter; int _size_before_postprocessing; @@ -501,9 +501,8 @@ namespace CGAL { } //------------------------------------------------------------------- - // pour gerer certaines aretes interieures: a savoir celle encore connectee au - // bord (en fait seule, les aretes interieures reliant 2 bords nous - // interressent...) + // to handle certain interior edges, meaning those still connected to the boundary + // (actually, only the interior edges linking two boundaries are relevant) inline void set_interior_edge(Vertex_handle w, Vertex_handle v) { @@ -806,7 +805,7 @@ namespace CGAL { if ((number_of_facets() > static_cast(T.number_of_vertices()))&& (NB_BORDER_MAX > 0)) - // en principe 2*nb_sommets = nb_facettes: y a encore de la marge!!! + // in theory 2*vertices_n = facets_n: plenty of room!!! { while(postprocessing()){ extend2_timer.start(); @@ -1068,9 +1067,8 @@ namespace CGAL { //--------------------------------------------------------------------- bool is_interior_edge(const Edge_like& key) const - // pour gerer certaines aretes interieures: a savoir celle encore connectee au - // bord (en fait seule, les aretes interieures reliant 2 bords nous - // interressent...) + // to handle certain interior edges, meaning those still connected to the boundary + // (actually, only the interior edges linking two boundaries are relevant) { return (is_interior_edge(key.first, key.second)|| is_interior_edge(key.second, key.first)); @@ -1299,7 +1297,6 @@ namespace CGAL { #ifdef AFSR_LAZY value = lazy_squared_radius(cc); #else - // qualified with CGAL, to avoid a compilation error with clang if(volume(pp0, pp1, pp2, pp3) != 0){ value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3); } else { @@ -1337,7 +1334,6 @@ namespace CGAL { { value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V; if ((value < 0)||(norm_V > inv_eps_2)){ - // qualified with CGAL, to avoid a compilation error with clang value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3); } } @@ -1365,7 +1361,7 @@ namespace CGAL { /// @} //--------------------------------------------------------------------- - // For a border edge e we determine the incident facet which has the highest + // For a border edge e, we determine the incident facet which has the highest // chance to be a natural extension of the surface Radius_edge_type @@ -1425,8 +1421,7 @@ namespace CGAL { P2Pn = construct_vector(p2, pn); v2 = construct_cross_product(P2P1,P2Pn); - //pas necessaire de normer pour un bon echantillon: - // on peut alors tester v1*v2 >= 0 + // no need to normalize for a correct sampling: one can then test v1*v2 >= 0 norm = sqrt(norm1 * compute_scalar_product(v2,v2)); pscal = v1*v2; // check if the triangle will produce a sliver on the surface @@ -1437,7 +1432,8 @@ namespace CGAL { if (tmp < min_valueA) { PnP1 = p1-pn; - // DELTA represente la qualite d'echantillonnage du bord + // DELTA encodes the quality of the border sampling + // // We skip triangles having an internal angle along e // whose cosinus is smaller than -DELTA // that is the angle is larger than arcos(-DELTA) @@ -1462,37 +1458,36 @@ namespace CGAL { if ((min_valueA == infinity()) || border_facet) // bad facets case { - min_facet = Facet(c, i); // !!! sans aucune signification.... - value = NOT_VALID_CANDIDATE; // Attention a ne pas inserer dans PQ + min_facet = Facet(c, i); // !!! without any meaning.... + value = NOT_VALID_CANDIDATE; // Do not insert in the PQ } else { min_facet = min_facetA; - //si on considere seulement la pliure value appartient a [0, 2] - //value = coord_type(1) - min_valueP; - - // si la pliure est bonne on note suivant le alpha sinon on prend en compte la - // pliure seule... pour discriminer entre les bons slivers... - // si on veut discriminer les facettes de bonnes pliures plus finement - // alors -(1+1/min_valueA) app a [-inf, -1] - // -min_valueP app a [-1, 1] + // If we only consider the fold value belongs to [0, 2] + // value = coord_type(1) - min_valueP; + // If the fold is OK, we rate based on the alpha value. Otherwise, take only the fold into account + // to discriminate between good slivers. + // + // If we wish to discriminate the facets with good folds more finely, + // then: + // -(1+1/min_valueA) is within [-inf, -1] + // -min_valueP is within [-1, 1] + // if (min_valueP > COS_BETA) value = -(coord_type(1) + coord_type(1)/min_valueA); else { - //on refuse une trop grande non-uniformite + // reject overly non-uniform values coord_type tmp = priority (*this, c, i); if (min_valueA <= K * tmp) value = - min_valueP; else { - value = STANDBY_CANDIDATE; // tres mauvais candidat mauvaise pliure - // + grand alpha... a traiter plus tard.... - min_K = - (std::min)(min_K, - min_valueA/tmp); + value = STANDBY_CANDIDATE; // extremely bad candidate, bad fold + large alpha; handle later + min_K = (std::min)(min_K, min_valueA/tmp); } } } @@ -1597,7 +1592,7 @@ namespace CGAL { } //--------------------------------------------------------------------- - // test de reciprocite avant de recoller une oreille anti-singularite + // reciprocity test before glueing anti-singularity ear int test_merge(const Edge_like& ordered_key, const Border_elt& result, const Vertex_handle& v, const coord_type& ear_alpha) @@ -1622,12 +1617,12 @@ namespace CGAL { coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2)); if (v1*v2 > COS_BETA*norm) - return 1; // label bonne pliure sinon: + return 1; // mark as good fold if (ear_alpha <= K * priority(*this, neigh, n_ind)) - return 2; // label alpha coherent... + return 2; // mark alpha consistent - return 0; //sinon oreille a rejeter... + return 0; // ear to be rejected } @@ -1753,7 +1748,7 @@ namespace CGAL { Edge_like ordered_key(v1,v2); if (!is_border_elt(ordered_key, result12)) - std::cerr << "+++probleme coherence bord " << std::endl; + std::cerr << "+++issue with border consistency " << std::endl; bool is_border_el1 = is_border_elt(ordered_el1, result1), is_border_el2 = is_border_elt(ordered_el2, result2); @@ -1782,8 +1777,7 @@ namespace CGAL { return FINAL_CASE; } //--------------------------------------------------------------------- - //on peut alors marquer v1 et on pourrait essayer de merger - //sans faire de calcul inutile??? + // we can then mark v1 and could try to merge without any useless computation??? if (is_border_el1) { Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third), @@ -1796,7 +1790,7 @@ namespace CGAL { return EAR_CASE; } //--------------------------------------------------------------------- - //idem pour v2 + //idem for v2 if (is_border_el2) { Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second), @@ -1852,9 +1846,9 @@ namespace CGAL { // border incident to a point... _mark<1 even if th orientation // may be such as one vh has 2 successorson the same border... { - // a ce niveau on peut tester si le recollement se fait en - // maintenant la compatibilite d'orientation des bords (pour - // surface orientable...) ou si elle est brisee... + // at this level, we can test if glueing can be done while keeping + // compatible orientations for the borders (for an orientable surface...) + // or if it is broken Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second), edge_Efacet.second); Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third), @@ -1884,8 +1878,8 @@ namespace CGAL { Border_elt result_ear2; Edge_like ear1_e, ear2_e; - // pour maintenir la reconstruction d'une surface orientable : - // on verifie que les bords se recollent dans des sens opposes + // to preserve the reconstruction of an orientable surface, we check that + // borders glue to one another in opposite directions if (ordered_key.first==v1) { ear1_e = Edge_like(c->vertex(i), ear1_c ->vertex(ear1_i)); @@ -1897,7 +1891,7 @@ namespace CGAL { ear2_e = Edge_like(c->vertex(i), ear2_c ->vertex(ear2_i)); } - //maintient la surface orientable + // preserves orientability of the surface bool is_border_ear1 = is_ordered_border_elt(ear1_e, result_ear1); bool is_border_ear2 = is_ordered_border_elt(ear2_e, result_ear2); bool ear1_valid(false), ear2_valid(false); @@ -1931,8 +1925,7 @@ namespace CGAL { { Validation_case res = validate(ear1, e1.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing: case " << res << std::endl; e2 = compute_value(edge_Ifacet_2); if (ordered_key.first == v1) @@ -1948,8 +1941,7 @@ namespace CGAL { { Validation_case res = validate(ear2, e2.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing : case " << res << std::endl; e1 = compute_value(edge_Ifacet_1); if (ordered_key.first == v1) @@ -1962,25 +1954,23 @@ namespace CGAL { _ordered_border.insert(Radius_ptr_type(e1.first, p1)); } } - else// les deux oreilles ne se recollent pas sur la meme arete... + else // both ears do not glue on the same edge { - // on resoud la singularite. + // resolve the singularity if (ear1_valid) { Validation_case res = validate(ear1, e1.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing: case " << res << std::endl; } if (ear2_valid) { Validation_case res = validate(ear2, e2.first); if (!((res == EAR_CASE)||(res == FINAL_CASE))) - std::cerr << "+++probleme de recollement : cas " - << res << std::endl; + std::cerr << "+++issue in glueing : case " << res << std::endl; } - // on met a jour la PQ s'il y a lieu... mais surtout pas - // avant la resolution de la singularite + + // Update the PQ if needed, but not before resolving the singularity if (!ear1_valid) { _ordered_border.insert(Radius_ptr_type(e1.first, p1)); @@ -2020,7 +2010,7 @@ namespace CGAL { if (new_candidate.first == STANDBY_CANDIDATE) { - // a garder pour un K un peu plus grand... + // put aside for a slightly larger K new_candidate.first = STANDBY_CANDIDATE_BIS; } @@ -2042,8 +2032,8 @@ namespace CGAL { void extend() { - // initilisation de la variable globale K: qualite d'echantillonnage requise - K = K_init; // valeur d'initialisation de K pour commencer prudemment... + // Initialize the global variable K: required sampling quality + K = K_init; // initial value of K to start carefully coord_type K_prev = K; Vertex_handle v1, v2; @@ -2052,7 +2042,7 @@ namespace CGAL { } do { - min_K = infinity(); // pour retenir le prochain K necessaire pour progresser... + min_K = infinity(); // to store the next K required to progress do { @@ -2095,7 +2085,7 @@ namespace CGAL { { new_candidate = compute_value(mem_Ifacet); if ((new_candidate != mem_e_it)) - // &&(new_candidate.first < NOT_VALID_CANDIDATE)) + // &&(new_candidate.first < NOT_VALID_CANDIDATE)) { IO_edge_type* pnew = set_again_border_elt(key_tmp.first, key_tmp.second, @@ -2111,8 +2101,7 @@ namespace CGAL { (_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS)); K_prev = K; K += (std::max)(K_step, min_K - K + eps); - // on augmente progressivement le K mais on a deja rempli sans - // faire des betises auparavant... + // Progressively increase K, but having already filled without issue beforehand } while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity())&&(K!=K_prev)); @@ -2125,9 +2114,8 @@ namespace CGAL { //--------------------------------------------------------------------- - // En principe, si l'allocateur de cellules etait bien fait on aurait pas besoin - // de mettre a jour les valeurs rajoutees pour les cellules a la main... - + // In theory, if the cell allocator were properly made, one would not need to manually update + // the values added for the cells void re_init_for_free_cells_cache(const Vertex_handle& vh) { @@ -2152,9 +2140,8 @@ namespace CGAL { int index = c->index(vh); Cell_handle neigh = c->neighbor(index); int n_ind = neigh->index(c); - neigh->set_smallest_radius(n_ind, -1); // pour obliger le recalcul - // si c est selectionnee c'est qu'elle est aussi le mem_IFacet renvoye par - // compute_value... donc a swapper aussi + neigh->set_smallest_radius(n_ind, -1); // forces recomputation + // if c is selected, then it is also the mem_IFacet returned by compute_value... so to be swapped too if (c->is_selected_facet(index)) { int fn = c->facet_number(index); @@ -2214,8 +2201,8 @@ namespace CGAL { circ = next(circ); } while(circ.first.first != c); - // si on passe par la, alors y a eu un probleme.... - std::cerr << "+++probleme dans la MAJ avant remove..." << std::endl; + // if we are here, something went wrong + std::cerr << "+++issue in the update before removal..." << std::endl; return Facet(c, start.second); } @@ -2237,7 +2224,7 @@ namespace CGAL { ordered_map_erase(border_elt.second.first.first, border_IO_elt(vh, vh_succ)); remove_border_edge(vh, vh_succ); - // 1- a virer au cas ou car vh va etre detruit + // 1- remove just in case since vh is about to be destroyed remove_interior_edge(vh_succ, vh); bool while_cond(true); do @@ -2266,14 +2253,14 @@ namespace CGAL { { ordered_map_erase(result.first.first, border_IO_elt(vh_int, vh)); remove_border_edge(vh_int, vh); - // 1- a virer au cas ou car vh va etre detruit + // 1- remove just in case since vh is about to be destroyed remove_interior_edge(vh_int, vh); while_cond = false; } - // a titre preventif... on essaye de s'assurer de marquer les aretes - // interieures au sens large... - // 2- a virer a tout pris pour que maintenir le sens de interior edge + // As a preventive measure, we try to ensure marking the interior edges in a broad sense + + // 2- remove to preserve the interior edge remove_interior_edge(vh_int, vh_succ); remove_interior_edge(vh_succ, vh_int); @@ -2304,16 +2291,16 @@ namespace CGAL { bool create_singularity(const Vertex_handle& vh) { - // Pour reperer le cas de triangle isole + // To detect the isolated triangle case if (vh->is_on_border()) { - // vh sommet 0 + // vh vertex 0 Next_border_elt border_elt = *(vh->first_incident()); - Vertex_handle vh_1 = border_elt.first;// sommet 1 + Vertex_handle vh_1 = border_elt.first;// vertex 1 border_elt = *(vh_1->first_incident()); - Vertex_handle vh_2 = border_elt.first;// sommet 2 + Vertex_handle vh_2 = border_elt.first;// vertex 2 border_elt = *(vh_2->first_incident()); - Vertex_handle vh_3 = border_elt.first;// sommet 0 ??? + Vertex_handle vh_3 = border_elt.first;// vertex 0 ??? Cell_handle c; int i, j, k; if ((vh_3 == vh)&&(T.is_facet(vh, vh_1, vh_2, c, i ,j ,k))) @@ -2328,7 +2315,7 @@ namespace CGAL { } - // Reperer le cas d'aretes interieures... + // Detect the interior edges case std::list vh_list; T.incident_vertices(vh, std::back_inserter(vh_list)); @@ -2402,9 +2389,9 @@ namespace CGAL { std::list L_v; - // Pour controler les sommets choisis sur le bord... + // To control vertices chosen on the boundary - // nombre d'aretes a partir duquel on considere que c'est irrecuperable NB_BORDER_MAX + // NB_BORDER_MAX: number of edges from which we consider that things are irrecoverable int vh_on_border_inserted(0); for(Finite_vertices_iterator v_it = T.finite_vertices_begin(); @@ -2445,7 +2432,7 @@ namespace CGAL { std::size_t itmp, L_v_size_mem; L_v_size_mem = L_v.size(); - if ((vh_on_border_inserted != 0)&& // pour ne post-traiter que les bords + if ((vh_on_border_inserted != 0)&& // to post-process only the borders (L_v.size() < .1 * _size_before_postprocessing)) { { @@ -2460,7 +2447,7 @@ namespace CGAL { } #ifdef VERBOSE if(L_v.size() > 0){ - std::cout << " " << L_v.size() << " non regular points." << std::endl; + std::cout << " " << L_v.size() << " non-regular points." << std::endl; } #endif // VERBOSE re_compute_values(); @@ -2469,7 +2456,7 @@ namespace CGAL { postprocess_timer.stop(); return false; } - // we stop if we removed more than 10% of points or after 20 rounds + // we stop if we removed more than 10% of points, or after 20 rounds if ((L_v_size_mem == L_v.size())|| ((_size_before_postprocessing - T.number_of_vertices()) > .1 * _size_before_postprocessing)|| @@ -2479,7 +2466,6 @@ namespace CGAL { } min_K = infinity(); - // fin-- // if (_postprocessing_counter < 5) // return true; postprocess_timer.stop(); diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h index a8c2bf4b2b4..bbecac5c757 100644 --- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h +++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction_vertex_base_3.h @@ -220,7 +220,7 @@ namespace CGAL { else { if (m_incident_border->second->first != nullptr) - std::cerr << "+++probleme de MAJ du bord " << std::endl; + std::cerr << "+++issue while updating border " << std::endl; *m_incident_border->second = elt; } } From 3b640e5e0ad56bac65f322bcb6c5915512cb74c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 23 Nov 2022 21:25:58 +0100 Subject: [PATCH 205/426] Fix the Kernel concept being weaker than TriangulationTraits_23 requirements --- .../Concepts/FunctionObjectConcepts.h | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 566d7643bcd..f6fc1663da5 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -5964,13 +5964,22 @@ public: /// A model of this concept must provide: /// @{ - /*! introduces a variable with Cartesian coordinates \f$ (0,0)\f$. */ Kernel::Point_2 operator()(const CGAL::Origin &CGAL::ORIGIN); + /*! + returns `p`. + + \note It is advised to return a const reference to `p` to avoid useless copies. + + \note This peculiar requirement is necessary because some CGAL structures such as triangulations + internally manipulate points whose type might `Point_2` or `Weighted_point_2`. + */ + Kernel::Point_2 operator()(const Kernel::Point_2& p); + /*! extracts the bare point from the weighted point. */ @@ -6001,6 +6010,16 @@ public: */ Kernel::Point_3 operator()(const CGAL::Origin &CGAL::ORIGIN); + /*! + returns `p`. + + \note It is advised to return a const reference to `p` to avoid useless copies. + + \note This peculiar requirement is necessary because some CGAL structures such as triangulations + internally manipulate points whose type might `Point_3` or `Weighted_point_3`. + */ + Kernel::Point_3 operator()(const Kernel::Point_3& p); + /*! extracts the bare point from the weighted point. */ From 0e8a76e615a4d91c972dfb2f169b1002f08ee626 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 24 Nov 2022 07:53:31 +0000 Subject: [PATCH 206/426] Polygonal Surface Reconstuction: Fix paths in examples --- .../Polygonal_surface_reconstruction.txt | 2 +- .../doc/Polygonal_surface_reconstruction/examples.txt | 2 +- .../Polygonal_surface_reconstruction/CMakeLists.txt | 4 ++-- .../polyfit_example_model_complexty_control.cpp | 6 +++--- .../polyfit_example_user_provided_planes.cpp | 2 +- .../polyfit_example_with_region_growing.cpp | 2 +- .../polyfit_example_without_input_planes.cpp | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Polygonal_surface_reconstruction.txt b/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Polygonal_surface_reconstruction.txt index cbaf4f3e5a1..1f6d1200192 100644 --- a/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Polygonal_surface_reconstruction.txt +++ b/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Polygonal_surface_reconstruction.txt @@ -182,7 +182,7 @@ The following example shows how to control the model complexity by tuning the we \remark This example also shows how to reuse the intermediate results from the candidate generation step. -\cgalExample{Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp} +\cgalExample{Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp} \section secPerformances Performance diff --git a/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/examples.txt b/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/examples.txt index 0b1b37d6a26..24a2ab456cc 100644 --- a/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/examples.txt +++ b/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/examples.txt @@ -1,6 +1,6 @@ /*! \example Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp \example Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp -\example Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp +\example Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp \example Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp */ diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 9db1ae5e988..0fb6ae17322 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -51,13 +51,13 @@ endif() create_single_source_cgal_program("polyfit_example_without_input_planes.cpp") create_single_source_cgal_program("polyfit_example_user_provided_planes.cpp") -create_single_source_cgal_program("polyfit_example_model_complexty_control.cpp") +create_single_source_cgal_program("polyfit_example_model_complexity_control.cpp") create_single_source_cgal_program("polyfit_example_with_region_growing.cpp") foreach( target polyfit_example_without_input_planes polyfit_example_user_provided_planes - polyfit_example_model_complexty_control polyfit_example_with_region_growing) + polyfit_example_model_complexity_control polyfit_example_with_region_growing) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) target_link_libraries(${target} PUBLIC CGAL::SCIP_support) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp index 64fd9a9784a..e132d62975d 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp @@ -90,7 +90,7 @@ int main() return EXIT_FAILURE; } else { - const std::string& output_file = "data/building_result-0.05.off"; + const std::string& output_file = "building_result-0.05.off"; if (CGAL::IO::write_OFF(output_file, model)) { std::cout << " Done. Saved to " << output_file << ". Time: " << t.time() << " sec." << std::endl; } @@ -108,7 +108,7 @@ int main() return EXIT_FAILURE; } else { - const std::string& output_file = "data/building_result-0.5.off"; + const std::string& output_file = "building_result-0.5.off"; if (CGAL::IO::write_OFF(output_file, model)) std::cout << " Done. Saved to " << output_file << ". Time: " << t.time() << " sec." << std::endl; else { @@ -125,7 +125,7 @@ int main() return EXIT_FAILURE; } else { - const std::string& output_file = "data/building_result-0.7.off"; + const std::string& output_file = "building_result-0.7.off"; if (CGAL::IO::write_OFF(output_file, model)){ std::cout << " Done. Saved to " << output_file << ". Time: " << t.time() << " sec." << std::endl; } diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp index 733f0113749..2f2ed2df2c9 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp @@ -89,7 +89,7 @@ int main() } // Saves the mesh model - const std::string& output_file("data/ball_result.off"); + const std::string& output_file("user_provided_planes_result.off"); if (CGAL::IO::write_OFF(output_file, model)) std::cout << " Done. Saved to " << output_file << ". Time: " << t.time() << " sec." << std::endl; else { diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp index 8dc81bd3c1e..493c8c138aa 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp @@ -172,7 +172,7 @@ int main() std::cout << "Saving..."; t.reset(); - const std::string& output_file("data/cube_result.off"); + const std::string& output_file("with_region_growing_result.off"); if (CGAL::IO::write_OFF(output_file, model)) std::cout << " Done. Saved to " << output_file << ". Time: " << t.time() << " sec." << std::endl; else { diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp index 85e474d99d7..4b2ed8f91a4 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp @@ -125,7 +125,7 @@ int main() return EXIT_FAILURE; } - const std::string& output_file("data/cube_result.off"); + const std::string& output_file("without_input_planes_result.off"); if (CGAL::IO::write_OFF(output_file, model)) std::cout << " Done. Saved to " << output_file << ". Time: " << t.time() << " sec." << std::endl; else { @@ -138,7 +138,7 @@ int main() // Also stores the candidate faces as a surface mesh to a file Surface_mesh candidate_faces; algo.output_candidate_faces(candidate_faces); - const std::string& candidate_faces_file("data/cube_candidate_faces.off"); + const std::string& candidate_faces_file("without_input_planes_cube_candidate_faces.off"); std::ofstream candidate_stream(candidate_faces_file.c_str()); if (CGAL::IO::write_OFF(candidate_stream, candidate_faces)) std::cout << "Candidate faces saved to " << candidate_faces_file << "." << std::endl; From 1cce49285b90d969500afbb67b16dd3bfeaa8ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 24 Nov 2022 08:56:50 +0100 Subject: [PATCH 207/426] fix doc issue (locally tested) --- .../doc/Minkowski_sum_2/CGAL/approximated_offset_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h index d53817e4676..8ccc2643a0e 100644 --- a/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h +++ b/Minkowski_sum_2/doc/Minkowski_sum_2/CGAL/approximated_offset_2.h @@ -14,7 +14,7 @@ several disconnected components. The result is therefore represented as a sequence of generalized polygons, whose edges are either line segments or circular arcs. The output sequence is returned via the output iterator `oi`, whose -value-type must be `Gps_circle_segment_traits_2::Polygon_2`. +value-type must be `Gps_circle_segment_traits_2::%Polygon_2`. \pre `P` is a simple polygon. */ template From 9734f71e121332f39961d314b40d6135a1c312e6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 24 Nov 2022 08:01:21 +0000 Subject: [PATCH 208/426] Rename example file --- ...y_control.cpp => polyfit_example_model_complexity_control.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/{polyfit_example_model_complexty_control.cpp => polyfit_example_model_complexity_control.cpp} (100%) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp similarity index 100% rename from Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexty_control.cpp rename to Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp From 45609cfc4729a52d49d70d64c57ead5032e0f412 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 24 Nov 2022 09:30:35 +0100 Subject: [PATCH 209/426] unused typedef --- Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index 36192b297c6..90b6216f5f7 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -216,7 +216,6 @@ void tetrahedral_isotropic_remeshing( = choose_parameter(get_parameter(np, internal_np::smooth_constrained_edges), false); - typedef typename Tr::Cell_handle Cell_handle; typedef typename internal_np::Lookup_named_param_def < internal_np::cell_selector_t, NamedParameters, From 18ff1d425657bccc04904cfeb5829b477a06ec9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 24 Nov 2022 11:39:50 +0100 Subject: [PATCH 210/426] Add missing CGAL enums to Homogeneous_d --- Kernel_d/include/CGAL/Cartesian_d.h | 4 ++-- Kernel_d/include/CGAL/Homogeneous_d.h | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Kernel_d/include/CGAL/Cartesian_d.h b/Kernel_d/include/CGAL/Cartesian_d.h index f23ed661412..cb4d1f848c2 100644 --- a/Kernel_d/include/CGAL/Cartesian_d.h +++ b/Kernel_d/include/CGAL/Cartesian_d.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include @@ -71,7 +71,7 @@ public: typedef typename Point_d_base::Cartesian_const_iterator Cartesian_const_iterator_d; - // Boolean had originally been Bool. It was renamed to avoid a conflict + // Boolean had originally been Bool. It was renamed to avoid a conflict // between a macro defined in Xlib.h poorly chosen to have the same name, // that is 'Bool'. typedef typename Same_uncertainty_nt::type diff --git a/Kernel_d/include/CGAL/Homogeneous_d.h b/Kernel_d/include/CGAL/Homogeneous_d.h index 5f8026fbbf5..b5f6981a468 100644 --- a/Kernel_d/include/CGAL/Homogeneous_d.h +++ b/Kernel_d/include/CGAL/Homogeneous_d.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -67,6 +67,24 @@ public: typedef typename Point_d_base::Cartesian_const_iterator Cartesian_const_iterator_d; + // Boolean had originally been Bool. It was renamed to avoid a conflict + // between a macro defined in Xlib.h poorly chosen to have the same name, + // that is 'Bool'. + typedef typename Same_uncertainty_nt::type + Boolean; + typedef typename Same_uncertainty_nt::type + Sign; + typedef typename Same_uncertainty_nt::type + Comparison_result; + typedef typename Same_uncertainty_nt::type + Orientation; + typedef typename Same_uncertainty_nt::type + Oriented_side; + typedef typename Same_uncertainty_nt::type + Bounded_side; + typedef typename Same_uncertainty_nt::type + Angle; + typedef Dynamic_dimension_tag Dimension; template From 0ecffe291342eaf1407594719589259dc253788e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 24 Nov 2022 11:50:06 +0100 Subject: [PATCH 211/426] Avoid conflicts between 'OpenMesh' as a mesh template parameter and namespace --- .../CGAL/boost/graph/properties_OpenMesh.h | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h index bdc9cec7ef0..5ce5808ff81 100644 --- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -130,16 +130,16 @@ public: }; -template +template class OM_edge_weight_pmap { public: typedef boost::readable_property_map_tag category; - typedef typename OpenMesh::Scalar value_type; + typedef typename OM_Mesh::Scalar value_type; typedef value_type reference; - typedef typename boost::graph_traits::edge_descriptor key_type; + typedef typename boost::graph_traits::edge_descriptor key_type; - OM_edge_weight_pmap(const OpenMesh& sm) + OM_edge_weight_pmap(const OM_Mesh& sm) : sm_(sm) {} @@ -151,7 +151,7 @@ public: friend inline value_type get(const OM_edge_weight_pmap& m, const key_type& k) { return m[k]; } private: - const OpenMesh& sm_; + const OM_Mesh& sm_; }; template @@ -175,26 +175,26 @@ public: }; -template +template class OM_point_pmap { public: #if defined(CGAL_USE_OM_POINTS) typedef boost::lvalue_property_map_tag category; - typedef typename OpenMesh::Point value_type; - typedef const typename OpenMesh::Point& reference; + typedef typename OM_Mesh::Point value_type; + typedef const typename OM_Mesh::Point& reference; #else typedef boost::read_write_property_map_tag category; typedef P value_type; typedef P reference; #endif - typedef typename boost::graph_traits::vertex_descriptor key_type; + typedef typename boost::graph_traits::vertex_descriptor key_type; OM_point_pmap() : sm_(nullptr) {} - OM_point_pmap(const OpenMesh& sm) + OM_point_pmap(const OM_Mesh& sm) : sm_(&sm) {} @@ -208,37 +208,37 @@ public: return sm_->point(v); #else CGAL_assertion(sm_!=nullptr); - typename OpenMesh::Point const& omp = sm_->point(v); + typename OM_Mesh::Point const& omp = sm_->point(v); return value_type(omp[0], omp[1], omp[2]); #endif } - inline friend reference get(const OM_point_pmap& pm, key_type v) + inline friend reference get(const OM_point_pmap& pm, key_type v) { CGAL_precondition(pm.sm_!=nullptr); #if defined(CGAL_USE_OM_POINTS) return pm.sm_->point(v); #else CGAL_assertion(pm.sm_!=nullptr); - typename OpenMesh::Point const& omp = pm.sm_->point(v); + typename OM_Mesh::Point const& omp = pm.sm_->point(v); return value_type(omp[0], omp[1], omp[2]); #endif } - inline friend void put(const OM_point_pmap& pm, key_type v, const value_type& p) + inline friend void put(const OM_point_pmap& pm, key_type v, const value_type& p) { CGAL_precondition(pm.sm_!=nullptr); #if defined(CGAL_USE_OM_POINTS) - const_cast(*pm.sm_).set_point(v,p); + const_cast(*pm.sm_).set_point(v,p); #else - typedef typename OpenMesh::vector_traits::value_type Scalar; - const_cast(*pm.sm_).set_point - (v, typename OpenMesh::Point(Scalar(p[0]), Scalar(p[1]), Scalar(p[2]))); + typedef typename OpenMesh::vector_traits::value_type Scalar; + const_cast(*pm.sm_).set_point + (v, typename OM_Mesh::Point(Scalar(p[0]), Scalar(p[1]), Scalar(p[2]))); #endif } private: - const OpenMesh* sm_; + const OM_Mesh* sm_; }; } // CGAL #endif // CGAL_BOOST_GRAPH_PROPERTIES_OPENMESH_H From 87960efc48fdace3c23831534a5eb6f7786e403d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 24 Nov 2022 12:41:05 +0100 Subject: [PATCH 212/426] Fix Line_3 Tet_3 intersection test The construction of the line is only valid if the tet is well oriented --- .../test/Intersections_3/test_intersections_Line_3.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp index 9b5490c0164..6fe55a40654 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp @@ -339,12 +339,15 @@ public: { P tet0 = random_point(), tet1 = random_point(), tet2 = random_point(), tet3 = random_point(); - const Tet tet(tet0, tet1, tet2, tet3); + Tet tet(tet0, tet1, tet2, tet3); if(tet.is_degenerate()) continue; - P l0 = tet0 - CGAL::cross_product(V(tet0, tet1), V(tet0, tet2)); - P l1 = tet3 + CGAL::cross_product(V(tet3, tet1), V(tet3, tet2)); + if(tet.orientation() == CGAL::NEGATIVE) + tet = Tet(tet1, tet0, tet2, tet3); + + P l0 = tet[0] - CGAL::cross_product(V(tet[0], tet[1]), V(tet[0], tet[2])); + P l1 = tet[3] + CGAL::cross_product(V(tet[3], tet[1]), V(tet[3], tet[2])); assert(tet.has_on_unbounded_side(l0) && tet.has_on_unbounded_side(l1)); From 2b44e11fb53929ef6a2c10aadb4528ffcaea91a6 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 24 Nov 2022 13:10:22 +0100 Subject: [PATCH 213/426] Apply suggestions from @albert-github & @afabri --- Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index f6fc1663da5..c770d0b7b40 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -5975,8 +5975,8 @@ public: \note It is advised to return a const reference to `p` to avoid useless copies. - \note This peculiar requirement is necessary because some CGAL structures such as triangulations - internally manipulate points whose type might `Point_2` or `Weighted_point_2`. + \note This peculiar requirement is necessary because some \cgal structures such as triangulations + internally manipulate points whose type might be `Point_2` or `Weighted_point_2`. */ Kernel::Point_2 operator()(const Kernel::Point_2& p); @@ -6015,8 +6015,8 @@ public: \note It is advised to return a const reference to `p` to avoid useless copies. - \note This peculiar requirement is necessary because some CGAL structures such as triangulations - internally manipulate points whose type might `Point_3` or `Weighted_point_3`. + \note This peculiar requirement is necessary because some \cgal structures such as triangulations + internally manipulate points whose type might be `Point_3` or `Weighted_point_3`. */ Kernel::Point_3 operator()(const Kernel::Point_3& p); From 208a4c24a5212a9248281568171c4c4c4c57b0f9 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 24 Nov 2022 13:15:12 +0100 Subject: [PATCH 214/426] Absolve doc --- .../include/CGAL/Polygon_mesh_processing/compute_normal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index ef4412e880b..8bae717f56e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -620,7 +620,7 @@ compute_vertex_normal_as_sum_of_weighted_normals(typename boost::graph_traits Date: Thu, 24 Nov 2022 16:14:11 +0000 Subject: [PATCH 215/426] 3d Demo: Try to read bmp files --- .../include/CGAL/IO/read_vtk_image_data.h | 6 +- .../Plugins/Mesh_3/Io_image_plugin.cpp | 76 +++++++++++++++---- 2 files changed, 64 insertions(+), 18 deletions(-) diff --git a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h index ccce66f3ca6..3b7efa6c4df 100644 --- a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h +++ b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h @@ -85,9 +85,9 @@ read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_ CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]); if(owning == Image_3::OWN_THE_DATA) { image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim); - // std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() - // << "\nimage->size()=" << dims[0]*dims[1]*dims[2] - // << "\nwdim=" << image->wdim << '\n'; + std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() + << "\nimage->size()=" << dims[0]*dims[1]*dims[2] + << "\nwdim=" << image->wdim << '\n'; vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); } else { image->data = vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index f74562e6e58..671850655d6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -49,6 +49,7 @@ #include #include +#include #include #include @@ -60,8 +61,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -1314,24 +1317,67 @@ Image* Io_image_plugin::createDCMImage(QString dirname) { Image* image = nullptr; #ifdef CGAL_USE_VTK - vtkNew dicom_reader; - dicom_reader->SetDirectoryName(dirname.toUtf8()); - auto executive = - vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive()); - if (executive) - { - executive->SetReleaseDataFlag(0, 0); // where 0 is the port index + bool is_dcm = false; + bool is_bmp = false; + + vtkStringArray* files = vtkStringArray::New(); + boost::filesystem::path p(dirname.toUtf8().data()); + for(boost::filesystem::directory_entry& x : boost::filesystem::directory_iterator(p)){ + std::string s(x.path().extension().string()); + if(s == std::string(".dcm") || (s == std::string(".DCM"))){ is_dcm = true;} + if(s == std::string(".bmp") || (s == std::string(".BMP"))){ is_bmp = true;} + std::cout << x.path().string() << std::endl; + files->InsertNextValue(x.path().string()); + } + + if(is_dcm){ + vtkNew dicom_reader; + dicom_reader->SetDirectoryName(dirname.toUtf8()); + + auto executive = + vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive()); + if (executive) + { + executive->SetReleaseDataFlag(0, 0); // where 0 is the port index + } + + vtkNew smoother; + smoother->SetStandardDeviations(1., 1., 1.); + smoother->SetInputConnection(dicom_reader->GetOutputPort()); + smoother->Update(); + auto vtk_image = smoother->GetOutput(); + vtk_image->Print(std::cerr); + image = new Image; + *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the + // image data + } + + if(is_bmp){ + vtkNew bmp_reader; + bmp_reader->SetFileNames(files); + + auto executive = + vtkDemandDrivenPipeline::SafeDownCast(bmp_reader->GetExecutive()); + if (executive) + { + executive->SetReleaseDataFlag(0, 0); // where 0 is the port index + } + vtkNew smoother; + smoother->SetStandardDeviations(1., 1., 1.); + smoother->SetInputConnection(bmp_reader->GetOutputPort()); + smoother->Update(); + auto vtk_image = smoother->GetOutput(); + vtk_image->Print(std::cerr); + image = new Image; + + std::cout << "A" << std::endl; + *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the + // image data + + std::cout << "B" << std::endl; } - vtkNew smoother; - smoother->SetStandardDeviations(1., 1., 1.); - smoother->SetInputConnection(dicom_reader->GetOutputPort()); - smoother->Update(); - auto vtk_image = smoother->GetOutput(); - vtk_image->Print(std::cerr); - image = new Image; - *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data #else CGAL::Three::Three::warning("You need VTK to read a DCM file"); CGAL_USE(dirname); From 0f0bd3ff6d5ac4d6d1cef09510978d44b4cc8a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 25 Nov 2022 01:04:45 +0100 Subject: [PATCH 216/426] WIP bmp reading --- .../include/CGAL/IO/read_vtk_image_data.h | 47 +++++++++++++++---- CGAL_ImageIO/include/CGAL/Image_3.h | 2 +- Mesh_3/doc/Mesh_3/CGAL/Image_3.h | 2 +- .../Plugins/Mesh_3/Io_image_plugin.cpp | 24 ++++++---- 4 files changed, 55 insertions(+), 20 deletions(-) diff --git a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h index 3b7efa6c4df..f230bc32bc3 100644 --- a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h +++ b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h @@ -69,26 +69,55 @@ read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_ image->ty = static_cast(offset[1]); image->tz = static_cast(offset[2]); image->endianness = ::_getEndianness(); + int vtk_type = vtk_image->GetScalarType(); if(vtk_type == VTK_SIGNED_CHAR) vtk_type = VTK_CHAR; - if(vtk_type < 0 || vtk_type > VTK_DOUBLE) - vtk_type = VTK_DOUBLE; - const VTK_to_ImageIO_type_mapper& imageio_type = - VTK_to_ImageIO_type[vtk_type]; + if(vtk_type < 0 || vtk_type > VTK_DOUBLE) vtk_type = VTK_DOUBLE; + const VTK_to_ImageIO_type_mapper& imageio_type = VTK_to_ImageIO_type[vtk_type]; image->wdim = imageio_type.wdim; image->wordKind = imageio_type.wordKind; image->sign = imageio_type.sign; + + const int cn = vtk_image->GetNumberOfScalarComponents(); + if (!vtk_image->GetPointData() || !vtk_image->GetPointData()->GetScalars()) { ::_freeImage(image); return Image_3(); } + + // If there is more than a scalar per point, vtk_image->data is not immediately + // interpretable in Image_3->data + CGAL_assertion(owning == Image_3::OWN_THE_DATA || cn == 1); + CGAL_assertion(vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() == dims[0]*dims[1]*dims[2]); + if(owning == Image_3::OWN_THE_DATA) { - image->data = ::ImageIO_alloc(dims[0]*dims[1]*dims[2]*image->wdim); - std::cerr << "GetNumberOfTuples()=" << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() - << "\nimage->size()=" << dims[0]*dims[1]*dims[2] - << "\nwdim=" << image->wdim << '\n'; - vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); + int dims_n = dims[0]*dims[1]*dims[2]; + image->data = ::ImageIO_alloc(dims_n * image->wdim); + std::cerr << "GetNumberOfTuples() = " << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() << "\n" + << "components = " << cn << "\n" + << "wdim = " << image->wdim << "\n" + << "image->size() = " << dims_n << std::endl; + + if(cn == 1) { + vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); + } else { + std::cerr << "Warning: input has " << cn << " components; only the value of the first component will be used." << std::endl; + + // cast the data void pointers to make it possible to do pointer arithmetic + char* src = static_cast(vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0)); + char* dest = static_cast(image->data); + + for(int i=0; iwdim because we casted to char* and not the actual data type + memcpy(dest + image->wdim*i, src + cn*image->wdim*i, image->wdim * sizeof(char)); + + // Check that we are not discarding useful data + CGAL_assertion(*(src + cn*image->wdim*i) == *(src + cn*image->wdim*i + 1)); + CGAL_assertion(*(src + cn*image->wdim*i) == *(src + cn*image->wdim*i + 2)); + } + } } else { image->data = vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0); } diff --git a/CGAL_ImageIO/include/CGAL/Image_3.h b/CGAL_ImageIO/include/CGAL/Image_3.h index f6b186ef36c..e653e9de83b 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3.h +++ b/CGAL_ImageIO/include/CGAL/Image_3.h @@ -87,7 +87,7 @@ public: protected: Image_shared_ptr image_ptr; - // implementation in src/CGAL_ImageIO/Image_3.cpp + // implementation in Image_3_impl.h bool private_read(_image* im, Own own_the_data = OWN_THE_DATA); public: diff --git a/Mesh_3/doc/Mesh_3/CGAL/Image_3.h b/Mesh_3/doc/Mesh_3/CGAL/Image_3.h index 415638914a4..3f5bce1ddcb 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/Image_3.h +++ b/Mesh_3/doc/Mesh_3/CGAL/Image_3.h @@ -14,7 +14,7 @@ public: /// The default-constructor. The object is invalid until a call to `read()`. Image_3(); - /// Open an 3D image file. + /// Open a 3D image file. /// /// Returns `true` if the file was sucessfully loaded. bool read(const char* file); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 671850655d6..d13f4f8080f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1321,14 +1321,23 @@ Image* Io_image_plugin::createDCMImage(QString dirname) bool is_dcm = false; bool is_bmp = false; + std::vector paths; vtkStringArray* files = vtkStringArray::New(); boost::filesystem::path p(dirname.toUtf8().data()); for(boost::filesystem::directory_entry& x : boost::filesystem::directory_iterator(p)){ std::string s(x.path().extension().string()); - if(s == std::string(".dcm") || (s == std::string(".DCM"))){ is_dcm = true;} - if(s == std::string(".bmp") || (s == std::string(".BMP"))){ is_bmp = true;} - std::cout << x.path().string() << std::endl; - files->InsertNextValue(x.path().string()); + if(s == std::string(".dcm") || (s == std::string(".DCM"))){ is_dcm = true; CGAL_assertion(!is_bmp); } + if(s == std::string(".bmp") || (s == std::string(".BMP"))){ is_bmp = true; CGAL_assertion(!is_dcm); } + paths.push_back(x.path()); + } + + // directory_iterator does not guarantee a sorted order + std::sort(std::begin(paths), std::end(paths)); + + for(const boost::filesystem::path& p : paths) + { + std::cout << p.string() << std::endl; + files->InsertNextValue(p.string()); } if(is_dcm){ @@ -1369,17 +1378,14 @@ Image* Io_image_plugin::createDCMImage(QString dirname) smoother->Update(); auto vtk_image = smoother->GetOutput(); vtk_image->Print(std::cerr); - image = new Image; - std::cout << "A" << std::endl; + image = new Image; *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the // image data - - std::cout << "B" << std::endl; } #else - CGAL::Three::Three::warning("You need VTK to read a DCM file"); + CGAL::Three::Three::warning("You need VTK to read DCM/BMP files"); CGAL_USE(dirname); #endif return image; From 5fbeecaef898b3ed150d09a6232998f9a4b36ed3 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Mon, 28 Nov 2022 10:54:54 +0100 Subject: [PATCH 217/426] disable sharpFeaturesGroup for gray level images --- .../demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp index 246a0fd2f8d..5436c53281e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Mesh_3_plugin.cpp @@ -543,6 +543,9 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, .arg(bbox.ymax() - bbox.ymin(),0,'g',3) .arg(bbox.zmax() - bbox.zmin(),0,'g',3) ); + const bool input_is_labeled_img = (image_item != nullptr && !image_item->isGray()); + const bool input_is_gray_img = (image_item != nullptr && image_item->isGray()); + set_defaults(); double diag = CGAL::sqrt((bbox.xmax()-bbox.xmin())*(bbox.xmax()-bbox.xmin()) + (bbox.ymax()-bbox.ymin())*(bbox.ymax()-bbox.ymin()) + (bbox.zmax()-bbox.zmin())*(bbox.zmax()-bbox.zmin())); ui.facetSizing->setRange(diag * 10e-6, // min @@ -561,11 +564,13 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, ui.protect->setEnabled(features_protection_available); ui.protect->setChecked(features_protection_available); ui.protectEdges->setEnabled(features_protection_available); + if(input_is_gray_img) + ui.sharpFeaturesGroup->setEnabled(false); ui.facegraphCheckBox->setVisible(mesh_type == Mesh_type::SURFACE_ONLY); - ui.initializationGroup->setVisible(image_item != nullptr && - !image_item->isGray()); - ui.grayImgGroup->setVisible(image_item != nullptr && image_item->isGray()); + ui.initializationGroup->setVisible(input_is_labeled_img); + ui.grayImgGroup->setVisible(input_is_gray_img); + if (items->which() == POLYHEDRAL_MESH_ITEMS) ui.volumeGroup->setVisible(mesh_type == Mesh_type::VOLUME && nullptr != bounding_sm_item); @@ -609,7 +614,6 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, connect(ui.useWeights_checkbox, SIGNAL(toggled(bool)), ui.weightsSigma_label, SLOT(setEnabled(bool))); ui.weightsSigma->setValue(1.); - bool input_is_labeled_img = (image_item != nullptr && !image_item->isGray()); ui.labeledImgGroup->setVisible(input_is_labeled_img); #ifndef CGAL_USE_ITK From 76c695dfc12106d43a28b6ce341789f5f7ceb245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 28 Nov 2022 12:01:12 +0100 Subject: [PATCH 218/426] Fix assertion that G & B colors are the same as R (only gray is supported) --- CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h index f230bc32bc3..0587f7a8c58 100644 --- a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h +++ b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h @@ -111,11 +111,11 @@ read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_ for(int i=0; iwdim because we casted to char* and not the actual data type - memcpy(dest + image->wdim*i, src + cn*image->wdim*i, image->wdim * sizeof(char)); + memcpy(dest + image->wdim*i, src + cn*image->wdim*i, image->wdim); - // Check that we are not discarding useful data - CGAL_assertion(*(src + cn*image->wdim*i) == *(src + cn*image->wdim*i + 1)); - CGAL_assertion(*(src + cn*image->wdim*i) == *(src + cn*image->wdim*i + 2)); + // Check that we are not discarding useful data (i.e., green & blue are identical to red) + CGAL_assertion(memcmp(src + cn*image->wdim*i, src + cn*image->wdim*i + image->wdim, image->wdim) == 0); + CGAL_assertion(memcmp(src + cn*image->wdim*i, src + cn*image->wdim*i + 2*image->wdim, image->wdim) == 0); } } } else { From 45c0ecfe42b41af63ff943162689f608c6b8b605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 28 Nov 2022 12:05:59 +0100 Subject: [PATCH 219/426] Add an extra assertion --- CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h | 1 + 1 file changed, 1 insertion(+) diff --git a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h index 0587f7a8c58..22b19dee6ed 100644 --- a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h +++ b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h @@ -103,6 +103,7 @@ read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_ vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); } else { std::cerr << "Warning: input has " << cn << " components; only the value of the first component will be used." << std::endl; + CGAL_assertion(cn >= 3); // if it's more than 1, it needs to be more than 3 // cast the data void pointers to make it possible to do pointer arithmetic char* src = static_cast(vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0)); From aee677f2897f22684f4cfb36c54f65484fa51414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 28 Nov 2022 12:13:50 +0100 Subject: [PATCH 220/426] Revert "Use OpenMesh::DefaultTraitsDouble directly instead of custom traits" This reverts commit 16da969e88cf9ca926de63c40a1d21fea550d5f3. So that it does not bump OpenMesh required version --- .../Linear_cell_complex_2/openmesh_performance.h | 11 ++++++++++- .../Cactus_deformation_session_OpenMesh.cpp | 15 +++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h b/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h index afdb700c75b..71ff72ea813 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/openmesh_performance.h @@ -22,10 +22,19 @@ public: mesh.request_face_normals(); } + private: - typedef OpenMesh::TriMesh_ArrayKernelT Mesh; + + struct MyTraits : public OpenMesh::DefaultTraits + { + typedef OpenMesh::Vec3d Point; + typedef OpenMesh::Vec3d Normal; + }; + + typedef OpenMesh::TriMesh_ArrayKernelT Mesh; Mesh mesh; + private: void display_info() { diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp index 06817a78b71..fe1aded57c0 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/Cactus_deformation_session_OpenMesh.cpp @@ -13,10 +13,17 @@ #include -typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; -typedef Mesh::Point Point; -typedef boost::graph_traits::vertex_descriptor vertex_descriptor; -typedef boost::graph_traits::vertex_iterator vertex_iterator; +struct DoubleTraits : public OpenMesh::DefaultTraits +{ + typedef OpenMesh::Vec3d Point; + typedef OpenMesh::Vec3d Normal; +}; + + +typedef OpenMesh::PolyMesh_ArrayKernelT Mesh; +typedef Mesh::Point Point; +typedef boost::graph_traits::vertex_descriptor vertex_descriptor; +typedef boost::graph_traits::vertex_iterator vertex_iterator; typedef CGAL::Surface_mesh_deformation Deform_mesh_arap; typedef CGAL::Surface_mesh_deformation Deform_mesh_spoke; From 0b56297ea2b1e215bed1dbc99e204b3e93b56f2c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Nov 2022 14:05:59 +0000 Subject: [PATCH 221/426] Polygon Mesh Processing: Fix CGAL_assertion_msg --- .../Polygon_mesh_processing/isotropic_remeshing_example.cpp | 3 +++ .../internal/Isotropic_remeshing/remesh_impl.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp index 9db3996b581..0a01650a082 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp @@ -1,3 +1,6 @@ +#define CGAL_NO_ASSERTIONS + + #include #include #include diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index b75198cd96a..08f18872a52 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -328,7 +328,7 @@ namespace internal { halfedge_status_pmap_ = get(CGAL::dynamic_halfedge_property_t(), pmesh); CGAL_assertion_code(input_mesh_is_valid_ = CGAL::is_valid_polygon_mesh(pmesh)); - CGAL_warning_msg(input_mesh_is_valid_, + CGAL_assertion_msg(input_mesh_is_valid_, "The input mesh is not a valid polygon mesh. " "It could lead PMP::isotropic_remeshing() to fail."); } From 92a4a4180ded369b509f3a75c01325d3cf6a8e84 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Nov 2022 14:15:53 +0000 Subject: [PATCH 222/426] Polyhedron demo: unamed --- Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp | 2 +- .../Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index b4a495d9422..8216f422372 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -1069,7 +1069,7 @@ public Q_SLOTS: selection_item->set_is_insert(is_insert); selection_item->set_k_ring(k_ring); selection_item->setRenderingMode(Flat); - if(selection_item->name() == "unamed") { + if(selection_item->name() == "unnamed") { selection_item->setName(tr("%1 (selection)").arg(poly_item->name())); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp index 03259d7e6eb..d6be0d38c6a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Shortest_path_plugin.cpp @@ -222,7 +222,7 @@ void Polyhedron_demo_shortest_path_plugin::new_item(int itemIndex) item->setRenderingMode(Flat); - if(item->name() == "unamed") + if(item->name() == "unnamed") { item->setName(tr("%1 (shortest path computation item)").arg(item->polyhedron_item()->name())); } From 675d4a4efff66ae710e274e2990db5bccda2b598 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Nov 2022 14:22:42 +0000 Subject: [PATCH 223/426] Remove debug code --- .../Polygon_mesh_processing/isotropic_remeshing_example.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp index 0a01650a082..9db3996b581 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp @@ -1,6 +1,3 @@ -#define CGAL_NO_ASSERTIONS - - #include #include #include From 6572a8fb585af2494539366dd117d3cda451d8c1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 28 Nov 2022 14:39:20 +0000 Subject: [PATCH 224/426] It's a warning not an assertion --- .../internal/Isotropic_remeshing/remesh_impl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h index 08f18872a52..b062ecfed2d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Isotropic_remeshing/remesh_impl.h @@ -327,8 +327,8 @@ namespace internal { { halfedge_status_pmap_ = get(CGAL::dynamic_halfedge_property_t(), pmesh); - CGAL_assertion_code(input_mesh_is_valid_ = CGAL::is_valid_polygon_mesh(pmesh)); - CGAL_assertion_msg(input_mesh_is_valid_, + CGAL_warning_code(input_mesh_is_valid_ = CGAL::is_valid_polygon_mesh(pmesh)); + CGAL_warning_msg(input_mesh_is_valid_, "The input mesh is not a valid polygon mesh. " "It could lead PMP::isotropic_remeshing() to fail."); } From 128cc719fe4708bbd1a26d4374ce7dd99c0890f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 29 Nov 2022 11:14:22 +0100 Subject: [PATCH 225/426] missing } --- .../include/CGAL/Polygon_mesh_processing/orientation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index 1458ca18b00..fa239568322 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -1649,8 +1649,8 @@ void merge_reversible_connected_components(PolygonMesh& pm, * \cgalParamNBegin{face_partition_id_map} * \cgalParamDescription{a property map filled by this function and that will contain for each face * the id of its surface component after reversal and stitching in the range `[0, n - 1]`, - * with `n` the number of such components. - * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::face_descriptor` as key type and `std::size_t` as value type} + * with `n` the number of such components.} + * \cgalParamType{a class model of `WritablePropertyMap` with `boost::graph_traits::%face_descriptor` as key type and `std::size_t` as value type} * \cgalParamNEnd * \cgalNamedParamsEnd * From 2c8d3179609fefa7a8c4b503f9ca4f1ee4e9febf Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 10:45:00 +0000 Subject: [PATCH 226/426] Spatial_searching: Fix doc --- .../doc/Spatial_searching/CGAL/Weighted_Minkowski_distance.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Spatial_searching/doc/Spatial_searching/CGAL/Weighted_Minkowski_distance.h b/Spatial_searching/doc/Spatial_searching/CGAL/Weighted_Minkowski_distance.h index d82fd2ca8b7..e1575fb05f3 100644 --- a/Spatial_searching/doc/Spatial_searching/CGAL/Weighted_Minkowski_distance.h +++ b/Spatial_searching/doc/Spatial_searching/CGAL/Weighted_Minkowski_distance.h @@ -52,7 +52,8 @@ Constructor implementing \f$ l_2\f$ metric for \f$ d\f$-dimensional points. Weighted_Minkowski_distance(int d,Traits t=Traits()); /*! -Constructor implementing the \f$ l_{power}(weights)\f$ metric. \f$ power \leq0\f$ denotes the \f$ l_{\infty}(weights)\f$ metric. +Constructor implementing the \f$ l_{power}(weights)\f$ metric. `power=0` +denotes the \f$ l_{\infty}(weights)\f$ metric. The values in the iterator range `[wb,we)` are the weight. */ template From 7babddf4433658039057a73465370288d33b94b1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 12:45:47 +0000 Subject: [PATCH 227/426] PMP: Replace parameter with named parameter --- .../triangulate_hole.h | 122 ++++++++++++++++-- .../internal/parameters_interface.h | 4 +- 2 files changed, 115 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index f246500b49a..7b0aa01149f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -70,19 +70,25 @@ namespace Polygon_mesh_processing { must not intersect the surface. Otherwise, additionally, the boundary of the hole must not contain any non-manifold vertex. The patch generated does not introduce non-manifold edges nor degenerate triangles. If a hole cannot be triangulated, - `pmesh` is not modified and nothing is recorded in `out`. + `pmesh` is not modified and nothing is recorded in the face output + iterator. @tparam PolygonMesh a model of `MutableFaceGraph` - @tparam OutputIterator a model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces. @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh containing the hole @param border_halfedge a border halfedge incident to the hole - @param out iterator over patch faces @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin + + \cgalParamNBegin{face_output_iterator_t} + \cgalParamDescription{iterator over patch faces} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} \cgalParamDescription{a property map associating points to the vertices of `pmesh`} \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -156,19 +162,113 @@ namespace Polygon_mesh_processing { @todo handle the case where an island is reduced to a point */ template - OutputIterator + typename CGAL_NP_TEMPLATE_PARAMETERS> + void // @todo was OutputIterator triangulate_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, - OutputIterator out, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { using parameters::choose_parameter; using parameters::get_parameter; using parameters::get_parameter_reference; - typedef typename GetGeomTraits::type GeomTraits; + typedef typename GetGeomTraits::type GeomTraits; + + Emptyset_iterator default_face_output_iterator; + typedef typename internal_np::Lookup_named_param_def::reference Face_output_iterator; + + Face_output_iterator out = choose_parameter(get_parameter_reference(np, internal_np::face_output_iterator), default_face_output_iterator); + + bool use_dt3 = +#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 + false; +#else + choose_parameter(get_parameter(np, internal_np::use_delaunay_triangulation), true); +#endif + + CGAL_precondition(face(border_halfedge, pmesh) == boost::graph_traits::null_face()); + bool use_cdt = +#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 + false; +#else + choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); +#endif + + typename GeomTraits::FT max_squared_distance = typename GeomTraits::FT(-1); + if (use_cdt) { + + std::vector points; + typedef Halfedge_around_face_circulator Hedge_around_face_circulator; + const auto vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)); + Hedge_around_face_circulator circ(border_halfedge, pmesh), done(circ); + do { + points.push_back(get(vpmap, target(*circ, pmesh))); + } while (++circ != done); + + const typename GeomTraits::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); + typename GeomTraits::FT default_squared_distance = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); + default_squared_distance /= typename GeomTraits::FT(16); // one quarter of the bbox height + + const typename GeomTraits::FT threshold_distance = choose_parameter( + get_parameter(np, internal_np::threshold_distance), typename GeomTraits::FT(-1)); + max_squared_distance = default_squared_distance; + if (threshold_distance >= typename GeomTraits::FT(0)) + max_squared_distance = threshold_distance * threshold_distance; + CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0)); + } + + Hole_filling::Default_visitor default_visitor; + + // @todo was return + internal::triangulate_hole_polygon_mesh( + pmesh, + border_halfedge, + out, + choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), + use_dt3, + choose_parameter(get_parameter(np, internal_np::geom_traits)), + use_cdt, + choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), + choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), + max_squared_distance).first; + } + +#ifndef CGAL_NO_DEPRECATED_CODE + /*! + \ingroup PMP_hole_filling_grp + + \deprecated This function is deprecated since \cgal 5.6 and the + overload with the named parameter `face_output_iterator` should be + used instead. + + Triangulates a hole in a polygon mesh. + + + @tparam PolygonMesh a model of `MutableFaceGraph` + @tparam OutputIterator a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + */ + template + CGAL_DEPRECATED + OutputIterator + triangulate_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + OutputIterator out, + const CGAL_NP_CLASS& np = parameters::default_values()) + { + // As soon as the other one returns something + // return triangulate_hole(pmesh, border_halfedge,np.face_output_iterator(out)); + + using parameters::choose_parameter; + using parameters::get_parameter; + using parameters::get_parameter_reference; + + typedef typename GetGeomTraits::type GeomTraits; bool use_dt3 = #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 @@ -221,7 +321,9 @@ namespace Polygon_mesh_processing { choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), max_squared_distance).first; + } +#endif // CGAL_NO_DEPRECATED_CODE /*! \ingroup PMP_hole_filling_grp diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index c5ad5f82e96..b6b7c46efb8 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -29,6 +29,9 @@ CGAL_add_named_parameter(metis_options_t, METIS_options, METIS_options) CGAL_add_named_parameter(vertex_partition_id_t, vertex_partition_id, vertex_partition_id_map) CGAL_add_named_parameter(face_partition_id_t, face_partition_id, face_partition_id_map) +CGAL_add_named_parameter(vertex_output_iterator_t, vertex_output_iterator, vertex_output_iterator) +CGAL_add_named_parameter(face_output_iterator_t, face_output_iterator, face_output_iterator) + CGAL_add_named_parameter(vertex_to_vertex_output_iterator_t, vertex_to_vertex_output_iterator, vertex_to_vertex_output_iterator) CGAL_add_named_parameter(halfedge_to_halfedge_output_iterator_t, halfedge_to_halfedge_output_iterator, halfedge_to_halfedge_output_iterator) CGAL_add_named_parameter(face_to_face_output_iterator_t, face_to_face_output_iterator, face_to_face_output_iterator) @@ -327,4 +330,3 @@ CGAL_add_named_parameter_with_compatibility_ref_only(sizing_field_param_t, sizin CGAL_add_named_parameter_with_compatibility(function_param_t, function_param, function) CGAL_add_named_parameter_with_compatibility(bounding_object_param_t, bounding_object_param, bounding_object) - From 8708d348dd05a7a4ba9eb4fe2af3c316bc769a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 29 Nov 2022 13:58:40 +0100 Subject: [PATCH 228/426] remove extra _t --- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 7b0aa01149f..7e27eeeebdd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -82,7 +82,7 @@ namespace Polygon_mesh_processing { \cgalNamedParamsBegin - \cgalParamNBegin{face_output_iterator_t} + \cgalParamNBegin{face_output_iterator} \cgalParamDescription{iterator over patch faces} \cgalParamType{a model of `OutputIterator` holding `boost::graph_traits::%face_descriptor` for patch faces} From c07dc61b4f47863936f4dcf1ba489e499c9ded6d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 13:13:07 +0000 Subject: [PATCH 229/426] Use new version in test --- .../triangulate_hole_Polyhedron_3_no_delaunay_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp index 1dcb214fe39..15aa7558d45 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -134,7 +134,7 @@ void test_triangulate_hole(const std::string file_name) { for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, CGAL::parameters::face_output_iterator(back_inserter(patch))); if(patch.empty()) { std::cerr << " Error: empty patch created." << std::endl; assert(false); From 699454ae84d76afd4f0198fffe65d2392ef98fa1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 13:22:00 +0000 Subject: [PATCH 230/426] STL Extensions: Correct spelling --- .../include/CGAL/Compact_container_with_index.h | 5 ++++- .../Chapter_iterators_and_circulators.txt | 2 +- STL_Extension/doc/STL_Extension/CGAL/Compact_container.h | 2 +- .../doc/STL_Extension/CGAL/Concurrent_compact_container.h | 2 +- STL_Extension/include/CGAL/Compact_container.h | 8 +++++++- STL_Extension/include/CGAL/Concurrent_compact_container.h | 6 +++++- .../test/STL_Extension/test_Compact_container.cpp | 8 ++++---- .../STL_Extension/test_Concurrent_compact_container.cpp | 8 ++++---- TDS_3/include/CGAL/Triangulation_data_structure_3.h | 8 ++++---- 9 files changed, 31 insertions(+), 18 deletions(-) diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index 37d555793b6..7cbd54e5c94 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -752,7 +752,10 @@ public: return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const + { return cit!=end() && owns(cit); } + + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const { return cit!=end() && owns(cit); } /** Reserve method to ensure that the capacity of the Compact_container be diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt index b7450d5cd3d..bb7567c4858 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_iterators_and_circulators.txt @@ -42,7 +42,7 @@ Thus we will not give a full description of these concept here but only a few hints about how to use and write handle, iterators and circulators in \cgal. Developers should consult the above-mentioned references to become familiar with the iterator, circulator and handle concepts. In particular, the notions of iterator and circulator ranges, -dereferencable and past-the-end values, +dereferenceable and past-the-end values, mutable and constant iterators and circulators, and the different categories (forward, bidirectional, random-access, etc.) of iterators and circulators, are fundamental. diff --git a/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h index 98a1af5ceb6..dd409ee8f02 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Compact_container.h @@ -672,7 +672,7 @@ bool owns(const_iterator pos); /*! * returns whether `pos` is in the range `[cc.begin(), cc`.end())` (`cc.end()` excluded). */ -bool owns_dereferencable(const_iterator pos); +bool owns_dereferenceable(const_iterator pos); /// @} diff --git a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h index 65e853f489a..608c81f2f7a 100644 --- a/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/doc/STL_Extension/CGAL/Concurrent_compact_container.h @@ -294,7 +294,7 @@ complexity. No exception is thrown. /// returns whether `pos` is in the range `[ccc.begin(), ccc.end()]` (`ccc.end()` included). bool owns(const_iterator pos); /// returns whether `pos` is in the range `[ccc.begin(), ccc`.end())` (`ccc.end()` excluded). - bool owns_dereferencable(const_iterator pos); + bool owns_dereferenceable(const_iterator pos); /// @} diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 93a6debd770..cbdec0be4ac 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -537,7 +537,13 @@ public: return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const + { + return cit != end() && owns(cit); + } + + + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const { return cit != end() && owns(cit); } diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 6bbdeee9176..1c50020ae5d 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -542,11 +542,15 @@ public: return false; } - bool owns_dereferencable(const_iterator cit) const + bool owns_dereferenceable(const_iterator cit) const { return cit != end() && owns(cit); } + CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const + { + return cit != end() && owns(cit); + } /** Reserve method to ensure that the capacity of the Concurrent_compact_container be * greater or equal than a given value n. */ diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index 661ec453cbd..d2d96cdfc4b 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -242,15 +242,15 @@ void test(const Cont &) assert(c11.size() == v1.size()); assert(c10 == c11); - // owns() and owns_dereferencable(). + // owns() and owns_dereferenceable(). for(typename Cont::const_iterator it = c9.begin(), end = c9.end(); it != end; ++it) { assert(c9.owns(it)); - assert(c9.owns_dereferencable(it)); + assert(c9.owns_dereferenceable(it)); assert(! c10.owns(it)); - assert(! c10.owns_dereferencable(it)); + assert(! c10.owns_dereferenceable(it)); } assert(c9.owns(c9.end())); - assert(! c9.owns_dereferencable(c9.end())); + assert(! c9.owns_dereferenceable(c9.end())); c9.erase(c9.begin(), c9.end()); diff --git a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp index 00f2e1da4ec..a42676f8f7f 100644 --- a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp @@ -322,15 +322,15 @@ void test(const Cont &) assert(c11.size() == v1.size()); assert(c10 == c11);*/ - // owns() and owns_dereferencable(). + // owns() and owns_dereferenceable(). for(typename Cont::const_iterator it = c9.begin(), end = c9.end(); it != end; ++it) { assert(c9.owns(it)); - assert(c9.owns_dereferencable(it)); + assert(c9.owns_dereferenceable(it)); assert(! c10.owns(it)); - assert(! c10.owns_dereferencable(it)); + assert(! c10.owns_dereferenceable(it)); } assert(c9.owns(c9.end())); - assert(! c9.owns_dereferencable(c9.end())); + assert(! c9.owns_dereferenceable(c9.end())); c9.erase(c9.begin(), c9.end()); diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index 8f2df91c48a..6333387f28b 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -2049,7 +2049,7 @@ bool Triangulation_data_structure_3:: is_vertex(Vertex_handle v) const { - return vertices().owns_dereferencable(v); + return vertices().owns_dereferenceable(v); } template @@ -2102,7 +2102,7 @@ is_edge(Cell_handle c, int i, int j) const if ( (dimension() == 2) && ((i>2) || (j>2)) ) return false; if ((i>3) || (j>3)) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2149,7 +2149,7 @@ is_facet(Cell_handle c, int i) const if ( (dimension() == 2) && (i!=3) ) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template @@ -2161,7 +2161,7 @@ is_cell( Cell_handle c ) const if (dimension() < 3) return false; - return cells().owns_dereferencable(c); + return cells().owns_dereferenceable(c); } template From 352860ffa4eb2c68b5d96c877db2357c7f219faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 29 Nov 2022 14:24:11 +0100 Subject: [PATCH 231/426] one solution for the return type --- .../triangulate_hole.h | 36 +++++++++---------- ...ate_hole_Polyhedron_3_no_delaunay_test.cpp | 18 ++++++---- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 7e27eeeebdd..b951d9eca74 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -151,7 +151,8 @@ namespace Polygon_mesh_processing { \cgalNamedParamsEnd - @return `out` + @return if an output iterator `out` has been passed to `np` in `face_output_iterator()`, then `out` is returned, + otherwise `Emptyset_iterator()` is returned. \todo handle islands @todo Replace border_halfedge by a range of border halfedges. @@ -163,7 +164,7 @@ namespace Polygon_mesh_processing { */ template - void // @todo was OutputIterator + auto triangulate_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, const CGAL_NP_CLASS& np = parameters::default_values()) @@ -174,12 +175,11 @@ namespace Polygon_mesh_processing { typedef typename GetGeomTraits::type GeomTraits; - Emptyset_iterator default_face_output_iterator; typedef typename internal_np::Lookup_named_param_def::reference Face_output_iterator; + Emptyset_iterator>::type Face_output_iterator; - Face_output_iterator out = choose_parameter(get_parameter_reference(np, internal_np::face_output_iterator), default_face_output_iterator); + Face_output_iterator out = choose_parameter(get_parameter(np, internal_np::face_output_iterator)); bool use_dt3 = #ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 @@ -221,18 +221,18 @@ namespace Polygon_mesh_processing { Hole_filling::Default_visitor default_visitor; - // @todo was return - internal::triangulate_hole_polygon_mesh( - pmesh, - border_halfedge, - out, - choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), - use_dt3, - choose_parameter(get_parameter(np, internal_np::geom_traits)), - use_cdt, - choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), - choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), - max_squared_distance).first; + return + internal::triangulate_hole_polygon_mesh( + pmesh, + border_halfedge, + out, + choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), + use_dt3, + choose_parameter(get_parameter(np, internal_np::geom_traits)), + use_cdt, + choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), + choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), + max_squared_distance).first; } #ifndef CGAL_NO_DEPRECATED_CODE @@ -264,7 +264,7 @@ namespace Polygon_mesh_processing { // As soon as the other one returns something // return triangulate_hole(pmesh, border_halfedge,np.face_output_iterator(out)); - using parameters::choose_parameter; + using parameters::choose_parameter; using parameters::get_parameter; using parameters::get_parameter_reference; diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp index 15aa7558d45..1a9ffb42f24 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -112,7 +112,8 @@ void test_triangulate_hole_weight(const std::string file_name, std::size_t nb_re for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; CGAL::Polygon_mesh_processing::triangulate_hole( - poly, *it, back_inserter(patch),CGAL::parameters::use_delaunay_triangulation(true)); + poly, *it, CGAL::parameters::use_delaunay_triangulation(true). + face_output_iterator(back_inserter(patch))); if(patch.empty()) { continue; } } @@ -161,15 +162,17 @@ void test_triangulate_hole_should_be_no_output(const std::string file_name) { for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_delaunay_triangulation(false)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters::use_delaunay_triangulation(false). + face_output_iterator(back_inserter(patch))); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); } - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_delaunay_triangulation(true)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters::use_delaunay_triangulation(true). + face_output_iterator(back_inserter(patch))); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); @@ -258,11 +261,12 @@ void test_ouput_iterators_triangulate_hole(const std::string file_name) { typename std::vector::iterator it_2 = border_reps_2.begin(); for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, CGAL::parameters::face_output_iterator(back_inserter(patch))); std::vector patch_2 = patch; Facet_handle* output_it = - CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, &*patch_2.begin()); + CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, + CGAL::parameters::face_output_iterator(&*patch_2.begin())); if(patch.size() != (std::size_t)(output_it - &*patch_2.begin())) { std::cerr << " Error: returned facet output iterator is not valid!" << std::endl; From 63ffb5e82fcd91acc2644023eebe92017b498a24 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 14:49:59 +0000 Subject: [PATCH 232/426] Do the same for the other hole filling functions --- .../triangulate_hole.h | 238 +++++++++++------- ...ate_hole_Polyhedron_3_no_delaunay_test.cpp | 22 +- 2 files changed, 150 insertions(+), 110 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index b951d9eca74..00f18d5b40c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -243,7 +243,7 @@ namespace Polygon_mesh_processing { overload with the named parameter `face_output_iterator` should be used instead. - Triangulates a hole in a polygon mesh. + \briefTriangulates a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` @@ -261,67 +261,7 @@ namespace Polygon_mesh_processing { OutputIterator out, const CGAL_NP_CLASS& np = parameters::default_values()) { - // As soon as the other one returns something - // return triangulate_hole(pmesh, border_halfedge,np.face_output_iterator(out)); - - using parameters::choose_parameter; - using parameters::get_parameter; - using parameters::get_parameter_reference; - - typedef typename GetGeomTraits::type GeomTraits; - - bool use_dt3 = -#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_DT3 - false; -#else - choose_parameter(get_parameter(np, internal_np::use_delaunay_triangulation), true); -#endif - - CGAL_precondition(face(border_halfedge, pmesh) == boost::graph_traits::null_face()); - bool use_cdt = -#ifdef CGAL_HOLE_FILLING_DO_NOT_USE_CDT2 - false; -#else - choose_parameter(get_parameter(np, internal_np::use_2d_constrained_delaunay_triangulation), false); -#endif - - typename GeomTraits::FT max_squared_distance = typename GeomTraits::FT(-1); - if (use_cdt) { - - std::vector points; - typedef Halfedge_around_face_circulator Hedge_around_face_circulator; - const auto vpmap = choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)); - Hedge_around_face_circulator circ(border_halfedge, pmesh), done(circ); - do { - points.push_back(get(vpmap, target(*circ, pmesh))); - } while (++circ != done); - - const typename GeomTraits::Iso_cuboid_3 bbox = CGAL::bounding_box(points.begin(), points.end()); - typename GeomTraits::FT default_squared_distance = CGAL::abs(CGAL::squared_distance(bbox.vertex(0), bbox.vertex(5))); - default_squared_distance /= typename GeomTraits::FT(16); // one quarter of the bbox height - - const typename GeomTraits::FT threshold_distance = choose_parameter( - get_parameter(np, internal_np::threshold_distance), typename GeomTraits::FT(-1)); - max_squared_distance = default_squared_distance; - if (threshold_distance >= typename GeomTraits::FT(0)) - max_squared_distance = threshold_distance * threshold_distance; - CGAL_assertion(max_squared_distance >= typename GeomTraits::FT(0)); - } - - Hole_filling::Default_visitor default_visitor; - - return internal::triangulate_hole_polygon_mesh( - pmesh, - border_halfedge, - out, - choose_parameter(get_parameter(np, internal_np::vertex_point), get_property_map(vertex_point, pmesh)), - use_dt3, - choose_parameter(get_parameter(np, internal_np::geom_traits)), - use_cdt, - choose_parameter(get_parameter(np, internal_np::do_not_use_cubic_algorithm), false), - choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor), - max_squared_distance).first; - + return triangulate_hole(pmesh, border_halfedge,np.face_output_iterator(out)); } #endif // CGAL_NO_DEPRECATED_CODE @@ -330,19 +270,28 @@ namespace Polygon_mesh_processing { @brief triangulates and refines a hole in a polygon mesh. @tparam PolygonMesh must be model of `MutableFaceGraph` - @tparam FacetOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces. - @tparam VertexOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%vertex_descriptor` for patch vertices. @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh which has the hole @param border_halfedge a border halfedge incident to the hole - @param face_out output iterator over patch faces - @param vertex_out output iterator over patch vertices without including the boundary @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin + + \cgalParamNBegin{face_output_iterator} + \cgalParamDescription{iterator over patch faces} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + + \cgalParamNBegin{vertex_output_iterator} + \cgalParamDescription{iterator over patch vertices} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} \cgalParamDescription{a property map associating points to the vertices of `pmesh`} \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -411,7 +360,7 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalNamedParamsEnd - @return pair of `face_out` and `vertex_out` + @return pair of face and vertex output iterator \sa CGAL::Polygon_mesh_processing::triangulate_hole() \sa CGAL::Polygon_mesh_processing::refine() @@ -419,53 +368,108 @@ namespace Polygon_mesh_processing { \todo handle islands */ template - std::pair - triangulate_and_refine_hole(PolygonMesh& pmesh, + typename CGAL_NP_TEMPLATE_PARAMETERS> + auto + triangulate_and_refine_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, - FaceOutputIterator face_out, - VertexOutputIterator vertex_out, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { using parameters::choose_parameter; + using parameters::get_parameter; using parameters::get_parameter_reference; + typedef typename internal_np::Lookup_named_param_def::type Face_output_iterator; + + Face_output_iterator face_out = choose_parameter(get_parameter(np, internal_np::face_output_iterator)); + + typedef typename internal_np::Lookup_named_param_def::type Vertex_output_iterator; + + Vertex_output_iterator vertex_out = choose_parameter(get_parameter(np, internal_np::vertex_output_iterator)); + std::vector::face_descriptor> patch; triangulate_hole(pmesh, border_halfedge, std::back_inserter(patch), np); face_out = std::copy(patch.begin(), patch.end(), face_out); Hole_filling::Default_visitor default_visitor; typedef typename internal_np::Lookup_named_param_def::reference Visitor; Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor); visitor.start_refine_phase(); - std::pair res = refine(pmesh, patch, face_out, vertex_out, np); + std::pair res = refine(pmesh, patch, face_out, vertex_out, np); visitor.end_refine_phase(); return res; } + +#ifndef CGAL_NO_DEPRECATED_CODE + /*! + \ingroup PMP_hole_filling_grp + + \deprecated This function is deprecated since \cgal 5.6 and the + overload with the named parameters `face_output_iterator` and + `vertex_output_iterator` should be used instead. + + @brief triangulates and refines a hole in a polygon mesh. + + @tparam PolygonMesh must be model of `MutableFaceGraph` + @tparam FaceOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces. + @tparam VertexOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + */ + + template + CGAL_DEPRECATED + std::pair + triangulate_and_refine_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + FaceOutputIterator face_out, + VertexOutputIterator vertex_out, + const CGAL_NP_CLASS& np = parameters::default_values()) + { + return triangulate_and_refine_hole(pmesh, border_halfedge, + np.face_output_iterator(face_out).vertex_output_iterator(vertex_out)); + } +#endif // CGAL_NO_DEPRECATED_CODE + /*! \ingroup PMP_hole_filling_grp @brief triangulates, refines and fairs a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` - @tparam FaceOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%face_descriptor` for patch faces - @tparam VertexOutputIterator model of `OutputIterator` - holding `boost::graph_traits::%vertex_descriptor` for patch vertices @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" @param pmesh polygon mesh which has the hole @param border_halfedge a border halfedge incident to the hole - @param face_out output iterator over patch faces - @param vertex_out output iterator over patch vertices without including the boundary + @param np an optional sequence of \ref bgl_namedparameters "Named Parameters" among the ones listed below \cgalNamedParamsBegin + + \cgalParamNBegin{face_output_iterator} + \cgalParamDescription{iterator over patch faces} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + + \cgalParamNBegin{vertex_output_iterator} + \cgalParamDescription{iterator over patch vertices} + \cgalParamType{a model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices} + \cgalParamDefault{`Emptyset_iterator`} + \cgalParamNEnd + \cgalParamNBegin{vertex_point_map} \cgalParamDescription{a property map associating points to the vertices of `pmesh`} \cgalParamType{a class model of `ReadWritePropertyMap` with `boost::graph_traits::%vertex_descriptor` @@ -543,10 +547,8 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalNamedParamsEnd - @return tuple of - - `bool`: `true` if fairing is successful - - `face_out` - - `vertex_out` + @return tuple of `bool` with `true` if fairing is successful, and + the face and vertex output iterator \sa CGAL::Polygon_mesh_processing::triangulate_hole() \sa CGAL::Polygon_mesh_processing::refine() @@ -555,23 +557,32 @@ namespace Polygon_mesh_processing { \todo handle islands */ template - std::tuple + typename CGAL_NP_TEMPLATE_PARAMETERS> + auto triangulate_refine_and_fair_hole(PolygonMesh& pmesh, typename boost::graph_traits::halfedge_descriptor border_halfedge, - FaceOutputIterator face_out, - VertexOutputIterator vertex_out, - const NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { CGAL_precondition(CGAL::is_triangle_mesh(pmesh)); using parameters::choose_parameter; + using parameters::get_parameter; using parameters::get_parameter_reference; CGAL_precondition(is_valid_halfedge_descriptor(border_halfedge, pmesh)); + typedef typename internal_np::Lookup_named_param_def::type Face_output_iterator; + + Face_output_iterator face_out = choose_parameter(get_parameter(np, internal_np::face_output_iterator)); + + typedef typename internal_np::Lookup_named_param_def::type Vertex_output_iterator; + + Vertex_output_iterator vertex_out = choose_parameter(get_parameter(np, internal_np::vertex_output_iterator)); + std::vector::vertex_descriptor> patch; face_out = triangulate_and_refine_hole (pmesh, border_halfedge, face_out, std::back_inserter(patch), np).first; @@ -580,7 +591,7 @@ namespace Polygon_mesh_processing { Hole_filling::Default_visitor default_visitor; typedef typename internal_np::Lookup_named_param_def::reference Visitor; Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor); @@ -592,6 +603,39 @@ namespace Polygon_mesh_processing { return std::make_tuple(fair_success, face_out, vertex_out); } + #ifndef CGAL_NO_DEPRECATED_CODE + /*! + \ingroup PMP_hole_filling_grp + + \deprecated This function is deprecated since \cgal 5.6 and the + overload with the named parameters `face_output_iterator` and + `vertex_output_iterator` should be used instead. + + \brief Triangulates, refines, and fairs a hole in a polygon mesh. + + @tparam PolygonMesh a model of `MutableFaceGraph` + @tparam FaceOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%face_descriptor` for patch faces. + @tparam VertexOutputIterator model of `OutputIterator` + holding `boost::graph_traits::%vertex_descriptor` for patch vertices. + @tparam NamedParameters a sequence of \ref bgl_namedparameters "Named Parameters" + */ + template + CGAL_DEPRECATED + std::tuple + triangulate_refine_and_fair_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + FaceOutputIterator face_out, + VertexOutputIterator vertex_out, + const CGAL_NP_CLASS& np = parameters::default_values()) + { + return triangulate_refine_and_fair_hole(pmesh, border_halfedge, np.face_output_iterator(face_out).vertex_output_iterator(vertex_out)); + } +#endif // CGAL_NO_DEPRECATED_CODE + /*! \ingroup PMP_hole_filling_grp creates triangles to fill the hole defined by points in the range `points`. diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp index 1a9ffb42f24..af6459bc13f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -112,8 +112,7 @@ void test_triangulate_hole_weight(const std::string file_name, std::size_t nb_re for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; CGAL::Polygon_mesh_processing::triangulate_hole( - poly, *it, CGAL::parameters::use_delaunay_triangulation(true). - face_output_iterator(back_inserter(patch))); + poly, *it, back_inserter(patch),CGAL::parameters::use_delaunay_triangulation(true)); if(patch.empty()) { continue; } } @@ -162,17 +161,15 @@ void test_triangulate_hole_should_be_no_output(const std::string file_name) { for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, - CGAL::parameters::use_delaunay_triangulation(false). - face_output_iterator(back_inserter(patch))); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), + CGAL::parameters::use_delaunay_triangulation(false)); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); } - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, - CGAL::parameters::use_delaunay_triangulation(true). - face_output_iterator(back_inserter(patch))); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), + CGAL::parameters::use_delaunay_triangulation(true)); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); @@ -197,7 +194,7 @@ void test_triangulate_and_refine_hole(const std::string file_name) { std::vector patch_facets; std::vector patch_vertices; CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, *it, - back_inserter(patch_facets), back_inserter(patch_vertices)); + CGAL::parameters::face_output_iterator(back_inserter(patch_facets)).vertex_output_iterator(back_inserter(patch_vertices))); if(patch_facets.empty()) { std::cerr << " Error: empty patch created." << std::endl; @@ -228,7 +225,7 @@ void test_triangulate_refine_and_fair_hole(const std::string file_name) { std::vector patch_facets; std::vector patch_vertices; CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, - *it, back_inserter(patch_facets), back_inserter(patch_vertices)); + *it, CGAL::parameters::face_output_iterator(back_inserter(patch_facets)).vertex_output_iterator(back_inserter(patch_vertices))); if(patch_facets.empty()) { std::cerr << " Error: empty patch created." << std::endl; @@ -261,12 +258,11 @@ void test_ouput_iterators_triangulate_hole(const std::string file_name) { typename std::vector::iterator it_2 = border_reps_2.begin(); for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, CGAL::parameters::face_output_iterator(back_inserter(patch))); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch)); std::vector patch_2 = patch; Facet_handle* output_it = - CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, - CGAL::parameters::face_output_iterator(&*patch_2.begin())); + CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, &*patch_2.begin()); if(patch.size() != (std::size_t)(output_it - &*patch_2.begin())) { std::cerr << " Error: returned facet output iterator is not valid!" << std::endl; From a2e599b23dbff2f77338ddd38c5c13de8f7dbb3a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 29 Nov 2022 16:55:43 +0000 Subject: [PATCH 233/426] Fix typos --- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 00f18d5b40c..19ad06bca15 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -151,8 +151,7 @@ namespace Polygon_mesh_processing { \cgalNamedParamsEnd - @return if an output iterator `out` has been passed to `np` in `face_output_iterator()`, then `out` is returned, - otherwise `Emptyset_iterator()` is returned. + @return the face output iterator \todo handle islands @todo Replace border_halfedge by a range of border halfedges. @@ -243,7 +242,7 @@ namespace Polygon_mesh_processing { overload with the named parameter `face_output_iterator` should be used instead. - \briefTriangulates a hole in a polygon mesh. + \brief Triangulates a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` From 2b26b8dd319b04256f08e23a035c96c66b32fdf8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 30 Nov 2022 07:58:02 +0000 Subject: [PATCH 234/426] Don't use deprecated code in examples --- .../Polygon_mesh_processing/hole_filling_example.cpp | 6 +++--- .../Polygon_mesh_processing/hole_filling_example_LCC.cpp | 6 +++--- .../Polygon_mesh_processing/hole_filling_example_OM.cpp | 6 +++--- .../Polygon_mesh_processing/hole_filling_example_SM.cpp | 4 ++-- .../hole_filling_visitor_example.cpp | 6 ------ .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 4 ++-- 6 files changed, 13 insertions(+), 19 deletions(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example.cpp index 41d23352506..8c7d009461b 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example.cpp @@ -41,9 +41,9 @@ int main(int argc, char* argv[]) std::vector patch_vertices; bool success = std::get<0>(PMP::triangulate_refine_and_fair_hole(poly, h, - std::back_inserter(patch_facets), - std::back_inserter(patch_vertices), - CGAL::parameters::vertex_point_map(get(CGAL::vertex_point, poly)) + CGAL::parameters::face_output_iterator(std::back_inserter(patch_facets)) + .vertex_output_iterator(std::back_inserter(patch_vertices)) + .vertex_point_map(get(CGAL::vertex_point, poly)) .geom_traits(Kernel()))); std::cout << " Number of facets in constructed patch: " << patch_facets.size() << std::endl; diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_LCC.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_LCC.cpp index 2c5550009d2..be7b6166e4e 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_LCC.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_LCC.cpp @@ -43,9 +43,9 @@ int main(int argc, char* argv[]) std::vector patch_vertices; bool success = std::get<0>(PMP::triangulate_refine_and_fair_hole(mesh, h, - std::back_inserter(patch_facets), - std::back_inserter(patch_vertices), - CGAL::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)) + CGAL::parameters::face_output_iterator(std::back_inserter(patch_facets)) + .vertex_output_iterator(std::back_inserter(patch_vertices)) + .vertex_point_map(get(CGAL::vertex_point, mesh)) .geom_traits(Kernel()))); std::cout << "* Number of facets in constructed patch: " << patch_facets.size() << std::endl; diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp index db5082b82b4..46371fd8df1 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_OM.cpp @@ -40,9 +40,9 @@ int main(int argc, char* argv[]) std::vector patch_facets; std::vector patch_vertices; bool success = std::get<0>(PMP::triangulate_refine_and_fair_hole(mesh, h, - std::back_inserter(patch_facets), - std::back_inserter(patch_vertices), - CGAL::parameters::vertex_point_map(get(CGAL::vertex_point, mesh)) + CGAL::parameters::face_output_iterator(std::back_inserter(patch_facets)) + .vertex_output_iterator(std::back_inserter(patch_vertices)) + .vertex_point_map(get(CGAL::vertex_point, mesh)) .geom_traits(Kernel()))); assert(CGAL::is_valid_polygon_mesh(mesh)); diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp index b20e4e568b8..b7e9177269b 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_example_SM.cpp @@ -79,8 +79,8 @@ int main(int argc, char* argv[]) std::vector patch_vertices; bool success = std::get<0>(PMP::triangulate_refine_and_fair_hole(mesh, h, - std::back_inserter(patch_facets), - std::back_inserter(patch_vertices))); + CGAL::parameters::face_output_iterator(std::back_inserter(patch_facets)) + .vertex_output_iterator(std::back_inserter(patch_vertices)))); std::cout << "* Number of facets in constructed patch: " << patch_facets.size() << std::endl; std::cout << " Number of vertices in constructed patch: " << patch_vertices.size() << std::endl; diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_visitor_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_visitor_example.cpp index 3586d28edf0..62db322764a 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_visitor_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/hole_filling_visitor_example.cpp @@ -160,23 +160,17 @@ int main(int argc, char* argv[]) !is_small_hole(h, mesh, max_hole_diam, max_num_hole_edges)) continue; - std::vector patch_facets; - std::vector patch_vertices; Progress progress(10.0); bool success = false; try { success = std::get<0>(PMP::triangulate_refine_and_fair_hole(mesh, h, - std::back_inserter(patch_facets), - std::back_inserter(patch_vertices), CGAL::parameters::visitor(std::ref(progress)).use_delaunay_triangulation(true))); } catch (const Stop&) { std::cout << "We stopped with a timeout" << std::endl; } - std::cout << "* Number of facets in constructed patch: " << patch_facets.size() << std::endl; - std::cout << " Number of vertices in constructed patch: " << patch_vertices.size() << std::endl; std::cout << " Is fairing successful: " << success << std::endl; ++nb_holes; } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 19ad06bca15..e04ebf64113 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -242,7 +242,7 @@ namespace Polygon_mesh_processing { overload with the named parameter `face_output_iterator` should be used instead. - \brief Triangulates a hole in a polygon mesh. + \brief triangulates a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` @@ -610,7 +610,7 @@ namespace Polygon_mesh_processing { overload with the named parameters `face_output_iterator` and `vertex_output_iterator` should be used instead. - \brief Triangulates, refines, and fairs a hole in a polygon mesh. + \brief triangulates, refines, and fairs a hole in a polygon mesh. @tparam PolygonMesh a model of `MutableFaceGraph` @tparam FaceOutputIterator model of `OutputIterator` From 2a2e319061fee867e76ee10ca6f676a08120db62 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 30 Nov 2022 08:16:57 +0000 Subject: [PATCH 235/426] Don't use deprecated code in demo --- .../Plugins/PMP/Hole_filling_plugin.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index 94300e439fa..fbc5fe8af1b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -706,9 +706,10 @@ bool Polyhedron_demo_hole_filling_plugin::fill CGAL::parameters::use_delaunay_triangulation(use_DT)); } else if(action_index == 1) { - CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, - it, std::back_inserter(patch), CGAL::Emptyset_iterator(), - CGAL::parameters::density_control_factor(alpha). + CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, it, + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch)). + density_control_factor(alpha). use_delaunay_triangulation(use_DT)); } else { @@ -716,9 +717,9 @@ bool Polyhedron_demo_hole_filling_plugin::fill bool success; if(weight_index == 0) { - success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, - it, std::back_inserter(patch), CGAL::Emptyset_iterator(), + success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, it, CGAL::parameters:: + face_output_iterator(std::back_inserter(patch)). weight_calculator(CGAL::Weights::Uniform_weight()). density_control_factor(alpha). fairing_continuity(continuity). @@ -726,9 +727,9 @@ bool Polyhedron_demo_hole_filling_plugin::fill } else { auto pmap = get_property_map(CGAL::vertex_point, poly); - success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, - it, std::back_inserter(patch), CGAL::Emptyset_iterator(), + success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, it, CGAL::parameters:: + face_output_iterator(std::back_inserter(patch)). weight_calculator(CGAL::Weights::Secure_cotangent_weight_with_voronoi_area(poly, pmap)). density_control_factor(alpha). fairing_continuity(continuity). From 7e9885e046544159433460ed3dcd59cd9a29a8ca Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 30 Nov 2022 09:16:13 +0000 Subject: [PATCH 236/426] Mesh_3: Add test for determinism when not checking for features --- Mesh_3/test/Mesh_3/CMakeLists.txt | 2 + ...t_meshing_without_features_determinism.cpp | 157 ++++++++++++++++++ 2 files changed, 159 insertions(+) create mode 100644 Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3f91ea357bd..4345fc5a91f 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -48,6 +48,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "test_meshing_unit_tetrahedron.cpp" ) create_single_source_cgal_program( "test_meshing_with_default_edge_size.cpp" ) create_single_source_cgal_program( "test_meshing_determinism.cpp" ) + create_single_source_cgal_program( "test_meshing_without_features_determinism.cpp" ) create_single_source_cgal_program( "test_mesh_3_issue_1554.cpp" ) create_single_source_cgal_program( "test_mesh_polyhedral_domain_with_features_deprecated.cpp" ) create_single_source_cgal_program( "test_meshing_with_one_step.cpp" ) @@ -76,6 +77,7 @@ if ( CGAL_FOUND ) test_meshing_unit_tetrahedron test_meshing_with_default_edge_size test_meshing_determinism + test_meshing_without_features_determinism test_mesh_3_issue_1554 test_mesh_polyhedral_domain_with_features_deprecated test_mesh_cell_base_3 diff --git a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp new file mode 100644 index 00000000000..6673bbf9acb --- /dev/null +++ b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#ifdef CGAL_LINKED_WITH_TBB +#define TBB_PREVIEW_GLOBAL_CONTROL 1 +# include +#endif + +// To avoid verbose function and named parameters call +using namespace CGAL::parameters; + +template +void test() +{ + // Collect options + std::size_t nb_runs = 2; + unsigned int nb_lloyd = 2; + unsigned int nb_odt = 2; + double perturb_bound = 10.; + double exude_bound = 15.; + + // Domain + typedef CGAL::Exact_predicates_inexact_constructions_kernel K; + typedef CGAL::Mesh_polyhedron_3::type Polyhedron; + typedef CGAL::Polyhedral_mesh_domain_with_features_3 Mesh_domain; + + // Triangulation + typedef typename CGAL::Mesh_triangulation_3::type Tr; + typedef CGAL::Mesh_complex_3_in_triangulation_3< + Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_index> C3t3; + + // Mesh Criteria + typedef CGAL::Mesh_criteria_3

      Mesh_criteria; + + // Domain + std::cout << "\tSeed is\t 0" << std::endl; + std::ifstream input(CGAL::data_file_path("meshes/cube.off")); + Polyhedron polyhedron; + input >> polyhedron; + Mesh_domain domain(polyhedron); + //no random generator is given, so CGAL::Random(0) is used + + + // Mesh criteria + Mesh_criteria criteria(edge_size = 0.2, + facet_angle = 25, + facet_size = 0.2, + facet_distance = 0.002, + cell_radius_edge_ratio = 3, + cell_size = 0.2); + + // iterate + std::vector output_c3t3; + std::vector output_surfaces; + output_c3t3.reserve(5 * nb_runs); + for(std::size_t i = 0; i < nb_runs; ++i) + { + std::cout << "------- Iteration " << (i+1) << " -------" << std::endl; + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + no_perturb(), + no_exude()); + std::ostringstream oss; + CGAL::IO::write_MEDIT(oss, c3t3); + output_c3t3.push_back(oss.str()); //[5*i] + oss.clear(); + Polyhedron out_poly; + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, out_poly); + oss << out_poly; + output_surfaces.push_back(oss.str());//[5*i] + out_poly.clear(); + oss.clear(); + + //LLOYD (1) + CGAL::lloyd_optimize_mesh_3(c3t3, domain, max_iteration_number = nb_lloyd); + CGAL::IO::write_MEDIT(oss, c3t3); + output_c3t3.push_back(oss.str());//[i*5+1] + oss.clear(); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, out_poly); + oss << out_poly; + output_surfaces.push_back(oss.str());//[i*5+1] + out_poly.clear(); + oss.clear(); + + //ODT (2) + CGAL::odt_optimize_mesh_3(c3t3, domain, max_iteration_number = nb_odt); + CGAL::IO::write_MEDIT(oss, c3t3); + output_c3t3.push_back(oss.str());//[i*5+2] + oss.clear(); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, out_poly); + oss << out_poly; + output_surfaces.push_back(oss.str());//[i*5+2] + out_poly.clear(); + oss.clear(); + + //PERTURB (3) + CGAL::perturb_mesh_3(c3t3, domain, sliver_bound=perturb_bound); + CGAL::IO::write_MEDIT(oss, c3t3); + output_c3t3.push_back(oss.str());//[i*5+3] + oss.clear(); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, out_poly); + oss << out_poly; + output_surfaces.push_back(oss.str());//[i*5+3] + out_poly.clear(); + oss.clear(); + + //EXUDE (4) + CGAL::exude_mesh_3(c3t3, sliver_bound=exude_bound); + CGAL::IO::write_MEDIT(oss, c3t3); + output_c3t3.push_back(oss.str());//[i*5+4] + oss.clear(); + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, out_poly); + oss << out_poly; + output_surfaces.push_back(oss.str());//[i*5+4] + out_poly.clear(); + oss.clear(); + + if(i == 0) + continue; + //else check + for(std::size_t j = 0; j < 5; ++j) + { + if(0 != output_c3t3[5*(i-1)+j].compare(output_c3t3[5*i+j])) + { + std::cerr << "Meshing operation " << j << " is not deterministic.\n"; + assert(false); + } + if (0 != output_surfaces[5 * (i - 1) + j].compare(output_surfaces[5 * i + j])) + { + std::cerr << "Output surface after operation " << j << " is not deterministic.\n"; + assert(false); + } + } + } +} + +int main(int, char*[]) +{ + test(); +#ifdef CGAL_LINKED_WITH_TBB + tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); + test(); +#endif +} From f79d8bb542f57bbd9749e18bf984a7390fad0ff7 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 30 Nov 2022 10:31:13 +0100 Subject: [PATCH 237/426] Spelling corrections After review --- Nef_2/include/CGAL/Nef_2/gen_point_location.h | 2 +- .../include/CGAL/Polygon_mesh_processing/triangulate_hole.h | 2 +- .../demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/include/Point_set_3.h | 2 +- Polynomial/include/CGAL/Polynomial/resultant.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Nef_2/include/CGAL/Nef_2/gen_point_location.h b/Nef_2/include/CGAL/Nef_2/gen_point_location.h index f63bed48dfd..c479a9af62a 100644 --- a/Nef_2/include/CGAL/Nef_2/gen_point_location.h +++ b/Nef_2/include/CGAL/Nef_2/gen_point_location.h @@ -345,7 +345,7 @@ public: /*{\Mtypes}*/ // define additional types typedef GenericLocation Location; - /*{\Mtypedef usual return value for the point loction.}*/ + /*{\Mtypedef usual return value for the point location.}*/ enum Direction { downwards, upwards}; /*{\Menum used to specify the direction for the point location.}*/ diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index 63267b3a379..6cb9b1ca70f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -410,7 +410,7 @@ namespace Polygon_mesh_processing { \cgalParamNEnd \cgalParamNBegin{density_control_factor} - \cgalParamDescription{factor to control density of the otuput mesh, + \cgalParamDescription{factor to control density of the output mesh, where larger values cause denser refinements, as in `refine()`} \cgalParamType{double} \cgalParamDefault{\f$ \sqrt{2}\f$} diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp index e733323eed4..127ece2b53f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/Example_plugin.cpp @@ -109,7 +109,7 @@ void Scene_triangle_item::draw(CGAL::Three::Viewer_interface* viewer) const } //set the uniform properties for the TriangleContainer. - //Uniform values are setd at each draw call and are defined for the whole item. + //Uniform values are set at each draw call and are defined for the whole item. //Values per simplex are computed as buffers in ComputeElements() and bound in initializeBuffers(). getTriangleContainer(0)->setColor(this->color()); getTriangleContainer(0)->draw(viewer, true); diff --git a/Polyhedron/demo/Polyhedron/include/Point_set_3.h b/Polyhedron/demo/Polyhedron/include/Point_set_3.h index b9237b9f67c..943d18681cc 100644 --- a/Polyhedron/demo/Polyhedron/include/Point_set_3.h +++ b/Polyhedron/demo/Polyhedron/include/Point_set_3.h @@ -34,7 +34,7 @@ /// - User is responsible to call invalidate_bounds() after adding, moving or removing points. /// - Selecting points changes the order of the points in the /// container. If selection is *not* empty, it becomes invalid after -/// adding, moving or removing points, user is responsible to call +/// adding, moving or removing points, the user is responsible for calling /// unselect_all() in those cases. /// /// @heading Parameters: diff --git a/Polynomial/include/CGAL/Polynomial/resultant.h b/Polynomial/include/CGAL/Polynomial/resultant.h index c70f8a073fa..78d079bb0d8 100644 --- a/Polynomial/include/CGAL/Polynomial/resultant.h +++ b/Polynomial/include/CGAL/Polynomial/resultant.h @@ -46,7 +46,7 @@ namespace CGAL { // The implementation uses interpolatation for multivariate polynomials // Due to the recursive structuture of CGAL::Polynomial it is better // to write the function such that the inner most variable is eliminated. -// However, CGAL::internal::resultant(F,G) eliminates the outer most variabl. +// However, CGAL::internal::resultant(F,G) eliminates the outer most variable. // This is due to backward compatibility issues with code base on EXACUS. // In turn CGAL::internal::resultant_(F,G) eliminates the innermost variable. From 8ddf7848a0a820c0d187dd911a525341cce7e05b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 30 Nov 2022 10:03:45 +0000 Subject: [PATCH 238/426] forward call instead of duplicated code --- Combinatorial_map/include/CGAL/Compact_container_with_index.h | 2 +- STL_Extension/include/CGAL/Compact_container.h | 2 +- STL_Extension/include/CGAL/Concurrent_compact_container.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Combinatorial_map/include/CGAL/Compact_container_with_index.h b/Combinatorial_map/include/CGAL/Compact_container_with_index.h index 7cbd54e5c94..a87122500fc 100644 --- a/Combinatorial_map/include/CGAL/Compact_container_with_index.h +++ b/Combinatorial_map/include/CGAL/Compact_container_with_index.h @@ -756,7 +756,7 @@ public: { return cit!=end() && owns(cit); } CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const - { return cit!=end() && owns(cit); } + { return owns_dereferenceable(cit); } /** Reserve method to ensure that the capacity of the Compact_container be * greater or equal than a given value n. diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index cbdec0be4ac..b8c1cb0769c 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -545,7 +545,7 @@ public: CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const { - return cit != end() && owns(cit); + return owns_dereferenceable(cit); } /** Reserve method to ensure that the capacity of the Compact_container be diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 1c50020ae5d..395f8a483f4 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -549,8 +549,9 @@ public: CGAL_DEPRECATED bool owns_dereferencable(const_iterator cit) const { - return cit != end() && owns(cit); + return owns_dereferenceable(cit); } + /** Reserve method to ensure that the capacity of the Concurrent_compact_container be * greater or equal than a given value n. */ From 8d4aaa945dd785e3a16e0010d62975adb9bc6eb0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 30 Nov 2022 11:55:32 +0000 Subject: [PATCH 239/426] Use istream.eof() --- CGAL_Core/include/CGAL/CORE/CoreIO_impl.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h index 0e4a2044e74..f63446d6364 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h @@ -103,7 +103,7 @@ int skip_comment_line (std::istream & in) { } } while (c == ' ' || c == '\t' || c == '\n'); - if (c == EOF) + if (in.eof()) core_io_error_handler("CoreIO::read_from_file()","unexpected end of file."); in.putback(c); @@ -191,7 +191,11 @@ void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) { buffer = new char[size+2]; // read digits - for (int i=0; (i Date: Wed, 30 Nov 2022 13:28:48 +0100 Subject: [PATCH 240/426] close files before writing --- Documentation/doc/scripts/html_output_post_processing.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index 44d15aa6d70..772a98b7424 100755 --- a/Documentation/doc/scripts/html_output_post_processing.py +++ b/Documentation/doc/scripts/html_output_post_processing.py @@ -236,6 +236,7 @@ def automagically_number_figures(): d = pq(file_content.read(), parser="html") d('a.el').each( lambda i: update_figure_ref(i,global_anchor_map) ) d('a.elRef').each( lambda i: update_figure_ref(i,global_anchor_map) ) + file_content.close() write_out_html(d, fname) ############################################################################### @@ -278,6 +279,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') tr_tags.each(lambda i: rearrange_img(i, dir_name)) span_tags = d('table.directory tr span') span_tags.each(lambda i: rearrange_icon(i, dir_name)) + file_content.close() write_out_html(d,fn) class_files=list(package_glob('./*/class*.html')) class_files.extend(package_glob('./*/struct*.html')) @@ -293,6 +295,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') ident = d('#nav-path .navelem').eq(0).children().eq(0) if ident and ident.attr('href') == 'namespaceCGAL.html': ident.attr('href', '../Manual/namespaceCGAL.html') + file_content.close() write_out_html(d, fn) namespace_files=package_glob('./*/namespace*.html') @@ -303,6 +306,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') if ident.size() == 1: conceptify_ns(d); d.remove("#CGALConceptNS") + file_content.close() write_out_html(d, fn) # in a group we only need to change the nested-classes @@ -311,6 +315,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') file_content = codecs.open(fn, 'r', encoding='utf-8') d = pq(file_content.read(), parser="html") conceptify_nested_classes(d) + file_content.close() write_out_html(d, fn) # fix up Files @@ -323,6 +328,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') if row_id != None: # figure out the rowid and then drop everything from the table that matches table("tr").filter(lambda i: re.match(row_id + '*', pq(this).attr('id'))).remove() + file_content.close() write_out_html(d, fn) #Rewrite the code for index trees images @@ -355,6 +361,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') # in hasModels.html, generalizes.html and refines.html, it is always Class. If this changes in # future versions of doxygen, the regular expression will be ready dts.each(lambda i: pq(this).html(re.sub("((Class )|(Struct ))", "Concept ", pq(this).html()))) + file_content.close() write_out_html(d, fn) # throw out nav-sync @@ -364,6 +371,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') d = pq(file_content.read(), parser="html") d('#nav-sync').hide() # TODO count figures + file_content.close() write_out_html(d, fn) # remove %CGAL in navtree: this should be a fix in doxygen but for now it does not worth it @@ -390,6 +398,7 @@ removes some unneeded files, and performs minor repair on some glitches.''') text = pq(el).text() if text[0:9]=="template<" and text.find('=')==-1: pq(el).remove() + file_content.close() write_out_html(d, fn) #add a canonical link to all pages From d89111412aee3acd25190d99f1739e78c02f633b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 1 Dec 2022 03:48:49 +0100 Subject: [PATCH 241/426] add link to page generating diff of test results --- Maintenance/test_handling/create_testresult_page | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index ac7d8d5c28a..8d4a3d96f71 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -622,6 +622,8 @@ Downloading internal releases
    • The doxygen documentation testpage (and the overview page)
    • +
    • +Diff of testsuites results
    • EOF if ( -r "announce.html" ) { print OUTPUT<<"EOF"; From e22e36b15a0c553230b385a4b0956df35b0df0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 1 Dec 2022 03:49:58 +0100 Subject: [PATCH 242/426] remove no longer used functionality --- Maintenance/test_handling/create_testresult_page | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Maintenance/test_handling/create_testresult_page b/Maintenance/test_handling/create_testresult_page index 8d4a3d96f71..332dd91b63c 100755 --- a/Maintenance/test_handling/create_testresult_page +++ b/Maintenance/test_handling/create_testresult_page @@ -624,14 +624,8 @@ The doxygen documentation testpage (and the overview page)
    • Diff of testsuites results
    • + EOF - if ( -r "announce.html" ) { - print OUTPUT<<"EOF"; -
    • Announcement of this release
    • -EOF - } - - print OUTPUT "\n"; } From ffc20ffbd19e7e5cb380ed787e14b977d94ee755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 1 Dec 2022 04:33:53 +0100 Subject: [PATCH 243/426] do not apply smoothing if the CC has some degenerate faces --- .../CGAL/Polygon_mesh_processing/repair_self_intersections.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index 0a52404278f..5488f8c7b74 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -531,6 +531,11 @@ bool remove_self_intersections_with_smoothing(std::set Date: Mon, 5 Dec 2022 15:18:03 +0100 Subject: [PATCH 244/426] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 633a3f95570..ce30c5ee6d7 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -107,7 +107,7 @@ LC_CTYPE=en_US.UTF-8 # - on trunk #0 21 * * Sat cd $HOME/CGAL/create_internal_release; scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/trunk --public --do-it -# Check the links of https://www.cgal.org/projects.html every sunday at 17:42 +# Check the links of http://www.cgal.org/projects.html every sunday at 17:42 #42 17 * * Sun linklint -host www.cgal.org -http /projects.html -net -no_anchors -quiet -silent -error # A test that does not work From c2a16fa9b84717bcd4061265370c93160f286491 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 5 Dec 2022 15:49:39 +0100 Subject: [PATCH 245/426] Apply suggestions from code review Co-authored-by: Jane Tournois --- .../test/Mesh_3/test_meshing_without_features_determinism.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp index 6673bbf9acb..a9c979933f3 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ void test() // Domain typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Mesh_polyhedron_3::type Polyhedron; - typedef CGAL::Polyhedral_mesh_domain_with_features_3 Mesh_domain; + typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; // Triangulation typedef typename CGAL::Mesh_triangulation_3::type Tr; From 64333c5b066c4c23a8a12dec7c46c69e2314b7af Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 5 Dec 2022 15:02:59 +0000 Subject: [PATCH 246/426] More changes after Jane's review --- Mesh_3/test/Mesh_3/CMakeLists.txt | 2 ++ .../Mesh_3/test_meshing_without_features_determinism.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 4345fc5a91f..a776e87da72 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -99,6 +99,8 @@ if ( CGAL_FOUND ) test_meshing_polyhedron test_meshing_polyhedral_complex test_mesh_capsule_var_distance_bound + test_meshing_determinism + test_meshing_without_features_determinism test_mesh_3_issue_1554 test_mesh_polyhedral_domain_with_features_deprecated test_mesh_cell_base_3 diff --git a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp index a9c979933f3..55c9dee79cb 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -36,12 +37,11 @@ void test() // Domain typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Mesh_polyhedron_3::type Polyhedron; - typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; + typedef CGAL::Polyhedral_mesh_domain_3 Mesh_domain; // Triangulation typedef typename CGAL::Mesh_triangulation_3::type Tr; - typedef CGAL::Mesh_complex_3_in_triangulation_3< - Tr,Mesh_domain::Corner_index,Mesh_domain::Curve_index> C3t3; + typedef CGAL::Mesh_complex_3_in_triangulation_3
      C3t3; // Mesh Criteria typedef CGAL::Mesh_criteria_3 Mesh_criteria; From 1adb13edc8246084aa6b7d3fcc712172f1b5a60f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 6 Dec 2022 12:34:26 +0000 Subject: [PATCH 247/426] Do not use deprecated functions --- .../Classification/gis_tutorial_example.cpp | 3 +- .../triangulate_hole.h | 4 +- ...ate_hole_Polyhedron_3_no_delaunay_test.cpp | 33 ++++---- .../triangulate_hole_Polyhedron_3_test.cpp | 76 ++++++++++++------- .../triangulate_hole_with_cdt_2_test.cpp | 6 +- .../Plugins/PMP/Hole_filling_plugin.cpp | 7 +- 6 files changed, 78 insertions(+), 51 deletions(-) diff --git a/Classification/examples/Classification/gis_tutorial_example.cpp b/Classification/examples/Classification/gis_tutorial_example.cpp index e02d128a307..ba3c15d3825 100644 --- a/Classification/examples/Classification/gis_tutorial_example.cpp +++ b/Classification/examples/Classification/gis_tutorial_example.cpp @@ -473,8 +473,7 @@ int main (int argc, char** argv) // Fill all holes except the bigest (which is the outer hull of the mesh) for (Mesh::Halfedge_index hi : holes) if (hi != outer_hull) - CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (dtm_mesh, hi, CGAL::Emptyset_iterator(), CGAL::Emptyset_iterator()); + CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole (dtm_mesh, hi); // Save DTM with holes filled std::ofstream dtm_filled_ofile ("dtm_filled.ply", std::ios_base::binary); diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index e04ebf64113..f574822c926 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h @@ -390,7 +390,7 @@ namespace Polygon_mesh_processing { Vertex_output_iterator vertex_out = choose_parameter(get_parameter(np, internal_np::vertex_output_iterator)); std::vector::face_descriptor> patch; - triangulate_hole(pmesh, border_halfedge, std::back_inserter(patch), np); + triangulate_hole(pmesh, border_halfedge, np.face_output_iterator(std::back_inserter(patch))); face_out = std::copy(patch.begin(), patch.end(), face_out); Hole_filling::Default_visitor default_visitor; @@ -584,7 +584,7 @@ namespace Polygon_mesh_processing { std::vector::vertex_descriptor> patch; face_out = triangulate_and_refine_hole - (pmesh, border_halfedge, face_out, std::back_inserter(patch), np).first; + (pmesh, border_halfedge, np.face_output_iterator(face_out).vertex_output_iterator(std::back_inserter(patch))).first; CGAL_postcondition(CGAL::is_triangle_mesh(pmesh)); diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp index af6459bc13f..a11648436a5 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_no_delaunay_test.cpp @@ -112,7 +112,7 @@ void test_triangulate_hole_weight(const std::string file_name, std::size_t nb_re for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; CGAL::Polygon_mesh_processing::triangulate_hole( - poly, *it, back_inserter(patch),CGAL::parameters::use_delaunay_triangulation(true)); + poly, *it, CGAL::parameters::use_delaunay_triangulation(true).face_output_iterator(back_inserter(patch))); if(patch.empty()) { continue; } } @@ -161,15 +161,15 @@ void test_triangulate_hole_should_be_no_output(const std::string file_name) { for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_delaunay_triangulation(false)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters::use_delaunay_triangulation(false).face_output_iterator(back_inserter(patch))); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); } - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_delaunay_triangulation(true)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters::use_delaunay_triangulation(true).face_output_iterator(back_inserter(patch))); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); @@ -258,11 +258,11 @@ void test_ouput_iterators_triangulate_hole(const std::string file_name) { typename std::vector::iterator it_2 = border_reps_2.begin(); for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, CGAL::parameters::face_output_iterator(back_inserter(patch))); std::vector patch_2 = patch; Facet_handle* output_it = - CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, &*patch_2.begin()); + CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, CGAL::parameters::face_output_iterator(& *patch_2.begin())); if(patch.size() != (std::size_t)(output_it - &*patch_2.begin())) { std::cerr << " Error: returned facet output iterator is not valid!" << std::endl; @@ -291,8 +291,8 @@ void test_ouput_iterators_triangulate_and_refine_hole(const std::string file_nam for(typename std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch_facets; std::vector patch_vertices; - CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, - *it, back_inserter(patch_facets), back_inserter(patch_vertices)); + CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, *it, + CGAL::parameters::face_output_iterator(back_inserter(patch_facets)).vertex_output_iterator(back_inserter(patch_vertices))); // create enough space to hold outputs std::vector patch_facets_2 = patch_facets; std::vector patch_vertices_2 = patch_vertices; @@ -300,7 +300,7 @@ void test_ouput_iterators_triangulate_and_refine_hole(const std::string file_nam std::pair output_its = CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly_2, - *it_2, &*patch_facets_2.begin(), &*patch_vertices_2.begin()); + *it_2, CGAL::parameters::face_output_iterator(& *patch_facets_2.begin()).vertex_output_iterator(& *patch_vertices_2.begin())); if(patch_facets.size() != (std::size_t) (output_its.first - &*patch_facets_2.begin())) { std::cout << " Error: returned facet output iterator is not valid!" << std::endl; @@ -337,22 +337,29 @@ void test_triangulate_refine_and_fair_hole_compile() { // use all param read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices), + (poly, border_reps[0], CGAL::parameters:: + face_output_iterator(back_inserter(patch_facets)). + vertex_output_iterator(back_inserter(patch_vertices)). weight_calculator(CGAL::Weights::Uniform_weight()). sparse_linear_solver(Default_solver())); // default solver read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices), + (poly, border_reps[0], CGAL::parameters:: + face_output_iterator(back_inserter(patch_facets)). + vertex_output_iterator(back_inserter(patch_vertices)). weight_calculator(CGAL::Weights::Uniform_weight())); // default solver and weight read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices)); + (poly, border_reps[0], + CGAL::parameters:: + face_output_iterator(back_inserter(patch_facets)). + vertex_output_iterator(back_inserter(patch_vertices))); } template diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp index 9933d3ab217..146eed2fd87 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_Polyhedron_3_test.cpp @@ -138,8 +138,10 @@ void test_triangulate_hole(const std::string file_name, bool use_cdt) { for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch)). + use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch.empty()) { std::cerr << " Error: empty patch created." << std::endl; assert(false); @@ -163,16 +165,17 @@ void test_triangulate_hole_should_be_no_output(const std::string file_name, bool for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, CGAL::parameters::use_delaunay_triangulation(false) + .face_output_iterator(back_inserter(patch)) .use_2d_constrained_delaunay_triangulation(use_cdt)); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); } - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_delaunay_triangulation(true)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters::use_delaunay_triangulation(true).face_output_iterator(back_inserter(patch))); if(!patch.empty()) { std::cerr << " Error: patch should be empty" << std::endl; assert(false); @@ -193,8 +196,10 @@ void test_triangulate_and_refine_hole(const std::string file_name, bool use_cdt) std::vector patch_facets; std::vector patch_vertices; CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, *it, - back_inserter(patch_facets), back_inserter(patch_vertices), - CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch_facets)). + vertex_output_iterator(std::back_inserter(patch_vertices)). + use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch_facets.empty()) { std::cerr << " Error: empty patch created." << std::endl; @@ -220,9 +225,11 @@ void test_triangulate_refine_and_fair_hole(const std::string file_name, bool use for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it) { std::vector patch_facets; std::vector patch_vertices; - CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, - *it, back_inserter(patch_facets), back_inserter(patch_vertices), - CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); + CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, *it, + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch_facets)). + vertex_output_iterator(std::back_inserter(patch_vertices)). + use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch_facets.empty()) { std::cerr << " Error: empty patch created." << std::endl; @@ -251,12 +258,14 @@ void test_ouput_iterators_triangulate_hole(const std::string file_name, bool use std::vector::iterator it_2 = border_reps_2.begin(); for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch; - CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, back_inserter(patch), - CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, *it, + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch)). + use_2d_constrained_delaunay_triangulation(use_cdt)); std::vector patch_2 = patch; Facet_handle* output_it = - CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, &*patch_2.begin()); + CGAL::Polygon_mesh_processing::triangulate_hole(poly_2, *it_2, CGAL::parameters::face_output_iterator(& *patch_2.begin())); if(patch.size() != (std::size_t)(output_it - &*patch_2.begin())) { std::cerr << " Error: returned facet output iterator is not valid!" << std::endl; @@ -282,18 +291,22 @@ void test_ouput_iterators_triangulate_and_refine_hole(const std::string file_nam for(std::vector::iterator it = border_reps.begin(); it != border_reps.end(); ++it, ++it_2) { std::vector patch_facets; std::vector patch_vertices; - CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, - *it, back_inserter(patch_facets), back_inserter(patch_vertices), - CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); + CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, *it, + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch_facets)). + vertex_output_iterator(std::back_inserter(patch_vertices)). + use_2d_constrained_delaunay_triangulation(use_cdt)); // create enough space to hold outputs std::vector patch_facets_2 = patch_facets; std::vector patch_vertices_2 = patch_vertices; if(patch_vertices_2.empty()) { patch_vertices_2.push_back(Vertex_handle()); } //just allocate space for dereferencing std::pair output_its = - CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly_2, - *it_2, &*patch_facets_2.begin(), &*patch_vertices_2.begin(), - CGAL::parameters::use_2d_constrained_delaunay_triangulation(use_cdt)); + CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly_2, *it_2, + CGAL::parameters:: + face_output_iterator(&*patch_facets_2.begin()). + vertex_output_iterator(&*patch_vertices_2.begin()). + use_2d_constrained_delaunay_triangulation(use_cdt)); if(patch_facets.size() != (std::size_t) (output_its.first - &*patch_facets_2.begin())) { std::cout << " Error: returned facet output iterator is not valid!" << std::endl; @@ -327,23 +340,30 @@ void test_triangulate_refine_and_fair_hole_compile() { // use all param read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices), - CGAL::parameters:: - weight_calculator(CGAL::Weights::Uniform_weight()). - sparse_linear_solver(Default_solver()). - use_2d_constrained_delaunay_triangulation(false)); + (poly, border_reps[0], + CGAL::parameters:: + face_output_iterator(back_inserter(patch_facets)). + vertex_output_iterator(back_inserter(patch_vertices)). + weight_calculator(CGAL::Weights::Uniform_weight()). + sparse_linear_solver(Default_solver()). + use_2d_constrained_delaunay_triangulation(false)); // default solver read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices), - CGAL::parameters:: - weight_calculator(CGAL::Weights::Uniform_weight())); + (poly, border_reps[0], + CGAL::parameters:: + face_output_iterator(back_inserter(patch_facets)). + vertex_output_iterator(back_inserter(patch_vertices)). + weight_calculator(CGAL::Weights::Uniform_weight())); // default solver and weight read_poly_with_borders("elephant_quad_hole.off", poly, border_reps); CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (poly, border_reps[0], back_inserter(patch_facets), back_inserter(patch_vertices)); + (poly, border_reps[0], + CGAL::parameters:: + face_output_iterator(back_inserter(patch_facets)). + vertex_output_iterator(back_inserter(patch_vertices))); } void generate_elephant_with_hole() diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp index 8ab2e2afd71..8f1ede58b93 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/triangulate_hole_with_cdt_2_test.cpp @@ -86,9 +86,9 @@ void test_triangulate_hole_with_cdt_2( CGAL::Polygon_mesh_processing::triangulate_hole( pmesh, h, - std::back_inserter(patch_faces), - CGAL::parameters::vertex_point_map( - get(CGAL::vertex_point, pmesh)). + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch_faces)). + vertex_point_map(get(CGAL::vertex_point, pmesh)). use_2d_constrained_delaunay_triangulation(true). geom_traits(GeomTraits())); diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index fbc5fe8af1b..da3c06dbf72 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -701,9 +701,10 @@ bool Polyhedron_demo_hole_filling_plugin::fill CGAL::Timer timer; timer.start(); std::vector patch; if(action_index == 0) { - CGAL::Polygon_mesh_processing::triangulate_hole(poly, - it, std::back_inserter(patch), - CGAL::parameters::use_delaunay_triangulation(use_DT)); + CGAL::Polygon_mesh_processing::triangulate_hole(poly, it, + CGAL::parameters:: + face_output_iterator(std::back_inserter(patch)). + use_delaunay_triangulation(use_DT)); } else if(action_index == 1) { CGAL::Polygon_mesh_processing::triangulate_and_refine_hole(poly, it, From db81e4a3fb5e88deab6af586578be1b237b1aa25 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 6 Dec 2022 22:13:05 +0100 Subject: [PATCH 248/426] Further clarify doc --- .../include/CGAL/Polygon_mesh_processing/compute_normal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 8bae717f56e..7b874bde0b8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -618,8 +618,9 @@ compute_vertex_normal_as_sum_of_weighted_normals(typename boost::graph_traits Date: Tue, 6 Dec 2022 22:43:05 +0100 Subject: [PATCH 249/426] Avoid some code duplication --- .../Plugins/Mesh_3/Io_image_plugin.cpp | 76 ++++++++----------- 1 file changed, 33 insertions(+), 43 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index d13f4f8080f..1f93878bec9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -236,6 +236,7 @@ public: connect(CGAL::Three::Three::connectableScene(),SIGNAL(itemIndexSelected(int)), this, SLOT(connect_controls(int))); } + Viewer_interface* v = CGAL::Three::Three::mainViewer(); CGAL_assertion(v != nullptr); pxr_.setViewer(v); @@ -527,6 +528,7 @@ private: CGAL::Three::Scene_group_item* group; std::vector threads; + struct Controls{ CGAL::Three::Scene_item* group; CGAL::Three::Scene_item* x_item; @@ -536,11 +538,14 @@ private: int y_value; int z_value; }; + Controls *current_control; QMap group_map; unsigned int intersection_id; + bool loadDCM(QString filename); Image* createDCMImage(QString dirname); + QLayout* createOrGetDockLayout() { QLayout* layout = nullptr; QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl");; @@ -1228,7 +1233,6 @@ bool Io_image_plugin::loadDCM(QString dirname) connect(ui.imageType, SIGNAL(currentIndexChanged(int)), this, SLOT(on_imageType_changed(int))); - // Add precision values to the dialog for ( int i=1 ; i<9 ; ++i ) { @@ -1240,7 +1244,6 @@ bool Io_image_plugin::loadDCM(QString dirname) ui.imageType->addItem(QString("Segmented image")); ui.imageType->addItem(QString("Gray-level image")); - // Open window QApplication::restoreOverrideCursor(); int return_code = dialog.exec(); @@ -1248,64 +1251,51 @@ bool Io_image_plugin::loadDCM(QString dirname) { return false; } + QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::processEvents(); - // Get selected precision - int voxel_scale = ui.precisionList->currentIndex() + 1; - - //Get the image type - QString type = ui.imageType->currentText(); - Scene_image_item* image_item; - if(type == "Gray-level image") + Image *image = createDCMImage(dirname); + if(image->image() == nullptr) { - - Image *image = createDCMImage(dirname); - if(image->image() == nullptr) - { - QMessageBox::warning(mw, mw->windowTitle(), - tr("Error with file %1/:\nunknown file format!").arg(dirname)); - CGAL::Three::Three::warning(tr("Opening of file %1/ failed!").arg(dirname)); - result = false; - } - else - { - CGAL::Three::Three::information(tr("File %1/ successfully opened.").arg(dirname)); - } - if(result) - { - //Create planes - image_item = new Scene_image_item(image,125, true); - msgBox.setText("Planes created : 0/3"); - msgBox.setStandardButtons(QMessageBox::NoButton); - msgBox.show(); - createPlanes(image_item); - image_item->setName(fileinfo.baseName()); - scene->addItem(image_item); - } + QMessageBox::warning(mw, mw->windowTitle(), + tr("Error with file %1/:\nunknown file format!").arg(dirname)); + CGAL::Three::Three::warning(tr("Opening of file %1/ failed!").arg(dirname)); + result = false; } else { - Image *image = createDCMImage(dirname); - if(image->image() == nullptr) + CGAL::Three::Three::information(tr("File %1/ successfully opened.").arg(dirname)); + } + + if(result) + { + // Get the image type + QString type = ui.imageType->currentText(); + Scene_image_item* image_item; + if(type == "Gray-level image") { - QMessageBox::warning(mw, mw->windowTitle(), - tr("Error with file %1/:\nunknown file format!").arg(dirname)); - CGAL::Three::Three::warning(tr("Opening of file %1/ failed!").arg(dirname)); - result = false; + // Create planes + image_item = new Scene_image_item(image,125, true); + msgBox.setText("Planes created : 0/3"); + msgBox.setStandardButtons(QMessageBox::NoButton); + msgBox.show(); + createPlanes(image_item); + image_item->setName(fileinfo.baseName()); + scene->addItem(image_item); } else { - CGAL::Three::Three::information(tr("File %1/ successfully opened.").arg(dirname)); - } - if(result) - { + // Get selected precision + int voxel_scale = ui.precisionList->currentIndex() + 1; + image_item = new Scene_image_item(image,voxel_scale, false); image_item->setName(fileinfo.baseName()); scene->addItem(image_item); } } } + return result; #else CGAL::Three::Three::warning("You need VTK to read a DCM file"); From d90d47fb79849b87a9ec615162cb59b437fc4cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Dec 2022 22:57:42 +0100 Subject: [PATCH 250/426] Fix indentation (no real changes) --- .../Plugins/Mesh_3/Io_image_plugin.cpp | 565 ++++++++++-------- 1 file changed, 332 insertions(+), 233 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 1f93878bec9..4e13744ef2b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -44,19 +44,11 @@ #include #include -#include -#include - -#include -#include -#include - #include #include #include "Raw_image_dialog.h" #include -#include -#include + #ifdef CGAL_USE_VTK #include @@ -73,44 +65,57 @@ #include +#include +#include +#include + +#include +#include +#include +#include + // Covariant return types don't work for scalar types and we cannot // have templates here, hence this unfortunate hack. // The input float value we are reading is always in // 0..1 and min_max is the range it came from. -struct IntConverter { +struct IntConverter +{ std::pair min_max; - int operator()(float f) { + int operator()(float f) + { float s = f * float((min_max.second - min_max.first)); //approximate instead of just floor. - if (s - floor(s) >= 0.5){ + if (s - floor(s) >= 0.5) return int(s)+1 + min_max.first; - } - else{ + else return s + float(min_max.first); - } } }; -struct DoubleConverter { +struct DoubleConverter +{ std::pair min_max; - float operator()(float f) { + float operator()(float f) + { float s = f * (min_max.second - min_max.first); return s + min_max.first; } }; -class PixelReader : public QObject +class PixelReader + : public QObject { Q_OBJECT + public Q_SLOTS: - void update(const QMouseEvent *e) { - getPixel(e->pos()); - } + void update(const QMouseEvent *e) { getPixel(e->pos()); } + Q_SIGNALS: void x(QString); + public: void setIC(const IntConverter& x) { ic = x; fc = boost::optional(); } void setFC(const DoubleConverter& x) { fc = x; ic = boost::optional(); } @@ -120,7 +125,8 @@ private: boost::optional ic; boost::optional fc; Viewer_interface* viewer; - void getPixel(const QPoint& e) { + void getPixel(const QPoint& e) + { const auto data = read_pixel_as_float_rgb(e, viewer, viewer->camera()); if(fc) { Q_EMIT x(QString::number((*fc)(data[0]), 'f', 6 )); @@ -130,48 +136,59 @@ private: } }; - -class Plane_slider : public QSlider +class Plane_slider + : public QSlider { Q_OBJECT + public: - Plane_slider(const CGAL::qglviewer::Vec& v, int id, Scene_interface* scene, - CGAL::qglviewer::ManipulatedFrame* frame, Qt::Orientation ori, QWidget* widget) - : QSlider(ori, widget), v(v), id(id), scene(scene), frame(frame) { + Plane_slider(const CGAL::qglviewer::Vec& v, + int id, + Scene_interface* scene, + CGAL::qglviewer::ManipulatedFrame* frame, + Qt::Orientation ori, + QWidget* widget) + : QSlider(ori, widget), v(v), id(id), scene(scene), frame(frame) + { this->setTracking(true); - connect(frame, SIGNAL(manipulated()), this, SLOT(updateCutPlane())); + connect(frame, SIGNAL(manipulated()), this, SLOT(updateCutPlane())); } public Q_SLOTS: void updateCutPlane() { - ready_to_cut = true; - QTimer::singleShot(0,this,SLOT(updateValue())); + ready_to_cut = true; + QTimer::singleShot(0,this,SLOT(updateValue())); } void setFramePosition() { if(!ready_to_move) return; + const CGAL::qglviewer::Vec offset = Three::mainViewer()->offset(); CGAL::qglviewer::Vec v2 = v * (this->value() / scale); - v2+=offset; + v2 += offset; frame->setTranslationWithConstraint(v2); scene->itemChanged(id); Q_EMIT realChange(this->value() / scale); ready_to_move = false; } - void updateValue() { + + void updateValue() + { if(!ready_to_cut) return; + typedef qreal qglviewer_real; qglviewer_real a, b, c; + frame->getPosition(a, b, c); const CGAL::qglviewer::Vec offset = Three::mainViewer()->offset(); - a-=offset.x; - b-=offset.y; - c-=offset.z; + a -= offset.x; + b -= offset.y; + c -= offset.z; float sum1 = float(a + b + c); float sum2 = float(v.x + v.y + v.z); sum1 /= sum2; @@ -184,7 +201,9 @@ public Q_SLOTS: ready_to_move = true; QTimer::singleShot(0,this,SLOT(setFramePosition())); } + unsigned int getScale() const { return scale; } + Q_SIGNALS: void realChange(int); @@ -194,6 +213,7 @@ private: bool ready_to_move; CGAL::qglviewer::Vec v; int id; + Scene_interface* scene; CGAL::qglviewer::ManipulatedFrame* frame; }; @@ -211,25 +231,33 @@ class Io_image_plugin : Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90" FILE "io_image_plugin.json") public: - - bool applicable(QAction*) const override{ + bool applicable(QAction*) const override + { return qobject_cast(scene->item(scene->mainSelectionIndex())); } using Polyhedron_demo_io_plugin_interface::init; - void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface *mi) override { + void init(QMainWindow* mainWindow, + CGAL::Three::Scene_interface* scene_interface, + Messages_interface *mi) override + { this->message_interface = mi; this->scene = scene_interface; this->mw = mainWindow; this->is_gray = false; + x_control = nullptr; y_control = nullptr; z_control = nullptr; current_control = nullptr; + planeSwitch = new QAction("Add Volume Planes", mw); - QAction *actionLoadDCM = new QAction("Open Directory (for DCM files)", mw); + + QAction *actionLoadDCM = new QAction("Open Directory (DCM files)", mw); connect(actionLoadDCM, SIGNAL(triggered()), this, SLOT(on_actionLoadDCM_triggered())); - if(planeSwitch) { + + if(planeSwitch) + { planeSwitch->setProperty("subMenuName", "3D Mesh Generation"); connect(planeSwitch, SIGNAL(triggered()), this, SLOT(selectPlanes())); @@ -239,6 +267,7 @@ public: Viewer_interface* v = CGAL::Three::Three::mainViewer(); CGAL_assertion(v != nullptr); + pxr_.setViewer(v); connect(v, SIGNAL(pointSelected(const QMouseEvent *)), &pxr_, SLOT(update(const QMouseEvent *))); createOrGetDockLayout(); @@ -246,19 +275,19 @@ public: this, SLOT(connectNewViewer(QObject*))); QMenu* menuFile = mw->findChild("menuFile"); - if ( nullptr != menuFile ) + if(nullptr != menuFile ) { QList menuFileActions = menuFile->actions(); // Look for action just after "Load..." action QAction* actionAfterLoad = nullptr; - for ( QList::iterator it_action = menuFileActions.begin(), - end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions) + for(QList::iterator it_action = menuFileActions.begin(), + end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions) { - if ( NULL != *it_action && (*it_action)->text().contains("Load Plugin") ) + if(NULL != *it_action && (*it_action)->text().contains("Load Plugin")) { ++it_action; - if ( it_action != end && NULL != *it_action ) + if(it_action != end && NULL != *it_action) { actionAfterLoad = *it_action; } @@ -266,29 +295,34 @@ public: } // Insert "Load implicit function" action - if ( nullptr != actionAfterLoad ) + if(nullptr != actionAfterLoad) { menuFile->insertAction(actionAfterLoad,actionLoadDCM); } } } - QList actions() const override{ + + QList actions() const override + { return QList() << planeSwitch; } + virtual void closure() override { - QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl"); - if(controlDockWidget) - controlDockWidget->hide(); + QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl"); + if(controlDockWidget) + controlDockWidget->hide(); } - Io_image_plugin() : planeSwitch(nullptr) {} + + Io_image_plugin() : planeSwitch(nullptr) { } QString nameFilters() const override; bool canLoad(QFileInfo) const override; - QList load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) override; + QList load(QFileInfo fileinfo, bool& ok, bool add_to_scene = true) override; bool canSave(const CGAL::Three::Scene_item*) override; - bool save(QFileInfo fileinfo, QList& items ) override{ + bool save(QFileInfo fileinfo, QList& items ) override + { Scene_item* item = items.front(); const Scene_image_item* im_item = qobject_cast(item); @@ -298,16 +332,17 @@ public: items.pop_front(); return ok; } - bool isDefaultLoader(const Scene_item* item) const override{ + + bool isDefaultLoader(const Scene_item* item) const override + { if(qobject_cast(item)) return true; return false; } + QString name() const override{ return "segmented images"; } - public Q_SLOTS: - void setXNum(int i) { x_cubeLabel->setText(QString("%1").arg(i)); @@ -338,7 +373,6 @@ public Q_SLOTS: int i = s.toInt(); z_slider->setValue(i*qobject_cast(z_slider)->getScale()); z_slider->sliderMoved(i); - } void on_imageType_changed(int index) @@ -348,38 +382,50 @@ public Q_SLOTS: else ui.groupBox->setVisible(false); } - void selectPlanes() { + void selectPlanes() + { std::vector< Scene_image_item* > seg_items; Scene_image_item* seg_img; seg_img = nullptr; - for(int i = 0; i < scene->numberOfEntries(); ++i) { + for(int i = 0; i < scene->numberOfEntries(); ++i) + { Scene_image_item* tmp = qobject_cast(scene->item(i)); - if(tmp != nullptr){ + if(tmp != nullptr) seg_items.push_back(tmp); - } } - if(seg_items.empty()) { + + if(seg_items.empty()) + { QMessageBox::warning(mw, tr("No suitable item found"), tr("Load an inrimage or hdr file to enable Volume Planes.")); return; - } else { + } + else + { QList items; for(std::vector< Scene_image_item* >::const_iterator it = seg_items.begin(); - it != seg_items.end(); ++it) { + it != seg_items.end(); ++it) + { items << (*it)->name(); } + bool ok; QString selected = QInputDialog::getItem(mw, tr("Select a dataset:"), tr("Items"), items, 0, false, &ok); if(!ok || selected.isEmpty()) return; + for(std::vector< Scene_image_item*>::const_iterator it = seg_items.begin(); - it != seg_items.end(); ++it) { + it != seg_items.end(); ++it) + { if(selected == (*it)->name()) seg_img = *it; } } + if(group_map.keys().contains(seg_img)) + { CGAL::Three::Three::warning("This item already has volume planes."); + } else { // Opens a modal Dialog to prevent the user from manipulating things that could mess with the planes creation and cause a segfault. @@ -390,15 +436,18 @@ public Q_SLOTS: } } - void addVP(Volume_plane_thread* thread) { + void addVP(Volume_plane_thread* thread) + { Volume_plane_interface* plane = thread->getItem(); plane->init(Three::mainViewer()); + // add the interface for this Volume_plane int id = scene->addItem(plane); scene->changeGroup(plane, group); group->lockChild(plane); //connect(plane->manipulatedFrame(), &CGAL::qglviewer::ManipulatedFrame::manipulated, // plane, &Volume_plane_interface::redraw); + switch(thread->type()) { case 'x': @@ -449,20 +498,22 @@ public Q_SLOTS: default: break; } + std::vector::iterator it = std::find(threads.begin(), threads.end(), thread); - // this slot has been connected to a thread that hasn't been - // registered here. + // this slot has been connected to a thread that hasn't been registered here. assert(it != threads.end()); delete *it; threads.erase(it); update_msgBox(); Volume_plane_intersection* intersection = dynamic_cast(scene->item(intersection_id)); - if(!intersection) { + if(!intersection) + { // the intersection is gone before it was initialized return; } + // FIXME downcasting mode // FIXME this will bug if two volume planes are generated simultaneously by the plugin if(Volume_plane* p = dynamic_cast< Volume_plane* >(plane)) { @@ -472,6 +523,7 @@ public Q_SLOTS: } else if(Volume_plane* p = dynamic_cast< Volume_plane* >(plane)) { intersection->setZ(p); } + connect(plane, SIGNAL(planeDestructionIncoming(Volume_plane_interface*)), intersection, SLOT(planeRemoved(Volume_plane_interface*))); @@ -480,28 +532,22 @@ public Q_SLOTS: void on_actionLoadDCM_triggered() { QSettings settings; - QString start_dir = settings.value("Open directory", - QDir::current().dirName()).toString(); - QString dir = - QFileDialog::getExistingDirectory(mw, - tr("Open directory"), - start_dir, - QFileDialog::ShowDirsOnly - | QFileDialog::DontResolveSymlinks); + QString start_dir = settings.value("Open directory", QDir::current().dirName()).toString(); + QString dir = QFileDialog::getExistingDirectory(mw, tr("Open directory"), + start_dir, QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks); - if (!dir.isEmpty()) { + if(!dir.isEmpty()) + { QFileInfo fileinfo(dir); - if (fileinfo.isDir() && fileinfo.isReadable()) + if(fileinfo.isDir() && fileinfo.isReadable()) { - settings.setValue("Open directory", - fileinfo.absoluteDir().absolutePath()); + settings.setValue("Open directory", fileinfo.absoluteDir().absolutePath()); QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::processEvents(); loadDCM(dir); QApplication::restoreOverrideCursor(); } } - } void connectNewViewer(QObject* o) @@ -513,11 +559,14 @@ public Q_SLOTS: o->installEventFilter(c.z_item); } } + private: CGAL::qglviewer::Vec first_offset; bool is_gray; + Messages_interface* message_interface; QMessageBox msgBox; + QAction* planeSwitch; QWidget *x_control, *y_control, *z_control; QSlider *x_slider, *y_slider, *z_slider; @@ -529,7 +578,8 @@ private: CGAL::Three::Scene_group_item* group; std::vector threads; - struct Controls{ + struct Controls + { CGAL::Three::Scene_item* group; CGAL::Three::Scene_item* x_item; CGAL::Three::Scene_item* y_item; @@ -539,18 +589,20 @@ private: int z_value; }; - Controls *current_control; + Controls* current_control; QMap group_map; unsigned int intersection_id; bool loadDCM(QString filename); Image* createDCMImage(QString dirname); - QLayout* createOrGetDockLayout() { + QLayout* createOrGetDockLayout() + { QLayout* layout = nullptr; - QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl");; + QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl"); - if(!controlDockWidget) { + if(!controlDockWidget) + { controlDockWidget = new QDockWidget(mw); controlDockWidget->setObjectName("volumePlanesControl"); QWidget* content = new QWidget(controlDockWidget); @@ -576,7 +628,9 @@ private: controlDockWidget->setWidget(content); controlDockWidget->hide(); - } else { + } + else + { layout = controlDockWidget->findChild("vpSliderLayout"); controlDockWidget->show(); controlDockWidget->raise(); @@ -585,7 +639,8 @@ private: return layout; } - void createPlanes(Scene_image_item* seg_img) { + void createPlanes(Scene_image_item* seg_img) + { QApplication::setOverrideCursor(Qt::WaitCursor); //Control widgets creation QLayout* layout = createOrGetDockLayout(); @@ -678,11 +733,13 @@ private: z_box->addWidget(z_cubeLabel); show_sliders &= seg_img->image()->zdim() > 1; } + x_control->setEnabled(show_sliders); y_control->setEnabled(show_sliders); z_control->setEnabled(show_sliders); - if(!(seg_img == nullptr)) { + if(!(seg_img == nullptr)) + { const CGAL::Image_3* img = seg_img->image(); CGAL_IMAGE_IO_CASE(img->image(), this->launchAdders(seg_img, seg_img->name())) @@ -696,15 +753,17 @@ private: this->intersection_id = scene->addItem(i); scene->changeGroup(i, group); group->lockChild(i); - } else { + } + else + { QMessageBox::warning(mw, tr("Something went wrong"), tr("Selected a suitable Object but couldn't get an image pointer.")); return; } } - template - void launchAdders(Scene_image_item* seg_img, const QString& name) { + void launchAdders(Scene_image_item* seg_img, const QString& name) + { const CGAL::Image_3* img = seg_img->image(); const Word* begin = (const Word*)img->data(); const Word* end = (const Word*)img->data() + img->size(); @@ -719,9 +778,9 @@ private: Volume_plane *y_item = new Volume_plane(img->image()->tx,img->image()->ty, img->image()->tz); Volume_plane *z_item = new Volume_plane(img->image()->tx,img->image()->ty, img->image()->tz); - x_item->setProperty("img",QVariant::fromValue((void*)seg_img)); - y_item->setProperty("img",QVariant::fromValue((void*)seg_img)); - z_item->setProperty("img",QVariant::fromValue((void*)seg_img)); + x_item->setProperty("img", QVariant::fromValue((void*)seg_img)); + y_item->setProperty("img", QVariant::fromValue((void*)seg_img)); + z_item->setProperty("img", QVariant::fromValue((void*)seg_img)); x_item->setColor(QColor("red")); y_item->setColor(QColor("green")); @@ -741,6 +800,7 @@ private: connect(group, SIGNAL(aboutToBeDestroyed()), this, SLOT(erase_group())); scene->addItem(group); + Controls c; c.group = group; c.x_item = x_item; @@ -769,19 +829,23 @@ private: first_offset = Three::mainViewer()->offset(); } + template - void switchReaderConverter(std::pair minmax) { + void switchReaderConverter(std::pair minmax) + { switchReaderConverter(minmax, typename boost::is_integral::type()); } template - void switchReaderConverter(std::pair minmax, boost::true_type) { + void switchReaderConverter(std::pair minmax, boost::true_type) + { // IntConverter IntConverter x = { minmax }; pxr_.setIC(x); } template - void switchReaderConverter(std::pair minmax, boost::false_type) { + void switchReaderConverter(std::pair minmax, boost::false_type) + { // IntConverter DoubleConverter x = { minmax }; pxr_.setFC(x); } @@ -797,7 +861,7 @@ private Q_SLOTS: void update_msgBox() { static int nbPlanes =0; - nbPlanes ++; + ++nbPlanes; msgBox.setText(QString("Planes created : %1/3").arg(nbPlanes)); if(nbPlanes == 3) { @@ -809,6 +873,7 @@ private Q_SLOTS: scene->item(i)->invalidateOpenGLBuffers(); } } + msgBox.hide(); nbPlanes = 0; QApplication::restoreOverrideCursor(); @@ -817,11 +882,9 @@ private Q_SLOTS: // Avoids the segfault after the deletion of an item void erase_group() { - CGAL::Three::Scene_group_item* group_item = qobject_cast(sender()); if(group_item) { - Q_FOREACH(CGAL::Three::Scene_item* key, group_map.keys()) { if(group_map[key].group == group_item) @@ -834,38 +897,7 @@ private Q_SLOTS: } } } - //try to re-connect to another group - if(!group_map.isEmpty()) - { - int id = scene->item_id(group_map.keys().first()); - connect_controls(id); - } - } - //destroy planes on image deletion - void on_img_detroyed() - { - Scene_image_item* img_item = qobject_cast(sender()); - if(img_item) - { - Scene_group_item* group = qobject_cast(group_map[img_item].group); - if(!group) - return; - group_map[img_item].x_item = nullptr; - group_map[img_item].y_item = nullptr; - group_map[img_item].z_item = nullptr; - disconnect(group_map[img_item].group, SIGNAL(aboutToBeDestroyed()), - this, SLOT(erase_group())); - group_map.remove(img_item); - QList deletion; - Q_FOREACH(Scene_interface::Item_id id, group->getChildren()) - { - Scene_item* child = group->getChild(id); - group->unlockChild(child); - deletion.append(scene->item_id(child)); - } - deletion.append(scene->item_id(group)); - scene->erase(deletion); - } + //try to re-connect to another group if(!group_map.isEmpty()) { @@ -873,11 +905,49 @@ private Q_SLOTS: connect_controls(id); } } + + // destroy planes on image deletion + void on_img_detroyed() + { + Scene_image_item* img_item = qobject_cast(sender()); + if(img_item) + { + Scene_group_item* group = qobject_cast(group_map[img_item].group); + if(!group) + return; + + group_map[img_item].x_item = nullptr; + group_map[img_item].y_item = nullptr; + group_map[img_item].z_item = nullptr; + disconnect(group_map[img_item].group, SIGNAL(aboutToBeDestroyed()), + this, SLOT(erase_group())); + group_map.remove(img_item); + + QList deletion; + Q_FOREACH(Scene_interface::Item_id id, group->getChildren()) + { + Scene_item* child = group->getChild(id); + group->unlockChild(child); + deletion.append(scene->item_id(child)); + } + deletion.append(scene->item_id(group)); + scene->erase(deletion); + } + + //try to re-connect to another group + if(!group_map.isEmpty()) + { + int id = scene->item_id(group_map.keys().first()); + connect_controls(id); + } + } + void connect_controls(int id) { CGAL::Three::Scene_item* sel_itm = scene->item(id); if(!sel_itm) return; + if(!group_map.contains(sel_itm)) //the planes are not yet created or the selected item is not a segmented_image { Scene_image_item* img = (Scene_image_item*)sel_itm->property("img").value(); @@ -886,15 +956,18 @@ private Q_SLOTS: else return; } + Controls c = group_map[sel_itm]; current_control = &group_map[sel_itm]; bool show_sliders = true; + // x line if(c.x_item != nullptr) { Volume_plane_interface* x_plane = qobject_cast(c.x_item); if(x_slider) delete x_slider; + x_slider = new Plane_slider(x_plane->translationVector(), scene->item_id(x_plane), scene, x_plane->manipulatedFrame(), Qt::Horizontal, x_control); x_slider->setRange(0, (x_plane->cDim() - 1) * 100); @@ -910,12 +983,14 @@ private Q_SLOTS: x_box->addWidget(x_cubeLabel); show_sliders &= qobject_cast(sel_itm)->image()->xdim() > 1; } + //y line if(c.y_item != nullptr) { Volume_plane_interface* y_plane = qobject_cast(c.y_item); if(y_slider) delete y_slider; + y_slider = new Plane_slider(y_plane->translationVector(), scene->item_id(y_plane), scene, y_plane->manipulatedFrame(), Qt::Horizontal, z_control); y_slider->setRange(0, (y_plane->cDim() - 1) * 100); @@ -930,12 +1005,14 @@ private Q_SLOTS: y_box->addWidget(y_cubeLabel); show_sliders &= qobject_cast(sel_itm)->image()->ydim() > 1; } + // z line if(c.z_item != nullptr) { Volume_plane_interface* z_plane = qobject_cast(c.z_item); if(z_slider) delete z_slider; + z_slider = new Plane_slider(z_plane->translationVector(), scene->item_id(z_plane), scene, z_plane->manipulatedFrame(), Qt::Horizontal, z_control); z_slider->setRange(0, (z_plane->cDim() - 1) * 100); @@ -955,7 +1032,8 @@ private Q_SLOTS: y_control->setEnabled(show_sliders); z_control->setEnabled(show_sliders); } -//Keeps the position of the planes for the next time + + // Keeps the position of the planes for the next time void set_value() { current_control->x_value = x_slider->value(); @@ -981,19 +1059,18 @@ private Q_SLOTS: if(group_map.isEmpty()) z_control->hide(); } - }; - -QString Io_image_plugin::nameFilters() const { +QString Io_image_plugin::nameFilters() const +{ return QString("Inrimage files (*.inr *.inr.gz) ;; " "Analyze files (*.hdr *.img *img.gz) ;; " "Stanford Exploration Project files (*.H *.HH) ;; " "NRRD image files (*.nrrd)"); } - -bool Io_image_plugin::canLoad(QFileInfo) const { +bool Io_image_plugin::canLoad(QFileInfo) const +{ return true; } @@ -1002,14 +1079,18 @@ void convert(Image* image) { float *f_data = (float*)ImageIO_alloc(image->xdim()*image->ydim()*image->zdim()*sizeof(float)); Word* d_data = (Word*)(image->data()); - //convert image from double to float - for(std::size_t x = 0; xxdim(); ++x) - for(std::size_t y = 0; yydim(); ++y) + + // convert image from double to float + for(std::size_t x = 0; xxdim(); ++x) { + for(std::size_t y = 0; yydim(); ++y) { for(std::size_t z = 0; zzdim(); ++z) { std::size_t i =(z * image->ydim() + y) * image->xdim() + x; f_data[i] =(float)d_data[i]; } + } + } + ImageIO_free(d_data); image->image()->data = (void*)f_data; image->image()->wdim = 4; @@ -1023,8 +1104,8 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) QApplication::restoreOverrideCursor(); Image* image = new Image; - //read a nrrd file - if (fileinfo.suffix() == "nrrd") + // read a nrrd file + if(fileinfo.suffix() == "nrrd") { #ifdef CGAL_USE_VTK vtkNew reader; @@ -1040,7 +1121,7 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) #endif } - //read a sep file + // read a sep file else if (fileinfo.suffix() == "H" || fileinfo.suffix() == "HH") { CGAL::SEP_to_ImageIO reader(fileinfo.filePath().toUtf8().data()); @@ -1049,94 +1130,104 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) } else if(fileinfo.suffix() != "H" && fileinfo.suffix() != "HH" && - !image->read(fileinfo.filePath().toUtf8())) + !image->read(fileinfo.filePath().toUtf8())) + { + QMessageBox qmb(QMessageBox::NoIcon, + "Raw Dialog", + tr("Error with file %1:\n" + "unknown file format!\n" + "\n" + "Open it as a raw image?").arg(fileinfo.fileName()), + QMessageBox::Yes|QMessageBox::No); + + bool success = true; + if(qmb.exec() == QMessageBox::Yes) { - QMessageBox qmb(QMessageBox::NoIcon, - "Raw Dialog", - tr("Error with file %1:\n" - "unknown file format!\n" - "\n" - "Open it as a raw image?").arg(fileinfo.fileName()), - QMessageBox::Yes|QMessageBox::No); + Raw_image_dialog raw_dialog; + raw_dialog.label_file_size->setText(QString("%1 B").arg(fileinfo.size())); + raw_dialog.buttonBox->button(QDialogButtonBox::Open)->setEnabled(false); + if(raw_dialog.exec()) + { + QApplication::setOverrideCursor(Qt::WaitCursor); + QApplication::processEvents(); - bool success = true; - if(qmb.exec() == QMessageBox::Yes) { - Raw_image_dialog raw_dialog; - raw_dialog.label_file_size->setText(QString("%1 B").arg(fileinfo.size())); - raw_dialog.buttonBox->button(QDialogButtonBox::Open)->setEnabled(false); - if( raw_dialog.exec() ){ - - QApplication::setOverrideCursor(Qt::WaitCursor); - QApplication::processEvents(); - - if(image->read_raw(fileinfo.filePath().toUtf8(), - raw_dialog.dim_x->value(), - raw_dialog.dim_y->value(), - raw_dialog.dim_z->value(), - raw_dialog.spacing_x->value(), - raw_dialog.spacing_y->value(), - raw_dialog.spacing_z->value(), - raw_dialog.offset->value(), - raw_dialog.image_word_size(), - raw_dialog.image_word_kind(), - raw_dialog.image_sign()) - ){ - switch(raw_dialog.image_word_kind()) + if(image->read_raw(fileinfo.filePath().toUtf8(), + raw_dialog.dim_x->value(), + raw_dialog.dim_y->value(), + raw_dialog.dim_z->value(), + raw_dialog.spacing_x->value(), + raw_dialog.spacing_y->value(), + raw_dialog.spacing_z->value(), + raw_dialog.offset->value(), + raw_dialog.image_word_size(), + raw_dialog.image_word_kind(), + raw_dialog.image_sign())) + { + switch(raw_dialog.image_word_kind()) + { + case WK_FLOAT: + is_gray = true; + convert(image); + break; + case WK_FIXED: + { + switch(raw_dialog.image_word_size()) { - case WK_FLOAT: + case 2: is_gray = true; - convert(image); + convert(image); break; - case WK_FIXED: - { - switch(raw_dialog.image_word_size()) - { - case 2: - is_gray = true; - convert(image); - break; - case 4: - is_gray = true; - convert(image); - break; - default: - is_gray = false; - break; - } + case 4: + is_gray = true; + convert(image); break; - } default: + is_gray = false; break; } - QSettings settings; - settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath())); - settings.setValue("is_raw", true); - settings.setValue("dim_x", raw_dialog.dim_x->value()); - settings.setValue("dim_y", raw_dialog.dim_y->value()); - settings.setValue("dim_z", raw_dialog.dim_z->value()); - settings.setValue("spacing_x", raw_dialog.spacing_x->value()); - settings.setValue("spacing_y", raw_dialog.spacing_y->value()); - settings.setValue("spacing_z", raw_dialog.spacing_z->value()); - settings.setValue("offset", raw_dialog.offset->value()); - settings.setValue("wdim", QVariant::fromValue(raw_dialog.image_word_size())); - settings.setValue("wk", raw_dialog.image_word_kind()); - settings.setValue("sign", raw_dialog.image_sign()); - settings.endGroup(); - }else { - success = false; + break; } - }else { + default: + break; + } + + QSettings settings; + settings.beginGroup(QUrl::toPercentEncoding(fileinfo.absoluteFilePath())); + settings.setValue("is_raw", true); + settings.setValue("dim_x", raw_dialog.dim_x->value()); + settings.setValue("dim_y", raw_dialog.dim_y->value()); + settings.setValue("dim_z", raw_dialog.dim_z->value()); + settings.setValue("spacing_x", raw_dialog.spacing_x->value()); + settings.setValue("spacing_y", raw_dialog.spacing_y->value()); + settings.setValue("spacing_z", raw_dialog.spacing_z->value()); + settings.setValue("offset", raw_dialog.offset->value()); + settings.setValue("wdim", QVariant::fromValue(raw_dialog.image_word_size())); + settings.setValue("wk", raw_dialog.image_word_kind()); + settings.setValue("sign", raw_dialog.image_sign()); + settings.endGroup(); + } + else + { success = false; } - }else { + } + else + { success = false; } - if(!success){ - ok = false; - delete image; - return QList(); - } } + else + { + success = false; + } + + if(!success) + { + ok = false; + delete image; + return QList(); + } + } // Get display precision QDialog dialog; @@ -1149,18 +1240,19 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) dialog.setWindowFlags(Qt::Dialog|Qt::CustomizeWindowHint|Qt::WindowCloseButtonHint); // Add precision values to the dialog - for ( int i=1 ; i<9 ; ++i ) + for(int i=1 ; i<9; ++i) { QString s = tr("1:%1").arg(i*i*i); ui.precisionList->addItem(s); } - //Adds Image type + // Adds Image type ui.imageType->addItem(QString("Segmented image")); ui.imageType->addItem(QString("Gray-level image")); QString type; int voxel_scale = 0; + // Open window QApplication::restoreOverrideCursor(); if(!is_gray) @@ -1180,9 +1272,13 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) type = ui.imageType->currentText(); } else + { type = "Gray-level image"; + } + QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::processEvents(); + Scene_image_item* image_item; if(type == "Gray-level image") { @@ -1196,10 +1292,14 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) createPlanes(image_item); } else + { image_item = new Scene_image_item(image,voxel_scale, false); + } image_item->setName(fileinfo.baseName()); + if(add_to_scene) CGAL::Three::Three::scene()->addItem(image_item); + return QList() << image_item; } @@ -1303,6 +1403,7 @@ bool Io_image_plugin::loadDCM(QString dirname) return false; #endif } + Image* Io_image_plugin::createDCMImage(QString dirname) { Image* image = nullptr; @@ -1334,8 +1435,7 @@ Image* Io_image_plugin::createDCMImage(QString dirname) vtkNew dicom_reader; dicom_reader->SetDirectoryName(dirname.toUtf8()); - auto executive = - vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive()); + auto executive = vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive()); if (executive) { executive->SetReleaseDataFlag(0, 0); // where 0 is the port index @@ -1352,34 +1452,33 @@ Image* Io_image_plugin::createDCMImage(QString dirname) // image data } - if(is_bmp){ + if(is_bmp) + { vtkNew bmp_reader; bmp_reader->SetFileNames(files); - auto executive = - vtkDemandDrivenPipeline::SafeDownCast(bmp_reader->GetExecutive()); - if (executive) - { - executive->SetReleaseDataFlag(0, 0); // where 0 is the port index - } + auto executive = vtkDemandDrivenPipeline::SafeDownCast(bmp_reader->GetExecutive()); + if(executive) + executive->SetReleaseDataFlag(0, 0); // where 0 is the port index + vtkNew smoother; smoother->SetStandardDeviations(1., 1., 1.); smoother->SetInputConnection(bmp_reader->GetOutputPort()); smoother->Update(); + auto vtk_image = smoother->GetOutput(); vtk_image->Print(std::cerr); image = new Image; - *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the - // image data + *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data } #else CGAL::Three::Three::warning("You need VTK to read DCM/BMP files"); CGAL_USE(dirname); #endif - return image; + return image; } #include "Io_image_plugin.moc" From 9159816fb46a34d44531df0c56c76f564084e8ff Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 7 Dec 2022 08:02:35 +0000 Subject: [PATCH 251/426] PMP: Fix for a -Wmaybe-uninitialized --- Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index ae209a87ff7..1d00c87266f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -864,7 +864,11 @@ private: Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id(const ePoint_3 &ip, const std::vector &prismindex, const unsigned int &jump, int &id) const { - Oriented_side ori; + Oriented_side ori = ON_POSITIVE_SIDE; // The compiler sees the + // possibility that the + // nested for loop body is + // not executed and warns that + // ori may not be initialized for (unsigned int i = 0; i < prismindex.size(); i++){ if (prismindex[i] == jump){ From c7fb2f56ae1ba30d59bdf11e85f13497f8e11f2d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 7 Dec 2022 09:47:41 +0000 Subject: [PATCH 252/426] Three: Add an #include# --- GraphicsView/include/CGAL/Qt/camera.h | 1 + 1 file changed, 1 insertion(+) diff --git a/GraphicsView/include/CGAL/Qt/camera.h b/GraphicsView/include/CGAL/Qt/camera.h index 08f76d4eb0b..600d0c44129 100644 --- a/GraphicsView/include/CGAL/Qt/camera.h +++ b/GraphicsView/include/CGAL/Qt/camera.h @@ -13,6 +13,7 @@ #ifndef QGLVIEWER_CAMERA_H #define QGLVIEWER_CAMERA_H +#include #include #include #include From c36c54c1399e11f22fad0a53b449ce8e65c5964c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 11:42:30 +0100 Subject: [PATCH 253/426] Fix "Planes for unnamed" --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 4e13744ef2b..8cb9f4853c0 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1377,11 +1377,11 @@ bool Io_image_plugin::loadDCM(QString dirname) { // Create planes image_item = new Scene_image_item(image,125, true); + image_item->setName(fileinfo.baseName()); msgBox.setText("Planes created : 0/3"); msgBox.setStandardButtons(QMessageBox::NoButton); msgBox.show(); createPlanes(image_item); - image_item->setName(fileinfo.baseName()); scene->addItem(image_item); } else From 1c04eea7034b63139bb5cb0c9a868f555c460aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 12:19:24 +0100 Subject: [PATCH 254/426] Refactor DCM / BMP to avoid code duplication + add smoothing selection to GUI --- .../Plugins/Mesh_3/Image_res_dialog.ui | 116 ++++++++--- .../Plugins/Mesh_3/Io_image_plugin.cpp | 182 ++++++++++-------- 2 files changed, 189 insertions(+), 109 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui index 066201cbed7..41834b0133e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui @@ -6,8 +6,8 @@ 0 0 - 421 - 370 + 529 + 347 @@ -19,24 +19,31 @@ Load a 3D image - - - + + + + + Image &type + + + imageType + + + + + Qt::Vertical 20 - 0 + 40 - - - - + Qt::Horizontal @@ -46,33 +53,48 @@ - - + + - Please choose the image &type - - - imageType + Smooth image data - + + + + Qt::Horizontal + + + + + + + - Drawing settings for a segment image + + + 0 + + + 0 + + + 0 + - - - - - false - - - - - + + + 0 + + + 6 + + + 11 @@ -80,20 +102,20 @@ - 1:x means that x voxels of the original image are represented by 1 cube in the drawn image + <html><head/><body><p><span style=" font-size:10pt;">1:x means that x voxels of the original image are represented by 1 cube in the drawn image</span></p></body></html> true - - + + 1 - Please choose the image drawing &precision + Segmented image drawing &precision true @@ -103,11 +125,41 @@ + + + + false + + + + + + + + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 8cb9f4853c0..04badd6299d 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -73,6 +73,7 @@ #include #include #include +#include // Covariant return types don't work for scalar types and we cannot // have templates here, hence this unfortunate hack. @@ -220,6 +221,12 @@ private: const unsigned int Plane_slider::scale = 100; +enum class Directory_extension_type +{ + DCM = 0, + BMP +}; + class Io_image_plugin : public QObject, public CGAL::Three::Polyhedron_demo_plugin_helper, @@ -256,6 +263,9 @@ public: QAction *actionLoadDCM = new QAction("Open Directory (DCM files)", mw); connect(actionLoadDCM, SIGNAL(triggered()), this, SLOT(on_actionLoadDCM_triggered())); + QAction *actionLoadBMP = new QAction("Open Directory (BMP files)", mw); + connect(actionLoadBMP, SIGNAL(triggered()), this, SLOT(on_actionLoadBMP_triggered())); + if(planeSwitch) { planeSwitch->setProperty("subMenuName", "3D Mesh Generation"); @@ -297,7 +307,8 @@ public: // Insert "Load implicit function" action if(nullptr != actionAfterLoad) { - menuFile->insertAction(actionAfterLoad,actionLoadDCM); + menuFile->insertAction(actionAfterLoad, actionLoadDCM); + menuFile->insertAction(actionAfterLoad, actionLoadBMP); } } } @@ -529,7 +540,7 @@ public Q_SLOTS: } - void on_actionLoadDCM_triggered() + void loadDirectory(const Directory_extension_type ext) { QSettings settings; QString start_dir = settings.value("Open directory", QDir::current().dirName()).toString(); @@ -544,12 +555,22 @@ public Q_SLOTS: settings.setValue("Open directory", fileinfo.absoluteDir().absolutePath()); QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::processEvents(); - loadDCM(dir); - QApplication::restoreOverrideCursor(); + + loadDirectory(dir, ext); } } } + void on_actionLoadDCM_triggered() + { + return loadDirectory(Directory_extension_type::DCM); + } + + void on_actionLoadBMP_triggered() + { + return loadDirectory(Directory_extension_type::BMP); + } + void connectNewViewer(QObject* o) { Q_FOREACH(Controls c, group_map.values()) @@ -593,8 +614,8 @@ private: QMap group_map; unsigned int intersection_id; - bool loadDCM(QString filename); - Image* createDCMImage(QString dirname); + bool loadDirectory(const QString& filename, const Directory_extension_type ext); + Image* createDirectoryImage(const QString& dirname, const Directory_extension_type ext, const bool smooth); QLayout* createOrGetDockLayout() { @@ -1308,10 +1329,15 @@ bool Io_image_plugin::canSave(const CGAL::Three::Scene_item* item) return qobject_cast(item); } -bool Io_image_plugin::loadDCM(QString dirname) +bool Io_image_plugin::loadDirectory(const QString& dirname, + const Directory_extension_type ext) { +#ifndef CGAL_USE_VTK QApplication::restoreOverrideCursor(); -#ifdef CGAL_USE_VTK + CGAL::Three::Three::warning("VTK is required to read DCM and BMP files"); + CGAL_USE(dirname); + return false; +#else QFileInfo fileinfo; fileinfo.setFile(dirname); bool result = true; @@ -1355,17 +1381,18 @@ bool Io_image_plugin::loadDCM(QString dirname) QApplication::setOverrideCursor(Qt::WaitCursor); QApplication::processEvents(); - Image *image = createDCMImage(dirname); + bool smooth = ui.smoothImage->isChecked(); + + Image *image = createDirectoryImage(dirname, ext, smooth); if(image->image() == nullptr) { - QMessageBox::warning(mw, mw->windowTitle(), - tr("Error with file %1/:\nunknown file format!").arg(dirname)); - CGAL::Three::Three::warning(tr("Opening of file %1/ failed!").arg(dirname)); + QMessageBox::warning(mw, mw->windowTitle(), tr("Error opening directory %1/!").arg(dirname)); + CGAL::Three::Three::warning(tr("Opening of directory %1/ failed!").arg(dirname)); result = false; } else { - CGAL::Three::Three::information(tr("File %1/ successfully opened.").arg(dirname)); + CGAL::Three::Three::information(tr("Directory %1/ successfully opened.").arg(dirname)); } if(result) @@ -1396,86 +1423,87 @@ bool Io_image_plugin::loadDCM(QString dirname) } } + QApplication::restoreOverrideCursor(); return result; -#else - CGAL::Three::Three::warning("You need VTK to read a DCM file"); - CGAL_USE(dirname); - return false; #endif } -Image* Io_image_plugin::createDCMImage(QString dirname) +Image* Io_image_plugin::createDirectoryImage(const QString& dirname, + const Directory_extension_type ext, + const bool smooth) { Image* image = nullptr; -#ifdef CGAL_USE_VTK - bool is_dcm = false; - bool is_bmp = false; - - std::vector paths; - vtkStringArray* files = vtkStringArray::New(); - boost::filesystem::path p(dirname.toUtf8().data()); - for(boost::filesystem::directory_entry& x : boost::filesystem::directory_iterator(p)){ - std::string s(x.path().extension().string()); - if(s == std::string(".dcm") || (s == std::string(".DCM"))){ is_dcm = true; CGAL_assertion(!is_bmp); } - if(s == std::string(".bmp") || (s == std::string(".BMP"))){ is_bmp = true; CGAL_assertion(!is_dcm); } - paths.push_back(x.path()); - } - - // directory_iterator does not guarantee a sorted order - std::sort(std::begin(paths), std::end(paths)); - - for(const boost::filesystem::path& p : paths) +#ifndef CGAL_USE_VTK + CGAL::Three::Three::warning("VTK is required to read DCM and BMP files"); + CGAL_USE(dirname); + CGAL_USE(ext); +#else + auto create_image = [&](auto&& reader) -> void { - std::cout << p.string() << std::endl; - files->InsertNextValue(p.string()); - } - - if(is_dcm){ - vtkNew dicom_reader; - dicom_reader->SetDirectoryName(dirname.toUtf8()); - - auto executive = vtkDemandDrivenPipeline::SafeDownCast(dicom_reader->GetExecutive()); - if (executive) - { - executive->SetReleaseDataFlag(0, 0); // where 0 is the port index - } - - vtkNew smoother; - smoother->SetStandardDeviations(1., 1., 1.); - smoother->SetInputConnection(dicom_reader->GetOutputPort()); - smoother->Update(); - auto vtk_image = smoother->GetOutput(); - vtk_image->Print(std::cerr); - image = new Image; - *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the - // image data - } - - if(is_bmp) - { - vtkNew bmp_reader; - bmp_reader->SetFileNames(files); - - auto executive = vtkDemandDrivenPipeline::SafeDownCast(bmp_reader->GetExecutive()); + auto executive = vtkDemandDrivenPipeline::SafeDownCast(reader->GetExecutive()); if(executive) executive->SetReleaseDataFlag(0, 0); // where 0 is the port index - vtkNew smoother; - smoother->SetStandardDeviations(1., 1., 1.); - smoother->SetInputConnection(bmp_reader->GetOutputPort()); - smoother->Update(); + vtkImageData* vtk_image = nullptr; + vtkNew smoother; // must be here because it will own the vtk image + + if(smooth) + { + smoother->SetStandardDeviations(1., 1., 1.); + smoother->SetInputConnection(reader->GetOutputPort()); + smoother->Update(); + vtk_image = smoother->GetOutput(); + } + else + { + reader->Update(); + vtk_image = reader->GetOutput(); + } - auto vtk_image = smoother->GetOutput(); vtk_image->Print(std::cerr); - image = new Image; *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data - } + }; -#else - CGAL::Three::Three::warning("You need VTK to read DCM/BMP files"); - CGAL_USE(dirname); + image = new Image; + if(ext == Directory_extension_type::DCM) + { + vtkNew dicom_reader; + dicom_reader->SetDirectoryName(dirname.toUtf8()); + create_image(dicom_reader); + } + else + { + CGAL_assertion(ext == Directory_extension_type::BMP); + + // vtkBMPReader does not provide SetDirectoryName()... + std::vector paths; + vtkStringArray* files = vtkStringArray::New(); + boost::filesystem::path p(dirname.toUtf8().data()); + for(boost::filesystem::directory_entry& x : boost::filesystem::directory_iterator(p)) + { + std::string s = x.path().extension().string(); + std::transform(s.begin(), s.end(), s.begin(), tolower); + if(s != ".bmp") + continue; + + paths.push_back(x.path()); + } + + // boost::filesystem::directory_iterator does not guarantee a sorted order + std::sort(std::begin(paths), std::end(paths)); + + for(const boost::filesystem::path& p : paths) + files->InsertNextValue(p.string()); + + if(files->GetSize() == 0) + return image; + + vtkNew bmp_reader; + bmp_reader->SetFileNames(files); + create_image(bmp_reader); + } #endif return image; From f7925fdd1a8050497506cfdff4e07e3ee8acc7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 12:19:50 +0100 Subject: [PATCH 255/426] Reposition DCM / BMP underneath "Load..." (instead of the bottom of "Files") --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 04badd6299d..4b1d4cf60b6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -294,7 +294,7 @@ public: for(QList::iterator it_action = menuFileActions.begin(), end = menuFileActions.end() ; it_action != end ; ++ it_action ) //Q_FOREACH( QAction* action, menuFileActions) { - if(NULL != *it_action && (*it_action)->text().contains("Load Plugin")) + if(NULL != *it_action && (*it_action)->text().contains("Load...")) { ++it_action; if(it_action != end && NULL != *it_action) From f3ec4653e98982fe5e4c5bebf93977ad672adfa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 12:20:22 +0100 Subject: [PATCH 256/426] List the main item above its volume plane in item list --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 4b1d4cf60b6..a9c10ed9175 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1408,8 +1408,9 @@ bool Io_image_plugin::loadDirectory(const QString& dirname, msgBox.setText("Planes created : 0/3"); msgBox.setStandardButtons(QMessageBox::NoButton); msgBox.show(); - createPlanes(image_item); + scene->addItem(image_item); + createPlanes(image_item); } else { From 282166307c5739e777ccc6a96e0e3f3a7c357d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 12:20:39 +0100 Subject: [PATCH 257/426] Misc minor changes --- CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h | 11 ++++++----- .../Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h index 22b19dee6ed..0492e2acc6a 100644 --- a/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h +++ b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h @@ -94,16 +94,17 @@ read_vtk_image_data(vtkImageData* vtk_image, Image_3::Own owning = Image_3::OWN_ if(owning == Image_3::OWN_THE_DATA) { int dims_n = dims[0]*dims[1]*dims[2]; image->data = ::ImageIO_alloc(dims_n * image->wdim); - std::cerr << "GetNumberOfTuples() = " << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() << "\n" - << "components = " << cn << "\n" - << "wdim = " << image->wdim << "\n" - << "image->size() = " << dims_n << std::endl; + + // std::cerr << "GetNumberOfTuples() = " << vtk_image->GetPointData()->GetScalars()->GetNumberOfTuples() << "\n" + // << "components = " << cn << "\n" + // << "wdim = " << image->wdim << "\n" + // << "image->size() = " << dims_n << std::endl; if(cn == 1) { vtk_image->GetPointData()->GetScalars()->ExportToVoidPointer(image->data); } else { std::cerr << "Warning: input has " << cn << " components; only the value of the first component will be used." << std::endl; - CGAL_assertion(cn >= 3); // if it's more than 1, it needs to be more than 3 + CGAL_assertion(cn >= 3); // if it's more than 1, it needs to be at least 3 // cast the data void pointers to make it possible to do pointer arithmetic char* src = static_cast(vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0)); diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index a9c10ed9175..fa020b7a45e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1136,7 +1136,7 @@ Io_image_plugin::load(QFileInfo fileinfo, bool& ok, bool add_to_scene) vtk_image->Print(std::cerr); *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data #else - CGAL::Three::Three::warning("You need VTK to read a NRRD file"); + CGAL::Three::Three::warning("VTK is required to read NRRD files"); delete image; return QList(); #endif @@ -1366,7 +1366,7 @@ bool Io_image_plugin::loadDirectory(const QString& dirname, ui.precisionList->addItem(s); } - //Adds Image type + // Adds Image type ui.imageType->addItem(QString("Segmented image")); ui.imageType->addItem(QString("Gray-level image")); From 2cdaa261255bc6c35b1866f2c0e55f63c7c1c061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 12:37:22 +0100 Subject: [PATCH 258/426] Minor UI update --- .../Plugins/Mesh_3/Image_res_dialog.ui | 121 +++++++++--------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui index 41834b0133e..8e8c915e77f 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui @@ -6,7 +6,7 @@ 0 0 - 529 + 561 347 @@ -19,31 +19,8 @@ Load a 3D image - - - - - Image &type - - - imageType - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + Qt::Horizontal @@ -53,23 +30,6 @@ - - - - Smooth image data - - - - - - - Qt::Horizontal - - - - - - @@ -93,7 +53,7 @@ 6 - + @@ -102,20 +62,23 @@ - <html><head/><body><p><span style=" font-size:10pt;">1:x means that x voxels of the original image are represented by 1 cube in the drawn image</span></p></body></html> + <html><head/><body><p align="center"><span style=" font-size:10pt;">1:x means that x voxels of the original image are represented by 1 cube in the drawn image</span></p></body></html> true - + + + true + 1 - Segmented image drawing &precision + <html><head/><body><p align="right">Segmented image drawing &amp;precision </p></body></html> true @@ -125,7 +88,7 @@ - + false @@ -137,17 +100,7 @@ - - - - - - - true - - - - + Qt::Vertical @@ -160,6 +113,56 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + <html><head/><body><p align="right">Image &amp;type</p></body></html> + + + imageType + + + + + + + Qt::Horizontal + + + + + + + Smooth image data + + + + + + + + + + true + + + + + + From 272ffa8e2fef75dc31cef6f95dd6ade0fbc5fb84 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 7 Dec 2022 13:03:35 +0000 Subject: [PATCH 259/426] Don't use deprecated code in the demo --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 68b0afc77d6..c76a123b2b1 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 3.1...3.23) project( Polyhedron_Demo ) include(FeatureSummary) + +add_definitions ( -DCGAL_NO_DEPRECATED_CODE ) + # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) From b219436ba1a240d969f286d4657297f7401eba76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Dec 2022 14:19:48 +0100 Subject: [PATCH 260/426] use Stream_support's get_file_extension() --- .../demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index fa020b7a45e..0819581709e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -1484,9 +1485,8 @@ Image* Io_image_plugin::createDirectoryImage(const QString& dirname, boost::filesystem::path p(dirname.toUtf8().data()); for(boost::filesystem::directory_entry& x : boost::filesystem::directory_iterator(p)) { - std::string s = x.path().extension().string(); - std::transform(s.begin(), s.end(), s.begin(), tolower); - if(s != ".bmp") + std::string s = x.path().string(); + if(CGAL::IO::internal::get_file_extension(s) != "bmp") continue; paths.push_back(x.path()); From f38ff92498c2a2aca6cc45e365ecd6d65cde7d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 7 Dec 2022 14:29:05 +0100 Subject: [PATCH 261/426] remove verbose flag --- Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index 90b6216f5f7..720217e0196 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -198,7 +198,7 @@ void tetrahedral_isotropic_remeshing( const SizingFunction& sizing, const NamedParameters& np) { - CGAL_assertion(tr.is_valid(true)); + CGAL_assertion(tr.is_valid()); typedef CGAL::Triangulation_3 Tr; @@ -395,7 +395,7 @@ void tetrahedral_isotropic_remeshing( const SizingFunction& sizing, const NamedParameters& np) { - CGAL_assertion(c3t3.triangulation().tds().is_valid(true)); + CGAL_assertion(c3t3.triangulation().tds().is_valid()); using parameters::get_parameter; using parameters::choose_parameter; From da3a3b300d8814c62e83f8ba29ea9cc9bbfc3059 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 7 Dec 2022 15:10:01 +0000 Subject: [PATCH 262/426] Upgrade deprecated code --- .../Plugins/IO/triangulation_3_io_plugin.cpp | 7 ++++--- .../Polyhedron/Plugins/PMP/Smoothing_plugin.cpp | 16 ++++++++-------- Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp | 3 ++- .../Polyhedron/Scene_triangulation_3_item.cpp | 7 ++++--- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/triangulation_3_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/IO/triangulation_3_io_plugin.cpp index 37bf23b7494..b0312c5eb6a 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/triangulation_3_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/triangulation_3_io_plugin.cpp @@ -1,3 +1,4 @@ +#include #include #include #include "T3_type.h" @@ -34,7 +35,7 @@ public: T3 tr;; if(fileinfo.absoluteFilePath().endsWith(".binary.cgal")) - CGAL::set_binary_mode(ifs); + CGAL::IO::set_binary_mode(ifs); ifs >> tr; if(ifs.fail() || !tr.is_valid(false)) { std::cerr << "Error! Cannot open file " << (const char*)fileinfo.filePath().toUtf8() << std::endl; @@ -71,11 +72,11 @@ public: std::ofstream out(fileinfo.filePath().toUtf8()); if(path.endsWith(".binary.cgal")) { - CGAL::set_binary_mode(out); + CGAL::IO::set_binary_mode(out); } else { - CGAL::set_ascii_mode(out); + CGAL::IO::set_ascii_mode(out); } out << t3_item->triangulation(); if( out.fail()) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp index 8b08e92b62b..212f2cc60ef 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Smoothing_plugin.cpp @@ -220,7 +220,7 @@ public Q_SLOTS: CGAL::Polygon_mesh_processing::tangential_relaxation( vset, pmesh, - CGAL::Polygon_mesh_processing::parameters::number_of_iterations(nb_iter) + CGAL::parameters::number_of_iterations(nb_iter) .edge_is_constrained_map(selection_item->constrained_edges_pmap()) .vertex_is_constrained_map(selection_item->constrained_vertices_pmap()) .relax_constraints(smooth_features)); @@ -234,7 +234,7 @@ public Q_SLOTS: CGAL::Polygon_mesh_processing::tangential_relaxation( vertices(pmesh), pmesh, - CGAL::Polygon_mesh_processing::parameters::number_of_iterations(nb_iter)); + CGAL::parameters::number_of_iterations(nb_iter)); poly_item->invalidateOpenGLBuffers(); Q_EMIT poly_item->itemChanged(); @@ -277,7 +277,7 @@ public Q_SLOTS: if(poly_item) { - angle_and_area_smoothing(pmesh, parameters::do_project(projection) + angle_and_area_smoothing(pmesh, CGAL::parameters::do_project(projection) .number_of_iterations(nb_iter) .vertex_is_constrained_map(vcmap) .use_safety_constraints(use_safety_measures) @@ -295,7 +295,7 @@ public Q_SLOTS: // No faces selected --> use all faces if(std::begin(selection_item->selected_facets) == std::end(selection_item->selected_facets)) { - angle_and_area_smoothing(pmesh, parameters::do_project(projection) + angle_and_area_smoothing(pmesh, CGAL::parameters::do_project(projection) .number_of_iterations(nb_iter) .vertex_is_constrained_map(vcmap) .edge_is_constrained_map(selection_item->constrained_edges_pmap()) @@ -306,7 +306,7 @@ public Q_SLOTS: } else // some faces exist in the selection { - angle_and_area_smoothing(selection_item->selected_facets, pmesh, parameters::do_project(projection) + angle_and_area_smoothing(selection_item->selected_facets, pmesh, CGAL::parameters::do_project(projection) .number_of_iterations(nb_iter) .vertex_is_constrained_map(vcmap) .edge_is_constrained_map(selection_item->constrained_edges_pmap()) @@ -350,7 +350,7 @@ public Q_SLOTS: if(poly_item) { - smooth_shape(pmesh, time_step, parameters::number_of_iterations(nb_iter) + smooth_shape(pmesh, time_step, CGAL::parameters::number_of_iterations(nb_iter) .vertex_is_constrained_map(vcmap)); poly_item->invalidateOpenGLBuffers(); @@ -362,13 +362,13 @@ public Q_SLOTS: if(std::begin(selection_item->selected_facets) == std::end(selection_item->selected_facets)) { - smooth_shape(pmesh, time_step, parameters::number_of_iterations(nb_iter) + smooth_shape(pmesh, time_step, CGAL::parameters::number_of_iterations(nb_iter) .vertex_is_constrained_map(vcmap)); } else { smooth_shape(selection_item->selected_facets, pmesh, time_step, - parameters::number_of_iterations(nb_iter) + CGAL::parameters::number_of_iterations(nb_iter) .vertex_is_constrained_map(vcmap)); } diff --git a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp index 7f1389b8ba4..758fcac5dcc 100644 --- a/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_c3t3_item.cpp @@ -30,6 +30,7 @@ #include +#include #include #include #include @@ -276,7 +277,7 @@ void Scene_c3t3_item::show_cnc(bool b) bool Scene_c3t3_item::load_binary(std::istream& is) { - if(!CGAL::Mesh_3::load_binary_file(is, c3t3())) return false; + if(!CGAL::IO::load_binary_file(is, c3t3())) return false; resetCutPlane(); if(is.good()) { c3t3_changed(); diff --git a/Polyhedron/demo/Polyhedron/Scene_triangulation_3_item.cpp b/Polyhedron/demo/Polyhedron/Scene_triangulation_3_item.cpp index 81298752bb3..e6469c71b8e 100644 --- a/Polyhedron/demo/Polyhedron/Scene_triangulation_3_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_triangulation_3_item.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include "Scene_polygon_soup_item.h" @@ -188,7 +189,7 @@ public : } void addTriangle(const Tr::Bare_point& pa, const Tr::Bare_point& pb, - const Tr::Bare_point& pc, const CGAL::Color color) + const Tr::Bare_point& pc, const CGAL::IO::Color color) { const CGAL::qglviewer::Vec offset = Three::mainViewer()->offset(); Geom_traits::Vector_3 n = cross_product(pb - pa, pc - pa); @@ -1253,7 +1254,7 @@ void Scene_triangulation_3_item_priv::computeIntersection(const Primitive& cell) const Tr::Bare_point& pc = wp2p(ch->vertex(2)->point()); const Tr::Bare_point& pd = wp2p(ch->vertex(3)->point()); - CGAL::Color color(UC(c.red()), UC(c.green()), UC(c.blue())); + CGAL::IO::Color color(UC(c.red()), UC(c.green()), UC(c.blue())); if(is_filterable) { @@ -1355,7 +1356,7 @@ void Scene_triangulation_3_item_priv::computeSpheres() typedef unsigned char UC; tr_vertices.push_back(*vit); spheres->add_sphere(Geom_traits::Sphere_3(center, radius),s_id++, - CGAL::Color(UC(c.red()), UC(c.green()), UC(c.blue()))); + CGAL::IO::Color(UC(c.red()), UC(c.green()), UC(c.blue()))); } spheres->invalidateOpenGLBuffers(); From c5d3f8246be84225c154cea344084f7c861c2216 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 7 Dec 2022 15:29:45 +0000 Subject: [PATCH 263/426] Surprising --- Triangulation_2/include/CGAL/Triangulation_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 5b5725f86de..c763b91f0d9 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include From 7466cfc3830208d10994983af06b024de4589103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 7 Dec 2022 17:11:09 +0100 Subject: [PATCH 264/426] add verbose option to dump c3t3 --- Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h index 5a798e665e0..a14e5a96ecb 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h @@ -40,9 +40,10 @@ template ::is_specialized) > struct Dump_c3t3 { - void dump_c3t3(const C3t3& c3t3, std::string prefix) const + void dump_c3t3(const C3t3& c3t3, std::string prefix, bool verbose) const { - std::clog<<"======dump c3t3===== to: " << prefix << std::endl; + if (verbose) + std::clog<<"======dump c3t3===== to: " << prefix << std::endl; std::ofstream medit_file((prefix+".mesh").c_str()); medit_file.precision(17); CGAL::IO::output_to_medit(medit_file, c3t3, false /*rebind*/, true /*show_patches*/); @@ -63,7 +64,7 @@ struct Dump_c3t3 { template struct Dump_c3t3 { - void dump_c3t3(const C3t3&, std::string) { + void dump_c3t3(const C3t3&, std::string, bool) { std::cerr << "Warning " << __FILE__ << ":" << __LINE__ << "\n" << " the c3t3 object of following type:\n" << typeid(C3t3).name() << std::endl @@ -123,11 +124,11 @@ void dump_c3t3_edges(const C3t3& c3t3, std::string prefix) } } template -void dump_c3t3(const C3t3& c3t3, std::string prefix) +void dump_c3t3(const C3t3& c3t3, std::string prefix, bool verbose = false) { if(!prefix.empty()) { Dump_c3t3 dump; - dump.dump_c3t3(c3t3, prefix); + dump.dump_c3t3(c3t3, prefix, verbose); } } From 7014aa03010fa7fa9fe1f4643cdcd4bdfd0af1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 01:01:15 +0100 Subject: [PATCH 265/426] Use proper template / variable names for BGL graphs --- BGL/include/CGAL/draw_face_graph.h | 75 +++++++++++++++--------------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 905987d3313..5f040c96b7f 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -60,28 +60,28 @@ public: } /// Construct the viewer. - /// @param amesh the surface mesh to view + /// @param g the face graph to view /// @param title the title of the window /// @param anofaces if true, do not draw faces (faces are not computed; this can be /// usefull for very big object where this time could be long) - template + template SimpleFaceGraphViewerQt(QWidget* parent, - const SM& amesh, - const char* title="Basic Surface_mesh Viewer", + const Graph& g, + const char* title="Basic Face Graph Viewer", bool anofaces=false) : - SimpleFaceGraphViewerQt(parent, amesh, title, anofaces, DefaultColorFunctorFaceGraph()) + SimpleFaceGraphViewerQt(parent, g, title, anofaces, DefaultColorFunctorFaceGraph()) { } - template + template SimpleFaceGraphViewerQt(QWidget* parent, - const SM& amesh, + const Graph& g, const char* title, bool anofaces, ColorFunctor fcolor) : // First draw: no vertex; edges, faces; mono-color; inverse normal Base(parent, title, false, true, true, true, false), - m_compute_elements_impl(compute_elements_functor(amesh, anofaces, fcolor)) + m_compute_elements_impl(compute_elements_functor(g, anofaces, fcolor)) { } @@ -94,43 +94,42 @@ public: m_compute_elements_impl(); } - template - void set_face_graph(const SM& amesh, + template + void set_face_graph(const Graph& g, bool anofaces, ColorFunctor fcolor) { - m_compute_elements_impl = compute_elements_functor(amesh, anofaces, fcolor); + m_compute_elements_impl = compute_elements_functor(g, anofaces, fcolor); } - template - void set_face_graph(const SM& amesh, + template + void set_face_graph(const Graph& g, bool anofaces=false) { - set_mesh(amesh, anofaces, DefaultColorFunctorFaceGraph()); + set_mesh(g, anofaces, DefaultColorFunctorFaceGraph()); } protected: - template + template std::function - compute_elements_functor(const SM& sm, + compute_elements_functor(const Graph& g, bool anofaces, ColorFunctor fcolor) { - using Point = - typename boost::property_map_value::type; + using Point = typename boost::property_map_value::type; using Kernel = typename CGAL::Kernel_traits::Kernel; using Vector = typename Kernel::Vector_3; - auto vnormals = get(CGAL::dynamic_vertex_property_t(), sm); - auto point_pmap = get(CGAL::vertex_point, sm); - for (auto v : vertices(sm)) + auto vnormals = get(CGAL::dynamic_vertex_property_t(), g); + auto point_pmap = get(CGAL::vertex_point, g); + for (auto v : vertices(g)) { Vector n(NULL_VECTOR); int i=0; - for (auto h : halfedges_around_target(halfedge(v, sm), sm)) + for (auto h : halfedges_around_target(halfedge(v, g), g)) { - if (!is_border(h, sm)) + if (!is_border(h, g)) { Vector ni = CGAL::cross_product( - Vector(get(point_pmap, source(h, sm)), get(point_pmap, target(h, sm))), - Vector(get(point_pmap, target(h, sm)), get(point_pmap, target(next(h, sm), sm)))); + Vector(get(point_pmap, source(h, g)), get(point_pmap, target(h, g))), + Vector(get(point_pmap, target(h, g)), get(point_pmap, target(next(h, g), g)))); if (ni != NULL_VECTOR) { n+=ni; @@ -143,25 +142,25 @@ protected: // This function return a lambda expression, type-erased in a // `std::function` object. - return [this, &sm, vnormals, anofaces, fcolor, point_pmap]() + return [this, &g, vnormals, anofaces, fcolor, point_pmap]() { this->clear(); if (!anofaces) { - for (auto fh: faces(sm)) + for (auto fh: faces(g)) { - if (fh!=boost::graph_traits::null_face()) + if (fh!=boost::graph_traits::null_face()) // @fixme useless { - CGAL::IO::Color c=fcolor(sm, fh); + const CGAL::IO::Color& c = fcolor(g, fh); face_begin(c); - auto hd=halfedge(fh, sm); + auto hd=halfedge(fh, g); const auto first_hd = hd; do { - auto v = source(hd, sm); + auto v = source(hd, g); add_point_in_face(get(point_pmap, v), get(vnormals, v)); - hd=next(hd, sm); + hd=next(hd, g); } while(hd!=first_hd); face_end(); @@ -169,17 +168,17 @@ protected: } } - for (auto e: edges(sm)) + for (auto e: edges(g)) { - CGAL::IO::Color c=fcolor(sm, e); - add_segment(get(point_pmap, source(halfedge(e, sm), sm)), - get(point_pmap, target(halfedge(e, sm), sm)), + const CGAL::IO::Color& c = fcolor(g, e); + add_segment(get(point_pmap, source(halfedge(e, g), g)), + get(point_pmap, target(halfedge(e, g), g)), c); } - for (auto v: vertices(sm)) + for (auto v: vertices(g)) { - CGAL::IO::Color c=fcolor(sm, v); + const CGAL::IO::Color& c = fcolor(g, v); this->add_point(get(point_pmap, v), c); } }; From 80d4abdb0bb740cc080b21669d0bd49e4f487171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 01:01:47 +0100 Subject: [PATCH 266/426] Restore default coloring functor --- BGL/include/CGAL/draw_face_graph.h | 42 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 5f040c96b7f..4c1c70a5376 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -19,32 +19,34 @@ #include #include -namespace CGAL -{ - -template -std::string getColorPropertyName(void) { return std::string("color"); } - -template <> -inline std::string getColorPropertyName(void) { return std::string("f:color"); } - -template <> -inline std::string getColorPropertyName(void) { return std::string("e:color"); } - -template <> -inline std::string getColorPropertyName(void) { return std::string("v:color"); } +namespace CGAL { // Default color functor; user can change it to have its own face color struct DefaultColorFunctorFaceGraph { - template + template CGAL::IO::Color operator()(const Graph& mesh, - EI elementIndex) const + typename boost::graph_traits::face_descriptor fh) const { - typename Graph::template Property_map colorPm; - bool found; - std::tie(colorPm, found) = mesh.template property_map(getColorPropertyName()); //Get the color property map - return found ? colorPm[elementIndex] : get_random_color(CGAL::get_default_random()); //return the element color if any, otherwise return a random color + if (fh == boost::graph_traits::null_face()) // use to get the mono color + return CGAL::IO::Color(100, 125, 200); // R G B between 0-255 + + return get_random_color(CGAL::get_default_random()); + } + + // edge and vertices are black by default + template + CGAL::IO::Color operator()(const Graph& mesh, + typename boost::graph_traits::edge_descriptor) const + { + return IO::black(); + } + + template + CGAL::IO::Color operator()(const Graph& mesh, + typename boost::graph_traits::vertex_descriptor) const + { + return IO::black(); } }; From 6086830fc29452aa42492d627c95d6a8a148725b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 01:07:26 +0100 Subject: [PATCH 267/426] No point checking for null faces in faces(g) --- BGL/include/CGAL/draw_face_graph.h | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 4c1c70a5376..6f1a047ce7c 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -28,9 +28,6 @@ struct DefaultColorFunctorFaceGraph CGAL::IO::Color operator()(const Graph& mesh, typename boost::graph_traits::face_descriptor fh) const { - if (fh == boost::graph_traits::null_face()) // use to get the mono color - return CGAL::IO::Color(100, 125, 200); // R G B between 0-255 - return get_random_color(CGAL::get_default_random()); } @@ -152,21 +149,18 @@ protected: { for (auto fh: faces(g)) { - if (fh!=boost::graph_traits::null_face()) // @fixme useless - { - const CGAL::IO::Color& c = fcolor(g, fh); - face_begin(c); - auto hd=halfedge(fh, g); - const auto first_hd = hd; - do - { - auto v = source(hd, g); - add_point_in_face(get(point_pmap, v), get(vnormals, v)); - hd=next(hd, g); - } - while(hd!=first_hd); - face_end(); - } + const CGAL::IO::Color& c = fcolor(g, fh); + face_begin(c); + auto hd=halfedge(fh, g); + const auto first_hd = hd; + do + { + auto v = source(hd, g); + add_point_in_face(get(point_pmap, v), get(vnormals, v)); + hd=next(hd, g); + } + while(hd!=first_hd); + face_end(); } } From c670c24e3a5dd82d82353755cbc9a10bc5450dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 01:08:07 +0100 Subject: [PATCH 268/426] Add an element coloring functor for Surface_mesh that checks for internal pmaps --- Surface_mesh/include/CGAL/draw_surface_mesh.h | 54 +++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index 3459392aec1..fd1c4253cdb 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -36,8 +36,56 @@ void draw(const SM& asm); #include #include #include -namespace CGAL + +namespace CGAL { + +// Check if there are any color maps that could be used, random otherwise +template +struct Surface_mesh_basic_viewer_color_map + : DefaultColorFunctorFaceGraph { + using Base = DefaultColorFunctorFaceGraph; + + using SM = ::CGAL::Surface_mesh; + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using edge_descriptor = typename boost::graph_traits::edge_descriptor; + using face_descriptor = typename boost::graph_traits::face_descriptor; + + using vertex_colors = typename SM::template Property_map; + using edge_colors = typename SM::template Property_map; + using face_colors = typename SM::template Property_map; + + Surface_mesh_basic_viewer_color_map(const SM& amesh) + { + bool found = false; + std::tie(vcolors, found) = amesh.template property_map("v:color"); + std::tie(ecolors, found) = amesh.template property_map("e:color"); + std::tie(fcolors, found) = amesh.template property_map("f:color"); + } + + CGAL::IO::Color operator()(const Surface_mesh& amesh, + const vertex_descriptor v) const + { + return vcolors ? get(vcolors, v) : Base::operator()(amesh, v); + } + + CGAL::IO::Color operator()(const Surface_mesh& amesh, + const edge_descriptor e) const + { + return ecolors ? get(ecolors, e) : Base::operator()(amesh, e); + } + + CGAL::IO::Color operator()(const Surface_mesh& amesh, + const face_descriptor f) const + { + return fcolors ? get(fcolors, f) : Base::operator()(amesh, f); + } + +private: + vertex_colors vcolors; + edge_colors ecolors; + face_colors fcolors; +}; // Specialization of draw function. template @@ -57,8 +105,8 @@ void draw(const Surface_mesh& amesh, int argc=1; const char* argv[2]={"surface_mesh_viewer", nullptr}; QApplication app(argc,const_cast(argv)); - SimpleFaceGraphViewerQt mainwindow(app.activeWindow(), amesh, title, - nofill); + SimpleFaceGraphViewerQt mainwindow(app.activeWindow(), amesh, title, nofill, + Surface_mesh_basic_viewer_color_map(amesh)); mainwindow.show(); app.exec(); } From 9833bcf9f0e2b3d1f98de7697ceda408249b966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 01:14:15 +0100 Subject: [PATCH 269/426] Use some color property maps in the surface_mesh basic draw example --- .../examples/Surface_mesh/draw_surface_mesh.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp index cbd42788fcc..bbbdbdf2e93 100644 --- a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp +++ b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp @@ -20,6 +20,23 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } + // Internal color property maps are used if they exist and are called "v:color", "e:color" and "f:color". + auto vcm = sm.add_property_map("v:color").first; + auto ecm = sm.add_property_map("e:color").first; + auto fcm = sm.add_property_map("f:color", CGAL::IO::white() /*default*/).first; + + for(auto v : vertices(sm)) + { + if(v.idx()%2) + put(vcm, v, CGAL::IO::black()); + else + put(vcm, v, CGAL::IO::blue()); + } + + for(auto e : edges(sm)) + put(ecm, e, CGAL::IO::gray()); + + // Draw! CGAL::draw(sm); return EXIT_SUCCESS; From a8c792c4e9fc2b2478432aa8f3bf3b72cd16274f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 01:17:01 +0100 Subject: [PATCH 270/426] Anticipate some warnings --- BGL/include/CGAL/draw_face_graph.h | 12 ++++++------ .../examples/Surface_mesh/draw_surface_mesh.cpp | 2 +- Surface_mesh/include/CGAL/draw_surface_mesh.h | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 6f1a047ce7c..612e4309c59 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -25,23 +25,23 @@ namespace CGAL { struct DefaultColorFunctorFaceGraph { template - CGAL::IO::Color operator()(const Graph& mesh, - typename boost::graph_traits::face_descriptor fh) const + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::face_descriptor /*f*/) const { return get_random_color(CGAL::get_default_random()); } // edge and vertices are black by default template - CGAL::IO::Color operator()(const Graph& mesh, - typename boost::graph_traits::edge_descriptor) const + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::edge_descriptor /*e*/) const { return IO::black(); } template - CGAL::IO::Color operator()(const Graph& mesh, - typename boost::graph_traits::vertex_descriptor) const + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::vertex_descriptor /*v*/) const { return IO::black(); } diff --git a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp index bbbdbdf2e93..ad8d0738dd6 100644 --- a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp +++ b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp @@ -23,7 +23,7 @@ int main(int argc, char* argv[]) // Internal color property maps are used if they exist and are called "v:color", "e:color" and "f:color". auto vcm = sm.add_property_map("v:color").first; auto ecm = sm.add_property_map("e:color").first; - auto fcm = sm.add_property_map("f:color", CGAL::IO::white() /*default*/).first; + /*auto fcm =*/ sm.add_property_map("f:color", CGAL::IO::white() /*default*/).first; for(auto v : vertices(sm)) { diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index fd1c4253cdb..8dd25acd5b2 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -36,6 +36,7 @@ void draw(const SM& asm); #include #include #include +#include namespace CGAL { @@ -61,6 +62,7 @@ struct Surface_mesh_basic_viewer_color_map std::tie(vcolors, found) = amesh.template property_map("v:color"); std::tie(ecolors, found) = amesh.template property_map("e:color"); std::tie(fcolors, found) = amesh.template property_map("f:color"); + CGAL_USE(found); } CGAL::IO::Color operator()(const Surface_mesh& amesh, From eecd538759b9df999282d82153c3d9dbeeef8d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 8 Dec 2022 10:35:48 +0100 Subject: [PATCH 271/426] Fix typo --- BGL/include/CGAL/draw_face_graph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BGL/include/CGAL/draw_face_graph.h b/BGL/include/CGAL/draw_face_graph.h index 612e4309c59..5db697d9c92 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -31,7 +31,7 @@ struct DefaultColorFunctorFaceGraph return get_random_color(CGAL::get_default_random()); } - // edge and vertices are black by default + // edges and vertices are black by default template CGAL::IO::Color operator()(const Graph& /*g*/, typename boost::graph_traits::edge_descriptor /*e*/) const From 0d89f3c12bc310a8d7e47978a06925d1a5528d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 8 Dec 2022 15:56:55 +0100 Subject: [PATCH 272/426] remove non-needed instruction --- .github/install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/install.sh b/.github/install.sh index e06328da401..32b8552aa8f 100755 --- a/.github/install.sh +++ b/.github/install.sh @@ -1,5 +1,4 @@ #!/bin/bash -sudo add-apt-repository ppa:mikhailnov/pulseeffects -y sudo apt-get update sudo apt-get install -y libmpfr-dev \ libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \ From 0ac2d8ec0fae68b6d9af8e8ebbda3a3c434544ba Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 9 Dec 2022 07:37:03 +0000 Subject: [PATCH 273/426] Remove the parameters which have become nps --- .../Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index 1716ea56a09..06640c85b9c 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -730,13 +730,12 @@ bool Polyhedron_demo_hole_filling_plugin::fill auto vpm = get_property_map(CGAL::vertex_point, poly); auto weight_calc = CGAL::Weights::Secure_cotangent_weight_with_voronoi_area(poly, vpm, EPICK()); - success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly, - it, std::back_inserter(patch), CGAL::Emptyset_iterator(), - CGAL::parameters::face_output_iterator(std::back_inserter(patch)). - weight_calculator(weight_calc). - density_control_factor(alpha). - fairing_continuity(continuity). - use_delaunay_triangulation(use_DT))); + success = std::get<0>(CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole(poly,it, + CGAL::parameters::face_output_iterator(std::back_inserter(patch)). + weight_calculator(weight_calc). + density_control_factor(alpha). + fairing_continuity(continuity). + use_delaunay_triangulation(use_DT))); } if(!success) { print_message("Error: fairing is not successful, only triangulation and refinement are applied!"); } From 71e452a6b8c8328e1994aa4b2911883080470ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 12 Dec 2022 17:55:41 +0100 Subject: [PATCH 274/426] be verbose if the macro is defined --- Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h index a14e5a96ecb..406e3d18cee 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h @@ -124,7 +124,12 @@ void dump_c3t3_edges(const C3t3& c3t3, std::string prefix) } } template -void dump_c3t3(const C3t3& c3t3, std::string prefix, bool verbose = false) +void dump_c3t3(const C3t3& c3t3, std::string prefix, +#ifdef CGAL_MESH_3_VERBOSE + bool verbose = true) +#else + bool verbose = false) +#endif { if(!prefix.empty()) { Dump_c3t3 dump; From efcebf2294fb0f9c1af3c25f349d7ea58b3476d2 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 13 Dec 2022 11:31:39 +0100 Subject: [PATCH 275/426] seed the far points generator to make parallel Mesh_3 with 1 thread deterministic --- Mesh_3/include/CGAL/Mesh_3/Mesher_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index e8f105cd241..0276953543f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -690,7 +690,7 @@ initialize() # ifdef CGAL_CONCURRENT_MESH_3_VERBOSE std::cerr << "Adding points on a far sphere (radius = " << radius <<")..."; # endif - Random_points_on_sphere_3 random_point(radius); + Random_points_on_sphere_3 random_point(radius, CGAL::Random(0)); const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( float(std::thread::hardware_concurrency()) * Concurrent_mesher_config::get().num_pseudo_infinite_vertices_per_core); From 5830d9a9eeda4cf8ae3c7e30036ad1b568d0dc3e Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 13 Dec 2022 11:51:43 +0100 Subject: [PATCH 276/426] minor improvements of tests --- Mesh_3/test/Mesh_3/test_meshing_determinism.cpp | 16 ++++++++++++---- ...test_meshing_without_features_determinism.cpp | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp index ef92a338025..4ab1f551c6b 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp @@ -68,7 +68,10 @@ void test() // iterate std::vector output_c3t3; std::vector output_surfaces; - output_c3t3.reserve(5 * nb_runs); + + const int nb_operations = 5; + + output_c3t3.reserve(nb_operations * nb_runs); for(std::size_t i = 0; i < nb_runs; ++i) { std::cout << "------- Iteration " << (i+1) << " -------" << std::endl; @@ -133,14 +136,16 @@ void test() if(i == 0) continue; //else check - for(std::size_t j = 0; j < 5; ++j) + for(std::size_t j = 0; j < nb_operations; ++j) { - if(0 != output_c3t3[5*(i-1)+j].compare(output_c3t3[5*i+j])) + int id1 = nb_operations * (i - 1) + j; + int id2 = nb_operations * i + j; + if(0 != output_c3t3[id1].compare(output_c3t3[id2])) { std::cerr << "Meshing operation " << j << " is not deterministic.\n"; assert(false); } - if (0 != output_surfaces[5 * (i - 1) + j].compare(output_surfaces[5 * i + j])) + if (0 != output_surfaces[id1].compare(output_surfaces[id2])) { std::cerr << "Output surface after operation " << j << " is not deterministic.\n"; assert(false); @@ -151,8 +156,11 @@ void test() int main(int, char*[]) { + std::cout << "Sequential test" << std::endl; test(); + #ifdef CGAL_LINKED_WITH_TBB + std::cout << "\n\nParallel with 1 thread test" << std::endl; tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); test(); #endif diff --git a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp index 55c9dee79cb..0dd8fb46888 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp @@ -149,8 +149,11 @@ void test() int main(int, char*[]) { + std::cout << "Sequential test" << std::endl; test(); + #ifdef CGAL_LINKED_WITH_TBB + std::cout << "\n\nParallel with 1 thread test" << std::endl; tbb::global_control c(tbb::global_control::max_allowed_parallelism, 1); test(); #endif From 397620e7bef72cedbcc727f3857707338741c292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 13 Dec 2022 19:03:46 +0100 Subject: [PATCH 277/426] add special case for intersection of a vertical segment with an horizontal segment --- .../CGAL/Intersections_2/Segment_2_Segment_2.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h index 5fd1545cc38..f7032fa8daa 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -436,6 +436,22 @@ Segment_2_Segment_2_pair::intersection_type() const : CGAL::make_array( _seg2->point(s2s2_id[c][2]), _seg2->point(s2s2_id[c][3]), _seg1->point(s2s2_id[c][0]), _seg1->point(s2s2_id[c][1]) ); + // special case for vertical and horizontal segments + if (std::is_floating_point::value && + std::is_same::value) + { + if (pts[0].x()==pts[1].x() && pts[2].y()==pts[3].y()) + { + _intersection_point = K().construct_point_2_object()(pts[0].x(), pts[2].y()); + return _result; + } + if (pts[0].y()==pts[1].y() && pts[2].x()==pts[3].x()) + { + _intersection_point = K().construct_point_2_object()(pts[2].x(), pts[0].y()); + return _result; + } + } + typename K::FT alpha = s2s2_alpha(pts[0].x(), pts[0].y(), pts[1].x(), pts[1].y(), pts[2].x(), pts[2].y(), pts[3].x(), pts[3].y()); _intersection_point = K().construct_barycenter_2_object()(pts[0], alpha, pts[1]); From 8da2cd9a3495e396fe545e02088799b3f50df768 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 7 Dec 2022 17:35:57 +0000 Subject: [PATCH 278/426] Triangulation_2 Demo: Read files with many WKT entities --- .../Constrained_Delaunay_triangulation_2.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp index a05bf7ba8bf..809ca71bb53 100644 --- a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp @@ -559,9 +559,20 @@ MainWindow::loadWKT(QString filename) { typedef CGAL::Polygon_with_holes_2 Polygon; typedef CGAL::Point_2 Point; - std::vector mps; - CGAL::IO::read_multi_polygon_WKT(ifs, mps); - for(const Polygon& p : mps) + + std::deque points; + std::deque> linestrings; + std::deque polygons; + + CGAL::IO::read_WKT(ifs, points, linestrings, polygons); + + cdt.insert(points.begin(),points.end()); + + for(const std::vector& line){ + cdt.insert_constraint(line.begin(), line.end()); + } + + for(const Polygon& p : polygons) { if(p.outer_boundary().is_empty()) continue; From aa8da893c2b9f0f5af9fea10d56816d3ad3e4a8b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 8 Dec 2022 16:23:10 +0000 Subject: [PATCH 279/426] Fix and simplify code --- .../Constrained_Delaunay_triangulation_2.cpp | 108 ++++-------------- Stream_support/include/CGAL/IO/WKT.h | 46 ++++---- 2 files changed, 45 insertions(+), 109 deletions(-) diff --git a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp index 809ca71bb53..5c09d1e3699 100644 --- a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp @@ -555,98 +555,32 @@ MainWindow::loadWKT(QString filename) { //Polygons todo : make it multipolygons std::ifstream ifs(qPrintable(filename)); - do - { - typedef CGAL::Polygon_with_holes_2 Polygon; - typedef CGAL::Point_2 Point; - std::deque points; - std::deque> linestrings; - std::deque polygons; + typedef CGAL::Polygon_with_holes_2 Polygon; + typedef CGAL::Point_2 Point; - CGAL::IO::read_WKT(ifs, points, linestrings, polygons); + std::deque points; + std::deque> linestrings; + std::deque polygons; - cdt.insert(points.begin(),points.end()); + CGAL::IO::read_WKT(ifs, points, linestrings, polygons); - for(const std::vector& line){ - cdt.insert_constraint(line.begin(), line.end()); + cdt.insert(points.begin(),points.end()); + + for(const std::vector& line : linestrings){ + cdt.insert_constraint(line.begin(), line.end()); + } + + for(const Polygon& p : polygons){ + if(p.outer_boundary().is_empty()) + continue; + + cdt.insert_constraint(p.outer_boundary().vertices_begin(), p.outer_boundary().vertices_end(),true); + + for(Polygon::Hole_const_iterator h_it = p.holes_begin(); h_it != p.holes_end(); ++h_it){ + cdt.insert_constraint(h_it->vertices_begin(); e_it != h_it->vertices_end(),true); } - - for(const Polygon& p : polygons) - { - if(p.outer_boundary().is_empty()) - continue; - - for(Point point : p.outer_boundary().container()) - cdt.insert(point); - for(Polygon::General_polygon_2::Edge_const_iterator - e_it=p.outer_boundary().edges_begin(); e_it != p.outer_boundary().edges_end(); ++e_it) - cdt.insert_constraint(e_it->source(), e_it->target()); - - for(Polygon::Hole_const_iterator h_it = - p.holes_begin(); h_it != p.holes_end(); ++h_it) - { - for(Point point : h_it->container()) - cdt.insert(point); - for(Polygon::General_polygon_2::Edge_const_iterator - e_it=h_it->edges_begin(); e_it != h_it->edges_end(); ++e_it) - { - cdt.insert_constraint(e_it->source(), e_it->target()); - } - } - } - }while(ifs.good() && !ifs.eof()); - //Edges - ifs.clear(); - ifs.seekg(0, ifs.beg); - do - { - typedef std::vector LineString; - std::vector mls; - CGAL::IO::read_multi_linestring_WKT(ifs, mls); - for(const LineString& ls : mls) - { - if(ls.empty()) - continue; - K::Point_2 p,q, qold(0,0); // initialize to avoid maybe-uninitialized warning from GCC6 - bool first = true; - CDT::Vertex_handle vp, vq, vqold; - LineString::const_iterator it = - ls.begin(); - for(; it != ls.end(); ++it) { - p = *it++; - q = *it; - if(p == q){ - continue; - } - if((!first) && (p == qold)){ - vp = vqold; - } else { - vp = cdt.insert(p); - } - vq = cdt.insert(q, vp->face()); - if(vp != vq) { - cdt.insert_constraint(vp,vq); - } - qold = q; - vqold = vq; - first = false; - } - } - }while(ifs.good() && !ifs.eof()); - - //Points - ifs.clear(); - ifs.seekg(0, ifs.beg); - do - { - std::vector mpts; - CGAL::IO::read_multi_point_WKT(ifs, mpts); - for(const K::Point_2& p : mpts) - { - cdt.insert(p); - } - }while(ifs.good() && !ifs.eof()); + } discoverComponents(cdt, m_seeds); Q_EMIT( changed()); diff --git a/Stream_support/include/CGAL/IO/WKT.h b/Stream_support/include/CGAL/IO/WKT.h index c56da5a4990..266939338fd 100644 --- a/Stream_support/include/CGAL/IO/WKT.h +++ b/Stream_support/include/CGAL/IO/WKT.h @@ -503,72 +503,74 @@ bool read_WKT(std::istream& is, if(!is.good()) return false; - do + while(is.good() && !is.eof()) { typedef typename MultiPoint::value_type Point; typedef typename MultiLineString::value_type LineString; typedef typename MultiPolygon::value_type Polygon; std::string line; - std::streampos input_pos = is.tellg(); std::getline(is, line); - std::istringstream iss(line); - std::string t; - std::string type=""; - iss >> t; - - for(std::size_t pos=0; pos < t.length(); ++pos) - { - char c = t[pos]; - if(c == '(') - break; - - type.push_back(c); + std::string::size_type header_end = line.find("("); // } + if(header_end == std::string::npos){ + continue; } + std::string type=""; + const std::string header = line.substr(0,header_end); + const std::string types[6] = { "MULTIPOLYGON", "MULTILINESTRING", "MULTIPOINT", "POLYGON", "LINESTRING", "POINT"}; + for(int i= 0; i < 6; ++i){ + if(header.find(types[i]) != std::string::npos){ + type = types[i]; + break; + } + } + if(type == ""){ + continue; + } + std::istringstream iss(line); - is.seekg(input_pos); if(type == "POINT") { Point p; - CGAL::IO::read_point_WKT(is, p); + CGAL::IO::read_point_WKT(iss, p); points.push_back(p); } else if(type == "LINESTRING") { LineString l; - CGAL::IO::read_linestring_WKT(is, l); + CGAL::IO::read_linestring_WKT(iss, l); polylines.push_back(l); } else if(type == "POLYGON") { Polygon p; - CGAL::IO::read_polygon_WKT(is, p); + CGAL::IO::read_polygon_WKT(iss, p); if(!p.outer_boundary().is_empty()) polygons.push_back(p); } else if(type == "MULTIPOINT") { MultiPoint mp; - CGAL::IO::read_multi_point_WKT(is, mp); + CGAL::IO::read_multi_point_WKT(iss, mp); for(const Point& point : mp) points.push_back(point); } else if(type == "MULTILINESTRING") { MultiLineString mls; - CGAL::IO::read_multi_linestring_WKT(is, mls); + CGAL::IO::read_multi_linestring_WKT(iss, mls); for(const LineString& ls : mls) polylines.push_back(ls); } else if(type == "MULTIPOLYGON") { MultiPolygon mp; - CGAL::IO::read_multi_polygon_WKT(is, mp); + CGAL::IO::read_multi_polygon_WKT(iss, mp); for(const Polygon& poly : mp) polygons.push_back(poly); } } - while(is.good() && !is.eof()); + return !is.fail(); } From 97be3701e1b00f6fc77e942a3824d85850585769 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 9 Dec 2022 07:45:42 +0000 Subject: [PATCH 280/426] Fix and locally tested --- .../Triangulation_2/Constrained_Delaunay_triangulation_2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp index 5c09d1e3699..5429cf3ff64 100644 --- a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp @@ -578,7 +578,7 @@ MainWindow::loadWKT(QString filename) cdt.insert_constraint(p.outer_boundary().vertices_begin(), p.outer_boundary().vertices_end(),true); for(Polygon::Hole_const_iterator h_it = p.holes_begin(); h_it != p.holes_end(); ++h_it){ - cdt.insert_constraint(h_it->vertices_begin(); e_it != h_it->vertices_end(),true); + cdt.insert_constraint(h_it->vertices_begin(), h_it->vertices_end(),true); } } From cf04d506f3e20455678760fc28beafa2bf03bb68 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Dec 2022 10:28:21 +0100 Subject: [PATCH 281/426] Merge PR "Mesh_3, dump_c3t3: remove verbose flag" #7110 --- SMDS_3/include/CGAL/SMDS_3/Dump_c3t3.h | 16 +++++++++++----- .../include/CGAL/tetrahedral_remeshing.h | 4 ++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/SMDS_3/include/CGAL/SMDS_3/Dump_c3t3.h b/SMDS_3/include/CGAL/SMDS_3/Dump_c3t3.h index ebb78341db1..bce09a6820c 100644 --- a/SMDS_3/include/CGAL/SMDS_3/Dump_c3t3.h +++ b/SMDS_3/include/CGAL/SMDS_3/Dump_c3t3.h @@ -39,9 +39,10 @@ template ::is_specialized) > struct Dump_c3t3 { - void dump_c3t3(const C3t3& c3t3, std::string prefix) const + void dump_c3t3(const C3t3& c3t3, std::string prefix, bool verbose) const { - std::clog<<"======dump c3t3===== to: " << prefix << std::endl; + if (verbose) + std::clog<<"======dump c3t3===== to: " << prefix << std::endl; std::ofstream medit_file((prefix+".mesh").c_str()); medit_file.precision(17); CGAL::IO::output_to_medit(medit_file, c3t3, false /*rebind*/, true /*show_patches*/); @@ -62,7 +63,7 @@ struct Dump_c3t3 { template struct Dump_c3t3 { - void dump_c3t3(const C3t3&, std::string) { + void dump_c3t3(const C3t3&, std::string, bool) { std::cerr << "Warning " << __FILE__ << ":" << __LINE__ << "\n" << " the c3t3 object of following type:\n" << typeid(C3t3).name() << std::endl @@ -122,11 +123,16 @@ void dump_c3t3_edges(const C3t3& c3t3, std::string prefix) } } template -void dump_c3t3(const C3t3& c3t3, std::string prefix) +void dump_c3t3(const C3t3& c3t3, std::string prefix, +#ifdef CGAL_MESH_3_VERBOSE + bool verbose = true) +#else + bool verbose = false) +#endif { if(!prefix.empty()) { Dump_c3t3 dump; - dump.dump_c3t3(c3t3, prefix); + dump.dump_c3t3(c3t3, prefix, verbose); } } diff --git a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h index 4a2dd01166b..edd23bc2967 100644 --- a/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h +++ b/Tetrahedral_remeshing/include/CGAL/tetrahedral_remeshing.h @@ -198,7 +198,7 @@ void tetrahedral_isotropic_remeshing( const SizingFunction& sizing, const NamedParameters& np) { - CGAL_assertion(tr.is_valid(true)); + CGAL_assertion(tr.is_valid()); typedef CGAL::Triangulation_3 Tr; @@ -378,7 +378,7 @@ void tetrahedral_isotropic_remeshing( const SizingFunction& sizing, const NamedParameters& np = parameters::default_values()) { - CGAL_assertion(c3t3.triangulation().tds().is_valid(true)); + CGAL_assertion(c3t3.triangulation().tds().is_valid()); using parameters::get_parameter; using parameters::choose_parameter; From ea2a80347fa70ac403c23ca6fc22de709322c135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 14 Dec 2022 17:10:42 +0100 Subject: [PATCH 282/426] rnd is taken by non-const reference --- Mesh_3/include/CGAL/Mesh_3/Mesher_3.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index 0276953543f..4f5115fb13c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -690,7 +690,8 @@ initialize() # ifdef CGAL_CONCURRENT_MESH_3_VERBOSE std::cerr << "Adding points on a far sphere (radius = " << radius <<")..."; # endif - Random_points_on_sphere_3 random_point(radius, CGAL::Random(0)); + CGAL::Random rnd(0); + Random_points_on_sphere_3 random_point(radius, rnd); const int NUM_PSEUDO_INFINITE_VERTICES = static_cast( float(std::thread::hardware_concurrency()) * Concurrent_mesher_config::get().num_pseudo_infinite_vertices_per_core); From 00ad155388e5da79029b49cff5eb8d49ef41bed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 19 Sep 2022 17:51:42 +0200 Subject: [PATCH 283/426] ignore internal directories --- Documentation/doc/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index a885f8ecea2..f23f44a057f 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -131,6 +131,10 @@ function(configure_doxygen_package CGAL_PACKAGE_NAME) endif() endif() endif() + if(EXISTS "${CGAL_PACKAGE_DIR}/include/CGAL/${CGAL_PACKAGE_NAME}/internal") + file(APPEND ${CGAL_DOC_PACKAGE_DEFAULTS} + "EXCLUDE += ${CGAL_PACKAGE_DIR}/include/CGAL/${CGAL_PACKAGE_NAME}/internal\n") + endif() # IMAGE_PATH is set by default. For Documentation, we generate the extra path using packages.txt set(IMAGE_PATHS "${CGAL_PACKAGE_DOC_DIR}/fig") From 069e43a5dadf44f8556edba2d50c32e4a1c1358a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 15 Dec 2022 10:20:45 +0100 Subject: [PATCH 284/426] remove specific internal exclude list (covered with the general one) --- Optimal_bounding_box/doc/Optimal_bounding_box/Doxyfile.in | 1 - .../doc/Polygon_mesh_processing/Doxyfile.in | 1 - .../doc/Polygonal_surface_reconstruction/Doxyfile.in | 1 - SMDS_3/doc/SMDS_3/Doxyfile.in | 3 --- .../doc/Surface_mesh_approximation/Doxyfile.in | 2 -- Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Doxyfile.in | 2 -- 6 files changed, 10 deletions(-) diff --git a/Optimal_bounding_box/doc/Optimal_bounding_box/Doxyfile.in b/Optimal_bounding_box/doc/Optimal_bounding_box/Doxyfile.in index 660c20cc18a..daea5f5aca5 100644 --- a/Optimal_bounding_box/doc/Optimal_bounding_box/Doxyfile.in +++ b/Optimal_bounding_box/doc/Optimal_bounding_box/Doxyfile.in @@ -5,7 +5,6 @@ EXTRACT_ALL = false HIDE_UNDOC_CLASSES = true WARN_IF_UNDOCUMENTED = true -EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Optimal_bounding_box/internal EXCLUDE_SYMBOLS += experimental HTML_EXTRA_FILES = ${CGAL_PACKAGE_DOC_DIR}/fig/aabb_vs_obb.jpg \ diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in index fa3b8b8f1bf..52bde2b920c 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Doxyfile.in @@ -16,7 +16,6 @@ ALIASES += "cgalDescribePolylineType=A polyline is defined as a sequence of poin EXAMPLE_PATH += ${CGAL_Poisson_surface_reconstruction_3_EXAMPLE_DIR} -EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polygon_mesh_processing/internal EXCLUDE_SYMBOLS += experimental HTML_EXTRA_FILES = ${CGAL_PACKAGE_DOC_DIR}/fig/selfintersections.jpg \ diff --git a/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Doxyfile.in b/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Doxyfile.in index 4c7ea4aaaa7..abdec8dc417 100644 --- a/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Doxyfile.in +++ b/Polygonal_surface_reconstruction/doc/Polygonal_surface_reconstruction/Doxyfile.in @@ -1,3 +1,2 @@ @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Polygonal Surface Reconstruction" -EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polygonal_surface_reconstruction/internal diff --git a/SMDS_3/doc/SMDS_3/Doxyfile.in b/SMDS_3/doc/SMDS_3/Doxyfile.in index 78025668400..73a16fd9c50 100644 --- a/SMDS_3/doc/SMDS_3/Doxyfile.in +++ b/SMDS_3/doc/SMDS_3/Doxyfile.in @@ -7,6 +7,3 @@ EXTRACT_ALL = false HIDE_UNDOC_CLASSES = true HIDE_UNDOC_MEMBERS = true WARN_IF_UNDOCUMENTED = false - -EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/internal/SMDS_3 - diff --git a/Surface_mesh_approximation/doc/Surface_mesh_approximation/Doxyfile.in b/Surface_mesh_approximation/doc/Surface_mesh_approximation/Doxyfile.in index 68d97d18eb7..3ae452842bf 100644 --- a/Surface_mesh_approximation/doc/Surface_mesh_approximation/Doxyfile.in +++ b/Surface_mesh_approximation/doc/Surface_mesh_approximation/Doxyfile.in @@ -6,5 +6,3 @@ PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Triangulated Surface Mesh Approximati EXTRACT_ALL = false HIDE_UNDOC_MEMBERS = true HIDE_UNDOC_CLASSES = true - -EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Surface_mesh_approximation/internal diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Doxyfile.in b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Doxyfile.in index a3841240c16..6b76fa680b1 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Doxyfile.in +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Doxyfile.in @@ -5,5 +5,3 @@ PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Tetrahedral Remeshing" EXTRACT_ALL = false HIDE_UNDOC_CLASSES = true WARN_IF_UNDOCUMENTED = false - -EXCLUDE = ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Tetrahedral_remeshing/internal From fef1a43d35c6241da2aa290be7dbb1167eb1e641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 15 Dec 2022 10:43:27 +0100 Subject: [PATCH 285/426] remove internal from generated doc --- CGAL_ipelets/doc/CGAL_ipelets/examples.txt | 1 - CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt | 16 ++++++++++++++++ .../CGAL_ipelets/test_grabbers.cpp | 0 Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h | 8 ++++++++ .../CGAL/Mesh_domain_with_polyline_features_3.h | 4 ++++ Mesh_3/include/CGAL/Mesh_vertex_base_3.h | 8 ++++++++ ..._pullout_direction_single_mold_trans_cast.cpp | 14 ++++++++++++-- .../include/CGAL/Eigen_solver_traits.h | 5 +++++ .../include/CGAL/Surface_mesh/Surface_mesh.h | 2 ++ 9 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt rename CGAL_ipelets/{examples => test}/CGAL_ipelets/test_grabbers.cpp (100%) diff --git a/CGAL_ipelets/doc/CGAL_ipelets/examples.txt b/CGAL_ipelets/doc/CGAL_ipelets/examples.txt index 25666965dd8..0a084d7a1f5 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/examples.txt +++ b/CGAL_ipelets/doc/CGAL_ipelets/examples.txt @@ -1,4 +1,3 @@ /*! -\example CGAL_ipelets/test_grabbers.cpp \example CGAL_ipelets/simple_triangulation.cpp */ diff --git a/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt new file mode 100644 index 00000000000..8acaf9834e4 --- /dev/null +++ b/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt @@ -0,0 +1,16 @@ +# Created by the script cgal_create_cmake_script +# This is the CMake script for compiling a CGAL application. + +cmake_minimum_required(VERSION 3.1...3.23) +project(CGAL_ipelets_Tests) + +find_package(CGAL REQUIRED) + +# create a target per cppfile +file( + GLOB cppfiles + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +foreach(cppfile ${cppfiles}) + create_single_source_cgal_program("${cppfile}") +endforeach() diff --git a/CGAL_ipelets/examples/CGAL_ipelets/test_grabbers.cpp b/CGAL_ipelets/test/CGAL_ipelets/test_grabbers.cpp similarity index 100% rename from CGAL_ipelets/examples/CGAL_ipelets/test_grabbers.cpp rename to CGAL_ipelets/test/CGAL_ipelets/test_grabbers.cpp diff --git a/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h b/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h index 2663b352f08..c66d416841c 100644 --- a/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h +++ b/Mesh_3/include/CGAL/Compact_mesh_cell_base_3.h @@ -740,7 +740,11 @@ template class Compact_mesh_cell_base_3 { public: +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Triangulation_data_structure; +#else typedef internal::Dummy_tds_3 Triangulation_data_structure; +#endif typedef Triangulation_data_structure::Vertex_handle Vertex_handle; typedef Triangulation_data_structure::Cell_handle Cell_handle; template @@ -761,7 +765,11 @@ template diff --git a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h index cb683ae7850..47b9bf495ad 100644 --- a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -549,11 +549,15 @@ public: typedef int Curve_index; typedef int Corner_index; +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Index; +#else typedef typename Mesh_3::internal::Index_generator_with_features< typename MeshDomain_3::Subdomain_index, Surface_patch_index, Curve_index, Corner_index>::type Index; +#endif typedef CGAL::Tag_true Has_features; typedef typename MeshDomain_3::R::FT FT; diff --git a/Mesh_3/include/CGAL/Mesh_vertex_base_3.h b/Mesh_3/include/CGAL/Mesh_vertex_base_3.h index 3ab58a03384..1dbfac05a50 100644 --- a/Mesh_3/include/CGAL/Mesh_vertex_base_3.h +++ b/Mesh_3/include/CGAL/Mesh_vertex_base_3.h @@ -317,7 +317,11 @@ template > struct Mesh_vertex_base_3 { +#ifdef DOXYGEN_RUNNING + using Triangulation_data_structure = unspecified_type; +#else using Triangulation_data_structure = internal::Dummy_tds_3; +#endif using Vertex_handle = typename Triangulation_data_structure::Vertex_handle; using Cell_handle = typename Triangulation_data_structure::Cell_handle; @@ -335,7 +339,11 @@ template > struct Mesh_vertex_generator_3 { +#ifdef DOXYGEN_RUNNING + using Triangulation_data_structure = unspecified_type; +#else using Triangulation_data_structure = internal::Dummy_tds_3; +#endif using Vertex_handle = typename Triangulation_data_structure::Vertex_handle; using Cell_handle = typename Triangulation_data_structure::Cell_handle; diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp b/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp index 0c616b34635..fdb0364ecb5 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/is_pullout_direction_single_mold_trans_cast.cpp @@ -12,6 +12,17 @@ typedef CGAL::Polygon_2 Polygon_2; namespace SMS = CGAL::Set_movable_separability_2; namespace casting = SMS::Single_mold_translational_casting; +template +inline std::pair +get_segment_outer_circle(const typename Kernel::Segment_2 seg, + const CGAL::Orientation orientation) +{ + typename Kernel::Direction_2 forward( seg); + typename Kernel::Direction_2 backward(-forward); + return (orientation == CGAL::CLOCKWISE) ? + std::make_pair(backward, forward) : std::make_pair(forward, backward); +} + // The main program: int main(int argc, char* argv[]) { @@ -33,8 +44,7 @@ int main(int argc, char* argv[]) ++index) { auto orientation = polygon.orientation(); - auto segment_outer_circle = - SMS::internal::get_segment_outer_circle(*e_it, orientation); + auto segment_outer_circle = get_segment_outer_circle(*e_it, orientation); auto d = segment_outer_circle.first; d = d.perpendicular(CGAL::CLOCKWISE); auto res = casting::is_pullout_direction(polygon, e_it, d); diff --git a/Solver_interface/include/CGAL/Eigen_solver_traits.h b/Solver_interface/include/CGAL/Eigen_solver_traits.h index 93820b7b827..428c33bad73 100644 --- a/Solver_interface/include/CGAL/Eigen_solver_traits.h +++ b/Solver_interface/include/CGAL/Eigen_solver_traits.h @@ -242,7 +242,12 @@ class Eigen_solver_traits::EigenType public: typedef EigenSolverT Solver; typedef Scalar NT; +#ifdef DOXYGEN_RUNNING + typedef unspecified_type Matrix; +#else typedef internal::Get_eigen_matrix::type Matrix; +#endif + typedef Eigen_vector Vector; // Public operations diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 5191f3b1397..2e0eb66a324 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -2718,6 +2718,7 @@ collect_garbage(Visitor &visitor) garbage_ = false; } +#ifndef DOXYGEN_RUNNING namespace collect_garbage_internal { struct Dummy_visitor{ template @@ -2726,6 +2727,7 @@ struct Dummy_visitor{ }; } +#endif template void From 4e16d96b59527236b7de12d0185e5981360ea227 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 15 Dec 2022 12:04:32 +0000 Subject: [PATCH 286/426] Update CHANGES.md --- Installation/CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 30e31329e62..837406be878 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -16,6 +16,10 @@ Release date: June 2023 ### [Polygon Mesh Processing](https://doc.cgal.org/5.6/Manual/packages.html#PkgPolygonMeshProcessing) +- **Breaking change**: Deprecated the overloads of functions `CGAL::Polygon_mesh_processing::triangulate_hole()`, + `CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`, and `CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()` + which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. + - Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh following the CGAL tetrahedral Delaunay refinement algorithm. From 1e4cec6b03395dfbb79f056cf0167304ba8d0543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:19:40 +0100 Subject: [PATCH 287/426] Fix not unchecking smoothing (if enabled) when protecting (+ui improvements) --- .../PMP/Isotropic_remeshing_plugin.cpp | 81 ++++++++++++++----- 1 file changed, 60 insertions(+), 21 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp index ee9c3fa0e69..a15e1f14dfd 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp @@ -347,8 +347,7 @@ public Q_SLOTS: } // Create dialog box QDialog dialog(mw); - Ui::Isotropic_remeshing_dialog ui - = remeshing_dialog(&dialog, poly_item, selection_item); + initialize_remeshing_dialog(&dialog, poly_item, selection_item); // Get values int i = dialog.exec(); @@ -357,6 +356,7 @@ public Q_SLOTS: std::cout << "Remeshing aborted" << std::endl; return; } + bool edges_only = ui.splitEdgesOnly_checkbox->isChecked(); bool preserve_duplicates = ui.preserveDuplicates_checkbox->isChecked(); double target_length = ui.edgeLength_dspinbox->value(); @@ -710,7 +710,7 @@ public Q_SLOTS: if (target_length == 0.)//parameters have not been set yet { QDialog dialog(mw); - Ui::Isotropic_remeshing_dialog ui = remeshing_dialog(&dialog, poly_item); + initialize_remeshing_dialog(&dialog, poly_item); ui.objectName->setText(QString::number(scene->selectionIndices().size()) .append(QString(" items to be remeshed"))); int i = dialog.exec(); @@ -937,32 +937,73 @@ private: }; #endif - Ui::Isotropic_remeshing_dialog - remeshing_dialog(QDialog* dialog, - Scene_facegraph_item* poly_item, - Scene_polyhedron_selection_item* selection_item = nullptr) +public Q_SLOTS: + void update_after_protect_checkbox_click() + { + if(ui.protect_checkbox->isChecked()) + { + ui.smooth1D_label->setEnabled(false); + ui.smooth1D_checkbox->setEnabled(false); + ui.smooth1D_checkbox->setChecked(false); + } + else + { + ui.smooth1D_label->setEnabled(true); + ui.smooth1D_checkbox->setEnabled(true); + } + } + + void update_after_splitEdgesOnly_click() + { + if(ui.splitEdgesOnly_checkbox->isChecked()) + { + ui.nbIterations_label->setEnabled(false); + ui.nbIterations_spinbox->setEnabled(false); + ui.nbSmoothing_label->setEnabled(false); + ui.nbSmoothing_spinbox->setEnabled(false); + + ui.protect_label->setEnabled(false); + ui.protect_checkbox->setEnabled(false); + ui.protect_checkbox->setChecked(false); + + ui.smooth1D_label->setEnabled(false); + ui.smooth1D_checkbox->setEnabled(false); + ui.smooth1D_checkbox->setChecked(false); + } + else + { + ui.nbIterations_label->setEnabled(true); + ui.nbIterations_spinbox->setEnabled(true); + ui.nbSmoothing_label->setEnabled(true); + ui.nbSmoothing_spinbox->setEnabled(true); + + ui.protect_label->setEnabled(true); + ui.protect_checkbox->setEnabled(true); + + ui.smooth1D_label->setEnabled(true); + ui.smooth1D_checkbox->setEnabled(true); + } + } + +public: + void + initialize_remeshing_dialog(QDialog* dialog, + Scene_facegraph_item* poly_item, + Scene_polyhedron_selection_item* selection_item = nullptr) { - Ui::Isotropic_remeshing_dialog ui; ui.setupUi(dialog); connect(ui.buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); connect(ui.buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); //connect checkbox to spinbox - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.nbIterations_spinbox, SLOT(setDisabled(bool))); - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.protect_checkbox, SLOT(setDisabled(bool))); - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.smooth1D_checkbox, SLOT(setDisabled(bool))); - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.nbSmoothing_spinbox, SLOT(setDisabled(bool))); - connect(ui.protect_checkbox, SIGNAL(toggled(bool)), - ui.smooth1D_checkbox, SLOT(setDisabled(bool))); connect(ui.preserveDuplicates_checkbox, SIGNAL(toggled(bool)), ui.protect_checkbox, SLOT(setChecked(bool))); connect(ui.preserveDuplicates_checkbox, SIGNAL(toggled(bool)), ui.protect_checkbox, SLOT(setDisabled(bool))); + connect(ui.protect_checkbox, SIGNAL(clicked(bool)), this, SLOT(update_after_protect_checkbox_click())); + connect(ui.splitEdgesOnly_checkbox, SIGNAL(clicked(bool)), this, SLOT(update_after_splitEdgesOnly_click())); + //Set default parameters Scene_interface::Bbox bbox = poly_item != nullptr ? poly_item->bbox() : (selection_item != nullptr ? selection_item->bbox() @@ -1003,14 +1044,12 @@ private: ui.preserveDuplicates_checkbox->setDisabled(true); ui.preserveDuplicates_checkbox->setChecked(false); } - - return ui; } private: QAction* actionIsotropicRemeshing_; - + Ui::Isotropic_remeshing_dialog ui; }; // end Polyhedron_demo_isotropic_remeshing_plugin #include "Isotropic_remeshing_plugin.moc" From a798fb6803a2dca91cc915d73075638452997a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:20:25 +0100 Subject: [PATCH 288/426] Minor example improvements --- .../Polygon_mesh_processing/isotropic_remeshing_example.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp index 048739c136f..159ff7cd708 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp @@ -43,7 +43,7 @@ int main(int argc, char* argv[]) } double target_edge_length = (argc > 2) ? std::stod(std::string(argv[2])) : 0.04; - unsigned int nb_iter = 3; + unsigned int nb_iter = (argc > 3) ? std::stoi(std::string(argv[3])) : 10; std::cout << "Split border..."; @@ -59,6 +59,8 @@ int main(int argc, char* argv[]) CGAL::parameters::number_of_iterations(nb_iter) .protect_constraints(true)); //i.e. protect border, here + CGAL::IO::write_polygon_mesh("out.off", mesh, CGAL::parameters::stream_precision(17)); + std::cout << "Remeshing done." << std::endl; return 0; From 52fc2ffdd41aecdd48d83e9e3d396ee0d281eadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:21:46 +0100 Subject: [PATCH 289/426] Change criterion used in "should_flip" The criterion that takes the scalar_product of the cross products is maybe adapted to minimize the curvature when triangulating faces, but should_flip() is used in PMP::isotropic_remeshing, (soon) PMP::refine(), and PMP::remove_almost_degenerate_faces(). These algorithms aim to produce well-shaped elements. The criterion is not adapted to these algorithms: for example, on a flat mesh the scalar product is meaningless so it will pick the diagonal which maximizes the product of the lengths and product of sines, but this might create very anisotropic elements since the sine of obtuse angles is still positive. The "new" criterion is simply the criterion used in mesh smoothing and the typical Delaunay criterion for surfaces. --- .../repair_degeneracies.h | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) 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 22be1f47e8e..c727b9c360f 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 @@ -294,7 +294,6 @@ get_best_edge_orientation(typename boost::graph_traits::edge_descr return boost::graph_traits::null_halfedge(); } -// adapted from triangulate_faces template bool should_flip(typename boost::graph_traits::edge_descriptor e, const TriangleMesh& tmesh, @@ -309,43 +308,18 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, CGAL_precondition(!is_border(e, tmesh)); - halfedge_descriptor h = halfedge(e, tmesh); + typename Traits::Compute_approximate_angle_3 angle = gt.compute_approximate_angle_3_object(); - Point_ref p0 = get(vpm, target(h, tmesh)); - Point_ref p1 = get(vpm, target(next(h, tmesh), tmesh)); - Point_ref p2 = get(vpm, source(h, tmesh)); - Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); + const halfedge_descriptor h = halfedge(e, tmesh); - /* Chooses the diagonal that will split the quad in two triangles that maximize - * the scalar product of of the un-normalized normals of the two triangles. - * The lengths of the un-normalized normals (computed using cross-products of two vectors) - * are proportional to the area of the triangles. - * Maximize the scalar product of the two normals will avoid skinny triangles, - * and will also taken into account the cosine of the angle between the two normals. - * In particular, if the two triangles are oriented in different directions, - * the scalar product will be negative. - */ + const Point_ref p0 = get(vpm, target(h, tmesh)); + const Point_ref p1 = get(vpm, target(next(h, tmesh), tmesh)); + const Point_ref p2 = get(vpm, source(h, tmesh)); + const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); -// CGAL::cross_product(p2-p1, p3-p2) * CGAL::cross_product(p0-p3, p1-p0); -// CGAL::cross_product(p1-p0, p1-p2) * CGAL::cross_product(p3-p2, p3-p0); - - const Vector_3 v01 = gt.construct_vector_3_object()(p0, p1); - const Vector_3 v12 = gt.construct_vector_3_object()(p1, p2); - const Vector_3 v23 = gt.construct_vector_3_object()(p2, p3); - const Vector_3 v30 = gt.construct_vector_3_object()(p3, p0); - - const FT p1p3 = gt.compute_scalar_product_3_object()( - gt.construct_cross_product_vector_3_object()(v12, v23), - gt.construct_cross_product_vector_3_object()(v30, v01)); - - const Vector_3 v21 = gt.construct_opposite_vector_3_object()(v12); - const Vector_3 v03 = gt.construct_opposite_vector_3_object()(v30); - - const FT p0p2 = gt.compute_scalar_product_3_object()( - gt.construct_cross_product_vector_3_object()(v01, v21), - gt.construct_cross_product_vector_3_object()(v23, v03)); - - return p0p2 <= p1p3; + const double ap1 = angle(p0,p1,p2); + const double ap3 = angle(p2,p3,p0); + return (ap1 + ap3 > 180); } template From 92bd00f61220952ef99e66db98fbd2d4b55b8806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:26:43 +0100 Subject: [PATCH 290/426] Change PMP::refine() is_flippable criterion The current criterion is some kind of Delaunay ball, which might work OK for flat regions, but can produce super thin wedges (see issue: https://github.com/CGAL/cgal/issues/6982) when the mesh is not flat. The criterion used instead is the one used in PMP::isotropic_remeshing and PMP::remove_almost_degenerate_faces(), which is the typical angle-based surface Delaunay criterion. --- .../internal/refine_impl.h | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 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 54369aee910..d71fe960a1a 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 @@ -15,12 +15,6 @@ #include - -#include -#include -#include -#include - #include #ifdef CGAL_PMP_FAIR_DEBUG #include @@ -30,8 +24,14 @@ #include #include #include +#include #include +#include +#include +#include +#include + namespace CGAL { namespace Polygon_mesh_processing { @@ -49,15 +49,28 @@ class Refine_Polyhedron_3 { typedef Halfedge_around_face_circulator Halfedge_around_facet_circulator; typedef Halfedge_around_target_circulator Halfedge_around_vertex_circulator; + typedef typename CGAL::Kernel_traits::type Traits; + private: PolygonMesh& pmesh; VertexPointMap vpmap; + Traits traits = {}; - bool flippable(halfedge_descriptor h) { + bool flippable(halfedge_descriptor h) + { // this check is added so that edge flip does not break manifoldness // it might happen when there is an edge where flip_edge(h) will be placed (i.e. two edges collide after flip) vertex_descriptor v_tip_0 = target(next(h,pmesh),pmesh); vertex_descriptor v_tip_1 = target(next(opposite(h,pmesh),pmesh),pmesh); + +#ifdef CGAL_PMP_REFINE_DEBUG_PP + std::cout << "flippable() " << h << std::endl; + std::cout << "\t" << source(h, pmesh) << ": " << pmesh.point(source(h, pmesh)) << std::endl; + std::cout << "\t" << target(h, pmesh) << ": " << pmesh.point(target(h, pmesh)) << std::endl; + std::cout << "\t" << v_tip_0 << ": " << pmesh.point(v_tip_0) << std::endl; + std::cout << "\t" << v_tip_1 << ": " << pmesh.point(v_tip_1) << std::endl; +#endif + Halfedge_around_vertex_circulator v_cir(next(h,pmesh), pmesh), v_end(v_cir); do { if(target(opposite(*v_cir, pmesh),pmesh) == v_tip_1) { return false; } @@ -74,13 +87,21 @@ 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, target(h,pmesh)); - Point_3_ref q = get(vpmap, target(opposite(h,pmesh),pmesh)); + 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)); Point_3_ref s = get(vpmap, target(next(opposite(h,pmesh),pmesh),pmesh)); - if( (CGAL::ON_UNBOUNDED_SIDE != CGAL::side_of_bounded_sphere(p,q,r,s)) || - (CGAL::ON_UNBOUNDED_SIDE != CGAL::side_of_bounded_sphere(p,q,s,r)) ) + + std::cout << "relax() " << h << std::endl; + std::cout << "\t" << source(h, pmesh) << ": " << p << std::endl; + std::cout << "\t" << target(h, pmesh) << ": " << q << std::endl; + std::cout << "\t" << target(next(h,pmesh),pmesh) << ": " << r << std::endl; + std::cout << "\t" << target(next(opposite(h,pmesh),pmesh),pmesh) << ": " << s << std::endl; +#endif + + if(internal::should_flip(edge(h, pmesh), pmesh, vpmap, traits)) { if(flippable(h)) { Euler::flip_edge(h,pmesh); From 70efea3bcb312c54f40635a67bdf40980b444f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:28:53 +0100 Subject: [PATCH 291/426] Tiny code modernization --- .../CGAL/Polygon_mesh_processing/internal/refine_impl.h | 3 +-- 1 file changed, 1 insertion(+), 2 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 d71fe960a1a..06ddc868f0d 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 @@ -259,8 +259,7 @@ private: Halfedge_around_face_circulator circ(halfedge(fd,pmesh),pmesh), done(circ); do { vertex_descriptor v = target(*circ,pmesh); - std::pair::iterator, bool> v_insert - = scale_attribute.insert(std::make_pair(v, 0)); + auto v_insert = scale_attribute.emplace(v, 0); if(!v_insert.second) { continue; } // already calculated v_insert.first->second = average_length(v, interior_map, accept_internal_facets); } while(++circ != done); From f372bbe7c276015fb846eacaec71fe85a3cc9660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 19 Dec 2022 14:35:16 +0100 Subject: [PATCH 292/426] make smooth an option that is OFF by default --- .../Polygon_mesh_processing/repair_self_intersections.h | 7 +++++-- .../CGAL/STL_Extension/internal/parameters_interface.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index adddc9b09cc..45440fd8113 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -1945,6 +1945,7 @@ remove_self_intersections_one_step(std::set) const { return false; } @@ -2492,7 +2495,7 @@ bool remove_self_intersections(const FaceRange& face_range, internal::remove_self_intersections_one_step( faces_to_treat, working_face_range, tmesh, step, preserve_genus, treat_all_CCs, strong_dihedral_angle, weak_dihedral_angle, - containment_epsilon, projector, vpm, gt, visitor); + use_smoothing, containment_epsilon, projector, vpm, gt, visitor); #ifdef CGAL_PMP_REMOVE_SELF_INTERSECTION_DEBUG if(all_fixed && topology_issue) diff --git a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index cfc54c6631c..56bf1fa6600 100644 --- a/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h +++ b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h @@ -144,6 +144,7 @@ CGAL_add_named_parameter(random_seed_t, random_seed, random_seed) CGAL_add_named_parameter(do_lock_mesh_t, do_lock_mesh, do_lock_mesh) CGAL_add_named_parameter(do_simplify_border_t, do_simplify_border, do_simplify_border) CGAL_add_named_parameter(algorithm_t, algorithm, algorithm) +CGAL_add_named_parameter(use_smoothing_t, use_smoothing, use_smoothing) //internal CGAL_add_named_parameter(weight_calculator_t, weight_calculator, weight_calculator) From f993ad50c986a4f017a0de7aa51d5e21dfc5b209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 19 Dec 2022 17:40:09 +0100 Subject: [PATCH 293/426] conditions of inconsistenit_classification() also apply to assertions --- .../internal/Corefinement/Face_graph_output_builder.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 6709b3705eb..8fafd13a9c9 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 @@ -1394,10 +1394,13 @@ public: } } if (inconsistent_classification()) return; - 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] ); + 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] ); + } } } From 226c009892086356ab8b111e6bae20bb41e28f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 20 Dec 2022 08:35:28 +0100 Subject: [PATCH 294/426] Leopard is retired for quite some time now --- .../cmake/modules/CGAL_GeneratorSpecificSettings.cmake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake b/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake index b46f288685c..e70370b2c31 100644 --- a/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake +++ b/Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake @@ -41,11 +41,7 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED ) IF (APPLE) exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION) string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION}) - message(STATUS "DARWIN_VERSION=${DARWIN_VERSION}") - if (DARWIN_VERSION GREATER 8) - message(STATUS "Mac Leopard detected") - set(CGAL_APPLE_LEOPARD 1) - endif() + message(STATUS "Running in macOS DARWIN_VERSION=${DARWIN_VERSION}") endif() if ( NOT "${CMAKE_CFG_INTDIR}" STREQUAL "." ) From fe5c2caf79fba04d6da317ed8454e2a7a506835c Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 20 Dec 2022 09:17:14 +0100 Subject: [PATCH 295/426] fix conversion warning --- Mesh_3/test/Mesh_3/test_meshing_determinism.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp index 4ab1f551c6b..ade0505bca7 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp @@ -69,7 +69,7 @@ void test() std::vector output_c3t3; std::vector output_surfaces; - const int nb_operations = 5; + const std::size_t nb_operations = 5; output_c3t3.reserve(nb_operations * nb_runs); for(std::size_t i = 0; i < nb_runs; ++i) @@ -138,8 +138,8 @@ void test() //else check for(std::size_t j = 0; j < nb_operations; ++j) { - int id1 = nb_operations * (i - 1) + j; - int id2 = nb_operations * i + j; + std::size_t id1 = nb_operations * (i - 1) + j; + std::size_t id2 = nb_operations * i + j; if(0 != output_c3t3[id1].compare(output_c3t3[id2])) { std::cerr << "Meshing operation " << j << " is not deterministic.\n"; From 96c465bf99b0b8c3ec078007b30930485dd5f905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 20 Dec 2022 15:51:15 +0100 Subject: [PATCH 296/426] there is no longer any example --- CGAL_ipelets/doc/CGAL_ipelets/Doxyfile.in | 2 +- .../examples/CGAL_ipelets/CMakeLists.txt | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt diff --git a/CGAL_ipelets/doc/CGAL_ipelets/Doxyfile.in b/CGAL_ipelets/doc/CGAL_ipelets/Doxyfile.in index f6220befcac..2d21e2d68fc 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/Doxyfile.in +++ b/CGAL_ipelets/doc/CGAL_ipelets/Doxyfile.in @@ -1,4 +1,4 @@ @INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - CGAL Ipelets" -EXAMPLE_PATH += ${CGAL_PACKAGE_DIR}/demo +EXAMPLE_PATH = ${CGAL_PACKAGE_DIR}/demo diff --git a/CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt deleted file mode 100644 index 634bc854f59..00000000000 --- a/CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# Created by the script cgal_create_cmake_script -# This is the CMake script for compiling a CGAL application. - -cmake_minimum_required(VERSION 3.1...3.23) -project(CGAL_ipelets_Examples) - -find_package(CGAL REQUIRED) - -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") -endforeach() From be58448e639522ede424163ad908dfba0d43d306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 20 Dec 2022 18:50:23 +0100 Subject: [PATCH 297/426] recent versions of lxml seems to be problematic with pyquery note that this version is not the max usable but one that works --- .github/workflows/build_doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 3d2f2941c95..6f41cf308c4 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -74,7 +74,7 @@ jobs: run: | set -x sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html - sudo pip install lxml + sudo pip install lxml==4.6.3 sudo pip install pyquery wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen sudo mv doxygen_exe /usr/bin/doxygen From bcc59bfbb66497e996d2f2c91a3e02c24d241384 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 21 Dec 2022 14:55:12 +0100 Subject: [PATCH 298/426] CONFIG_TYPE maybe used on other platforms On MacOS, with the XCode generator, the config type is required. --- Scripts/developer_scripts/run_testsuite_with_ctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index 631195ac9b8..69d5adf8d0e 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -296,7 +296,7 @@ run_test_on_platform() echo "SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1000000000)" >> CTestCustom.cmake CTEST_OPTS="-T Start -T Test --timeout 1200 ${DO_NOT_TEST:+-E execution___of__}" - if uname | grep -q "CYGWIN"; then + if [ -n "$CONFIG_TYPE" ]; then CTEST_OPTS="-C ${CONFIG_TYPE} ${CTEST_OPTS}" fi if [ -z "${SHOW_PROGRESS}" ]; then From 73063a618b2c6398b2a12ef4ae296fa005e1dcc8 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Wed, 21 Dec 2022 14:42:39 +0000 Subject: [PATCH 299/426] Revert "fix init_c3t3 for internal C3t3" This reverts commit a90488fce5e5d7defb387d57560afda09819db38. --- .../tetrahedral_adaptive_remeshing_impl.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h index 0d68c959ccb..4c8fac7609c 100644 --- a/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h +++ b/Tetrahedral_remeshing/include/CGAL/Tetrahedral_remeshing/internal/tetrahedral_adaptive_remeshing_impl.h @@ -417,7 +417,10 @@ private: if (!input_is_c3t3()) { for (int i = 0; i < 4; ++i) - cit->vertex(i)->set_dimension(3); + { + if (cit->vertex(i)->in_dimension() == -1) + cit->vertex(i)->set_dimension(3); + } } #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG else if (input_is_c3t3() && m_c3t3.is_in_complex(cit)) @@ -446,7 +449,8 @@ private: for (int j = 0; j < 3; ++j) { Vertex_handle vij = f.first->vertex(Tr::vertex_triple_index(i, j)); - vij->set_dimension(2); + if (vij->in_dimension() == -1 || vij->in_dimension() > 2) + vij->set_dimension(2); } #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbf; @@ -478,10 +482,12 @@ private: m_c3t3.add_to_complex(e, 1); Vertex_handle v = e.first->vertex(e.second); - v->set_dimension(1); + if (v->in_dimension() == -1 || v->in_dimension() > 1) + v->set_dimension(1); v = e.first->vertex(e.third); - v->set_dimension(1); + if (v->in_dimension() == -1 || v->in_dimension() > 1) + v->set_dimension(1); #ifdef CGAL_TETRAHEDRAL_REMESHING_DEBUG ++nbe; @@ -502,7 +508,8 @@ private: if(!m_c3t3.is_in_complex(vit)) m_c3t3.add_to_complex(vit, ++corner_id); - vit->set_dimension(0); + if (vit->in_dimension() == -1 || vit->in_dimension() > 0) + vit->set_dimension(0); vit->set_index(corner_id); From 2d04633e2009af35d023fcfdd6c2d035663562c4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 22 Dec 2022 09:35:09 +0100 Subject: [PATCH 300/426] add if(verbose) when needed --- SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h b/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h index 17d9759018b..8a9cb795d3f 100644 --- a/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h +++ b/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h @@ -419,7 +419,8 @@ bool build_triangulation_impl(Tr& tr, if(finite_cells.empty()) { - std::cout << "WARNING: No finite cells were provided. Only the points will be loaded."<(tr, incident_cells_map, verbose, allow_non_manifold)) { if(verbose) std::cout << "build_infinite_cells went wrong" << std::endl; success = false; } else - std::cout << "build infinite cells done" << std::endl; + if (verbose) std::cout << "build infinite cells done" << std::endl; tr.tds().set_dimension(3); if (!CGAL::SMDS_3::assign_neighbors(tr, incident_cells_map, allow_non_manifold)) { @@ -453,7 +454,7 @@ bool build_triangulation_impl(Tr& tr, success = false; } else - std::cout << "assign neighbors done" << std::endl; + if (verbose) std::cout << "assign neighbors done" << std::endl; if (verbose) { std::cout << "built triangulation : " << std::endl; From 898142d739efbeede1bb6f9ff8afbe75bef81380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 22 Dec 2022 09:49:35 +0100 Subject: [PATCH 301/426] wrong type --- .../CGAL/Polygon_mesh_processing/repair_self_intersections.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h index 45440fd8113..2d9d88adeb3 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_self_intersections.h @@ -2395,7 +2395,7 @@ bool remove_self_intersections(const FaceRange& face_range, // detect_feature_pp NP (unused for now) const double weak_dihedral_angle = 0.; // choose_parameter(get_parameter(np, internal_np::weak_dihedral_angle), 20.); - const double use_smoothing = choose_parameter(get_parameter(np, internal_np::use_smoothing), false); + const bool use_smoothing = choose_parameter(get_parameter(np, internal_np::use_smoothing), false); struct Return_false { From a0efa439c15b8d53a70d3900bd211423af0e2086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 22 Dec 2022 09:59:32 +0100 Subject: [PATCH 302/426] fix warnings --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp index 0819581709e..68c3053d876 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Io_image_plugin.cpp @@ -1337,6 +1337,7 @@ bool Io_image_plugin::loadDirectory(const QString& dirname, QApplication::restoreOverrideCursor(); CGAL::Three::Three::warning("VTK is required to read DCM and BMP files"); CGAL_USE(dirname); + CGAL_USE(ext); return false; #else QFileInfo fileinfo; @@ -1440,6 +1441,7 @@ Image* Io_image_plugin::createDirectoryImage(const QString& dirname, CGAL::Three::Three::warning("VTK is required to read DCM and BMP files"); CGAL_USE(dirname); CGAL_USE(ext); + CGAL_USE(smooth); #else auto create_image = [&](auto&& reader) -> void { From f8a97387d718b4ce9f3fa8d01fb78a4424e8259f Mon Sep 17 00:00:00 2001 From: Ivan Paden Date: Thu, 22 Dec 2022 11:20:17 +0100 Subject: [PATCH 303/426] Add an example for spatial searching with projection --- .../doc/Spatial_searching/examples.txt | 1 + .../examples/Spatial_searching/CMakeLists.txt | 2 + .../iso_rectangle_2_query.cpp | 2 +- .../iso_rectangle_2_query_projection.cpp | 72 +++++++++++++++++++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query_projection.cpp diff --git a/Spatial_searching/doc/Spatial_searching/examples.txt b/Spatial_searching/doc/Spatial_searching/examples.txt index 597aa1893f9..defc30a2079 100644 --- a/Spatial_searching/doc/Spatial_searching/examples.txt +++ b/Spatial_searching/doc/Spatial_searching/examples.txt @@ -6,6 +6,7 @@ \example Spatial_searching/fuzzy_range_query.cpp \example Spatial_searching/general_neighbor_searching.cpp \example Spatial_searching/iso_rectangle_2_query.cpp +\example Spatial_searching/iso_rectangle_2_query_projection.cpp \example Spatial_searching/nearest_neighbor_searching.cpp \example Spatial_searching/searching_with_circular_query.cpp \example Spatial_searching/searching_surface_mesh_vertices.cpp diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 811774b5ed5..ab2d67334d4 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -28,6 +28,8 @@ create_single_source_cgal_program("distance_browsing.cpp") create_single_source_cgal_program("iso_rectangle_2_query.cpp") +create_single_source_cgal_program("iso_rectangle_2_query_projection.cpp") + create_single_source_cgal_program("nearest_neighbor_searching.cpp") create_single_source_cgal_program("searching_with_circular_query.cpp") diff --git a/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp index 21a36102f39..a00f427d15b 100644 --- a/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp +++ b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp @@ -46,7 +46,7 @@ int main() // using value 0.1 for fuzziness paramater Fuzzy_iso_box approximate_range(p, q, 0.1); tree.search(std::back_inserter( result ), approximate_range); - std::cout << "The points in the fuzzy box [[0.1, 0.3], [0.6, 0.9]]^2 are: " << std::endl; + std::cout << "The points in the fuzzy box [[0.1, 0.3], [0.6, 0.8]]^2 are: " << std::endl; std::copy (result.begin(), result.end(), std::ostream_iterator(std::cout,"\n") ); std::cout << std::endl; return 0; diff --git a/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query_projection.cpp b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query_projection.cpp new file mode 100644 index 00000000000..c50c2853a0d --- /dev/null +++ b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query_projection.cpp @@ -0,0 +1,72 @@ +#include +#include +#include +#include +#include + +#include + +// Point_3 to Point_2 projection on the fly +template +struct Projection_xy_property_map +{ + typedef typename K::Point_3 key_type; + typedef typename K::Point_2 value_type; + typedef value_type reference; + typedef boost::readable_property_map_tag category; + + friend value_type get(Projection_xy_property_map, const key_type& k) + { + return value_type(k.x(), k.y()); + } +}; + +typedef CGAL::Simple_cartesian K; +typedef K::Point_2 Point_2; +typedef K::Point_3 Point_3; + +typedef CGAL::Random_points_in_cube_3 Random_points_iterator; +typedef CGAL::Counting_iterator N_Random_points_iterator; + +typedef CGAL::Search_traits_2Traits_base; +typedef CGAL::Search_traits_adapter, Traits_base> Traits; +typedef CGAL::Kd_tree Tree; +typedef CGAL::Fuzzy_iso_box Fuzzy_iso_box; + +int main() +{ + const int N = 1000; + + std::list points; + points.push_back(Point_3(0, 0, 0)); + + Tree tree; + Random_points_iterator rpg; + for(int i = 0; i < N; i++) + tree.insert(*rpg++); + + std::list result; + + // define 2D range query + Point_2 p(0.2, 0.2); + Point_2 q(0.7, 0.7); + + // Searching an exact range + // using default value 0.0 for epsilon fuzziness paramater + Fuzzy_iso_box exact_range(p,q); + tree.search( std::back_inserter( result ), exact_range); + std::cout << "The points in the box [0.2, 0.7]^2 are: " << std::endl; + std::copy (result.begin(), result.end(), std::ostream_iterator(std::cout,"\n") ); + std::cout << std::endl; + + result.clear(); + + // Searching a fuzzy range + // using value 0.1 for fuzziness paramater + Fuzzy_iso_box approximate_range(p, q, 0.1); + tree.search(std::back_inserter( result ), approximate_range); + std::cout << "The points in the fuzzy box [[0.1, 0.3], [0.6, 0.8]]^2 are: " << std::endl; + std::copy (result.begin(), result.end(), std::ostream_iterator(std::cout,"\n") ); + std::cout << std::endl; + return 0; +} From d6ec19226dc3d452fe794f5f64923eb78cf0de57 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 22 Dec 2022 14:22:40 +0000 Subject: [PATCH 304/426] Optimal Transport Reconstruction: Fix memory leak --- .../otr2_simplest_example.cpp | 1 + .../include/CGAL/OTR_2/Cost.h | 6 +- .../CGAL/OTR_2/Reconstruction_face_base_2.h | 5 +- .../OTR_2/Reconstruction_triangulation_2.h | 81 ++++++++++--------- .../CGAL/OTR_2/Reconstruction_vertex_base_2.h | 18 ++--- .../include/CGAL/OTR_2/Sample.h | 21 +++-- .../Optimal_transportation_reconstruction_2.h | 81 ++++++++++--------- 7 files changed, 107 insertions(+), 106 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp b/Optimal_transportation_reconstruction_2/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp index cef2ecc34b0..a9f49e12d7b 100644 --- a/Optimal_transportation_reconstruction_2/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp +++ b/Optimal_transportation_reconstruction_2/examples/Optimal_transportation_reconstruction_2/otr2_simplest_example.cpp @@ -16,6 +16,7 @@ typedef CGAL::Optimal_transportation_reconstruction_2 Otr; int main () { + CGAL::get_default_random() = CGAL::Random(1671586136); // Generate a set of random points on the boundary of a square. std::vector points; CGAL::Random_points_on_square_2 point_generator(1.); diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h index 937de05c73a..0c60d82e830 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Cost.h @@ -50,13 +50,13 @@ public: const FT total_weight() const { return m_total_weight; } - template - void set_total_weight(const SampleContainer& samples) + template + void set_total_weight(const Samples& m_samples, const SampleContainer& samples) { m_total_weight = (FT)0; for (typename SampleContainer::const_iterator it = samples.begin(); it != samples.end(); ++ it) - m_total_weight += (*it)->mass(); + m_total_weight += m_samples[*it].mass(); } FT finalize(const FT alpha = FT(0.5)) const diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_face_base_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_face_base_2.h index 6903891e6a4..39c994d671d 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_face_base_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_face_base_2.h @@ -16,7 +16,6 @@ #include -#include #include #include @@ -51,7 +50,7 @@ public: typedef typename Traits_::FT FT; typedef OTR_2::Cost Cost_; typedef OTR_2::Sample Sample_; - typedef std::vector Sample_vector; + typedef std::vector Sample_vector; private: Sample_vector m_samples[3]; @@ -176,7 +175,7 @@ public: const Sample_vector& samples(int edge) const { return m_samples[edge]; } Sample_vector& samples(int edge) { return m_samples[edge]; } - void add_sample(int edge, Sample_* sample) + void add_sample(int edge, int sample) { m_samples[edge].push_back(sample); } diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h index f952c9232e8..16fe600bb34 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h @@ -110,7 +110,7 @@ public: typedef OTR_2::Cost Cost_; typedef OTR_2::Sample Sample_; - typedef std::vector Sample_vector; + typedef std::vector Sample_vector; typedef typename Sample_vector::const_iterator Sample_vector_const_iterator; typedef OTR_2::Sample_with_priority PSample; @@ -135,12 +135,13 @@ public: > > MultiIndex; + std::vector& m_samples; FT m_factor; // ghost vs solid mutable Random rng; public: - Reconstruction_triangulation_2(Traits_ traits = Traits_()) - : Base(traits), m_factor(1.) + Reconstruction_triangulation_2(std::vector& samples, Traits_ traits = Traits_()) + : Base(traits), m_samples(samples), m_factor(1.) { } @@ -360,11 +361,11 @@ public: if (cleanup) face->clean_all_samples(); } - Sample_* sample = vertex->sample(); - if (sample) + int sample = vertex->sample(); + if (sample != -1) samples.push_back(sample); if (cleanup) - vertex->set_sample(nullptr); + vertex->set_sample(-1); } void collect_all_samples(Sample_vector& samples) const { @@ -391,7 +392,7 @@ public: } for (Finite_vertices_iterator vi = Base::finite_vertices_begin(); vi != Base::finite_vertices_end(); ++vi) { - vi->set_sample(nullptr); + vi->set_sample(-1); } } @@ -465,15 +466,15 @@ public: typename Sample_vector::const_iterator it; const Sample_vector& samples0 = edge.first->samples(edge.second); for (it = samples0.begin(); it != samples0.end(); ++it) { - Sample_* sample = *it; - mass += sample->mass(); + const Sample_ & sample = m_samples[* it]; + mass += sample.mass(); } Edge twin = twin_edge(edge); const Sample_vector& samples1 = twin.first->samples(twin.second); for (it = samples1.begin(); it != samples1.end(); ++it) { - Sample_* sample = *it; - mass += sample->mass(); + const Sample_& sample = m_samples[* it]; + mass += sample.mass(); } set_mass(edge, mass); @@ -511,15 +512,15 @@ public: typename Sample_vector::const_iterator it; const Sample_vector& samples0 = edge.first->samples(edge.second); for (it = samples0.begin(); it != samples0.end(); ++it) { - Sample_* sample = *it; - squeue.push(PSample(sample, sample->coordinate())); + const Sample_& sample = m_samples[* it]; + squeue.push(PSample(*it, sample.coordinate())); } Edge twin = twin_edge(edge); const Sample_vector& samples1 = twin.first->samples(twin.second); for (it = samples1.begin(); it != samples1.end(); ++it) { - Sample_* sample = *it; - squeue.push(PSample(sample, 1.0 - sample->coordinate())); + const Sample_& sample = m_samples[* it]; + squeue.push(PSample(*it, 1.0 - sample.coordinate())); } } @@ -537,13 +538,13 @@ public: PSample psample = squeue.top(); squeue.pop(); - FT mass = psample.sample()->mass(); + FT mass = m_samples[psample.sample()].mass(); FT coord = psample.priority() * L; FT bin = mass * coef; FT center = start + FT(0.5) * bin; FT pos = coord - center; - FT norm2 = psample.sample()->distance2(); + FT norm2 = m_samples[psample.sample()].distance2(); FT tang2 = bin * bin / 12 + pos * pos; sum.add(Cost_(norm2, tang2), mass); @@ -566,15 +567,15 @@ public: Cost_ sum; for (Sample_vector_const_iterator it = samples.begin(); it != samples.end(); ++it) { - Sample_* sample = *it; - FT mass = sample->mass(); - const Point& query = sample->point(); + const Sample_& sample = m_samples[* it]; + FT mass = sample.mass(); + const Point& query = sample.point(); FT Ds = geom_traits().compute_squared_distance_2_object()(query, ps); FT Dt = geom_traits().compute_squared_distance_2_object()(query, pt); FT dist2 = ((std::min))(Ds, Dt); - FT norm2 = sample->distance2(); + FT norm2 = sample.distance2(); FT tang2 = dist2 - norm2; sum.add(Cost_(norm2, tang2), mass); @@ -589,7 +590,7 @@ public: template // value_type = Sample_* void assign_samples(Iterator begin, Iterator end) { for (Iterator it = begin; it != end; ++it) { - Sample_* sample = *it; + int sample = *it; assign_sample(sample); } } @@ -597,13 +598,13 @@ public: template // value_type = Sample_* void assign_samples_brute_force(Iterator begin, Iterator end) { for (Iterator it = begin; it != end; ++it) { - Sample_* sample = *it; + int sample = *it; assign_sample_brute_force(sample); } } - bool assign_sample(Sample_* sample) { - const Point& point = sample->point(); + bool assign_sample(int sample) { + const Point& point = m_samples[sample].point(); Face_handle face = Base::locate(point); if (face == Face_handle() || Base::is_infinite(face)) { @@ -622,8 +623,9 @@ public: return true; } - bool assign_sample_brute_force(Sample_* sample) { - const Point& point = sample->point(); + bool assign_sample_brute_force(int sample_index) { + const Sample_& sample = m_samples[sample_index]; + const Point& point = sample.point(); Face_handle nearest_face = Face_handle(); for (Finite_faces_iterator fi = Base::finite_faces_begin(); fi != Base::finite_faces_end(); ++fi) { @@ -641,12 +643,12 @@ public: Vertex_handle vertex = find_nearest_vertex(point, nearest_face); if (vertex != Vertex_handle()) { - assign_sample_to_vertex(sample, vertex); + assign_sample_to_vertex(sample_index, vertex); return true; } Edge edge = find_nearest_edge(point, nearest_face); - assign_sample_to_edge(sample, edge); + assign_sample_to_edge(sample_index, edge); return true; } @@ -688,23 +690,24 @@ public: return nearest; } - void assign_sample_to_vertex(Sample_* sample, Vertex_handle vertex) const { + void assign_sample_to_vertex(int sample_index, Vertex_handle vertex) const { /*if (vertex->sample()) { std::cout << "assign to vertex: vertex already has sample" << std::endl; }*/ - - sample->distance2() = FT(0); - sample->coordinate() = FT(0); - vertex->set_sample(sample); + Sample_& sample = m_samples[sample_index]; + sample.distance2() = FT(0); + sample.coordinate() = FT(0); + vertex->set_sample(sample_index); } - void assign_sample_to_edge(Sample_* sample, const Edge& edge) const { + void assign_sample_to_edge(int sample_index, const Edge& edge) const { + Sample_& sample = m_samples[sample_index]; Segment segment = get_segment(edge); - const Point& query = sample->point(); - sample->distance2() = compute_distance2(query, segment); - sample->coordinate() = compute_coordinate(query, segment); - edge.first->add_sample(edge.second, sample); + const Point& query = sample.point(); + sample.distance2() = compute_distance2(query, segment); + sample.coordinate() = compute_coordinate(query, segment); + edge.first->add_sample(edge.second, sample_index); } FT compute_distance2(const Point& query, const Segment& segment) const { diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h index 6155f65e5fe..7df7b10b047 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_vertex_base_2.h @@ -37,7 +37,7 @@ class Reconstruction_vertex_base_2 : public Vb public: typedef Vb Base; typedef typename Traits_::FT FT; - typedef OTR_2::Sample Sample_; + typedef OTR_2::Sample Sample_; typedef typename Traits_::Point_2 Point; typedef typename Base::Face_handle Face_handle; @@ -50,7 +50,7 @@ public: private: int m_id; bool m_pinned; - Sample_* m_sample; + int m_sample; Point m_relocated; FT m_relevance; @@ -60,7 +60,7 @@ public: : Base(), m_id(-1), m_pinned(false), - m_sample(nullptr), + m_sample(-1), m_relevance(0) { } @@ -69,7 +69,7 @@ public: : Base(p), m_id(-1), m_pinned(false), - m_sample(nullptr), + m_sample(-1), m_relevance(0) { } @@ -78,7 +78,7 @@ public: : Base(f), m_id(-1), m_pinned(false), - m_sample(nullptr), + m_sample(-1), m_relevance(0) { } @@ -87,7 +87,7 @@ public: : Base(p, f), m_id(-1), m_pinned(false), - m_sample(nullptr), + m_sample(-1), m_relevance(0) { } @@ -103,13 +103,13 @@ public: FT relevance() const { return m_relevance; } void set_relevance(FT relevance) { m_relevance = relevance; } - Sample_* sample() const { return m_sample; } - void set_sample(Sample_* sample) { m_sample = sample; } + int sample() const { return m_sample; } + void set_sample(int sample) { m_sample = sample; } const Point& relocated() const { return m_relocated; } Point& relocated() { return m_relocated; } - bool has_sample_assigned() const { return sample() != nullptr; } + bool has_sample_assigned() const { return sample() != -1; } }; //---------------STRUCT LESS VERTEX_HANDLE--------------------- template diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h index 7972b69f02c..fd4b6885a56 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h @@ -94,23 +94,20 @@ public: typedef typename Sample_::FT FT; private: - Sample_* m_sample; + int m_sample; FT m_priority; public: - Sample_with_priority(Sample_* sample, const FT priority = FT(0)) - { - m_sample = sample; - m_priority = priority; - } + Sample_with_priority(int sample, const FT priority = FT(0)) + : m_sample(sample), m_priority(priority) + {} Sample_with_priority(const Sample_with_priority& psample) - { - m_sample = psample.sample(); - m_priority = psample.priority(); - } + : m_sample(psample.sample()), m_priority(psample.priority()) + {} - ~Sample_with_priority() { } + ~Sample_with_priority() + {} Sample_with_priority& operator = (const Sample_with_priority& psample) { @@ -119,7 +116,7 @@ public: return *this; } - Sample_* sample() const { return m_sample; } + int sample() const { return m_sample; } const FT priority() const { return m_priority; } }; diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index 9617930d52f..42445c8708d 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -117,7 +117,6 @@ public: The Output simplex. */ typedef OTR_2::Reconstruction_triangulation_2 Triangulation; - typedef typename Triangulation::Vertex Vertex; typedef typename Triangulation::Vertex_handle Vertex_handle; typedef typename Triangulation::Vertex_iterator Vertex_iterator; @@ -159,6 +158,7 @@ public: /// @} protected: + std::vector m_samples; Triangulation m_dt; Traits const& m_traits; MultiIndex m_mindex; @@ -212,7 +212,8 @@ public: unsigned int relocation = 2, int verbose = 0, Traits traits = Traits()) - : m_dt(traits), + : m_samples(), + m_dt(m_samples, traits), m_traits(m_dt.geom_traits()), m_ignore(0), m_verbose(verbose), @@ -369,14 +370,18 @@ public: insert_loose_bbox(bbox); init(start, beyond); - std::vector m_samples; + m_samples.reserve(std::distance(start,beyond)); for (InputIterator it = start; it != beyond; it++) { Point point = get(point_pmap, *it); FT mass = get( mass_pmap, *it); - Sample_* s = new Sample_(point, mass); + Sample_ s(point, mass); m_samples.push_back(s); } - assign_samples(m_samples.begin(), m_samples.end()); + Sample_vector sv(m_samples.size()); + for(int i = 0; i < sv.size(); ++i){ + sv[i] = i; + } + assign_samples(sv.begin(), sv.end()); } template @@ -398,7 +403,7 @@ public: insert_loose_bbox(bbox); init(vertices_start, vertices_beyond); - std::vector m_samples; + m_samples.reserve(std::distance(start,beyond)); for (InputIterator it = samples_start; it != samples_beyond; it++) { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 Point point = get(point_pmap, it); @@ -407,10 +412,14 @@ public: Point point = get(point_pmap, *it); FT mass = get( mass_pmap, *it); #endif - Sample_* s = new Sample_(point, mass); + Sample_s(point, mass); m_samples.push_back(s); } - assign_samples(m_samples.begin(), m_samples.end()); + Sample_vector sv(m_samples.size()); + for(int i = 0; i < sv.size(); ++i){ + sv[i] = i; + } + assign_samples(sv.begin(), sv.end()); } @@ -422,16 +431,8 @@ public: return m_traits.construct_vector_2_object()(dx, dy); } - void clear() { - Sample_vector samples; - m_dt.collect_all_samples(samples); - // Deallocate samples - for (Sample_vector_const_iterator s_it = samples.begin(); - s_it != samples.end(); ++s_it) - { - delete *s_it; - } - } + void clear() + {} // INIT // @@ -494,7 +495,7 @@ public: m_dt.cleanup_assignments(); } - template // value_type = Sample_* + template // value_type = int void assign_samples(Iterator begin, Iterator end) { CGAL::Real_timer timer; if (m_verbose > 0) @@ -587,7 +588,7 @@ public: << s->id() << "->" << t->id() << ") ... " << std::endl; } - Triangulation copy; + Triangulation copy(m_samples); Edge copy_edge = copy_star(edge, copy); Vertex_handle copy_source = copy.source_vertex(copy_edge); @@ -632,7 +633,7 @@ public: copy.assign_samples_brute_force(samples.begin(), samples.end()); copy.reset_all_costs(); cost = copy.compute_total_cost(); - cost.set_total_weight (samples); + cost.set_total_weight (m_samples, samples); restore_samples(samples.begin(), samples.end()); if (m_verbose > 1) { @@ -643,18 +644,18 @@ public: } template // value_type = Sample_* - void backup_samples(Iterator begin, Iterator end) const { + void backup_samples(Iterator begin, Iterator end) { for (Iterator it = begin; it != end; ++it) { - Sample_* sample = *it; - sample->backup(); + Sample_& sample = m_samples[* it]; + sample.backup(); } } template // value_type = Sample_* - void restore_samples(Iterator begin, Iterator end) const { + void restore_samples(Iterator begin, Iterator end) { for (Iterator it = begin; it != end; ++it) { - Sample_* sample = *it; - sample->restore(); + Sample_& sample = m_samples[* it]; + sample.restore(); } } @@ -1089,7 +1090,7 @@ public: m_dt.collect_samples_from_edge(twin, samples); copy_twin.first->samples(copy_twin.second) = samples; } - copy_vertex->set_sample(nullptr); + copy_vertex->set_sample(-1); } Edge get_copy_edge( @@ -1230,10 +1231,10 @@ public: void compute_relocation_for_vertex( Vertex_handle vertex, FT& coef, Vector& rhs) const { - Sample_* sample = vertex->sample(); - if (sample) { - const FT m = sample->mass(); - const Point& ps = sample->point(); + if (vertex->sample() != -1) { + const Sample_& sample = m_samples[vertex->sample()]; + const FT m = sample.mass(); + const Point& ps = sample.point(); rhs = m_traits.construct_sum_of_vectors_2_object()(rhs, m_traits.construct_scaled_vector_2_object()( m_traits.construct_vector_2_object()(CGAL::ORIGIN, ps), m)); @@ -1253,9 +1254,9 @@ public: Vector grad = m_traits.construct_vector_2_object()(FT(0), FT(0)); Sample_vector_const_iterator it; for (it = samples.begin(); it != samples.end(); ++it) { - Sample_* sample = *it; - const FT m = sample->mass(); - const Point& ps = sample->point(); + const Sample_& sample = m_samples[* it]; + const FT m = sample.mass(); + const Point& ps = sample.point(); FT Da = m_traits.compute_squared_distance_2_object()(ps, pa); FT Db = m_traits.compute_squared_distance_2_object()(ps, pb); @@ -1281,9 +1282,9 @@ public: Sample_vector_const_iterator it; for (it = samples.begin(); it != samples.end(); ++it) { - Sample_* sample = *it; - const FT m = sample->mass(); - const Point& ps = sample->point(); + const Sample_& sample = m_samples[* it]; + const FT m = sample.mass(); + const Point& ps = sample.point(); FT Da = m_traits.compute_squared_distance_2_object()(ps, pa); FT Db = m_traits.compute_squared_distance_2_object()(ps, pb); @@ -1357,8 +1358,8 @@ public: PSample psample = queue.top(); queue.pop(); - const FT m = psample.sample()->mass(); - const Point& ps = psample.sample()->point(); + const FT m = m_samples[psample.sample()].mass(); + const Point& ps = m_samples[psample.sample()].point(); const FT coord = psample.priority(); const FT one_minus_coord = 1.0 - coord; From 01fd45b0a9e8d716d9916757b93e080930e60ee6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 22 Dec 2022 15:12:02 +0000 Subject: [PATCH 305/426] fixes --- .../include/CGAL/Optimal_transportation_reconstruction_2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index 42445c8708d..259b8f556e9 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -403,7 +403,7 @@ public: insert_loose_bbox(bbox); init(vertices_start, vertices_beyond); - m_samples.reserve(std::distance(start,beyond)); + m_samples.reserve(std::distance(samples_start, samples_beyond)); for (InputIterator it = samples_start; it != samples_beyond; it++) { #ifdef CGAL_USE_PROPERTY_MAPS_API_V1 Point point = get(point_pmap, it); @@ -412,7 +412,7 @@ public: Point point = get(point_pmap, *it); FT mass = get( mass_pmap, *it); #endif - Sample_s(point, mass); + Sample_ s(point, mass); m_samples.push_back(s); } Sample_vector sv(m_samples.size()); From ecb987a9bf8aeeda7a44f884d6dc3b36fb35730f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 23 Dec 2022 13:20:13 +0100 Subject: [PATCH 306/426] do not use shared_ptr ... ... as it is more expensive (in small dimension at least) to create than copying the point --- .../include/CGAL/Search_traits_adapter.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index c2ff9a227d6..2333abc3307 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -142,14 +142,14 @@ public: typedef typename boost::property_traits::value_type Point; - std::shared_ptr point; - std::size_t idx; + Point point; + std::size_t idx = 0; public: - No_lvalue_iterator() : point(NULL), idx(0) { } - No_lvalue_iterator(const Point& point) : point(new Point(point)), idx(0) { } - No_lvalue_iterator(const Point& point, int) : point(new Point(point)), idx(Base::Dimension::value) { } + No_lvalue_iterator() : point() { } + No_lvalue_iterator(const Point& point) : point(point) { } + No_lvalue_iterator(const Point& point, int) : point(point), idx(Base::Dimension::value) { } private: @@ -157,18 +157,15 @@ public: void increment() { ++idx; - CGAL_assertion(point != std::shared_ptr()); } void decrement() { --idx; - CGAL_assertion(point != std::shared_ptr()); } void advance(std::ptrdiff_t n) { idx += n; - CGAL_assertion(point != std::shared_ptr()); } std::ptrdiff_t distance_to(const No_lvalue_iterator& other) const @@ -185,7 +182,7 @@ public: dereference() const { // Point::operator[] takes an int as parameter... - return const_cast((*point)[static_cast(idx)]); + return const_cast(point[static_cast(idx)]); } }; From 0c5ebc75bceaf6526b646991af675d317df8498c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 23 Dec 2022 16:06:36 +0000 Subject: [PATCH 307/426] Orthree: Fix testsuite code --- Orthtree/test/Orthtree/test_octree_grade.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Orthtree/test/Orthtree/test_octree_grade.cpp b/Orthtree/test/Orthtree/test_octree_grade.cpp index 76421fd474f..a0a574bd9ef 100644 --- a/Orthtree/test/Orthtree/test_octree_grade.cpp +++ b/Orthtree/test/Orthtree/test_octree_grade.cpp @@ -56,7 +56,6 @@ void test(std::size_t dataset_size) { // Count the jumps in depth auto jumps = count_jumps(octree); std::cout << "un-graded octree has " << jumps << " jumps" << std::endl; - assert(jumps > 0); // Grade the octree octree.grade(); From bd6c5ca9b778e81ca92f2fa828a2ad0fad7bdf8f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 23 Dec 2022 16:18:04 +0000 Subject: [PATCH 308/426] Convex_hull_2: Do not assert without exact predicates --- Convex_hull_2/test/Convex_hull_2/ch_test_CH.cpp | 4 ---- Convex_hull_2/test/Convex_hull_2/ch_test_SC.cpp | 3 --- Convex_hull_2/test/Convex_hull_2/ch_test_SH.cpp | 3 --- Convex_hull_2/test/Convex_hull_2/ch_test_SS.cpp | 3 --- 4 files changed, 13 deletions(-) diff --git a/Convex_hull_2/test/Convex_hull_2/ch_test_CH.cpp b/Convex_hull_2/test/Convex_hull_2/ch_test_CH.cpp index 54d23ac3f68..e8d3cb35678 100644 --- a/Convex_hull_2/test/Convex_hull_2/ch_test_CH.cpp +++ b/Convex_hull_2/test/Convex_hull_2/ch_test_CH.cpp @@ -56,9 +56,5 @@ main() CGAL::ch__batch_test( cch_H_gmp ); #endif - CGAL::Convex_hull_constructive_traits_2< CGAL::Homogeneous > - cch_H_double; - std::cout << "Homogeneous: C "; - CGAL::ch__batch_test( cch_H_double ); return 0; } diff --git a/Convex_hull_2/test/Convex_hull_2/ch_test_SC.cpp b/Convex_hull_2/test/Convex_hull_2/ch_test_SC.cpp index abb4139ff1c..8afec6eb758 100644 --- a/Convex_hull_2/test/Convex_hull_2/ch_test_SC.cpp +++ b/Convex_hull_2/test/Convex_hull_2/ch_test_SC.cpp @@ -53,8 +53,5 @@ main() CGAL::ch__batch_test( ch_C_Qgmp ); #endif - CGAL::Cartesian ch_C_double; - std::cout << "Cartesian: "; - CGAL::ch__batch_test( ch_C_double ); return 0; } diff --git a/Convex_hull_2/test/Convex_hull_2/ch_test_SH.cpp b/Convex_hull_2/test/Convex_hull_2/ch_test_SH.cpp index c0ddcb07d92..954abf2fac6 100644 --- a/Convex_hull_2/test/Convex_hull_2/ch_test_SH.cpp +++ b/Convex_hull_2/test/Convex_hull_2/ch_test_SH.cpp @@ -52,8 +52,5 @@ main() CGAL::ch__batch_test( ch_H_gmp ); #endif - CGAL::Homogeneous ch_H_double; - std::cout << "Homogeneous: "; - CGAL::ch__batch_test( ch_H_double ); return 0; } diff --git a/Convex_hull_2/test/Convex_hull_2/ch_test_SS.cpp b/Convex_hull_2/test/Convex_hull_2/ch_test_SS.cpp index 3a5b9edf77e..9e73c8ce191 100644 --- a/Convex_hull_2/test/Convex_hull_2/ch_test_SS.cpp +++ b/Convex_hull_2/test/Convex_hull_2/ch_test_SS.cpp @@ -53,8 +53,5 @@ main() CGAL::ch__batch_test( ch_S_Qgmp ); #endif - CGAL::Simple_cartesian ch_S_double; - std::cout << "SimpleCartesian: "; - CGAL::ch__batch_test( ch_S_double ); return 0; } From 5e101566fb6920674a52f5e31f5355745f1b280b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 2 Jan 2023 10:34:27 +0100 Subject: [PATCH 309/426] Remove obsolete typedefs --- .../include/CGAL/Polygon_mesh_processing/repair_degeneracies.h | 2 -- 1 file changed, 2 deletions(-) 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 c727b9c360f..e9afa43b78c 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 @@ -302,9 +302,7 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename Traits::FT FT; typedef typename boost::property_traits::reference Point_ref; - typedef typename Traits::Vector_3 Vector_3; CGAL_precondition(!is_border(e, tmesh)); From 939a6a2b80586251746e7a114040aeced998218e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 2 Jan 2023 13:17:17 +0000 Subject: [PATCH 310/426] Make the demo work again --- .../render.cpp | 26 +++++++++---------- .../scene.h | 18 ++++++------- .../include/CGAL/OTR_2/Sample.h | 3 +++ .../Optimal_transportation_reconstruction_2.h | 8 +++--- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/render.cpp b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/render.cpp index 46837ca5b03..649f280928a 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/render.cpp +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/render.cpp @@ -172,9 +172,9 @@ void R_s_k_2::draw_edge_footpoints(const Triangulation& mesh, Sample_vector::const_iterator it; for (it = samples.begin(); it != samples.end(); ++it) { - Sample_* sample = *it; - Point p = sample->point(); - FT m = 0.5*(1.0 - sample->mass()); + const Sample_& sample = this->m_samples[* it]; + Point p = sample.point(); + FT m = 0.5*(1.0 - sample.mass()); Point q; if (mesh.get_plan(edge) == 0) @@ -188,7 +188,7 @@ void R_s_k_2::draw_edge_footpoints(const Triangulation& mesh, else { viewer->glColor3f(red + m, green + m, blue + m); - FT t = sample->coordinate(); + FT t = sample.coordinate(); q = CGAL::ORIGIN + (1.0 - t)*(a - CGAL::ORIGIN) + t*(b - CGAL::ORIGIN); } draw_segment(p, q); @@ -396,8 +396,8 @@ void R_s_k_2::draw_bins_plan0(const Edge& edge) Sample_vector_const_iterator it; for (it = samples.begin(); it != samples.end(); ++it) { - Sample_* sample = *it; - const Point& ps = sample->point(); + const Sample_& sample = this->m_samples[* it]; + const Point& ps = sample.point(); Point q = pa; FT Da = CGAL::squared_distance(ps, pa); @@ -423,8 +423,8 @@ void R_s_k_2::draw_bins_plan1(const Edge& edge) PSample psample = queue.top(); queue.pop(); - const FT m = psample.sample()->mass(); - const Point& ps = psample.sample()->point(); + const FT m = this->m_samples[psample.sample()].mass(); + const Point& ps = this->m_samples[psample.sample()].point(); FT bin = m/M; FT alpha = start + 0.5*bin; @@ -511,7 +511,7 @@ void R_s_k_2::draw_one_ring(const float point_size, const float line_width, cons bool ok = locate_edge(query, edge); if (!ok) return; - Triangulation copy; + Triangulation copy(this->m_samples); Edge copy_edge = copy_star(edge, copy); draw_mesh_one_ring(point_size, line_width, copy, copy_edge); } @@ -550,7 +550,7 @@ void R_s_k_2::draw_blocking_edges(const float point_size, const float line_width bool ok = locate_edge(query, edge); if (!ok) return; - Triangulation copy; + Triangulation copy(this->m_samples); Edge copy_edge = copy_star(edge, copy); draw_mesh_blocking_edges(point_size, line_width, copy, copy_edge); } @@ -590,7 +590,7 @@ void R_s_k_2::draw_collapsible_edge(const float point_size, bool ok = locate_edge(query, edge); if (!ok) return; - Triangulation copy; + Triangulation copy(this->m_samples); Edge copy_edge = copy_star(edge, copy); Vertex_handle copy_src = copy.source_vertex(copy_edge); @@ -612,7 +612,7 @@ void R_s_k_2::draw_cost_stencil(const float point_size, bool ok = locate_edge(query, edge); if (!ok) return; - Triangulation copy; + Triangulation copy(this->m_samples); Edge copy_edge = copy_star(edge, copy); Vertex_handle copy_src = copy.source_vertex(copy_edge); @@ -709,7 +709,7 @@ void R_s_k_2::draw_push_queue_stencil(const float point_size, it++; } - Triangulation copy; + Triangulation copy(this->m_samples); Edge_vector copy_hull; Edge_vector copy_stencil; Edge copy_edge = copy_star(edge, copy); diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/scene.h b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/scene.h index e590f0f0489..5ea9b8ba055 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/scene.h +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/scene.h @@ -74,8 +74,8 @@ public: typedef R_s_2::Edge_vector Edge_vector; typedef R_s_2::Sample_ Sample_; - typedef R_s_2::Sample_vector Sample_vector; - typedef R_s_2::Sample_vector_const_iterator Sample_vector_const_iterator; + typedef std::vector Sample_vector; + typedef Sample_vector::const_iterator Sample_vector_const_iterator; typedef R_s_2::PSample PSample; typedef R_s_2::SQueue SQueue; @@ -454,7 +454,7 @@ public: for (std::vector::iterator it = m_samples.begin(); it != m_samples.end(); ++it) { Sample_& s = *it; - samples.push_back(&s); + samples.push_back(s); } if (filename.contains(".xy", Qt::CaseInsensitive)) { @@ -471,8 +471,8 @@ public: std::ofstream ofs(qPrintable(filename)); for (Sample_vector_const_iterator it = samples.begin(); it != samples.end(); ++it) { - Sample_* sample = *it; - ofs << sample->point() << std::endl; + const Sample_& sample = *it; + ofs << sample.point() << std::endl; } ofs.close(); } @@ -507,12 +507,12 @@ public: Sample_vector_const_iterator it; for (it = vertices.begin(); it != vertices.end(); it++) { vertices_mass_list.push_back( - std::make_pair((*it)->point(), (*it)->mass())); + std::make_pair((*it).point(), (*it).mass())); } PointMassList samples_mass_list; for (it = samples.begin(); it != samples.end(); it++) { samples_mass_list.push_back( - std::make_pair((*it)->point(), (*it)->mass())); + std::make_pair((*it).point(), (*it).mass())); } Point_property_map point_pmap; @@ -553,10 +553,10 @@ public: for (it = m_samples.begin(); it != m_samples.end(); ++it) { Sample_& s = *it; - samples.push_back(&s); + samples.push_back(s); FT rv = random.get_double(0.0, 1.0); if (rv <= percentage) - vertices.push_back(&s); + vertices.push_back(s); } } diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h index fd4b6885a56..fee340a5914 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Sample.h @@ -39,6 +39,9 @@ private: FT m_backup_coord; public: + Sample() + {} + Sample(const Point& point, const FT mass = FT(1)) : m_point(point), diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index 259b8f556e9..e59ee1de3b8 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -175,7 +175,6 @@ protected: MassPMap mass_pmap; public: - /// \name Initialization /// @{ @@ -319,8 +318,9 @@ public: /// \cond SKIP_IN_MANUAL + Optimal_transportation_reconstruction_2() - : m_traits(m_dt.geom_traits()) + : m_samples(), m_dt(m_samples), m_traits(m_dt.geom_traits()) { initialize_parameters(); } @@ -1312,8 +1312,8 @@ public: PSample psample = queue.top(); queue.pop(); - const FT m = psample.sample()->mass(); - const Point& ps = psample.sample()->point(); + const FT m = this->m_samples[psample.sample()].mass(); + const Point& ps = this->m_samples[psample.sample()].point(); // normal + tangnetial const FT coord = psample.priority(); From c6fe1586c1d91c39eef3d21a86c0aa423ae73436 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 2 Jan 2023 16:33:45 +0000 Subject: [PATCH 311/426] Convex_hull_2: Use of 2D Delaunay --- .../doc/Convex_hull_2/Convex_hull_2.txt | 6 ++++- Convex_hull_2/doc/Convex_hull_2/examples.txt | 1 + .../examples/Convex_hull_2/ch_delaunay_2.cpp | 27 +++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Convex_hull_2/examples/Convex_hull_2/ch_delaunay_2.cpp diff --git a/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt b/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt index 16b2a60610d..bca9d0f275f 100644 --- a/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt +++ b/Convex_hull_2/doc/Convex_hull_2/Convex_hull_2.txt @@ -143,6 +143,10 @@ check whether a given sequence of 2D points forms a (counter)clockwise strongly convex polygon. These are used in postcondition testing of the two-dimensional convex hull functions. +In case you want to keep collinear points you can use the 2D Delaunay triangulation as +in the following example. This sequence is then not strongly convex. + +\cgalExample{Convex_hull_2/ch_delaunay_2.cpp} + */ } /* namespace CGAL */ - diff --git a/Convex_hull_2/doc/Convex_hull_2/examples.txt b/Convex_hull_2/doc/Convex_hull_2/examples.txt index 8439df4a923..63515ecab88 100644 --- a/Convex_hull_2/doc/Convex_hull_2/examples.txt +++ b/Convex_hull_2/doc/Convex_hull_2/examples.txt @@ -6,4 +6,5 @@ \example Convex_hull_2/ch_timing.cpp \example Convex_hull_2/iostream_convex_hull_2.cpp \example Convex_hull_2/vector_convex_hull_2.cpp +\example Convex_hull_2/ch_delaunay_2.cpp */ diff --git a/Convex_hull_2/examples/Convex_hull_2/ch_delaunay_2.cpp b/Convex_hull_2/examples/Convex_hull_2/ch_delaunay_2.cpp new file mode 100644 index 00000000000..0b80ee4c3de --- /dev/null +++ b/Convex_hull_2/examples/Convex_hull_2/ch_delaunay_2.cpp @@ -0,0 +1,27 @@ +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef K::Point_2 Point_2; +typedef CGAL::Delaunay_triangulation_2 Delaunay_triangulation_2; + + +int main() +{ + std::vector input = { Point_2(0, 0), Point_2(1,1), Point_2(2,0), Point_2(2,2), Point_2(1,2), Point_2(0,2) }; + + Delaunay_triangulation_2 dt(input.begin(), input.end()); + + std::list result; + Delaunay_triangulation_2::Vertex_circulator vc = dt.incident_vertices(dt.infinite_vertex()), done(vc); + do{ + std ::cout << vc->point() << std::endl; + // push_front in order to obtain the counterclockwise sequence + result.push_front(vc->point()); + ++vc; + }while(vc != done); + + return 0; +} From 793801cd8b2173c101d11030d16b6db36259b261 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 3 Jan 2023 07:36:46 +0000 Subject: [PATCH 312/426] Fix conversion warning --- .../include/CGAL/Optimal_transportation_reconstruction_2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h index e59ee1de3b8..b3740acbb30 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/Optimal_transportation_reconstruction_2.h @@ -378,7 +378,7 @@ public: m_samples.push_back(s); } Sample_vector sv(m_samples.size()); - for(int i = 0; i < sv.size(); ++i){ + for(int i = 0; i < static_cast(sv.size()); ++i){ sv[i] = i; } assign_samples(sv.begin(), sv.end()); @@ -416,7 +416,7 @@ public: m_samples.push_back(s); } Sample_vector sv(m_samples.size()); - for(int i = 0; i < sv.size(); ++i){ + for(int i = 0; i < static_cast(sv.size()); ++i){ sv[i] = i; } assign_samples(sv.begin(), sv.end()); From 07646a4140eb006da30a61684d2f55c225ffb4c8 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 3 Jan 2023 16:38:27 +0100 Subject: [PATCH 313/426] Fix warning --- Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp index ad8d0738dd6..488282915ba 100644 --- a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp +++ b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp @@ -23,7 +23,7 @@ int main(int argc, char* argv[]) // Internal color property maps are used if they exist and are called "v:color", "e:color" and "f:color". auto vcm = sm.add_property_map("v:color").first; auto ecm = sm.add_property_map("e:color").first; - /*auto fcm =*/ sm.add_property_map("f:color", CGAL::IO::white() /*default*/).first; + auto fcm = sm.add_property_map("f:color", CGAL::IO::white() /*default*/).first; for(auto v : vertices(sm)) { @@ -36,6 +36,8 @@ int main(int argc, char* argv[]) for(auto e : edges(sm)) put(ecm, e, CGAL::IO::gray()); + CGAL_USE(fcm); + // Draw! CGAL::draw(sm); From 4afd1d247fb97c846d97229d44444df1082c72be Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 4 Jan 2023 11:34:40 +0000 Subject: [PATCH 314/426] 3D Demo: Clamp as acos operates on [-1,1] --- Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h index 82a081b8083..88080ac3464 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -71,7 +72,7 @@ void compute_angles(Mesh* poly,Tester tester , double& mini, double& maxi, doubl typename Traits::Vector_3 bc(b, c); double cos_angle = (ba * bc) / std::sqrt(ba.squared_length() * bc.squared_length()); - + cos_angle = boost::algorithm::clamp(cos_angle, -1.0, 1.0); acc(std::acos(cos_angle) * rad_to_deg); } @@ -281,4 +282,3 @@ void faces_aspect_ratio(Mesh* poly, faces_aspect_ratio(poly, faces(*poly), min_altitude, mini, maxi, mean); } #endif // POLYHEDRON_DEMO_STATISTICS_HELPERS_H - From e2f1940747d68bde702b0c59a7973b17d347368a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 4 Jan 2023 16:17:15 +0100 Subject: [PATCH 315/426] Fix spelling --- .../Boolean_set_operations_2/bezier_traits_adapter2.cpp | 4 ++-- .../Polyline_simplification_2/Polyline_simplification_2.cpp | 4 ++-- .../Straight_skeleton_2/Straight_skeleton_builder_2_impl.h | 2 +- .../include/CGAL/constructions/Straight_skeleton_cons_ftC2.h | 4 ++-- .../include/CGAL/predicates/Straight_skeleton_pred_ftC2.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp index 2c5b160b40a..853340f86d2 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/bezier_traits_adapter2.cpp @@ -168,11 +168,11 @@ bool read_bezier(char const* aFileName, Bezier_polygon_set& rSet) } } catch(std::exception const& x) { - std::cout << "An exception ocurred during reading of Bezier polygon set:" + std::cout << "An exception occurred during reading of Bezier polygon set:" << x.what() << std::endl; } catch(...) { - std::cout << "An exception ocurred during reading of Bezier polygon set." + std::cout << "An exception occurred during reading of Bezier polygon set." << std::endl; } } diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp index 987b924dcee..67a8026f17f 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp @@ -321,7 +321,7 @@ void MainWindow::on_actionSimplify_triggered() } catch(...) { - statusBar()->showMessage(QString("Exception ocurred")); + statusBar()->showMessage(QString("Exception occurred")); } // default cursor @@ -478,7 +478,7 @@ void MainWindow::loadOSM(QString fileName) } catch(...) { - statusBar()->showMessage(QString("Exception ocurred")); + statusBar()->showMessage(QString("Exception occurred")); } Q_EMIT( changed()); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index c2abf5e77ca..134230070c7 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -367,7 +367,7 @@ void Straight_skeleton_builder_2::CollectNewEvents( Vertex_handle aNode // Handles the special case of two simultaneous edge events, that is, two edges // collapsing along the line/point were they meet at the same time. -// This ocurrs when the bisector emerging from vertex 'aA' is defined by the same pair of +// This occurs when the bisector emerging from vertex 'aA' is defined by the same pair of // contour edges as the bisector emerging from vertex 'aB' (but in opposite order). // template diff --git a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h index a391e44029a..3ef15939e8d 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h @@ -385,10 +385,10 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // If you ask for the right child point for a trisegment tree corresponding to a split event you will just get e1.target() // which is nonsensical for a non initial split event. // -// NOTE: There is an abnormal collinearity case which ocurrs when e0 and e2 are collinear. +// NOTE: There is an abnormal collinearity case which occurs when e0 and e2 are collinear. // In this case, these lines do not correspond to an offset vertex (because e0* and e2* are never consecutive before the event), // so the degenerate seed is neither the left or the right seed. In this case, the SEED ID for the degenerate pseudo seed is UNKOWN. -// If you request the point of such degenerate pseudo seed the oriented midpoint bettwen e0 and e2 is returned. +// If you request the point of such degenerate pseudo seed the oriented midpoint between e0 and e2 is returned. // template boost::optional< Point_2 > diff --git a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h index 082968ba60d..34bb01047ae 100644 --- a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h @@ -368,7 +368,7 @@ is_edge_facing_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 Date: Wed, 4 Jan 2023 16:26:09 +0100 Subject: [PATCH 316/426] Minor debug improvements --- .../Polygon_offset_builder_2_impl.h | 5 ++++- .../Straight_skeleton_2/Straight_skeleton_aux.h | 10 ++++------ .../Straight_skeleton_builder_2_impl.h | 6 +++--- .../include/CGAL/Straight_skeleton_2/debug.h | 6 +++--- Straight_skeleton_2/include/CGAL/Trisegment_2.h | 14 +++++++++++++- 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h index e396d755293..553f49c4c2a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h @@ -66,7 +66,7 @@ Polygon_offset_builder_2::LocateHook( FT Halfedge_const_handle lNext = aBisector->next(); CGAL_POLYOFFSET_TRACE(2,"Testing hook on " << e2str(*aBisector) ) ; - CGAL_POLYOFFSET_TRACE(4, "Next: " << e2str(*lNext) << " - Prev: " << e2str(*lPrev) ) ; + CGAL_POLYOFFSET_TRACE(4, "Next: " << e2str(*lNext) << " ; Prev: " << e2str(*lPrev) ) ; if ( !IsVisited(aBisector) ) { @@ -82,6 +82,9 @@ Polygon_offset_builder_2::LocateHook( FT Comparison_result lTimeWrtSrcTime = lPrev->is_bisector() ? Compare_offset_against_event_time(aTime,lPrev ->vertex()) : LARGER ; Comparison_result lTimeWrtTgtTime = lNext->is_bisector() ? Compare_offset_against_event_time(aTime,aBisector->vertex()) : LARGER ; + CGAL_POLYOFFSET_TRACE(3," lPrev->is_bisector(): " << lPrev->is_bisector() << " lNext->is_bisector(): " << lNext->is_bisector()); + CGAL_POLYOFFSET_TRACE(3," lPrev->vertex()->time(): " << lPrev->vertex()->time()); + CGAL_POLYOFFSET_TRACE(3," aBisector->vertex()->time(): " << aBisector->vertex()->time()); CGAL_POLYOFFSET_TRACE(3," TimeWrtSrcTime: " << lTimeWrtSrcTime << " TimeWrtTgtTime: " << lTimeWrtTgtTime ) ; // diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index e22b0bbe422..11fc83b2a74 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h @@ -30,7 +30,8 @@ namespace CGAL { namespace CGAL_SS_i { -template struct Has_inexact_constructions +template +struct Has_inexact_constructions { typedef typename K::FT FT ; @@ -176,10 +177,7 @@ public: inline void intrusive_ptr_add_ref( Ref_counted_base const* p ) { p->AddRef(); } inline void intrusive_ptr_release( Ref_counted_base const* p ) { p->Release(); } + } // namespace CGAL - - -#endif // CGAL_STRAIGHT_SKELETON_AUX_H // -// EOF // - +#endif // CGAL_STRAIGHT_SKELETON_AUX_H diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index 134230070c7..f67b3319e42 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -113,9 +113,9 @@ Straight_skeleton_builder_2::FindEdgeEvent( Vertex_handle aLNode, Verte if ( GetEdgeEndingAt(lPrevNode) == lTriedge.e2() ) { - // Note that this can be a contour node and in that case GetTrisegment is null and we get - // the middle point, but in that case e2 and e0 are consecutive in the input - // and the middle point is the common extremity and things are fine. + // Note that this can be a contour node and in that case GetTrisegment returns null + // and we get the middle point as a seed, but in that case e2 and e0 are consecutive + // in the input and the middle point is the common extremity thus things are fine. lTrisegment->set_child_t( GetTrisegment(lPrevNode) ) ; } else diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h index b742b924c14..72887141335 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/debug.h @@ -187,8 +187,8 @@ inline std::string e2str( E const& e ) ss << "B" << e.id() << "[E" << e.defining_contour_edge()->id() << ",E" << e.opposite()->defining_contour_edge()->id() << "]" - << " (/" << ( e.slope() == CGAL::ZERO ? "·" : ( e.slope() == CGAL::NEGATIVE ? "-" : "+" ) ) - << " " << e.opposite()->vertex()->time() << "->" << e.vertex()->time() << ")" ; + << " (S " << ( e.slope() == CGAL::ZERO ? "0" : ( e.slope() == CGAL::NEGATIVE ? "-" : "+" ) ) + << "; T " << e.opposite()->vertex()->time() << " -> " << e.vertex()->time() << ")" ; } else { @@ -263,7 +263,7 @@ inline std::string newn2str( char const* name, VH const& v, Triedge const& aTrie #endif #ifdef CGAL_STRAIGHT_SKELETON_TRAITS_ENABLE_TRACE -bool sEnableTraitsTrace = false; +bool sEnableTraitsTrace = true; # define CGAL_STSKEL_TRAITS_ENABLE_TRACE sEnableTraitsTrace = true ; # define CGAL_STSKEL_TRAITS_ENABLE_TRACE_IF(cond) if ((cond)) sEnableTraitsTrace = true ; # define CGAL_STSKEL_TRAITS_DISABLE_TRACE sEnableTraitsTrace = false; diff --git a/Straight_skeleton_2/include/CGAL/Trisegment_2.h b/Straight_skeleton_2/include/CGAL/Trisegment_2.h index 9215f62b597..3f85a626b10 100644 --- a/Straight_skeleton_2/include/CGAL/Trisegment_2.h +++ b/Straight_skeleton_2/include/CGAL/Trisegment_2.h @@ -60,7 +60,7 @@ struct Minmax_traits< Trisegment_collinearity > static const Trisegment_collinearity max = TRISEGMENT_COLLINEARITY_ALL; }; -} +} // namespace internal template class Trisegment_2 @@ -181,10 +181,22 @@ public: os << *aTriPtr ; if ( aTriPtr->child_l() ) + { + os << " \nleft child:" ; recursive_print(os,aTriPtr->child_l(),aDepth+1); + } if ( aTriPtr->child_r() ) + { + os << " \nright child:" ; recursive_print(os,aTriPtr->child_r(),aDepth+1); + } + + if ( aTriPtr->child_t() ) + { + os << " \nthird child:" ; + recursive_print(os,aTriPtr->child_t(),aDepth+1); + } } else { From c38ff2b4e216d62b6d18d002abd78960dee351e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 4 Jan 2023 16:26:31 +0100 Subject: [PATCH 317/426] Move Segment_2_with_ID to aux --- .../Straight_skeleton_2/Straight_skeleton_aux.h | 17 +++++++++++++++++ .../Straight_skeleton_builder_traits_2_aux.h | 17 ----------------- .../CGAL/Straight_skeleton_converter_2.h | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index 11fc83b2a74..85f713200ad 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h @@ -43,6 +43,23 @@ struct Has_inexact_constructions >::type type ; } ; +template +struct Segment_2_with_ID + : public K::Segment_2 +{ + typedef typename K::Segment_2 Base; + typedef typename K::Point_2 Point_2; + +public: + Segment_2_with_ID() : Base(), mID(-1) { } + Segment_2_with_ID(Base const& aS) : Base(aS), mID(-1) { } + Segment_2_with_ID(Base const& aS, const std::size_t aID) : Base(aS), mID(aID) { } + Segment_2_with_ID(Point_2 const& aP, Point_2 const& aQ, const std::size_t aID) : Base(aP, aQ), mID(aID) { } + +public: + std::size_t mID; +}; + // // This record encapsulates the defining contour halfedges for a node (both contour and skeleton) // diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h index 6939ad21b72..27a9f8a383d 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_traits_2_aux.h @@ -190,23 +190,6 @@ class Rational NT mN, mD ; } ; -template -struct Segment_2_with_ID - : public Segment_2 -{ - typedef Segment_2 Base; - typedef typename K::Point_2 Point_2; - -public: - Segment_2_with_ID() : Base(), mID(-1) { } - Segment_2_with_ID(Base const& aS) : Base(aS), mID(-1) { } - Segment_2_with_ID(Base const& aS, const std::size_t aID) : Base(aS), mID(aID) { } - Segment_2_with_ID(Point_2 const& aP, Point_2 const& aQ, const std::size_t aID) : Base(aP, aQ), mID(aID) { } - -public: - std::size_t mID; -}; - template struct No_cache { diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h index d7893baa68b..3defda4bcc9 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -13,7 +13,7 @@ #include -#include +#include #include #include From 2410d8e304f04fac0904168c2956d1446664d219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 4 Jan 2023 16:36:34 +0100 Subject: [PATCH 318/426] Reduce the (large) delta between SLS HDS concepts and models... --- .../Straight_skeleton_builder_2_impl.h | 4 ++-- .../CGAL/Straight_skeleton_halfedge_base_2.h | 2 -- .../include/CGAL/Straight_skeleton_vertex_base_2.h | 13 +++---------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index f67b3319e42..292d001e349 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -581,7 +581,7 @@ void Straight_skeleton_builder_2::CreateContourBisectors() Vertex_handle lInfNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++ ) ) ; InitVertexData(lInfNode); - CGAL_assertion(lInfNode->has_null_point()); + CGAL_assertion(lInfNode->has_infinite_time()); lRBisector->HBase_base::set_next( lLBisector ); lLBisector->HBase_base::set_prev( lRBisector ); @@ -1212,7 +1212,7 @@ void Straight_skeleton_builder_2::HandleSplitEvent( EventPtr aEvent, Ve Vertex_handle lNewFicNode = mSSkel->SSkel::Base::vertices_push_back( Vertex( mVertexID++ ) ) ; InitVertexData(lNewFicNode); - CGAL_assertion(lNewFicNode->has_null_point()); + CGAL_assertion(lNewFicNode->has_infinite_time()); CrossLink(lNOBisector_R,lNewFicNode); SetBisectorSlope(lNOBisector_L,POSITIVE); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_halfedge_base_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_halfedge_base_2.h index 01a3256be7a..c627109c0b9 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_halfedge_base_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_halfedge_base_2.h @@ -62,8 +62,6 @@ public: return !this->vertex()->is_contour() && !this->opposite()->vertex()->is_contour(); } - bool has_null_segment() const { return this->vertex()->has_null_point() ; } - bool has_infinite_time() const { return this->vertex()->has_infinite_time() ; } Halfedge_const_handle defining_contour_edge() const { return this->face()->halfedge() ; } diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h index bbc59c2c54f..2cd495c4472 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h @@ -197,8 +197,6 @@ public: bool has_infinite_time() const { return ( mFlags & HasInfiniteTimeBit ) == HasInfiniteTimeBit ; } - bool has_null_point() const { return has_infinite_time(); } - bool is_split() const { return ( mFlags & IsSplitBit ) == IsSplitBit ; } Halfedge_const_handle primary_bisector() const { return halfedge()->next(); } @@ -285,14 +283,9 @@ public: Straight_skeleton_vertex_base_2 ( int aID, Point_2 const& aP ) : Base(aID,aP) {} - Straight_skeleton_vertex_base_2 ( int aID, Point_2 const& aP, FT aTime, bool aIsSplit, bool aHasInfiniteTime ) : Base(aID,aP,aTime,aIsSplit,aHasInfiniteTime) {} - -private: - - void set_halfedge ( Halfedge_handle aHE ) { Base::set_halfedge(aHE) ; } - void set_event_triedge( Triedge const& aTriedge ) { Base::set_event_triedge( aTriedge); } - void reset_id ( int aID ) { Base::reset_id(aID) ; } - + Straight_skeleton_vertex_base_2 ( int aID, Point_2 const& aP, FT aTime, bool aIsSplit, bool aHasInfiniteTime ) + : Base(aID, aP, aTime, aIsSplit, aHasInfiniteTime) + {} } ; } // end namespace CGAL From b2d562e58239f88f362590d4fa3a78660886c79c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 4 Jan 2023 16:38:15 +0100 Subject: [PATCH 319/426] Store trisegments within SLS vertices This violates the concept, but it replaces storage of triedges, which was also violating the concept... --- .../include/CGAL/Polygon_offset_builder_2.h | 36 +------- .../Polygon_offset_builder_2_impl.h | 85 ++---------------- .../Straight_skeleton_builder_2_impl.h | 9 -- .../CGAL/Straight_skeleton_builder_2.h | 3 + .../CGAL/Straight_skeleton_converter_2.h | 90 ++++++++++++++++--- .../CGAL/Straight_skeleton_vertex_base_2.h | 40 ++++++--- 6 files changed, 117 insertions(+), 146 deletions(-) diff --git a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h index 0cc8bea0af9..9d498c8f7ea 100644 --- a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h @@ -137,43 +137,14 @@ private: return K().construct_segment_2_object()(s,t); } - Trisegment_2_ptr CreateTrisegment ( Triedge const& aTriedge ) const - { - CGAL_precondition( aTriedge.is_valid() ) ; - - if ( aTriedge.is_skeleton() ) - { - return Construct_ss_trisegment_2(mTraits)(CreateSegment(aTriedge.e0()) - ,CreateSegment(aTriedge.e1()) - ,CreateSegment(aTriedge.e2()) - ); - } - else - { - return Trisegment_2_ptr() ; - } - } - - Trisegment_2_ptr CreateTrisegment ( Vertex_const_handle aNode ) const ; - - Vertex_const_handle GetSeedVertex ( Vertex_const_handle aNode - , Halfedge_const_handle aBisector - , Halfedge_const_handle aEa - , Halfedge_const_handle aEb - ) const ; - - bool Is_bisector_defined_by ( Halfedge_const_handle aBisector, Halfedge_const_handle aEa, Halfedge_const_handle aEb ) const - { - return ( aBisector->defining_contour_edge() == aEa && aBisector->opposite()->defining_contour_edge() == aEb ) - || ( aBisector->defining_contour_edge() == aEb && aBisector->opposite()->defining_contour_edge() == aEa ) ; - } + Trisegment_2_ptr GetTrisegment ( Vertex_const_handle aNode ) const ; Comparison_result Compare_offset_against_event_time( FT aT, Vertex_const_handle aNode ) const { CGAL_precondition( aNode->is_skeleton() ) ; Comparison_result r = aNode->has_infinite_time() ? SMALLER - : static_cast(Compare_offset_against_event_time_2(mTraits)(aT,CreateTrisegment(aNode))); + : static_cast(Compare_offset_against_event_time_2(mTraits)(aT,GetTrisegment(aNode))); return r ; } @@ -199,8 +170,7 @@ public: CGAL_assertion ( lNodeT->is_skeleton() ) ; Vertex_const_handle lSeedNode = aBisector->slope() == POSITIVE ? lNodeS : lNodeT ; - - lSeedEvent = CreateTrisegment(lSeedNode) ; + lSeedEvent = GetTrisegment(lSeedNode) ; CGAL_POLYOFFSET_TRACE(3,"Seed node for " << e2str(*aBisector) << " is " << v2str(*lSeedNode) << " event=" << lSeedEvent ) ; } diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h index 553f49c4c2a..95fe522f3b3 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h @@ -327,96 +327,23 @@ OutputIterator Polygon_offset_builder_2::construct_offset_co template typename Polygon_offset_builder_2::Trisegment_2_ptr -Polygon_offset_builder_2::CreateTrisegment ( Vertex_const_handle aNode ) const +Polygon_offset_builder_2::GetTrisegment ( Vertex_const_handle aNode ) const { CGAL_precondition(handle_assigned(aNode)); Trisegment_2_ptr r ; - CGAL_POLYOFFSET_TRACE(3,"Creating Trisegment for " << v2str(*aNode) ) ; + CGAL_POLYOFFSET_TRACE(3,"Getting Trisegment for " << v2str(*aNode) ) ; if ( aNode->is_skeleton() ) { - Triedge const& lEventTriedge = aNode->event_triedge() ; - - r = CreateTrisegment(lEventTriedge) ; - - CGAL_stskel_intrinsic_test_assertion - ( - !CGAL_SS_i::is_possibly_inexact_distance_clearly_not_equal_to( Construct_ss_event_time_and_point_2(mTraits)(r)->get<0>() - , aNode->time() - ) - ) ; - - CGAL_POLYOFFSET_TRACE(3,"Event triedge=" << lEventTriedge ) ; - - if ( r->degenerate_seed_id() == Trisegment_2::LEFT ) - { - CGAL_POLYOFFSET_TRACE(3,"Left seed is degenerate." ) ; - - Vertex_const_handle lLeftSeed = GetSeedVertex(aNode - ,aNode->primary_bisector()->prev()->opposite() - ,lEventTriedge.e0() - ,lEventTriedge.e1() - ) ; - if ( handle_assigned(lLeftSeed) ) - r->set_child_l( CreateTrisegment(lLeftSeed) ) ; // Recursive call - } - else if ( ! aNode->is_split() && r->degenerate_seed_id() == Trisegment_2::RIGHT ) - { - CGAL_POLYOFFSET_TRACE(3,"Right seed is degenerate." ) ; - - Vertex_const_handle lRightSeed = GetSeedVertex(aNode - ,aNode->primary_bisector()->opposite()->next() - ,lEventTriedge.e1() - ,lEventTriedge.e2() - ) ; - if ( handle_assigned(lRightSeed) ) - r->set_child_r( CreateTrisegment(lRightSeed) ) ; // Recursive call - } + r = aNode->trisegment() ; + CGAL_assertion(bool(r)); } return r ; } -template -typename Polygon_offset_builder_2::Vertex_const_handle -Polygon_offset_builder_2::GetSeedVertex ( Vertex_const_handle aNode - , Halfedge_const_handle aBisector - , Halfedge_const_handle aEa - , Halfedge_const_handle aEb - ) const -{ - Vertex_const_handle rSeed ; +} // namespace CGAL - if ( Is_bisector_defined_by(aBisector,aEa,aEb) ) - { - rSeed = aBisector->vertex(); - - CGAL_POLYOFFSET_TRACE(3,"Seed of N" << aNode->id() << " for vertex (E" << aEa->id() << ",E" << aEb->id() << ") directly found: " << v2str(*rSeed) ) ; - } - else - { - typedef typename Vertex::Halfedge_around_vertex_const_circulator Halfedge_around_vertex_const_circulator ; - - Halfedge_around_vertex_const_circulator cb = aNode->halfedge_around_vertex_begin() ; - Halfedge_around_vertex_const_circulator c = cb ; - do - { - Halfedge_const_handle lBisector = *c ; - if ( Is_bisector_defined_by(lBisector,aEa,aEb) ) - { - rSeed = lBisector->opposite()->vertex(); - CGAL_POLYOFFSET_TRACE(3,"Seed of N" << aNode->id() << " for vertex (E" << aEa->id() << ",E" << aEb->id() << ") indirectly found: V" << rSeed->id() ) ; - } - } - while ( !handle_assigned(rSeed) && ++ c != cb ) ; - } - - return rSeed ; -} - -} // end namespace CGAL - -#endif // CGAL_POLYGON_OFFSET_BUILDER_2_IMPL_H // -// EOF // +#endif // CGAL_POLYGON_OFFSET_BUILDER_2_IMPL_H diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h index 292d001e349..1290fe30848 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h @@ -1045,10 +1045,7 @@ void Straight_skeleton_builder_2::HandleEdgeEvent( EventPtr aEvent ) Halfedge_handle lDefiningBorderB = lNewNode->halfedge()->opposite()->prev()->opposite()->defining_contour_edge(); Halfedge_handle lDefiningBorderC = lNewNode->halfedge()->opposite()->prev()->defining_contour_edge(); - lNewNode->VBase::set_event_triedge( lEvent.triedge() ) ; - Triedge lTri(lDefiningBorderA,lDefiningBorderB,lDefiningBorderC); - SetVertexTriedge( lNewNode, lTri ) ; SetBisectorSlope(lLSeed,lNewNode); @@ -1229,9 +1226,6 @@ void Straight_skeleton_builder_2::HandleSplitEvent( EventPtr aEvent, Ve Halfedge_handle lNewNode_R_DefiningBorderB = lNewNode_R->halfedge()->opposite()->prev()->opposite()->defining_contour_edge(); Halfedge_handle lNewNode_R_DefiningBorderC = lNewNode_R->halfedge()->opposite()->prev()->defining_contour_edge(); - lNewNode_L->VBase::set_event_triedge( lEvent.triedge() ) ; - lNewNode_R->VBase::set_event_triedge( lEvent.triedge() ) ; - Triedge lTriL( lNewNode_L_DefiningBorderA,lNewNode_L_DefiningBorderB,lNewNode_L_DefiningBorderC ) ; Triedge lTriR( lNewNode_R_DefiningBorderA,lNewNode_R_DefiningBorderB,lNewNode_R_DefiningBorderC ) ; @@ -1457,9 +1451,6 @@ void Straight_skeleton_builder_2::HandlePseudoSplitEvent( EventPtr aEve Halfedge_handle lNewNode_R_DefiningBorderB = lNewNode_R->halfedge()->next()->opposite()->defining_contour_edge(); Halfedge_handle lNewNode_R_DefiningBorderC = lNewNode_R->halfedge()->opposite()->prev()->defining_contour_edge(); - lNewNode_L->VBase::set_event_triedge( lEvent.triedge() ) ; - lNewNode_R->VBase::set_event_triedge( lEvent.triedge() ) ; - Triedge lTriL( lNewNode_L_DefiningBorderA, lNewNode_L_DefiningBorderB, lNewNode_L_DefiningBorderC ) ; Triedge lTriR( lNewNode_R_DefiningBorderA, lNewNode_R_DefiningBorderB, lNewNode_R_DefiningBorderC ) ; diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h index c38e416ab4b..5a7f1003c5e 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h @@ -633,7 +633,10 @@ private : void SetTrisegment ( Vertex_handle aV, Trisegment_2_ptr const& aTrisegment ) { + // @todo could get rid of the 'mTrisegment' in vertex data + // since it's also stored in the vertex directly (to be used during offset construction...) GetVertexData(aV).mTrisegment = aTrisegment ; + aV->set_trisegment(aTrisegment) ; } // Null if aV is a contour node diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h index 3defda4bcc9..c2656f85c1c 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -19,6 +19,7 @@ #include #include +#include #include @@ -41,6 +42,22 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source typedef typename Source_skeleton::Traits Source_traits ; typedef typename Target_skeleton::Traits Target_traits ; + typedef CGAL_SS_i::Segment_2_with_ID Source_segment_2_with_ID; + typedef CGAL_SS_i::Segment_2_with_ID Target_segment_2_with_ID; + + typedef typename Source_traits::Segment_2 Source_segment_2; + typedef typename Target_traits::Segment_2 Target_segment_2; + typedef Trisegment_2 Source_trisegment_2; + typedef Trisegment_2 Target_trisegment_2; + typedef boost::intrusive_ptr Source_trisegment_2_ptr; + typedef boost::intrusive_ptr Target_trisegment_2_ptr; + + // Same as above, but for Segment with IDs... + typedef Trisegment_2 Source_trisegment_2_with_ID; + typedef Trisegment_2 Target_trisegment_2_with_ID; + typedef boost::intrusive_ptr Source_trisegment_2_with_ID_ptr; + typedef boost::intrusive_ptr Target_trisegment_2_with_ID_ptr; + typedef Cartesian_converter Base ; typedef typename Source_skeleton::Vertex_const_handle Source_vertex_const_handle ; @@ -76,6 +93,63 @@ struct Straight_skeleton_items_converter_2: Cartesian_converter< typename Source return Target_face( aF->id() ); } + + Target_segment_2_with_ID operator() ( const Source_segment_2_with_ID& aS ) const + { + return Target_segment_2_with_ID(this->Base::operator()( + static_cast(aS)), aS.mID); + } + + Target_trisegment_2_ptr operator() ( const Source_trisegment_2_ptr& aT ) const + { + const auto& lSe0 = aT->e0(); + const auto& lSe1 = aT->e1(); + const auto& lSe2 = aT->e2(); + + Trisegment_collinearity lCollinearity = aT->collinearity(); + std::size_t lId = aT->id(); + + Target_trisegment_2_ptr rT = Target_trisegment_2_ptr( + new Target_trisegment_2(this->operator()(lSe0), + this->operator()(lSe1), + this->operator()(lSe2), + lCollinearity, lId)); + + if ( aT->child_l() ) + rT->set_child_l(this->operator()(aT->child_l())); + if ( aT->child_r() ) + rT->set_child_r(this->operator()(aT->child_r())); + if ( aT->child_t() ) + rT->set_child_t(this->operator()(aT->child_t())); + + return rT; + } + + Target_trisegment_2_with_ID_ptr operator() ( const Source_trisegment_2_with_ID_ptr& aT ) const + { + const auto& lSe0 = aT->e0(); + const auto& lSe1 = aT->e1(); + const auto& lSe2 = aT->e2(); + + Trisegment_collinearity lCollinearity = aT->collinearity(); + std::size_t lId = aT->id(); + + Target_trisegment_2_with_ID_ptr rT = Target_trisegment_2_with_ID_ptr( + new Target_trisegment_2_with_ID(this->operator()(lSe0), + this->operator()(lSe1), + this->operator()(lSe2), + lCollinearity, lId)); + + if ( aT->child_l() ) + rT->set_child_l(this->operator()(aT->child_l())); + if ( aT->child_r() ) + rT->set_child_r(this->operator()(aT->child_r())); + if ( aT->child_t() ) + rT->set_child_t(this->operator()(aT->child_t())); + + return rT; + } + } ; template @@ -201,20 +275,8 @@ private : CGAL_assertion( handle_assigned(tgt_halfedge) ) ; tvit->VBase::set_halfedge(tgt_halfedge); - Target_halfedge_handle tgt_striedge_e0, tgt_striedge_e1, tgt_striedge_e2 ; - - Source_triedge const& stri = svit->event_triedge() ; - - if ( handle_assigned(stri.e0()) ) - tgt_striedge_e0 = Target_halfedges.at(stri.e0()->id()); - - if ( handle_assigned(stri.e1()) ) - tgt_striedge_e1 = Target_halfedges.at(stri.e1()->id()); - - if ( handle_assigned(stri.e2()) ) - tgt_striedge_e2 = Target_halfedges.at(stri.e2()->id()); - - tvit->VBase::set_event_triedge( Target_triedge(tgt_striedge_e0, tgt_striedge_e1, tgt_striedge_e2) ) ; + if(svit->trisegment()) // contour nodes do not have trisegments + tvit->set_trisegment(cvt(svit->trisegment())); } Target_halfedge_iterator thit = aTarget.halfedges_begin(); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h index 2cd495c4472..e7932e65f43 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h @@ -15,6 +15,8 @@ #include #include +#include + #include #include #include @@ -155,6 +157,12 @@ public: typedef CGAL_SS_i::Triedge Triedge ; + typedef typename CGAL::Kernel_traits

      ::type K ; + typedef CGAL_SS_i::Segment_2_with_ID Segment_2 ; + typedef CGAL_SS_i::Segment_2_with_ID Segment_2_with_ID ; // for BOOST_MPL_HAS_XXX_TRAIT_DEF + typedef CGAL::Trisegment_2 Trisegment_2 ; + typedef boost::intrusive_ptr Trisegment_2_ptr; + public: Straight_skeleton_vertex_base_base_2() : mID(-1), mTime(0.0), mFlags(0) {} @@ -236,10 +244,18 @@ public: void set_halfedge( Halfedge_handle aHE) { mHE = aHE; } - Triedge const& event_triedge() const { return mEventTriedge ; } - - void set_event_triedge( Triedge const& aTriedge ) { mEventTriedge = aTriedge ; } - + // Store a pointer to the trisegment, which also includes its potential children. + // This is done to keep in memory the history of each node as to be able to + // recompute its geometric position and time during offset polygon construction. + // + // Note: the trisegment stored was constructed in the straight skeleton builder. + // When FinishUp() is called, multinodes are processed but as nodes are merged, + // the trisegments of these nodes are *not* updated. Thus, the combinatorial trees + // of these trisegments will become incoherent with the straight skeleton, but + // that's OK because it is still valid to compute purely geometrical information + // such as the node position and its time, which is all that is required for offset tracing. + Trisegment_2_ptr trisegment() const { return mTrisegment ; } + void set_trisegment( Trisegment_2_ptr const& aTrisegment ) { mTrisegment = aTrisegment ; } public : @@ -248,12 +264,13 @@ public : private: - int mID ; - Halfedge_handle mHE; - Triedge mEventTriedge ; - Point_2 mP; - FT mTime ; - unsigned char mFlags ; + int mID ; + Halfedge_handle mHE ; + Triedge mEventTriedge ; + Trisegment_2_ptr mTrisegment ; + Point_2 mP; + FT mTime ; + unsigned char mFlags ; }; template < class Refs, class P, class N > @@ -275,7 +292,8 @@ public: typedef Straight_skeleton_vertex_base_base_2 Base ; - typedef typename Base::Triedge Triedge ; + typedef typename Base::Triedge Triedge ; + typedef typename Base::Trisegment_2_ptr Trisegment_2_ptr ; Straight_skeleton_vertex_base_2() {} From 6b5954d2cfe3483cdaa56f66cf3713730bec9e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 4 Jan 2023 22:11:13 +0100 Subject: [PATCH 320/426] Remove another unused function which isn't part of the concept --- .../include/CGAL/Straight_skeleton_vertex_base_2.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h index e7932e65f43..575b5577434 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_vertex_base_2.h @@ -231,9 +231,6 @@ public: return Defining_contour_halfedges_circulator(halfedge()); } - - std::size_t degree() const { return CGAL::circulator_size(halfedge_around_vertex_begin()); } - bool is_skeleton() const { return halfedge()->is_bisector() ; } bool is_contour () const { return !halfedge()->is_bisector() ; } From fd23450d58cbe7df2f9d2db8cc9b318cd63cb41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 5 Jan 2023 10:15:06 +0100 Subject: [PATCH 321/426] Link issue7149 with Qt5 --- Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt b/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt index 61d49cb3061..5817b129e48 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt +++ b/Straight_skeleton_2/test/Straight_skeleton_2/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.22) project(Straight_skeleton_2_Tests) -find_package(CGAL REQUIRED COMPONENTS Core) +find_package(CGAL REQUIRED COMPONENTS Qt5 Core) include_directories(BEFORE "include") @@ -16,3 +16,7 @@ file( foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") endforeach() + +if(CGAL_Qt5_FOUND) + target_link_libraries(issue7149 PUBLIC CGAL::CGAL_Basic_viewer) +endif() From 11f0902573858849e4947c636bb98d2accb562be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 5 Jan 2023 11:52:56 +0100 Subject: [PATCH 322/426] Add new test --- .../test/Straight_skeleton_2/issue7149.cpp | 203 ++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp new file mode 100644 index 00000000000..9acead190b0 --- /dev/null +++ b/Straight_skeleton_2/test/Straight_skeleton_2/issue7149.cpp @@ -0,0 +1,203 @@ +// #define CGAL_SLS_TEST_ISSUE_7149_DEBUG +#ifdef CGAL_SLS_TEST_ISSUE_7149_DEBUG + +#include +#include +#include +#include + +bool lAppToLog = false ; + +void Straight_skeleton_external_trace ( std::string m ) +{ + std::ofstream out("sls_log.txt", ( lAppToLog ? std::ios::app | std::ios::ate : std::ios::trunc | std::ios::ate ) ); + out << std::setprecision(19) << m << std::endl << std::flush ; + lAppToLog = true ; +} +void Straight_skeleton_traits_external_trace ( std::string m ) +{ + std::ofstream out("sls_log.txt", ( lAppToLog ? std::ios::app | std::ios::ate : std::ios::trunc | std::ios::ate ) ) ; + out << std::setprecision(19) << m << std::endl << std::flush ; + lAppToLog = true ; +} + +void error_handler ( char const* what, char const* expr, char const* file, int line, char const* msg ) +{ + std::cerr << "CGAL error: " << what << " violation!" << std::endl + << "Expr: " << expr << std::endl + << "File: " << file << std::endl + << "Line: " << line << std::endl; + if ( msg != nullptr) + std::cerr << "Explanation:" << msg << std::endl; + + std::exit(1); +} + +#define CGAL_STRAIGHT_SKELETON_ENABLE_TRACE 4 +#define CGAL_STRAIGHT_SKELETON_TRAITS_ENABLE_TRACE +#define CGAL_POLYGON_OFFSET_ENABLE_TRACE 4 + +#endif + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +template +void test(const PointRange& points, + typename K::FT offset) +{ + using FT = typename K::FT; + using Polygon_2 = CGAL::Polygon_2; + + std::cout << "== Test Kernel: " << typeid(K).name() << ", offset: " << offset << std::endl; + + Polygon_2 pol{std::cbegin(points), std::cend(points)}; + std::cout << "Input polygon is " << (pol.is_simple() ? "simple" : "not simple") << std::endl; + + // For EPICK, construction errors can create polygons with consecutive equal points + constexpr bool test_output_simplicity = + (CGAL::is_same_or_derived::Algebraic_category>::value && + !std::is_floating_point::value); + + std::vector no_holes; + auto ss_ptr = CGAL::CGAL_SS_i::create_partial_interior_straight_skeleton_2( + FT(offset), + CGAL::CGAL_SS_i::vertices_begin(pol), + CGAL::CGAL_SS_i::vertices_end(pol), + no_holes.begin(), + no_holes.end(), + K()); + assert(ss_ptr); + + std::vector > offset_polygons_ptrs = + CGAL::create_offset_polygons_2(FT(offset), CGAL::CGAL_SS_i::dereference(ss_ptr), K()); + + std::cout << offset_polygons_ptrs.size() << " polygon(s)" << std::endl; + + if(offset == FT(0.48)) + assert(offset_polygons_ptrs.size() == 1); + + for(const auto& offset_polygon_ptr : offset_polygons_ptrs) + { + std::cout << offset_polygon_ptr->size() << " vertices in offset polygon" << std::endl; + std::cout << "Offset polygon is " << (offset_polygon_ptr->is_simple() ? "simple" : "not simple") << std::endl; + for(const auto& p : *offset_polygon_ptr) + std::cout << p << std::endl; + + // CGAL::draw(*offset_polygon_ptr); + + if(test_output_simplicity) + assert(offset_polygon_ptr->is_simple()); + if(offset == FT(0.48)) + assert(offset_polygon_ptr->size() == 23); + } +} + +template +void test(CGAL::Random& r) +{ + using FT = typename K::FT; + using Polygon_2 = CGAL::Polygon_2; + using Point_2 = typename K::Point_2; + + // Input + const std::array points = {{{131.6610, 51.1444}, + {132.0460, 50.9782}, + {132.0840, 50.9678}, + {132.1210, 50.9678}, + {132.1480, 50.9574}, + {132.2830, 50.9574}, + {132.3060, 50.9678}, + {132.3800, 50.9678}, + {132.6670, 51.0924}, + {132.8060, 51.2170}, + {132.8040, 51.2274}, + {132.8270, 51.2378}, + {132.9220, 51.4040}, + {132.9940, 51.6324}, + {133.0010, 51.6636}, + {133.0010, 51.7363}, + {133.0080, 51.7674}, + {133.0080, 51.8401}, + {133.0010, 51.8817}, + {133.0010, 51.9544}, + {132.9960, 51.9855}, + {132.9840, 52.0582}, + {132.9770, 52.0998}, + {132.9590, 52.1309}, + {132.9520, 52.1725}, + {132.9300, 52.2348}, + {132.9100, 52.2763}, + {132.8860, 52.3490}, + {132.8680, 52.3802}, + {132.7660, 52.5463}, + {132.7490, 52.5775}, + {132.7210, 52.5982}, + {132.7030, 52.6294}, + {132.6730, 52.6605}, + {132.6280, 52.7125}, + {132.5980, 52.7436}, + {132.5700, 52.7644}, + {132.4830, 52.8371}, + {132.4550, 52.8579}, + {131.8930, 53.0552}, + {131.7120, 53.0344}}}; + + Polygon_2 pol(std::cbegin(points), std::cend(points)); + auto ss_ptr = CGAL::create_interior_straight_skeleton_2(pol, K()); + assert(ss_ptr); + // CGAL::draw(*ss_ptr); + + // get some interesting offset values + std::set offsets {{0.48}}; + + for(auto it=ss_ptr->vertices_begin(); it!=ss_ptr->vertices_end(); ++it) + { + if(it->time() > 0) + { + std::cout << "Offset " << it->time() << " at " << it->point() << std::endl; + offsets.insert(it->time()); + } + } + + // a couple random values + for(int i=0; i<10; ++i) + offsets.insert(FT(r.get_double((std::numeric_limits::min)(), + CGAL::to_double(*(offsets.rbegin()))))); + + for(FT offset : offsets) + test(points, offset); +} + +int main(int, char**) +{ + std::cout.precision(17); + std::cerr.precision(17); + + CGAL::Random r; + std::cout << "random seed = " << r.get_seed() << std::endl; + +#ifdef CGAL_SLS_TEST_ISSUE_7149_DEBUG + sEnableTrace = true; +#endif + + test(r); + test(r); + test(r); + + return EXIT_SUCCESS; +} From aa1cb4b664bfd0229958c34456f25fde5f207e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 5 Jan 2023 12:39:58 +0100 Subject: [PATCH 323/426] Add missing include --- Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h index c2656f85c1c..650b1894a2a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -14,6 +14,7 @@ #include #include +#include #include #include From ecb2c7d27966bfd19d71c34518be539ff7717883 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 5 Jan 2023 14:24:53 +0200 Subject: [PATCH 324/426] xed get_point_in_face() --- .../Minkowski_sum_by_reduced_convolution_2.h | 258 +++++++----------- 1 file changed, 104 insertions(+), 154 deletions(-) diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h index 07c56481531..6ea8d300e08 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h @@ -32,8 +32,7 @@ namespace CGAL { // This implementation is based on Alon Baram's 2013 master's thesis "Polygonal // Minkowski Sums via Convolution: Theory and Practice" at Tel-Aviv University. template -class Minkowski_sum_by_reduced_convolution_2 -{ +class Minkowski_sum_by_reduced_convolution_2 { private: typedef Kernel_ Kernel; typedef Container_ Container; @@ -56,14 +55,14 @@ private: // Arrangement-related types: typedef Arrangement_with_history_2 Arrangement_history_2; - typedef typename Arrangement_history_2::Halfedge_handle Halfedge_handle; - typedef typename Arrangement_history_2::Face_iterator Face_iterator; - typedef typename Arrangement_history_2::Face_handle Face_handle; - typedef typename Arrangement_history_2::Ccb_halfedge_circulator - Ccb_halfedge_circulator; - typedef typename Arrangement_history_2::Originating_curve_iterator - Originating_curve_iterator; - typedef typename Arrangement_history_2::Inner_ccb_iterator Inner_ccb_iterator; + typedef typename Arrangement_history_2::Halfedge_const_handle + Halfedge_const_handle; + typedef typename Arrangement_history_2::Face_const_handle + Face_const_handle; + typedef typename Arrangement_history_2::Ccb_halfedge_const_circulator + Ccb_halfedge_const_circulator; + typedef typename Arrangement_history_2::Inner_ccb_const_iterator + Inner_ccb_const_iterator; // Function object types: typename Kernel::Construct_translated_point_2 f_add; @@ -74,8 +73,8 @@ private: typename Kernel::Counterclockwise_in_between_2 f_ccw_in_between; public: - Minkowski_sum_by_reduced_convolution_2() - { + //! + Minkowski_sum_by_reduced_convolution_2() { // Obtain kernel functors Kernel ker; f_add = ker.construct_translated_point_2_object(); @@ -86,10 +85,10 @@ public: f_ccw_in_between = ker.counterclockwise_in_between_2_object(); } + //! template void operator()(const Polygon_2& pgn1, const Polygon_2& pgn2, - Polygon_2& outer_boundary, OutputIterator holes) const - { + Polygon_2& outer_boundary, OutputIterator holes) const { CGAL_precondition(pgn1.is_simple()); CGAL_precondition(pgn2.is_simple()); CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE); @@ -101,6 +100,7 @@ public: common_operator(pwh1, pwh2, outer_boundary, holes); } + //! template void operator()(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, @@ -109,11 +109,10 @@ public: common_operator(pgn1, pgn2, outer_boundary, holes); } + //! template - void operator()(const Polygon_2& pgn1, - const Polygon_with_holes_2& pgn2, - Polygon_2& outer_boundary, OutputIterator holes) const - { + void operator()(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, + Polygon_2& outer_boundary, OutputIterator holes) const { CGAL_precondition(pgn1.is_simple()); CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE); const Polygon_with_holes_2 pwh1(pgn1); @@ -121,11 +120,11 @@ public: } private: + //! template void common_operator(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, - Polygon_2& outer_boundary, OutputIterator holes) const - { + Polygon_2& outer_boundary, OutputIterator holes) const { // If the outer boundaries of both summands are empty the Minkowski sum is // the entire plane. if (pgn1.outer_boundary().is_empty() && pgn2.outer_boundary().is_empty()) @@ -157,7 +156,7 @@ private: // Check for each face whether it is a hole in the M-sum. If it is, add it // to 'holes'. See chapter 3 of of Alon's master's thesis. - for (Face_iterator fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) { + for (auto fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) { // Check whether the face is on the M-sum's border. // The unbounded face cannot contribute to the Minkowski sum @@ -169,8 +168,8 @@ private: // The face needs to be orientable if (! test_face_orientation(arr, fit)) continue; - // When the reversed polygon 1, translated by a point inside of this face, - // collides with polygon 2, this cannot be a hole + // When the reversed polygon 1, translated by a point inside of this + // face, collides with polygon 2, this cannot be a hole Point_2 inner_point = get_point_in_face(fit); if (collision_detector.check_collision(inner_point)) continue; @@ -182,40 +181,35 @@ private: // polygons-with-holes. void build_reduced_convolution(const Polygon_with_holes_2& pgnwh1, const Polygon_with_holes_2& pgnwh2, - Segment_list& reduced_convolution) const - { - for (std::size_t x = 0; x < 1+pgnwh1.number_of_holes(); ++x) - { - for (std::size_t y = 0; y < 1+pgnwh2.number_of_holes(); ++y) - { - if ((x != 0) && (y != 0)) - { - continue; - } - - Polygon_2 pgn1, pgn2; - + Segment_list& reduced_convolution) const { + for (std::size_t x = 0; x < 1+pgnwh1.number_of_holes(); ++x) { + for (std::size_t y = 0; y < 1+pgnwh2.number_of_holes(); ++y) { + if ((x != 0) && (y != 0)) continue; if (x == 0) { - pgn1 = pgnwh1.outer_boundary(); + const auto& pgn1 = pgnwh1.outer_boundary(); + if (y == 0) { + const auto& pgn2 = pgnwh2.outer_boundary(); + build_reduced_convolution(pgn1, pgn2, reduced_convolution); + } + else { + auto it2 = pgnwh2.holes_begin(); + for (std::size_t count = 0; count < y-1; ++count) ++it2; + build_reduced_convolution(pgn1, *it2, reduced_convolution); + } } else { - typename Polygon_with_holes_2::Hole_const_iterator it1 = - pgnwh1.holes_begin(); - for (std::size_t count = 0; count < x-1; count++) { it1++; } - pgn1 = *it1; + auto it1 = pgnwh1.holes_begin(); + for (std::size_t count = 0; count < x-1; ++count) ++it1; + if (y == 0) { + const auto& pgn2 = pgnwh2.outer_boundary(); + build_reduced_convolution(*it1, pgn2, reduced_convolution); + } + else { + auto it2 = pgnwh2.holes_begin(); + for (std::size_t count = 0; count < y-1; ++count) ++it2; + build_reduced_convolution(*it1, *it2, reduced_convolution); + } } - - if (y == 0) { - pgn2 = pgnwh2.outer_boundary(); - } - else { - typename Polygon_with_holes_2::Hole_const_iterator it2 = - pgnwh2.holes_begin(); - for (std::size_t count = 0; count < y-1; count++) { it2++; } - pgn2 = *it2; - } - - build_reduced_convolution(pgn1, pgn2, reduced_convolution); } } } @@ -226,8 +220,7 @@ private: // iteration beginning from each vertex in the first column of the fiber // grid. void build_reduced_convolution(const Polygon_2& pgn1, const Polygon_2& pgn2, - Segment_list& reduced_convolution) const - { + Segment_list& reduced_convolution) const { int n1 = static_cast(pgn1.size()); int n2 = static_cast(pgn2.size()); if ((n1 == 0) || (n2 == 0)) return; @@ -244,13 +237,9 @@ private: // Init the queue with vertices from the first column std::queue state_queue; - for (int i = n1-1; i >= 0; --i) - { - state_queue.push(State(i, 0)); - } + for (int i = n1-1; i >= 0; --i) state_queue.push(State(i, 0)); - while (state_queue.size() > 0) - { + while (state_queue.size() > 0) { State curr_state = state_queue.front(); state_queue.pop(); @@ -258,10 +247,7 @@ private: int i2 = curr_state.second; // If this state was already visited, skip it - if (visited_states.count(curr_state) > 0) - { - continue; - } + if (visited_states.count(curr_state) > 0) continue; visited_states.insert(curr_state); int next_i1 = (i1+1) % n1; @@ -271,16 +257,13 @@ private: // Try two transitions: From (i,j) to (i+1,j) and to (i,j+1). Add // the respective segments, if they are in the reduced convolution. - for(int step_in_pgn1 = 0; step_in_pgn1 <= 1; step_in_pgn1++) - { + for (int step_in_pgn1 = 0; step_in_pgn1 <= 1; ++step_in_pgn1) { int new_i1, new_i2; - if (step_in_pgn1) - { + if (step_in_pgn1) { new_i1 = next_i1; new_i2 = i2; } - else - { + else { new_i1 = i1; new_i2 = next_i2; } @@ -289,39 +272,33 @@ private: // the other polygon's vertex' ingoing and outgoing directions, // the segment belongs to the full convolution. bool belongs_to_convolution; - if (step_in_pgn1) - { + if (step_in_pgn1) { belongs_to_convolution = f_ccw_in_between(p1_dirs[i1], p2_dirs[prev_i2], p2_dirs[i2]) || p1_dirs[i1] == p2_dirs[i2]; } - else - { + else { belongs_to_convolution = f_ccw_in_between(p2_dirs[i2], p1_dirs[prev_i1], p1_dirs[i1]) || p2_dirs[i2] == p1_dirs[prev_i1]; } - if (belongs_to_convolution) - { + if (belongs_to_convolution) { state_queue.push(State(new_i1, new_i2)); // Only edges added to convex vertices can be on the M-sum's boundary. // This filter only leaves the *reduced* convolution. bool convex; - if (step_in_pgn1) - { + if (step_in_pgn1) { convex = is_convex(p2_vertices[prev_i2], p2_vertices[i2], p2_vertices[next_i2]); } - else - { + else { convex = is_convex(p1_vertices[prev_i1], p1_vertices[i1], p1_vertices[next_i1]); } - if (convex) - { + if (convex) { Point_2 start_point = get_point(i1, i2, p1_vertices, p2_vertices); Point_2 end_point = get_point(new_i1, new_i2, p1_vertices, p2_vertices); @@ -334,27 +311,21 @@ private: // Returns a vector of the polygon's vertices, in case that Container // is std::list and we cannot use vertex(i). - std::vector vertices_of_polygon(const Polygon_2& p) const - { + std::vector vertices_of_polygon(const Polygon_2& p) const { std::vector vertices; - for (typename Polygon_2::Vertex_const_iterator it = p.vertices_begin(); - it != p.vertices_end(); it++) - { + for (auto it = p.vertices_begin(); it != p.vertices_end(); it++) vertices.push_back(*it); - } return vertices; } // Returns a sorted list of the polygon's edges - std::vector directions_of_polygon( - const std::vector& points) const - { + std::vector + directions_of_polygon(const std::vector& points) const { std::vector directions; std::size_t n = points.size(); - for (std::size_t i = 0; i < n-1; ++i) - { + for (std::size_t i = 0; i < n-1; ++i) { directions.push_back(f_direction(f_vector(points[i], points[i+1]))); } directions.push_back(f_direction(f_vector(points[n-1], points[0]))); @@ -362,42 +333,33 @@ private: return directions; } + //! bool is_convex(const Point_2& prev, const Point_2& curr, const Point_2& next) const - { - return f_orientation(prev, curr, next) == LEFT_TURN; - } + { return f_orientation(prev, curr, next) == LEFT_TURN; } // Returns the point corresponding to a state (i,j). Point_2 get_point(int i1, int i2, const std::vector& pgn1, const std::vector& pgn2) const - { - - return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2])); - } + { return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2])); } // Put the outer loop of the arrangement in 'outer_boundary' - void get_outer_loop(Arrangement_history_2& arr, - Polygon_2& outer_boundary) const - { - Inner_ccb_iterator icit = arr.unbounded_face()->inner_ccbs_begin(); - Ccb_halfedge_circulator circ_start = *icit; - Ccb_halfedge_circulator circ = circ_start; + void get_outer_loop(const Arrangement_history_2& arr, + Polygon_2& outer_boundary) const { + Inner_ccb_const_iterator icit = arr.unbounded_face()->inner_ccbs_begin(); + Ccb_halfedge_const_circulator circ_start = *icit; + Ccb_halfedge_const_circulator circ = circ_start; - do - { - outer_boundary.push_back(circ->source()->point()); - } + do outer_boundary.push_back(circ->source()->point()); while (--circ != circ_start); } // Determine whether the face orientation is consistent. bool test_face_orientation(const Arrangement_history_2& arr, - const Face_handle face) const - { + const Face_const_handle face) const { // The face needs to be orientable - Ccb_halfedge_circulator start = face->outer_ccb(); - Ccb_halfedge_circulator circ = start; + Ccb_halfedge_const_circulator start = face->outer_ccb(); + Ccb_halfedge_const_circulator circ = start; do if (!do_original_edges_have_same_direction(arr, circ)) return false; while (++circ != start); @@ -406,11 +368,10 @@ private: // Add a face to 'holes'. template - void add_face(const Face_handle face, OutputIterator holes) const - { + void add_face(Face_const_handle face, OutputIterator holes) const { Polygon_2 pgn_hole; - Ccb_halfedge_circulator start = face->outer_ccb(); - Ccb_halfedge_circulator circ = start; + Ccb_halfedge_const_circulator start = face->outer_ccb(); + Ccb_halfedge_const_circulator circ = start; do pgn_hole.push_back(circ->source()->point()); while (--circ != start); *holes = pgn_hole; @@ -420,11 +381,8 @@ private: // Check whether the convolution's original edge(s) had the same direction as // the arrangement's half edge bool do_original_edges_have_same_direction(const Arrangement_history_2& arr, - const Halfedge_handle he) const - { - Originating_curve_iterator segment_itr; - - for (segment_itr = arr.originating_curves_begin(he); + Halfedge_const_handle he) const { + for (auto segment_itr = arr.originating_curves_begin(he); segment_itr != arr.originating_curves_end(he); ++segment_itr) { if (f_compare_xy(segment_itr->source(), segment_itr->target()) == @@ -438,40 +396,33 @@ private: } // Return a point in the face's interior by finding a diagonal - Point_2 get_point_in_face(const Face_handle face) const - { - Ccb_halfedge_circulator current_edge = face->outer_ccb(); - Ccb_halfedge_circulator next_edge = current_edge; - next_edge++; + Point_2 get_point_in_face(Face_const_handle face) const { + Ccb_halfedge_const_circulator next = face->outer_ccb(); + Ccb_halfedge_const_circulator curr = next++; - Point_2 a, v, b; - - // Move over the face's vertices until a convex corner is encountered: - do - { - a = current_edge->source()->point(); - v = current_edge->target()->point(); - b = next_edge->target()->point(); - - current_edge++; - next_edge++; + // Move over the face's vertices until a convex corner is encountered. + // Observe that the outer ccb of a hole is clockwise oriented. + while (! is_convex(curr->source()->point(), + curr->target()->point(), + next->target()->point())) { + curr = next; + ++next; } - while (!is_convex(a, v, b)); + const auto& a = curr->source()->point(); + const auto& v = curr->target()->point(); + const auto& b = next->target()->point(); Triangle_2 ear(a, v, b); FT min_distance = -1; - const Point_2* min_q = 0; + const Point_2* min_q = nullptr; // Of the remaining vertices, find the one inside of the "ear" with minimal // distance to v: - while (++next_edge != current_edge) - { - const Point_2& q = next_edge->target()->point(); - if (ear.has_on_bounded_side(q)) - { + while (++next != curr) { + const Point_2& q = next->target()->point(); + if (ear.has_on_bounded_side(q)) { FT distance = squared_distance(q, v); - if ((min_q == 0) || (distance < min_distance)) - { + if ((min_q == 0) || (distance < min_distance)) { min_distance = distance; min_q = &q; } @@ -483,15 +434,14 @@ private: return (min_q == 0) ? centroid(ear) : midpoint(v, *min_q); } + //! template Polygon_with_holes_2 transform(const Transformation& t, - const Polygon_with_holes_2& p) const - { + const Polygon_with_holes_2& p) const { Polygon_with_holes_2 result(CGAL::transform(t, p.outer_boundary())); - typename Polygon_with_holes_2::Hole_const_iterator it = p.holes_begin(); - while (it != p.holes_end()) - { + auto it = p.holes_begin(); + while (it != p.holes_end()) { Polygon_2 p2(it->vertices_begin(), it->vertices_end()); result.add_hole(CGAL::transform(t, p2)); ++it; From 2290c788816053269b044bdbe5333058b0717025 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 5 Jan 2023 13:26:34 +0000 Subject: [PATCH 325/426] Use CGAL::approximate_angle() --- .../demo/Polyhedron/include/CGAL/statistics_helpers.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h index 88080ac3464..5b59a4b7712 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -68,12 +67,8 @@ void compute_angles(Mesh* poly,Tester tester , double& mini, double& maxi, doubl typename Traits::Point_3 b = get(vpmap, target(h, *poly)); typename Traits::Point_3 c = get(vpmap, target(next(h, *poly), *poly)); - typename Traits::Vector_3 ba(b, a); - typename Traits::Vector_3 bc(b, c); - double cos_angle = (ba * bc) - / std::sqrt(ba.squared_length() * bc.squared_length()); - cos_angle = boost::algorithm::clamp(cos_angle, -1.0, 1.0); - acc(std::acos(cos_angle) * rad_to_deg); + typename Traits::FT ang = CGAL::approximate_angle(b,a,c); + acc(CGAL::to_double(ang)); } mini = extract_result< tag::min >(acc); From 399945f27dc93b9d937a6887fa349155b3474703 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 5 Jan 2023 14:20:16 +0100 Subject: [PATCH 326/426] is_infinite(seed_cell) cannot be called when tr.dimension() < 3 and looking for the subdomain index is a nonsense --- .../CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h b/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h index 5a7b52b6685..772c1499338 100644 --- a/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h +++ b/Mesh_3/include/CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h @@ -152,7 +152,9 @@ void initialize_triangulation_from_labeled_image(C3T3& c3t3, const Subdomain seed_label = domain.is_in_domain_object()(seed_point); const Subdomain seed_cell_label - = (seed_cell == Cell_handle() || tr.is_infinite(seed_cell)) + = ( tr.dimension() < 3 + || seed_cell == Cell_handle() + || tr.is_infinite(seed_cell)) ? Subdomain() //seed_point is OUTSIDE_AFFINE_HULL : domain.is_in_domain_object()( seed_cell->weighted_circumcenter(tr.geom_traits())); From c2e06f867784be0b92ed5f9d68a4ff7549903994 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 5 Jan 2023 16:24:08 +0200 Subject: [PATCH 327/426] Added 2D Minkowski sum bug report (Fixed get_point_in_face()) --- Installation/CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 837406be878..3b06c5ebf0d 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -67,6 +67,9 @@ CGAL tetrahedral Delaunay refinement algorithm. - The stop predicates `Count_stop_predicate` and `Count_ratio_stop_predicate` are renamed to `Edge_count_stop_predicate` and `Edge_count_ratio_stop_predicate`. Older versions have been deprecated. - Introduce `Face_count_stop_predicate` and `Face_count_ratio_stop_predicate` that can be used to stop the simplification algorithm based on a desired number of faces in the output, or a ratio between input and output face numbers. +### [2D Minkowski Sums](https://doc.cgal.org/5.6/Manual/packages.html#PkgMinkowskiSum2) +- Fixed a bug that mae holes in the Minkowski sum disappear + [Release 5.5](https://github.com/CGAL/cgal/releases/tag/v5.5) ----------- From 014142f64dfbf2e766adb99f82efbec76cf62019 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 5 Jan 2023 22:00:04 +0200 Subject: [PATCH 328/426] ixed typo --- Installation/CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 3b06c5ebf0d..d40e72dac9a 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -68,7 +68,7 @@ CGAL tetrahedral Delaunay refinement algorithm. - Introduce `Face_count_stop_predicate` and `Face_count_ratio_stop_predicate` that can be used to stop the simplification algorithm based on a desired number of faces in the output, or a ratio between input and output face numbers. ### [2D Minkowski Sums](https://doc.cgal.org/5.6/Manual/packages.html#PkgMinkowskiSum2) -- Fixed a bug that mae holes in the Minkowski sum disappear +- Fixed a bug that made holes in the Minkowski sum disappear [Release 5.5](https://github.com/CGAL/cgal/releases/tag/v5.5) ----------- From e6d2d54935fae956f73311654c7ac40a5d409989 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 5 Jan 2023 22:06:19 +0200 Subject: [PATCH 329/426] leaned up --- .../Minkowski_sum_by_reduced_convolution_2.h | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h index 6ea8d300e08..40083acfc08 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h @@ -73,7 +73,7 @@ private: typename Kernel::Counterclockwise_in_between_2 f_ccw_in_between; public: - //! + //! \brief constructs. Minkowski_sum_by_reduced_convolution_2() { // Obtain kernel functors Kernel ker; @@ -85,7 +85,7 @@ public: f_ccw_in_between = ker.counterclockwise_in_between_2_object(); } - //! + //! \brief applies the Minkowski sum reduced-convolution operator. template void operator()(const Polygon_2& pgn1, const Polygon_2& pgn2, Polygon_2& outer_boundary, OutputIterator holes) const { @@ -100,16 +100,14 @@ public: common_operator(pwh1, pwh2, outer_boundary, holes); } - //! + //! \brief applies the Minkowski sum reduced-convolution operator. template void operator()(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, Polygon_2& outer_boundary, OutputIterator holes) const - { - common_operator(pgn1, pgn2, outer_boundary, holes); - } + { common_operator(pgn1, pgn2, outer_boundary, holes); } - //! + //! \brief applies the Minkowski sum reduced-convolution operator. template void operator()(const Polygon_2& pgn1, const Polygon_with_holes_2& pgn2, Polygon_2& outer_boundary, OutputIterator holes) const { @@ -120,7 +118,7 @@ public: } private: - //! + //! \brief applies the Minkowski sum reduced-convolution operator. template void common_operator(const Polygon_with_holes_2& pgn1, const Polygon_with_holes_2& pgn2, @@ -177,8 +175,9 @@ private: } } - // Builds the reduced convolution for each pair of loop in the two - // polygons-with-holes. + /*! \brief builds the reduced convolution for each pair of loops in the two + * polygons-with-holes. + */ void build_reduced_convolution(const Polygon_with_holes_2& pgnwh1, const Polygon_with_holes_2& pgnwh2, Segment_list& reduced_convolution) const { @@ -214,11 +213,12 @@ private: } } - // Builds the reduced convolution using a fiber grid approach. For each - // starting vertex, try to add two outgoing next states. If a visited - // vertex is reached, then do not explore further. This is a BFS-like - // iteration beginning from each vertex in the first column of the fiber - // grid. + /*! \brief builds the reduced convolution using a fiber grid approach. For + * each starting vertex, try to add two outgoing next states. If a visited + * vertex is reached, then do not explore further. This is a BFS-like + * iteration beginning from each vertex in the first column of the fiber + * grid. + */ void build_reduced_convolution(const Polygon_2& pgn1, const Polygon_2& pgn2, Segment_list& reduced_convolution) const { int n1 = static_cast(pgn1.size()); @@ -333,7 +333,9 @@ private: return directions; } - //! + /*! \brief determines whether three vertices on the outer CCB of a face are + * locally convex. + */ bool is_convex(const Point_2& prev, const Point_2& curr, const Point_2& next) const { return f_orientation(prev, curr, next) == LEFT_TURN; } @@ -434,7 +436,7 @@ private: return (min_q == 0) ? centroid(ear) : midpoint(v, *min_q); } - //! + //! \brief transforms a polygon with holes. template Polygon_with_holes_2 transform(const Transformation& t, const Polygon_with_holes_2& p) const { From 5532a1ad3ea6de5708997fd7d00ecfa3214ea172 Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Thu, 5 Jan 2023 22:09:20 +0200 Subject: [PATCH 330/426] Cleaned up --- .../Minkowski_sum_by_reduced_convolution_2.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h index 40083acfc08..dfa8d63bcb5 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/Minkowski_sum_by_reduced_convolution_2.h @@ -340,12 +340,12 @@ private: const Point_2& next) const { return f_orientation(prev, curr, next) == LEFT_TURN; } - // Returns the point corresponding to a state (i,j). + //! \brief obtains the point corresponding to a state (i,j). Point_2 get_point(int i1, int i2, const std::vector& pgn1, const std::vector& pgn2) const { return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2])); } - // Put the outer loop of the arrangement in 'outer_boundary' + //! \brief puts the outer loop of the arrangement in 'outer_boundary' void get_outer_loop(const Arrangement_history_2& arr, Polygon_2& outer_boundary) const { Inner_ccb_const_iterator icit = arr.unbounded_face()->inner_ccbs_begin(); @@ -356,7 +356,7 @@ private: while (--circ != circ_start); } - // Determine whether the face orientation is consistent. + //! \brief determines whether the face orientation is consistent. bool test_face_orientation(const Arrangement_history_2& arr, const Face_const_handle face) const { // The face needs to be orientable @@ -368,7 +368,7 @@ private: return true; } - // Add a face to 'holes'. + //! \brief adds a face to 'holes'. template void add_face(Face_const_handle face, OutputIterator holes) const { Polygon_2 pgn_hole; @@ -380,8 +380,9 @@ private: ++holes; } - // Check whether the convolution's original edge(s) had the same direction as - // the arrangement's half edge + /*! \brief checks whether the convolution's original edge(s) had the same + * direction as the arrangement's half edge. + */ bool do_original_edges_have_same_direction(const Arrangement_history_2& arr, Halfedge_const_handle he) const { for (auto segment_itr = arr.originating_curves_begin(he); @@ -397,7 +398,7 @@ private: return true; } - // Return a point in the face's interior by finding a diagonal + //! \brief obtains a point in the face's interior by finding a diagonal Point_2 get_point_in_face(Face_const_handle face) const { Ccb_halfedge_const_circulator next = face->outer_ccb(); Ccb_halfedge_const_circulator curr = next++; From 404cf8f0c2d7d386b81892f806a667e93f855082 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 9 Jan 2023 11:13:29 +0000 Subject: [PATCH 331/426] Projection_traits_xy_3: Enable structural filtering --- Kernel_23/include/CGAL/Projection_traits_xy_3.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kernel_23/include/CGAL/Projection_traits_xy_3.h b/Kernel_23/include/CGAL/Projection_traits_xy_3.h index e1e779f7955..301a8348df3 100644 --- a/Kernel_23/include/CGAL/Projection_traits_xy_3.h +++ b/Kernel_23/include/CGAL/Projection_traits_xy_3.h @@ -14,6 +14,7 @@ #define CGAL_PROJECTION_TRAITS_XY_3_H #include +#include namespace CGAL { @@ -22,6 +23,11 @@ class Projection_traits_xy_3 : public internal::Projection_traits_3 {}; +template < class R > +struct Triangulation_structural_filtering_traits > { + typedef typename Triangulation_structural_filtering_traits::Use_structural_filtering_tag Use_structural_filtering_tag; +}; + } //namespace CGAL #endif // CGAL_PROJECTION_TRAITS_XY_3_H From b72ea0a9d0d75c4f6371a8b99c06552c8e540442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 9 Jan 2023 17:41:14 +0100 Subject: [PATCH 332/426] add failing test --- .../CGAL/_test_cls_const_Del_triangulation_2.h | 14 +++++++++++++- .../test_const_del_triangulation_2.cpp | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_Del_triangulation_2.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_Del_triangulation_2.h index ccc193bad99..fe5d3b5a262 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_Del_triangulation_2.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_cls_const_Del_triangulation_2.h @@ -57,7 +57,6 @@ _test_cls_const_Del_triangulation(const Triangul&) typedef std::list list_constraints; CGAL_USE_TYPE(Gt); - CGAL_USE_TYPE(Segment); CGAL_USE_TYPE(Triangle); CGAL_USE_TYPE(Locate_type); @@ -81,6 +80,19 @@ _test_cls_const_Del_triangulation(const Triangul&) assert( T2.number_of_vertices() == 20); assert( T2.is_valid() ); +{ + // alternative build method + std::vector l; + for (int m=0; m<19; m++) + l.push_back(Segment(lpt[m],lpt[m+1])); + + Triangul T2_bis; + T2_bis.insert_constraints(l.begin(), l.end()); + assert( T2_bis.dimension() == 2 ); + assert( T2_bis.number_of_vertices() == 20); + assert( T2_bis.is_valid() ); +} + // test get_conflicts std:: cout << " get conflicts" << std::endl; std::list conflicts; diff --git a/Triangulation_2/test/Triangulation_2/test_const_del_triangulation_2.cpp b/Triangulation_2/test/Triangulation_2/test_const_del_triangulation_2.cpp index 0cd3828976c..a1852062240 100644 --- a/Triangulation_2/test/Triangulation_2/test_const_del_triangulation_2.cpp +++ b/Triangulation_2/test/Triangulation_2/test_const_del_triangulation_2.cpp @@ -22,6 +22,7 @@ #include +#include #include #include @@ -33,8 +34,10 @@ int main() std::cout << "Testing constrained_Delaunay_triangulation "<< std::endl; std::cout << " with No_constraint_intersection_requiring_constructions_tag : " << std::endl; typedef CGAL::Constrained_Delaunay_triangulation_2 CDt2; + typedef CGAL::Constrained_Delaunay_triangulation_2 EPECK_CDt2; _test_cls_const_Del_triangulation(CDt2()); + _test_cls_const_Del_triangulation(EPECK_CDt2()); //Testing insertion of a range of constraints std::vector points; From a7288b10a01868d7318e4d7d770a51044b7d931f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 9 Jan 2023 17:48:53 +0100 Subject: [PATCH 333/426] use deduced type as some kernel does not return references --- Triangulation_2/include/CGAL/Constrained_triangulation_2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 00490b338a8..9771534d5d3 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -305,11 +305,11 @@ public: #if 1 template - static const Point& get_source(const Segment_2& segment){ + static decltype(auto) get_source(const Segment_2& segment){ return segment.source(); } template - static const Point& get_target(const Segment_2& segment){ + static decltype(auto) get_target(const Segment_2& segment){ return segment.target(); } From 97b675d38d8b243f4f4c7ac0a7dc6ff2f5d5534f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 10 Jan 2023 08:07:28 +0000 Subject: [PATCH 334/426] When inserting a constraint give the face of the latest inserted vertex as hint for the next point --- .../include/CGAL/Constrained_Delaunay_triangulation_2.h | 4 +++- Triangulation_2/include/CGAL/Constrained_triangulation_2.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 49a13de04fe..1579bf11d16 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -269,12 +269,14 @@ public: const Point& p0 = *first; Point p = p0; Vertex_handle v0 = insert(p0), v(v0), w(v0); + Face_handle hint = v0->face(); ++first; for(; first!=last; ++first){ const Point& q = *first; if(p != q){ - w = insert(q); + w = insert(q,hint); insert_constraint(v,w); + hint = w->face(); v = w; p = q; } diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 37637b2909f..2ccb8143cd0 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -428,12 +428,14 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb, OutputIterator out) const Point& p0 = *first; Point p = p0; Vertex_handle v0 = insert(p0), v(v0), w(v0); + Face_handle hint = v0->face(); ++first; for(; first!=last; ++first){ const Point& q = *first; if(p != q){ - w = insert(q); + w = insert(q,hint); insert_constraint(v,w); + hint = w->face(); v = w; p = q; } From aba4ee0347d9f8819e35c88af78b090eddbec80d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 11 Jan 2023 09:06:38 +0000 Subject: [PATCH 335/426] Classification: Write to different files --- .../examples/Classification/example_ethz_random_forest.cpp | 2 +- .../examples/Classification/example_opencv_random_forest.cpp | 2 +- Classification/examples/Classification/gis_tutorial_example.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Classification/examples/Classification/example_ethz_random_forest.cpp b/Classification/examples/Classification/example_ethz_random_forest.cpp index 64d4688a360..a538faa3014 100644 --- a/Classification/examples/Classification/example_ethz_random_forest.cpp +++ b/Classification/examples/Classification/example_ethz_random_forest.cpp @@ -140,7 +140,7 @@ int main (int argc, char** argv) classifier.save_configuration(fconfig); // Write result - std::ofstream f ("classification.ply"); + std::ofstream f ("classification_ethz_random_forest.ply"); f.precision(18); f << pts; diff --git a/Classification/examples/Classification/example_opencv_random_forest.cpp b/Classification/examples/Classification/example_opencv_random_forest.cpp index 99fa9fb6497..e01ede689e5 100644 --- a/Classification/examples/Classification/example_opencv_random_forest.cpp +++ b/Classification/examples/Classification/example_opencv_random_forest.cpp @@ -128,7 +128,7 @@ int main (int argc, char** argv) } // Write result - std::ofstream f ("classification.ply"); + std::ofstream f ("classification_opencv_random_forest.ply"); f.precision(18); f << pts; diff --git a/Classification/examples/Classification/gis_tutorial_example.cpp b/Classification/examples/Classification/gis_tutorial_example.cpp index 7e214e481f5..7ebc50a1f30 100644 --- a/Classification/examples/Classification/gis_tutorial_example.cpp +++ b/Classification/examples/Classification/gis_tutorial_example.cpp @@ -736,7 +736,7 @@ int main (int argc, char** argv) points.range(label_map)).mean_intersection_over_union() << std::endl; // Save the classified point set - std::ofstream classified_ofile ("classified.ply"); + std::ofstream classified_ofile ("classified_gis_tutorial.ply"); CGAL::IO::set_binary_mode (classified_ofile); classified_ofile << points; classified_ofile.close(); From 6c380590951abda1178e23d1a938c713d233fdc5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 11 Jan 2023 09:52:04 +0000 Subject: [PATCH 336/426] Add debug ouput --- Classification/examples/Classification/gis_tutorial_example.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Classification/examples/Classification/gis_tutorial_example.cpp b/Classification/examples/Classification/gis_tutorial_example.cpp index 7ebc50a1f30..ae53e07cef9 100644 --- a/Classification/examples/Classification/gis_tutorial_example.cpp +++ b/Classification/examples/Classification/gis_tutorial_example.cpp @@ -657,6 +657,8 @@ int main (int argc, char** argv) for (const std::vector& poly : polylines) ctp.insert_constraint (poly.begin(), poly.end()); + std::cout << "before simplify" << std::endl; + // Simplification algorithm with limit on distance PS::simplify (ctp, PS::Squared_distance_cost(), PS::Stop_above_cost_threshold (16 * spacing * spacing)); From 9a92b93e77ce02fe4665e066fc0b0666f21051dc Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 11 Jan 2023 12:39:38 +0000 Subject: [PATCH 337/426] remove unused variable --- Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h | 1 - 1 file changed, 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h index 5b59a4b7712..fcb98812e87 100644 --- a/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h +++ b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h @@ -50,7 +50,6 @@ void compute_angles(Mesh* poly,Tester tester , double& mini, double& maxi, doubl typedef typename boost::graph_traits::face_descriptor face_descriptor; typedef typename boost::property_map::type VPMap; typedef typename CGAL::Kernel_traits< typename boost::property_traits::value_type >::Kernel Traits; - double rad_to_deg = 180. / CGAL_PI; accumulator_set< double, features< tag::min, tag::max, tag::mean > > acc; From 56a852403cc1a6a806bef018d6f23c29b5733f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 11 Jan 2023 16:54:02 +0100 Subject: [PATCH 338/426] force html output (needed with lxml greater that 4.6.5) --- .github/workflows/build_doc.yml | 6 +++--- Documentation/doc/scripts/html_output_post_processing.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 6f41cf308c4..bf879c0396c 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -47,7 +47,7 @@ jobs: //get pullrequest url const pr_number = context.payload.issue.number return pr_number - + - name: Emoji-comment uses: actions/github-script@v6 if: steps.get_round.outputs.result != 'stop' @@ -59,7 +59,7 @@ jobs: repo: context.repo.repo, content: 'rocket' }) - + - uses: actions/checkout@v3 name: "checkout branch" if: steps.get_round.outputs.result != 'stop' @@ -74,7 +74,7 @@ jobs: run: | set -x sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html - sudo pip install lxml==4.6.3 + sudo pip install lxml sudo pip install pyquery wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen sudo mv doxygen_exe /usr/bin/doxygen diff --git a/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index 82734adb98d..11b49c0378a 100755 --- a/Documentation/doc/scripts/html_output_post_processing.py +++ b/Documentation/doc/scripts/html_output_post_processing.py @@ -57,7 +57,7 @@ def write_out_html(d, fn): f.write('\n') f.write('') if d.html() is not None: - f.write(d.html()) + f.write(d.html(method='html')) f.write('\n') f.write('\n') f.close() From 4e4399b059fb4ada61f31d3e0d43d67c3834f57d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 12 Jan 2023 09:42:18 +0000 Subject: [PATCH 339/426] As the input for fairing may be rather unsmooth around the hole we set the fairing_continuity to 0 --- .../examples/Classification/gis_tutorial_example.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Classification/examples/Classification/gis_tutorial_example.cpp b/Classification/examples/Classification/gis_tutorial_example.cpp index ae53e07cef9..40ce226259b 100644 --- a/Classification/examples/Classification/gis_tutorial_example.cpp +++ b/Classification/examples/Classification/gis_tutorial_example.cpp @@ -474,7 +474,8 @@ int main (int argc, char** argv) for (Mesh::Halfedge_index hi : holes) if (hi != outer_hull) CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole - (dtm_mesh, hi, CGAL::Emptyset_iterator(), CGAL::Emptyset_iterator()); + (dtm_mesh, hi, CGAL::Emptyset_iterator(), CGAL::Emptyset_iterator(), + CGAL::parameters::fairing_continuity(0)); // Save DTM with holes filled std::ofstream dtm_filled_ofile ("dtm_filled.ply", std::ios_base::binary); @@ -657,8 +658,6 @@ int main (int argc, char** argv) for (const std::vector& poly : polylines) ctp.insert_constraint (poly.begin(), poly.end()); - std::cout << "before simplify" << std::endl; - // Simplification algorithm with limit on distance PS::simplify (ctp, PS::Squared_distance_cost(), PS::Stop_above_cost_threshold (16 * spacing * spacing)); @@ -738,7 +737,7 @@ int main (int argc, char** argv) points.range(label_map)).mean_intersection_over_union() << std::endl; // Save the classified point set - std::ofstream classified_ofile ("classified_gis_tutorial.ply"); + std::ofstream classified_ofile ("classification_gis_tutorial.ply"); CGAL::IO::set_binary_mode (classified_ofile); classified_ofile << points; classified_ofile.close(); From c8b8792275e133ffe6e3b564bd8f2fbb3c02eb1e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 12 Jan 2023 17:01:19 +0000 Subject: [PATCH 340/426] PMP: Guarantee that the longest_border() halfedge is among extract_boundary_cycles() --- .../CGAL/Polygon_mesh_processing/measure.h | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 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 2340993b99d..c09eec30dcf 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -24,6 +24,7 @@ #include #include +#include #include // needed for CGAL::exact(FT)/CGAL::exact(Lazy_exact_nt) @@ -31,6 +32,7 @@ #include #include +#include #include #include #include @@ -308,6 +310,7 @@ face_border_length(typename boost::graph_traits::halfedge_descripto * - `first`: a halfedge on the longest border. * The return type `halfedge_descriptor` is a halfedge descriptor. It is * deduced from the graph traits corresponding to the type `PolygonMesh`. + * `first` and it is among the halfedges reported by `extract_boundary_cycles()`. * - `second`: the length of the longest border * The return type `FT` is a number type either deduced from the `geom_traits` * \ref bgl_namedparameters "Named Parameters" if provided, @@ -318,6 +321,7 @@ face_border_length(typename boost::graph_traits::halfedge_descripto * will be performed approximately. * * @see `face_border_length()` + * @see `extract_boundary_cycles()` */ template @@ -334,29 +338,22 @@ longest_border(const PolygonMesh& pmesh, typename property_map_value::type>::Kernel::FT FT; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - std::unordered_set visited; + std::deque boundary_cycles; + extract_boundary_cycles(pmesh, std::back_inserter(boundary_cycles)); halfedge_descriptor result_halfedge = boost::graph_traits::null_halfedge(); FT result_len = 0; - for(halfedge_descriptor h : halfedges(pmesh)) + for(halfedge_descriptor h : boundary_cycles) { - if(visited.find(h)== visited.end()) - { - if(is_border(h, pmesh)) + FT len = 0; + for(halfedge_descriptor haf : halfedges_around_face(h, pmesh)) { - FT len = 0; - for(halfedge_descriptor haf : halfedges_around_face(h, pmesh)) - { - len += edge_length(haf, pmesh, np); - visited.insert(haf); - } - - if(result_len < len) - { - result_len = len; - result_halfedge = h; - } + len += edge_length(haf, pmesh, np); + } + if(result_len < len) + { + result_len = len; + result_halfedge = h; } - } } return std::make_pair(result_halfedge, result_len); } From 7305e1bb387b65ab80815a8cb6ec807ca48f9fad Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 12 Jan 2023 17:29:30 +0000 Subject: [PATCH 341/426] Fix typo (thank you Albert) --- .../include/CGAL/Polygon_mesh_processing/measure.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c09eec30dcf..b57eb0f7c96 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -310,7 +310,7 @@ face_border_length(typename boost::graph_traits::halfedge_descripto * - `first`: a halfedge on the longest border. * The return type `halfedge_descriptor` is a halfedge descriptor. It is * deduced from the graph traits corresponding to the type `PolygonMesh`. - * `first` and it is among the halfedges reported by `extract_boundary_cycles()`. + * `first` is among the halfedges reported by `extract_boundary_cycles()`. * - `second`: the length of the longest border * The return type `FT` is a number type either deduced from the `geom_traits` * \ref bgl_namedparameters "Named Parameters" if provided, From 892f53e6be3089e15e220f54d48cfc9da566ccf4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 12 Jan 2023 19:02:02 +0100 Subject: [PATCH 342/426] Update Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp --- .../test_edge_collapse_Polyhedron_3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp index 6218df2e8e6..e1b27a66d55 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp @@ -487,7 +487,7 @@ int main(int argc, char** argv) } cout << endl - << lOK << " cases suceceded." << endl + << lOK << " cases succeeded." << endl << (lCases.size() - lOK) << " cases failed." << endl; return lOK == lCases.size() ? 0 : 1; From 03bd5302f80ebd3a6dae32189503736427f4f989 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 13 Jan 2023 08:13:20 +0000 Subject: [PATCH 343/426] Print the result --- .../test_reconstruction_until.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Optimal_transportation_reconstruction_2/test/Optimal_transportation_reconstruction_2/test_reconstruction_until.cpp b/Optimal_transportation_reconstruction_2/test/Optimal_transportation_reconstruction_2/test_reconstruction_until.cpp index 841e782301c..39e3d45d391 100644 --- a/Optimal_transportation_reconstruction_2/test/Optimal_transportation_reconstruction_2/test_reconstruction_until.cpp +++ b/Optimal_transportation_reconstruction_2/test/Optimal_transportation_reconstruction_2/test_reconstruction_until.cpp @@ -17,7 +17,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 Point; typedef K::FT FT; -typedef K::Segment_2 Segment; +typedef K::Segment_2 Segment; int main () { @@ -37,8 +37,14 @@ int main () std::back_inserter(isolated_points), std::back_inserter(edges)); std::cout << "Isolated_points: " << isolated_points.size() << std::endl; - std::cout << "Edges: " << edges.size() << std::endl; + for(Point p : isolated_points){ + std::cout << p << std::endl; + } + std::cout << "Edges: " << edges.size() << std::endl; + for(Segment s : edges){ + std::cout << s << std::endl; + } assert(isolated_points.size() == 0); assert(edges.size() == 8); } From 8c0d5bd59bd858e58db6e1983f5222221edb7665 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 13 Jan 2023 10:48:28 +0000 Subject: [PATCH 344/426] Largest_empty_iso_rectangle: Improve Demo --- .../Largest_empty_rectangle_2.cpp | 48 ++++++++++++++++++- .../Largest_empty_rectangle_2.ui | 8 +++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp index 012ef71d3e5..67e4f336075 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp +++ b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp @@ -98,6 +98,8 @@ public Q_SLOTS: void on_actionClear_triggered(); + void on_actionOpen_triggered(); + void processInput(CGAL::Object); void on_actionRecenter_triggered(); @@ -105,7 +107,7 @@ public Q_SLOTS: void on_actionGeneratePointsInSquare_triggered(); void on_actionGeneratePointsInDisc_triggered(); void clear(); - + void open(QString fileName); void update_largest_empty_rectangle(); Q_SIGNALS: @@ -229,6 +231,50 @@ MainWindow::on_actionClear_triggered() Q_EMIT( changed()); } +void +MainWindow::on_actionOpen_triggered() +{ + QString fileName = QFileDialog::getOpenFileName(this, + tr("Open points file"), + "." + ,tr("xy files (*.xy)") + ); + if(! fileName.isEmpty()){ + open(fileName); + } + +} + +void +MainWindow::open(QString fileName) +{ + // wait cursor + QApplication::setOverrideCursor(Qt::WaitCursor); + std::ifstream ifs(qPrintable(fileName)); + + clear(); + + Point_2 p; + while(ifs >> p){ + points.push_back(p); + } + + CGAL::Bbox_2 bbox = CGAL::bbox_2(points.begin(), points.end()); + square = Iso_rectangle_2(bbox); + + ler = Largest_empty_iso_rectangle_2(square); + ler.insert(points.begin(), points.end()); + + frame[0]->setLine(convert(Segment_2(square.vertex(0),square.vertex(1)))); + frame[1]->setLine(convert(Segment_2(square.vertex(1), square.vertex(2)))); + frame[2]->setLine(convert(Segment_2(square.vertex(2), square.vertex(3)))); + frame[3]->setLine(convert(Segment_2(square.vertex(3), square.vertex(0)))); + + QApplication::restoreOverrideCursor(); + on_actionRecenter_triggered(); + Q_EMIT( changed()); +} + void MainWindow::on_actionRecenter_triggered() { diff --git a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui index 19c46f07374..a6ddf170ca2 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui +++ b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui @@ -80,7 +80,7 @@ 0 0 500 - 26 + 22 @@ -90,6 +90,7 @@ + @@ -199,6 +200,11 @@ Generate Segment Fans + + + Open + + From 9c2f8ff60e0fd2a194533b56d38b0dba17533151 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 13 Jan 2023 18:51:28 +0100 Subject: [PATCH 345/426] Spelling correction in respect to function / variable names As indicated in #7041 (Spelling corrections) theer were still some open corrections in respect to variables / functions, these have been addressed heer. --- .../CGAL/Arr_point_location/Td_X_trapezoid.h | 9 ++- .../CGAL/Arr_point_location/Td_active_edge.h | 6 +- .../Arr_point_location/Td_active_trapezoid.h | 9 ++- .../Trapezoidal_decomposition_2_impl.h | 24 +++--- .../gfx/Curve_renderer_2.h | 23 ++++-- .../Jet_fitting_3/PolyhedralSurf_rings.h | 24 ++++-- .../include/CGAL/Polyhedral_envelope.h | 31 +++---- .../examples/Ridges_3/PolyhedralSurf_rings.h | 16 +++- Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h | 18 ++++- .../Spatial_searching/include/nanoflann.hpp | 6 +- .../CGAL/Incremental_neighbor_search.h | 67 ++++++++-------- .../Orthogonal_incremental_neighbor_search.h | 80 ++++++++++--------- .../internal/K_neighbor_search.h | 4 +- .../Surface_sweep_2/No_overlap_event_base.h | 6 +- .../Surface_sweep_2/Surface_sweep_2_impl.h | 2 +- 15 files changed, 197 insertions(+), 128 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h index c81fafaaeac..169864e1de1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_X_trapezoid.h @@ -153,14 +153,19 @@ public: Dag_node* m_dag_node; //pointer to the search structure (DAG) node /*! Initialize the trapezoid's neighbors. */ - CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0, - Self* rb_ = 0, Self* rt_ = 0) + CGAL_TD_INLINE void init_neighbors(Self* lb_ = 0, Self* lt_ = 0, + Self* rb_ = 0, Self* rt_ = 0) { set_lb(lb_); set_lt(lt_); set_rb(rb_); set_rt(rt_); } + /*! \copydoc init_neighbors + * \deprecated please use #init_neighbors */ + CGAL_DEPRECATED CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0, + Self* rb_ = 0, Self* rt_ = 0) + { init_neighbors(lb_, lt_, rb_, rt_); } /*! Set the DAG node. */ CGAL_TD_INLINE void set_dag_node(Dag_node* p) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h index 2f400786e75..f901bb72565 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_edge.h @@ -145,10 +145,14 @@ public: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node /*! Initialize the trapezoid's neighbors. */ - inline void init_neighbours(boost::optional next) + inline void init_neighbors(boost::optional next) { set_next((next) ? *next : Td_map_item(0)); } + /*! \copydoc init_neighbors + * \deprecated please use #init_neighbors */ + CGAL_DEPRECATED inline void init_neighbours(boost::optional next) + { init_neighbors(next); } /*! Set the DAG node. */ CGAL_TD_INLINE void set_dag_node(Dag_node* p) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h index 84ba82d4fff..06b384daed9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_trapezoid.h @@ -163,14 +163,19 @@ private: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node /*! Initialize the trapezoid's neighbors. */ - inline void init_neighbours(boost::optional lb, boost::optional lt, - boost::optional rb, boost::optional rt) + inline void init_neighbors(boost::optional lb, boost::optional lt, + boost::optional rb, boost::optional rt) { set_lb((lb) ? *lb : Td_map_item(0)); set_lt((lt) ? *lt : Td_map_item(0)); set_rb((rb) ? *rb : Td_map_item(0)); set_rt((rt) ? *rt : Td_map_item(0)); } + /*! \copydoc init_neighbors + * \deprecated please use #init_neighbors */ + CGAL_DEPRECATED inline void init_neighbours(boost::optional lb, boost::optional lt, + boost::optional rb, boost::optional rt) + { init_neighbors(lb, lt, rb, rt); } /*! Set the DAG node. */ inline void set_dag_node(Dag_node* p) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h index e7d8ae645f6..15c72e81945 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Trapezoidal_decomposition_2_impl.h @@ -72,10 +72,10 @@ split_trapezoid_by_vertex(Dag_node& split_node, CGAL_warning(left_tr.is_on_left_boundary() == tr.is_on_left_boundary()); CGAL_warning(right_tr.is_on_right_boundary() == tr.is_on_right_boundary()); - left_tr.init_neighbours(tr.lb(), tr.lt(), - right_node.get_data(), right_node.get_data()); - right_tr.init_neighbours(left_node.get_data(), left_node.get_data(), - tr.rb(), tr.rt()); + left_tr.init_neighbors(tr.lb(), tr.lt(), + right_node.get_data(), right_node.get_data()); + right_tr.init_neighbors(left_node.get_data(), left_node.get_data(), + tr.rb(), tr.rt()); if (!traits->is_empty_item(tr.lb())) { Td_active_trapezoid& lb(boost::get(tr.lb())); lb.set_rb(left_node.get_data()); @@ -109,10 +109,10 @@ split_trapezoid_by_vertex(Dag_node& split_node, //CGAL_warning(left_e.is_on_left_boundary() == e.is_on_left_boundary()); //CGAL_warning(right_e.is_on_right_boundary() == e.is_on_right_boundary()); - left_e.init_neighbours(boost::none); - //left_e.init_neighbours(e.lb(),e.lt(),Td_map_item(),right_node.get_data()); - right_e.init_neighbours(e.next()); - //right_e.init_neighbours(left_node.get_data(),left_node.get_data(),e.rb(),e.rt()); + left_e.init_neighbors(boost::none); + //left_e.init_neighbors(e.lb(),e.lt(),Td_map_item(),right_node.get_data()); + right_e.init_neighbors(e.next()); + //right_e.init_neighbors(left_node.get_data(),left_node.get_data(),e.rb(),e.rt()); } // left and right are set to the point itself, @@ -307,8 +307,8 @@ split_trapezoid_by_halfedge(Dag_node& split_node, Td_active_trapezoid& top = boost::get(top_node.get_data()); - top.init_neighbours(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt()); - bottom.init_neighbours(split_tr.lb(), prev_bottom_tr, split_tr.rb(), + top.init_neighbors(prev_top_tr, split_tr.lt(), boost::none , split_tr.rt()); + bottom.init_neighbors(split_tr.lb(), prev_bottom_tr, split_tr.rb(), boost::none); if (!traits->is_empty_item(prev_bottom_tr)) { @@ -2340,7 +2340,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // } // else // new_left_t is leftmost representative for he // { -// //set_neighbours_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing +// //set_neighbors_after_split_halfedge_update (new_left_t, t1, he1, he2); //MICHAL: this method does nothing // } // if (t1.rt()==&old_t) t1.set_rt(&new_left_t); // if (t1.lb()==&old_t) t1.set_lb(&new_left_t); @@ -2366,7 +2366,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt, // } // else // new_right_t is rightmost representative for te // { -// //set_neighbours_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing +// //set_neighbors_after_split_halfedge_update (new_right_t,t2,he1, he2,false); //MICHAL: this method does nothing // } // if (t2.rt()==&old_t) t2.set_rt(&new_right_t); // if (t2.lb()==&old_t) t2.set_lb(&new_right_t); diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h index 1d74799b4a3..2868190872b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h @@ -1065,7 +1065,7 @@ void draw_lump(std::vector< Coord_2 >& rev_points, int& last_x, if(set_ready) ready = true; - if(!test_neighbourhood(pix, back_dir, new_dir)) { + if(!test_neighborhood(pix, back_dir, new_dir)) { ux = pix.x; uy = pix.y; if(witness == pix) { // witness subpixel is a pixel itself @@ -1095,7 +1095,7 @@ void draw_lump(std::vector< Coord_2 >& rev_points, int& last_x, stored_prev = prev_pix; } - if(!test_neighbourhood(pix, back_dir, new_dir)) { + if(!test_neighborhood(pix, back_dir, new_dir)) { if(stored_dir != -1) { pix = stored_pix; prev_pix = stored_prev; @@ -1257,7 +1257,7 @@ bool subdivide(Pixel_2& pix, int back_dir, int& new_dir) { pix.sub_y = (pix.sub_y<<1) + (idx>>1); //Gfx_DETAILED_OUT("subpixel index: " << idx << " (" << pix.sub_x << "; " // << pix.sub_y << ")" << std::endl); - if(!test_neighbourhood(pix, back_dir, new_dir)) + if(!test_neighborhood(pix, back_dir, new_dir)) return subdivide(pix,back_dir,new_dir); //Gfx_DETAILED_OUT("new direction found: " << new_dir << " at a pixel:" << //pix << std::endl); @@ -1313,7 +1313,7 @@ bool get_seed_point(const Rational& seed, Pixel_2& start, int *dir, << start.level << std::endl; throw internal::Insufficient_rasterize_precision_exception(); } - //dump_neighbourhood(start); + //dump_neighborhood(start); if(limit(engine.pixel_w/NT(lvl))||limit(engine.pixel_h/NT(lvl))) { std::cerr << "get_seed_point: too small subpixel size: " << @@ -1425,7 +1425,7 @@ bool test_pixel(const Pixel_2& pix, int *dir, int *b_taken, bool& b_coincide) /* Gfx_OUT("test pixel: " << pix << "--------------------------------\n"); - dump_neighbourhood(pix); + dump_neighborhood(pix); Gfx_OUT("----------------------------------------------\n\n");*/ b_coincide = false; @@ -1913,7 +1913,7 @@ inline void get_polynomials(int var, Stripe& stripe) { * if \c CGAL_CKVA_RENDER_WITH_REFINEMENT is set, in case of success \c pix * receives double approximations of intersection point */ -bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir) +bool test_neighborhood(Pixel_2& pix, int dir, int& new_dir) { NT lvl = NT(one << pix.level); NT inv = NT(1.0) / lvl; @@ -2258,6 +2258,11 @@ Lexit: pix.yv = CGAL::to_double(engine.y_min + y*engine.pixel_h); return ret; } +/*! \copydoc test_neighborhood + * \deprecated please use #test_neighborhood */ +CGAL_DEPRECATED bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir) +{ return test_neighborhood(pix, new_dir)' } + #endif // CGAL_CKVA_RENDER_WITH_REFINEMENT //! \brief returns whether a polynomial has zero over an interval, @@ -2585,7 +2590,7 @@ inline bool is_isolated_pixel(const Pixel_2& /* pix */) { // DEBUG ONLY #ifdef Gfx_USE_OUT -void dump_neighbourhood(const Pixel_2& pix) { +void dump_neighborhood(const Pixel_2& pix) { CGAL::IO::set_mode(std::cerr, CGAL::IO::PRETTY); CGAL::IO::set_mode(std::cout, CGAL::IO::PRETTY); @@ -2764,8 +2769,10 @@ void dump_neighbourhood(const Pixel_2& pix) { Gfx_OUT("sign change at segment 2" << std::endl); } #else -void dump_neighbourhood(const Pixel_2&) { } +void dump_neighborhood(const Pixel_2&) { } #endif // Gfx_USE_OUT +CGAL_DEPRECATED void dump_neighbourhood(const Pixel_2& pix) +{ dump_neighborhood(pix); } //!@} }; // class Curve_renderer_2<> diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h index 6690a0874fa..c634ae24c2e 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h @@ -25,7 +25,11 @@ protected: //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors //of start in the nextRing and set indices to i. Also add these vertices in all. - static void push_neighbours_of(Vertex * start, int ith, + static void push_neighbors_of(Vertex * start, int ith, + std::vector < Vertex * >&nextRing, + std::vector < Vertex * >&all, + VertexPropertyMap& vpm); + CGAL_DEPRECATED static void push_neighbours_of(Vertex * start, int ith, std::vector < Vertex * >&nextRing, std::vector < Vertex * >&all, VertexPropertyMap& vpm); @@ -58,10 +62,10 @@ protected: template < class TPoly , class VertexPropertyMap> void T_PolyhedralSurf_rings :: -push_neighbours_of(Vertex * start, int ith, - std::vector < Vertex * >&nextRing, - std::vector < Vertex * >&all, - VertexPropertyMap& vpm) +push_neighbors_of(Vertex * start, int ith, + std::vector < Vertex * >&nextRing, + std::vector < Vertex * >&all, + VertexPropertyMap& vpm) { Vertex *v; Halfedge_around_vertex_circulator @@ -78,6 +82,14 @@ push_neighbours_of(Vertex * start, int ith, } } +CGAL_DEPRECATED template < class TPoly , class VertexPropertyMap> +void T_PolyhedralSurf_rings :: +push_neighbours_of(Vertex * start, int ith, + std::vector < Vertex * >&nextRing, + std::vector < Vertex * >&all, + VertexPropertyMap& vpm) +{ push_neighbors_of(start, ith, nextRing, all, vpm); } + template void T_PolyhedralSurf_rings :: collect_ith_ring(int ith, std::vector < Vertex * >¤tRing, @@ -88,7 +100,7 @@ collect_ith_ring(int ith, std::vector < Vertex * >¤tRing, typename std::vector < Vertex * >::iterator itb = currentRing.begin(), ite = currentRing.end(); - CGAL_For_all(itb, ite) push_neighbours_of(*itb, ith, nextRing, all, vpm); + CGAL_For_all(itb, ite) push_neighbors_of(*itb, ith, nextRing, all, vpm); } template diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index f5faa7b08d7..4cba21b75e4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -1032,7 +1032,7 @@ private: bool - is_two_facets_neighbouring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const + is_two_facets_neighboring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const { std::size_t facesize = halfspace[pid].size(); if (i == j) return false; @@ -1046,6 +1046,9 @@ private: if (j == 2 && i == facesize - 1) return true; return false; } + CGAL_DEPRECATED bool + is_two_facets_neighbouring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const + { is_two_facets_neighboring(pid, i, j); } int @@ -1187,7 +1190,7 @@ private: continue; if (true /* USE_ADJACENT_INFORMATION*/ ) { - bool neib = is_two_facets_neighbouring(cindex, cutp[i], cutp[j]); + bool neib = is_two_facets_neighboring(cindex, cutp[i], cutp[j]); if (neib == false) continue; } @@ -1295,7 +1298,7 @@ private: const int &prismid, const unsigned int &faceid)const { for (unsigned int i = 0; i < halfspace[prismid].size(); i++) { - /*bool neib = is_two_facets_neighbouring(prismid, i, faceid);// this works only when the polyhedron is convex and no two neighbor facets are coplanar + /*bool neib = is_two_facets_neighboring(prismid, i, faceid);// this works only when the polyhedron is convex and no two neighbor facets are coplanar if (neib == false) continue;*/ if (i == faceid) continue; if(oriented_side(halfspace[prismid][i].eplane, ip) == ON_POSITIVE_SIDE){ @@ -1722,11 +1725,11 @@ private: idlist.emplace_back(filtered_intersection[queue[0]]);// idlist contains the id in prismid//it is fine maybe it is not really intersected coverlist[queue[0]] = 1 ;//when filtered_intersection[i] is already in the cover list, coverlist[i]=true - std::vector neighbours;//local id + std::vector neighbors;//local id std::vector list; - std::vector*> neighbour_facets; + std::vector*> neighbor_facets; std::vector> idlistorder; - std::vector neighbour_cover; + std::vector neighbor_cover; idlistorder.emplace_back(intersect_face[queue[0]]); for (unsigned int i = 0; i < queue.size(); i++) { @@ -1810,14 +1813,14 @@ private: localtree.all_intersected_primitives(bounding_boxes[jump1], std::back_inserter(list)); - neighbours.resize(list.size()); - neighbour_facets.resize(list.size()); - neighbour_cover.resize(list.size()); + neighbors.resize(list.size()); + neighbor_facets.resize(list.size()); + neighbor_cover.resize(list.size()); for (unsigned int j = 0; j < list.size(); j++) { - neighbours[j] = filtered_intersection[list[j]]; - neighbour_facets[j] = &(intersect_face[list[j]]); - if (coverlist[list[j]] == 1) neighbour_cover[j] = 1; - else neighbour_cover[j] = 0; + neighbors[j] = filtered_intersection[list[j]]; + neighbor_facets[j] = &(intersect_face[list[j]]); + if (coverlist[list[j]] == 1) neighbor_cover[j] = 1; + else neighbor_cover[j] = 0; } for (unsigned int j = 0; j < i; j++) { @@ -1864,7 +1867,7 @@ private: if (inter == 1) { - inter = Implicit_Tri_Facet_Facet_interpoint_Out_Prism_return_local_id_with_face_order_jump_over(ip, neighbours, neighbour_facets, neighbour_cover, jump1, jump2, check_id); + inter = Implicit_Tri_Facet_Facet_interpoint_Out_Prism_return_local_id_with_face_order_jump_over(ip, neighbors, neighbor_facets, neighbor_cover, jump1, jump2, check_id); if (inter == 1) { diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index f512f71cd9d..6fc343b3f6d 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -30,7 +30,10 @@ protected: //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors //of start in the nextRing and set indices to i. Also add these vertices in all. - void push_neighbours_of(const Vertex_const_handle start, const int ith, + void push_neighbors_of(const Vertex_const_handle start, const int ith, + std::vector < Vertex_const_handle > &nextRing, + std::vector < Vertex_const_handle > &all); + CGAL_DEPRECATED void push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); @@ -70,7 +73,7 @@ T_PolyhedralSurf_rings(const TPoly& P) template < class TPoly > void T_PolyhedralSurf_rings :: -push_neighbours_of(const Vertex_const_handle start, const int ith, +push_neighbors_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all) { @@ -89,6 +92,13 @@ push_neighbours_of(const Vertex_const_handle start, const int ith, } } +CGAL_DEPRECATED template < class TPoly > +void T_PolyhedralSurf_rings :: +push_neighbours_of(const Vertex_const_handle start, const int ith, + std::vector < Vertex_const_handle > &nextRing, + std::vector < Vertex_const_handle > &all) +{ push_neighbors_of(start, ith, nextRing, all); } + template void T_PolyhedralSurf_rings :: collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing, @@ -98,7 +108,7 @@ collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing typename std::vector < Vertex_const_handle >::const_iterator itb = currentRing.begin(), ite = currentRing.end(); - CGAL_For_all(itb, ite) push_neighbours_of(*itb, ith, nextRing, all); + CGAL_For_all(itb, ite) push_neighbors_of(*itb, ith, nextRing, all); } template diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h index 9cea6526bb8..6fc343b3f6d 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h @@ -30,7 +30,10 @@ protected: //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors //of start in the nextRing and set indices to i. Also add these vertices in all. - void push_neighbours_of(const Vertex_const_handle start, const int ith, + void push_neighbors_of(const Vertex_const_handle start, const int ith, + std::vector < Vertex_const_handle > &nextRing, + std::vector < Vertex_const_handle > &all); + CGAL_DEPRECATED void push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); @@ -44,7 +47,7 @@ protected: public: T_PolyhedralSurf_rings(const TPoly& P); - //collect i>=1 rings : all neighbours up to the ith ring, + //collect i>=1 rings : all neighbors up to the ith ring, void collect_i_rings(const Vertex_const_handle v, const int ring_i, std::vector < Vertex_const_handle >& all); @@ -70,7 +73,7 @@ T_PolyhedralSurf_rings(const TPoly& P) template < class TPoly > void T_PolyhedralSurf_rings :: -push_neighbours_of(const Vertex_const_handle start, const int ith, +push_neighbors_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all) { @@ -89,6 +92,13 @@ push_neighbours_of(const Vertex_const_handle start, const int ith, } } +CGAL_DEPRECATED template < class TPoly > +void T_PolyhedralSurf_rings :: +push_neighbours_of(const Vertex_const_handle start, const int ith, + std::vector < Vertex_const_handle > &nextRing, + std::vector < Vertex_const_handle > &all) +{ push_neighbors_of(start, ith, nextRing, all); } + template void T_PolyhedralSurf_rings :: collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing, @@ -98,7 +108,7 @@ collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing typename std::vector < Vertex_const_handle >::const_iterator itb = currentRing.begin(), ite = currentRing.end(); - CGAL_For_all(itb, ite) push_neighbours_of(*itb, ith, nextRing, all); + CGAL_For_all(itb, ite) push_neighbors_of(*itb, ith, nextRing, all); } template diff --git a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp index 03664cace1b..3dd0b399892 100644 --- a/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp +++ b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp @@ -413,8 +413,8 @@ namespace nanoflann checks(checks_IGNORED_), eps(eps_), sorted(sorted_) {} int checks; //!< Ignored parameter (Kept for compatibility with the FLANN interface). - float eps; //!< search for eps-approximate neighbours (default: 0) - bool sorted; //!< only for radius search, require neighbours sorted by distance (default: true) + float eps; //!< search for eps-approximate neighbors (default: 0) + bool sorted; //!< only for radius search, require neighbors sorted by distance (default: true) }; /** @} */ @@ -823,7 +823,7 @@ namespace nanoflann }; /** - * Array of k-d trees used to find neighbours. + * Array of k-d trees used to find neighbors. */ NodePtr root_node; typedef BranchStruct BranchSt; diff --git a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h index eb329488266..6d03e5e3767 100644 --- a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h @@ -264,7 +264,7 @@ namespace CGAL { FT distance_to_root; - bool search_nearest_neighbour; + bool search_nearest_neighbor; FT rd; @@ -278,8 +278,8 @@ namespace CGAL { bool search_nearest; - Priority_higher(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Priority_higher(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -296,8 +296,8 @@ namespace CGAL { bool search_nearest; - Distance_smaller(bool search_the_nearest_neighbour) - :search_nearest(search_the_nearest_neighbour) + Distance_smaller(bool search_the_nearest_neighbor) + :search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -325,19 +325,19 @@ namespace CGAL { int number_of_internal_nodes_visited; int number_of_leaf_nodes_visited; int number_of_items_visited; - int number_of_neighbours_computed; + int number_of_neighbors_computed; // constructor Iterator_implementation(const Tree& tree, const Query_item& q,const Distance& tr, FT Eps, bool search_nearest) - : query_point(q), search_nearest_neighbour(search_nearest), + : query_point(q), search_nearest_neighbor(search_nearest), m_distance_helper(tr, tree.traits()), m_tree(tree), PriorityQueue(Priority_higher(search_nearest)), Item_PriorityQueue(Distance_smaller(search_nearest)), distance(tr), reference_count(1), number_of_internal_nodes_visited(0), number_of_leaf_nodes_visited(0), number_of_items_visited(0), - number_of_neighbours_computed(0) + number_of_neighbors_computed(0) { if (tree.empty()) return; @@ -365,7 +365,7 @@ namespace CGAL { // rd is the distance of the top of the priority queue to q rd=The_Root->second; - Compute_the_next_nearest_neighbour(); + Compute_the_next_nearest_neighbor(); } // * operator @@ -380,7 +380,7 @@ namespace CGAL { operator++() { Delete_the_current_item_top(); - Compute_the_next_nearest_neighbour(); + Compute_the_next_nearest_neighbor(); return *this; } @@ -405,7 +405,7 @@ namespace CGAL { s << "Number of points visited:" << number_of_items_visited << std::endl; s << "Number of neighbors computed:" << - number_of_neighbours_computed << std::endl; + number_of_neighbors_computed << std::endl; return s; } @@ -459,21 +459,21 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = PriorityQueue.top()->second; - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found = true; + next_neighbor_found = true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } // Without cache @@ -494,37 +494,37 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = PriorityQueue.top()->second; - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found = true; + next_neighbor_found = true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } void - Compute_the_next_nearest_neighbour() + Compute_the_next_nearest_neighbor() { // compute the next item - bool next_neighbour_found=false; + bool next_neighbor_found=false; if (!(Item_PriorityQueue.empty())) { - if (search_nearest_neighbour) - next_neighbour_found = + if (search_nearest_neighbor) + next_neighbor_found = (multiplication_factor*rd > Item_PriorityQueue.top()->second); else - next_neighbour_found = + next_neighbor_found = (rd < multiplication_factor*Item_PriorityQueue.top()->second); } - while ((!next_neighbour_found) && (!PriorityQueue.empty())) { + while ((!next_neighbor_found) && (!PriorityQueue.empty())) { Cell_with_distance* The_node_top = PriorityQueue.top(); Node_const_handle N = The_node_top->first->node(); @@ -544,7 +544,7 @@ namespace CGAL { Node_box* upper_box = new Node_box(*B); lower_box->split(*upper_box,new_cut_dim, new_cut_val); delete B; - if (search_nearest_neighbour) { + if (search_nearest_neighbor) { FT distance_to_box_lower = distance.min_distance_to_rectangle(query_point, *lower_box); FT distance_to_box_upper = @@ -597,12 +597,15 @@ namespace CGAL { number_of_leaf_nodes_visited++; if (node->size() > 0) { typename internal::Has_points_cache::type::value>::type dummy; - next_neighbour_found = search_in_leaf(node, dummy, !search_nearest_neighbour); + next_neighbor_found = search_in_leaf(node, dummy, !search_nearest_neighbor); } - } // next_neighbour_found or priority queue is empty + } // next_neighbor_found or priority queue is empty // in the latter case also the item priority queue is empty } + + CGAL_DEPRECATED void Compute_the_next_nearest_neighbour() + { void Compute_the_next_nearest_neighbor(); } }; // class Iterator_implementation }; // class iterator }; // class diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index 549e904c8ab..bd16e628724 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -65,7 +65,7 @@ namespace CGAL { SearchTraits traits; public: - int number_of_neighbours_computed; + int number_of_neighbors_computed; int number_of_internal_nodes_visited; int number_of_leaf_nodes_visited; int number_of_items_visited; @@ -85,7 +85,7 @@ namespace CGAL { FT distance_to_root; - bool search_nearest_neighbour; + bool search_nearest_neighbor; FT rd; @@ -97,8 +97,8 @@ namespace CGAL { bool search_nearest; - Priority_higher(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Priority_higher(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -115,8 +115,8 @@ namespace CGAL { bool search_nearest; - Distance_smaller(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Distance_smaller(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} //highest priority is smallest distance @@ -144,12 +144,12 @@ namespace CGAL { // constructor Iterator_implementation(const Tree& tree,const Query_item& q, const Distance& tr, FT Eps=FT(0.0), bool search_nearest=true) - : traits(tree.traits()),number_of_neighbours_computed(0), number_of_internal_nodes_visited(0), + : traits(tree.traits()),number_of_neighbors_computed(0), number_of_internal_nodes_visited(0), number_of_leaf_nodes_visited(0), number_of_items_visited(0), orthogonal_distance_instance(tr), m_distance_helper(orthogonal_distance_instance, traits), multiplication_factor(orthogonal_distance_instance.transformed_distance(FT(1.0)+Eps)), - query_point(q), search_nearest_neighbour(search_nearest), + query_point(q), search_nearest_neighbor(search_nearest), m_tree(tree), PriorityQueue(Priority_higher(search_nearest)), Item_PriorityQueue(Distance_smaller(search_nearest)), reference_count(1) @@ -175,7 +175,7 @@ namespace CGAL { // rd is the distance of the top of the priority queue to q rd=std::get<1>(*The_Root); - Compute_the_next_nearest_neighbour(); + Compute_the_next_nearest_neighbor(); } else{ distance_to_root= @@ -187,7 +187,7 @@ namespace CGAL { // rd is the distance of the top of the priority queue to q rd=std::get<1>(*The_Root); - Compute_the_next_furthest_neighbour(); + Compute_the_next_furthest_neighbor(); } @@ -205,10 +205,10 @@ namespace CGAL { operator++() { Delete_the_current_item_top(); - if(search_nearest_neighbour) - Compute_the_next_nearest_neighbour(); + if(search_nearest_neighbor) + Compute_the_next_nearest_neighbor(); else - Compute_the_next_furthest_neighbour(); + Compute_the_next_furthest_neighbor(); return *this; } @@ -233,7 +233,7 @@ namespace CGAL { s << "Number of items visited:" << number_of_items_visited << std::endl; s << "Number of neighbors computed:" - << number_of_neighbours_computed << std::endl; + << number_of_neighbors_computed << std::endl; return s; } @@ -287,21 +287,21 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = std::get<1>(*PriorityQueue.top()); - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } else // priority queue empty => last neighbor found { - next_neighbour_found = true; + next_neighbor_found = true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } // Without cache @@ -322,37 +322,37 @@ namespace CGAL { // old top of PriorityQueue has been processed, // hence update rd - bool next_neighbour_found; + bool next_neighbor_found; if (!(PriorityQueue.empty())) { rd = std::get<1>(*PriorityQueue.top()); - next_neighbour_found = (search_furthest ? + next_neighbor_found = (search_furthest ? multiplication_factor*rd < Item_PriorityQueue.top()->second : multiplication_factor*rd > Item_PriorityQueue.top()->second); } - else // priority queue empty => last neighbour found + else // priority queue empty => last neighbor found { - next_neighbour_found=true; + next_neighbor_found=true; } - number_of_neighbours_computed++; - return next_neighbour_found; + number_of_neighbors_computed++; + return next_neighbor_found; } void - Compute_the_next_nearest_neighbour() + Compute_the_next_nearest_neighbor() { // compute the next item - bool next_neighbour_found=false; + bool next_neighbor_found=false; if (!(Item_PriorityQueue.empty())) { - next_neighbour_found= + next_neighbor_found= (multiplication_factor*rd > Item_PriorityQueue.top()->second); } typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point); // otherwise browse the tree further - while ((!next_neighbour_found) && (!PriorityQueue.empty())) { + while ((!next_neighbor_found) && (!PriorityQueue.empty())) { Node_with_distance* The_node_top=PriorityQueue.top(); Node_const_handle N= std::get<0>(*The_node_top); dists = std::get<2>(*The_node_top); @@ -398,26 +398,29 @@ namespace CGAL { number_of_leaf_nodes_visited++; if (node->size() > 0) { typename internal::Has_points_cache::type::value>::type dummy; - next_neighbour_found = search_in_leaf(node, dummy, false); + next_neighbor_found = search_in_leaf(node, dummy, false); } - } // next_neighbour_found or priority queue is empty + } // next_neighbor_found or priority queue is empty // in the latter case also the item priority queue is empty } + + CGAL_DEPRECATED void Compute_the_next_nearest_neighbour() + { Compute_the_next_nearest_neighbor(); } void - Compute_the_next_furthest_neighbour() + Compute_the_next_furthest_neighbor() { // compute the next item - bool next_neighbour_found=false; + bool next_neighbor_found=false; if (!(Item_PriorityQueue.empty())) { - next_neighbour_found= + next_neighbor_found= (rd < multiplication_factor*Item_PriorityQueue.top()->second); } typename SearchTraits::Construct_cartesian_const_iterator_d construct_it=traits.construct_cartesian_const_iterator_d_object(); typename SearchTraits::Cartesian_const_iterator_d query_point_it = construct_it(query_point); // otherwise browse the tree further - while ((!next_neighbour_found) && (!PriorityQueue.empty())) { + while ((!next_neighbor_found) && (!PriorityQueue.empty())) { Node_with_distance* The_node_top=PriorityQueue.top(); Node_const_handle N= std::get<0>(*The_node_top); dists = std::get<2>(*The_node_top); @@ -462,11 +465,14 @@ namespace CGAL { number_of_leaf_nodes_visited++; if (node->size() > 0) { typename internal::Has_points_cache::type::value>::type dummy; - next_neighbour_found = search_in_leaf(node, dummy, true); + next_neighbor_found = search_in_leaf(node, dummy, true); } - } // next_neighbour_found or priority queue is empty + } // next_neighbor_found or priority queue is empty // in the latter case also the item priority queue is empty } + + CGAL_DEPRECATED void Compute_the_next_furthest_neighbour() + { Compute_the_next_furthest_neighbor(); } }; // class Iterator_implementaion diff --git a/Spatial_searching/include/CGAL/Spatial_searching/internal/K_neighbor_search.h b/Spatial_searching/include/CGAL/Spatial_searching/internal/K_neighbor_search.h index 514246c14dc..afb198848e5 100644 --- a/Spatial_searching/include/CGAL/Spatial_searching/internal/K_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Spatial_searching/internal/K_neighbor_search.h @@ -60,8 +60,8 @@ protected: public: - Distance_larger(bool search_the_nearest_neighbour) - : search_nearest(search_the_nearest_neighbour) + Distance_larger(bool search_the_nearest_neighbor) + : search_nearest(search_the_nearest_neighbor) {} bool operator()(const Point_ptr_with_transformed_distance& p1, diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h index ff9101e4f35..f7be5ec4a90 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_event_base.h @@ -485,7 +485,7 @@ public: } /*! Check if the two curves are negihbors to the left of the event. */ - bool are_left_neighbours(Subcurve* c1, Subcurve* c2) + bool are_left_neighbors(Subcurve* c1, Subcurve* c2) { Subcurve_iterator left_iter = m_left_curves.begin(); for (; left_iter != m_left_curves.end(); ++left_iter) { @@ -506,6 +506,10 @@ public: return false; } + /*! \copydoc are_left_neighbors + * \deprecated please use #are_left_neighbors */ + CGAL_DEPRECATED bool are_left_neighbours(Subcurve* c1, Subcurve* c2) + { return are_left_neighbors(c1, c2); } #ifdef CGAL_SS_VERBOSE void Print() const; diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index ff6e5caf280..52f2dde71b1 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -349,7 +349,7 @@ void Surface_sweep_2::_handle_right_curves() // If the two curves used to be neighbors before, we do not need to // intersect them again. - if (!this->m_currentEvent->are_left_neighbours(*currentOne, *prevOne)) + if (!this->m_currentEvent->are_left_neighbors(*currentOne, *prevOne)) _intersect(*prevOne, *currentOne); prevOne = currentOne; From e837d1d6e69bb34ef243a46837783d0e6a3106d9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 13 Jan 2023 18:59:45 +0100 Subject: [PATCH 346/426] Spelling correction in respect to function / variable names Removed trailing whitespace --- Spatial_searching/include/CGAL/Incremental_neighbor_search.h | 2 +- .../include/CGAL/Orthogonal_incremental_neighbor_search.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h index 6d03e5e3767..66738159d27 100644 --- a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h @@ -603,7 +603,7 @@ namespace CGAL { // in the latter case also the item priority queue is empty } - + CGAL_DEPRECATED void Compute_the_next_nearest_neighbour() { void Compute_the_next_nearest_neighbor(); } }; // class Iterator_implementation diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index bd16e628724..791676defb0 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -403,7 +403,7 @@ namespace CGAL { } // next_neighbor_found or priority queue is empty // in the latter case also the item priority queue is empty } - + CGAL_DEPRECATED void Compute_the_next_nearest_neighbour() { Compute_the_next_nearest_neighbor(); } From f827481216f3b91ee2bdd29e5ca7d108bc445e15 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 18:43:32 +0000 Subject: [PATCH 347/426] Make binop_intersection_tests const to remove const_cast --- Nef_3/include/CGAL/Nef_3/Binary_operation.h | 27 +++++++++---------- .../CGAL/Nef_3/binop_intersection_tests.h | 4 +-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/Binary_operation.h b/Nef_3/include/CGAL/Nef_3/Binary_operation.h index 4bfed515639..6261056ce91 100644 --- a/Nef_3/include/CGAL/Nef_3/Binary_operation.h +++ b/Nef_3/include/CGAL/Nef_3/Binary_operation.h @@ -74,6 +74,7 @@ class Binary_operation : public CGAL::SNC_decorator { typedef typename SNC_structure::Items Items; typedef typename Map::Sphere_map Sphere_map; typedef CGAL::SNC_decorator SNC_decorator; + typedef CGAL::SNC_const_decorator SNC_const_decorator; typedef SNC_decorator Base; typedef CGAL::SNC_constructor SNC_constructor; typedef CGAL::SNC_external_structure @@ -85,7 +86,9 @@ class Binary_operation : public CGAL::SNC_decorator { typedef typename SNC_structure::Vertex_handle Vertex_handle; typedef typename SNC_structure::Halfedge_handle Halfedge_handle; + typedef typename SNC_structure::Halfedge_const_handle Halfedge_const_handle; typedef typename SNC_structure::Halffacet_handle Halffacet_handle; + typedef typename SNC_structure::Halffacet_const_handle Halffacet_const_handle; typedef typename SNC_structure::Volume_handle Volume_handle; typedef typename SNC_structure::SVertex_handle SVertex_handle; typedef typename SNC_structure::SHalfedge_handle SHalfedge_handle; @@ -144,12 +147,12 @@ class Binary_operation : public CGAL::SNC_decorator { return v01; } - Vertex_handle create_local_view_on( const Point_3& p, Halfedge_handle e) { + Vertex_handle create_local_view_on( const Point_3& p, Halfedge_const_handle e) { SNC_constructor C(*this->sncp()); return C.create_from_edge( e, p); } - Vertex_handle create_local_view_on( const Point_3& p, Halffacet_handle f) { + Vertex_handle create_local_view_on( const Point_3& p, Halffacet_const_handle f) { SNC_constructor C(*this->sncp()); return C.create_from_facet( f, p); } @@ -167,14 +170,14 @@ class Binary_operation : public CGAL::SNC_decorator { typename Selection, typename Association> class Intersection_call_back : - public SNC_point_locator::Intersection_call_back + public CGAL::SNC_point_locator::Intersection_call_back { typedef typename SNC_decorator::Decorator_traits Decorator_traits; typedef typename Decorator_traits::Halfedge_handle Halfedge_handle; typedef typename Decorator_traits::Halffacet_handle Halffacet_handle; public: - Intersection_call_back( SNC_structure& s0, SNC_structure& s1, + Intersection_call_back( const SNC_structure& s0, const SNC_structure& s1, const Selection& _bop, SNC_structure& r, bool invert_order, Association& Ain) : snc0(s0), snc1(s1), bop(_bop), result(r), @@ -456,12 +459,10 @@ class Binary_operation : public CGAL::SNC_decorator { // CGAL_NEF_SETDTHREAD(19*509*43*131); - Intersection_call_back call_back0 - ( const_cast(snc1), const_cast(snc2), - BOP, *this->sncp(), false, A); - Intersection_call_back call_back1 - ( const_cast(snc2), const_cast(snc2), - BOP, *this->sncp(), true, A); + Intersection_call_back call_back0 + ( snc1, snc2, BOP, *this->sncp(), false, A); + Intersection_call_back call_back1 + ( snc2, snc2, BOP, *this->sncp(), true, A); #ifdef CGAL_NEF3_TIMER_INTERSECTION double split_intersection = timer_overlay.time(); @@ -503,10 +504,8 @@ class Binary_operation : public CGAL::SNC_decorator { << this->sncp()->number_of_vertices()); #else CGAL_NEF_TRACEN("intersection by fast box intersection"); - binop_intersection_test_segment_tree binop_box_intersection; - binop_box_intersection(call_back0, call_back1, - const_cast(snc1), - const_cast(snc2)); + binop_intersection_test_segment_tree binop_box_intersection; + binop_box_intersection(call_back0, call_back1, snc1, snc2); #endif #ifdef CGAL_NEF3_TIMER_INTERSECTION diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 03773258a68..4a2fab9f5b4 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -126,8 +126,8 @@ struct binop_intersection_test_segment_tree { template void operator()(Callback& cb0, Callback& cb1, - SNC_structure& sncp, - SNC_structure& snc1i) + const SNC_structure& sncp, + const SNC_structure& snc1i) { Halfedge_iterator e0, e1; Halffacet_iterator f0, f1; From 1f8244d9bb9620416703efffcb0fac0e97fd9870 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 18:43:33 +0000 Subject: [PATCH 348/426] Cleanup - remove CGAL_NEF3_BOX_INTERSECTION_CUTOFF --- .../CGAL/Nef_3/binop_intersection_tests.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 4a2fab9f5b4..b6ca655df87 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -137,14 +137,8 @@ struct binop_intersection_test_segment_tree { Bop_edge0_edge1_callback callback_edge0_edge1( cb0 ); CGAL_forall_edges( e0, sncp) a.push_back( Nef_box( e0 ) ); CGAL_forall_edges( e1, snc1i) b.push_back( Nef_box( e1 ) ); -#ifdef CGAL_NEF3_BOX_INTERSECTION_CUTOFF - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), - callback_edge0_edge1, - CGAL_NEF3_BOX_INTERSECTION_CUTOFF,); -#else box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), callback_edge0_edge1); -#endif a.clear(); b.clear(); @@ -152,14 +146,8 @@ struct binop_intersection_test_segment_tree { Bop_edge0_face1_callback callback_edge0_face1( cb0 ); CGAL_forall_edges( e0, sncp ) a.push_back( Nef_box( e0 ) ); CGAL_forall_facets( f1, snc1i) b.push_back( Nef_box( f1 ) ); -#ifdef CGAL_NEF3_BOX_INTERSECTION_CUTOFF - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), - callback_edge0_face1, - CGAL_NEF3_BOX_INTERSECTION_CUTOFF); -#else box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), callback_edge0_face1); -#endif a.clear(); b.clear(); @@ -167,14 +155,8 @@ struct binop_intersection_test_segment_tree { Bop_edge1_face0_callback callback_edge1_face0( cb1 ); CGAL_forall_edges( e1, snc1i) a.push_back( Nef_box( e1 ) ); CGAL_forall_facets( f0, sncp ) b.push_back( Nef_box( f0 ) ); -#ifdef CGAL_NEF3_BOX_INTERSECTION_CUTOFF - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), - callback_edge1_face0, - CGAL_NEF3_BOX_INTERSECTION_CUTOFF); -#else box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), callback_edge1_face0); -#endif } }; From 017210acfb5ae14afdbe8b3f52b97bbc2712f231 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 18:43:33 +0000 Subject: [PATCH 349/426] Rename parameters --- .../CGAL/Nef_3/binop_intersection_tests.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index b6ca655df87..0a3bc5f92ff 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -126,8 +126,8 @@ struct binop_intersection_test_segment_tree { template void operator()(Callback& cb0, Callback& cb1, - const SNC_structure& sncp, - const SNC_structure& snc1i) + const SNC_structure& snc0, + const SNC_structure& snc1) { Halfedge_iterator e0, e1; Halffacet_iterator f0, f1; @@ -135,8 +135,8 @@ struct binop_intersection_test_segment_tree { CGAL_NEF_TRACEN("start edge0 edge1"); Bop_edge0_edge1_callback callback_edge0_edge1( cb0 ); - CGAL_forall_edges( e0, sncp) a.push_back( Nef_box( e0 ) ); - CGAL_forall_edges( e1, snc1i) b.push_back( Nef_box( e1 ) ); + CGAL_forall_edges( e0, snc0) a.push_back( Nef_box( e0 ) ); + CGAL_forall_edges( e1, snc1) b.push_back( Nef_box( e1 ) ); box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), callback_edge0_edge1); a.clear(); @@ -144,8 +144,8 @@ struct binop_intersection_test_segment_tree { CGAL_NEF_TRACEN("start edge0 face1"); Bop_edge0_face1_callback callback_edge0_face1( cb0 ); - CGAL_forall_edges( e0, sncp ) a.push_back( Nef_box( e0 ) ); - CGAL_forall_facets( f1, snc1i) b.push_back( Nef_box( f1 ) ); + CGAL_forall_edges( e0, snc0) a.push_back( Nef_box( e0 ) ); + CGAL_forall_facets( f1, snc1) b.push_back( Nef_box( f1 ) ); box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), callback_edge0_face1); a.clear(); @@ -153,8 +153,8 @@ struct binop_intersection_test_segment_tree { CGAL_NEF_TRACEN("start edge1 face0"); Bop_edge1_face0_callback callback_edge1_face0( cb1 ); - CGAL_forall_edges( e1, snc1i) a.push_back( Nef_box( e1 ) ); - CGAL_forall_facets( f0, sncp ) b.push_back( Nef_box( f0 ) ); + CGAL_forall_edges( e1, snc1) a.push_back( Nef_box( e1 ) ); + CGAL_forall_facets( f0, snc0) b.push_back( Nef_box( f0 ) ); box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), callback_edge1_face0); } From 15820b30092ce908be1d8368418a55a53a3bc731 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 18:43:33 +0000 Subject: [PATCH 350/426] Include required headers --- Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 0a3bc5f92ff..85ab8fc0058 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -17,9 +17,8 @@ #include #include +#include #include -#include -#include namespace CGAL { @@ -76,7 +75,6 @@ struct binop_intersection_test_segment_tree { } }; - template struct Bop_edge1_face0_callback { Callback &cb; From cb5fd9404ccb8b7fe25ea1bb849eb7d0f7f5054e Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 18:43:33 +0000 Subject: [PATCH 351/426] Remove unused hash function --- .../include/CGAL/Nef_3/binop_intersection_tests.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 85ab8fc0058..247848196e3 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -40,21 +40,6 @@ struct binop_intersection_test_segment_tree { struct Bop_edge0_face1_callback { Callback &cb; - struct Pair_hash_function { - typedef std::size_t result_type; - - template - std::size_t - operator() (const H& h) const { - return - std::size_t(&*(h.first)) / sizeof - (typename std::iterator_traits::value_type) - + - std::size_t(&*(h.second)) / sizeof - (typename std::iterator_traits::value_type); - } - }; - Bop_edge0_face1_callback(Callback &cb) : cb(cb) {} From c2a1810b6404ae59c2d12878636b68b9d74facc6 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 18:43:33 +0000 Subject: [PATCH 352/426] Calculate edge Nef_boxes only once --- .../CGAL/Nef_3/binop_intersection_tests.h | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 247848196e3..b64fe1e99d2 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -114,31 +114,34 @@ struct binop_intersection_test_segment_tree { { Halfedge_iterator e0, e1; Halffacet_iterator f0, f1; - std::vector a, b; + std::vector e0boxes, e1boxes, f0boxes, f1boxes; + + e0boxes.reserve(snc0.number_of_halfedges()); + e1boxes.reserve(snc1.number_of_halfedges()); + f0boxes.reserve(snc0.number_of_halffacets()); + f1boxes.reserve(snc1.number_of_halffacets()); + + CGAL_forall_edges( e0, snc0) e0boxes.push_back( Nef_box( e0 ) ); + CGAL_forall_edges( e1, snc1) e1boxes.push_back( Nef_box( e1 ) ); + CGAL_forall_facets( f0, snc0) f0boxes.push_back( Nef_box( f0 ) ); + CGAL_forall_facets( f1, snc1) f1boxes.push_back( Nef_box( f1 ) ); CGAL_NEF_TRACEN("start edge0 edge1"); Bop_edge0_edge1_callback callback_edge0_edge1( cb0 ); - CGAL_forall_edges( e0, snc0) a.push_back( Nef_box( e0 ) ); - CGAL_forall_edges( e1, snc1) b.push_back( Nef_box( e1 ) ); - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), + box_intersection_d( e0boxes.begin(), e0boxes.end(), + e1boxes.begin(), e1boxes.end(), callback_edge0_edge1); - a.clear(); - b.clear(); CGAL_NEF_TRACEN("start edge0 face1"); Bop_edge0_face1_callback callback_edge0_face1( cb0 ); - CGAL_forall_edges( e0, snc0) a.push_back( Nef_box( e0 ) ); - CGAL_forall_facets( f1, snc1) b.push_back( Nef_box( f1 ) ); - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), + box_intersection_d( e0boxes.begin(), e0boxes.end(), + f1boxes.begin(), f1boxes.end(), callback_edge0_face1); - a.clear(); - b.clear(); CGAL_NEF_TRACEN("start edge1 face0"); Bop_edge1_face0_callback callback_edge1_face0( cb1 ); - CGAL_forall_edges( e1, snc1) a.push_back( Nef_box( e1 ) ); - CGAL_forall_facets( f0, snc0) b.push_back( Nef_box( f0 ) ); - box_intersection_d( a.begin(), a.end(), b.begin(), b.end(), + box_intersection_d( e1boxes.begin(), e1boxes.end(), + f0boxes.begin(), f0boxes.end(), callback_edge1_face0); } }; From 59ef7678aa6ae81b3abcc2cd01808a907c5dd02d Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 13 Jan 2023 20:01:17 +0000 Subject: [PATCH 353/426] Add header required by additional typedef --- Nef_3/include/CGAL/Nef_3/Binary_operation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Nef_3/include/CGAL/Nef_3/Binary_operation.h b/Nef_3/include/CGAL/Nef_3/Binary_operation.h index 6261056ce91..fbf654a369a 100644 --- a/Nef_3/include/CGAL/Nef_3/Binary_operation.h +++ b/Nef_3/include/CGAL/Nef_3/Binary_operation.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include From 22b069720a6e11d18d59b211e1239ac0eb58e280 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Sun, 15 Jan 2023 17:23:04 +0000 Subject: [PATCH 354/426] Replace use of lexical_cast with std::to_string use std::prev in Plane_3_Triangle_3_intersection.h do to lack of implicit header include. --- .../overlay_unbounded.cpp | 3 +-- .../Arrangement_on_surface_2/Traits_base_test.h | 13 ++++++------- .../examples/Cone_spanners_2/theta_io.cpp | 3 +-- .../test/Cone_spanners_2/theta_exact.cpp | 3 +-- .../test/Cone_spanners_2/theta_inexact.cpp | 3 +-- .../test/Cone_spanners_2/yao_exact.cpp | 3 +-- .../test/Cone_spanners_2/yao_inexact.cpp | 3 +-- .../internal/Plane_3_Triangle_3_intersection.h | 3 ++- STL_Extension/include/CGAL/exceptions.h | 15 +-------------- 9 files changed, 15 insertions(+), 34 deletions(-) diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp index be62a491733..866c66016d1 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp @@ -2,7 +2,6 @@ // A face overlay of two arrangements with unbounded faces. #include -#include #include #include @@ -14,7 +13,7 @@ // Define a functor for creating a label from a character and an integer. struct Overlay_label { std::string operator()(char c, unsigned int i) const - { return c + boost::lexical_cast(i); } + { return c + std::to_string(i); } }; typedef CGAL::Arr_face_extended_dcel Dcel_dlue; diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h index 9bfe463e3bf..fc38d031c77 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h @@ -10,7 +10,6 @@ #include // #include -#include #include #include @@ -123,8 +122,8 @@ protected: typename Traits::Equal_2 equal = this->m_geom_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; - std::string exp_answer_str = boost::lexical_cast(exp_answer); - std::string real_answer_str = boost::lexical_cast(real_answer); + std::string exp_answer_str = std::to_string(exp_answer); + std::string real_answer_str = std::to_string(real_answer); this->print_answer(exp_answer_str, real_answer_str, "point"); return false; } @@ -136,8 +135,8 @@ protected: typename Traits::Equal_2 equal = this->m_geom_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; - std::string exp_answer_str = boost::lexical_cast(exp_answer); - std::string real_answer_str = boost::lexical_cast(real_answer); + std::string exp_answer_str = std::to_string(exp_answer); + std::string real_answer_str = std::to_string(real_answer); this->print_answer(exp_answer_str, real_answer_str, "x-monotone curve"); return false; } @@ -149,8 +148,8 @@ protected: const char* str = "result") { if (exp_answer == real_answer) return true; - std::string exp_answer_str = boost::lexical_cast(exp_answer); - std::string real_answer_str = boost::lexical_cast(real_answer); + std::string exp_answer_str = std::to_string(exp_answer); + std::string real_answer_str = std::to_string(real_answer); this->print_answer(exp_answer_str, real_answer_str, str); return false; } diff --git a/Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp b/Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp index 4096cf1c71f..3b49478f47f 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp +++ b/Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -79,7 +78,7 @@ int main(int argc, char ** argv) // obtain the number of vertices in the constructed graph boost::graph_traits::vertices_size_type n = boost::num_vertices(g); // generate gnuplot files for plotting this graph - std::string file_prefix = "t" + boost::lexical_cast(k) + "n" + boost::lexical_cast(n); + std::string file_prefix = "t" + std::to_string(k) + "n" + std::to_string(n); CGAL::gnuplot_output_2(g, file_prefix); return 0; diff --git a/Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp b/Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp index 0173c9798ac..6bdb2e0eb8d 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -70,7 +69,7 @@ int main(int argc, char ** argv) // obtain the number of vertices in the constructed graph boost::graph_traits::vertices_size_type n = boost::num_vertices(g); // generate gnuplot files for plotting this graph - std::string file_prefix = "t" + boost::lexical_cast(k) + "n" + boost::lexical_cast(n); + std::string file_prefix = "t" + std::to_string(k) + "n" + std::to_string(n); CGAL::gnuplot_output_2(g, file_prefix); return 0; diff --git a/Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp b/Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp index 4d305d0fb30..f62d9d34dc9 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -71,7 +70,7 @@ int main(int argc, char ** argv) // obtain the number of vertices in the constructed graph boost::graph_traits::vertices_size_type n = boost::num_vertices(g); // generate gnuplot files for plotting this graph - std::string file_prefix = "t" + boost::lexical_cast(k) + "n" + boost::lexical_cast(n); + std::string file_prefix = "t" + std::to_string(k) + "n" + std::to_string(n); CGAL::gnuplot_output_2(g, file_prefix); return 0; diff --git a/Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp b/Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp index 9b6c3668777..4e19687de49 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -72,7 +71,7 @@ int main(int argc, char ** argv) boost::graph_traits::vertices_size_type n = boost::num_vertices(g); // generate gnuplot files for plotting this graph - std::string fileprefix = "y" + boost::lexical_cast(k) + "n" + boost::lexical_cast(n); + std::string fileprefix = "y" + std::to_string(k) + "n" + std::to_string(n); CGAL::gnuplot_output_2(g, fileprefix); return 0; diff --git a/Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp b/Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp index 8f6221935ed..5ddf1a2c3f8 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -72,7 +71,7 @@ int main(int argc, char ** argv) boost::graph_traits::vertices_size_type n = boost::num_vertices(g); // generate gnuplot files for plotting this graph - std::string fileprefix = "y" + boost::lexical_cast(k) + "n" + boost::lexical_cast(n); + std::string fileprefix = "y" + std::to_string(k) + "n" + std::to_string(n); CGAL::gnuplot_output_2(g, fileprefix); return 0; diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h index 7f76c9d6000..d16b33d6570 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Plane_3_Triangle_3_intersection.h @@ -18,6 +18,7 @@ #include #include +#include namespace CGAL { namespace Intersections { @@ -141,7 +142,7 @@ intersection(const typename K::Plane_3& plane, CGAL_kernel_assertion(pts.size() == 2); return intersection_return( - k.construct_segment_3_object()(*pts.begin(), *boost::prior(pts.end()))); + k.construct_segment_3_object()(*pts.begin(), *std::prev(pts.end()))); } template diff --git a/STL_Extension/include/CGAL/exceptions.h b/STL_Extension/include/CGAL/exceptions.h index edb926383f9..3b269aea302 100644 --- a/STL_Extension/include/CGAL/exceptions.h +++ b/STL_Extension/include/CGAL/exceptions.h @@ -14,22 +14,9 @@ #ifndef CGAL_EXCEPTIONS_H #define CGAL_EXCEPTIONS_H -#include #include #include -// Address the warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY' -// lexical_cast.hpp includes files from boost/preprocessor -// This concerns boost 1_67_0 -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable: 4003) -#endif -#include -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - namespace CGAL { @@ -87,7 +74,7 @@ public: std::logic_error( lib + std::string( " ERROR: ") + kind + std::string( "!") + ((expr.empty()) ? (std::string("")) : (std::string("\nExpr: ")+expr)) + std::string( "\nFile: ") + file - + std::string( "\nLine: ") + boost::lexical_cast(line) + + std::string( "\nLine: ") + std::to_string(line) + ((msg.empty()) ? (std::string("")) : (std::string("\nExplanation: ") + msg))), m_lib( lib), From 6a7bd8b0e3f34961ebfd8cb3eb8e884eb6ad3714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 16 Jan 2023 19:46:01 +0100 Subject: [PATCH 355/426] fix angle return type --- .../CGAL/Polygon_mesh_processing/repair_degeneracies.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 e9afa43b78c..9704b52c32d 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 @@ -315,9 +315,9 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, const Point_ref p2 = get(vpm, source(h, tmesh)); const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); - const double ap1 = angle(p0,p1,p2); - const double ap3 = angle(p2,p3,p0); - return (ap1 + ap3 > 180); + const typename Traits::FT ap1 = to_double(angle(p0,p1,p2)); + const typename Traits::FT ap3 = to_double(angle(p2,p3,p0)); + return (ap1 + ap3 > typename Traits::FT(180.)); } template From 343735b9d74ad5c8e61f78fb0a4f9018cce8163b Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Tue, 17 Jan 2023 09:58:38 +0100 Subject: [PATCH 356/426] missing return --- Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index 4cba21b75e4..c8a311a37ae 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -1048,7 +1048,7 @@ private: } CGAL_DEPRECATED bool is_two_facets_neighbouring(const unsigned int & pid, const unsigned int &i, const unsigned int &j)const - { is_two_facets_neighboring(pid, i, j); } + { return is_two_facets_neighboring(pid, i, j); } int From 384377eda3e8b28b33a7e851a4e35c5bff42edc4 Mon Sep 17 00:00:00 2001 From: Sebastien Loriot Date: Tue, 17 Jan 2023 10:02:22 +0100 Subject: [PATCH 357/426] typo --- .../CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h index 2868190872b..f9551ac46fa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_2.h @@ -2261,7 +2261,7 @@ Lexit: /*! \copydoc test_neighborhood * \deprecated please use #test_neighborhood */ CGAL_DEPRECATED bool test_neighbourhood(Pixel_2& pix, int dir, int& new_dir) -{ return test_neighborhood(pix, new_dir)' } +{ return test_neighborhood(pix, new_dir); } #endif // CGAL_CKVA_RENDER_WITH_REFINEMENT From 3a88991ef2afb78886f92d19bbff88e70ba1bfea Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 08:59:54 +0100 Subject: [PATCH 358/426] Move deprecated keyword --- Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h index c634ae24c2e..8fa78242d44 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h @@ -82,8 +82,8 @@ push_neighbors_of(Vertex * start, int ith, } } -CGAL_DEPRECATED template < class TPoly , class VertexPropertyMap> -void T_PolyhedralSurf_rings :: +template < class TPoly , class VertexPropertyMap> +CGAL_DEPRECATED void T_PolyhedralSurf_rings :: push_neighbours_of(Vertex * start, int ith, std::vector < Vertex * >&nextRing, std::vector < Vertex * >&all, From 1b6e3b7d61834c2519da041106fc3a58df5e7b42 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 09:22:20 +0100 Subject: [PATCH 359/426] Move deprecated keyword --- Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index 6fc343b3f6d..ffd7e6cfd1b 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -92,8 +92,8 @@ push_neighbors_of(const Vertex_const_handle start, const int ith, } } -CGAL_DEPRECATED template < class TPoly > -void T_PolyhedralSurf_rings :: +template < class TPoly > +CGAL_DEPRECATED void T_PolyhedralSurf_rings :: push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all) From 6bdb961819d4b1f50566863e63fe873a82c9ddb8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 09:27:50 +0100 Subject: [PATCH 360/426] No need to deprecate as this is just an example file --- Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index ffd7e6cfd1b..13132e6fa7e 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -93,7 +93,7 @@ push_neighbors_of(const Vertex_const_handle start, const int ith, } template < class TPoly > -CGAL_DEPRECATED void T_PolyhedralSurf_rings :: +void T_PolyhedralSurf_rings :: push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all) From 0de029404c4e499f283f3aa433bc96e29aecc453 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 09:28:42 +0100 Subject: [PATCH 361/426] No need to deprecate as this is just an example file --- Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h index 6fc343b3f6d..d7e05c93ebb 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h @@ -33,7 +33,7 @@ protected: void push_neighbors_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); - CGAL_DEPRECATED void push_neighbours_of(const Vertex_const_handle start, const int ith, + void push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); From e9bd71406d6bda93fb680a4598184061b648dcd5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 09:32:51 +0100 Subject: [PATCH 362/426] No need to deprecate as this is just an example file --- Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index 13132e6fa7e..aef725c1bc2 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -33,7 +33,7 @@ protected: void push_neighbors_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); - CGAL_DEPRECATED void push_neighbours_of(const Vertex_const_handle start, const int ith, + void push_neighbours_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); From e4c0952274decedc841d9eb5c5e666647aceb191 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 09:34:39 +0100 Subject: [PATCH 363/426] No need to deprecate as this is just an example file --- Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h index 8fa78242d44..bd991681a57 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h @@ -29,7 +29,7 @@ protected: std::vector < Vertex * >&nextRing, std::vector < Vertex * >&all, VertexPropertyMap& vpm); - CGAL_DEPRECATED static void push_neighbours_of(Vertex * start, int ith, + static void push_neighbours_of(Vertex * start, int ith, std::vector < Vertex * >&nextRing, std::vector < Vertex * >&all, VertexPropertyMap& vpm); From aa238b667e6c8c750625bbec2efeb3cbbf2f22eb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 18 Jan 2023 08:51:26 +0000 Subject: [PATCH 364/426] No need to keep deprecated code that is in test or examples --- .../examples/Jet_fitting_3/PolyhedralSurf_rings.h | 12 ------------ Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h | 10 ---------- Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h | 10 ---------- 3 files changed, 32 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h index bd991681a57..a5866bee2ad 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h +++ b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h @@ -29,10 +29,6 @@ protected: std::vector < Vertex * >&nextRing, std::vector < Vertex * >&all, VertexPropertyMap& vpm); - static void push_neighbours_of(Vertex * start, int ith, - std::vector < Vertex * >&nextRing, - std::vector < Vertex * >&all, - VertexPropertyMap& vpm); //i >= 1, from a currentRing i-1, collect all neighbors, set indices //to i and store them in nextRing and all. @@ -82,14 +78,6 @@ push_neighbors_of(Vertex * start, int ith, } } -template < class TPoly , class VertexPropertyMap> -CGAL_DEPRECATED void T_PolyhedralSurf_rings :: -push_neighbours_of(Vertex * start, int ith, - std::vector < Vertex * >&nextRing, - std::vector < Vertex * >&all, - VertexPropertyMap& vpm) -{ push_neighbors_of(start, ith, nextRing, all, vpm); } - template void T_PolyhedralSurf_rings :: collect_ith_ring(int ith, std::vector < Vertex * >¤tRing, diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index aef725c1bc2..0b11736513c 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -33,9 +33,6 @@ protected: void push_neighbors_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); - void push_neighbours_of(const Vertex_const_handle start, const int ith, - std::vector < Vertex_const_handle > &nextRing, - std::vector < Vertex_const_handle > &all); //i >= 1, from a currentRing i-1, collect all neighbors, set indices //to i and store them in nextRing and all. @@ -92,13 +89,6 @@ push_neighbors_of(const Vertex_const_handle start, const int ith, } } -template < class TPoly > -void T_PolyhedralSurf_rings :: -push_neighbours_of(const Vertex_const_handle start, const int ith, - std::vector < Vertex_const_handle > &nextRing, - std::vector < Vertex_const_handle > &all) -{ push_neighbors_of(start, ith, nextRing, all); } - template void T_PolyhedralSurf_rings :: collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing, diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h index d7e05c93ebb..0b11736513c 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h @@ -33,9 +33,6 @@ protected: void push_neighbors_of(const Vertex_const_handle start, const int ith, std::vector < Vertex_const_handle > &nextRing, std::vector < Vertex_const_handle > &all); - void push_neighbours_of(const Vertex_const_handle start, const int ith, - std::vector < Vertex_const_handle > &nextRing, - std::vector < Vertex_const_handle > &all); //i >= 1, from a currentRing i-1, collect all neighbors, set indices //to i and store them in nextRing and all. @@ -92,13 +89,6 @@ push_neighbors_of(const Vertex_const_handle start, const int ith, } } -CGAL_DEPRECATED template < class TPoly > -void T_PolyhedralSurf_rings :: -push_neighbours_of(const Vertex_const_handle start, const int ith, - std::vector < Vertex_const_handle > &nextRing, - std::vector < Vertex_const_handle > &all) -{ push_neighbors_of(start, ith, nextRing, all); } - template void T_PolyhedralSurf_rings :: collect_ith_ring(const int ith, std::vector < Vertex_const_handle > ¤tRing, From d67d7cd4b6881bd4912632c67540e86f3a249b72 Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 18 Jan 2023 11:15:17 +0100 Subject: [PATCH 365/426] Remove extra `to_double` --- .../CGAL/Polygon_mesh_processing/repair_degeneracies.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 9704b52c32d..d681d530337 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 @@ -302,6 +302,7 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename Traits:: FT FT; typedef typename boost::property_traits::reference Point_ref; CGAL_precondition(!is_border(e, tmesh)); @@ -315,9 +316,9 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, const Point_ref p2 = get(vpm, source(h, tmesh)); const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); - const typename Traits::FT ap1 = to_double(angle(p0,p1,p2)); - const typename Traits::FT ap3 = to_double(angle(p2,p3,p0)); - return (ap1 + ap3 > typename Traits::FT(180.)); + const FT ap1 = angle(p0,p1,p2); + const FT ap3 = angle(p2,p3,p0); + return (ap1 + ap3 > FT(180)); } template From 349ad3cf143645f8a0dcb9e9d06ea103ee81db7d Mon Sep 17 00:00:00 2001 From: Nicolas Saillant Date: Wed, 18 Jan 2023 11:52:47 +0100 Subject: [PATCH 366/426] Add workflow_dispatch --- .github/workflows/Remove_labels.yml | 1 + .github/workflows/build_doc.yml | 1 + .github/workflows/checks.yml | 2 +- .github/workflows/cmake-all.yml | 2 +- .github/workflows/delete_doc.yml | 2 +- .github/workflows/demo.yml | 2 +- .github/workflows/filter_testsuite.yml | 1 + 7 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Remove_labels.yml b/.github/workflows/Remove_labels.yml index 8e9ed55f6bd..0624fe7a1df 100644 --- a/.github/workflows/Remove_labels.yml +++ b/.github/workflows/Remove_labels.yml @@ -2,6 +2,7 @@ name: remove_labels on: pull_request_target: types: [synchronize] + workflow_dispatch: jobs: remove_label: runs-on: ubuntu-latest diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 6f41cf308c4..0787f31e1a5 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -3,6 +3,7 @@ name: Documentation on: issue_comment: types: [created] + workflow_dispatch: permissions: contents: read # to fetch code (actions/checkout) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b3350371607..0af6e276e6e 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,6 +1,6 @@ name: CMake Test Merge Branch -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] permissions: contents: read diff --git a/.github/workflows/cmake-all.yml b/.github/workflows/cmake-all.yml index 1eea5e59aa9..614393edfee 100644 --- a/.github/workflows/cmake-all.yml +++ b/.github/workflows/cmake-all.yml @@ -1,6 +1,6 @@ name: CMake Testsuite -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch:] permissions: contents: read diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 497013a51eb..38f5ab445ac 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -2,7 +2,7 @@ name: Documentation Removal on: pull_request_target: - types: [closed, removed] + types: [closed, removed, workflow_dispatch] permissions: contents: read diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 07dee615268..123458ebe04 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -1,6 +1,6 @@ name: Test Polyhedron Demo -on: [push, pull_request] +on: [push, pull_request,workflow_dispatch] permissions: contents: read diff --git a/.github/workflows/filter_testsuite.yml b/.github/workflows/filter_testsuite.yml index 9b222b77eb3..48e4f39d65c 100644 --- a/.github/workflows/filter_testsuite.yml +++ b/.github/workflows/filter_testsuite.yml @@ -3,6 +3,7 @@ name: Filter Testsuite on: issue_comment: types: [created] + workflow_dispatch: permissions: {} jobs: From 271cad9d3dd618022da760fbadc53d69008b3f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 18 Jan 2023 19:03:42 +0100 Subject: [PATCH 367/426] use detected python version --- Documentation/doc/CMakeLists.txt | 9 ++------- Documentation/doc/scripts/pkglist_filter | 2 +- Documentation/doc/scripts/pkglist_filter.bat | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index b711da2a0bb..ef63fe88760 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -26,13 +26,8 @@ else() set(CGAL_ROOT "${CMAKE_SOURCE_DIR}") endif() -find_package(Doxygen) -find_package(Python3 COMPONENTS Interpreter) - -if(NOT DOXYGEN_FOUND) - message(WARNING "Cannot build the documentation without Doxygen!") - return() -endif() +find_package(Doxygen REQUIRED) +find_package(Python3 REQUIRED COMPONENTS Interpreter) #starting from cmake 3.9 the usage of DOXYGEN_EXECUTABLE is deprecated if(TARGET Doxygen::doxygen) diff --git a/Documentation/doc/scripts/pkglist_filter b/Documentation/doc/scripts/pkglist_filter index 2ec8ce96c9b..7912564df56 100755 --- a/Documentation/doc/scripts/pkglist_filter +++ b/Documentation/doc/scripts/pkglist_filter @@ -1,3 +1,3 @@ #!/bin/sh -exec ${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/pkglist_filter.py "$1" +exec ${Python3_EXECUTABLE} ${CMAKE_BINARY_DIR}/pkglist_filter.py "$1" diff --git a/Documentation/doc/scripts/pkglist_filter.bat b/Documentation/doc/scripts/pkglist_filter.bat index 83dff1aa121..1e716921c65 100644 --- a/Documentation/doc/scripts/pkglist_filter.bat +++ b/Documentation/doc/scripts/pkglist_filter.bat @@ -1,6 +1,6 @@ @echo off :go -${PYTHON_EXECUTABLE} ${CMAKE_BINARY_DIR}/pkglist_filter.py %1 +${Python3_EXECUTABLE} ${CMAKE_BINARY_DIR}/pkglist_filter.py %1 @echo on From b5580573d6298a86d1744a4e2a879041c5eff0d6 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 18 Jan 2023 19:58:44 +0000 Subject: [PATCH 368/426] Fix cyclic dependencies Move shared code to SNC_halfedge_key.h, remove unneeded headers, add a one forward declaration for SNC_io_parser --- .../include/CGAL/Nef_3/Mark_bounded_volumes.h | 4 +- Nef_3/include/CGAL/Nef_3/SNC_constructor.h | 6 +- .../CGAL/Nef_3/SNC_external_structure.h | 73 +------------- Nef_3/include/CGAL/Nef_3/SNC_halfedge_key.h | 95 +++++++++++++++++++ Nef_3/include/CGAL/Nef_3/SNC_io_parser.h | 1 - .../CGAL/Nef_3/vertex_cycle_to_nef_3.h | 5 +- 6 files changed, 103 insertions(+), 81 deletions(-) create mode 100644 Nef_3/include/CGAL/Nef_3/SNC_halfedge_key.h diff --git a/Nef_3/include/CGAL/Nef_3/Mark_bounded_volumes.h b/Nef_3/include/CGAL/Nef_3/Mark_bounded_volumes.h index f5af77cf1d5..0ce560af241 100644 --- a/Nef_3/include/CGAL/Nef_3/Mark_bounded_volumes.h +++ b/Nef_3/include/CGAL/Nef_3/Mark_bounded_volumes.h @@ -15,8 +15,8 @@ #include - -#include +#include +#include namespace CGAL { diff --git a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h index c79d68de6d5..bbd9d5b1d41 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h @@ -24,12 +24,11 @@ #include #include #include -#include #include #include +#include #include #include -#include #ifdef SM_VISUALIZOR #include #endif // SM_VISUALIZOR @@ -41,6 +40,9 @@ namespace CGAL { +template +class SNC_io_parser; + template struct Frame_point_lt { diff --git a/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h b/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h index 038843e9fa1..336981c8385 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_external_structure.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,77 +40,6 @@ namespace CGAL { -struct int_lt { - bool operator()(const int& i1, const int& i2) const { return i1 -struct Halfedge_key_lt4 { - - bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { - if(CGAL::sign(e1->point().x()) != 0) { - if(e1->source() != e2->source()) - return CGAL::compare_x(e1->source()->point(), e2->source()->point()) < 0; - else - return e1->point().x() < 0; - } - if(CGAL::sign(e1->point().y()) != 0) { - if(e1->source() != e2->source()) - return CGAL::compare_y(e1->source()->point(), e2->source()->point()) < 0; - else - return e1->point().y() < 0; - } - if(e1->source() != e2->source()) - return CGAL::compare_z(e1->source()->point(), e2->source()->point()) < 0; - return e1->point().z() < 0; - } -}; - -template -struct Halfedge_key_lt3 { - - bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { - if(e1->source() != e2->source()) - return CGAL::lexicographically_xyz_smaller(e1->source()->point(), e2->source()->point()); - if(CGAL::sign(e1->point().x()) != 0) - return e1->point().x() < 0; - if(CGAL::sign(e1->point().y()) != 0) - return e1->point().y() < 0; - return e1->point().z() < 0; - } -}; - -template -struct Halfedge_key { - typedef Halfedge_key Self; - Point p; int i; Edge e; - Halfedge_key(Point pi, int ii, Edge ei) : - p(pi), i(ii), e(ei) {} - Halfedge_key(const Self& k) : p(k.p), i(k.i), e(k.e) {} - Self& operator=(const Self& k) { p=k.p; i=k.i; e=k.e; return *this; } - bool operator==(const Self& k) const { return p==k.p && i==k.i; } - bool operator!=(const Self& k) const { return !operator==(k); } -}; - -template -struct Halfedge_key_lt { - typedef Halfedge_key Key; - typedef typename Point::R R; - typedef typename R::Vector_3 Vector; - typedef typename R::Direction_3 Direction; - bool operator()( const Key& k1, const Key& k2) const { - if( k1.e->source() == k2.e->source()) - return (k1.i < k2.i); - Direction l(k1.e->vector()); - if( k1.i < 0) l = -l; - return (Direction( k2.p - k1.p) == l); - } -}; - -template -std::ostream& operator<<(std::ostream& os, - const Halfedge_key& k ) -{ os << k.p << " " << k.i; return os; } - template int sign_of(const CGAL::Plane_3& h) { if ( h.c() != 0 ) return CGAL_NTS sign(h.c()); diff --git a/Nef_3/include/CGAL/Nef_3/SNC_halfedge_key.h b/Nef_3/include/CGAL/Nef_3/SNC_halfedge_key.h new file mode 100644 index 00000000000..4c2738e63f8 --- /dev/null +++ b/Nef_3/include/CGAL/Nef_3/SNC_halfedge_key.h @@ -0,0 +1,95 @@ +// Copyright (c) 1997-2002 Max-Planck-Institute Saarbruecken (Germany). +// 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) : Peter Hachenberger + +#ifndef CGAL_SNC_HALFEDGE_KEY_H +#define CGAL_SNC_HALFEDGE_KEY_H + +#include + +#include + +namespace CGAL { + +struct int_lt { + bool operator()(const int& i1, const int& i2) const { return i1 +struct Halfedge_key_lt4 { + + bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { + if(CGAL::sign(e1->point().x()) != 0) { + if(e1->source() != e2->source()) + return CGAL::compare_x(e1->source()->point(), e2->source()->point()) < 0; + else + return e1->point().x() < 0; + } + if(CGAL::sign(e1->point().y()) != 0) { + if(e1->source() != e2->source()) + return CGAL::compare_y(e1->source()->point(), e2->source()->point()) < 0; + else + return e1->point().y() < 0; + } + if(e1->source() != e2->source()) + return CGAL::compare_z(e1->source()->point(), e2->source()->point()) < 0; + return e1->point().z() < 0; + } +}; + +template +struct Halfedge_key_lt3 { + + bool operator()(const Edge_handle& e1, const Edge_handle& e2) const { + if(e1->source() != e2->source()) + return CGAL::lexicographically_xyz_smaller(e1->source()->point(), e2->source()->point()); + if(CGAL::sign(e1->point().x()) != 0) + return e1->point().x() < 0; + if(CGAL::sign(e1->point().y()) != 0) + return e1->point().y() < 0; + return e1->point().z() < 0; + } +}; + +template +struct Halfedge_key { + typedef Halfedge_key Self; + Point p; int i; Edge e; + Halfedge_key(Point pi, int ii, Edge ei) : + p(pi), i(ii), e(ei) {} + Halfedge_key(const Self& k) : p(k.p), i(k.i), e(k.e) {} + Self& operator=(const Self& k) { p=k.p; i=k.i; e=k.e; return *this; } + bool operator==(const Self& k) const { return p==k.p && i==k.i; } + bool operator!=(const Self& k) const { return !operator==(k); } +}; + +template +struct Halfedge_key_lt { + typedef Halfedge_key Key; + typedef typename Point::R R; + typedef typename R::Vector_3 Vector; + typedef typename R::Direction_3 Direction; + bool operator()( const Key& k1, const Key& k2) const { + if( k1.e->source() == k2.e->source()) + return (k1.i < k2.i); + Direction l(k1.e->vector()); + if( k1.i < 0) l = -l; + return (Direction( k2.p - k1.p) == l); + } +}; + +template +std::ostream& operator<<(std::ostream& os, + const Halfedge_key& k ) +{ os << k.p << " " << k.i; return os; } + +} +#endif //CGAL_SNC_HALFEDGE_KEY_H diff --git a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h index aab28de6795..9aa445f38a1 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_io_parser.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h b/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h index 1b7426fee5a..750fcf86ffe 100644 --- a/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h +++ b/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h @@ -28,10 +28,7 @@ #include // Nef polyhedra -#include -#include -#include -#include +#include namespace CGAL { From f8bf2b33b6d2f5f9e2e47f2cae3233842e716901 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 18 Jan 2023 21:03:36 +0000 Subject: [PATCH 369/426] Include required header in Ray_hit_generator.h --- .../include/CGAL/Convex_decomposition_3/Ray_hit_generator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h index ffc0868e952..2768f43ce72 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Ray_hit_generator.h @@ -17,6 +17,7 @@ #include #include +#include #include #include From 0de5f61bafabcc89eb12c56a90b3aadbfc5435ac Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 18 Jan 2023 21:37:59 +0000 Subject: [PATCH 370/426] Include required header in External_structure_builder.h --- .../CGAL/Convex_decomposition_3/External_structure_builder.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h index 823a9b7c4ce..8c4c546590d 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h @@ -17,6 +17,7 @@ #include +#include #include #undef CGAL_NEF_DEBUG From e8b66f23cc2e7052cb1dddf99aa8ec038b042990 Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 18 Jan 2023 22:41:52 +0000 Subject: [PATCH 371/426] Additional required headers in Convex_decomposition_3 --- .../include/CGAL/Convex_decomposition_3/SFace_separator.h | 3 ++- .../include/CGAL/Convex_decomposition_3/SM_walls.h | 2 ++ .../CGAL/Convex_decomposition_3/Single_wall_creator2.h | 4 +++- .../CGAL/Convex_decomposition_3/Single_wall_creator3.h | 4 +++- .../CGAL/Convex_decomposition_3/YVertical_wall_builder.h | 5 +++-- .../include/CGAL/Convex_decomposition_3/is_reflex_sedge.h | 2 ++ 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SFace_separator.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SFace_separator.h index 2c42e64fe72..cd9ed4851d0 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SFace_separator.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SFace_separator.h @@ -14,8 +14,9 @@ #include - +#include #include +#include #include namespace CGAL { diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SM_walls.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SM_walls.h index 27a1c4f697a..e1c5b099414 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SM_walls.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/SM_walls.h @@ -14,6 +14,8 @@ #include +#include +#include #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 227 diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h index bd4d22bac38..954138100e5 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator2.h @@ -14,10 +14,12 @@ #include - +#include #include +#include #include #include +#include #include #undef CGAL_NEF_DEBUG diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h index fc26c54ceb0..2277f58d5cf 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Single_wall_creator3.h @@ -14,10 +14,12 @@ #include - +#include #include +#include #include #include +#include #include #undef CGAL_NEF_DEBUG diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h index 0db21512f4c..e43ef7d92d3 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/YVertical_wall_builder.h @@ -14,8 +14,9 @@ #include - -#include +#include +#include +#include #include #include diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h index 5a881e30331..9409c04846c 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/is_reflex_sedge.h @@ -14,6 +14,8 @@ #include +#include +#include #undef CGAL_NEF_DEBUG #define CGAL_NEF_DEBUG 239 From b66ee56919d259a592c122cce516a0f03bf1c61b Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Wed, 18 Jan 2023 23:27:25 +0000 Subject: [PATCH 372/426] Additional required headers in Nef_3 --- Nef_3/include/CGAL/Nef_3/Halfedge.h | 1 + Nef_3/include/CGAL/Nef_3/K3_tree.h | 1 + Nef_3/include/CGAL/Nef_3/Nef_box.h | 4 ++++ Nef_3/include/CGAL/Nef_3/SHalfedge.h | 1 + Nef_3/include/CGAL/Nef_3/SHalfloop.h | 1 + Nef_3/include/CGAL/Nef_3/SNC_constructor.h | 1 + Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h | 1 + Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h | 1 + Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h | 5 ++++- 9 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Nef_3/include/CGAL/Nef_3/Halfedge.h b/Nef_3/include/CGAL/Nef_3/Halfedge.h index b0c21962585..b4fc7065740 100644 --- a/Nef_3/include/CGAL/Nef_3/Halfedge.h +++ b/Nef_3/include/CGAL/Nef_3/Halfedge.h @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index e147621b163..81eb55e4c4a 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/Nef_box.h b/Nef_3/include/CGAL/Nef_3/Nef_box.h index 03a3a883ba8..c05d1e6c9ea 100644 --- a/Nef_3/include/CGAL/Nef_3/Nef_box.h +++ b/Nef_3/include/CGAL/Nef_3/Nef_box.h @@ -16,7 +16,11 @@ #include #include +#include +#include #include +#include +#include namespace CGAL { diff --git a/Nef_3/include/CGAL/Nef_3/SHalfedge.h b/Nef_3/include/CGAL/Nef_3/SHalfedge.h index 31694604135..19339312f20 100644 --- a/Nef_3/include/CGAL/Nef_3/SHalfedge.h +++ b/Nef_3/include/CGAL/Nef_3/SHalfedge.h @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/SHalfloop.h b/Nef_3/include/CGAL/Nef_3/SHalfloop.h index 59c449c150f..c611bfeb85d 100644 --- a/Nef_3/include/CGAL/Nef_3/SHalfloop.h +++ b/Nef_3/include/CGAL/Nef_3/SHalfloop.h @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h index bbd9d5b1d41..5645068d567 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h index dbdb461db60..0b84b289122 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_sphere_map.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #undef CGAL_NEF_DEBUG diff --git a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 03773258a68..96defdc2b7b 100644 --- a/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h +++ b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h b/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h index c0076cfbca5..a20a6643f50 100644 --- a/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h +++ b/Nef_3/include/CGAL/Nef_3/polygon_mesh_to_nef_3.h @@ -19,10 +19,13 @@ #include - +#include #include #include #include +#include +#include +#include #include #undef CGAL_NEF_DEBUG From 33d9560b20b566dca3fe43b00d6cfbc8f7d0900c Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Thu, 19 Jan 2023 00:39:36 +0000 Subject: [PATCH 373/426] Place forward declaration in SNC_structure --- Nef_3/include/CGAL/Nef_3/SNC_constructor.h | 4 +--- Nef_3/include/CGAL/Nef_3/SNC_structure.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h index 5645068d567..f0c67661879 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #ifdef SM_VISUALIZOR #include @@ -41,9 +42,6 @@ namespace CGAL { -template -class SNC_io_parser; - template struct Frame_point_lt { diff --git a/Nef_3/include/CGAL/Nef_3/SNC_structure.h b/Nef_3/include/CGAL/Nef_3/SNC_structure.h index c6dccf530a3..27a3c5c414d 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_structure.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_structure.h @@ -56,6 +56,7 @@ void merge_sets( Object o1, Object o2, Hash_map& hash, Union_find& uf) { template class SNC_sphere_map; template class SM_decorator; template class SNC_decorator; +template class SNC_io_parser; /*{\Manpage {SNC_structure}{Items}{Selective Nef Complex}{C}}*/ From 3c56c3e2b1f66e280610c9a509df0de0d33a420a Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Thu, 19 Jan 2023 00:58:05 +0000 Subject: [PATCH 374/426] Include required header in Infimaximal_box.h --- Nef_3/include/CGAL/Nef_3/Infimaximal_box.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h index 05aabb0edd2..b1eb8d6b9ee 100644 --- a/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h +++ b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h @@ -24,6 +24,7 @@ #include #include +#include namespace CGAL { From 86ec9ce18687dd711cda78516e4f1491b515fba8 Mon Sep 17 00:00:00 2001 From: Mael Date: Fri, 20 Jan 2023 22:28:05 +0100 Subject: [PATCH 375/426] Fix indentation --- .../include/CGAL/Polygon_mesh_processing/measure.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 b57eb0f7c96..735a6af1d1c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -346,14 +346,14 @@ longest_border(const PolygonMesh& pmesh, { FT len = 0; for(halfedge_descriptor haf : halfedges_around_face(h, pmesh)) - { - len += edge_length(haf, pmesh, np); - } + { + len += edge_length(haf, pmesh, np); + } if(result_len < len) - { - result_len = len; - result_halfedge = h; - } + { + result_len = len; + result_halfedge = h; + } } return std::make_pair(result_halfedge, result_len); } From 6c6d212dc42780a36b928cc5a5092443fd3e0e5b Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Fri, 20 Jan 2023 23:05:16 +0000 Subject: [PATCH 376/426] Revert cases where lexical_cast is converting type that can be inserted into a std::ostream --- .../Arrangement_on_surface_2/Traits_base_test.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h index fc38d031c77..9bfe463e3bf 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/Traits_base_test.h @@ -10,6 +10,7 @@ #include // #include +#include #include #include @@ -122,8 +123,8 @@ protected: typename Traits::Equal_2 equal = this->m_geom_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; - std::string exp_answer_str = std::to_string(exp_answer); - std::string real_answer_str = std::to_string(real_answer); + std::string exp_answer_str = boost::lexical_cast(exp_answer); + std::string real_answer_str = boost::lexical_cast(real_answer); this->print_answer(exp_answer_str, real_answer_str, "point"); return false; } @@ -135,8 +136,8 @@ protected: typename Traits::Equal_2 equal = this->m_geom_traits.equal_2_object(); if (equal(exp_answer, real_answer)) return true; - std::string exp_answer_str = std::to_string(exp_answer); - std::string real_answer_str = std::to_string(real_answer); + std::string exp_answer_str = boost::lexical_cast(exp_answer); + std::string real_answer_str = boost::lexical_cast(real_answer); this->print_answer(exp_answer_str, real_answer_str, "x-monotone curve"); return false; } @@ -148,8 +149,8 @@ protected: const char* str = "result") { if (exp_answer == real_answer) return true; - std::string exp_answer_str = std::to_string(exp_answer); - std::string real_answer_str = std::to_string(real_answer); + std::string exp_answer_str = boost::lexical_cast(exp_answer); + std::string real_answer_str = boost::lexical_cast(real_answer); this->print_answer(exp_answer_str, real_answer_str, str); return false; } From c17c14ff7ab646610c581e882cbd7eda6bd49975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 24 Jan 2023 10:55:29 +0100 Subject: [PATCH 377/426] Fix set-but-not-used warning --- .../internal/Triangle_3_Triangle_3_intersection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h index fa148adcba2..424e1fc9361 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Triangle_3_Triangle_3_intersection.h @@ -51,7 +51,7 @@ void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p, for (Iterator it=inter_pts.begin();it!=inter_pts.end();++it) orientations[ &(*it) ]=orient(p,q,r,*it); - int pt_added = 0; + CGAL_kernel_assertion_code(int pt_added = 0;) const typename Kernel::Point_3* prev = &(*boost::prior(inter_pts.end())); Iterator stop = inter_pts.size() > 2 ? inter_pts.end() : boost::prior(inter_pts.end()); @@ -75,7 +75,7 @@ void intersection_coplanar_triangles_cutoff(const typename Kernel::Point_3& p, prev = &(*inter_pts.insert(it,*inter)); orientations[prev] = COLLINEAR; - ++pt_added; + CGAL_kernel_assertion_code(++pt_added;) } prev = &(*it); From 35ffe120e10512a953cf421a4ca8f2d0e50b394e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 24 Jan 2023 10:41:22 +0000 Subject: [PATCH 378/426] fix merge conflict --- .../include/CGAL/Polygon_mesh_processing/measure.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 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 735a6af1d1c..ac5a340d816 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include @@ -338,17 +338,14 @@ longest_border(const PolygonMesh& pmesh, typename property_map_value::type>::Kernel::FT FT; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - std::deque boundary_cycles; + std::vector boundary_cycles; extract_boundary_cycles(pmesh, std::back_inserter(boundary_cycles)); halfedge_descriptor result_halfedge = boost::graph_traits::null_halfedge(); FT result_len = 0; for(halfedge_descriptor h : boundary_cycles) { - FT len = 0; - for(halfedge_descriptor haf : halfedges_around_face(h, pmesh)) - { - len += edge_length(haf, pmesh, np); - } + FT len = face_border_length(h, pmesh, np); + if(result_len < len) { result_len = len; From 4e5c945d6c270044435732728c58839a9b18eabb Mon Sep 17 00:00:00 2001 From: Giles Bathgate Date: Tue, 24 Jan 2023 22:34:02 +0000 Subject: [PATCH 379/426] Introduce SNC_const_point_locator typedef for Binary_operation callback --- Nef_3/include/CGAL/Nef_3/Binary_operation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Nef_3/include/CGAL/Nef_3/Binary_operation.h b/Nef_3/include/CGAL/Nef_3/Binary_operation.h index fbf654a369a..510a95b683b 100644 --- a/Nef_3/include/CGAL/Nef_3/Binary_operation.h +++ b/Nef_3/include/CGAL/Nef_3/Binary_operation.h @@ -84,6 +84,7 @@ class Binary_operation : public CGAL::SNC_decorator { typedef CGAL::SNC_SM_overlayer SM_overlayer; typedef CGAL::SM_point_locator SM_point_locator; typedef CGAL::SNC_point_locator SNC_point_locator; + typedef CGAL::SNC_point_locator SNC_const_point_locator; typedef typename SNC_structure::Vertex_handle Vertex_handle; typedef typename SNC_structure::Halfedge_handle Halfedge_handle; @@ -171,7 +172,7 @@ class Binary_operation : public CGAL::SNC_decorator { typename Selection, typename Association> class Intersection_call_back : - public CGAL::SNC_point_locator::Intersection_call_back + public SNC_const_point_locator::Intersection_call_back { typedef typename SNC_decorator::Decorator_traits Decorator_traits; typedef typename Decorator_traits::Halfedge_handle Halfedge_handle; From 6a2932b8d279bac30777b1a206807714c0290c85 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 15:42:54 +0000 Subject: [PATCH 380/426] LCC: Add an incremental builder --- .../doc/Linear_cell_complex/PackageDescription.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index 42da9fd9276..975b4a3f053 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -63,6 +63,7 @@ - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` - `CGAL::Linear_cell_complex` +- `CGAL::Linear_cell_complex_incremental_builder_3` \cgalCRPSection{Global Functions} \cgalCRPSubsection{Constructions for Linear Cell Complex} @@ -78,4 +79,3 @@ - \link PkgDrawLinearCellComplex CGAL::draw() \endlink */ - From ac00c68f38219572b191508fbcea1abfd6933563 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:06:13 +0000 Subject: [PATCH 381/426] Add file --- .../Linear_cell_complex_incremental_builder.h | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h new file mode 100644 index 00000000000..771b00fa46a --- /dev/null +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h @@ -0,0 +1,94 @@ + +namespace CGAL { + +/*! +\ingroup PkgLinearCellComplexClasses + +The auxiliary class `Linear_cell_complex_incremental_builder` supports the incremental +construction of linear cell complexes. + +\tparam LCC a linear cell complex +*/ + +template < class LCC > +class Linear_cell_complex_incremental_builder_3 +{ + typedef LCC_ LCC; + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + typedef typename LCC::Point Point_3; + typedef typename LCC::size_type size_type; + + /// \name Creation + /// @{ + + /*! + * Constructor + */ + Linear_cell_complex_incremental_builder_3(LCC & alcc); + +/// @} + + /*! +\name Surface Creation + +To build a linear cell complex, the following regular expression gives +the correct and allowed order and nesting of method calls from this +section: + +\code +begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) end_surface +\endcode +*/ +/// @{ + + + /*! + * + */ + void begin_surface(); + + + /*! + * adds a new vertex for `p` and returns its handle. + */ + VAH add_vertex(const Point_3& p); + + /* + * starts a new facet and returns its handle. + */ + void begin_facet(); + + /*! + * + */ + void add_vertex_to_facet(size_type i); + + /*! + * End of the facet. Returns the first dart of this facet. + */ + DH end_facet(); + + + /*! + * End of the surface construction. Returns one dart of the created surface. + */ + DH end_surface(); + +/// @} + +/// \name Additional Operations +/// @{ + +/*! + * is a synonym for `begin_facet()`, a call to `add_vertex_to_facet()` for each + * value in the range `[first,beyond)`, and a call to `end_facet()`. + */ + DH add_facet(std::initializer_list l); + + +/// @} + + }; + +} // namespace CGAL From d6e5e22ce10760f69240a39e1e2eb52534edaef8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:15:40 +0000 Subject: [PATCH 382/426] No _3 --- .../doc/Linear_cell_complex/PackageDescription.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index 975b4a3f053..f6ba76d90be 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -63,7 +63,7 @@ - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` - `CGAL::Linear_cell_complex` -- `CGAL::Linear_cell_complex_incremental_builder_3` +- `CGAL::Linear_cell_complex_incremental_builder` \cgalCRPSection{Global Functions} \cgalCRPSubsection{Constructions for Linear Cell Complex} From 217a65bfba83027c1fb47688b9397550b61849e9 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:25:58 +0000 Subject: [PATCH 383/426] Make public: --- .../CGAL/Linear_cell_complex_incremental_builder.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h index 771b00fa46a..8f19ee07783 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h @@ -13,6 +13,7 @@ construction of linear cell complexes. template < class LCC > class Linear_cell_complex_incremental_builder_3 { + public: typedef LCC_ LCC; typedef typename LCC::Dart_descriptor DH; typedef typename LCC::Vertex_attribute_descriptor VAH; From 17b86d5536932e482d5a5c12bfd43eadbd712a7f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:32:19 +0000 Subject: [PATCH 384/426] Another _3 --- .../CGAL/Linear_cell_complex_incremental_builder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h index 8f19ee07783..9663a9693c3 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h @@ -11,7 +11,7 @@ construction of linear cell complexes. */ template < class LCC > -class Linear_cell_complex_incremental_builder_3 +class Linear_cell_complex_incremental_builder { public: typedef LCC_ LCC; @@ -26,7 +26,7 @@ class Linear_cell_complex_incremental_builder_3 /*! * Constructor */ - Linear_cell_complex_incremental_builder_3(LCC & alcc); + Linear_cell_complex_incremental_builder(LCC & alcc); /// @} From 909199ea30cc746c39e97fb8152db6a3d614acee Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 26 Jan 2023 12:54:27 +0100 Subject: [PATCH 385/426] issue #7211 Manual bug Corrected slashes in the windows part --- Documentation/doc/Documentation/windows.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/doc/Documentation/windows.txt b/Documentation/doc/Documentation/windows.txt index 02596bcd35d..c4daa8fc380 100644 --- a/Documentation/doc/Documentation/windows.txt +++ b/Documentation/doc/Documentation/windows.txt @@ -45,11 +45,11 @@ of `vcpkg` if you want to compile for an older version of a compiler. Because of a bug with gmp in vcpkg for windows, you need to install `yasm-tool` in 32 bits to be able to correctly build gmp 64bits, needed for cgal: - C:\dev\vcpkg> ./vcpkg.exe install yasm-tool:x86-windows + C:\dev\vcpkg> .\vcpkg.exe install yasm-tool:x86-windows You are now ready to install \cgal: - C:\dev\vcpkg> ./vcpkg.exe install cgal + C:\dev\vcpkg> .\vcpkg.exe install cgal This will take several minutes as it downloads \gmp, \mpfr, all boost header files, and it will compile \gmp and \mpfr, as well @@ -114,14 +114,14 @@ not depend on `Qt`. However, one of the examples in the Triangulation_2 package for visualization purposes. If you already have `Qt` installed, you can simply fill in the requested CMake variables and paths. Otherwise, you can also install it using `vcpkg`: - C:\dev\vcpkg> ./vcpkg.exe install qt5 + C:\dev\vcpkg> .\vcpkg.exe install qt5 Remember to specify `--triplet` or the related environment variable in case you target 64-bit applications. As Qt5 is modular and as the \cgal examples and demos use only some of these modules you can save download and compilation time by specifying an *installation option*: - C:\dev\vcpkg> ./vcpkg.exe install cgal[qt] + C:\dev\vcpkg> .\vcpkg.exe install cgal[qt] In both cases, when you start `cmake-gui` again and hit the *Configure* button, the CMake variables and paths concerning Qt should now be filled. From d671f6069a18a47f9320cabcdd1a1d2c2618a3ef Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:04:44 +0545 Subject: [PATCH 386/426] added user input --- .../polyfit_example_model_complexity_control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp index e132d62975d..cf1ce77b8b1 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp @@ -39,9 +39,9 @@ typedef CGAL::Nth_of_tuple_property_map<2, PNI> * candidate generation are cached and reused. */ -int main() +int main(int argc, char* argv[]) { - const std::string& input_file(CGAL::data_file_path("points_3/building.ply")); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/building.ply"); std::ifstream input_stream(input_file.c_str()); std::vector points; // store points From c7aac265f5c7e06e8d12ac03f483b87ab115b84e Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:05:45 +0545 Subject: [PATCH 387/426] added user input --- .../polyfit_example_user_provided_planes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp index 2f2ed2df2c9..5db8d3f3700 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp @@ -39,9 +39,9 @@ typedef CGAL::Nth_of_tuple_property_map<2, PNI> * the point is not assigned to a plane). */ -int main() +int main(int argc, char* argv[]) { - const std::string& input_file(CGAL::data_file_path("points_3/ball.ply")); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/ball.ply"); std::ifstream input_stream(input_file.c_str()); std::vector points; // store points From 5fb7ad3b999aef665f3788ec88ff282a2c6ff3e7 Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:07:25 +0545 Subject: [PATCH 388/426] added user input --- .../polyfit_example_with_region_growing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp index 493c8c138aa..530d1422de4 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp @@ -83,13 +83,13 @@ private: * the surface model from the planes. */ -int main() +int main(int argc, char* argv[]) { Point_vector points; // Load point set from a file. - const std::string input_file(CGAL::data_file_path("points_3/cube.pwn")); - std::ifstream input_stream(input_file.c_str()); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/cube.pwn"); + std::ifstream input_stream(input_file.c_str()); if (input_stream.fail()) { std::cerr << "Failed open file \'" << input_file << "\'" << std::endl; return EXIT_FAILURE; From 63cead9d2bade3bc659822bff890c3b07667b320 Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:08:22 +0545 Subject: [PATCH 389/426] added user input --- .../polyfit_example_without_input_planes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp index 4b2ed8f91a4..d14411babd1 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp @@ -52,13 +52,13 @@ typedef CGAL::Surface_mesh * the surface model from the planes. */ -int main() +int main(int argc, char* argv[]) { Point_vector points; // Loads point set from a file. - const std::string input_file(CGAL::data_file_path("points_3/cube.pwn")); - std::ifstream input_stream(input_file.c_str()); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/cube.pwn"); + std::ifstream input_stream(input_file.c_str()); if (input_stream.fail()) { std::cerr << "failed open file \'" < Date: Fri, 27 Jan 2023 13:37:34 +0000 Subject: [PATCH 390/426] Largest Empty Iso Rectangle: Ignore points on the border --- .../Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h | 6 ++++-- .../examples/Inscribed_areas/largest_empty_rectangle.cpp | 3 +-- .../include/CGAL/Largest_empty_iso_rectangle_2.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h index f11af4ccdf1..080fc203bfb 100644 --- a/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h @@ -142,9 +142,11 @@ Iso_rectangle_2 get_bounding_box(); /// @{ /*! -Inserts point `p` in the point set, if it is not already in the set. +Inserts point `p` in the point set, if it is not already in the set +and on the bounded side of the bounding rectangle. +\note Points on the boundary can be ignored as they lead to the same result. */ -void +bool insert(const Point_2& p); /*! diff --git a/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp b/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp index 5128e958d84..bbf8989b7b8 100644 --- a/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp +++ b/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp @@ -1,8 +1,7 @@ #include -#include #include -#include +#include typedef double Number_Type; typedef CGAL::Simple_cartesian K; diff --git a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h index 382c80e2c0b..b82f038bae1 100644 --- a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -762,7 +762,7 @@ bool Largest_empty_iso_rectangle_2::insert(const Point_2& _p) { // check that the point is inside the bounding box - if(bbox_p.has_on_unbounded_side(_p)) { + if(! bbox_p.has_on_bounded_side(_p)) { return(false); } From b71d2b1f0055a141f03c2a2ff4c78cdf95698f24 Mon Sep 17 00:00:00 2001 From: SaillantNicolas <97436229+SaillantNicolas@users.noreply.github.com> Date: Fri, 27 Jan 2023 15:00:05 +0100 Subject: [PATCH 391/426] fix typo in cmake-all workflow --- .github/workflows/cmake-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-all.yml b/.github/workflows/cmake-all.yml index 614393edfee..d0507b4d430 100644 --- a/.github/workflows/cmake-all.yml +++ b/.github/workflows/cmake-all.yml @@ -1,6 +1,6 @@ name: CMake Testsuite -on: [push, pull_request, workflow_dispatch:] +on: [push, pull_request, workflow_dispatch] permissions: contents: read From 798bd0898992726c991fc74090f688e8e66d2c3e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 30 Jan 2023 09:37:46 +0100 Subject: [PATCH 392/426] Remove workflow_dispatch for build_doc As the workflow is already reacting to user actions, there is no need to trigger it manually. Besides, it requires an `issue_comment` context. --- .github/workflows/build_doc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 3484e24bfa5..bf879c0396c 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -3,7 +3,6 @@ name: Documentation on: issue_comment: types: [created] - workflow_dispatch: permissions: contents: read # to fetch code (actions/checkout) From 48b07bef84deaa9d5e0b0ecebf7c94794371f600 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 30 Jan 2023 13:34:59 +0100 Subject: [PATCH 393/426] Not PUSH_TO_CGAL_GITHUB_IO_TOKEN to checkout the PR branch --- .github/workflows/build_doc.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index bf879c0396c..a2ee453953d 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -66,7 +66,6 @@ jobs: with: repository: ${{ github.repository }} ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge - token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }} fetch-depth: 2 - name: install dependencies From ab2a655a53dd0ff1b78cddba726171bc3421c47e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Jan 2023 13:44:08 +0000 Subject: [PATCH 394/426] Fixes after Guillaume's review --- .../doc/Linear_cell_complex/PackageDescription.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index f6ba76d90be..5978b48c317 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -62,7 +62,6 @@ - `CGAL::Linear_cell_complex_traits` - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` -- `CGAL::Linear_cell_complex` - `CGAL::Linear_cell_complex_incremental_builder` \cgalCRPSection{Global Functions} From 54245a754ff3c96cb132f9db35ab07a4a9801f5c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Jan 2023 14:38:31 +0000 Subject: [PATCH 395/426] Add example --- .../doc/Linear_cell_complex/examples.txt | 1 + .../Linear_cell_complex/CMakeLists.txt | 1 + ...ear_cell_complex_3_incremental_builder.cpp | 58 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp diff --git a/Linear_cell_complex/doc/Linear_cell_complex/examples.txt b/Linear_cell_complex/doc/Linear_cell_complex/examples.txt index f41e9b41af0..4f178f666d1 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/examples.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/examples.txt @@ -3,5 +3,6 @@ \example Linear_cell_complex/linear_cell_complex_3.cpp \example Linear_cell_complex/linear_cell_complex_4.cpp \example Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp +\example Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp \example Linear_cell_complex/draw_linear_cell_complex.cpp */ diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 1ee1208d461..27f68625fc3 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -21,6 +21,7 @@ create_single_source_cgal_program("linear_cell_complex_3_operations.cpp") create_single_source_cgal_program( "linear_cell_complex_3_with_colored_vertices.cpp") create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp") +create_single_source_cgal_program("linear_cell_complex_3_incremntal_builder.cpp") create_single_source_cgal_program("linear_cell_complex_4.cpp") create_single_source_cgal_program("plane_graph_to_lcc_2.cpp") create_single_source_cgal_program("voronoi_2.cpp") diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp new file mode 100644 index 00000000000..6ad599abb91 --- /dev/null +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -0,0 +1,58 @@ +#include +#include +#include + +typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3; +using Point=LCC_3::Point; + +//============================================================================== +int main() +{ + LCC_3 lcc; + CGAL::Linear_cell_complex_incremental_builder_3 ib(lcc); + + ib.add_vertex(Point(0,0,0)); // vertex 0 + ib.add_vertex(Point(1,0,0)); // vertex 1 + ib.add_vertex(Point(1,1,0)); // vertex 2 + ib.add_vertex(Point(0,1,0)); // vertex 3 + + ib.add_vertex(Point(0,1,1)); // vertex 4 + ib.add_vertex(Point(0,0,1)); // vertex 5 + ib.add_vertex(Point(1,0,1)); // vertex 6 + ib.add_vertex(Point(1,1,1)); // vertex 7 + + // Create a cube + ib.begin_surface(); + ib.add_facet({0,1,2,3}); // Create a new facet v1: given all of its indices + ib.add_facet({1,0,5,6}); + ib.add_facet({2,1,6,7}); + ib.add_facet({3,2,7,4}); + + ib.begin_facet(); // Create a new facet v2: begin facet + ib.add_vertex_to_facet(0); // all incrementally its indices + ib.add_vertex_to_facet(3); + ib.add_vertex_to_facet(4); + ib.add_vertex_to_facet(5); + ib.end_facet(); // end facet + + ib.add_facet({5,4,7,6}); + + ib.end_surface(); + + ib.add_vertex(Point(-1, 0.5, 0.5)); // vertex 8 + + // Create a pyramid, sharing one of its face with the cube + ib.begin_surface(); + ib.add_facet({3,0,5,4}); + ib.add_facet({0,3,8}); + ib.add_facet({3,4,8}); + ib.add_facet({4,5,8}); + ib.add_facet({5,0,8}); + ib.end_surface(); + + // Draw the lcc and display its characteristics + lcc.display_characteristics(std::cout)< Date: Mon, 30 Jan 2023 15:03:53 +0000 Subject: [PATCH 396/426] Fix CMakeLists.txt --- .../examples/Linear_cell_complex/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 27f68625fc3..d0ed1c3a028 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -21,7 +21,7 @@ create_single_source_cgal_program("linear_cell_complex_3_operations.cpp") create_single_source_cgal_program( "linear_cell_complex_3_with_colored_vertices.cpp") create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp") -create_single_source_cgal_program("linear_cell_complex_3_incremntal_builder.cpp") +create_single_source_cgal_program("linear_cell_complex_3_incremental_builder.cpp") create_single_source_cgal_program("linear_cell_complex_4.cpp") create_single_source_cgal_program("plane_graph_to_lcc_2.cpp") create_single_source_cgal_program("voronoi_2.cpp") @@ -30,4 +30,5 @@ create_single_source_cgal_program("voronoi_3.cpp") create_single_source_cgal_program("draw_linear_cell_complex.cpp") if(CGAL_Qt5_FOUND) target_link_libraries(draw_linear_cell_complex PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(linear_cell_complex_3_incremental_builder PUBLIC CGAL::CGAL_Basic_viewer) endif() From 5270bbfdc703796c71af592105e5dac91b922b81 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Jan 2023 15:09:58 +0000 Subject: [PATCH 397/426] trailing whitespace --- .../linear_cell_complex_3_incremental_builder.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 6ad599abb91..1e16e5efdec 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -10,7 +10,7 @@ int main() { LCC_3 lcc; CGAL::Linear_cell_complex_incremental_builder_3 ib(lcc); - + ib.add_vertex(Point(0,0,0)); // vertex 0 ib.add_vertex(Point(1,0,0)); // vertex 1 ib.add_vertex(Point(1,1,0)); // vertex 2 @@ -34,13 +34,13 @@ int main() ib.add_vertex_to_facet(4); ib.add_vertex_to_facet(5); ib.end_facet(); // end facet - + ib.add_facet({5,4,7,6}); - + ib.end_surface(); ib.add_vertex(Point(-1, 0.5, 0.5)); // vertex 8 - + // Create a pyramid, sharing one of its face with the cube ib.begin_surface(); ib.add_facet({3,0,5,4}); @@ -48,11 +48,11 @@ int main() ib.add_facet({3,4,8}); ib.add_facet({4,5,8}); ib.add_facet({5,0,8}); - ib.end_surface(); + ib.end_surface(); // Draw the lcc and display its characteristics lcc.display_characteristics(std::cout)< Date: Tue, 31 Jan 2023 08:36:31 +0000 Subject: [PATCH 398/426] Polygon: Fix erase(Vertex_circulator) --- Polygon/include/CGAL/Polygon_2.h | 7 +++++-- Polygon/test/Polygon/issue7228.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 Polygon/test/Polygon/issue7228.cpp diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index 987215691ac..9920d8f25f4 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -238,8 +238,11 @@ class Polygon_2 { /// Erases the vertex pointed to by `i`. Vertex_circulator erase(Vertex_circulator i) { - return Vertex_circulator(&d_container, - d_container.erase(i.mod_iterator())); + auto it = d_container.erase(i.mod_iterator()); + if(it == d_container.end()){ + it = d_container.begin(); + } + return Vertex_circulator(&d_container, it); } /// Erases the vertices in the range `[first, last)`. diff --git a/Polygon/test/Polygon/issue7228.cpp b/Polygon/test/Polygon/issue7228.cpp new file mode 100644 index 00000000000..2740f7afa42 --- /dev/null +++ b/Polygon/test/Polygon/issue7228.cpp @@ -0,0 +1,29 @@ +#include +#include + +#include +#include +#include + +typedef CGAL::Simple_cartesian K; +typedef K::Point_2 Point; +typedef CGAL::Polygon_2 Polygon; +typedef Polygon::Vertex_circulator Vertex_circulator; + +int main() +{ + std::array points = { Point(0,0), Point(1,0), Point(1,1), Point(0,1) }; + Polygon poly(points.begin(), points.end()); + + Vertex_circulator vc = poly.vertices_circulator(); + + ++vc; + ++vc; + ++vc; + + vc = poly.erase(vc); + + assert(*vc == Point(0,0)); + + return 0; +} From 5797ddb48c7820ec4b3c75744ad7b5e807600579 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 31 Jan 2023 10:10:03 +0000 Subject: [PATCH 399/426] Add _3 suffix and add example to the User Manual --- ...near_cell_complex_incremental_builder_3.h} | 6 ++--- .../Linear_cell_complex.txt | 16 +++++++++++++- .../PackageDescription.txt | 2 +- ...ear_cell_complex_3_incremental_builder.cpp | 2 +- ...near_cell_complex_incremental_builder_3.h} | 22 +++++++++---------- 5 files changed, 31 insertions(+), 17 deletions(-) rename Linear_cell_complex/doc/Linear_cell_complex/CGAL/{Linear_cell_complex_incremental_builder.h => Linear_cell_complex_incremental_builder_3.h} (89%) rename Linear_cell_complex/include/CGAL/{Linear_cell_complex_incremental_builder.h => Linear_cell_complex_incremental_builder_3.h} (93%) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h similarity index 89% rename from Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h rename to Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 9663a9693c3..863369c04b5 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -4,14 +4,14 @@ namespace CGAL { /*! \ingroup PkgLinearCellComplexClasses -The auxiliary class `Linear_cell_complex_incremental_builder` supports the incremental +The auxiliary class `Linear_cell_complex_incremental_builder_3` supports the incremental construction of linear cell complexes. \tparam LCC a linear cell complex */ template < class LCC > -class Linear_cell_complex_incremental_builder +class Linear_cell_complex_incremental_builder_3 { public: typedef LCC_ LCC; @@ -26,7 +26,7 @@ class Linear_cell_complex_incremental_builder /*! * Constructor */ - Linear_cell_complex_incremental_builder(LCC & alcc); + Linear_cell_complex_incremental_builder_3(LCC & alcc); /// @} diff --git a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt index 925e269a738..fcb11828b2a 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt @@ -141,6 +141,14 @@ Some examples of use of these operations are given in Section \ref ssec5dexample If \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(false)`\endlink is called, all the future insertion or removal operations will not update non void attributes. These attributes will be updated latter by the call to \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(true)`\endlink. This can be useful to speed up an algorithm which uses several successive insertion and removal operations. See example \ref ssecAttributesManagement "Automatic attributes management". \cgalAdvancedEnd + +\subsection Linear_cell_complexIncrementalBuilder Incremental Builder + +A utility class `Linear_cell_complex_incremental_builder_3` helps in creating 2D and 3D linear cell complexes +from a list of points followed by a list of facets that are represented as indices into the point list. +Note that, compared to `Polyhedron_incremental_builder_3` it has only absolute indexing and no rollback +mechanism. + \section Linear_cell_complexExamples Examples \subsection Linear_cell_complexA3DLinearCellComplex A 3D Linear Cell Complex @@ -264,10 +272,16 @@ Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5 Result of the run of the draw_linear_cell_complex program. A window shows two 3D cubes and allows to navigate through the 3D scene. \cgalFigureEnd +\subsection Linear_cell_complexIncrementalBuilderExample Incremental Builder + +The following example shows the incremental builder + +\cgalExample{Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp} + + \section Linear_cell_complexDesign Design and Implementation History This package was developed by Guillaume Damiand, with the help of Andreas Fabri, Sébastien Loriot and Laurent Rineau. Monique Teillaud and Bernd Gärtner contributed to the manual. */ } /* namespace CGAL */ - diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index 5978b48c317..d8cc1ad2fbd 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -62,7 +62,7 @@ - `CGAL::Linear_cell_complex_traits` - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` -- `CGAL::Linear_cell_complex_incremental_builder` +- `CGAL::Linear_cell_complex_incremental_builder_3` \cgalCRPSection{Global Functions} \cgalCRPSubsection{Constructions for Linear Cell Complex} diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 1e16e5efdec..9bcbb86a5ca 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h similarity index 93% rename from Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder.h rename to Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h index 087b3da7944..8efa806a91e 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -9,8 +9,8 @@ // // Author(s) : Guillaume Damiand // -#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H -#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H 1 +#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H +#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H 1 #include #include @@ -127,7 +127,7 @@ struct Find_opposite_2_with_control { if (!lcc.template is_free<2>(res)) { // Here a dart vah1->vah2 already exists, and it was already 2-sewn. - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< vertex_to_dart_map_in_surface, vah2, vah1)!=lcc.null_descriptor) { // Here a dart vah1->vah2 already exists (but it was not already 2-sewn). - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< { if (!lcc.template is_free<2>(res)) { // Here a dart vah1->vah2 already exists, and it was already 2-sewn. - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< }; /////////////////////////////////////////////////////////////////////////////// template -struct Sew3_for_LCC_incremental_builder +struct Sew3_for_LCC_incremental_builder_3 { static void run(LCC_& lcc, typename LCC_::Dart_descriptor dh1, typename LCC_::Dart_descriptor dh2) @@ -218,8 +218,8 @@ struct Sew3_for_LCC_incremental_builder { if(!lcc.template is_free<3>(dh1)) { - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: " - <<"it exists more than 2 faces with same indices."<(lcc.other_orientation(dh1), dh2); } @@ -227,7 +227,7 @@ struct Sew3_for_LCC_incremental_builder } }; template -struct Sew3_for_LCC_incremental_builder +struct Sew3_for_LCC_incremental_builder_3 { static void run(LCC_&, typename LCC_::Dart_descriptor, typename LCC_::Dart_descriptor) {} @@ -319,7 +319,7 @@ public: if(LCC::dimension>2) { opposite=opposite_face(); - Sew3_for_LCC_incremental_builder::run(lcc, opposite, min_dart); + Sew3_for_LCC_incremental_builder_3::run(lcc, opposite, min_dart); add_face_in_array(); } return first_dart; @@ -404,5 +404,5 @@ private: } //namespace CGAL -#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H // +#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H // // EOF // From 61f535424686258f2bb0c23e051fa96671fc7a20 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 31 Jan 2023 17:35:21 +0100 Subject: [PATCH 400/426] Fix current content in the destroy of the Scene Fix the error: > QOpenGLVertexArrayObject::destroy() failed to restore current context --- Polyhedron/demo/Polyhedron/Scene.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Polyhedron/demo/Polyhedron/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index b148e8df46b..c70929ab4a5 100644 --- a/Polyhedron/demo/Polyhedron/Scene.cpp +++ b/Polyhedron/demo/Polyhedron/Scene.cpp @@ -1928,6 +1928,7 @@ void Scene::removeViewer(Viewer_interface *viewer) if(viewer->property("is_destroyed").toBool()) return; + viewer->makeCurrent(); vaos[viewer]->destroy(); vaos[viewer]->deleteLater(); vaos.remove(viewer); From 4ca40f8e07b4628d80505119e2c25f0ac56bd3c3 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 1 Feb 2023 11:35:19 +0100 Subject: [PATCH 401/426] LCC incremental builder doc --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 863369c04b5..383cb47cd40 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -45,7 +45,7 @@ begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) /*! - * + * starts a new surface. */ void begin_surface(); @@ -56,23 +56,23 @@ begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) VAH add_vertex(const Point_3& p); /* - * starts a new facet and returns its handle. + * starts a new facet. */ void begin_facet(); /*! - * + * add vertex `i` at the end of the current facet. */ void add_vertex_to_facet(size_type i); /*! - * End of the facet. Returns the first dart of this facet. + * end of the facet. Returns the first dart of this facet. */ DH end_facet(); /*! - * End of the surface construction. Returns one dart of the created surface. + * end of the surface construction. Returns one dart of the created surface. */ DH end_surface(); From f1535c2ae4ed29b3d590e9a57308ff2b65a3d806 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 1 Feb 2023 10:52:31 +0000 Subject: [PATCH 402/426] Unify comments --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 383cb47cd40..12525e0cc33 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -61,18 +61,18 @@ begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) void begin_facet(); /*! - * add vertex `i` at the end of the current facet. + * adds vertex `i` at the end of the current facet. */ void add_vertex_to_facet(size_type i); /*! - * end of the facet. Returns the first dart of this facet. + * ends the construction of the facet and returns the first dart of this facet. */ DH end_facet(); /*! - * end of the surface construction. Returns one dart of the created surface. + * ends the construction of the surface and returns one dart of the created surface. */ DH end_surface(); From 612991fa841068cf5e407ed7ed5e3cdf29447636 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 1 Feb 2023 13:08:51 +0100 Subject: [PATCH 403/426] add _3 after LCC incremental builder --- .../include/CGAL/Linear_cell_complex_constructors.h | 2 +- .../test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h index c1032854fba..1bdac283a67 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h @@ -13,7 +13,7 @@ #define CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H 1 #include -#include +#include #include #include diff --git a/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp index 2569b0f929b..03d6bf55922 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include "Linear_cell_complex_3_test.h" From 1530b0a25d8fee4241964b4b5c1b361b97f4c2ed Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 1 Feb 2023 13:02:03 +0000 Subject: [PATCH 404/426] Traverse the linear cell complex in the example --- .../linear_cell_complex_3_incremental_builder.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 9bcbb86a5ca..d05c1c1009f 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -50,6 +50,20 @@ int main() ib.add_facet({5,0,8}); ib.end_surface(); + + LCC_3::One_dart_per_cell_range<3,3> cells = lcc.one_dart_per_cell<3>(); + for (auto c = cells.begin(); c != cells.end(); ++c) { + std::cout << "a cell"<< std::endl; + LCC_3::One_dart_per_incident_cell_range<2,3> faces = lcc.one_dart_per_incident_cell<2,3>(c); + for (auto f = faces.begin(); f != faces.end(); ++f) { + std::cout << " a face"<< std::endl; + LCC_3::One_dart_per_incident_cell_range<0,2> vertices = lcc.one_dart_per_incident_cell<0,2>(f); + for(auto v = vertices.begin(); v!= vertices.end(); ++v){ + std::cout << " " << lcc.point(v) << std::endl; + } + } + } + // Draw the lcc and display its characteristics lcc.display_characteristics(std::cout)< Date: Thu, 2 Feb 2023 08:00:29 +0000 Subject: [PATCH 405/426] Fix doc --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 12525e0cc33..f231dbf323e 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -7,7 +7,7 @@ namespace CGAL { The auxiliary class `Linear_cell_complex_incremental_builder_3` supports the incremental construction of linear cell complexes. -\tparam LCC a linear cell complex +\tparam LCC must be a model of the concept `LinearCellComplex` */ template < class LCC > @@ -40,6 +40,10 @@ section: \code begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) end_surface \endcode + +When an edge is added in a facet, if the same edge exists in another facet of the same surface, then the two facets are glued along this edge. + +When a facet is added, if the same facet exists in another surface, the two surfaces are glued along this facet. */ /// @{ From 7b3fd28dac67f2319145a94f6e6d77b9013d657e Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Thu, 2 Feb 2023 12:31:35 +0100 Subject: [PATCH 406/426] missing dot --- .../doc/Linear_cell_complex/Linear_cell_complex.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt index fcb11828b2a..6eae9275a75 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt @@ -274,7 +274,7 @@ Result of the run of the draw_linear_cell_complex program. A window shows two 3D \subsection Linear_cell_complexIncrementalBuilderExample Incremental Builder -The following example shows the incremental builder +The following example shows the incremental builder. \cgalExample{Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp} From a0826b492942970ca9184ba475f4e9c6e688684f Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Thu, 2 Feb 2023 12:31:53 +0100 Subject: [PATCH 407/426] update documentation in example --- .../linear_cell_complex_3_incremental_builder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index d05c1c1009f..2c53a5dfb6d 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -23,13 +23,13 @@ int main() // Create a cube ib.begin_surface(); - ib.add_facet({0,1,2,3}); // Create a new facet v1: given all of its indices + ib.add_facet({0,1,2,3}); // Create a new facet version 1: given all of its indices ib.add_facet({1,0,5,6}); ib.add_facet({2,1,6,7}); ib.add_facet({3,2,7,4}); - ib.begin_facet(); // Create a new facet v2: begin facet - ib.add_vertex_to_facet(0); // all incrementally its indices + ib.begin_facet(); // Create a new facet version 2: begin facet + ib.add_vertex_to_facet(0); // add sucessively its indices ib.add_vertex_to_facet(3); ib.add_vertex_to_facet(4); ib.add_vertex_to_facet(5); From c37341671e4a3058aec4122fbb34ff95fad04f99 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 2 Feb 2023 12:29:29 +0000 Subject: [PATCH 408/426] Turn comment into doxygen comment --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index f231dbf323e..a2c950d46d6 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -59,7 +59,7 @@ When a facet is added, if the same facet exists in another surface, the two surf */ VAH add_vertex(const Point_3& p); - /* + /*! * starts a new facet. */ void begin_facet(); From c716775fc05e249366dd838cb98d1283aa2e1475 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 2 Feb 2023 12:33:29 +0000 Subject: [PATCH 409/426] Add to change log --- Installation/CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a8e5332db23..63acb4dc055 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -14,6 +14,9 @@ Release date: June 2023 - Added a version that uses indices instead of handles as dart and attribute descriptors. As the indices are integers convertible from and to `std::size_t`, they can be used as index into vectors which store properties. To use the index version, `Use_index` must be defined and be equal to `CGAL::Tag_true` in the item class. +### [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) +- Added the class `Linear_cell_complex_incremental_builder_3`. + ### [Polygon Mesh Processing](https://doc.cgal.org/5.6/Manual/packages.html#PkgPolygonMeshProcessing) - **Breaking change**: Deprecated the overloads of functions `CGAL::Polygon_mesh_processing::triangulate_hole()`, From b2798bc81ebd1860d270a55ec1fafe147ae4cae6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 2 Feb 2023 14:33:28 +0000 Subject: [PATCH 410/426] polish the example --- .../linear_cell_complex_3_incremental_builder.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 2c53a5dfb6d..414be85978a 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -5,7 +5,7 @@ typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3; using Point=LCC_3::Point; -//============================================================================== + int main() { LCC_3 lcc; @@ -23,25 +23,24 @@ int main() // Create a cube ib.begin_surface(); - ib.add_facet({0,1,2,3}); // Create a new facet version 1: given all of its indices + ib.add_facet({0,1,2,3}); // Create a new facet version 1: given all of its indices ib.add_facet({1,0,5,6}); ib.add_facet({2,1,6,7}); ib.add_facet({3,2,7,4}); + ib.add_facet({5,4,7,6}); - ib.begin_facet(); // Create a new facet version 2: begin facet + ib.begin_facet(); // Create a new facet version 2: begin facet ib.add_vertex_to_facet(0); // add sucessively its indices ib.add_vertex_to_facet(3); ib.add_vertex_to_facet(4); ib.add_vertex_to_facet(5); - ib.end_facet(); // end facet - - ib.add_facet({5,4,7,6}); + ib.end_facet(); ib.end_surface(); ib.add_vertex(Point(-1, 0.5, 0.5)); // vertex 8 - // Create a pyramid, sharing one of its face with the cube + // Create a pyramid, sharing one of its facets with a facet of the cube ib.begin_surface(); ib.add_facet({3,0,5,4}); ib.add_facet({0,3,8}); From 0ea013ea12171f04077dfdffd13e1c0b01778c2d Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 3 Feb 2023 12:07:03 +0100 Subject: [PATCH 411/426] Spelling corrections Some spelling corrections. --- .../Arr_spherical_topology_traits_2_impl.h | 10 +++++----- Documentation/doc/biblio/geom.bib | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h index fbe5e059eef..9175587a317 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_topology_traits/Arr_spherical_topology_traits_2_impl.h @@ -215,16 +215,16 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const /*! We identify 2 main cases: * 1. The vertical ray intersects the boundary at a halfedge. In this - * case the x-possition of p is strictly larger than the x-possition of - * the current-curve source, and strictly smaller than x-possition of + * case the x-position of p is strictly larger than the x-position of + * the current-curve source, and strictly smaller than x-position of * the current-curve target, or vice versa. * 2. The vertical ray intersects the boundary at a vertex. In this case: - * a. the x-possition of p is strictly smaller than the x-position of the + * a. the x-position of p is strictly smaller than the x-position of the * current-curve source, and equal to the x-position of the current-curve * target, and - * b. the x-possition of p is equal to the x-position of the next-curve + * b. the x-position of p is equal to the x-position of the next-curve * source (not counting vertical curves in between), and strictly larger - * than the x-possition of the next-curve target, or vice verase (that is, + * than the x-position of the next-curve target, or vice verase (that is, * the "smaller" and "larger" interchanged). */ diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index 26c34ce172a..969a1a79b5b 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -137313,7 +137313,7 @@ Contains C code." @inproceedings{ss-kaud-88 , author = "Th. Strothotte and J.-R. Sack" -, title = "Knowledge Aquisition using Diagrams" +, title = "Knowledge Acquisition using Diagrams" , booktitle = "Proc. 3rd IFIP Conference on Man-Machine Systems" , site = "Oulo, Finland" , year = 1988 From bf6d67951ce2de119f822dfde5ddb2a13d168763 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 20 Jan 2023 13:54:29 +0100 Subject: [PATCH 412/426] Introduce Base_with_time_stamp --- .../include/CGAL/Base_with_time_stamp.h | 48 +++++++++++++++++++ .../test/Triangulation_2/issue_4405.cpp | 31 +----------- .../test_cdt_degenerate_case.cpp | 31 +----------- 3 files changed, 52 insertions(+), 58 deletions(-) create mode 100644 STL_Extension/include/CGAL/Base_with_time_stamp.h diff --git a/STL_Extension/include/CGAL/Base_with_time_stamp.h b/STL_Extension/include/CGAL/Base_with_time_stamp.h new file mode 100644 index 00000000000..1e2dbeff088 --- /dev/null +++ b/STL_Extension/include/CGAL/Base_with_time_stamp.h @@ -0,0 +1,48 @@ +// Copyright (c) 2023 GeometryFactory Sarl (France). +// All rights reserved. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_BASE_WITH_TIME_STAMP_H +#define CGAL_BASE_WITH_TIME_STAMP_H + +#include // for Tag_true +#include // for std::size_t +#include // for std::forward + +namespace CGAL { + +template +class Base_with_time_stamp : public Base { + std::size_t time_stamp_ = -1; +public: + using Base::Base; + + Base_with_time_stamp(const Base_with_time_stamp& other) : + Base(other), + time_stamp_(other.time_stamp_) + {} + + typedef CGAL::Tag_true Has_timestamp; + + std::size_t time_stamp() const { + return time_stamp_; + } + void set_time_stamp(const std::size_t& ts) { + time_stamp_ = ts; + } + + template < class TDS > + struct Rebind_TDS { + typedef typename Base::template Rebind_TDS::Other Base2; + typedef Base_with_time_stamp Other; + }; +}; + +} // namespace CGAL + +#endif // CGAL_BASE_WITH_TIME_STAMP_H diff --git a/Triangulation_2/test/Triangulation_2/issue_4405.cpp b/Triangulation_2/test/Triangulation_2/issue_4405.cpp index c0e412e6209..ff8ebffa239 100644 --- a/Triangulation_2/test/Triangulation_2/issue_4405.cpp +++ b/Triangulation_2/test/Triangulation_2/issue_4405.cpp @@ -4,47 +4,20 @@ #include #include #include +#include typedef CGAL::Epick Kernel; typedef Kernel::FT FieldNumberType; typedef Kernel::Point_2 Point2; typedef Kernel::Point_3 Point3; -template -class My_vertex_base : public Vb { - std::size_t time_stamp_; -public: - My_vertex_base() : Vb(), time_stamp_(-1) { - } - - My_vertex_base(const My_vertex_base& other) : - Vb(other), - time_stamp_(other.time_stamp_) - {} - - typedef CGAL::Tag_true Has_timestamp; - - std::size_t time_stamp() const { - return time_stamp_; - } - void set_time_stamp(const std::size_t& ts) { - time_stamp_ = ts; - } - - template < class TDS > - struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - typedef My_vertex_base Other; - }; -}; - struct FaceInfo2 { unsigned long long m_id; }; typedef CGAL::Projection_traits_xy_3 TriangulationTraits; typedef CGAL::Triangulation_vertex_base_with_id_2 VertexBaseWithId; -typedef My_vertex_base Vb2; +typedef CGAL::Base_with_time_stamp Vb2; typedef CGAL::Triangulation_vertex_base_2 VertexBase; typedef CGAL::Triangulation_face_base_with_info_2 FaceBaseWithInfo; typedef CGAL::Constrained_triangulation_face_base_2 FaceBase; diff --git a/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp b/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp index b4de0e1e0f7..3c2bcf48f3f 100644 --- a/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp +++ b/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp @@ -2,41 +2,14 @@ #include #include #include +#include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC; typedef EPIC::Point_2 Point_2; -template -class My_vertex_base : public Vb { - std::size_t time_stamp_; -public: - My_vertex_base() : Vb(), time_stamp_(-1) { - } - - My_vertex_base(const My_vertex_base& other) : - Vb(other), - time_stamp_(other.time_stamp_) - {} - - typedef CGAL::Tag_true Has_timestamp; - - std::size_t time_stamp() const { - return time_stamp_; - } - void set_time_stamp(const std::size_t& ts) { - time_stamp_ = ts; - } - - template < class TDS > - struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - typedef My_vertex_base Other; - }; -}; - #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS -typedef My_vertex_base > Vb; +typedef CGAL::Base_with_time_stamp > Vb; #else typedef CGAL::Triangulation_vertex_base_2 Vb; #endif From e8d10955260bbf7c50a55ca1e25157a7cffdfd77 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 20 Jan 2023 16:35:15 +0100 Subject: [PATCH 413/426] Use Output_rep to display debug info --- .../include/CGAL/Compact_container.h | 15 +++++ STL_Extension/include/CGAL/Time_stamper.h | 11 ++++ .../CGAL/Constrained_triangulation_2.h | 64 +++++++++++++------ .../CGAL/Constrained_triangulation_plus_2.h | 54 ++++++++-------- .../Polyline_constraint_hierarchy_2.h | 33 ++++------ 5 files changed, 112 insertions(+), 65 deletions(-) diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index b8c1cb0769c..24f7ef91c72 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -33,6 +33,7 @@ #include #include #include +#include #include @@ -1153,6 +1154,20 @@ namespace handle { } // namespace internal +template +class Output_rep > { +protected: + using CC_iterator = CGAL::internal::CC_iterator; + using Compact_container = typename CC_iterator::CC; + using Time_stamper = typename Compact_container::Time_stamper; + CC_iterator it; +public: + Output_rep( const CC_iterator it) : it(it) {} + std::ostream& operator()( std::ostream& out) const { + return (out << Time_stamper::display_id(it.operator->())); + } +}; + } //namespace CGAL namespace std { diff --git a/STL_Extension/include/CGAL/Time_stamper.h b/STL_Extension/include/CGAL/Time_stamper.h index 8d346516a27..f48f5307ef0 100644 --- a/STL_Extension/include/CGAL/Time_stamper.h +++ b/STL_Extension/include/CGAL/Time_stamper.h @@ -13,6 +13,7 @@ #define CGAL_TIME_STAMPER_H #include +#include namespace CGAL { @@ -66,6 +67,11 @@ struct Time_stamper return pt->time_stamp(); } + static auto display_id(const T* pt) + { + return std::string("#") + std::to_string(pt->time_stamp()); + } + static std::size_t hash_value(const T* p) { if(nullptr == p) return std::size_t(-1); @@ -101,6 +107,11 @@ public: return 0; } + static auto display_id(const T* pt) + { + return static_cast(pt); + } + static std::size_t hash_value(const T* p) { constexpr std::size_t shift = internal::rounded_down_log2(sizeof(T)); diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index ac11e5182e2..37c27cb81a8 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -38,6 +38,28 @@ #include #include +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS +# include +# include +# include +namespace CGAL { + +struct With_point_tag {}; + +template +struct Output_rep, With_point_tag> + : public Output_rep> +{ + using Base = Output_rep>; + using Base::Base; + + std::ostream& operator()(std::ostream& out) const { + return Base::operator()(out) << "= " << this->it->point(); + } +}; +} // namespace CGAL +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS + namespace CGAL { struct No_constraint_intersection_tag{}; @@ -597,6 +619,12 @@ public: return are_there; } +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + auto display_vertex(Vertex_handle v) const { + With_point_tag point_tag; + return oformat(v, point_tag); + } +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS template OutputItEdges incident_constraints(Vertex_handle v, @@ -804,8 +832,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; internal::Indentation_level::Exit_guard exit_guard = CGAL::internal::cdt_2_indent_level.open_new_scope(); #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS @@ -815,8 +843,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) CGAL_precondition( vaa != vbb); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint, stack pop=( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint, stack pop=( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) remaining stack size: " << stack.size() << '\n'; CGAL_assertion(this->is_valid()); @@ -858,12 +886,12 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) if (vi != vaa && vi != vbb) { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vaa, vi] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::insert_constraint stack push [vaa, vi] ( " << display_vertex(vaa) + << " , " << display_vertex(vi) << " )\n"; std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vi)); @@ -872,8 +900,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) else{ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vaa, vbb]( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint stack push [vaa, vbb]( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vbb)); @@ -921,8 +949,8 @@ find_intersected_faces(Vertex_handle vaa, // is constrained #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::find_intersected_faces ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::find_intersected_faces ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n" << CGAL::internal::cdt_2_indent_level << "> current constrained edges are:\n"; @@ -1220,7 +1248,7 @@ insert_intersection(Face_handle f, int i, } #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_intersection, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::insert_intersection, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS return vi; @@ -1245,16 +1273,16 @@ intersect(Face_handle f, int i, #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::intersect segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() - << " ) with edge ( #"<< vcc->time_stamp() << "= " << vcc->point() - << " , #" << vdd->time_stamp() << "= " << vdd->point() + << "CT_2::intersect segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) + << " ) with edge ( " << display_vertex(vcc) + << " , " << display_vertex(vdd) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Vertex_handle vi = insert_intersection(f, i, vaa, vbb, vcc, vdd, pa, pb, pc, pd, itag); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::intersect, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::intersect, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h index 50ca1f4bfec..63e07c51dcf 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h @@ -129,6 +129,10 @@ public: using Triangulation::is_infinite; using Triangulation::number_of_vertices; #endif +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using Triangulation::display_vertex; +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS + typedef typename Triangulation::Edge Edge; typedef typename Triangulation::Vertex Vertex; @@ -275,8 +279,8 @@ public: { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint( #" << va->time_stamp() << "= " << va->point() - << " , #" << vb->time_stamp() << "= " << vb->point() + << "CT_plus_2::insert_constraint( " << display_vertex(va) + << " , " << display_vertex(vb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS // protects against inserting a zero length constraint @@ -883,13 +887,13 @@ insert_subconstraint(Vertex_handle vaa, { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; internal::Indentation_level::Exit_guard exit_guard = CGAL::internal::cdt_2_indent_level.open_new_scope(); std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [va, vb] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [va, vb] ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS std::stack > stack; @@ -901,8 +905,8 @@ insert_subconstraint(Vertex_handle vaa, CGAL_precondition( vaa != vbb); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint, stack pop=( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint, stack pop=( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) remaining stack size: " << stack.size() << '\n'; CGAL_assertion(this->is_valid()); @@ -914,8 +918,8 @@ insert_subconstraint(Vertex_handle vaa, if(this->includes_edge(vaa,vbb,vi,fr,i)) { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint, the segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint, the segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) is an edge with #" << vi->time_stamp() << "= " << vi->point() << '\n'; @@ -925,8 +929,8 @@ insert_subconstraint(Vertex_handle vaa, hierarchy.split_constraint(vaa,vbb,vi); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint (includes_edge) stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint (includes_edge) stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vi,vbb)); @@ -949,12 +953,12 @@ insert_subconstraint(Vertex_handle vaa, hierarchy.split_constraint(vaa,vbb,vi); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vaa, vi] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vi->time_stamp() << "= " << vi->point() + << "CT_plus_2::insert_constraint stack push [vaa, vi] ( " << display_vertex(vaa) + << " , " << display_vertex(vi) << " )\n"; std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vi)); @@ -963,8 +967,8 @@ insert_subconstraint(Vertex_handle vaa, else { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vaa, vbb]( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [vaa, vbb]( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vbb)); @@ -1180,10 +1184,10 @@ intersect(Face_handle f, int i, const Point& pd = vd->point(); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect segment ( #" << va->time_stamp() << "= " << va->point() - << " , #" << vb->time_stamp() << "= " << vb->point() + << "CT_plus_2::intersect segment ( " << display_vertex(va) + << " , " << display_vertex(vb) << " ) with edge ( #"<< vc->time_stamp() << "= " << vc->point() - << " , #" << vd->time_stamp() << "= " << vd->point() + << " , " << display_vertex(vd) << " , Exact_intersections_tag)\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Point pi(ORIGIN); // initialize although we are sure that it will be @@ -1196,7 +1200,7 @@ intersect(Face_handle f, int i, Vertex_handle vi = insert(pi, Triangulation::EDGE, f, i); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_plus_2::intersect, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS return vi; @@ -1220,10 +1224,10 @@ intersect(Face_handle f, int i, const Point& pd = vdd->point(); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::intersect segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) with edge ( #"<< vcc->time_stamp() << "= " << vcc->point() - << " , #" << vdd->time_stamp() << "= " << vdd->point() + << " , " << display_vertex(vdd) << " , Exact_predicates_tag)\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index a6c2bf44571..8870458b042 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -25,7 +25,9 @@ #include #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS +# include # include +# include #endif namespace CGAL { @@ -861,11 +863,8 @@ insert_constraint(T va, T vb){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.insert_constraint( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.insert_constraint( " + << oformat(va) << ", " << oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -898,11 +897,8 @@ insert_constraint_old_API(T va, T vb){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.insert_constraint_old_API( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.insert_constraint_old_API( " + << oformat(va) << ", " << oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -933,11 +929,8 @@ append_constraint(Constraint_id cid, T va, T vb){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.append_constraint( ..., #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.append_constraint( ..., " + << oformat(va) << ", " << oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -1052,13 +1045,9 @@ Polyline_constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.add_Steinter( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ", #" - << vc->time_stamp() - << ")\n"; + << "C_hierachy.add_Steinter( " + << oformat(va) << ", " << oformat(vb) << ", " << oformat(vc) + << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Context_list* hcl=nullptr; if(!get_contexts(va,vb,hcl)) { From 9e277981edbaf11ad871a0c6e59bee5a64e37b4e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 24 Jan 2023 13:42:06 +0100 Subject: [PATCH 414/426] Circulator_from_container now works --- Circulator/include/CGAL/circulator.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 144de51cd54..2b1556218f0 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -701,7 +701,13 @@ typedef Iterator_from_circulator< C, const_reference, const_pointer> template class Circulator_from_container { typedef Circulator_from_container Self; - typedef typename Container::iterator iterator; + typedef typename Container::iterator container_iterator; + typedef typename Container::const_iterator container_const_iterator; + typedef std::conditional_t< + std::is_const::value, + container_const_iterator, + container_iterator + > iterator; typedef std::iterator_traits iterator_traits; public: typedef typename iterator_traits::value_type value_type; From d940c3ae3f9244613d2700d50b8cdf2be0e8c9cb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 2 Feb 2023 16:04:12 +0100 Subject: [PATCH 415/426] Triangulation_3.h: make_vertex_triple can be static --- Triangulation_3/include/CGAL/Triangulation_3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index add6a8519f9..59e040cb33a 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1659,8 +1659,8 @@ private: typedef typename Base::template Vertex_handle_unique_hash_map_generator< Vertex_handle>::type Vertex_handle_unique_hash_map; - Vertex_triple make_vertex_triple(const Facet& f) const; - void make_canonical_oriented_triple(Vertex_triple& t) const; + static Vertex_triple make_vertex_triple(const Facet& f); + static void make_canonical_oriented_triple(Vertex_triple& t); template < class VertexRemover > VertexRemover& make_hole_2D(Vertex_handle v, std::list& hole, @@ -4359,7 +4359,7 @@ Triangulation_3::insert_and_give_new_cells(const Point& p, template < class Gt, class Tds, class Lds > typename Triangulation_3::Vertex_triple Triangulation_3:: -make_vertex_triple(const Facet& f) const +make_vertex_triple(const Facet& f) { Cell_handle ch = f.first; int i = f.second; @@ -4372,7 +4372,7 @@ make_vertex_triple(const Facet& f) const template < class Gt, class Tds, class Lds > void Triangulation_3:: -make_canonical_oriented_triple(Vertex_triple& t) const +make_canonical_oriented_triple(Vertex_triple& t) { int i = (t.first < t.second) ? 0 : 1; if(i==0) From 686aff651d703aece00a47a28dc2e5e0c05b4307 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 2 Feb 2023 16:04:44 +0100 Subject: [PATCH 416/426] Triangulation_3.h: Factorize the two versions of make_hole_3D --- .../include/CGAL/Triangulation_3.h | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 59e040cb33a..cf20fedb216 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1673,6 +1673,9 @@ private: template < class VertexRemover > void fill_hole_2D(std::list& hole, VertexRemover& remover); + void make_hole_3D_impl(Vertex_handle v, + const std::vector& incident_cells, + Vertex_triple_Facet_map& outer_map); void make_hole_3D(Vertex_handle v, Vertex_triple_Facet_map& outer_map, std::vector& hole); @@ -4909,16 +4912,11 @@ fill_hole_2D(std::list& first_hole, VertexRemover& remover, OutputItCel template < class Gt, class Tds, class Lds > void Triangulation_3:: -make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole) +make_hole_3D_impl(Vertex_handle v, + const std::vector& incident_cells, + Vertex_triple_Facet_map& outer_map) { - CGAL_expensive_precondition(! test_dim_down(v)); - - incident_cells(v, std::back_inserter(hole)); - - for(typename std::vector::iterator cit = hole.begin(), - end = hole.end(); + for(auto cit = incident_cells.begin(), end = incident_cells.end(); cit != end; ++cit) { int indv = (*cit)->index(v); @@ -4935,6 +4933,20 @@ make_hole_3D(Vertex_handle v, } } +template < class Gt, class Tds, class Lds > +void +Triangulation_3:: +make_hole_3D(Vertex_handle v, + Vertex_triple_Facet_map& outer_map, + std::vector& hole) +{ + CGAL_expensive_precondition(! test_dim_down(v)); + + incident_cells(v, std::back_inserter(hole)); + + make_hole_3D_impl(v, hole, outer_map); +} + // When the incident cells are already known template < class Gt, class Tds, class Lds > void @@ -4945,21 +4957,7 @@ make_hole_3D(Vertex_handle v, { CGAL_expensive_precondition(! test_dim_down(v)); - for(typename std::vector::const_iterator cit = incident_cells.begin(), - end = incident_cells.end(); cit != end; ++cit) - { - int indv = (*cit)->index(v); - Cell_handle opp_cit = (*cit)->neighbor(indv); - Facet f(opp_cit, opp_cit->index(*cit)); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - outer_map[vt] = f; - for(int i=0; i<4; i++) - { - if(i != indv) - (*cit)->vertex(i)->set_cell(opp_cit); - } - } + make_hole_3D_impl(v, incident_cells, outer_map); } template < class Gt, class Tds, class Lds > From 029b5bead5f9ad4f295456ade9213f414e4bc4e1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 3 Feb 2023 15:47:10 +0100 Subject: [PATCH 417/426] Triangulation_3.h: Rewrite/factorize New functions: - `create_hole_outer_map`, - `create_triangulation_inner_map`. - `copy_triangulation_into_hole`, - `fill_auxiliary_triangulation_with_vertices_around_v` --- .../include/CGAL/Triangulation_3.h | 1208 ++++------------- 1 file changed, 294 insertions(+), 914 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index cf20fedb216..c5cff3b9f35 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1651,7 +1651,7 @@ protected: tds().delete_vertex(inserted); } -private: +protected: typedef Facet Edge_2D; typedef Triple Vertex_triple; typedef typename Base::template Vertex_triple_Facet_map_generator< @@ -1673,16 +1673,32 @@ private: template < class VertexRemover > void fill_hole_2D(std::list& hole, VertexRemover& remover); - void make_hole_3D_impl(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map); - void make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole); - // When the incident cells are already known - void make_hole_3D(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map); + Vertex_triple_Facet_map + create_hole_outer_map(Vertex_handle v, + const std::vector& hole); + + template < class Triangulation > + static Vertex_triple_Facet_map + create_triangulation_inner_map(const Triangulation& t, + const Vertex_handle_unique_hash_map& vmap, + bool inf); + + template + OutputItCells copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, + Vertex_triple_Facet_map&& outer_map, + const Vertex_triple_Facet_map& inner_map, + OutputItCells fit); + + struct Fill_auxiliary_return_type { + Vertex_handle_unique_hash_map vmap; + bool vertex_is_incident_to_infinity; + }; + + template < class Triangulation > + Fill_auxiliary_return_type + fill_auxiliary_triangulation_with_vertices_around_v(Triangulation& t, + Vertex_handle v, + std::vector& adj_vertices) const; template < class VertexRemover > VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover& remover); @@ -1765,7 +1781,7 @@ private: std::map& vstates); void _make_big_hole_3D(Vertex_handle v, - std::map& outer_map, + Vertex_triple_Facet_map& outer_map, std::vector& hole, std::vector& vertices, std::map& vstates); @@ -4909,13 +4925,15 @@ fill_hole_2D(std::list& first_hole, VertexRemover& remover, OutputItCel } } +// When the incident cells are already known template < class Gt, class Tds, class Lds > -void +typename Triangulation_3::Vertex_triple_Facet_map Triangulation_3:: -make_hole_3D_impl(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map) +create_hole_outer_map(Vertex_handle v, const std::vector& incident_cells) { + CGAL_expensive_precondition(! test_dim_down(v)); + + Vertex_triple_Facet_map outer_map; for(auto cit = incident_cells.begin(), end = incident_cells.end(); cit != end; ++cit) { @@ -4931,35 +4949,206 @@ make_hole_3D_impl(Vertex_handle v, (*cit)->vertex(i)->set_cell(opp_cit); } } + return outer_map; } template < class Gt, class Tds, class Lds > -void +template < class Triangulation > +typename Triangulation_3::Vertex_triple_Facet_map Triangulation_3:: -make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole) -{ - CGAL_expensive_precondition(! test_dim_down(v)); +create_triangulation_inner_map(const Triangulation& t, + const Vertex_handle_unique_hash_map& vmap, + bool all_cells) { + Vertex_triple_Facet_map inner_map; - incident_cells(v, std::back_inserter(hole)); - - make_hole_3D_impl(v, hole, outer_map); + if(all_cells) + { + for(All_cells_iterator it = t.all_cells_begin(), + end = t.all_cells_end(); it != end; ++it) + { + for(unsigned int index=0; index < 4; index++) + { + Facet f = std::pair(it,index); + Vertex_triple vt_aux = make_vertex_triple(f); + Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); + make_canonical_oriented_triple(vt); + inner_map[vt] = f; + } + } + } else + { + for(Finite_cells_iterator it = t.finite_cells_begin(), + end = t.finite_cells_end(); it != end; ++it) + { + for(unsigned int index=0; index < 4; index++) + { + Facet f = std::pair(it,index); + Vertex_triple vt_aux = make_vertex_triple(f); + Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); + make_canonical_oriented_triple(vt); + inner_map[vt] = f; + } + } + } + return inner_map; } -// When the incident cells are already known template < class Gt, class Tds, class Lds > -void +template < class Triangulation > +typename Triangulation_3::Fill_auxiliary_return_type Triangulation_3:: -make_hole_3D(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map) +fill_auxiliary_triangulation_with_vertices_around_v(Triangulation& t, + Vertex_handle v, + std::vector& adj_vertices) const { - CGAL_expensive_precondition(! test_dim_down(v)); + Fill_auxiliary_return_type result; + Vertex_handle_unique_hash_map& vmap = result.vmap; + unsigned int i = 0; + Cell_handle ch = Cell_handle(); +#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR + size_t num_vertices = adj_vertices.size(); + if(num_vertices >= 5) + { + for(int j = 0 ; j < 4 ; ++j) + { + if(is_infinite(adj_vertices[j])) + { + std::swap(adj_vertices[j], adj_vertices[4]); + break; + } + } - make_hole_3D_impl(v, incident_cells, outer_map); + Orientation o = orientation(adj_vertices[0]->point(), + adj_vertices[1]->point(), + adj_vertices[2]->point(), + adj_vertices[3]->point()); + + if(o == NEGATIVE) + std::swap(adj_vertices[0], adj_vertices[1]); + + if(o != ZERO) + { + Vertex_handle vh1, vh2, vh3, vh4; + t.init_tds(adj_vertices[0]->point(), adj_vertices[1]->point(), + adj_vertices[2]->point(), adj_vertices[3]->point(), + vh1, vh2, vh3, vh4); + + ch = vh1->cell(); + vmap[vh1] = adj_vertices[0]; + vmap[vh2] = adj_vertices[1]; + vmap[vh3] = adj_vertices[2]; + vmap[vh4] = adj_vertices[3]; + i = 4; + } + } +#endif + + for(; i < adj_vertices.size(); i++) + { + if(! is_infinite(adj_vertices[i])) + { + Vertex_handle vh = t.insert(adj_vertices[i]->point(), ch); + ch = vh->cell(); + vmap[vh] = adj_vertices[i]; + } + else + { + result.vertex_is_incident_to_infinity = true; + } + } + + if(t.dimension() == 2) + { + Vertex_handle fake_inf = t.insert(v->point()); + vmap[fake_inf] = infinite_vertex(); + } + else + { + vmap[t.infinite_vertex()] = infinite_vertex(); + } + + CGAL_assertion(t.dimension() == 3); + + return result; } +template < class Gt, class Tds, class Lds > +template < class OutputItCells > +OutputItCells +Triangulation_3:: +copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, + Vertex_triple_Facet_map&& outer_map, + const Vertex_triple_Facet_map& inner_map, + OutputItCells fit) +{ + while(! outer_map.empty()) + { + typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); + while(is_infinite(oit->first.first) || + is_infinite(oit->first.second) || + is_infinite(oit->first.third)) + { + ++oit; + // Otherwise the lookup in the inner_map fails + // because the infinite vertices are different + } + + typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; + outer_map.erase(oit); + Cell_handle o_ch = o_vt_f_pair.second.first; + unsigned int o_i = o_vt_f_pair.second.second; + + auto iit = inner_map.find(o_vt_f_pair.first); + CGAL_assertion(iit != inner_map.end()); + typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; + Cell_handle i_ch = i_vt_f_pair.second.first; + unsigned int i_i = i_vt_f_pair.second.second; + + // Create a new cell and glue it to the outer surface + Cell_handle new_ch = tds().create_cell(); + *fit++ = new_ch; + new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], + vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); + + o_ch->set_neighbor(o_i,new_ch); + new_ch->set_neighbor(i_i, o_ch); + + for(int j=0; j<4; j++) + new_ch->vertex(j)->set_cell(new_ch); + + // For the other faces check, if they can also be glued + for(unsigned int index = 0; index < 4; index++) + { + if(index != i_i) + { + Facet f = std::pair(new_ch, index); + Vertex_triple vt = make_vertex_triple(f); + make_canonical_oriented_triple(vt); + std::swap(vt.second, vt.third); + + typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); + if(oit2 == outer_map.end()) + { + std::swap(vt.second, vt.third); + outer_map[vt] = f; + } + else + { + // glue the faces + typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; + Cell_handle o_ch2 = o_vt_f_pair2.second.first; + int o_i2 = o_vt_f_pair2.second.second; + o_ch2->set_neighbor(o_i2, new_ch); + new_ch->set_neighbor(index, o_ch2); + outer_map.erase(oit2); + } + } + } + } + return fit; +} + + template < class Gt, class Tds, class Lds > template < class VertexRemover > VertexRemover& @@ -5028,201 +5217,7 @@ VertexRemover& Triangulation_3:: remove_3D(Vertex_handle v, VertexRemover& remover) { - std::vector hole; - hole.reserve(64); - - // Construct the set of vertex triples on the boundary - // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); - CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); - - // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) - { - remover.add_hidden_points(*hi); - } - - bool inf = false; - - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); - - // create a Delaunay triangulation of the points on the boundary - // and make a map from the vertices in remover.tmp towards the vertices - // in *this - - unsigned int i = 0; - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); -#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR - size_t num_vertices = vertices.size(); - if(num_vertices >= 5) - { - for(int j = 0 ; j < 4 ; ++j) - { - if(is_infinite(vertices[j])) - { - std::swap(vertices[j], vertices[4]); - break; - } - } - - Orientation o = orientation(vertices[0]->point(), - vertices[1]->point(), - vertices[2]->point(), - vertices[3]->point()); - - if(o == NEGATIVE) - std::swap(vertices[0], vertices[1]); - - if(o != ZERO) - { - Vertex_handle vh1, vh2, vh3, vh4; - remover.tmp.init_tds(vertices[0]->point(), vertices[1]->point(), - vertices[2]->point(), vertices[3]->point(), - vh1, vh2, vh3, vh4); - ch = vh1->cell(); - vmap[vh1] = vertices[0]; - vmap[vh2] = vertices[1]; - vmap[vh3] = vertices[2]; - vmap[vh4] = vertices[3]; - i = 4; - } - } -#endif - - for(; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension() == 2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); - - // Construct the set of vertex triples of remover.tmp - // We reorient the vertex triple so that it matches those from outer_map - // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // Otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // Create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // For the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } - tds().delete_vertex(v); - tds().delete_cells(hole.begin(), hole.end()); - - return remover; + return remove_3D(v, remover, Emptyset_iterator()); } template < class Gt, class Tds, class Lds > @@ -5233,192 +5228,37 @@ remove_3D(Vertex_handle v, VertexRemover& remover, const std::vector& inc_cells, std::vector& adj_vertices) { - // Construct the set of vertex triples on the boundary with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; + const auto& hole = inc_cells; - make_hole_3D(v, inc_cells, outer_map); + // Construct the set of vertex triples on the boundary + // with the facet just behind + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::const_iterator hi = inc_cells.begin(), - hend = inc_cells.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - unsigned int i = 0; - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); -#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR - size_t num_vertices = adj_vertices.size(); - if(num_vertices >= 5) - { - for(int j = 0 ; j < 4 ; ++j) - { - if(is_infinite(adj_vertices[j])) - { - std::swap(adj_vertices[j], adj_vertices[4]); - break; - } - } - - Orientation o = orientation(adj_vertices[0]->point(), - adj_vertices[1]->point(), - adj_vertices[2]->point(), - adj_vertices[3]->point()); - - if(o == NEGATIVE) - std::swap(adj_vertices[0], adj_vertices[1]); - - if(o != ZERO) - { - Vertex_handle vh1, vh2, vh3, vh4; - remover.tmp.init_tds(adj_vertices[0]->point(), adj_vertices[1]->point(), - adj_vertices[2]->point(), adj_vertices[3]->point(), - vh1, vh2, vh3, vh4); - - ch = vh1->cell(); - vmap[vh1] = adj_vertices[0]; - vmap[vh2] = adj_vertices[1]; - vmap[vh3] = adj_vertices[2]; - vmap[vh4] = adj_vertices[3]; - i = 4; - } - } -#endif - - for(; i < adj_vertices.size(); i++) - { - if(! is_infinite(adj_vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = adj_vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } tds().delete_vertex(v); - tds().delete_cells(inc_cells.begin(), inc_cells.end()); + tds().delete_cells(hole.begin(), hole.end()); return remover; } @@ -5565,162 +5405,42 @@ remove_3D(Vertex_handle v, VertexRemover& remover, OutputItCells fit) { CGAL_precondition(dimension() == 3); + // Collect all vertices on the boundary of the hole + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); + std::vector hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); - - // create a Delaunay triangulation of the points on the boundary + // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; ipoint(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt] = f; - } - } - } else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt] = f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, fit); - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - *fit++ = new_ch; - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second, vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second, vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2, new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } tds().delete_vertex(v); tds().delete_cells(hole.begin(), hole.end()); @@ -5956,166 +5676,45 @@ move_if_no_collision(Vertex_handle v, const Point& p, std::vector hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); // create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension() == 2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); // fixing pointer std::vector cells_pt; cells_pt.reserve(64); incident_cells(inserted, std::back_inserter(cells_pt)); - std::size_t size = cells_pt.size(); - for(std::size_t i=0; iset_vertex(c->index(inserted), v); @@ -6395,180 +5994,57 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, std::vector cells_tmp; cells_tmp.reserve(64); incident_cells(inserted, std::back_inserter(cells_tmp)); - int size = cells_tmp.size(); - for(int i=0; i hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); + + for(auto ch : hole) + { + cells_set.erase(ch); + } // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); - - for(typename std::vector::const_iterator ib = hole.begin(), - iend = hole.end(); - ib != iend; ib++) - { - cells_set.erase(*ib); - } + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - // Collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - }else { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - *fit++ = new_ch; - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch, i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt] = f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, fit); // fixing pointer std::vector cells_pt; cells_pt.reserve(64); incident_cells(inserted, std::back_inserter(cells_pt)); - size = cells_pt.size(); - for(int i=0; iset_vertex(c->index(inserted), v); @@ -6592,7 +6068,7 @@ template < class Gt, class Tds, class Lds > void Triangulation_3:: _make_big_hole_3D(Vertex_handle v, - std::map& outer_map, + Vertex_triple_Facet_map& outer_map, std::vector& hole, std::vector& vertices, std::map& vstates) @@ -6705,13 +6181,12 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem vstates[v] = PROCESSED; // here, we make the hole for the cluster with v inside - typedef std::map Vertex_triple_Facet_map; std::vector hole; - std::vector vertices; + std::vector adj_vertices; hole.reserve(64); - vertices.reserve(32); + adj_vertices.reserve(32); Vertex_triple_Facet_map outer_map; - _make_big_hole_3D(v, outer_map, hole, vertices, vstates); + _make_big_hole_3D(v, outer_map, hole, adj_vertices, vstates); // the connectivity is totally lost, we need to rebuild if(!outer_map.size()) @@ -6721,7 +6196,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem return false; } - std::size_t vsi = vertices.size(); + std::size_t vsi = adj_vertices.size(); bool inf = false; std::size_t i; @@ -6735,7 +6210,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem std::map mp_vps; for(i=0; iis_infinite(vv)) { vps.push_back(vv->point()); @@ -6768,7 +6243,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem vmap[vh] = vv; } - if(remover.tmp.dimension()==2) + if(remover.tmp.dimension() == 2) { Vertex_handle fake_inf = remover.tmp.insert(v->point()); vmap[fake_inf] = this->infinite_vertex(); @@ -6782,11 +6257,11 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem { for(i=0; i < vsi; i++) { - if(!this->is_infinite(vertices[i])) + if(!this->is_infinite(adj_vertices[i])) { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); + Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch); ch = vh->cell(); - vmap[vh] = vertices[i]; + vmap[vh] = adj_vertices[i]; } else { @@ -6794,7 +6269,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem } } - if(remover.tmp.dimension()==2) + if(remover.tmp.dimension() == 2) { Vertex_handle fake_inf = remover.tmp.insert(v->point()); vmap[fake_inf] = this->infinite_vertex(); @@ -6805,105 +6280,10 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem } } - Vertex_triple_Facet_map inner_map; - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(unsigned int index=0; index < 4; index++) - { - Facet f = std::pair(it,index); - Vertex_triple vt_aux = this->make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - this->make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(unsigned int index=0; index < 4; index++) - { - Facet f = std::pair(it,index); - Vertex_triple vt_aux = this->make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - this->make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - - while(this->is_infinite(oit->first.first) || - this->is_infinite(oit->first.second) || - this->is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - for(int j=0; j<4; j++) - new_ch->vertex(j)->set_cell(new_ch); - - // for the other faces check, if they can also be glued - for(unsigned int index = 0; index < 4; index++) - { - if(index != i_i) - { - Facet f = std::pair(new_ch,index); - Vertex_triple vt = this->make_vertex_triple(f); - this->make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(index, o_ch2); - outer_map.erase(oit2); - } - } - } - - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); this->tds().delete_cells(hole.begin(), hole.end()); remover.tmp.clear(); From 89cf5c55470ed3052af061269351a97ee7f965cb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 6 Feb 2023 10:13:11 +0100 Subject: [PATCH 418/426] Fix CMAKE_NO_SYSTEM_FROM_IMPORTED --- Installation/lib/cmake/CGAL/CGALConfig.cmake | 28 +++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index b807ad3c412..b9030ecc4dc 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -115,6 +115,18 @@ include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) +include(${CGAL_CONFIG_DIR}/CGALConfigVersion.cmake) + +# Temporary? Change the CMAKE module path +cgal_setup_module_path() + +include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) + +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) + # Do not use -isystem for CGAL include paths + set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) +endif() + foreach(comp ${CGAL_FIND_COMPONENTS}) if(NOT comp MATCHES "Core|ImageIO|Qt5") message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!") @@ -184,19 +196,3 @@ if (NOT TARGET CGAL::CGAL_Basic_viewer) INTERFACE_LINK_LIBRARIES CGAL::CGAL_Qt5) endif() -include(${CGAL_CONFIG_DIR}/CGALConfigVersion.cmake) - -# -# -# - -# Temporary? Change the CMAKE module path -cgal_setup_module_path() - -set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) -include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) - -if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) - # Do not use -isystem for CGAL include paths - set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) -endif() From 789f2c3b6053e7a3bf607e4c3c764bbcdef93e5a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 7 Feb 2023 06:58:56 +0000 Subject: [PATCH 419/426] Polygon is already defined in a windows.h --- Polygon/test/Polygon/issue7228.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon/test/Polygon/issue7228.cpp b/Polygon/test/Polygon/issue7228.cpp index 2740f7afa42..d6616ecb2f8 100644 --- a/Polygon/test/Polygon/issue7228.cpp +++ b/Polygon/test/Polygon/issue7228.cpp @@ -7,13 +7,13 @@ typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point; -typedef CGAL::Polygon_2 Polygon; +typedef CGAL::Polygon_2 Polygon_2; typedef Polygon::Vertex_circulator Vertex_circulator; int main() { std::array points = { Point(0,0), Point(1,0), Point(1,1), Point(0,1) }; - Polygon poly(points.begin(), points.end()); + Polygon_2 poly(points.begin(), points.end()); Vertex_circulator vc = poly.vertices_circulator(); From 1ba1810816580c13a0e0fd4bed0d7731a76bacb4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Feb 2023 14:47:01 +0100 Subject: [PATCH 420/426] mention mesh_3 --- Installation/CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a8e5332db23..fc0ebf78787 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -21,7 +21,7 @@ Release date: June 2023 which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. - Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh following the -CGAL tetrahedral Delaunay refinement algorithm. +CGAL tetrahedral Delaunay refinement algorithm, using the 3D mesh generation package. - Added the function `CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()` to remove badly shaped triangles faces in a mesh. From 66c1fb0a8313cd86321cd75afbaee111c8793529 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Feb 2023 14:51:50 +0100 Subject: [PATCH 421/426] improve changes --- Installation/CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index fc0ebf78787..ea7da392a23 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -20,8 +20,8 @@ Release date: June 2023 `CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`, and `CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()` which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. -- Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh following the -CGAL tetrahedral Delaunay refinement algorithm, using the 3D mesh generation package. +- Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh using + the Delaunay refinement algorithm from the 3D Mesh Generation package. - Added the function `CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()` to remove badly shaped triangles faces in a mesh. From 0379f9c74e576f35ff14efa6ead3861206b6665a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 8 Feb 2023 07:34:06 +0000 Subject: [PATCH 422/426] Why the hell did I not compile to test the 'trivial fix' --- Polygon/test/Polygon/issue7228.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon/test/Polygon/issue7228.cpp b/Polygon/test/Polygon/issue7228.cpp index d6616ecb2f8..623a8633130 100644 --- a/Polygon/test/Polygon/issue7228.cpp +++ b/Polygon/test/Polygon/issue7228.cpp @@ -8,7 +8,7 @@ typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; -typedef Polygon::Vertex_circulator Vertex_circulator; +typedef Polygon_2::Vertex_circulator Vertex_circulator; int main() { From 01e75ef34568170228bd036d259fa1cc41ae2cbb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 14 Feb 2023 13:27:46 +0100 Subject: [PATCH 423/426] Fix with -DCGAL_NO_DEPRECATED_CODE --- Triangulation_2/include/CGAL/Constrained_triangulation_2.h | 1 + .../internal/Polyline_constraint_hierarchy_2.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 37c27cb81a8..80d7a197e3e 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -622,6 +622,7 @@ public: #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS auto display_vertex(Vertex_handle v) const { With_point_tag point_tag; + using CGAL::IO::oformat; return oformat(v, point_tag); } #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 8870458b042..7178b1dc5fa 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -862,6 +862,7 @@ insert_constraint(T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.insert_constraint( " << oformat(va) << ", " << oformat(vb) << ")\n"; @@ -896,6 +897,7 @@ insert_constraint_old_API(T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.insert_constraint_old_API( " << oformat(va) << ", " << oformat(vb) << ")\n"; @@ -928,6 +930,7 @@ append_constraint(Constraint_id cid, T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.append_constraint( ..., " << oformat(va) << ", " << oformat(vb) << ")\n"; @@ -1044,6 +1047,7 @@ void Polyline_constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.add_Steinter( " << oformat(va) << ", " << oformat(vb) << ", " << oformat(vc) From 166ff0fdc71e9287a9c77e36e047f21b45fce529 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 14 Feb 2023 13:28:07 +0100 Subject: [PATCH 424/426] Try to fix compilation with MSVC++ --- STL_Extension/include/CGAL/Base_with_time_stamp.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/STL_Extension/include/CGAL/Base_with_time_stamp.h b/STL_Extension/include/CGAL/Base_with_time_stamp.h index 1e2dbeff088..cbed66de81f 100644 --- a/STL_Extension/include/CGAL/Base_with_time_stamp.h +++ b/STL_Extension/include/CGAL/Base_with_time_stamp.h @@ -20,13 +20,6 @@ template class Base_with_time_stamp : public Base { std::size_t time_stamp_ = -1; public: - using Base::Base; - - Base_with_time_stamp(const Base_with_time_stamp& other) : - Base(other), - time_stamp_(other.time_stamp_) - {} - typedef CGAL::Tag_true Has_timestamp; std::size_t time_stamp() const { From 097b14d055eb94beaf8c4b6a50efc93d245c925c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 16 Feb 2023 10:20:31 +0100 Subject: [PATCH 425/426] add missing include directive --- Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h index 91adc9fa970..f82c6b68d66 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h @@ -25,6 +25,7 @@ #include +#include #include #include #include From 3c2ce13dd98acb9386b127338ba0c46060b73f50 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 16 Feb 2023 13:18:03 +0100 Subject: [PATCH 426/426] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index ce30c5ee6d7..03e9c354bc3 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -21,11 +21,11 @@ LC_CTYPE=en_US.UTF-8 # "master" alone 0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --public || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR +0 21 * * Mon,Tue,Wed cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR # from branch 5.5 0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.5-branch.git --public --do-it || echo ERROR # from branch 5.4 -0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR +0 21 * * Sat,Thu cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR ## Older stuff