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 3d2f2941c95..a2ee453953d 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,14 +59,13 @@ 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 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..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] +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: 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/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/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 d385b481a33..002e108b0ec 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 18b7fa805dd..b7e686d4203 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 974e26d0a57..7703d0b0b19 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 50ae06acee9..2f7719bb362 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 @@ -446,7 +446,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 9d1084414cd..cba01cdc911 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 @@ -534,7 +534,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_; @@ -737,7 +737,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 @@ -750,7 +750,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. @@ -773,7 +773,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_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/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/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/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/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/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/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/examples/Arrangement_on_surface_2/overlay_unbounded.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded.cpp index 7fcb7a63dee..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 @@ -11,10 +10,10 @@ #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); } + { return c + std::to_string(i); } }; typedef CGAL::Arr_face_extended_dcel Dcel_dlue; 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..90ae69d90ca 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. @@ -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. @@ -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_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 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..dae2f574090 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); @@ -231,7 +231,7 @@ _find_face_around_vertex(Vertex_const_handle vh, } // In case the curves are not equal, just return the incident face of - // the single halfegde (note that this is also the incident face of its + // the single halfedge (note that this is also the incident face of its // twin, as v is the tip of an "antenna"). if (! equal_curr) { CGAL_assertion(curr->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_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 5ad5f86b400..8f28269f199 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..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. @@ -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..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 @@ -18,7 +18,7 @@ /*! \file - * Defintion of the Td_X_trapezoid class. + * Definition of the Td_X_trapezoid class. */ #include @@ -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,15 +152,20 @@ public: Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ - CGAL_TD_INLINE void init_neighbours(Self* lb_ = 0, Self* lt_ = 0, - Self* rb_ = 0, Self* rt_ = 0) + /*! Initialize the trapezoid's neighbors. */ + 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) @@ -239,7 +244,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(); } } @@ -296,16 +301,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 +322,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 +652,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 24ad3b4bf15..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 @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_active_edge class. + * Definition of the Td_active_edge class. */ #include @@ -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,11 +144,15 @@ public: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ - inline void init_neighbours(boost::optional next) + /*! Initialize the trapezoid's neighbors. */ + 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_fictitious_vertex.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location/Td_active_fictitious_vertex.h index e47760609a0..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 @@ -17,7 +17,7 @@ #include /*! \file - * Defintion of the Td_active_fictitious_vertex class. + * Definition of the Td_active_fictitious_vertex class. */ #include @@ -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 e74b291ab06..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 @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_active_trapezoid class. + * Definition of the Td_active_trapezoid class. */ #include @@ -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,15 +162,20 @@ private: //Dag_node* m_dag_node; //pointer to the search structure (DAG) node - /*! Initialize the trapezoid's neighbours. */ - inline void init_neighbours(boost::optional lb, boost::optional lt, - boost::optional rb, boost::optional rt) + /*! Initialize the trapezoid's neighbors. */ + 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) @@ -227,16 +232,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 +253,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 +397,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 9486ddcc41d..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 @@ -17,7 +17,7 @@ #include /*! \file - * Defintion of the Td_active_vertex class. + * Definition of the Td_active_vertex class. */ #include @@ -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_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..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 @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_edge class. + * Definition of the Td_inactive_edge class. */ #include @@ -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 db7a89c8275..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 @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_fictitious_vertex class. + * Definition of the Td_inactive_fictitious_vertex class. */ #include @@ -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_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..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 @@ -17,7 +17,7 @@ /*! \file - * Defintion of the Td_inactive_vertex class. + * Definition of the Td_inactive_vertex class. */ #include @@ -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_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..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 @@ -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: @@ -356,15 +356,15 @@ 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. + 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 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 neighbors. 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..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, @@ -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:: @@ -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)) { @@ -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 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))) @@ -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(); // // @@ -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); @@ -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 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..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); @@ -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..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 - * the current-curve target, or vise versa. + * 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 vise verase (that is, + * than the x-position 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_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 5d9a91452af..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; @@ -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..27f1a980deb 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 outputting // 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..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 @@ -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 @@ -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 @@ -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..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 @@ -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. @@ -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. @@ -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..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 @@ -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); @@ -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. @@ -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..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 @@ -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. */ @@ -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())); } @@ -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 @@ -1486,13 +1486,13 @@ 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. * \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. */ @@ -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 @@ -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. @@ -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. @@ -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. @@ -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 @@ -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/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..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 represenation + * constructs an arc from a given representation */ 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..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 @@ -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; @@ -397,7 +397,7 @@ private: //! with correct parameters const Integer one; //! just "one" bool branches_coincide; //! indicates that there are several branches - //! passing through one neighbourhood pixel + //! passing through one neighborhood pixel int direction_taken; //! stores a direction taken from the seed point //! during tracking, if it's possible to determine //! 0 - towards lower point, 1 - towards upper @@ -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; @@ -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; @@ -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; @@ -1863,7 +1863,7 @@ bool recursive_check(int var, const NT& beg_, const NT& end_, return recursive_check(var, key_2, mid, key, poly, depth+1); } -//! computes lower/upper boundaries for pixel's neighbourhood +//! computes lower/upper boundaries for pixel's neighborhood void get_boundaries(int var, const Pixel_2& pix, Stripe& stripe) { int level = pix.level, val = pix.y; @@ -1906,14 +1906,14 @@ inline void get_polynomials(int var, Stripe& stripe) { } /*! - * checks 8-pixel neighbourhood of a pixel, returns \c true if - * only one curve branch intersects pixel's neighbourhood, \c dir + * checks 8-pixel neighborhood of a pixel, returns \c true if + * only one curve branch intersects pixel's neighborhood, \c dir * defines backward direction, \c new_dir is a new tracking direction * * 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/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..c0c62a2ad88 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 neighborhood 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..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 @@ -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. @@ -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 a4caeadceef..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 @@ -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; @@ -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/IO/Fig_stream.h b/Arrangement_on_surface_2/include/CGAL/IO/Fig_stream.h index 5fd87bc4e7b..f945986b3ce 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..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) && @@ -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..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 @@ -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 @@ -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. @@ -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. @@ -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/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. 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..7e1de8031ec 100644 --- a/BGL/include/CGAL/draw_face_graph.h +++ b/BGL/include/CGAL/draw_face_graph.h @@ -19,21 +19,32 @@ #include #include -namespace CGAL -{ +namespace CGAL { // 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 + CGAL::IO::Color operator()(const Graph& /*g*/, + typename boost::graph_traits::face_descriptor /*f*/) 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()); } + + // edges and vertices are black by default + template + 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& /*g*/, + typename boost::graph_traits::vertex_descriptor /*v*/) const + { + return IO::black(); + } }; class SimpleFaceGraphViewerQt : public Basic_viewer_qt @@ -48,28 +59,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 + /// useful for very big objects where this time could be long) + 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)) { } @@ -82,43 +93,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; @@ -131,41 +141,41 @@ 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()) - { - CGAL::IO::Color c=fcolor(sm, fh); - face_begin(c); - auto hd=halfedge(fh, sm); - const auto first_hd = hd; - do - { - auto v = source(hd, sm); - add_point_in_face(get(point_pmap, v), get(vnormals, v)); - hd=next(hd, sm); - } - 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(); } } - for (auto e: edges(sm)) + for (auto e: edges(g)) { - 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)) { - this->add_point(get(point_pmap, v)); + const CGAL::IO::Color& c = fcolor(g, v); + this->add_point(get(point_pmap, v), c); } }; } 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..8ae06574970 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_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); @@ -329,7 +329,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..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 @@ -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; @@ -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/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 diff --git a/CGAL_Core/include/CGAL/CORE/BigFloatRep.h b/CGAL_Core/include/CGAL/CORE/BigFloatRep.h index da8cb6967c8..4cb5f461b05 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 dc828ae9379..59723f30df8 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 f88a5877c9b..6ab3aeb861b 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 d57e4e44cd9..2fbad7d30b1 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 fdb6c5de7cf..8577514dac0 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 ecc29261130..4401e4d9e8e 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 59f4a7a63f6..41b81e4ac32 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 0 means rational diff --git a/CGAL_Core/include/CGAL/CORE/Real.h b/CGAL_Core/include/CGAL/CORE/Real.h index 11174960dd2..dc4573cda20 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 85f7818a884..94602c2d1cb 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 e7ac7379f4c..64bc9996f5a 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 69d92131839..24c2bab879d 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 f1c9172e3e9..98f77c37777 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 f21ddfec3a8..4a9c8fb905c 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 77ceab8c9ae..d044b124c1f 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/IO/read_vtk_image_data.h b/CGAL_ImageIO/include/CGAL/IO/read_vtk_image_data.h index ccce66f3ca6..0492e2acc6a 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,57 @@ 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; + 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)); + 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); + + // 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 { image->data = vtk_image->GetPointData()->GetScalars()->GetVoidPointer(0); } diff --git a/CGAL_ImageIO/include/CGAL/ImageIO.h b/CGAL_ImageIO/include/CGAL/ImageIO.h index 26ada2cfd76..45e82f5b38e 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 a77de031f64..03167aba951 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/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/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 922e4e8f9bd..9cbfa8e64fc 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/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/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/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/CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt similarity index 92% rename from CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt rename to CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt index 634bc854f59..8acaf9834e4 100644 --- a/CGAL_ipelets/examples/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/test/CGAL_ipelets/CMakeLists.txt @@ -2,7 +2,7 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.23) -project(CGAL_ipelets_Examples) +project(CGAL_ipelets_Tests) find_package(CGAL REQUIRED) 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/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/constructions/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h index dbc973138c5..7b0b79f2e90 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h @@ -431,7 +431,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, @@ -681,7 +681,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 0bb67083388..5d210da549d 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_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/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/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.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; 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 10157e274ff..48c7531b362 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/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 e02d128a307..cfd263dc7bc 100644 --- a/Classification/examples/Classification/gis_tutorial_example.cpp +++ b/Classification/examples/Classification/gis_tutorial_example.cpp @@ -474,7 +474,7 @@ 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::parameters::fairing_continuity(0)); // Save DTM with holes filled std::ofstream dtm_filled_ofile ("dtm_filled.ply", std::ios_base::binary); @@ -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 ("classification_gis_tutorial.ply"); CGAL::IO::set_binary_mode (classified_ofile); classified_ofile << points; classified_ofile.close(); 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 423f49aae1c..dc0736fc74b 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..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 @@ -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..229a8d1a47d 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 neighbors. // 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..3308def6103 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). + /// Neighbors 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/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/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..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 @@ -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, 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/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/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/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 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 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 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/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; +} 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_2/test/Convex_hull_2/ch_test_CH.cpp b/Convex_hull_2/test/Convex_hull_2/ch_test_CH.cpp index bb9bccab77c..8d45ac9aaf1 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 @@ -27,9 +27,5 @@ int main() CGAL::ch__batch_test(cch_H_gmp); #endif - CGAL::Convex_hull_constructive_traits_2< CGAL::Homogeneous > cch_H_double; - std::cout << "Homogeneous:" << std::endl; - CGAL::ch__batch_test(cch_H_double); - return EXIT_SUCCESS; } 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 26a2c4dca9d..8c6c3863845 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 @@ -25,9 +25,5 @@ int main() CGAL::ch__batch_test(ch_C_Qgmp); #endif - CGAL::Cartesian ch_C_double; - std::cout << "Cartesian:" << std::endl; - CGAL::ch__batch_test(ch_C_double); - return EXIT_SUCCESS; } 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 d8318360621..eee56d0f901 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 @@ -25,9 +25,5 @@ int main() CGAL::ch__batch_test( ch_H_gmp ); #endif - CGAL::Homogeneous ch_H_double; - std::cout << "Homogeneous:" << std::endl; - CGAL::ch__batch_test( ch_H_double ); - return EXIT_SUCCESS; } 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 521f1b41b5a..35864f1f260 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 @@ -25,9 +25,5 @@ int main() CGAL::ch__batch_test( ch_S_Qgmp ); #endif - CGAL::Simple_cartesian ch_S_double; - std::cout << "SimpleCartesian:" << std::endl; - CGAL::ch__batch_test( ch_S_double ); - return EXIT_SUCCESS; } 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. diff --git a/Documentation/doc/CMakeLists.txt b/Documentation/doc/CMakeLists.txt index a885f8ecea2..bec8ffbb22f 100644 --- a/Documentation/doc/CMakeLists.txt +++ b/Documentation/doc/CMakeLists.txt @@ -26,14 +26,9 @@ else() set(CGAL_ROOT "${CMAKE_SOURCE_DIR}") endif() -find_package(Doxygen) +find_package(Doxygen REQUIRED) find_package(Python3 REQUIRED COMPONENTS Interpreter) -if(NOT DOXYGEN_FOUND) - message(WARNING "Cannot build the documentation without Doxygen!") - return() -endif() - #starting from cmake 3.9 the usage of DOXYGEN_EXECUTABLE is deprecated if(TARGET Doxygen::doxygen) get_property( @@ -131,6 +126,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") 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 b981472df6a..1e3fe07e9ba 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, 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. diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 34858e1e6b3..c16f83d01f6 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 @@ -1856,7 +1867,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 3a19d0dccbb..969a1a79b5b 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 @@ -26069,7 +26069,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 @@ -48669,7 +48669,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 @@ -56831,7 +56831,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 @@ -76175,7 +76175,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 @@ -80469,7 +80469,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 @@ -92196,7 +92196,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" @@ -94426,7 +94426,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 @@ -102822,7 +102822,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" @@ -122541,7 +122541,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" @@ -122552,7 +122552,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 @@ -125917,7 +125917,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 @@ -132331,7 +132331,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 @@ -133248,7 +133248,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 @@ -133284,7 +133284,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 @@ -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 @@ -137613,7 +137613,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 @@ -139831,7 +139831,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 @@ -146285,7 +146285,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 @@ -148039,7 +148039,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/Documentation/doc/scripts/html_output_post_processing.py b/Documentation/doc/scripts/html_output_post_processing.py index 5402d7bc50f..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() @@ -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 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 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..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)) @@ -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/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 0b08884f40a..b842e148205 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..3e0f077a989 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 neighbors. // 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..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 enpoints, 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/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp index c18f2566d36..68aafd5d484 100644 --- a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp @@ -555,87 +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::vector mps; - CGAL::IO::read_multi_polygon_WKT(ifs, mps); - for(const Polygon& p : mps) - { - 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()); + typedef CGAL::Polygon_with_holes_2 Polygon; + typedef CGAL::Point_2 Point; - 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()); + std::deque points; + std::deque> linestrings; + std::deque polygons; - //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); + CGAL::IO::read_WKT(ifs, points, linestrings, polygons); + + 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(), h_it->vertices_end(),true); } - }while(ifs.good() && !ifs.eof()); + } discoverComponents(cdt, m_seeds); Q_EMIT( changed()); 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; i #include #include #include diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 6005f48e5e4..bded07f7692 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -1301,7 +1301,7 @@ void Camera::setFromProjectionMatrix(const qreal matrix[12]) { // divide the first 3 coordinates by the 4th one. // We derive the 4 dimensional vectorial product formula from the - // computation of a 4x4 determinant that is developped according to + // computation of a 4x4 determinant that is developed according to // its 4th column. This implies some 3x3 determinants. const Vec cam_pos = Vec(det(matrix[ind(0, 1)], matrix[ind(0, 2)], matrix[ind(0, 3)], diff --git a/GraphicsView/include/CGAL/Qt/debug_impl.h b/GraphicsView/include/CGAL/Qt/debug_impl.h index a1614e95dad..eaa4d7ed108 100644 --- a/GraphicsView/include/CGAL/Qt/debug_impl.h +++ b/GraphicsView/include/CGAL/Qt/debug_impl.h @@ -51,5 +51,5 @@ void traverse_resources(const QString& name, const QString& dirname, int indent) } } -} // namesapce Qt +} // namespace Qt } // namespace CGAL diff --git a/GraphicsView/include/CGAL/Qt/frame.h b/GraphicsView/include/CGAL/Qt/frame.h index 23110350fce..b1525691c16 100644 --- a/GraphicsView/include/CGAL/Qt/frame.h +++ b/GraphicsView/include/CGAL/Qt/frame.h @@ -106,7 +106,7 @@ class Constraint; the Frame. The default constraint() is \c nullptr resulting in no filtering. Use setConstraint() to attach a Constraint to a frame. - Constraints are especially usefull for the ManipulatedFrame instances, in + Constraints are especially useful for the ManipulatedFrame instances, in order to forbid some mouse motions. See the constrainedFrame, 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 30e31329e62..30a49be1ae5 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. @@ -63,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 made holes in the Minkowski sum disappear + [Release 5.5](https://github.com/CGAL/cgal/releases/tag/v5.5) ----------- @@ -386,7 +393,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) @@ -753,7 +760,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. @@ -898,7 +905,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 @@ -2406,7 +2413,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) @@ -2426,7 +2433,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 @@ -3167,7 +3174,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 @@ -4220,7 +4227,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 @@ -4344,10 +4351,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. @@ -4684,7 +4691,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 @@ -5050,7 +5057,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 @@ -5077,7 +5084,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. @@ -5398,11 +5405,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. @@ -5468,7 +5475,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 @@ -5640,7 +5647,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()" @@ -5747,7 +5754,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..70dc4de3e56 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" ) @@ -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 "." ) 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 08cdc568ab6..7329be33116 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 3693e29724e..3bdf4d1bc67 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..a58cdefdfcc 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 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) ## ## @@ -20,19 +20,19 @@ ## * 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 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 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. ## ## -## 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 a82c5be43b7..414515ec96f 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -555,7 +555,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/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/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 d349c2616e2..ada4bc5207e 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/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); 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!"); } 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.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_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/PolyhedralSurf_rings.h b/Jet_fitting_3/examples/Jet_fitting_3/PolyhedralSurf_rings.h index cc13db2d6ac..a5866bee2ad 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,7 @@ 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); @@ -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, @@ -58,10 +58,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 @@ -88,7 +88,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/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/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/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/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/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/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 c770d0b7b40..ac8e47c1e54 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); @@ -6580,7 +6579,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, @@ -6601,7 +6600,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, @@ -6611,7 +6610,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, @@ -6620,7 +6619,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, 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/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/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 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_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_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_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_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); 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/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 e1056ac3ab7..def38fe860b 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 6390c1a2874..cede542bb96 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 e1056ac3ab7..def38fe860b 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 6390c1a2874..cede542bb96 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 e1056ac3ab7..def38fe860b 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 6390c1a2874..cede542bb96 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 cb26334a389..d8710f65402 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/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_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..05dc6cc4d47 100644 --- a/Mesh_3/doc/Mesh_3/CGAL/Image_3.h +++ b/Mesh_3/doc/Mesh_3/CGAL/Image_3.h @@ -14,9 +14,9 @@ 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. + /// 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/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/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/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_3/Mesh_global_optimizer.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h index 714430116f6..7b83d8b05bc 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/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index e8f105cd241..185efe6229c 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"; @@ -690,7 +691,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 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); 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/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/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/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 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 d8a8804edb5..d2dfef196e0 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())); 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/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/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/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3f91ea357bd..a776e87da72 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 @@ -97,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_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp index ef92a338025..ade0505bca7 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 std::size_t 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])) + 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"; 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 new file mode 100644 index 00000000000..0dd8fb46888 --- /dev/null +++ b/Mesh_3/test/Mesh_3/test_meshing_without_features_determinism.cpp @@ -0,0 +1,160 @@ +#include +#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_3 Mesh_domain; + + // Triangulation + typedef typename CGAL::Mesh_triangulation_3::type Tr; + typedef CGAL::Mesh_complex_3_in_triangulation_3 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*[]) +{ + 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/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 f8e614a3142..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. */ @@ -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/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..22720565399 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() - { + //! \brief constructs. + 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(); } + //! \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 - { + Polygon_2& outer_boundary, OutputIterator holes) const { CGAL_precondition(pgn1.is_simple()); CGAL_precondition(pgn2.is_simple()); CGAL_precondition(pgn1.orientation() == COUNTERCLOCKWISE); @@ -101,19 +100,17 @@ 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 - { + 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 +118,11 @@ 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, - 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 +154,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 +166,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; @@ -178,56 +175,52 @@ 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 - { - 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); } } } - // 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 - { + Segment_list& reduced_convolution) const { int n1 = static_cast(pgn1.size()); int n2 = static_cast(pgn2.size()); if ((n1 == 0) || (n2 == 0)) return; @@ -235,7 +228,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); @@ -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,69 +333,59 @@ 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; - } + { 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])); } - return f_add(pgn1[i1], Vector_2(Point_2(ORIGIN), pgn2[i2])); - } + //! \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(); + Ccb_halfedge_const_circulator circ_start = *icit; + Ccb_halfedge_const_circulator circ = circ_start; - // 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; - - 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. + //! \brief determines 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); return true; } - // Add a face to 'holes'. + //! \brief adds 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; ++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, - 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()) == @@ -437,41 +398,34 @@ private: return true; } - // 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++; + //! \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++; - 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 +437,14 @@ 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 - { + 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; 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 15889b136d1..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; @@ -274,13 +274,13 @@ 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)); // 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..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 loaction.}*/ + /*{\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/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/Binary_operation.h b/Nef_3/include/CGAL/Nef_3/Binary_operation.h index 4bfed515639..fa26c870f77 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 @@ -74,6 +75,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 @@ -82,10 +84,13 @@ 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; + 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 +149,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 +172,14 @@ class Binary_operation : public CGAL::SNC_decorator { typename Selection, typename Association> class Intersection_call_back : - public 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; 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), @@ -450,18 +455,16 @@ 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. // 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 +506,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/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/Infimaximal_box.h b/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h index 75f7f378dac..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 { @@ -151,7 +152,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..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 @@ -249,7 +250,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 +554,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 +672,10 @@ Segment_3 ray_to_segment(const Ray_3& r) const { CGAL_NEF_TRACEN("Objects_along_ray: input ray: "< - -#include +#include +#include namespace CGAL { 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/OGL_helper.h b/Nef_3/include/CGAL/Nef_3/OGL_helper.h index e66cb433175..b2b2cfd177b 100644 --- a/Nef_3/include/CGAL/Nef_3/OGL_helper.h +++ b/Nef_3/include/CGAL/Nef_3/OGL_helper.h @@ -123,7 +123,7 @@ namespace OGL { // DFacet stores the facet cycle vertices in a continuus C array // of three double components, this is necessary due to the OpenGL - // tesselator input format ! + // tessellator input format ! class DFacet { typedef std::vector Coord_vector; typedef std::vector Cycle_vector; 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_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_constructor.h b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h index c79d68de6d5..f0c67661879 100644 --- a/Nef_3/include/CGAL/Nef_3/SNC_constructor.h +++ b/Nef_3/include/CGAL/Nef_3/SNC_constructor.h @@ -24,12 +24,13 @@ #include #include #include -#include +#include #include #include +#include #include +#include #include -#include #ifdef SM_VISUALIZOR #include #endif // SM_VISUALIZOR 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..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()); @@ -809,7 +738,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 +855,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_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_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_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/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_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/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}}*/ 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/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h b/Nef_3/include/CGAL/Nef_3/binop_intersection_tests.h index 03773258a68..b64fe1e99d2 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 { @@ -41,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) {} @@ -76,7 +60,6 @@ struct binop_intersection_test_segment_tree { } }; - template struct Bop_edge1_face0_callback { Callback &cb; @@ -126,55 +109,40 @@ struct binop_intersection_test_segment_tree { template void operator()(Callback& cb0, Callback& cb1, - SNC_structure& sncp, - SNC_structure& snc1i) + const SNC_structure& snc0, + const SNC_structure& snc1) { 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, 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(), + box_intersection_d( e0boxes.begin(), e0boxes.end(), + e1boxes.begin(), e1boxes.end(), callback_edge0_edge1); -#endif - a.clear(); - b.clear(); 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 ) ); -#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(), + box_intersection_d( e0boxes.begin(), e0boxes.end(), + f1boxes.begin(), f1boxes.end(), callback_edge0_face1); -#endif - a.clear(); - b.clear(); 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 ) ); -#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(), + box_intersection_d( e1boxes.begin(), e1boxes.end(), + f0boxes.begin(), f0boxes.end(), callback_edge1_face0); -#endif } }; 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 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 { 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 7b926a5d251..927c2d4e29e 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 030367c4ee9..f6811a0f116 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) @@ -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.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/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/OpenNL/include/CGAL/OpenNL/linear_solver.h b/OpenNL/include/CGAL/OpenNL/linear_solver.h index d4e928eec9a..cb405afef11 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/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/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/demo/Optimal_transportation_reconstruction_2/render.cpp b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/render.cpp index 54065018429..d970d7410a7 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); @@ -395,8 +395,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); @@ -422,8 +422,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; @@ -510,7 +510,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); } @@ -549,7 +549,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); } @@ -589,7 +589,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); @@ -611,7 +611,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); @@ -708,7 +708,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 c7f14a626da..fde1549a865 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; @@ -452,7 +452,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)) { @@ -469,8 +469,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(); } @@ -505,12 +505,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; @@ -551,10 +551,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/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..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), @@ -94,23 +97,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 +119,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..d1840743412 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; @@ -175,7 +175,6 @@ protected: MassPMap mass_pmap; public: - /// \name Initialization /// @{ @@ -212,7 +211,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), @@ -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. @@ -318,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(); } @@ -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 < static_cast(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(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); @@ -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 < static_cast(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); @@ -1311,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(); @@ -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; 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); } diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index bb1dd8a2354..afc958b9754 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/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(); 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/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/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index 8887bc4164b..88bdce79ec4 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -108,7 +108,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_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/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_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/demo/Periodic_3_triangulation_3/Scene.cpp b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/Scene.cpp index 513e34d5ebc..63209099a8d 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 eec43a9514a..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); @@ -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/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 c48e0ad463c..7c85500db92 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -966,8 +966,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/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/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/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/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 aa576df9f80..bc67439f053 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 2623dbc112c..f4bf7d2e3b9 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 b421f811b4b..043001e3b04 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 835862545fb..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. */ @@ -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; @@ -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 04a712e080f..c103468f3f1 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() @@ -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/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/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/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/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index 947c907a7b3..4dc91d36ca0 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 @@ -401,7 +401,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. @@ -584,7 +584,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. @@ -797,7 +797,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/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/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..4532279b891 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,9 +616,14 @@ 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 0260d314619..28958df8ac0 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 @@ bool fair(TriangleMesh& tmesh, \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 79b7f260e69..77e7909201d 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 @@ -1237,7 +1237,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( @@ -1393,10 +1393,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] ); + } } } 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..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 @@ -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 @@ -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]; @@ -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) @@ -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 edc7d892bab..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 @@ -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( @@ -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 15846998d96..797a6912f26 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 beb20bef0a2..a078e446591 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 10043e346a8..d821f88320b 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 74fc83d0ec8..c7cbdf04b3b 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/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 #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` 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,28 +338,18 @@ 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::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 : 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)) - { - len += edge_length(haf, pmesh, np); - visited.insert(haf); - } + FT len = face_border_length(h, pmesh, np); - if(result_len < len) - { - result_len = len; - result_halfedge = h; - } - } + if(result_len < len) + { + result_len = len; + result_halfedge = h; } } return std::make_pair(result_halfedge, result_len); 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 27bda80bc9c..af70795b209 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 2ea05b9a740..daa4d767e8b 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); @@ -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 a0e4f6c178d..d0b22f7b5ef 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/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 22be1f47e8e..bb7e48292a6 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 @@ -1936,6 +1941,7 @@ remove_self_intersections_one_step(std::set) const { return false; } @@ -2483,7 +2491,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/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/Polygon_mesh_processing/triangulate_hole.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/triangulate_hole.h index f246500b49a..46c3a6904be 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} + \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` @@ -145,7 +151,7 @@ namespace Polygon_mesh_processing { \cgalNamedParamsEnd - @return `out` + @return the face output iterator \todo handle islands @todo Replace border_halfedge by a range of border halfedges. @@ -156,19 +162,23 @@ namespace Polygon_mesh_processing { @todo handle the case where an island is reduced to a point */ template - OutputIterator + typename CGAL_NP_TEMPLATE_PARAMETERS> + auto 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; + + typedef typename internal_np::Lookup_named_param_def::type 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 @@ -210,37 +220,77 @@ namespace Polygon_mesh_processing { 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 + 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. + + \brief 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()) + { + return triangulate_hole(pmesh, border_halfedge,np.face_output_iterator(out)); + } +#endif // CGAL_NO_DEPRECATED_CODE + /*! \ingroup PMP_hole_filling_grp @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` @@ -296,7 +346,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$} @@ -309,61 +359,116 @@ 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() \todo handle islands */ + template + auto + triangulate_and_refine_hole(PolygonMesh& pmesh, + typename boost::graph_traits::halfedge_descriptor border_halfedge, + 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, np.face_output_iterator(std::back_inserter(patch))); + 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); + 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 + typename CGAL_NP_TEMPLATE_PARAMETERS> + 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 NamedParameters& np = parameters::default_values()) + const CGAL_NP_CLASS& np = parameters::default_values()) { - using parameters::choose_parameter; - using parameters::get_parameter_reference; - - 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); - visitor.end_refine_phase(); - return res; + 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` @@ -410,15 +515,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 output 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`} @@ -441,10 +546,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() @@ -453,32 +556,41 @@ 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; + (pmesh, border_halfedge, np.face_output_iterator(face_out).vertex_output_iterator(std::back_inserter(patch))).first; CGAL_postcondition(CGAL::is_triangle_mesh(pmesh)); 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); @@ -490,6 +602,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/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..c8a311a37ae 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 @@ -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){ @@ -1028,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; @@ -1042,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 + { return is_two_facets_neighboring(pid, i, j); } int @@ -1183,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; } @@ -1291,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 neighbour 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){ @@ -1718,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++) { @@ -1806,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++) { @@ -1860,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/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..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 @@ -42,7 +42,7 @@ namespace internal { }; -} // namesapce internal +} // namespace internal template class Polyhedral_envelope_filter @@ -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/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); } 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 7412a989f7b..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 @@ -121,7 +121,7 @@ struct Custom_traits_Hausdorff struct Has_on_bounded_side_3 { - //documented as Comparision_result + //documented as Comparison_result CGAL::Comparison_result operator()(const Point_3&, const Point_3&, const Point_3&) const {return CGAL::ZERO;} bool operator()(const Sphere_3&, const Point_3&) @@ -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_locate.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_locate.cpp index 9102d733047..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 @@ -173,8 +173,10 @@ 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))); + 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))); + 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))); @@ -217,6 +219,7 @@ void test_constructions(const G& g, 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)); + dv = PMP::get_descriptor_from_location(loc, g); if(const vertex_descriptor* v = boost::get(&dv)) { } else { assert(false); } @@ -251,22 +254,23 @@ void test_random_entities(const G& g, CGAL::Random& rnd) 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)); + 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)); + 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)); + 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)); + + assert(loc.second[(h_id + 2) % 3] == FT(0)); } } @@ -313,8 +317,8 @@ void test_helpers(const G& g, CGAL::Random& 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); + PMP::is_on_vertex(loc, target(h, g), g) || + vec.size() == 2); } template @@ -432,9 +436,10 @@ 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))); + 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); @@ -442,7 +447,7 @@ void test_locate_in_face(const G& g, 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))); + 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); @@ -475,10 +480,11 @@ 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); - 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()))); + 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)); } } @@ -536,11 +542,10 @@ 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(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(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))); @@ -552,18 +557,25 @@ struct Locate_with_AABB_tree_Tester // 2D case 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(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 +666,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); @@ -848,7 +870,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); } 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/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..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; } } @@ -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); @@ -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); @@ -194,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; @@ -225,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; @@ -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/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/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 68b0afc77d6..929702068b8 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) @@ -70,7 +73,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 +82,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 +103,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 +138,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 db0d99bdb57..fa09b603654 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/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/Mesh_3/Image_res_dialog.ui b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/Image_res_dialog.ui index 066201cbed7..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,8 +6,8 @@ 0 0 - 421 - 370 + 561 + 347 @@ -19,24 +19,8 @@ Load a 3D image - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - + + Qt::Horizontal @@ -46,33 +30,31 @@ - - - - Please choose the image &type - - - imageType - - - - + - Drawing settings for a segment image + + + 0 + + + 0 + + + 0 + - - - - - false - - - - - + + + 0 + + + 6 + + + 11 @@ -80,20 +62,23 @@ - 1:x means that x voxels of the original image are represented by 1 cube in the drawn image + <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 - Please choose the image drawing &precision + <html><head/><body><p align="right">Segmented image drawing &amp;precision </p></body></html> true @@ -103,11 +88,81 @@ + + + + false + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + <html><head/><body><p align="right">Image &amp;type</p></body></html> + + + imageType + + + + + + + Qt::Horizontal + + + + + + + Smooth image data + + + + + + + + + + true + + + + + + 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..68c3053d876 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 @@ -44,24 +45,19 @@ #include #include -#include -#include - -#include -#include - #include #include #include "Raw_image_dialog.h" #include -#include -#include + #ifdef CGAL_USE_VTK #include #include +#include #include #include +#include #include #include #include @@ -70,44 +66,58 @@ #include +#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(); } @@ -117,7 +127,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 )); @@ -127,48 +138,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; @@ -181,7 +203,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); @@ -191,12 +215,19 @@ private: bool ready_to_move; CGAL::qglviewer::Vec v; int id; + Scene_interface* scene; CGAL::qglviewer::ManipulatedFrame* frame; }; 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, @@ -208,33 +239,46 @@ 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) { + + 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"); connect(planeSwitch, SIGNAL(triggered()), this, SLOT(selectPlanes())); 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); connect(v, SIGNAL(pointSelected(const QMouseEvent *)), &pxr_, SLOT(update(const QMouseEvent *))); createOrGetDockLayout(); @@ -242,19 +286,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...")) { ++it_action; - if ( it_action != end && NULL != *it_action ) + if(it_action != end && NULL != *it_action) { actionAfterLoad = *it_action; } @@ -262,29 +306,35 @@ public: } // Insert "Load implicit function" action - if ( nullptr != actionAfterLoad ) + if(nullptr != actionAfterLoad) { - menuFile->insertAction(actionAfterLoad,actionLoadDCM); + menuFile->insertAction(actionAfterLoad, actionLoadDCM); + menuFile->insertAction(actionAfterLoad, actionLoadBMP); } } } - 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); @@ -294,16 +344,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)); @@ -334,7 +385,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) @@ -344,38 +394,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. @@ -386,15 +448,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': @@ -445,20 +510,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)) { @@ -468,36 +535,41 @@ 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*))); } - void on_actionLoadDCM_triggered() + void loadDirectory(const Directory_extension_type ext) { 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(); + + 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) @@ -509,11 +581,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; @@ -524,7 +599,9 @@ 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; @@ -533,16 +610,21 @@ private: int y_value; 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* layout = nullptr; - QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl");; - if(!controlDockWidget) { + 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() + { + QLayout* layout = nullptr; + QDockWidget* controlDockWidget = mw->findChild("volumePlanesControl"); + + if(!controlDockWidget) + { controlDockWidget = new QDockWidget(mw); controlDockWidget->setObjectName("volumePlanesControl"); QWidget* content = new QWidget(controlDockWidget); @@ -568,7 +650,9 @@ private: controlDockWidget->setWidget(content); controlDockWidget->hide(); - } else { + } + else + { layout = controlDockWidget->findChild("vpSliderLayout"); controlDockWidget->show(); controlDockWidget->raise(); @@ -577,7 +661,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(); @@ -670,11 +755,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())) @@ -688,15 +775,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(); @@ -711,9 +800,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")); @@ -733,6 +822,7 @@ private: connect(group, SIGNAL(aboutToBeDestroyed()), this, SLOT(erase_group())); scene->addItem(group); + Controls c; c.group = group; c.x_item = x_item; @@ -761,19 +851,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); } @@ -789,7 +883,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) { @@ -801,6 +895,7 @@ private Q_SLOTS: scene->item(i)->invalidateOpenGLBuffers(); } } + msgBox.hide(); nbPlanes = 0; QApplication::restoreOverrideCursor(); @@ -809,11 +904,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) @@ -826,38 +919,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()) { @@ -865,11 +927,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(); @@ -878,15 +978,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); @@ -902,12 +1005,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); @@ -922,12 +1027,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); @@ -947,7 +1054,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(); @@ -973,19 +1081,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; } @@ -994,14 +1101,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; @@ -1015,8 +1126,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; @@ -1026,13 +1137,13 @@ 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 } - //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()); @@ -1041,94 +1152,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; @@ -1141,18 +1262,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) @@ -1172,9 +1294,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") { @@ -1188,10 +1314,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; } @@ -1200,10 +1330,16 @@ 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); + CGAL_USE(ext); + return false; +#else QFileInfo fileinfo; fileinfo.setFile(dirname); bool result = true; @@ -1225,7 +1361,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 ) { @@ -1233,11 +1368,10 @@ bool Io_image_plugin::loadDCM(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")); - // Open window QApplication::restoreOverrideCursor(); int return_code = dialog.exec(); @@ -1245,99 +1379,137 @@ 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; + bool smooth = ui.smoothImage->isChecked(); - //Get the image type - QString type = ui.imageType->currentText(); - Scene_image_item* image_item; - if(type == "Gray-level image") + Image *image = createDirectoryImage(dirname, ext, smooth); + 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 opening directory %1/!").arg(dirname)); + CGAL::Three::Three::warning(tr("Opening of directory %1/ failed!").arg(dirname)); + result = false; } else { - Image *image = createDCMImage(dirname); - if(image->image() == nullptr) + CGAL::Three::Three::information(tr("Directory %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); + image_item->setName(fileinfo.baseName()); + msgBox.setText("Planes created : 0/3"); + msgBox.setStandardButtons(QMessageBox::NoButton); + msgBox.show(); + + scene->addItem(image_item); + createPlanes(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); } } } + + 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 - 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 -#else - CGAL::Three::Three::warning("You need VTK to read a DCM file"); +#ifndef CGAL_USE_VTK + CGAL::Three::Three::warning("VTK is required to read DCM and BMP files"); CGAL_USE(dirname); -#endif - return image; + CGAL_USE(ext); + CGAL_USE(smooth); +#else + auto create_image = [&](auto&& reader) -> void + { + auto executive = vtkDemandDrivenPipeline::SafeDownCast(reader->GetExecutive()); + if(executive) + executive->SetReleaseDataFlag(0, 0); // where 0 is the port index + 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(); + } + + vtk_image->Print(std::cerr); + + *image = CGAL::IO::read_vtk_image_data(vtk_image); // copy the image data + }; + + 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().string(); + if(CGAL::IO::internal::get_file_extension(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; } #include "Io_image_plugin.moc" 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/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/Hole_filling_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp index 82c807ea335..06640c85b9c 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Hole_filling_plugin.cpp @@ -701,14 +701,16 @@ 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, 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 +718,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). @@ -728,12 +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::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!"); } 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 f3be698c5ad..6f2e1eed542 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 4c2dcc1702a..5f543518f2f 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/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/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..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 setted 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/Scene.cpp b/Polyhedron/demo/Polyhedron/Scene.cpp index c502b5df0cd..c70929ab4a5 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(); @@ -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); 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_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_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; i #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_spheres_item.h b/Polyhedron/demo/Polyhedron/Scene_spheres_item.h index aa040096054..bebaf110da5 100644 --- a/Polyhedron/demo/Polyhedron/Scene_spheres_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_spheres_item.h @@ -20,7 +20,7 @@ struct Scene_spheres_item_priv; * sorted by the value of their "index". This item also has an internal picking mechanism that * colorizes all the spheres that has the same index as the one that has been picked. * The picking is only usable if several indices exist. - * If all the spheres have the index 0, they can have independant colors (generally used by the items that + * If all the spheres have the index 0, they can have independent colors (generally used by the items that * have a Scene_spheres_item child). */ class SCENE_BASIC_OBJECTS_EXPORT Scene_spheres_item 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/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(); diff --git a/Polyhedron/demo/Polyhedron/Viewer.cpp b/Polyhedron/demo/Polyhedron/Viewer.cpp index ee0f20745ec..8e3423c5653 100644 --- a/Polyhedron/demo/Polyhedron/Viewer.cpp +++ b/Polyhedron/demo/Polyhedron/Viewer.cpp @@ -994,7 +994,7 @@ void Viewer::attribBuffers(int program_name) const { case PROGRAM_CUTPLANE_SPHERES: case PROGRAM_NO_SELECTION: case PROGRAM_HEAT_INTENSITY: - program->setUniformValue("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/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/CGAL/statistics_helpers.h b/Polyhedron/demo/Polyhedron/include/CGAL/statistics_helpers.h index 82a081b8083..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; @@ -67,12 +66,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()); - - 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); @@ -281,4 +276,3 @@ void faces_aspect_ratio(Mesh* poly, faces_aspect_ratio(poly, faces(*poly), min_altitude, mini, maxi, mean); } #endif // POLYHEDRON_DEMO_STATISTICS_HELPERS_H - diff --git a/Polyhedron/demo/Polyhedron/include/Point_set_3.h b/Polyhedron/demo/Polyhedron/include/Point_set_3.h index e347e5bddb3..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 reponsible to call +/// adding, moving or removing points, the user is responsible for calling /// 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 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..b732d305895 100644 --- a/Polyhedron/include/CGAL/Polyhedron_3.h +++ b/Polyhedron/include/CGAL/Polyhedron_3.h @@ -898,7 +898,7 @@ public: return make_prevent_deref_range(facets_begin(), facets_end()); } - // Auxiliary iterators for convinience + // Auxiliary iterators for convenience Point_iterator points_begin() { return vertices_begin();} Point_iterator points_end() { return vertices_end();} @@ -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 @@ -1473,7 +1473,7 @@ public: // removes all vertices, halfedges, and facets. void erase_all() { clear(); } - // equivalent to `clear()'. Depricated. + // equivalent to `clear()'. Deprecated. // Special Operations on Polyhedral Surfaces @@ -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/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/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h b/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h index 282e8766bdc..6c5c3d71153 100644 --- a/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h +++ b/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h @@ -162,7 +162,7 @@ protected: // // Polyhedron_incremental_builder_3 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..78d079bb0d8 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 variable. // 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/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..8ebc1cd0cdc 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, @@ -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 2d81aa018fb..88eb0636fb3 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); @@ -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/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/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index 9cea6526bb8..0b11736513c 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -30,9 +30,9 @@ 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, - std::vector < Vertex_const_handle > &nextRing, - std::vector < Vertex_const_handle > &all); + void push_neighbors_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. @@ -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); @@ -70,7 +70,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) { @@ -98,7 +98,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/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..945fb986ae7 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 @@ -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/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h index 9cea6526bb8..0b11736513c 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h @@ -30,9 +30,9 @@ 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, - std::vector < Vertex_const_handle > &nextRing, - std::vector < Vertex_const_handle > &all); + void push_neighbors_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. @@ -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); @@ -70,7 +70,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) { @@ -98,7 +98,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/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/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/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/SMDS_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index e8e8c777c91..d4dd702cd91 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 @@ -299,7 +299,7 @@ public: Mesh_complex_3_in_triangulation_3(Self&& rhs); /** - * Assignement operator, also serves as move-assignement + * Assignment operator, also serves as move-assignment */ Self& operator=(Self rhs) { @@ -1730,7 +1730,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 constructors number_of_facets_ = 0; number_of_cells_ = 0; } 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/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; 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/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/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index af1ab3c9d28..ba56706136e 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -1156,12 +1157,15 @@ namespace handle { 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 << static_cast(it.operator->())); + return (out << Time_stamper::display_id(it.operator->())); } }; diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 395f8a483f4..7f18ab80f57 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -754,7 +754,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 9382923dbc6..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) {} @@ -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 { @@ -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/STL_Extension/internal/parameters_interface.h b/STL_Extension/include/CGAL/STL_Extension/internal/parameters_interface.h index c5ad5f82e96..e22b5d6063a 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) @@ -156,6 +159,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) @@ -327,4 +331,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) - 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/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/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/STL_Extension/include/CGAL/exceptions.h b/STL_Extension/include/CGAL/exceptions.h index 9c03348f122..3b269aea302 100644 --- a/STL_Extension/include/CGAL/exceptions.h +++ b/STL_Extension/include/CGAL/exceptions.h @@ -14,26 +14,13 @@ #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 { -// [Sylvain] This was originaly written in the Exacus library. +// [Sylvain] This was originally written in the Exacus library. // I kept most doxygen comments. @@ -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), 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/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 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/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 50b898516f5..5aad7177a50 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 + * 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 * add test suites for join_vertices & split_vertex 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/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/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/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/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..30e71e543b2 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,14 +44,13 @@ 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); 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 c7af343c723..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(); @@ -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/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 (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/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h index 20140344b84..add923b15e2 100644 --- a/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h +++ b/Snap_rounding_2/include/CGAL/Snap_rounding_kd_2.h @@ -410,7 +410,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/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/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/benchmark/Spatial_searching/include/nanoflann.hpp b/Spatial_searching/benchmark/Spatial_searching/include/nanoflann.hpp index a999a5235ec..3dd0b399892 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) { @@ -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) }; /** @} */ @@ -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 * https://www.josuttis.com/cppcode/ @@ -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/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/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/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/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/iso_rectangle_2_query.cpp b/Spatial_searching/examples/Spatial_searching/iso_rectangle_2_query.cpp index 21a36102f39..bbd1fd035a6 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,10 +43,10 @@ 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; + 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; +} 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_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/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..66738159d27 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; } @@ -404,8 +404,8 @@ 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:" << - number_of_neighbours_computed << std::endl; + s << "Number of neighbors computed:" << + 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/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..791676defb0 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; } @@ -232,8 +232,8 @@ 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:" - << number_of_neighbours_computed << std::endl; + s << "Number of neighbors computed:" + << 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 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 @@ -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 - // in the latter case also the item priority quee 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 - // in the latter case also the item priority quee 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/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index aee69ca254c..f93fc340b7a 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -138,14 +138,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: @@ -153,18 +153,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 @@ -181,7 +178,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)]); } }; 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/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/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/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/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()); 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/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 e396d755293..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 @@ -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 ) ; // @@ -324,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_aux.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Straight_skeleton_aux.h index 4aa5c65eaf4..8a2ad91ab86 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 ; @@ -42,6 +43,23 @@ template 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) // @@ -176,10 +194,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 c2abf5e77ca..f36c3d6d179 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 @@ -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 @@ -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 @@ -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 ); @@ -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 ; @@ -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); @@ -1145,7 +1142,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() @@ -1212,7 +1209,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); @@ -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 ) ; @@ -1892,7 +1883,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 +1893,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 +2014,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..7744f44d377 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 { @@ -482,7 +465,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/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/Straight_skeleton_builder_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h index 517b93ed603..c0fea4462de 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 d7893baa68b..650b1894a2a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -13,12 +13,14 @@ #include -#include +#include +#include #include #include #include +#include #include @@ -41,6 +43,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 +94,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 +276,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_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..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 @@ -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) {} @@ -197,8 +205,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(); } @@ -225,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() ; } @@ -238,10 +241,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 : @@ -250,12 +261,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 > @@ -277,7 +289,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() {} @@ -285,14 +298,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 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 { 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..1076f7ae680 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) @@ -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,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. +// 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 between e0 and e2 is returned. // template boost::optional< Point_2 > @@ -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..16ee90a800f 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 @@ -101,7 +101,7 @@ Uncertain are_parallel_edges_equally_orientedC2( Segment_2_with_ID cons } -// Returns true IFF segments e0,e1 share the same supporting line but do not overlap except at the vetices, and have the same orientation. +// Returns true IFF segments e0,e1 share the same supporting line but do not overlap except at the vertices, and have the same orientation. // NOTE: If e1 goes back over e0 (a degenerate antenna or alley) this returns false. template Uncertain are_edges_orderly_collinearC2( Segment_2_with_ID const& e0, Segment_2_with_ID const& e1 ) @@ -170,7 +170,7 @@ Uncertain certified_trisegment_collinearity ( Segment_2 // is well defined, In that case, the degenerate vertex can be even a contour vertex or a skeleton node. If it is a skeleton // node, it is properly defined by the trisegment tree that corresponds to the node. // A trisegment tree stores not only the "current event" trisegment but also the trisegments for the left/right seed vertices, -// recursivey in case the seed vertices are skeleton nodes as well. +// recursively in case the seed vertices are skeleton nodes as well. // Those seeds are used to determine the actual position of the degenerate vertex in case of collinear edges (since that point is // not given by the collinear edges alone) // @@ -363,18 +363,18 @@ is_edge_facing_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 +#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; +} diff --git a/Stream_support/doc/Stream_support/IOstream.txt b/Stream_support/doc/Stream_support/IOstream.txt index cb098fc45e7..cfdf25073ec 100644 --- a/Stream_support/doc/Stream_support/IOstream.txt +++ b/Stream_support/doc/Stream_support/IOstream.txt @@ -10,7 +10,7 @@ namespace CGAL { \section IOstreamIntro Introduction -An algorithm is the application of a serie of steps to convert some input data into output data. +An algorithm is the application of a series of steps to convert some input data into output data. As such, it is necessary to have a way to input and output external data into \cgal data structures. This is achieved using input/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/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/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/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(); } 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/examples/Surface_mesh/draw_surface_mesh.cpp b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp index cbd42788fcc..488282915ba 100644 --- a/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp +++ b/Surface_mesh/examples/Surface_mesh/draw_surface_mesh.cpp @@ -20,6 +20,25 @@ 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()); + + CGAL_USE(fcm); + + // Draw! CGAL::draw(sm); return EXIT_SUCCESS; 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..290eb6ba0a6 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`. @@ -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 diff --git a/Surface_mesh/include/CGAL/draw_surface_mesh.h b/Surface_mesh/include/CGAL/draw_surface_mesh.h index 3459392aec1..8dd25acd5b2 100644 --- a/Surface_mesh/include/CGAL/draw_surface_mesh.h +++ b/Surface_mesh/include/CGAL/draw_surface_mesh.h @@ -36,8 +36,58 @@ void draw(const SM& asm); #include #include #include -namespace CGAL +#include + +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_USE(found); + } + + 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 +107,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(); } 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/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_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_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index 21d42cf360d..676d6f951a2 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 @@ -505,7 +505,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, @@ -1017,7 +1017,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 a8f1941a189..7d6574c7cbc 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 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 10639df65e6..32ab1511ca8 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/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_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 03c90101c33..eaad25fb19e 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 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 +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 1792fdddbbb..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 @@ -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)` @@ -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 7612d7436e2..ec95cbce18b 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 a48e1833bb3..16677d12fd3 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 8a70a30d560..365fc39d267 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 @@ -58,7 +58,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 f0b747108a6..16427c55226 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/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_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 cb52e089ede..0f5c8e99109 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 b81c477049c..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 succedded." << endl + << lOK << " cases succeeded." << endl << (lCases.size() - lOK) << " cases failed." << endl; return lOK == lCases.size() ? 0 : 1; 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/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/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/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h b/Surface_mesh_skeletonization/include/CGAL/Mean_curvature_flow_skeletonization.h index cdf6e6f940b..121bbfc3b54 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 { @@ -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) @@ -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 { @@ -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) @@ -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/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_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/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_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 dd8215e67a1..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 @@ -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 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..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 @@ -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 @@ -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/No_overlap_subcurve.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_overlap_subcurve.h index 1fd3601f077..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. @@ -132,7 +132,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 No_overlap_subcurve. + * overridden it implies that the type is No_overlap_subcurve. */ 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(); } @@ -172,7 +172,7 @@ void Surface_sweep_2::_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,9 +347,9 @@ 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)) + if (!this->m_currentEvent->are_left_neighbors(*currentOne, *prevOne)) _intersect(*prevOne, *currentOne); 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()); @@ -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_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/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/TDS_3/test/TDS_3/include/CGAL/_test_cls_tds_3.h b/TDS_3/test/TDS_3/include/CGAL/_test_cls_tds_3.h index 1364bf8b137..cb4906d7909 100644 --- a/TDS_3/test/TDS_3/include/CGAL/_test_cls_tds_3.h +++ b/TDS_3/test/TDS_3/include/CGAL/_test_cls_tds_3.h @@ -77,7 +77,7 @@ _test_cls_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/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/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 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/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); 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; diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index 548f2e12893..140b50857f4 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_io_plugin_interface.h b/Three/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h index fe0e253000d..7ab42e87c81 100644 --- a/Three/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h +++ b/Three/include/CGAL/Three/Polyhedron_demo_io_plugin_interface.h @@ -55,21 +55,21 @@ public: virtual QString loadNameFilters() const {return nameFilters();} //! Specifies if the io_plugin is able to load an item or not. - //! This must be overriden. + //! This must be overridden. virtual bool canLoad(QFileInfo fileinfo) const = 0; //! Loads one or more item(s) from a file. `ok` is `true` if the loading //! was successful, `false` otherwise. //! New items will be added to the scene if `add_to_scene` is `true`. //! You don't want that when you reload an item, for example, //! as it will be added at some other point of the process. - //! This must be overriden. + //! This must be overridden. virtual QList 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/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_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_interface.h b/Three/include/CGAL/Three/Scene_interface.h index 2290fb6642a..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; @@ -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; @@ -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 6c2c43de591..f22b9be5f52 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`. + //! \brief removeViewer removes the Vaos of `viewer`. //! - //! Must be overriden; + //! Must be overridden; //! virtual void removeViewer(CGAL::Three::Viewer_interface* viewer) = 0; @@ -375,16 +375,16 @@ 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 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/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/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/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/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..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(); @@ -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/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 de29fdc9bdb..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 @@ -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/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/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..1cd06e3afbf 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; } @@ -690,7 +692,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)); @@ -961,7 +963,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..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{}; @@ -46,7 +68,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 { }; @@ -307,11 +329,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(); } @@ -428,12 +450,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; } @@ -595,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, @@ -608,7 +638,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, @@ -802,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 @@ -813,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()); @@ -856,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)); @@ -870,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)); @@ -919,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"; @@ -1218,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; @@ -1243,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/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 5b5725f86de..6b1de4b4f19 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 @@ -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:: @@ -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 fd9ecd9244d..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 contraint from the context list of the subcontraint + // 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/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 689328d0036..040d2f35d09 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 { @@ -871,11 +873,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()){ @@ -908,11 +907,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()){ @@ -943,11 +939,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()){ @@ -1062,13 +1055,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)) { 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_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_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/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_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_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/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 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; 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

      ; 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/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_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 f58c05d0bef..78b8822f598 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 @@ -572,7 +572,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; } @@ -640,7 +640,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 8d85533d589..21c8ee2d996 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 @@ -587,7 +587,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_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/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/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:: 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/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" ; 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`.