From cbf3a164710862eda6be6e2febbe3fa86d26bebf Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 15:02:32 +0000 Subject: [PATCH 01/84] libs compile without warning --- CGAL_Core/include/CGAL/CORE/BigFloat.h | 4 +++ CGAL_Core/include/CGAL/CORE/CoreAux_impl.h | 2 +- CGAL_ImageIO/include/CGAL/ImageIO_impl.h | 2 +- GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp | 3 ++- .../src/CGAL_Qt5/GraphicsViewNavigation.cpp | 2 ++ .../CGAL_Qt5/GraphicsViewPolylineInput.cpp | 2 ++ GraphicsView/src/CGAL_Qt5/resources.cpp | 2 ++ Installation/include/CGAL/disable_warnings.h | 26 +++++++++++++++++++ Installation/include/CGAL/enable_warnings.h | 24 +++++++++++++++++ .../internal/numeric_solvers_support_impl.h | 1 + .../src/CGAL/JAMA_numeric_solver.cpp | 4 +-- .../src/CGAL/Turkowski_numeric_solver.cpp | 4 +-- .../src/CGAL/numeric_solvers_support.cpp | 4 +-- Number_types/include/CGAL/GMP/Gmpfr_type.h | 9 ++++--- Number_types/include/CGAL/GMP/Gmpq_type.h | 4 +++ Number_types/include/CGAL/Interval_nt.h | 21 ++------------- Number_types/include/CGAL/gmp.h | 6 ++--- .../include/CGAL/Profile_counter.h | 4 +++ .../include/CGAL/IO/File_scanner_OFF.h | 4 +++ Stream_support/include/CGAL/IO/io.h | 3 +++ 20 files changed, 97 insertions(+), 34 deletions(-) create mode 100644 Installation/include/CGAL/disable_warnings.h create mode 100644 Installation/include/CGAL/enable_warnings.h diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat.h b/CGAL_Core/include/CGAL/CORE/BigFloat.h index 3e070c18190..4dc7263dfb1 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat.h @@ -36,6 +36,8 @@ #ifndef _CORE_BIGFLOAT_H_ #define _CORE_BIGFLOAT_H_ +#include + #include #include @@ -633,4 +635,6 @@ inline BigRat::BigRat(const BigFloat& f) : RCBigRat(new BigRatRep()){ #include #endif // CGAL_HEADER_ONLY +#include + #endif // _CORE_BIGFLOAT_H_ diff --git a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h index 027972559e8..962a037dadf 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h @@ -41,7 +41,7 @@ #endif #include -#include +#include namespace CORE { diff --git a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h index f6ed71278d1..9d57d1470e4 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO_impl.h @@ -28,7 +28,7 @@ #ifdef _MSC_VER // Suppress deprecated warning for fileno and strdup -# pragma warning(disable:4996) +# pragma warning(disable: 4127 4706 4996) #include #include diff --git a/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp b/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp index 996cafa3a15..aaa3349c788 100644 --- a/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp +++ b/GraphicsView/src/CGAL_Qt5/DemosMainWindow.cpp @@ -22,7 +22,8 @@ #ifndef CGAL_HEADER_ONLY +#include #include #include - +#include #endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp b/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp index ba34d9223e2..c5821da1e90 100644 --- a/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp +++ b/GraphicsView/src/CGAL_Qt5/GraphicsViewNavigation.cpp @@ -22,7 +22,9 @@ #ifndef CGAL_HEADER_ONLY +#include #include #include +#include #endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp b/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp index 9ea1b7132c8..cd8426acc65 100644 --- a/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp +++ b/GraphicsView/src/CGAL_Qt5/GraphicsViewPolylineInput.cpp @@ -22,7 +22,9 @@ #ifndef CGAL_HEADER_ONLY +#include #include #include +#include #endif // CGAL_HEADER_ONLY diff --git a/GraphicsView/src/CGAL_Qt5/resources.cpp b/GraphicsView/src/CGAL_Qt5/resources.cpp index 070ac927d15..ba116c00e63 100644 --- a/GraphicsView/src/CGAL_Qt5/resources.cpp +++ b/GraphicsView/src/CGAL_Qt5/resources.cpp @@ -21,7 +21,9 @@ #ifndef CGAL_HEADER_ONLY +#include #include #include +#include #endif // CGAL_HEADER_ONLY diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h new file mode 100644 index 00000000000..d3db3d201a3 --- /dev/null +++ b/Installation/include/CGAL/disable_warnings.h @@ -0,0 +1,26 @@ +// Copyright (c) 2018 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// Author: Andreas Fabri + +#include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4512) // assignment operator could not be generated +# pragma warning(disable: 4127) // conditional expression is constant +#endif diff --git a/Installation/include/CGAL/enable_warnings.h b/Installation/include/CGAL/enable_warnings.h new file mode 100644 index 00000000000..33e63acfa45 --- /dev/null +++ b/Installation/include/CGAL/enable_warnings.h @@ -0,0 +1,24 @@ +// Copyright (c) 2018 GeometryFactory (France). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// Author: Andreas Fabri + +#include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h index 5b6456cdc8e..6c3eed12b05 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers_support_impl.h @@ -108,6 +108,7 @@ inline void compute_linear_roots_t(const NT *begin, const NT *, NT lb, NT ub, std::vector &roots) { + CGAL_USE(lb); if (CLEAN && begin[1]>0 ) return; //NT max_error=0; //if (CLEAN) max_error=max_error_value; diff --git a/Kinetic_data_structures/src/CGAL/JAMA_numeric_solver.cpp b/Kinetic_data_structures/src/CGAL/JAMA_numeric_solver.cpp index 25c1ad97bff..3c23bd53beb 100644 --- a/Kinetic_data_structures/src/CGAL/JAMA_numeric_solver.cpp +++ b/Kinetic_data_structures/src/CGAL/JAMA_numeric_solver.cpp @@ -20,8 +20,8 @@ // Author(s) : Daniel Russel #ifndef CGAL_HEADER_ONLY - +#include #include #include - +#include #endif diff --git a/Kinetic_data_structures/src/CGAL/Turkowski_numeric_solver.cpp b/Kinetic_data_structures/src/CGAL/Turkowski_numeric_solver.cpp index aebc54f0548..4ec474989d4 100644 --- a/Kinetic_data_structures/src/CGAL/Turkowski_numeric_solver.cpp +++ b/Kinetic_data_structures/src/CGAL/Turkowski_numeric_solver.cpp @@ -20,8 +20,8 @@ // Author(s) : Daniel Russel #ifndef CGAL_HEADER_ONLY - +#include #include #include - +#include #endif diff --git a/Kinetic_data_structures/src/CGAL/numeric_solvers_support.cpp b/Kinetic_data_structures/src/CGAL/numeric_solvers_support.cpp index 41612645cb5..48f61df0fb2 100644 --- a/Kinetic_data_structures/src/CGAL/numeric_solvers_support.cpp +++ b/Kinetic_data_structures/src/CGAL/numeric_solvers_support.cpp @@ -21,8 +21,8 @@ #ifndef CGAL_HEADER_ONLY - +#include #include #include - +#include #endif diff --git a/Number_types/include/CGAL/GMP/Gmpfr_type.h b/Number_types/include/CGAL/GMP/Gmpfr_type.h index 1c95dbe8e34..fd9e61974cc 100644 --- a/Number_types/include/CGAL/GMP/Gmpfr_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfr_type.h @@ -349,7 +349,10 @@ class Gmpfr: // only avoid the binary incompatibility of a CGAL program compiled // with MSVC with the libmpfr-1.dll compiled with mingw. #ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable: 4244) CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_d); +# pragma warning(pop) #else CGAL_GMPFR_CONSTRUCTOR_FROM_TYPE(long double,mpfr_set_ld); #endif @@ -1283,17 +1286,17 @@ bool operator==(const Gmpfr &a,double b){ #ifdef _MSC_VER inline bool operator<(const Gmpfr &a,long double b){ - return(mpfr_cmp_d(a.fr(),b)<0); + return(mpfr_cmp_d(a.fr(),static_cast(b))<0); } inline bool operator>(const Gmpfr &a,long double b){ - return(mpfr_cmp_d(a.fr(),b)>0); + return(mpfr_cmp_d(a.fr(),static_cast(b))>0); } inline bool operator==(const Gmpfr &a,long double b){ - return !mpfr_cmp_d(a.fr(),b); + return !mpfr_cmp_d(a.fr(),static_cast(b)); } #else inline diff --git a/Number_types/include/CGAL/GMP/Gmpq_type.h b/Number_types/include/CGAL/GMP/Gmpq_type.h index 3e2db0ccd49..234eb98a0a9 100644 --- a/Number_types/include/CGAL/GMP/Gmpq_type.h +++ b/Number_types/include/CGAL/GMP/Gmpq_type.h @@ -27,6 +27,8 @@ #ifndef CGAL_GMPQ_TYPE_H #define CGAL_GMPQ_TYPE_H +#include + #include #include @@ -513,4 +515,6 @@ inline Gmpq max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpq& x,const Gmpq& y){ # pragma warning(pop) #endif +#include + #endif // CGAL_GMPQ_TYPE_H diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index cb625e06608..98971080a4f 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -464,7 +464,7 @@ std::ostream & operator<< (std::ostream &os, const Interval_nt & I ) #define CGAL_SWALLOW(IS,CHAR) \ { \ char c; \ - do c = is.get(); while (isspace(c)); \ + do is.get(c); while (isspace(c)); \ if (c != CHAR) { \ is.setstate(std::ios_base::failbit); \ } \ @@ -474,7 +474,7 @@ template std::istream & operator>> (std::istream &is, Interval_nt & I) { char c; - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); is.putback(c); if(c == '['){ // read original output from operator << double inf,sup; @@ -931,23 +931,6 @@ namespace INTERN_INTERVAL_NT { return Uncertain::indeterminate(); } - // TODO: Whats this for? Why is this in this file?? - inline - std::pair - to_interval (const long & l) - { - if (sizeof(double) > sizeof(long)) { - // On 64bit platforms, a long doesn't fit exactly in a double. - // Well, a perfect fix would be to use std::numeric_limits<>, but... - Protect_FPU_rounding P(CGAL_FE_TONEAREST); - Interval_nt approx (static_cast(l)); - FPU_set_cw(CGAL_FE_UPWARD); - approx += Interval_nt::smallest(); - return approx.pair(); - } - else - return std::pair(static_cast(l),static_cast(l)); - } } // namespace INTERN_INTERVAL_NT diff --git a/Number_types/include/CGAL/gmp.h b/Number_types/include/CGAL/gmp.h index ba23acdff70..9e234c1d2c7 100644 --- a/Number_types/include/CGAL/gmp.h +++ b/Number_types/include/CGAL/gmp.h @@ -21,10 +21,10 @@ #define CGAL_GMP_H 1 #include - +#include #if defined(BOOST_MSVC) # pragma warning(push) -# pragma warning(disable:4244 4146) // conversion with loss of data +# pragma warning(disable: 4127 4244 4146) // conversion with loss of data // warning on - applied on unsigned number #endif @@ -34,5 +34,5 @@ #if defined(BOOST_MSVC) # pragma warning(pop) #endif - +#include #endif // CGAL_GMP_H diff --git a/Profiling_tools/include/CGAL/Profile_counter.h b/Profiling_tools/include/CGAL/Profile_counter.h index a97e889505f..a797d95ea8c 100644 --- a/Profiling_tools/include/CGAL/Profile_counter.h +++ b/Profiling_tools/include/CGAL/Profile_counter.h @@ -58,6 +58,8 @@ #include #include +#include + // Automatically define CGAL_CONCURRENT_PROFILE if we're linked with TBB #ifdef CGAL_LINKED_WITH_TBB # ifndef CGAL_CONCURRENT_PROFILE @@ -256,4 +258,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_PROFILE_COUNTER_H diff --git a/Stream_support/include/CGAL/IO/File_scanner_OFF.h b/Stream_support/include/CGAL/IO/File_scanner_OFF.h index bf7e1b530fd..93197d60ba8 100644 --- a/Stream_support/include/CGAL/IO/File_scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/File_scanner_OFF.h @@ -26,6 +26,8 @@ #ifndef CGAL_IO_FILE_SCANNER_OFF_H #define CGAL_IO_FILE_SCANNER_OFF_H 1 +#include + #include #include #include @@ -699,5 +701,7 @@ file_scan_normal( File_scanner_OFF& scanner, Vector& v) { #include #endif // CGAL_HEADER_ONLY +#include + #endif // CGAL_IO_FILE_SCANNER_OFF_H // // EOF // diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index 0a580d6da31..4a3b6ca3ed2 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -27,6 +27,7 @@ #ifndef CGAL_IO_H #define CGAL_IO_H +#include #include #include @@ -616,4 +617,6 @@ inline void read_float_or_quotient(std::istream& is, Rat &z) #include #endif // CGAL_HEADER_ONLY +#include + #endif // CGAL_IO_H From 6cc385c6ecc3d794b6cf53208b27c7cda3cbd66d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 15:47:18 +0000 Subject: [PATCH 02/84] Number_types --- .../include/CGAL/Needs_parens_as_product.h | 4 ++++ .../include/CGAL/Test/_test_algebraic_structure.h | 6 ++++++ CGAL_Core/include/CGAL/CORE/poly/Poly.tcc | 2 +- Installation/include/CGAL/disable_warnings.h | 5 ++++- Number_types/include/CGAL/CORE_BigInt.h | 4 ++++ Number_types/include/CGAL/CORE_BigRat.h | 4 ++++ Number_types/include/CGAL/CORE_Expr.h | 4 ++++ Number_types/include/CGAL/GMP/Gmpfr_type.h | 4 ++++ Number_types/include/CGAL/MP_Float.h | 2 ++ .../include/CGAL/Sqrt_extension/Sqrt_extension_type.h | 4 ++++ Number_types/include/CGAL/Sqrt_extension/io.h | 6 +++--- Number_types/include/CGAL/gmp.h | 2 ++ Number_types/test/Number_types/Lazy_exact_nt.cpp | 1 + Number_types/test/Number_types/Sqrt_extension.h | 2 ++ Number_types/test/Number_types/bench_interval.cpp | 2 ++ .../test/Number_types/include/CGAL/_test_utilities.h | 6 +++--- Number_types/test/Number_types/int.cpp | 3 +++ Number_types/test/Number_types/ioformat.cpp | 3 +++ Number_types/test/Number_types/root_of_2.cpp | 2 ++ Number_types/test/Number_types/utilities.cpp | 1 + Triangulation_3/include/CGAL/Delaunay_triangulation_3.h | 4 ++++ Triangulation_3/include/CGAL/Triangulation_3.h | 3 +++ 22 files changed, 66 insertions(+), 8 deletions(-) diff --git a/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h b/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h index 0009d2ffd50..21fb41c46ef 100644 --- a/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h +++ b/Algebraic_foundations/include/CGAL/Needs_parens_as_product.h @@ -24,6 +24,8 @@ #ifndef CGAL_NEEDS_PARENTHESES_AS_PRODUCT_H #define CGAL_NEEDS_PARENTHESES_AS_PRODUCT_H +#include + #include namespace CGAL { @@ -100,4 +102,6 @@ template <> struct Needs_parens_as_product{ } //namespace CGAL +#include + #endif //CGAL_NEEDS_PARENTHESES_AS_PRODUCT_H diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 8749add1527..bd6e03850aa 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -43,9 +43,12 @@ #include + #ifndef CGAL_TEST_ALGEBRAIC_STRUCTURE_H #define CGAL_TEST_ALGEBRAIC_STRUCTURE_H +#include + // checks the result type of a functor template void check_result_type(AdaptableFunctor, ResultType){ @@ -649,6 +652,7 @@ template class Test_sqrt { public: void operator() (const Sqrt& sqrt) { + CGAL_USE(sqrt); typedef typename Sqrt::argument_type Argument_type; typedef typename Sqrt::result_type Result_type; CGAL_USE_TYPE(Argument_type); @@ -952,4 +956,6 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) { } //namespace CGAL +#include + #endif // CGAL_TEST_ALGEBRAIC_STRUCTURE_H diff --git a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc index 8fcf9802e07..a4af8cd1825 100644 --- a/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc +++ b/CGAL_Core/include/CGAL/CORE/poly/Poly.tcc @@ -92,7 +92,7 @@ Polynomial::Polynomial(int n, const NT * c) { /////////////////////////////////////// template Polynomial::Polynomial(const VecNT & vN) { - degree = vN.size()-1; + degree = static_cast(vN.size())-1; if (degree >= 0) { coeff = new NT[degree+1]; for (int i = 0; i <= degree; i++) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index d3db3d201a3..f089bd56214 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -21,6 +21,9 @@ #if defined(BOOST_MSVC) # pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated # pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable: 4510) // default constructor could not be generated +# pragma warning(disable: 4512) // assignment operator could not be generated +# pragma warning(disable: 4610) // can never be instantiated - user defined constructor required + #endif diff --git a/Number_types/include/CGAL/CORE_BigInt.h b/Number_types/include/CGAL/CORE_BigInt.h index baf27524df7..44a3472ea67 100644 --- a/Number_types/include/CGAL/CORE_BigInt.h +++ b/Number_types/include/CGAL/CORE_BigInt.h @@ -23,6 +23,8 @@ #ifndef CGAL_CORE_BIGINT_H #define CGAL_CORE_BIGINT_H +#include + #include #include #include @@ -225,4 +227,6 @@ namespace Eigen { }; } +#include + #endif // CGAL_CORE_BIGINT_H diff --git a/Number_types/include/CGAL/CORE_BigRat.h b/Number_types/include/CGAL/CORE_BigRat.h index a083ec3cd9f..0d0dd010f66 100644 --- a/Number_types/include/CGAL/CORE_BigRat.h +++ b/Number_types/include/CGAL/CORE_BigRat.h @@ -23,6 +23,8 @@ #ifndef CGAL_CORE_BIGRAT_H #define CGAL_CORE_BIGRAT_H +#include + #include #include #include @@ -261,4 +263,6 @@ namespace Eigen { }; } +#include + #endif // CGAL_CORE_BIGRAT_H diff --git a/Number_types/include/CGAL/CORE_Expr.h b/Number_types/include/CGAL/CORE_Expr.h index 523e8e424c4..a815bc87195 100644 --- a/Number_types/include/CGAL/CORE_Expr.h +++ b/Number_types/include/CGAL/CORE_Expr.h @@ -26,6 +26,8 @@ #ifndef CGAL_CORE_EXPR_H #define CGAL_CORE_EXPR_H +#include + #include #include #include @@ -214,4 +216,6 @@ namespace Eigen { }; } +#include + #endif // CGAL_CORE_EXPR_H diff --git a/Number_types/include/CGAL/GMP/Gmpfr_type.h b/Number_types/include/CGAL/GMP/Gmpfr_type.h index fd9e61974cc..a95da50f316 100644 --- a/Number_types/include/CGAL/GMP/Gmpfr_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfr_type.h @@ -20,6 +20,8 @@ #ifndef CGAL_GMPFR_TYPE_H #define CGAL_GMPFR_TYPE_H +#include + #include #include #include @@ -1342,4 +1344,6 @@ Gmpfr max BOOST_PREVENT_MACRO_SUBSTITUTION(const Gmpfr& x,const Gmpfr& y){ } // namespace CGAL +#include + #endif // CGAL_GMPFR_TYPE_H diff --git a/Number_types/include/CGAL/MP_Float.h b/Number_types/include/CGAL/MP_Float.h index 9a52135d5fb..4b30b36650f 100644 --- a/Number_types/include/CGAL/MP_Float.h +++ b/Number_types/include/CGAL/MP_Float.h @@ -22,6 +22,7 @@ #ifndef CGAL_MP_FLOAT_H #define CGAL_MP_FLOAT_H +#include #include #include #include @@ -911,4 +912,5 @@ namespace Eigen { //specialization for Get_arithmetic_kernel #include +#include #endif // CGAL_MP_FLOAT_H 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 f3cdc799ce1..56a13bdea86 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -35,6 +35,8 @@ #ifndef CGAL_SQRT_EXTENSION_TYPE_H #define CGAL_SQRT_EXTENSION_TYPE_H +#include + #include #include #include @@ -826,6 +828,8 @@ print(std::ostream &os, const Sqrt_extension &r) #undef CGAL_int +#include + #endif // CGAL_SQRT_EXTENSION_TYPE_H // EOF diff --git a/Number_types/include/CGAL/Sqrt_extension/io.h b/Number_types/include/CGAL/Sqrt_extension/io.h index 7673126016c..62e496a681e 100644 --- a/Number_types/include/CGAL/Sqrt_extension/io.h +++ b/Number_types/include/CGAL/Sqrt_extension/io.h @@ -48,15 +48,15 @@ input_ascii(std::istream& is , Sqrt_extension& result){ swallow(is, 'T'); swallow(is, '['); is >> iformat(a0); - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); if (c != ',') CGAL_error_msg( "input error: , expected" ); is >> iformat(a1); - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); if (c != ',') CGAL_error_msg( "input error: , expected" ); is >> iformat(root); - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); if (c != ']') CGAL_error_msg( "input error: ] expected" ); if ( root < ROOT(0)) CGAL_error_msg("input error: non-negative root expected"); diff --git a/Number_types/include/CGAL/gmp.h b/Number_types/include/CGAL/gmp.h index 9e234c1d2c7..f0329dd2ae6 100644 --- a/Number_types/include/CGAL/gmp.h +++ b/Number_types/include/CGAL/gmp.h @@ -34,5 +34,7 @@ #if defined(BOOST_MSVC) # pragma warning(pop) #endif + #include + #endif // CGAL_GMP_H diff --git a/Number_types/test/Number_types/Lazy_exact_nt.cpp b/Number_types/test/Number_types/Lazy_exact_nt.cpp index 7e9e8f8723e..c9072b1b9ad 100644 --- a/Number_types/test/Number_types/Lazy_exact_nt.cpp +++ b/Number_types/test/Number_types/Lazy_exact_nt.cpp @@ -12,6 +12,7 @@ #include #include +#include #ifdef CGAL_USE_LEDA # include diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index b55af836068..d8c3a942e20 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -14,6 +14,8 @@ #include #include +#include + // TODO: Included from EXACUS/NumeriX/include/NiX/number_type_utils.h namespace CGAL { template diff --git a/Number_types/test/Number_types/bench_interval.cpp b/Number_types/test/Number_types/bench_interval.cpp index c850096cda5..3c76f3c06a2 100644 --- a/Number_types/test/Number_types/bench_interval.cpp +++ b/Number_types/test/Number_types/bench_interval.cpp @@ -6,6 +6,8 @@ #include #include +#include + #include #ifndef LOOPS diff --git a/Number_types/test/Number_types/include/CGAL/_test_utilities.h b/Number_types/test/Number_types/include/CGAL/_test_utilities.h index 23ecdef7786..4ad18c4e01f 100644 --- a/Number_types/test/Number_types/include/CGAL/_test_utilities.h +++ b/Number_types/test/Number_types/include/CGAL/_test_utilities.h @@ -152,10 +152,10 @@ template < class NT > bool test_integral_division(const NT&, CGAL::Integral_domain_tag) { - return (CGAL_NTS integral_division(NT(6),NT(3)) == NT(2)); + return (CGAL_NTS integral_division(NT(6),NT(3)) == NT(2)) //mixed ops with int - return (CGAL_NTS integral_division(6,NT(3)) == NT(2)); - return (CGAL_NTS integral_division(NT(6),3) == NT(2)); + && (CGAL_NTS integral_division(6,NT(3)) == NT(2)) + && (CGAL_NTS integral_division(NT(6),3) == NT(2)); } template < class NT > diff --git a/Number_types/test/Number_types/int.cpp b/Number_types/test/Number_types/int.cpp index 00c194fa18c..82177322652 100644 --- a/Number_types/test/Number_types/int.cpp +++ b/Number_types/test/Number_types/int.cpp @@ -1,5 +1,8 @@ #include #include + +#include + #include #include diff --git a/Number_types/test/Number_types/ioformat.cpp b/Number_types/test/Number_types/ioformat.cpp index cc270975a85..5afccd7e582 100644 --- a/Number_types/test/Number_types/ioformat.cpp +++ b/Number_types/test/Number_types/ioformat.cpp @@ -36,6 +36,9 @@ #include #include + +#include + #include typedef CGAL::Quotient QMPF; diff --git a/Number_types/test/Number_types/root_of_2.cpp b/Number_types/test/Number_types/root_of_2.cpp index 0b221b7d5e2..b1e4ff27503 100644 --- a/Number_types/test/Number_types/root_of_2.cpp +++ b/Number_types/test/Number_types/root_of_2.cpp @@ -42,6 +42,8 @@ # include #endif +#include + // We should put these in a nested namespace and use it. using CGAL::compare; // for double using CGAL::sign; // for double diff --git a/Number_types/test/Number_types/utilities.cpp b/Number_types/test/Number_types/utilities.cpp index 220a0b0b29a..941158d5014 100644 --- a/Number_types/test/Number_types/utilities.cpp +++ b/Number_types/test/Number_types/utilities.cpp @@ -42,6 +42,7 @@ #include +#include #include typedef CGAL::Quotient QMPF; diff --git a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h index a986cef69c6..d2f9b9791fa 100644 --- a/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Delaunay_triangulation_3.h @@ -28,6 +28,8 @@ #include +#include + #include #ifdef CGAL_CONCURRENT_TRIANGULATION_3_PROFILING @@ -2076,4 +2078,6 @@ is_valid(Cell_handle c, bool verbose, int level) const #include +#include + #endif // CGAL_DELAUNAY_TRIANGULATION_3_H diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 038626d8a30..cf7b0fe8dfd 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -25,6 +25,7 @@ #include +#include #include @@ -6791,4 +6792,6 @@ operator!=(const Triangulation_3 &t1, } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_3_H From 41e899415300f6f68c2a47f939e0688f3cde2300 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 15:48:42 +0000 Subject: [PATCH 03/84] Number_types --- Number_types/test/Number_types/long_doubletst.cpp | 4 +++- Number_types/test/Number_types/utilities.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Number_types/test/Number_types/long_doubletst.cpp b/Number_types/test/Number_types/long_doubletst.cpp index 1f5f99ba71c..f8f764f50e2 100644 --- a/Number_types/test/Number_types/long_doubletst.cpp +++ b/Number_types/test/Number_types/long_doubletst.cpp @@ -1,8 +1,10 @@ #include #include +#include + #if defined(BOOST_MSVC) -# pragma warning(disable:4723) +# pragma warning(disable:4723) // potential divide by 0 #endif int main() diff --git a/Number_types/test/Number_types/utilities.cpp b/Number_types/test/Number_types/utilities.cpp index 941158d5014..b29517bfd82 100644 --- a/Number_types/test/Number_types/utilities.cpp +++ b/Number_types/test/Number_types/utilities.cpp @@ -43,6 +43,7 @@ #include #include + #include typedef CGAL::Quotient QMPF; From 6c791f161aec3062cad3ae006ab35d4d6d5a9598 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 16:12:12 +0000 Subject: [PATCH 04/84] Triangulation_2 --- Generator/include/CGAL/generators.h | 5 +++++ Generator/include/CGAL/point_generators_2.h | 5 +++++ Installation/include/CGAL/disable_warnings.h | 2 ++ Number_types/test/Number_types/Sqrt_extension.h | 1 + Profiling_tools/include/CGAL/Profile_timer.h | 4 ++++ STL_Extension/include/CGAL/Compact_container.h | 12 ++++-------- .../include/CGAL/Spatial_sort_traits_adapter_2.h | 4 ++++ .../include/CGAL/Constrained_triangulation_2.h | 6 ++++++ .../CGAL/Constrained_triangulation_plus_2.h | 14 ++++++-------- Triangulation_2/include/CGAL/Triangulation_2.h | 4 ++++ .../include/CGAL/Triangulation_hierarchy_2.h | 4 ++++ 11 files changed, 45 insertions(+), 16 deletions(-) diff --git a/Generator/include/CGAL/generators.h b/Generator/include/CGAL/generators.h index 07554b3837c..d38fe2ed1c7 100644 --- a/Generator/include/CGAL/generators.h +++ b/Generator/include/CGAL/generators.h @@ -26,6 +26,8 @@ #ifndef CGAL_GENERATORS_H #define CGAL_GENERATORS_H 1 +#include + #include #include #include @@ -107,5 +109,8 @@ class Random_double_in_interval : public Random_generator_base { }; } //namespace CGAL + +#include + #endif // CGAL_GENERATORS_H // // EOF // diff --git a/Generator/include/CGAL/point_generators_2.h b/Generator/include/CGAL/point_generators_2.h index 0a667e74945..8bd30438268 100644 --- a/Generator/include/CGAL/point_generators_2.h +++ b/Generator/include/CGAL/point_generators_2.h @@ -29,6 +29,9 @@ #ifndef CGAL_POINT_GENERATORS_2_H #define CGAL_POINT_GENERATORS_2_H 1 + +#include + #include #include #include @@ -664,5 +667,7 @@ struct Random_points_in_triangles_2 }; } //namespace CGAL +#include + #endif // CGAL_POINT_GENERATORS_2_H // // EOF // diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index f089bd56214..ead4cca6320 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -21,7 +21,9 @@ #if defined(BOOST_MSVC) # pragma warning(push) +# pragma warning(disable: 4099) // struct class mixed # pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable:4355) // 'this' : used in base member initializer list # pragma warning(disable: 4510) // default constructor could not be generated # pragma warning(disable: 4512) // assignment operator could not be generated # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index d8c3a942e20..9fc07829464 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -747,3 +747,4 @@ void test_nt_converter() Source s; Target t=converter(s); } + diff --git a/Profiling_tools/include/CGAL/Profile_timer.h b/Profiling_tools/include/CGAL/Profile_timer.h index d27296eacc2..37fc062b437 100644 --- a/Profiling_tools/include/CGAL/Profile_timer.h +++ b/Profiling_tools/include/CGAL/Profile_timer.h @@ -41,6 +41,8 @@ #include #include +#include + namespace CGAL { struct Profile_timer @@ -78,4 +80,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_PROFILE_TIMER_H diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 1b6cf7b39fb..a8d2352f737 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -22,6 +22,8 @@ #ifndef CGAL_COMPACT_CONTAINER_H #define CGAL_COMPACT_CONTAINER_H +#include + #include #include @@ -1282,11 +1284,6 @@ namespace internal { namespace std { -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4099) // For VC10 it is class hash -#endif - #ifndef CGAL_CFG_NO_STD_HASH template < class DSC, bool Const > @@ -1300,10 +1297,9 @@ namespace std { }; #endif // CGAL_CFG_NO_STD_HASH -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif } // namespace std +#include + #endif // CGAL_COMPACT_CONTAINER_H diff --git a/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_2.h b/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_2.h index 8a1aae9b876..d3c0e476dc8 100644 --- a/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_2.h +++ b/Spatial_sorting/include/CGAL/Spatial_sort_traits_adapter_2.h @@ -22,6 +22,8 @@ #ifndef CGAL_SPATIAL_SORT_TRAITS_ADAPTER_2_H #define CGAL_SPATIAL_SORT_TRAITS_ADAPTER_2_H +#include + #include #include @@ -71,4 +73,6 @@ public: } //namespace CGAL +#include + #endif //CGAL_SPATIAL_SORT_TRAITS_ADAPTER_2_H diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 1a11c13179b..cc4a6e07556 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -25,6 +25,7 @@ #include +#include #include @@ -493,6 +494,9 @@ public: std::ptrdiff_t insert(InputIterator first, InputIterator last) #endif { +#if defined(_MSC_VER) + CGAL_USE(i); +#endif size_type n = number_of_vertices(); std::vector points (first, last); @@ -1503,4 +1507,6 @@ limit_intersection(const Gt& gt, } //namespace CGAL +#include + #endif //CGAL_CONSTRAINED_TRIANGULATION_2_H diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h index 0f98f9c67d4..d7bf3ef16d1 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -41,11 +42,6 @@ #include #endif -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) -//warning C4355: 'this' : used in base member initializer list -#endif namespace CGAL { @@ -880,6 +876,9 @@ public: std::ptrdiff_t insert(InputIterator first, InputIterator last) #endif { +#if defined(_MSC_VER) + CGAL_USE(i); +#endif size_type n = this->number_of_vertices(); std::vector points (first, last); @@ -1247,7 +1246,6 @@ points_in_constraint_end(Constraint_id cid) const } //namespace CGAL -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include + #endif //CGAL_CONSTRAINED_TRIANGULATION_PLUS_2_H diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 36e6e56cf69..d587d8eff5e 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -3653,4 +3655,6 @@ operator>>(std::istream& is, Triangulation_2 &tr) } //namespace CGAL +#include + #endif //CGAL_TRIANGULATION_2_H diff --git a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h index 12f0d5c2149..fd5521c6593 100644 --- a/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_hierarchy_2.h @@ -25,6 +25,8 @@ #include +#include + #include #include #include @@ -779,4 +781,6 @@ random_level() } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_HIERARCHY_2_H From fb51a69c7c818960f803a1d5cefc757421293c63 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 16:50:21 +0000 Subject: [PATCH 05/84] Mesh_2 --- .../include/CGAL/Apollonius_graph_2.h | 2 + Installation/include/CGAL/boost/bimap.hpp | 37 +++++++++++++++++++ .../include/CGAL/boost/bimap/multiset_of.hpp | 37 +++++++++++++++++++ .../include/CGAL/Delaunay_mesh_criteria_2.h | 3 ++ .../CGAL/Delaunay_mesh_size_criteria_2.h | 3 ++ Mesh_2/include/CGAL/Delaunay_mesher_2.h | 3 ++ .../Delaunay_mesher_no_edge_refinement_2.h | 3 ++ .../include/CGAL/Mesh_2/Do_not_refine_edges.h | 3 ++ .../CGAL/Mesh_2/Lipschitz_sizing_field_2.h | 3 ++ .../CGAL/Mesh_2/Mesh_global_optimizer_2.h | 2 +- .../include/CGAL/Triangulation_conformer_2.h | 4 ++ Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h | 4 +- Mesher_level/include/CGAL/Double_map.h | 6 ++- Spatial_searching/include/CGAL/Kd_tree.h | 3 ++ 14 files changed, 109 insertions(+), 4 deletions(-) create mode 100644 Installation/include/CGAL/boost/bimap.hpp create mode 100644 Installation/include/CGAL/boost/bimap/multiset_of.hpp diff --git a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h index f4523989122..ae3fc8f8ef3 100644 --- a/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h +++ b/Apollonius_graph_2/include/CGAL/Apollonius_graph_2.h @@ -26,6 +26,7 @@ #include +#include #define CGAL_APOLLONIUS_GRAPH_PSEUDO_CIRCLE_DESIGN 1 @@ -1345,5 +1346,6 @@ std::istream& operator>>(std::istream& is, #include +#include #endif // CGAL_APOLLONIUS_GRAPH_2_H diff --git a/Installation/include/CGAL/boost/bimap.hpp b/Installation/include/CGAL/boost/bimap.hpp new file mode 100644 index 00000000000..56290b3c29b --- /dev/null +++ b/Installation/include/CGAL/boost/bimap.hpp @@ -0,0 +1,37 @@ +// Copyright (c) 2014 +// Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), +// INRIA Sophia-Antipolis (France), +// Max-Planck-Institute Saarbruecken (Germany), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// +// Author(s) : Andreas Fabri + +#include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4244 4512) +#endif + +#include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif diff --git a/Installation/include/CGAL/boost/bimap/multiset_of.hpp b/Installation/include/CGAL/boost/bimap/multiset_of.hpp new file mode 100644 index 00000000000..95a2415cb2f --- /dev/null +++ b/Installation/include/CGAL/boost/bimap/multiset_of.hpp @@ -0,0 +1,37 @@ +// Copyright (c) 2014 +// Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), +// INRIA Sophia-Antipolis (France), +// Max-Planck-Institute Saarbruecken (Germany), +// and Tel-Aviv University (Israel). All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// +// Author(s) : Andreas Fabri + +#include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4244 4512) +#endif + +#include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif diff --git a/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h b/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h index 660c2cbea7c..559bc2c325c 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -120,4 +121,6 @@ public: } // end namespace CGAL +#include + #endif diff --git a/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h b/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h index b523b9c7905..a083667312a 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -193,4 +194,6 @@ public: } // end namespace CGAL +#include + #endif diff --git a/Mesh_2/include/CGAL/Delaunay_mesher_2.h b/Mesh_2/include/CGAL/Delaunay_mesher_2.h index e4969a8054c..583c1b52e82 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesher_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesher_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -375,4 +376,6 @@ refine_Delaunay_mesh_2(Tr& t, } // end namespace CGAL +#include + #endif // CGAL_DELAUNAY_MESHER_2_H 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 a0c217fc719..c1fe32a2aea 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 @@ -24,6 +24,7 @@ #include +#include #include #include @@ -364,4 +365,6 @@ refine_Delaunay_mesh_2_without_edge_refinement(Tr& t, } // end namespace CGAL +#include + #endif // CGAL_DELAUNAY_MESHER_NO_EDGE_REFINEMENT_2_H 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 2f3bdb83583..60cfd3a2405 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 @@ -25,6 +25,7 @@ #include +#include #include @@ -99,4 +100,6 @@ public: } // end namespace CGAL +#include + #endif // CGAL_MESH_2_DO_NOT_REFINE_EDGES_H diff --git a/Mesh_2/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h b/Mesh_2/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h index 7d368600ead..810deb938cb 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h +++ b/Mesh_2/include/CGAL/Mesh_2/Lipschitz_sizing_field_2.h @@ -26,6 +26,7 @@ #include +#include #include @@ -292,4 +293,6 @@ protected: }//namespace CGAL +#include + #endif //CGAL_LIPSCHITZ_SIZING_FIELD_2_H diff --git a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h index 346b0f85baf..a2a2de32a73 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h +++ b/Mesh_2/include/CGAL/Mesh_2/Mesh_global_optimizer_2.h @@ -146,7 +146,7 @@ public: moving_vertices.size()/100); big_moves_.resize(big_moves_size, FT(0)); - std::size_t nb_vertices_moved = -1; + std::size_t nb_vertices_moved = (std::numeric_limits::max)(); bool convergence_stop = false; // Iterate diff --git a/Mesh_2/include/CGAL/Triangulation_conformer_2.h b/Mesh_2/include/CGAL/Triangulation_conformer_2.h index 0bf648dbf84..e7aea1695ef 100644 --- a/Mesh_2/include/CGAL/Triangulation_conformer_2.h +++ b/Mesh_2/include/CGAL/Triangulation_conformer_2.h @@ -25,6 +25,8 @@ #include +#include + #include namespace CGAL { @@ -266,4 +268,6 @@ make_conforming_Delaunay_2(Tr& t) } // end namespace CGAL +#include + #endif // CGAL_TRIANGULATION_CONFORMER_2_H diff --git a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h index 8e91661d390..e15e47bff85 100644 --- a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h +++ b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h @@ -24,8 +24,7 @@ #include - - +#include #include #include @@ -178,5 +177,6 @@ namespace CGAL #endif +#include #endif diff --git a/Mesher_level/include/CGAL/Double_map.h b/Mesher_level/include/CGAL/Double_map.h index a8015220b3d..517cb223b13 100644 --- a/Mesher_level/include/CGAL/Double_map.h +++ b/Mesher_level/include/CGAL/Double_map.h @@ -22,6 +22,8 @@ #ifndef CGAL_DOUBLE_MAP_H #define CGAL_DOUBLE_MAP_H +#include + #include #include #include @@ -38,7 +40,7 @@ #endif #ifdef CGAL_USE_BOOST_BIMAP -#include +#include #include #endif @@ -317,4 +319,6 @@ erase(const Key& k) } // end namespace CGAL +#include + #endif // CGAL_DOUBLE_MAP_H diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index 0bc78913980..ba27e527745 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -586,4 +587,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_KD_TREE_H From 43d2ecb52119d998ea503a10d166e5804c71943d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 16:57:46 +0000 Subject: [PATCH 06/84] Triangulation_3 --- Filtered_kernel/include/CGAL/Lazy.h | 3 +++ Generator/include/CGAL/point_generators_3.h | 4 ++++ Installation/include/CGAL/disable_warnings.h | 4 ++-- .../include/CGAL/Regular_triangulation_3.h | 11 +++-------- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 6e2ae0079a8..1cfb6838fe5 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -22,6 +22,8 @@ #ifndef CGAL_LAZY_H #define CGAL_LAZY_H +#include + #include #include #include @@ -1760,5 +1762,6 @@ struct result { \ #undef CGAL_LEXACT #undef CGAL_LARGS +#include #endif // CGAL_LAZY_H diff --git a/Generator/include/CGAL/point_generators_3.h b/Generator/include/CGAL/point_generators_3.h index ce45f184431..7e83b1dab3c 100644 --- a/Generator/include/CGAL/point_generators_3.h +++ b/Generator/include/CGAL/point_generators_3.h @@ -28,6 +28,9 @@ #ifndef CGAL_POINT_GENERATORS_3_H #define CGAL_POINT_GENERATORS_3_H 1 + +#include + #include #include #include @@ -696,6 +699,7 @@ struct Random_points_in_triangles_3 } //namespace CGAL +#include #endif // CGAL_POINT_GENERATORS_3_H // // EOF // diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index ead4cca6320..645f623b52d 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -23,9 +23,9 @@ # pragma warning(push) # pragma warning(disable: 4099) // struct class mixed # pragma warning(disable: 4127) // conditional expression is constant -# pragma warning(disable:4355) // 'this' : used in base member initializer list +# pragma warning(disable: 4355) // 'this' : used in base member initializer list # pragma warning(disable: 4510) // default constructor could not be generated # pragma warning(disable: 4512) // assignment operator could not be generated # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required - +# pragma warning(disable: 4706) // assignment within conditional expression #endif diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_3.h index bfb6e10e51c..4a39fc68518 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_3.h @@ -27,6 +27,8 @@ #include +#include + #include #include @@ -68,11 +70,6 @@ #include #endif -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) // complaint about using 'this' to -#endif // initialize a member - namespace CGAL { /************************************************ @@ -2570,8 +2567,6 @@ namespace CGAL { } //namespace CGAL -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include #endif // CGAL_REGULAR_TRIANGULATION_3_H From 5e3889127ff356c7003b39a45219c8e415376c9c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 17:07:36 +0000 Subject: [PATCH 07/84] Surface_mesh --- Surface_mesh/include/CGAL/Surface_mesh/IO.h | 2 + .../include/CGAL/Surface_mesh/Surface_mesh.h | 59 ++++++++++--------- Surface_mesh/test/Surface_mesh/SM_common.h | 2 + 3 files changed, 35 insertions(+), 28 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO.h b/Surface_mesh/include/CGAL/Surface_mesh/IO.h index bcfc15dca9a..683c7d496d4 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO.h @@ -25,6 +25,7 @@ #include +#include //== INCLUDES ================================================================= @@ -497,6 +498,7 @@ generic_print_surface_mesh( std::ostream& out, } } // CGAL +#include #endif // CGAL_SURFACE_MESH_IO_H diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index f112c8093fa..ad72f2cb838 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -73,17 +74,17 @@ namespace CGAL { /// We write -1, which is /// std::numeric_limits::max() /// as `size_type` is an unsigned type. - explicit SM_Index(size_type _idx=-1) : idx_(_idx) {} + explicit SM_Index(size_type _idx=(std::numeric_limits::max)()) : idx_(_idx) {} /// Get the underlying index of this index operator size_type() const { return idx_; } - /// reset index to be invalid (index=-1) - void reset() { idx_=-1; } + /// reset index to be invalid (index=(std::numeric_limits::max)()) + void reset() { idx_=(std::numeric_limits::max)(); } - /// return whether the index is valid, i.e., the index is not equal to -1. + /// return whether the index is valid, i.e., the index is not equal to (std::numeric_limits::max)(). bool is_valid() const { - size_type inf = -1; + size_type inf = (std::numeric_limits::max)(); return idx_ != inf; } @@ -142,7 +143,7 @@ namespace CGAL { { public: - SM_Vertex_index() : SM_Index(-1) {} + SM_Vertex_index() : SM_Index((std::numeric_limits::max)()) {} explicit SM_Vertex_index(size_type _idx) : SM_Index(_idx) {} @@ -168,7 +169,7 @@ namespace CGAL { typedef void pointer; typedef void reference; - SM_Halfedge_index() : SM_Index(-1) {} + SM_Halfedge_index() : SM_Index((std::numeric_limits::max)()) {} explicit SM_Halfedge_index(size_type _idx) : SM_Index(_idx) {} @@ -184,7 +185,7 @@ namespace CGAL { { public: - SM_Face_index() : SM_Index(-1) {} + SM_Face_index() : SM_Index((std::numeric_limits::max)()) {} explicit SM_Face_index(size_type _idx) : SM_Index(_idx) {} @@ -201,7 +202,7 @@ namespace CGAL { public: typedef boost::uint32_t size_type; - SM_Edge_index() : halfedge_(-1) { } + SM_Edge_index() : halfedge_((std::numeric_limits::max)()) { } explicit SM_Edge_index(size_type idx) : halfedge_(idx * 2) { } @@ -213,10 +214,10 @@ namespace CGAL { // returns the underlying index of this index. operator size_type() const { return (size_type)halfedge_ / 2; } - // resets index to be invalid (index=-1) + // resets index to be invalid (index=(std::numeric_limits::max)()) void reset() { halfedge_.reset(); } - // returns whether the index is valid, i.e., the index is not equal to -1. + // returns whether the index is valid, i.e., the index is not equal to (std::numeric_limits::max)(). bool is_valid() const { return halfedge_.is_valid(); } // Are two indices equal? @@ -839,7 +840,7 @@ public: /// adds a new vertex, and resizes vertex properties if necessary. Vertex_index add_vertex() { - size_type inf = -1; + size_type inf = (std::numeric_limits::max)(); if(vertices_freelist_ != inf){ size_type idx = vertices_freelist_; vertices_freelist_ = (size_type)vconn_[Vertex_index(vertices_freelist_)].halfedge_; @@ -871,7 +872,7 @@ public: Halfedge_index add_edge() { Halfedge_index h0, h1; - size_type inf = -1; + size_type inf = (std::numeric_limits::max)(); if(edges_freelist_ != inf){ size_type idx = edges_freelist_; edges_freelist_ = (size_type)hconn_[Halfedge_index(edges_freelist_)].next_halfedge_; @@ -908,7 +909,7 @@ public: /// adds a new face, and resizes face properties if necessary. Face_index add_face() { - size_type inf = -1; + size_type inf = (std::numeric_limits::max)(); if(faces_freelist_ != inf){ size_type idx = faces_freelist_; faces_freelist_ = (size_type)fconn_[Face_index(faces_freelist_)].halfedge_; @@ -1103,11 +1104,11 @@ public: hconn_[hi].prev_halfedge_ = Halfedge_index(size_type(hconn_[hi].prev_halfedge_)+nh); } } - size_type inf_value = -1; + size_type inf_value = (std::numeric_limits::max)(); if(other.vertices_freelist_ != inf_value){ if(vertices_freelist_ != inf_value){ Vertex_index vi(nv+other.vertices_freelist_); - Halfedge_index inf(-1); + Halfedge_index inf((std::numeric_limits::max)()); while(vconn_[vi].halfedge_ != inf){ vi = Vertex_index(size_type(vconn_[vi].halfedge_)); } @@ -1118,7 +1119,7 @@ public: if(other.faces_freelist_ != inf_value){ if(faces_freelist_ != inf_value){ Face_index fi(nf+other.faces_freelist_); - Halfedge_index inf(-1); + Halfedge_index inf((std::numeric_limits::max)()); while(fconn_[fi].halfedge_ != inf){ fi = Face_index(size_type(fconn_[fi].halfedge_)); } @@ -1129,7 +1130,7 @@ public: if(other.edges_freelist_ != inf_value){ if(edges_freelist_ != inf_value){ Halfedge_index hi((nh>>1)+other.edges_freelist_); - Halfedge_index inf(-1); + Halfedge_index inf((std::numeric_limits::max)()); while(hconn_[hi].next_halfedge_ != inf){ hi = hconn_[hi].next_halfedge_; } @@ -1893,26 +1894,26 @@ private: //--------------------------------------------------- property handling /// \name Null Elements ///@{ - /// returns `Vertex_index(-1)`. + /// returns `Vertex_index((std::numeric_limits::max)())`. static Vertex_index null_vertex() { - return vertex_index(-1); + return vertex_index((std::numeric_limits::max)()); } - /// returns `Edge_index(-1)`. + /// returns `Edge_index((std::numeric_limits::max)())`. static Edge_index null_edge() { - return edge_index(-1); + return edge_index((std::numeric_limits::max)()); } - /// returns `Halfedge_index(-1)`. + /// returns `Halfedge_index((std::numeric_limits::max)())`. static Halfedge_index null_halfedge() { - return halfedge_index(-1); + return halfedge_index((std::numeric_limits::max)()); } - /// returns `Face_index(-1)`. + /// returns `Face_index((std::numeric_limits::max)())`. static Face_index null_face() { - return face_index(-1); + return face_index((std::numeric_limits::max)()); } /// @} @@ -2195,7 +2196,7 @@ Surface_mesh() fremoved_ = add_property_map("f:removed", false).first; removed_vertices_ = removed_edges_ = removed_faces_ = 0; - vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1; + vertices_freelist_ = edges_freelist_ = faces_freelist_ = (std::numeric_limits::max)(); garbage_ = false; anonymous_property_ = 0; } @@ -2308,7 +2309,7 @@ clear() fprops_.shrink_to_fit(); removed_vertices_ = removed_edges_ = removed_faces_ = 0; - vertices_freelist_ = edges_freelist_ = faces_freelist_ = -1; + vertices_freelist_ = edges_freelist_ = faces_freelist_ = (std::numeric_limits::max)(); garbage_ = false; anonymous_property_ = 0; } @@ -2710,5 +2711,7 @@ namespace boost { #endif // DOXYGEN_RUNNING +#include + #endif /* CGAL_SURFACE_MESH_H */ diff --git a/Surface_mesh/test/Surface_mesh/SM_common.h b/Surface_mesh/test/Surface_mesh/SM_common.h index 3409a647caa..11b3c0e8912 100644 --- a/Surface_mesh/test/Surface_mesh/SM_common.h +++ b/Surface_mesh/test/Surface_mesh/SM_common.h @@ -6,7 +6,9 @@ #include +#include #include +#include typedef CGAL::Simple_cartesian K; typedef CGAL::Surface_mesh Sm; From 22bd2815a3470cbef5af553a9f31610b6431e56b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 17:13:53 +0000 Subject: [PATCH 08/84] Polyhedron --- Box_intersection_d/include/CGAL/box_intersection_d.h | 3 +++ HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h | 5 +++++ Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h | 3 +++ Polyhedron/include/CGAL/polyhedron_cut_plane_3.h | 4 ++++ Polyhedron_IO/include/CGAL/IO/Polyhedron_scan_OFF.h | 4 ++++ STL_Extension/include/CGAL/In_place_list.h | 4 ++++ 6 files changed, 23 insertions(+) diff --git a/Box_intersection_d/include/CGAL/box_intersection_d.h b/Box_intersection_d/include/CGAL/box_intersection_d.h index 1a638b5804b..4058085cd96 100644 --- a/Box_intersection_d/include/CGAL/box_intersection_d.h +++ b/Box_intersection_d/include/CGAL/box_intersection_d.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -398,4 +399,6 @@ void box_self_intersection_all_pairs_d( } //namespace CGAL +#include + #endif diff --git a/HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h b/HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h index 56fc0129092..161704f638f 100644 --- a/HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h +++ b/HalfedgeDS/include/CGAL/halfedgeDS_cut_component.h @@ -29,6 +29,8 @@ #ifndef CGAL_HALFEDGEDS_CUT_COMPONENT_H #define CGAL_HALFEDGEDS_CUT_COMPONENT_H 1 +#include + #include #include @@ -150,5 +152,8 @@ halfedgeDS_cut_component( HDS& hds, } } //namespace CGAL + +#include + #endif // CGAL_HALFEDGEDS_CUT_COMPONENT_H // // EOF // diff --git a/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h b/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h index f9ac9b28f29..ef71376a8ca 100644 --- a/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h +++ b/Polyhedron/include/CGAL/Polyhedron_incremental_builder_3.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -915,5 +916,7 @@ remove_unconnected_vertices( Tag_true) { } //namespace CGAL +#include + #endif // CGAL_POLYHEDRON_INCREMENTAL_BUILDER_3_H // // EOF // diff --git a/Polyhedron/include/CGAL/polyhedron_cut_plane_3.h b/Polyhedron/include/CGAL/polyhedron_cut_plane_3.h index c79e98ecce1..153d5b2eac3 100644 --- a/Polyhedron/include/CGAL/polyhedron_cut_plane_3.h +++ b/Polyhedron/include/CGAL/polyhedron_cut_plane_3.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -153,5 +154,8 @@ polyhedron_cut_plane_3( Poly& poly, } } //namespace CGAL + +#include + #endif // CGAL_POLYHEDRON_CUT_PLANE_3_H // // EOF // diff --git a/Polyhedron_IO/include/CGAL/IO/Polyhedron_scan_OFF.h b/Polyhedron_IO/include/CGAL/IO/Polyhedron_scan_OFF.h index 02f2833b727..5c27930709d 100644 --- a/Polyhedron_IO/include/CGAL/IO/Polyhedron_scan_OFF.h +++ b/Polyhedron_IO/include/CGAL/IO/Polyhedron_scan_OFF.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -151,5 +152,8 @@ Polyhedron_scan_OFF:: operator()( HDS& target) { } } //namespace CGAL + +#include + #endif // CGAL_IO_POLYHEDRON_SCAN_OFF_H // // EOF // diff --git a/STL_Extension/include/CGAL/In_place_list.h b/STL_Extension/include/CGAL/In_place_list.h index ccc514b85a0..47f82f39cd3 100644 --- a/STL_Extension/include/CGAL/In_place_list.h +++ b/STL_Extension/include/CGAL/In_place_list.h @@ -28,6 +28,8 @@ #ifndef CGAL_IN_PLACE_LIST_H #define CGAL_IN_PLACE_LIST_H 1 +#include + #include #include #include @@ -810,4 +812,6 @@ namespace std { } // namespace std +#include + #endif // CGAL_IN_PLACE_LIST_H From 38b2e57b111508e6f0aecc4b3c787796cc46b7fd Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 17:59:35 +0000 Subject: [PATCH 09/84] PMP --- AABB_tree/include/CGAL/AABB_traits.h | 4 ++++ BGL/include/CGAL/boost/graph/Dual.h | 4 ++++ .../include/CGAL/Combinatorial_map.h | 4 ++++ .../CGAL/Combinatorial_map_iterators_base.h | 5 +++++ .../Bbox_3_Segment_3_do_intersect.h | 4 ++++ .../corefinement/Polyhedra_output_builder.h | 3 +++ .../CGAL/intersection_of_Polyhedra_3.h | 3 +++ ...ection_of_Polyhedra_3_refinement_visitor.h | 3 ++- .../connected_components.h | 3 +++ .../Polygon_mesh_processing/corefinement.h | 3 +++ .../Polygon_mesh_processing/detect_features.h | 4 ++++ .../CGAL/Polygon_mesh_processing/fair.h | 3 +++ .../Corefinement/Face_graph_output_builder.h | 20 +++++++++---------- .../Output_builder_for_autorefinement.h | 5 ++++- .../internal/Corefinement/Visitor.h | 3 +++ .../internal/Corefinement/intersection_impl.h | 4 ++-- .../internal/Corefinement/predicates.h | 4 ++-- .../Polygon_mesh_processing/intersection.h | 3 +++ .../CGAL/Polygon_mesh_processing/measure.h | 3 +++ .../orient_polygon_soup.h | 3 +++ .../polygon_soup_to_polygon_mesh.h | 3 +++ .../random_perturbation.h | 4 ++++ .../CGAL/Polygon_mesh_processing/remesh.h | 3 +++ .../self_intersections.h | 3 +++ .../Polygon_mesh_processing/stitch_borders.h | 2 ++ .../triangulate_faces.h | 3 +++ .../triangulate_hole.h | 3 +++ .../include/CGAL/Side_of_triangle_mesh.h | 3 +++ STL_Extension/include/CGAL/result_of.h | 4 ++++ 29 files changed, 100 insertions(+), 16 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index cb1447fdf26..638153dc6c1 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -25,6 +25,8 @@ #include +#include + #include #include #include @@ -541,4 +543,6 @@ private: } // end namespace CGAL +#include + #endif // CGAL_AABB_TRAITS_H_ diff --git a/BGL/include/CGAL/boost/graph/Dual.h b/BGL/include/CGAL/boost/graph/Dual.h index 0f2c2e0cd76..aa8707bd047 100644 --- a/BGL/include/CGAL/boost/graph/Dual.h +++ b/BGL/include/CGAL/boost/graph/Dual.h @@ -21,6 +21,8 @@ #ifndef CGAL_BGL_DUAL_H #define CGAL_BGL_DUAL_H +#include + #include #include #include @@ -488,4 +490,6 @@ in_degree(typename boost::graph_traits >::vertex_descriptor v, } // namespace CGAL +#include + #endif diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 473ee6d4a0d..d6da5650c85 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -21,6 +21,8 @@ #ifndef CGAL_COMBINATORIAL_MAP_H #define CGAL_COMBINATORIAL_MAP_H 1 +#include + #include #include #include @@ -5103,5 +5105,7 @@ namespace CGAL { _Pragma("GCC diagnostic pop") #endif + #include + #endif // CGAL_COMBINATORIAL_MAP_H // // EOF // diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index 51700b0a1b0..9625f6f0d19 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -21,6 +21,8 @@ #ifndef CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH #define CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH 1 +#include + #include #include #include @@ -597,6 +599,9 @@ namespace CGAL { }; //**************************************************************************** } // namespace CGAL + +#include + //****************************************************************************** #endif // CGAL_COMBINATORIAL_MAP_ITERATORS_BASE_HH //****************************************************************************** diff --git a/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h b/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h index 365bf918cde..47b20df326c 100644 --- a/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h +++ b/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h @@ -23,6 +23,8 @@ #ifndef CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_DO_INTERSECT_H #define CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_DO_INTERSECT_H +#include + #include #include #include @@ -449,4 +451,6 @@ bool do_intersect(const Segment_3& a, } //namespace CGAL +#include + #endif // CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_SEGMENT_3_DO_INTERSECT_H diff --git a/Operations_on_polyhedra/include/CGAL/internal/corefinement/Polyhedra_output_builder.h b/Operations_on_polyhedra/include/CGAL/internal/corefinement/Polyhedra_output_builder.h index c008e32a30a..33cf1a4df8c 100644 --- a/Operations_on_polyhedra/include/CGAL/internal/corefinement/Polyhedra_output_builder.h +++ b/Operations_on_polyhedra/include/CGAL/internal/corefinement/Polyhedra_output_builder.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -2510,4 +2511,6 @@ public: } } // end of namespace CGAL::Corefinement +#include + #endif // CGAL_INTERNAL_COREFINEMENT_POLYHEDRA_OUTPUT_BUILDER_H diff --git a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h index f7e524bb984..9d7bb7ec679 100644 --- a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h +++ b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -2172,6 +2173,8 @@ intersection_Polyhedron_3_Polyhedron_3(const Polyhedron& P, const Polyhedron& Q, }// namespace CGAL +#include + #endif //CGAL_INTERSECTION_OF_POLYHEDRA_3_H /* diff --git a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h index 906b2778c6d..71533b11402 100644 --- a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h +++ b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -1157,6 +1158,6 @@ public: }//namespace CGAL - +#include #endif //CGAL_INTERSECTION_OF_POLYHEDRA_3_REFINEMENT_VISITOR_H diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h index 5dfd17d0f5c..b08cea61b7e 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/connected_components.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -804,4 +805,6 @@ void keep_connected_components(PolygonMesh& pmesh } // namespace CGAL +#include + #endif //CGAL_POLYGON_MESH_PROCESSING_CONNECTED_COMPONENTS_H diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h index da869cd192c..c6f4c83e0fd 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/corefinement.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -980,4 +981,6 @@ autorefine_and_remove_self_intersections(TriangleMesh& tm) } } // end of namespace CGAL::Polygon_mesh_processing +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_COREFINEMENT_H diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h index 26a2f6f652a..78037367700 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/detect_features.h @@ -25,6 +25,8 @@ #include +#include + #include #include #include @@ -469,4 +471,6 @@ sharp_edges_segmentation(PolygonMesh& p, } // end namespace PMP } // end namespace CGAL +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_DETECT_FEATURES_IN_POLYGON_MESH_H 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 291239240e2..e955324d22c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/fair.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -170,4 +171,6 @@ namespace internal { } //end namespace CGAL +#include + #endif //CGAL_POLYGON_MESH_PROCESSING_FAIR_H 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 f9e5b810ef2..b0c37510978 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 @@ -351,7 +351,7 @@ public: , is_tm2_closed( is_closed(tm2)) , is_tm1_inside_out( is_tm1_closed && !PMP::is_outward_oriented(tm1) ) , is_tm2_inside_out( is_tm2_closed && !PMP::is_outward_oriented(tm2) ) - , NID(-1) + , NID((std::numeric_limits::max)()) , mesh_to_intersection_edges(tm1, tm2) {} @@ -729,7 +729,7 @@ public: vpm1, vpm2, nodes) ) //p1==q2 { - CGAL_assertion( index_p1!=index_p2 || index_p1==Node_id(-1) ); + CGAL_assertion( index_p1!=index_p2 || index_p1==Node_id((std::numeric_limits::max)()) ); coplanar_patches_of_tm1.set(patch_id_p1); coplanar_patches_of_tm2.set(patch_id_q2); bool q1_is_between_p1p2 = sorted_around_edge( @@ -799,17 +799,17 @@ public: #endif //CGAL_COREFINEMENT_POLYHEDRA_DEBUG CGAL_assertion( - ( index_p1 == Node_id(-1) ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != - ( index_q1 == Node_id(-1) ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) + ( index_p1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != + ( index_q1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) && - ( index_p2 == Node_id(-1) ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != - ( index_q1 == Node_id(-1) ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) + ( index_p2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != + ( index_q1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q1)): nodes.exact_node(index_q1) ) && - ( index_p1 == Node_id(-1) ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != - ( index_q2 == Node_id(-1) ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) + ( index_p1 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p1)): nodes.exact_node(index_p1) ) != + ( index_q2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) && - ( index_p2 == Node_id(-1) ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != - ( index_q2 == Node_id(-1) ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) + ( index_p2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm1,p2)): nodes.exact_node(index_p2) ) != + ( index_q2 == Node_id((std::numeric_limits::max)()) ? nodes.to_exact(get(vpm2,q2)): nodes.exact_node(index_q2) ) ); bool q1_is_between_p1p2 = sorted_around_edge( diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h index 1406b7ac9b3..3621fbb88d6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Output_builder_for_autorefinement.h @@ -24,6 +24,7 @@ #include +#include #include @@ -167,7 +168,7 @@ public: , ecm(ecm) , is_tm_closed( is_closed(tm)) , is_tm_inside_out( is_tm_closed && !PMP::is_outward_oriented(tm) ) - , NID(-1) + , NID((std::numeric_limits::max)()) , all_fixed(true) {} @@ -906,4 +907,6 @@ public: } } // CGAL::Corefinement +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_INTERNAL_OUTPUT_BUILDER_FOR_AUTOREFINEMENT_H 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 615ab82d7bd..dfb763f61d9 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 @@ -24,6 +24,7 @@ #include +#include #include #include @@ -1043,4 +1044,6 @@ public: } } //end of namespace CGAL::Corefinement +#include + #endif //CGAL_POLYGON_MESH_PROCESSING_INTERNAL_COREFINEMENT_VISITOR_H 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 5ecb21742aa..fd68d00e2a7 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 @@ -991,7 +991,7 @@ public: filter_intersections(tm1, tm2, vpm1, vpm2, throw_on_self_intersection); filter_intersections(tm2, tm1, vpm2, vpm1, throw_on_self_intersection); - Node_id current_node(-1); + Node_id current_node((std::numeric_limits::max)()); CGAL_assertion(current_node+1==0); #ifndef DO_NOT_HANDLE_COPLANAR_FACES @@ -1057,7 +1057,7 @@ public: filter_intersections(tm, vpm); - Node_id current_node(-1); + Node_id current_node((std::numeric_limits::max)()); CGAL_assertion(current_node+1==0); //first handle coplanar triangles diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h index 5c2c9636ca0..d427dbcbf4a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Corefinement/predicates.h @@ -141,7 +141,7 @@ bool are_triangles_coplanar_same_side(Node_id o_prime_index, const Vpm& vpm_q, const Node_vector& nodes) { - const Node_id NID(-1); + const Node_id NID((std::numeric_limits::max)()); return are_triangles_coplanar_same_side( nodes.exact_node(o_prime_index), nodes.exact_node(o_index), @@ -163,7 +163,7 @@ bool sorted_around_edge( Node_id o_prime_index, const Vpm& vpm_q, const Node_vector& nodes) { - const Node_id NID(-1); + const Node_id NID((std::numeric_limits::max)()); return sorted_around_edge( nodes.exact_node(o_prime_index), nodes.exact_node(o_index), 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 9e43ceffc82..7b1881a9fff 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/intersection.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -1770,4 +1771,6 @@ surface_self_intersection(const TriangleMesh& tm, } } //end of namespace CGAL::Polygon_mesh_processing +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_INTERSECTION_H diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h index e183cb98055..ab90de3a459 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/measure.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -539,4 +540,6 @@ volume(const TriangleMesh& tmesh, const CGAL_PMP_NP_CLASS& np) } } +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_MEASURE_H 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 5a82927850b..7f1b776a150 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 @@ -25,6 +25,7 @@ #include +#include #include #include @@ -490,4 +491,6 @@ bool orient_polygon_soup(PointRange& points, } }//end namespace CGAL::Polygon_mesh_processing +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_ORIENT_POLYGON_SOUP diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h index 61f70d3d221..e1bfa72f14b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -224,4 +225,6 @@ public: }// end namespace CGAL +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_POLYGON_SOUP_TO_POLYGON_MESH diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/random_perturbation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/random_perturbation.h index 8dc23d74776..d0fac0391c0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/random_perturbation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/random_perturbation.h @@ -24,6 +24,8 @@ #include +#include + #include #include @@ -231,5 +233,7 @@ void random_perturbation(TriangleMesh& tmesh } //end namespace Polygon_mesh_processing } //end namespace CGAL +#include + #endif //CGAL_POLYGON_MESH_PROCESSING_RANDOM_PERTURBATION_H diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h index 681f6f96754..4a7dc4daead 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h @@ -24,6 +24,7 @@ #include +#include #include @@ -360,4 +361,6 @@ void split_long_edges(const EdgeRange& edges } //end namespace Polygon_mesh_processing } //end namespace CGAL +#include + #endif diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h index 506dd87d424..a3d85e06bd1 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -485,4 +486,6 @@ bool does_self_intersect(const FaceRange& face_range, }// namespace CGAL +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_SELF_INTERSECTIONS diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h index 60373b6789e..8ef15a95303 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/stitch_borders.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -552,5 +553,6 @@ void stitch_borders(PolygonMesh& pmesh, } //end of namespace CGAL +#include #endif //CGAL_STITCH_POLYGON_MESH_H 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 53fb7573b8f..17786210ba1 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 @@ -24,6 +24,7 @@ #include +#include #include #include @@ -434,4 +435,6 @@ bool triangulate_faces(PolygonMesh& pmesh) } // end namespace CGAL +#include + #endif // CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_FACES_H 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 c0de0f97f71..ffd95e7cc6a 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 @@ -23,6 +23,7 @@ #include +#include #include #include @@ -411,4 +412,6 @@ namespace Polygon_mesh_processing { } //end namespace CGAL +#include + #endif //CGAL_POLYGON_MESH_PROCESSING_TRIANGULATE_HOLE_H diff --git a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h index 8f7561cea23..b59b027fd90 100644 --- a/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h +++ b/Polygon_mesh_processing/include/CGAL/Side_of_triangle_mesh.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -202,4 +203,6 @@ public: } // namespace CGAL +#include + #endif //CGAL_SIDE_OF_TRIANGLE_MESH_H diff --git a/STL_Extension/include/CGAL/result_of.h b/STL_Extension/include/CGAL/result_of.h index 7a1ff8a2428..59c8f02e7f4 100644 --- a/STL_Extension/include/CGAL/result_of.h +++ b/STL_Extension/include/CGAL/result_of.h @@ -27,6 +27,8 @@ #ifndef CGAL_RESULT_OF_H #define CGAL_RESULT_OF_H +#include + #include #include @@ -52,4 +54,6 @@ struct result_of } +#include + #endif //CGAL_RESULT_OF_H From 7675141f2bcc89aca6c3a7d42c7c0b9920209e3d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 19:43:47 +0000 Subject: [PATCH 10/84] AABB_tree --- .../include/CGAL/AABB_face_graph_triangle_primitive.h | 3 +++ .../include/CGAL/AABB_halfedge_graph_segment_primitive.h | 2 ++ AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h | 2 ++ .../include/CGAL/AABB_polyhedron_triangle_primitive.h | 2 ++ AABB_tree/include/CGAL/AABB_primitive.h | 2 ++ AABB_tree/include/CGAL/AABB_segment_primitive.h | 2 ++ AABB_tree/include/CGAL/AABB_tree.h | 2 ++ AABB_tree/include/CGAL/AABB_triangle_primitive.h | 2 ++ .../include/CGAL/AABB_triangulation_3_triangle_primitive.h | 2 ++ AABB_tree/test/AABB_tree/AABB_test_util.h | 5 +++++ .../Intersections_3/Bbox_3_Triangle_3_do_intersect.h | 7 +++++++ 11 files changed, 31 insertions(+) diff --git a/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h b/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h index 648cc3ab572..83e01c72d6c 100644 --- a/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h +++ b/AABB_tree/include/CGAL/AABB_face_graph_triangle_primitive.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -178,5 +179,7 @@ public: } // end namespace CGAL +#include + #endif // CGAL_AABB_FACE_GRAPH_TRIANGLE_PRIMITIVE_H diff --git a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h index 38a7b187e9d..1a0dc4eb616 100644 --- a/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_halfedge_graph_segment_primitive.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -190,6 +191,7 @@ public: } // end namespace CGAL +#include #endif // CGAL_AABB_HALFEDGE_GRAPH_SEGMENT_PRIMITIVE_H diff --git a/AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h b/AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h index a2783046779..85798d83374 100644 --- a/AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_polyhedron_segment_primitive.h @@ -29,6 +29,7 @@ #include +#include #define CGAL_DEPRECATED_HEADER "" #define CGAL_REPLACEMENT_HEADER "" @@ -162,5 +163,6 @@ namespace CGAL { } // end namespace CGAL +#include #endif // CGAL_AABB_POLYHEDRON_SEGMENT_PRIMITIVE_H_ diff --git a/AABB_tree/include/CGAL/AABB_polyhedron_triangle_primitive.h b/AABB_tree/include/CGAL/AABB_polyhedron_triangle_primitive.h index 377995c0648..363a718c03f 100644 --- a/AABB_tree/include/CGAL/AABB_polyhedron_triangle_primitive.h +++ b/AABB_tree/include/CGAL/AABB_polyhedron_triangle_primitive.h @@ -25,6 +25,7 @@ #include +#include #define CGAL_DEPRECATED_HEADER "" #define CGAL_REPLACEMENT_HEADER "" @@ -158,5 +159,6 @@ namespace CGAL { } // end namespace CGAL +#include #endif // CGAL_AABB_POLYHEDRON_TRIANGLE_PRIMITIVE_H_ diff --git a/AABB_tree/include/CGAL/AABB_primitive.h b/AABB_tree/include/CGAL/AABB_primitive.h index 9bfa88a306e..34a6ec4a737 100644 --- a/AABB_tree/include/CGAL/AABB_primitive.h +++ b/AABB_tree/include/CGAL/AABB_primitive.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -231,6 +232,7 @@ public: } // end namespace CGAL +#include #endif // CGAL_AABB_PRIMITIVE_H diff --git a/AABB_tree/include/CGAL/AABB_segment_primitive.h b/AABB_tree/include/CGAL/AABB_segment_primitive.h index 03d1b6ac4de..00618eafd34 100644 --- a/AABB_tree/include/CGAL/AABB_segment_primitive.h +++ b/AABB_tree/include/CGAL/AABB_segment_primitive.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -102,6 +103,7 @@ public: } // end namespace CGAL +#include #endif // CGAL_AABB_SEGMENT_PRIMITIVE_H_ diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 79df2ecdb7b..7ef32c172ab 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -1282,6 +1283,7 @@ public: #include +#include #endif // CGAL_AABB_TREE_H diff --git a/AABB_tree/include/CGAL/AABB_triangle_primitive.h b/AABB_tree/include/CGAL/AABB_triangle_primitive.h index 1c301ae0afd..4b2035e00f4 100644 --- a/AABB_tree/include/CGAL/AABB_triangle_primitive.h +++ b/AABB_tree/include/CGAL/AABB_triangle_primitive.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -102,6 +103,7 @@ public: } // end namespace CGAL +#include #endif // CGAL_AABB_TRIANGLE_PRIMITIVE_H_ diff --git a/AABB_tree/include/CGAL/AABB_triangulation_3_triangle_primitive.h b/AABB_tree/include/CGAL/AABB_triangulation_3_triangle_primitive.h index e0b9ef64854..96f4b305f28 100644 --- a/AABB_tree/include/CGAL/AABB_triangulation_3_triangle_primitive.h +++ b/AABB_tree/include/CGAL/AABB_triangulation_3_triangle_primitive.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -119,5 +120,6 @@ namespace CGAL { } // end namespace CGAL +#include #endif // AABB_TRIANGULATION_3_TRIANGLE_PRIMITIVE_H_ diff --git a/AABB_tree/test/AABB_tree/AABB_test_util.h b/AABB_tree/test/AABB_tree/AABB_test_util.h index 94d47513a42..55eeb4d84c8 100644 --- a/AABB_tree/test/AABB_tree/AABB_test_util.h +++ b/AABB_tree/test/AABB_tree/AABB_test_util.h @@ -30,6 +30,9 @@ #include #include #include + +#include + #include #include @@ -870,3 +873,5 @@ private: mutable double m_naive_time; mutable double m_tree_time; }; + +#include diff --git a/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h b/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h index a4f62f339fc..7584aac800b 100644 --- a/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h +++ b/Intersections_3/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h @@ -26,6 +26,8 @@ #include #include +#include + // Fast Triangle-Cuboid intersection test, following Tomas Akenine-Moeller description. // The code looks slightly different from his code because we avoid the translation at // a minimal cost (and we use C++ ;). @@ -96,6 +98,9 @@ namespace internal { typename K::Point_3& p_min, typename K::Point_3& p_max) { + CGAL_USE(px); + CGAL_USE(py); + CGAL_USE(pz); if(AXE == 0 || px > 0) { if(AXE == 1 || py > 0) { if(AXE == 2 || pz > 0) { @@ -399,4 +404,6 @@ bool do_intersect(const Triangle_3& a, } //namespace CGAL +#include + #endif // CGAL_INTERNAL_INTERSECTIONS_3_BBOX_3_TRIANGLE_3_DO_INTERSECT_H From 2e14ff9f048ce0c704a30d1d3ae97506595bf05a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 19:59:11 +0000 Subject: [PATCH 11/84] Kernel --- Installation/include/CGAL/disable_warnings.h | 4 +++- .../include/CGAL/Line_2_Iso_rectangle_2_intersection.h | 4 ++++ .../include/CGAL/Ray_2_Iso_rectangle_2_intersection.h | 4 ++++ .../include/CGAL/Segment_2_Iso_rectangle_2_intersection.h | 4 ++++ Intersections_3/include/CGAL/intersection_3.h | 3 +++ Kernel_23/include/CGAL/Circle_2.h | 2 +- Kernel_23/include/CGAL/Sphere_3.h | 2 +- Number_types/include/CGAL/Quotient.h | 6 +++--- 8 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 645f623b52d..757751cab4d 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -23,9 +23,11 @@ # pragma warning(push) # pragma warning(disable: 4099) // struct class mixed # pragma warning(disable: 4127) // conditional expression is constant -# pragma warning(disable: 4355) // 'this' : used in base member initializer list +# pragma warning(disable: 4355) // 'this' : used in base member initializer list # pragma warning(disable: 4510) // default constructor could not be generated # pragma warning(disable: 4512) // assignment operator could not be generated # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required # pragma warning(disable: 4706) // assignment within conditional expression +# pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used + #endif diff --git a/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h index 43b73fb5174..70cc67ce43d 100644 --- a/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Line_2_Iso_rectangle_2_intersection.h @@ -27,6 +27,8 @@ #ifndef CGAL_LINE_2_ISO_RECTANGLE_2_INTERSECTION_H #define CGAL_LINE_2_ISO_RECTANGLE_2_INTERSECTION_H +#include + #include #include #include @@ -223,4 +225,6 @@ CGAL_DO_INTERSECT_FUNCTION(Line_2, Iso_rectangle_2, 2) } //namespace CGAL +#include + #endif diff --git a/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h index 3982133349f..8a862b153dd 100644 --- a/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Ray_2_Iso_rectangle_2_intersection.h @@ -27,6 +27,8 @@ #ifndef CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H #define CGAL_RAY_2_ISO_RECTANGLE_2_INTERSECTION_H +#include + #include #include #include @@ -211,4 +213,6 @@ CGAL_DO_INTERSECT_FUNCTION(Ray_2, Iso_rectangle_2, 2) } //namespace CGAL +#include + #endif // CGAL_RAY_2_iSO_RECTANGLE_2_INTERSECTION_H diff --git a/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h index cf3ddc3ff77..7b85db690b2 100644 --- a/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Segment_2_Iso_rectangle_2_intersection.h @@ -27,6 +27,8 @@ #ifndef CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H #define CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H +#include + #include #include #include @@ -236,4 +238,6 @@ CGAL_DO_INTERSECT_FUNCTION(Segment_2, Iso_rectangle_2, 2) } //namespace CGAL +#include + #endif // CGAL_SEGMENT_2_ISO_RECTANGLE_2_INTERSECTION_H diff --git a/Intersections_3/include/CGAL/intersection_3.h b/Intersections_3/include/CGAL/intersection_3.h index d52ffd72a58..2aa69cf954c 100644 --- a/Intersections_3/include/CGAL/intersection_3.h +++ b/Intersections_3/include/CGAL/intersection_3.h @@ -27,6 +27,8 @@ #ifndef CGAL_INTERSECTION_3_H #define CGAL_INTERSECTION_3_H +#include + #include #include @@ -50,5 +52,6 @@ #include #include +#include #endif // CGAL_INTERSECTION_3_H diff --git a/Kernel_23/include/CGAL/Circle_2.h b/Kernel_23/include/CGAL/Circle_2.h index c69f40f5239..98a8ce2a3a2 100644 --- a/Kernel_23/include/CGAL/Circle_2.h +++ b/Kernel_23/include/CGAL/Circle_2.h @@ -273,7 +273,7 @@ extract(std::istream& is, Circle_2& c) { typename R::Point_2 center; typename R::FT squared_radius(0); - int o; + int o=0; switch(get_mode(is)) { case IO::ASCII : is >> center >> iformat(squared_radius) >> o; diff --git a/Kernel_23/include/CGAL/Sphere_3.h b/Kernel_23/include/CGAL/Sphere_3.h index 739c8a38928..636363af8e1 100644 --- a/Kernel_23/include/CGAL/Sphere_3.h +++ b/Kernel_23/include/CGAL/Sphere_3.h @@ -319,7 +319,7 @@ extract(std::istream& is, Sphere_3& c, const Homogeneous_tag&) { typename R::Point_3 center; typename R::FT squared_radius; - int o; + int o=0; switch(get_mode(is)) { case IO::ASCII : is >> center >> squared_radius >> o; diff --git a/Number_types/include/CGAL/Quotient.h b/Number_types/include/CGAL/Quotient.h index 69770c64b63..46a2e3a3c6e 100644 --- a/Number_types/include/CGAL/Quotient.h +++ b/Number_types/include/CGAL/Quotient.h @@ -91,7 +91,7 @@ class Quotient { Split_double()(n, num, den); } Quotient(const CGAL_int(NT) & n) - : num(n), den(1) {} + : num(n), den(NT(1)) {} template explicit Quotient(const T& n) : num(n), den(1) {} @@ -403,8 +403,8 @@ quotient_cmp(const Quotient& x, const Quotient& y) if (diff == 0) { int msign = CGAL_NTS sign(x.den) * CGAL_NTS sign(y.den); - NT leftop = x.num * y.den * msign; - NT rightop = y.num * x.den * msign; + NT leftop = NT(x.num * y.den * msign); + NT rightop = NT(y.num * x.den * msign); return CGAL_NTS compare(leftop, rightop); } else From f76e744bffd50651a88465f593e2f55e2c003282 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 20:12:06 +0000 Subject: [PATCH 12/84] Spatial_searching --- Generator/include/CGAL/point_generators_d.h | 5 +++++ Profiling_tools/include/CGAL/Memory_sizer.h | 2 +- STL_Extension/include/CGAL/Handle_for.h | 4 ++++ Spatial_searching/include/CGAL/Incremental_neighbor_search.h | 3 +++ Spatial_searching/include/CGAL/K_neighbor_search.h | 2 ++ Spatial_searching/include/CGAL/Kd_tree.h | 1 - Spatial_searching/include/CGAL/Kd_tree_node.h | 2 +- .../include/CGAL/Orthogonal_incremental_neighbor_search.h | 3 +++ .../include/CGAL/Orthogonal_k_neighbor_search.h | 3 +++ Spatial_searching/include/CGAL/Search_traits_adapter.h | 3 +++ 10 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Generator/include/CGAL/point_generators_d.h b/Generator/include/CGAL/point_generators_d.h index 008e4719c50..1cc01033b5d 100644 --- a/Generator/include/CGAL/point_generators_d.h +++ b/Generator/include/CGAL/point_generators_d.h @@ -22,6 +22,9 @@ #ifndef CGAL_POINT_GENERATORS_D_H #define CGAL_POINT_GENERATORS_D_H 1 + +#include + #include #include #include @@ -208,5 +211,7 @@ points_on_cube_grid_d( int dimension, double a, } //namespace CGAL +#include + #endif // CGAL_POINT_GENERATORS_D_H // // EOF // diff --git a/Profiling_tools/include/CGAL/Memory_sizer.h b/Profiling_tools/include/CGAL/Memory_sizer.h index 4500aa2a011..a590745c862 100644 --- a/Profiling_tools/include/CGAL/Memory_sizer.h +++ b/Profiling_tools/include/CGAL/Memory_sizer.h @@ -80,7 +80,7 @@ private: { #ifdef _MSC_VER DWORD pid = GetCurrentProcessId(); - size_type result; + size_type result=0; HANDLE hProcess; PROCESS_MEMORY_COUNTERS pmc; hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | diff --git a/STL_Extension/include/CGAL/Handle_for.h b/STL_Extension/include/CGAL/Handle_for.h index b8148310d12..55f6a086c3c 100644 --- a/STL_Extension/include/CGAL/Handle_for.h +++ b/STL_Extension/include/CGAL/Handle_for.h @@ -26,6 +26,8 @@ #ifndef CGAL_HANDLE_FOR_H #define CGAL_HANDLE_FOR_H +#include + #include #include // for CGAL_assume @@ -313,4 +315,6 @@ get_pointee_or_identity(const T &t) # pragma warning(pop) #endif +#include + #endif // CGAL_HANDLE_FOR_H diff --git a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h index 79fecf50054..9b71e56c4e8 100644 --- a/Spatial_searching/include/CGAL/Incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Incremental_neighbor_search.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -550,4 +551,6 @@ namespace CGAL { } // namespace CGAL +#include + #endif // CGAL_INCREMENTAL_NEIGHBOR_SEARCH_H diff --git a/Spatial_searching/include/CGAL/K_neighbor_search.h b/Spatial_searching/include/CGAL/K_neighbor_search.h index 655088baa37..b46db779a26 100644 --- a/Spatial_searching/include/CGAL/K_neighbor_search.h +++ b/Spatial_searching/include/CGAL/K_neighbor_search.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -142,5 +143,6 @@ private: } // namespace CGAL +#include #endif // CGAL_K_NEIGHBOR_SEARCH_H diff --git a/Spatial_searching/include/CGAL/Kd_tree.h b/Spatial_searching/include/CGAL/Kd_tree.h index ba27e527745..c431e87bd33 100644 --- a/Spatial_searching/include/CGAL/Kd_tree.h +++ b/Spatial_searching/include/CGAL/Kd_tree.h @@ -417,7 +417,6 @@ private: //if (traits().construct_cartesian_const_iterator_d_object()(p)[newparent->cutting_dimension()] >= newparent->cutting_value()) return remove_(p, parent, islower, newparent, false, newparent->upper(), equal_to_p); - CGAL_assertion(false); // Point was not found } // Actual removal diff --git a/Spatial_searching/include/CGAL/Kd_tree_node.h b/Spatial_searching/include/CGAL/Kd_tree_node.h index 05ef0dc38ff..2699edf5987 100644 --- a/Spatial_searching/include/CGAL/Kd_tree_node.h +++ b/Spatial_searching/include/CGAL/Kd_tree_node.h @@ -553,7 +553,7 @@ namespace CGAL { inline void set_separator(Separator& sep){ - cut_dim = sep.cutting_dimension(); + cut_dim = static_cast(sep.cutting_dimension()); cut_val = sep.cutting_value(); } diff --git a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h index 5b540f5eec7..a7a6ffb8822 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_incremental_neighbor_search.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -621,4 +622,6 @@ namespace CGAL { } // namespace CGAL +#include + #endif // CGAL_ORTHOGONAL_INCREMENTAL_NEIGHBOR_SEARCH_H diff --git a/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h b/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h index 5afdd732378..b8c649a4afc 100644 --- a/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h +++ b/Spatial_searching/include/CGAL/Orthogonal_k_neighbor_search.h @@ -24,6 +24,7 @@ #include +#include #include @@ -194,4 +195,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_ORTHOGONAL_K_NEIGHBOR_SEARCH_H diff --git a/Spatial_searching/include/CGAL/Search_traits_adapter.h b/Spatial_searching/include/CGAL/Search_traits_adapter.h index b07f761c1c0..f6d4eae7c6d 100644 --- a/Spatial_searching/include/CGAL/Search_traits_adapter.h +++ b/Spatial_searching/include/CGAL/Search_traits_adapter.h @@ -24,6 +24,7 @@ #include +#include #include #include //for default distance specialization @@ -193,4 +194,6 @@ public: }//namespace CGAL +#include + #endif //CGAL_SEARCH_TRAITS_WITH_INFO From e34529aa9ae1041465f0f9655e27d12f5e908d7f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 21:17:51 +0000 Subject: [PATCH 13/84] PSP --- .../dual/halfspace_intersection_3.h | 3 ++ ...fspace_intersection_with_constructions_3.h | 3 ++ .../dual/interior_polyhedron_3.h | 3 ++ .../boost/iterator/transform_iterator.hpp | 2 +- .../include/CGAL/bilateral_smooth_point_set.h | 3 ++ .../include/CGAL/compute_average_spacing.h | 3 ++ .../CGAL/edge_aware_upsample_point_set.h | 3 ++ .../include/CGAL/estimate_scale.h | 3 ++ .../include/CGAL/grid_simplify_point_set.h | 3 ++ .../CGAL/hierarchy_simplify_point_set.h | 3 ++ .../include/CGAL/jet_estimate_normals.h | 3 ++ .../include/CGAL/jet_smooth_point_set.h | 3 ++ .../include/CGAL/mst_orient_normals.h | 3 ++ .../include/CGAL/pca_estimate_normals.h | 3 ++ .../include/CGAL/radial_orient_normals.h | 3 ++ .../include/CGAL/random_simplify_point_set.h | 3 ++ .../include/CGAL/remove_outliers.h | 3 ++ .../include/CGAL/structure_point_set.h | 4 +++ .../include/CGAL/vcm_estimate_edges.h | 3 ++ .../include/CGAL/vcm_estimate_normals.h | 3 ++ .../wlop_simplify_and_regularize_point_set.h | 3 ++ QP_solver/include/CGAL/QP_functions.h | 3 ++ QP_solver/include/CGAL/QP_models.h | 3 ++ QP_solver/include/CGAL/QP_options.h | 4 +++ QP_solver/include/CGAL/QP_solution.h | 3 ++ QP_solver/include/CGAL/QP_solver/QP_solver.h | 3 ++ ...ph_traits_Triangulation_data_structure_2.h | 28 +++++++++---------- 27 files changed, 92 insertions(+), 15 deletions(-) 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 e82007d8f85..c8b105080ea 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 @@ -25,6 +25,7 @@ #include +#include #include #include @@ -295,5 +296,7 @@ namespace CGAL #endif } // namespace CGAL +#include + #endif // CGAL_HALFSPACE_INTERSECTION_3_H 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 45cb470effb..0dcb605025d 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 @@ -25,6 +25,7 @@ #include +#include #include #include @@ -159,5 +160,7 @@ namespace CGAL } // namespace CGAL +#include + #endif // CGAL_HALFSPACE_INTERSECTION_WITH_CONSTRUCTION_3_H diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h index 8da920d5b78..4196727086a 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/interior_polyhedron_3.h @@ -26,6 +26,7 @@ #include +#include // LP solver to compute an interior point of a polyhedron #include @@ -165,5 +166,7 @@ class Interior_polyhedron_3 { } // namespace CGAL +#include + #endif // CGAL_CH3_INTERIOR_POLYHEDRON_3_H diff --git a/Installation/include/CGAL/boost/iterator/transform_iterator.hpp b/Installation/include/CGAL/boost/iterator/transform_iterator.hpp index dbdf7b55f33..dd84af4183e 100644 --- a/Installation/include/CGAL/boost/iterator/transform_iterator.hpp +++ b/Installation/include/CGAL/boost/iterator/transform_iterator.hpp @@ -30,7 +30,7 @@ #if defined(BOOST_MSVC) # pragma warning(push) -# pragma warning(disable:4244) +# pragma warning(disable:4244 4512) #endif #include diff --git a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h index 580b3d10eea..55db9030461 100644 --- a/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h +++ b/Point_set_processing_3/include/CGAL/bilateral_smooth_point_set.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -631,4 +632,6 @@ bilateral_smooth_point_set( } //namespace CGAL +#include + #endif // CGAL_BILATERAL_SMOOTH_POINT_SET_H 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 3d25f8a090b..58b282037f4 100644 --- a/Point_set_processing_3/include/CGAL/compute_average_spacing.h +++ b/Point_set_processing_3/include/CGAL/compute_average_spacing.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -259,4 +260,6 @@ compute_average_spacing( } //namespace CGAL +#include + #endif // CGAL_AVERAGE_SPACING_3_H diff --git a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h index 2e03a58b14d..a86498c623e 100644 --- a/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h +++ b/Point_set_processing_3/include/CGAL/edge_aware_upsample_point_set.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -649,4 +650,6 @@ edge_aware_upsample_point_set( } //namespace CGAL +#include + #endif // CGAL_UPSAMPLE_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/estimate_scale.h b/Point_set_processing_3/include/CGAL/estimate_scale.h index ecad70671ce..4719ca4945d 100644 --- a/Point_set_processing_3/include/CGAL/estimate_scale.h +++ b/Point_set_processing_3/include/CGAL/estimate_scale.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -770,4 +771,6 @@ estimate_global_range_scale( } //namespace CGAL +#include + #endif // CGAL_ESTIMATE_SCALE_3_H diff --git a/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h b/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h index fc8b8f58af1..f4cd1a44b75 100644 --- a/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h +++ b/Point_set_processing_3/include/CGAL/grid_simplify_point_set.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -260,4 +261,6 @@ grid_simplify_point_set( } //namespace CGAL +#include + #endif // CGAL_GRID_SIMPLIFY_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/hierarchy_simplify_point_set.h b/Point_set_processing_3/include/CGAL/hierarchy_simplify_point_set.h index 41373aced99..212ee94737a 100644 --- a/Point_set_processing_3/include/CGAL/hierarchy_simplify_point_set.h +++ b/Point_set_processing_3/include/CGAL/hierarchy_simplify_point_set.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -366,4 +367,6 @@ namespace CGAL { } // namespace CGAL +#include + #endif // HIERARCHY_SIMPLIFY_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h index 24fde6ff5db..6465acfec21 100644 --- a/Point_set_processing_3/include/CGAL/jet_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/jet_estimate_normals.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -340,4 +341,6 @@ jet_estimate_normals( } //namespace CGAL +#include + #endif // CGAL_JET_ESTIMATE_NORMALS_H 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 8cd66aa1638..5a47d8c1a13 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 @@ -23,6 +23,7 @@ #include +#include #include #include @@ -324,4 +325,6 @@ jet_smooth_point_set( } //namespace CGAL +#include + #endif // CGAL_JET_SMOOTH_POINT_SET_H 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 a9bd52e0211..96b454cac1e 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -673,4 +674,6 @@ mst_orient_normals( } //namespace CGAL +#include + #endif // CGAL_MST_ORIENT_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h index edc126a785e..5624b6a2951 100644 --- a/Point_set_processing_3/include/CGAL/pca_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/pca_estimate_normals.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -295,4 +296,6 @@ pca_estimate_normals( } //namespace CGAL +#include + #endif // CGAL_PCA_ESTIMATE_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/radial_orient_normals.h b/Point_set_processing_3/include/CGAL/radial_orient_normals.h index 8c9225f700f..5c0333616ea 100644 --- a/Point_set_processing_3/include/CGAL/radial_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/radial_orient_normals.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -181,4 +182,6 @@ radial_orient_normals( } //namespace CGAL +#include + #endif // CGAL_RADIAL_ORIENT_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/random_simplify_point_set.h b/Point_set_processing_3/include/CGAL/random_simplify_point_set.h index b39be320c18..a9510625bbe 100644 --- a/Point_set_processing_3/include/CGAL/random_simplify_point_set.h +++ b/Point_set_processing_3/include/CGAL/random_simplify_point_set.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -120,4 +121,6 @@ random_simplify_point_set( } //namespace CGAL +#include + #endif // CGAL_RANDOM_SIMPLIFY_POINT_SET_H diff --git a/Point_set_processing_3/include/CGAL/remove_outliers.h b/Point_set_processing_3/include/CGAL/remove_outliers.h index e600c69401f..8bbca540751 100644 --- a/Point_set_processing_3/include/CGAL/remove_outliers.h +++ b/Point_set_processing_3/include/CGAL/remove_outliers.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -260,4 +261,6 @@ remove_outliers( } //namespace CGAL +#include + #endif // CGAL_REMOVE_OUTLIERS_H 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 819ebea00eb..0db1212cf8a 100644 --- a/Point_set_processing_3/include/CGAL/structure_point_set.h +++ b/Point_set_processing_3/include/CGAL/structure_point_set.h @@ -25,6 +25,8 @@ #include +#include + #include #include #include @@ -1544,5 +1546,7 @@ structure_point_set (const PointRange& points, } //namespace CGAL +#include + #endif // CGAL_STRUCTURE_POINT_SET_3_H diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h b/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h index c04a069e3c8..7c1ef5a1542 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_edges.h @@ -24,6 +24,7 @@ #include +#include #include @@ -85,4 +86,6 @@ vcm_is_on_feature_edge (cpp11::array &cov, } // namespace CGAL +#include + #endif // CGAL_VCM_ESTIMATE_EDGES_H diff --git a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h index bb045cc5402..4b2985d394d 100644 --- a/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h +++ b/Point_set_processing_3/include/CGAL/vcm_estimate_normals.h @@ -24,6 +24,7 @@ #include +#include #include @@ -521,4 +522,6 @@ vcm_estimate_normals (ForwardIterator first, } // namespace CGAL +#include + #endif // CGAL_VCM_ESTIMATE_NORMALS_H diff --git a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h index ed4ac20e778..63ddf427eb0 100644 --- a/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h +++ b/Point_set_processing_3/include/CGAL/wlop_simplify_and_regularize_point_set.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -696,4 +697,6 @@ wlop_simplify_and_regularize_point_set( } //namespace CGAL +#include + #endif // CGAL_wlop_simplify_and_regularize_point_set_H diff --git a/QP_solver/include/CGAL/QP_functions.h b/QP_solver/include/CGAL/QP_functions.h index 5ae88fa99ec..d9fc7a71e61 100644 --- a/QP_solver/include/CGAL/QP_functions.h +++ b/QP_solver/include/CGAL/QP_functions.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -163,4 +164,6 @@ const Quadratic_program_options& options = Quadratic_program_options()); #include +#include + #endif // CGAL_QP_FUNCTIONS_H diff --git a/QP_solver/include/CGAL/QP_models.h b/QP_solver/include/CGAL/QP_models.h index 4ca5db648cc..525c7c82acf 100644 --- a/QP_solver/include/CGAL/QP_models.h +++ b/QP_solver/include/CGAL/QP_models.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -1552,4 +1553,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_QP_MODELS_H diff --git a/QP_solver/include/CGAL/QP_options.h b/QP_solver/include/CGAL/QP_options.h index 063c208c135..2248d30cf2b 100644 --- a/QP_solver/include/CGAL/QP_options.h +++ b/QP_solver/include/CGAL/QP_options.h @@ -24,6 +24,8 @@ #include +#include + // this file defines a class for passing options to the linear and // quadratic programming solvers @@ -140,4 +142,6 @@ std::ostream& operator<< (std::ostream& o, } //namespace CGAL +#include + #endif // CGAL_QP_OPTIONS_H diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index e1ebcca0b58..9ad6897b4b8 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -27,6 +27,7 @@ #include +#include #include #include @@ -839,4 +840,6 @@ namespace QP_solution_detail { #include +#include + #endif// CGAL_QP_SOLUTION_H diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver.h b/QP_solver/include/CGAL/QP_solver/QP_solver.h index 743ff7dbb18..05995119e56 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver.h @@ -27,6 +27,7 @@ #include +#include #include #include @@ -1998,6 +1999,8 @@ compute__x_B_S( Tag_false /*has_equalities_only_and_full_rank*/, #include #include +#include + #endif // CGAL_QP_SOLVER_H // ===== EOF ================================================================== diff --git a/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h b/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h index 53b15cf6fc3..4a79b2f69ef 100644 --- a/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h +++ b/Triangulation_2/include/CGAL/boost/graph/graph_traits_Triangulation_data_structure_2.h @@ -270,20 +270,20 @@ namespace CGAL { template typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor next(typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor e, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { typedef typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor halfedge_descriptor; - return halfedge_descriptor(e.first, g.ccw(e.second)); + return halfedge_descriptor(e.first, Triangulation_data_structure_2::ccw(e.second)); } template typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor prev(typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor e, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { typedef typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor halfedge_descriptor; - return halfedge_descriptor(e.first, g.cw(e.second)); + return halfedge_descriptor(e.first, Triangulation_data_structure_2::cw(e.second)); } @@ -300,33 +300,33 @@ namespace CGAL { template typename boost::graph_traits< Triangulation_data_structure_2 >::vertex_descriptor source(typename boost::graph_traits< Triangulation_data_structure_2 >::edge_descriptor e, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { - return e.first->vertex(g.ccw(e.second)); + return e.first->vertex(Triangulation_data_structure_2::ccw(e.second)); } template typename boost::graph_traits< Triangulation_data_structure_2 >::vertex_descriptor target(typename boost::graph_traits< Triangulation_data_structure_2 >::edge_descriptor e, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { - return e.first->vertex(g.cw(e.second)); + return e.first->vertex(Triangulation_data_structure_2::cw(e.second)); } template typename boost::graph_traits< Triangulation_data_structure_2 >::vertex_descriptor source(typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor e, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { - return e.first->vertex(g.ccw(e.second)); + return e.first->vertex(Triangulation_data_structure_2::ccw(e.second)); } template typename boost::graph_traits< Triangulation_data_structure_2 >::vertex_descriptor target(typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor e, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { - return e.first->vertex(g.cw(e.second)); + return e.first->vertex(Triangulation_data_structure_2::cw(e.second)); } template @@ -349,13 +349,13 @@ namespace CGAL { template typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor halfedge(typename boost::graph_traits< Triangulation_data_structure_2 >::vertex_descriptor v, - const Triangulation_data_structure_2& g) + const Triangulation_data_structure_2& ) { typedef typename boost::graph_traits< Triangulation_data_structure_2 >::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits< Triangulation_data_structure_2 >::face_descriptor face_descriptor; face_descriptor fd = v->face(); int i = fd->index(v); - return halfedge_descriptor(fd,g.ccw(i)); + return halfedge_descriptor(fd,Triangulation_data_structure_2::ccw(i)); } template From c6515142a86b75ec1bb3743c6bafc4eed688506d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 21:21:32 +0000 Subject: [PATCH 14/84] Surface_mesh_deformtion --- Number_types/include/CGAL/FPU_msvc.h | 2 +- .../include/CGAL/Surface_mesh_deformation.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Number_types/include/CGAL/FPU_msvc.h b/Number_types/include/CGAL/FPU_msvc.h index b22d17ccdb7..2a3373b57a9 100644 --- a/Number_types/include/CGAL/FPU_msvc.h +++ b/Number_types/include/CGAL/FPU_msvc.h @@ -30,7 +30,7 @@ namespace CGAL { // replacement for C99 functions inline int -feclearexcept(int exceptions) { +feclearexcept(int /* exceptions */ ) { _clearfp(); return 0; } diff --git a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h index ec442e0cd91..44cab528588 100644 --- a/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h +++ b/Surface_mesh_deformation/include/CGAL/Surface_mesh_deformation.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -1506,7 +1507,6 @@ private: else { return energy_arap(); - return 0; } } double energy_arap() const @@ -1613,4 +1613,7 @@ private: } }; } //namespace CGAL + +#include + #endif // CGAL_SURFACE_MESH_DEFORMATION_H From 39b1431fca8631bc323038a6f253edae5fb28d0c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 21:42:31 +0000 Subject: [PATCH 15/84] Surface_mesh_paramerization --- BGL/include/CGAL/boost/graph/Seam_mesh.h | 6 +++++- .../Surface_mesh_parameterization/ARAP_parameterizer_3.h | 4 ++++ .../Barycentric_mapping_parameterizer_3.h | 4 ++++ .../Circular_border_parameterizer_3.h | 4 ++++ .../Discrete_authalic_parameterizer_3.h | 4 ++++ .../Discrete_conformal_map_parameterizer_3.h | 4 ++++ .../Fixed_border_parameterizer_3.h | 6 +++++- .../CGAL/Surface_mesh_parameterization/IO/File_off.h | 4 ++++ .../Surface_mesh_parameterization/LSCM_parameterizer_3.h | 4 ++++ .../Mean_value_coordinates_parameterizer_3.h | 4 ++++ .../Orbifold_Tutte_parameterizer_3.h | 4 ++++ .../Square_border_parameterizer_3.h | 6 +++++- .../Two_vertices_parameterizer_3.h | 4 ++++ .../internal/Containers_filler.h | 4 ++++ .../CGAL/Surface_mesh_parameterization/parameterize.h | 4 ++++ 15 files changed, 63 insertions(+), 3 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/Seam_mesh.h b/BGL/include/CGAL/boost/graph/Seam_mesh.h index b12c238bd8a..8df36e3ff4c 100644 --- a/BGL/include/CGAL/boost/graph/Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/Seam_mesh.h @@ -21,6 +21,8 @@ #ifndef CGAL_SEAM_MESH_H #define CGAL_SEAM_MESH_H +#include + #include #include @@ -1125,10 +1127,12 @@ public: Seam_mesh(const TM& tm, const SEM& sem, const SVM svm) : tm(tm), sem(sem), svm(svm), - number_of_seams(0), number_of_vertices(-1) + number_of_seams(0), number_of_vertices(static_cast(-1)) { } }; } // namespace CGAL +#include + #endif //CGAL_SEAM_MESH_H 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 5b49a9febc4..e2392ac846f 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 @@ -21,6 +21,8 @@ #ifndef CGAL_SURFACE_MESH_PARAMETERIZATION_ARAP_PARAMETERIZER_3_H #define CGAL_SURFACE_MESH_PARAMETERIZATION_ARAP_PARAMETERIZER_3_H +#include + #include #include @@ -1418,4 +1420,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_ARAP_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h index 9a5a6288341..850236d689f 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -194,4 +196,6 @@ protected: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_BARYCENTRIC_MAPPING_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h index c531167935c..1c56f6d7f65 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Circular_border_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include @@ -288,4 +290,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_CIRCULAR_BORDER_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h index bfafae8431a..1fe53e7bbf8 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -216,4 +218,6 @@ protected: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_DISCRETE_AUTHALIC_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h index 14172a06e46..a82ea30fc6d 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -208,4 +210,6 @@ protected: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_DISCRETE_CONFORMAL_MAP_PARAMETERIZER_3_H 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 673107d4184..745bd1d9be0 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 @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -261,7 +263,7 @@ public: // Solve "A*Xu = Bu". On success, solution is (1/Du) * Xu. // Solve "A*Xv = Bv". On success, solution is (1/Dv) * Xv. - NT Du, Dv; + NT Du = 0, Dv = 0; if(!get_linear_algebra_traits().linear_solver(A, Bu, Xu, Du) || !get_linear_algebra_traits().linear_solver(A, Bv, Xv, Dv)) { @@ -418,4 +420,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_FIXED_BORDER_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/IO/File_off.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/IO/File_off.h index 58986311155..621152ffbb5 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/IO/File_off.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/IO/File_off.h @@ -24,6 +24,8 @@ #include +#include + #include #include @@ -148,4 +150,6 @@ void output_uvmap_to_off(const TriangleMesh& mesh, } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_IO_FILE_OFF_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h index ac5a29c41b4..44e3af8c039 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -451,4 +453,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_LSCM_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h index 1f07b10f4d4..5e1318bd71b 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include @@ -236,4 +238,6 @@ protected: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_MEAN_VALUE_COORDINATES_PARAMETERIZER_3_H 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 952dc6cf64e..1b5e63df7fa 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 @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -769,4 +771,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_ORBIFOLD_TUTTE_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h index ce3cc6cfd32..c257682fcc4 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include @@ -127,7 +129,7 @@ private: halfedge_around_face_iterator b, e, best; double min = DBL_MAX; // distance for 'best' - std::size_t id = 0, min_id = -1; + std::size_t id = 0, min_id = (std::numeric_limits::max)(); for(boost::tie(b,e) = halfedges_around_face(bhd, mesh); b!=e; ++b, ++id) { double d = CGAL::abs(offset[id] - value); if(d < min) { @@ -519,4 +521,6 @@ protected: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_SQUARE_BORDER_PARAMETERIZER_3_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h index 15f1b978b27..d9aacee471d 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Two_vertices_parameterizer_3.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -324,4 +326,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_TWO_VERTICES_PARAMETERIZER_3_H_INCLUDED diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h index 2f715b8b3ad..07754152728 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/Containers_filler.h @@ -23,6 +23,8 @@ #include +#include + #include #include "boost/tuple/tuple.hpp" #include @@ -110,4 +112,6 @@ struct Index_map_filler } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_INTERNAL_CONTAINERS_FILLER_H diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/parameterize.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/parameterize.h index 702c8ac9cff..675343f3fd7 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/parameterize.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/parameterize.h @@ -24,6 +24,8 @@ #include +#include + #include #include @@ -166,4 +168,6 @@ Error_code parameterize(Seam_mesh& mesh, } // namespace CGAL +#include + #endif // CGAL_PARAMETERIZE_H From f723c527e1416f3c10ca6d1f801dd484c3f0c0f0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 21:56:19 +0000 Subject: [PATCH 16/84] Surface_mesh_shortest_path --- .../CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h | 4 ++++ Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h | 3 +++ .../Surface_mesh_shortest_path/Surface_mesh_shortest_path.h | 4 +++- .../Surface_mesh_shortest_path_traits.h | 2 ++ .../include/CGAL/Surface_mesh_shortest_path/barycentric.h | 3 +++ .../test/Surface_mesh_shortest_path/TestMesh.cpp | 2 +- 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h b/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h index c1c787427a3..10f4e821dd0 100644 --- a/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h +++ b/Surface_mesh_segmentation/include/CGAL/internal/Surface_mesh_segmentation/Disk_samplers.h @@ -24,6 +24,7 @@ #include +#include /// @cond CGAL_DOCUMENT_INTERNAL @@ -265,4 +266,7 @@ public: /// @endcond }//namespace CGAL #undef CGAL_ANGLE_ST_DEV_DIVIDER + +#include + #endif //CGAL_SURFACE_MESH_SEGMENTATION_DISK_SAMPLERS_H diff --git a/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h b/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h index 36e795a3574..49da4622a96 100644 --- a/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h +++ b/Surface_mesh_segmentation/include/CGAL/mesh_segmentation.h @@ -24,6 +24,7 @@ #include +#include /** * @file mesh_segmentation.h @@ -499,4 +500,6 @@ segmentation_via_sdf_values(const TriangleMesh& triangle_mesh, }//namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_SEGMENTATION_MESH_SEGMENTATION_H // 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 f4b1c32fe8e..d9a4afa291a 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 @@ -23,6 +23,7 @@ #include +#include #include #include @@ -2059,7 +2060,6 @@ public: std::cout << "Final node count: " << m_currentNodeCount << std::endl; } return; - CGAL_assertion(m_currentNodeCount == 0); #endif } @@ -2808,4 +2808,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_SHORTEST_PATH_SURFACE_MESH_SHORTEST_PATH_H diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h index a433ec75407..14307aba2b0 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path_traits.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -225,5 +226,6 @@ public: } // namespace CGAL +#include #endif // CGAL_SURFACE_MESH_SHORTEST_PATH_TRAITS_H diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/barycentric.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/barycentric.h index 2347d7d7718..4c9d0f60a45 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/barycentric.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/barycentric.h @@ -23,6 +23,7 @@ #include +#include #include @@ -262,4 +263,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_SHORTEST_PATHS_3_BARYCENTRIC_H diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 3ef0247009e..33d52e8fe4a 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -90,7 +90,7 @@ struct TestMeshProgramInstance if (randomizer) { - return shortestPath.face_location(vertices[randomizer->get_int(0, vertices.size())]); + return shortestPath.face_location(vertices[randomizer->get_int(0, static_cast(vertices.size()))]); } else { From 1d811ddf3d7d061066fa9c864fa3a93a9dd5047e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 22:02:06 +0000 Subject: [PATCH 17/84] Advancing front reconstruction --- .../reconstruction_structured.cpp | 1 + .../reconstruction_surface_mesh.cpp | 1 + .../include/CGAL/Advancing_front_surface_reconstruction.h | 3 +++ .../test/Advancing_front_surface_reconstruction/polyhedron.cpp | 1 - 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp index b84d1701e38..166ea3ffc6b 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include diff --git a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp index 225eef0b170..56ef63557e0 100644 --- a/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp +++ b/Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_surface_mesh.cpp @@ -5,6 +5,7 @@ #include #include #include +#include typedef CGAL::cpp11::array Facet; diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h index cd9fcb92dae..ba34eec42ac 100644 --- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h +++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h @@ -23,6 +23,7 @@ #include +#include // In order to activate lazy evaluation: // #define LAZY @@ -2650,4 +2651,6 @@ namespace CGAL { } // namespace CGAL +#include + #endif // CGAL_ADVANCING_FRONT_SURFACE_RECONSTRUCTION_H diff --git a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp index ed7e532c21f..26daecb46c9 100644 --- a/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp +++ b/Advancing_front_surface_reconstruction/test/Advancing_front_surface_reconstruction/polyhedron.cpp @@ -6,7 +6,6 @@ #include #include #include -#include typedef CGAL::Simple_cartesian K; typedef K::Point_3 Point_3; From cfc75d7f32b14301fda87f84bba9fca8c3bdf18d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 22:05:51 +0000 Subject: [PATCH 18/84] Box_intersection_d --- .../test/Box_intersection_d/benchmark_box_intersection.cpp | 2 ++ Box_intersection_d/test/Box_intersection_d/util.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection.cpp b/Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection.cpp index 6f4ccbb9233..e6283e5d7cf 100644 --- a/Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection.cpp +++ b/Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection.cpp @@ -30,6 +30,8 @@ #include #include +#include + #include "util.h" static unsigned int failed = 0; diff --git a/Box_intersection_d/test/Box_intersection_d/util.h b/Box_intersection_d/test/Box_intersection_d/util.h index 7daacea3951..b8811e66721 100644 --- a/Box_intersection_d/test/Box_intersection_d/util.h +++ b/Box_intersection_d/test/Box_intersection_d/util.h @@ -9,6 +9,8 @@ #include +#include + template< class NT, int DIM, bool CLOSED = true > struct Util { typedef NT Number_type; @@ -128,5 +130,6 @@ struct Util { }; +#include #endif From 09f3236d38c228a9e34ff2f5f7a8570024412e4d Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Jan 2018 22:08:12 +0000 Subject: [PATCH 19/84] Polyline_simplification --- .../Polyline_simplification_2/Scaled_squared_distance_cost.h | 2 +- .../include/CGAL/Polyline_simplification_2/simplify.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h index 4445b60697b..6bbaa22dc59 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/Scaled_squared_distance_cost.h @@ -86,7 +86,7 @@ public: d1 = (std::max)(d1, compute_squared_distance( lP_R, *pp ) ) ; - FT d2; + FT d2=0; bool d2_uninitialized = true; Vertex_circulator vc = pct.incident_vertices(*vicq), done(vc); diff --git a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h index 6fb55d73aae..ef2969187ba 100644 --- a/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h +++ b/Polyline_simplification_2/include/CGAL/Polyline_simplification_2/simplify.h @@ -23,6 +23,7 @@ #include +#include #include @@ -485,4 +486,7 @@ simplify(CGAL::Constrained_triangulation_plus_2& ct, } // namespace polyline_simplification_2 } // namespace CGAL + +#include + #endif From 5efce459da97f09bc806f57a870ab508f77c027a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 08:49:52 +0000 Subject: [PATCH 20/84] Mesh_3 --- BGL/include/CGAL/boost/graph/named_function_params.h | 4 ++++ .../CGAL/boost/graph/split_graph_into_polylines.h | 4 ++++ CGAL_ImageIO/include/CGAL/Image_3.h | 6 +++++- Installation/include/CGAL/disable_warnings.h | 1 + Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h | 3 ++- Mesh_3/include/CGAL/Implicit_mesh_domain_3.h | 10 ++-------- .../CGAL/Implicit_to_labeling_function_wrapper.h | 4 +++- Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h | 4 ++-- Mesh_3/include/CGAL/Labeled_mesh_domain_3.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h | 3 +++ .../CGAL/Mesh_3/Image_to_labeled_function_wrapper.h | 3 +++ .../CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h | 10 ++-------- Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h | 3 +++ .../Mesh_3/Mesh_complex_3_in_triangulation_3_base.h | 9 ++++++--- Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h | 5 ++++- Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/Mesher_3.h | 2 ++ Mesh_3/include/CGAL/Mesh_3/Mesher_level.h | 3 +++ .../include/CGAL/Mesh_3/Protect_edges_sizing_field.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h | 5 +++++ .../include/CGAL/Mesh_3/Refine_facets_manifold_base.h | 2 ++ Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h | 2 ++ .../include/CGAL/Mesh_3/Worksharing_data_structures.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h | 4 ++-- Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h | 3 +++ .../include/CGAL/Mesh_complex_3_in_triangulation_3.h | 4 +++- Mesh_3/include/CGAL/Mesh_criteria_3.h | 2 ++ Mesh_3/include/CGAL/Mesh_triangulation_3.h | 3 +++ .../include/CGAL/Meshes/Filtered_multimap_container.h | 10 ---------- Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h | 2 ++ Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h | 5 ++++- .../CGAL/Polyhedral_mesh_domain_with_features_3.h | 2 ++ .../CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h | 3 +++ Mesh_3/include/CGAL/make_mesh_3.h | 2 ++ Mesh_3/include/CGAL/refine_mesh_3.h | 2 ++ Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h | 3 +++ Mesh_3/test/Mesh_3/test_c3t3_io.cpp | 2 ++ Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp | 2 ++ Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp | 2 ++ Mesh_3/test/Mesh_3/test_meshing_utilities.h | 4 ++++ Mesh_3/test/Mesh_3/test_utilities.h | 5 ++++- .../CGAL/Mesher_level_default_implementations.h | 4 ++++ Mesher_level/include/CGAL/Mesher_level_visitors.h | 4 ++++ .../CGAL/Meshes/Triangulation_mesher_level_traits_3.h | 4 ++++ 47 files changed, 136 insertions(+), 40 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/named_function_params.h b/BGL/include/CGAL/boost/graph/named_function_params.h index 76d81bcb3fb..095b122381a 100644 --- a/BGL/include/CGAL/boost/graph/named_function_params.h +++ b/BGL/include/CGAL/boost/graph/named_function_params.h @@ -19,6 +19,8 @@ #ifndef CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H #define CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_H +#include + #include #include @@ -198,4 +200,6 @@ struct lookup_named_param_def, D }; } // boost +#include + #endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP diff --git a/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h b/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h index 71cf96304f6..09fe353349b 100644 --- a/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h +++ b/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h @@ -21,6 +21,8 @@ #ifndef CGAL_SPLIT_GRAPH_INTO_POLYLINES #define CGAL_SPLIT_GRAPH_INTO_POLYLINES +#include + #include #include #include @@ -375,4 +377,6 @@ split_graph_into_polylines(const Graph& graph, } //end of namespace CGAL +#include + #endif //CGAL_SPLIT_GRAPH_INTO_POLYLINES diff --git a/CGAL_ImageIO/include/CGAL/Image_3.h b/CGAL_ImageIO/include/CGAL/Image_3.h index d31fc7f1a08..e13a7e81e08 100644 --- a/CGAL_ImageIO/include/CGAL/Image_3.h +++ b/CGAL_ImageIO/include/CGAL/Image_3.h @@ -23,6 +23,8 @@ #ifndef CGAL_IMAGE_3_H #define CGAL_IMAGE_3_H +#include + #include #include @@ -531,5 +533,7 @@ Image_3::labellized_trilinear_interpolation #if defined(BOOST_MSVC) # pragma warning(pop) #endif - + +#include + #endif // CGAL_IMAGE_3_H diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 757751cab4d..f148bab4645 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -23,6 +23,7 @@ # pragma warning(push) # pragma warning(disable: 4099) // struct class mixed # pragma warning(disable: 4127) // conditional expression is constant +# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored # pragma warning(disable: 4355) // 'this' : used in base member initializer list # pragma warning(disable: 4510) // default constructor could not be generated # pragma warning(disable: 4512) // assignment operator could not be generated diff --git a/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h b/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h index 6687abfb0f1..7a2f33e94b4 100644 --- a/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Gray_image_mesh_domain_3.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -139,6 +140,6 @@ private: } // end namespace CGAL - +#include #endif // CGAL_GRAY_IMAGE_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h b/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h index a309d0c006c..a690ed5ee7b 100644 --- a/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Implicit_mesh_domain_3.h @@ -29,11 +29,7 @@ #include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored -#endif +#include #include #include @@ -91,8 +87,6 @@ private: } // end namespace CGAL -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include #endif // CGAL_IMPLICIT_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index 23abb8f208c..9adcf57f50c 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -33,7 +33,7 @@ #include - +#include #if defined(BOOST_MSVC) # pragma warning(push) @@ -291,4 +291,6 @@ public: # pragma warning(pop) #endif +#include + #endif // CGAL_IMPLICIT_TO_LABELING_FUNCTION_WRAPPER_H diff --git a/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h index 4cc8d534e16..e1d75276105 100644 --- a/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_image_mesh_domain_3.h @@ -30,7 +30,7 @@ #include - +#include #include #include @@ -158,6 +158,6 @@ private: } // end namespace CGAL - +#include #endif // CGAL_LABELED_IMAGE_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index 7035fa02d5d..103bf98007a 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -29,6 +29,7 @@ #include +#include #include @@ -721,4 +722,6 @@ Labeled_mesh_domain_3::Construct_initial_points::operator()( } // end namespace CGAL +#include + #endif // LABELLED_MESH_TRAITS_3_H_ diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 68dfd5ddb8f..7babbbb2626 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -3943,4 +3944,6 @@ check_no_inside_vertices(const Facet_vector& facets) const } // end namespace Mesh_3 } // end namespace CGAL +#include + #endif // CGAL_MESH_3_C3T3_HELPERS_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h index 3a766a312b3..99c0ef07a34 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Dump_c3t3.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -133,4 +134,6 @@ void dump_c3t3(const C3t3& c3t3, std::string prefix) { } // end namespace CGAL +#include + #endif // CGAL_MESH_3_DUMP_C3T3_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h b/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h index 402f35d6bf4..745c059784b 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h +++ b/Mesh_3/include/CGAL/Mesh_3/Image_to_labeled_function_wrapper.h @@ -30,6 +30,7 @@ #include +#include #include #include @@ -153,4 +154,6 @@ private: } // end namespace CGAL +#include + #endif // CGAL_MESH_3_IMAGE_TO_LABELED_FUNCTION_WRAPPER_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h b/Mesh_3/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h index 2f44f981c50..5349a6ba5e3 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h +++ b/Mesh_3/include/CGAL/Mesh_3/Implicit_to_labeled_function_wrapper.h @@ -33,11 +33,7 @@ #include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored -#endif +#include #define CGAL_DEPRECATED_HEADER "" #define CGAL_REPLACEMENT_HEADER "" @@ -153,8 +149,6 @@ private: -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include #endif // CGAL_MESH_3_IMPLICIT_TO_LABELED_FUNCTION_WRAPPER_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h index d627ae37498..1c8c1af7d9e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Labeled_mesh_domain_3.h @@ -29,6 +29,7 @@ #include +#include #define CGAL_DEPRECATED_HEADER "" #define CGAL_REPLACEMENT_HEADER "" @@ -630,4 +631,6 @@ Labeled_mesh_domain_3::Construct_initial_points::operator()( } // end namespace CGAL +#include + #endif // LABELLED_MESH_TRAITS_3_H_ diff --git a/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h b/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h index afa97499325..763f31c59b0 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h +++ b/Mesh_3/include/CGAL/Mesh_3/Lloyd_move.h @@ -28,6 +28,7 @@ #include +#include #include @@ -566,4 +567,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_MESH_3_LLOYD_MOVE_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h index 3a97613c68e..25d6ce8af69 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_complex_3_in_triangulation_3_base.h @@ -29,6 +29,7 @@ #include +#include #include @@ -564,7 +565,7 @@ private: end = triangulation().finite_vertices_end(); vit != end; ++vit) { - vit->set_c2t3_cache(0, -1); + vit->set_c2t3_cache(0, (std::numeric_limits::max)()); } edge_facet_counter_.clear(); @@ -595,7 +596,7 @@ private: #endif // CGAL_LINKED_WITH_TBB const std::size_t n = edge_va->cached_number_of_incident_facets(); - edge_va->set_c2t3_cache(n+1, -1); + edge_va->set_c2t3_cache(n+1, (std::numeric_limits::max)()); } } } @@ -609,7 +610,7 @@ private: if( v->is_c2t3_cache_valid() ) { const std::size_t n = v->cached_number_of_components(); - if(n != std::size_t(-1)) return n; + if(n != (std::numeric_limits::max)()) return n; } Union_find facets; @@ -1076,4 +1077,6 @@ rescan_after_load_of_triangulation() { } // end namespace Mesh_3 } // end namespace CGAL +#include + #endif // CGAL_MESH_3_MESH_COMPLEX_3_IN_TRIANGULATION_3_BASE_H 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 dac39698dac..d8dace6924a 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_global_optimizer.h @@ -28,6 +28,7 @@ #include +#include #include @@ -733,7 +734,7 @@ operator()(int nb_iterations, Visitor visitor) big_moves_size_ = (std::max)(std::size_t(1), std::size_t(moving_vertices.size()/500)); - std::size_t nb_vertices_moved = -1; + std::size_t nb_vertices_moved = (std::numeric_limits::max)(); bool convergence_stop = false; // Iterate @@ -1178,4 +1179,6 @@ sq_circumradius_length(const Cell_handle& cell, const Vertex_handle& v) const } //namespace CGAL +#include + #endif // CGAL_MESH_3_MESH_GLOBAL_OPTIMIZER_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h index 853fbee7997..ed6f08ef8bc 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesh_sizing_field.h @@ -29,6 +29,7 @@ #include +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -323,4 +324,6 @@ interpolate_on_facet_vertices(const Bare_point& p, const Cell_handle& cell) cons } //namespace CGAL +#include + #endif // CGAL_MESH_3_MESH_SIZING_FIELD_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index a9c77ccb3e2..e102873d68e 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -30,6 +30,7 @@ #include +#include #include @@ -771,5 +772,6 @@ Mesher_3::debug_info_header() const } // end namespace CGAL +#include #endif // CGAL_MESH_3_MESHER_3_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h index af3bf453045..dc629bd5b20 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_level.h @@ -24,6 +24,7 @@ #include +#include #include @@ -1223,4 +1224,6 @@ private: #include #include +#include + #endif // CGAL_MESH_3_MESHER_LEVEL_H 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 044eaf0433c..3929cd67770 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 @@ -29,6 +29,7 @@ #include +#include #include @@ -2002,4 +2003,6 @@ repopulate_edges_around_corner(const Vertex_handle& v, ErasedVeOutIt out) } //namespace CGAL +#include + #endif // CGAL_MESH_3_PROTECT_EDGES_SIZING_FIELD_H 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 a21cd5c5638..35cd8ac92be 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -29,6 +29,7 @@ #include +#include #include #include @@ -108,10 +109,12 @@ struct Get_Is_facet_bad { Facet, unsigned int, Facet, unsigned int> &f) const { #ifdef _DEBUG + /* int f1_current_erase_counter = CGAL::cpp11::get<0>(f).first->erase_counter(); int f1_saved_erase_counter = CGAL::cpp11::get<1>(f); int f2_current_erase_counter = CGAL::cpp11::get<2>(f).first->erase_counter(); int f2_saved_erase_counter = CGAL::cpp11::get<3>(f); + */ //f1_current_erase_counter - f1_saved_erase_counter + f2_current_erase_counter - f2_saved_erase_counter == 1 /*if (f1_current_erase_counter - f1_saved_erase_counter + f2_current_erase_counter - f2_saved_erase_counter == 1) @@ -1861,4 +1864,6 @@ after_insertion_handle_incident_facet(Facet& facet) } // end namespace CGAL +#include + #endif // CGAL_MESH_3_REFINE_FACETS_3_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h index b459c533430..44140fa72b3 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_manifold_base.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -671,5 +672,6 @@ public: } // end namespace CGAL +#include #endif // CGAL_MESH_3_REFINE_FACETS_MANIFOLD_BASE_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h index 1bdd2976dcb..c219b476e65 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h +++ b/Mesh_3/include/CGAL/Mesh_3/Sliver_perturber.h @@ -28,6 +28,7 @@ #include +#include #include @@ -1668,4 +1669,6 @@ enqueue_task(const PVertex &pv, } //namespace CGAL +#include + #endif // CGAL_MESH_3_SLIVERS_PERTURBER_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h index 4732593f45f..46b586f5dc7 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -1874,5 +1875,6 @@ check_ratios(const Sliver_values& criterion_values, } // end namespace CGAL +#include #endif // end CGAL_MESH_3_SLIVERS_EXUDER_H diff --git a/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h b/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h index 5f2fcc627d4..4d647990344 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h +++ b/Mesh_3/include/CGAL/Mesh_3/Worksharing_data_structures.h @@ -23,6 +23,7 @@ #include +#include #ifdef CGAL_LINKED_WITH_TBB @@ -850,4 +851,6 @@ namespace CGAL { namespace Mesh_3 { #endif // CGAL_LINKED_WITH_TBB +#include + #endif // CGAL_MESH_3_WORKSHARING_DATA_STRUCTURES_H diff --git a/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h b/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h index 1bf88a9cd79..88e0bf3f50c 100644 --- a/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/sliver_criteria.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -242,7 +243,6 @@ private: } // end namespace CGAL - - +#include #endif // CGAL_MESH_3_SLIVER_CRITERIA_H diff --git a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h index f92c6650813..8ed98d78517 100644 --- a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h +++ b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h @@ -28,6 +28,7 @@ #include +#include #include @@ -1383,4 +1384,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_MESH_3_VERTEX_PERTURBATION_H diff --git a/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h b/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h index b39d377682d..4a650644dcb 100644 --- a/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h +++ b/Mesh_3/include/CGAL/Mesh_complex_3_in_triangulation_3.h @@ -29,7 +29,7 @@ #include - +#include #include @@ -793,4 +793,6 @@ operator>> (std::istream& is, } //namespace CGAL +#include + #endif // CGAL_MESH_COMPLEX_3_IN_TRIANGULATION_3_H diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index 3222c365e79..2360fb78a3c 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -30,6 +30,7 @@ #include +#include #include #include @@ -212,5 +213,6 @@ public: } // end namespace CGAL +#include #endif // CGAL_MESH_CRITERIA_3_H diff --git a/Mesh_3/include/CGAL/Mesh_triangulation_3.h b/Mesh_3/include/CGAL/Mesh_triangulation_3.h index 902477365d4..3846a0401b3 100644 --- a/Mesh_3/include/CGAL/Mesh_triangulation_3.h +++ b/Mesh_3/include/CGAL/Mesh_triangulation_3.h @@ -26,6 +26,7 @@ #include +#include #include @@ -120,4 +121,6 @@ public: } // end namespace CGAL +#include + #endif // CGAL_MESH_TRIANGULATION_3_H diff --git a/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h b/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h index e9af855d0c3..6d0da3e7c67 100644 --- a/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h +++ b/Mesh_3/include/CGAL/Meshes/Filtered_multimap_container.h @@ -133,10 +133,6 @@ namespace CGAL { it_list != m_local_lists.end() ; ++it_list ) { -#ifdef _DEBUG - size_t multimap_size = container.size(); - size_t local_list_size = it_list->size(); -#endif container.insert(it_list->begin(), it_list->end()); it_list->clear(); } @@ -213,9 +209,6 @@ namespace CGAL { void splice_local_lists_impl() { -#ifdef _DEBUG - size_t s = size(); -#endif Base::splice_local_lists_impl(container); } @@ -231,9 +224,6 @@ namespace CGAL { bool no_longer_element_to_refine_impl() { -#ifdef _DEBUG - size_t multimap_size = container.size(); -#endif bool is_empty = container.empty(); while( !is_empty && !test(container.begin()->second) ) { diff --git a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h index 146a927967f..471eea3604a 100644 --- a/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_complex_mesh_domain_3.h @@ -25,6 +25,7 @@ #include +#include #include @@ -1142,5 +1143,6 @@ reindex_patches(const std::vector& map) } //namespace CGAL +#include #endif // CGAL_POLYHEDRAL_COMPLEX_MESH_DOMAIN_3_H diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 86e634162e3..c0527785dda 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -30,6 +30,8 @@ #include +#include + #include #include @@ -910,5 +912,6 @@ Is_in_domain::operator()(const Point_3& p) const } // end namespace CGAL - +#include + #endif // POLYHEDRAL_MESH_TRAITS_3_H_ diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index 9d2e05f04c9..994b347da8f 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -30,6 +30,7 @@ #include +#include #include @@ -602,5 +603,6 @@ add_featured_edges_to_graph(const Polyhedron& p, } //namespace CGAL +#include #endif // CGAL_POLYHEDRAL_MESH_DOMAIN_WITH_FEATURES_3_H diff --git a/Mesh_3/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h b/Mesh_3/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h index f52b95b2132..8eee712d970 100644 --- a/Mesh_3/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h +++ b/Mesh_3/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -105,4 +106,6 @@ public: }; } // end namespace CGAL +#include + #endif // CGAL_INTERNAL_MESH_3_INTERNAL_HANDLE_IO_FOR_PAIR_OF_INT_H diff --git a/Mesh_3/include/CGAL/make_mesh_3.h b/Mesh_3/include/CGAL/make_mesh_3.h index 078e201c3b4..4ab9b5ec5f1 100644 --- a/Mesh_3/include/CGAL/make_mesh_3.h +++ b/Mesh_3/include/CGAL/make_mesh_3.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -480,5 +481,6 @@ void make_mesh_3_impl(C3T3& c3t3, } // end namespace CGAL +#include #endif // CGAL_MAKE_MESH_3_H diff --git a/Mesh_3/include/CGAL/refine_mesh_3.h b/Mesh_3/include/CGAL/refine_mesh_3.h index dcfe1d6565e..c96792e7dd7 100644 --- a/Mesh_3/include/CGAL/refine_mesh_3.h +++ b/Mesh_3/include/CGAL/refine_mesh_3.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -581,5 +582,6 @@ void refine_mesh_3_impl(C3T3& c3t3, } // end namespace CGAL +#include #endif // CGAL_REFINE_MESH_3_H diff --git a/Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h b/Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h index 067ac651d14..d2d2089ae13 100644 --- a/Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h +++ b/Mesh_3/include/CGAL/remove_far_points_in_mesh_3.h @@ -28,6 +28,7 @@ #include +#include namespace CGAL { @@ -91,4 +92,6 @@ remove_far_points_in_mesh_3(C3T3& c3t3) } //namespace CGAL +#include + #endif // CGAL_REMOVE_FAR_POINTS_IN_MESH_3_H diff --git a/Mesh_3/test/Mesh_3/test_c3t3_io.cpp b/Mesh_3/test/Mesh_3/test_c3t3_io.cpp index 68099de91f1..d6cd39136df 100644 --- a/Mesh_3/test/Mesh_3/test_c3t3_io.cpp +++ b/Mesh_3/test/Mesh_3/test_c3t3_io.cpp @@ -8,6 +8,8 @@ #include +#include + typedef CGAL::Exact_predicates_inexact_constructions_kernel K; // diff --git a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp index 807c96d3d87..28ce9021278 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp @@ -26,6 +26,8 @@ #include "test_meshing_utilities.h" #include +#include + template struct Implicit_tester : public Tester { diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index cec7c8cfde2..77d2021187d 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -33,6 +33,8 @@ #include +#include + template struct Polyhedron_tester : public Tester { diff --git a/Mesh_3/test/Mesh_3/test_meshing_utilities.h b/Mesh_3/test/Mesh_3/test_meshing_utilities.h index c2d79bedce8..1cca6130d1b 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_utilities.h +++ b/Mesh_3/test/Mesh_3/test_meshing_utilities.h @@ -41,6 +41,8 @@ #include #include +#include + #include #include #include @@ -422,4 +424,6 @@ struct Tester } }; +#include + #endif // CGAL_MESH_3_TEST_TEST_MESHING_UTILITIES diff --git a/Mesh_3/test/Mesh_3/test_utilities.h b/Mesh_3/test/Mesh_3/test_utilities.h index ba515d69669..39189ca5708 100644 --- a/Mesh_3/test/Mesh_3/test_utilities.h +++ b/Mesh_3/test/Mesh_3/test_utilities.h @@ -32,7 +32,8 @@ #include #include -#include + +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel K_e_i; typedef CGAL::Exact_predicates_exact_constructions_kernel K_e_e; @@ -54,4 +55,6 @@ public: } // end namespace details } // end namespace CGAL +#include + #endif // CGAL_MESH_3_TEST_TEST_UTILITIES_H diff --git a/Mesher_level/include/CGAL/Mesher_level_default_implementations.h b/Mesher_level/include/CGAL/Mesher_level_default_implementations.h index 72221325a2d..f4c8f7666f5 100644 --- a/Mesher_level/include/CGAL/Mesher_level_default_implementations.h +++ b/Mesher_level/include/CGAL/Mesher_level_default_implementations.h @@ -22,6 +22,8 @@ #ifndef CGAL_MESHER_LEVEL_DEFAULT_IMPLEMENTATIONS_H #define CGAL_MESHER_LEVEL_DEFAULT_IMPLEMENTATIONS_H +#include + #include namespace CGAL { @@ -136,4 +138,6 @@ struct No_before_conflicts { } // end namespace CGAL +#include + #endif // CGAL_MESHER_LEVEL_DEFAULT_IMPLEMENTATIONS_H diff --git a/Mesher_level/include/CGAL/Mesher_level_visitors.h b/Mesher_level/include/CGAL/Mesher_level_visitors.h index 67f239cdd00..091ba40df38 100644 --- a/Mesher_level/include/CGAL/Mesher_level_visitors.h +++ b/Mesher_level/include/CGAL/Mesher_level_visitors.h @@ -22,6 +22,8 @@ #ifndef CGAL_MESHER_LEVEL_VISITORS_H #define CGAL_MESHER_LEVEL_VISITORS_H +#include + namespace CGAL { template @@ -127,4 +129,6 @@ struct Combine_mesh_visitor { } // end namespace CGAL +#include + #endif // CGAL_MESHER_LEVEL_VISITORS_H diff --git a/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h b/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h index 3565f5b7d5a..112dc01d300 100644 --- a/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h +++ b/Mesher_level/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h @@ -21,6 +21,8 @@ #ifndef CGAL_MESH_2_TRIANGULATION_MESHER_LEVEL_TRAITS_3_H #define CGAL_MESH_2_TRIANGULATION_MESHER_LEVEL_TRAITS_3_H +#include + #include #include #include @@ -141,4 +143,6 @@ struct Triangulation_mesher_level_traits_3 : } // end namespace CGAL +#include + #endif // CGAL_MESH_2_TRIANGULATION_MESHER_LEVEL_TRAITS_3_H From 36a2ba115d89089f71a5283e0e0a59d454ea1efb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 08:56:16 +0000 Subject: [PATCH 21/84] Surface_mesh_parameterization --- .../Surface_mesh_parameterization/internal/shortest_path.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h index db25001d370..059ac3bf674 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h @@ -23,6 +23,8 @@ #include +#include + #include #include @@ -165,4 +167,6 @@ void compute_shortest_paths_between_cones(const TriangleMesh& mesh, } // namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_INTERNAL_SHORTEST_PATH_H From 8fcfb34d11f699ce18a06c04079e2f5f923b1678 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 09:17:09 +0000 Subject: [PATCH 22/84] cleanup --- .../examples/Surface_mesh_parameterization/orbifold.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp index b9da99fc9e1..1a7f2ff7676 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp @@ -3,8 +3,6 @@ #include #include -#include -#include #include #include From 799260f60410fa3c82e6bcd633db49819f2703e1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 10:05:01 +0000 Subject: [PATCH 23/84] Poisson surface reconstruction --- Installation/include/CGAL/disable_warnings.h | 4 +++- .../include/CGAL/Poisson_reconstruction_function.h | 3 +++ .../include/CGAL/Reconstruction_triangulation_3.h | 9 ++++++--- .../poisson_reconstruction_test.cpp | 4 ++-- STL_Extension/include/CGAL/iterator.h | 14 +++----------- .../include/CGAL/Complex_2_in_triangulation_3.h | 3 +++ .../IO/Complex_2_in_triangulation_3_file_writer.h | 3 +++ ...mplex_2_in_triangulation_3_polyhedron_builder.h | 3 +++ .../IO/Complex_2_in_triangulation_3_to_medit.h | 3 ++- .../CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h | 3 +++ .../CGAL/IO/facets_in_complex_2_to_triangle_mesh.h | 6 ++++++ .../CGAL/IO/output_surface_facets_to_polyhedron.h | 3 +++ Surface_mesher/include/CGAL/Implicit_surface_3.h | 3 +++ .../Surface_mesh_complex_2_in_triangulation_3.h | 3 +++ .../CGAL/Surface_mesh_default_triangulation_3.h | 3 +++ .../Surface_mesher/Implicit_surface_oracle_3.h | 2 ++ .../include/CGAL/Surface_mesher/Sphere_oracle_3.h | 2 ++ .../include/CGAL/Surface_mesher/Surface_mesher.h | 2 ++ .../CGAL/Surface_mesher/Surface_mesher_manifold.h | 2 ++ .../Surface_mesher/Surface_mesher_regular_edges.h | 2 ++ 20 files changed, 59 insertions(+), 18 deletions(-) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index f148bab4645..5d2a60a5c74 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -25,10 +25,12 @@ # pragma warning(disable: 4127) // conditional expression is constant # pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored # pragma warning(disable: 4355) // 'this' : used in base member initializer list +# pragma warning(disable: 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template # pragma warning(disable: 4510) // default constructor could not be generated -# pragma warning(disable: 4512) // assignment operator could not be generated +# pragma warning(disable: 4512) // assignment operator could not be generated# pragma warning(disable: 4522) // multiple assignment operators specified # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required # pragma warning(disable: 4706) // assignment within conditional expression # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used + #endif diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h index a18c5dba11d..cb2380fe8b3 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_reconstruction_function.h @@ -23,6 +23,7 @@ #include +#include #ifndef CGAL_DIV_NORMALIZED # ifndef CGAL_DIV_NON_NORMALIZED @@ -1219,4 +1220,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_POISSON_RECONSTRUCTION_FUNCTION_H diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Reconstruction_triangulation_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Reconstruction_triangulation_3.h index 29e9647c4f1..e920b1b5ed1 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Reconstruction_triangulation_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Reconstruction_triangulation_3.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -334,7 +335,7 @@ public: } if(this->dimension() < 3){ Vertex_handle v = Base::insert(p, start); - v->type() = type; + v->type() = static_cast(type); return v; } typename Base::Locate_type lt; @@ -342,7 +343,7 @@ public: Cell_handle ch = Base::locate(p, lt, li, lj, start); Vertex_handle v = Base::insert(p, lt, ch, li, lj); - v->type() = type; + v->type() = static_cast(type); return v; } @@ -461,7 +462,7 @@ public: Point_type type = STEINER) { Vertex_handle v = Base::insert_in_hole(p, cell_begin, cell_end, begin, i); - v->type() = type; + v->type() = static_cast(type); return v; } @@ -499,4 +500,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_IMPLICIT_FCT_DELAUNAY_TRIANGULATION_H diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp index ee18c4a260d..c313683da22 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_reconstruction_test.cpp @@ -13,8 +13,6 @@ #include #include #include -#include -#include #include #include #include @@ -33,6 +31,8 @@ #include +#include + // ---------------------------------------------------------------------------- // Types // ---------------------------------------------------------------------------- diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index eea776314ca..5ab50b8a991 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -28,6 +28,8 @@ #ifndef CGAL_ITERATOR_H #define CGAL_ITERATOR_H 1 +#include + #include #include #include @@ -40,15 +42,7 @@ #include -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4396) -# pragma warning(disable:4522) // multiple assignment operators specified -// The warning, with VC12, was: -// include\CGAL/iterator.h(1251) : warning C4522: 'CGAL::internal::Derivator,std::tuple>>,std::back_insert_iterator>>>>' : multiple assignment operators specified - -#endif namespace CGAL { template @@ -2545,8 +2539,6 @@ dispatch_or_drop_output(O1 out1,O2 out2,O3 out3,O4 out4,O5 out5,O6 out6,O7 out7) } //namespace CGAL -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include #endif // CGAL_ITERATOR_H 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 6f233d2aeef..aea10ea1bb8 100644 --- a/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Complex_2_in_triangulation_3.h @@ -24,6 +24,7 @@ #include +#include // TODO: add the iterators // TODO: document the output/input function of C2T3? @@ -795,4 +796,6 @@ operator<< (std::ostream& os, const Complex_2_in_triangulation_3 } // end namespace CGAL +#include + #endif // CGAL_COMPLEX_2_IN_TRIANGULATION_3_H diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h index c876000e98a..ba0ecb9c67b 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_file_writer.h @@ -24,6 +24,7 @@ #include +#include #define CGAL_C2T3_USE_FILE_WRITER_OFF @@ -544,4 +545,6 @@ output_interior_facets_to_off (std::ostream& os, const Tr & T) { } // end namespace CGAL +#include + #endif // CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_FILE_WRITER_H diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h index f42c55ef504..04e53497f4b 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_polyhedron_builder.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -194,4 +195,6 @@ public: } // end namespace CGAL +#include + #endif // CGAL_IO_COMPLEX_2_IN_TRIANGULATION_3_POLYHEDRON_BUILDER_H diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h index def7fb61133..3863a76844b 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_medit.h @@ -24,7 +24,7 @@ #include - +#include #include #include @@ -88,5 +88,6 @@ output_surface_facets_to_medit (std::ostream& os, const C2t3& c2t3) } // end of namespace CGAL +#include #endif // CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_MEDIT_H diff --git a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h index d18a97848fb..07ac1636a19 100644 --- a/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h +++ b/Surface_mesher/include/CGAL/IO/Complex_2_in_triangulation_3_to_vtk.h @@ -24,6 +24,7 @@ #include +#include #include @@ -92,4 +93,6 @@ vtkPolyData* output_c2t3_to_vtk_polydata(const C2T3& c2t3, } // end namespace CGAL +#include + #endif // CGAL_COMPLEX_2_IN_TRIANGULATION_3_TO_VTK diff --git a/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h b/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h index 6714ab72948..86954271274 100644 --- a/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h +++ b/Surface_mesher/include/CGAL/IO/facets_in_complex_2_to_triangle_mesh.h @@ -24,6 +24,9 @@ #define CGAL_FACETS_IN_COMPLEX_2_TO_TRIANGLE_MESH_H #include + +#include + #include #include @@ -170,4 +173,7 @@ void facets_in_complex_2_to_triangle_mesh(const C2T3& c2t3, TriangleMesh& graph) } }// end CGAL + +#include + #endif // CGAL_FACETS_IN_COMPLEX_2_TO_TRIANGLE_MESH_H diff --git a/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h b/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h index 1c8cf429e10..edab29498a0 100644 --- a/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h +++ b/Surface_mesher/include/CGAL/IO/output_surface_facets_to_polyhedron.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -61,4 +62,6 @@ output_surface_facets_to_polyhedron( } //namespace CGAL +#include + #endif // CGAL_OUTPUT_SURFACE_FACETS_TO_POLYHEDRON_H diff --git a/Surface_mesher/include/CGAL/Implicit_surface_3.h b/Surface_mesher/include/CGAL/Implicit_surface_3.h index a702e7d81ca..e8b34c4f1fb 100644 --- a/Surface_mesher/include/CGAL/Implicit_surface_3.h +++ b/Surface_mesher/include/CGAL/Implicit_surface_3.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -145,4 +146,6 @@ namespace CGAL { } // end namespace CGAL +#include + #endif // CGAL_IMPLICIT_SURFACE_3_H diff --git a/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h b/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h index 006fbbe9914..a42913c015b 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_complex_2_in_triangulation_3.h @@ -24,6 +24,7 @@ #include +#include #include @@ -47,4 +48,6 @@ public: } // end namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_COMPLEX_2_IN_TRIANGULATION_3_H diff --git a/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h b/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h index a6d3a57fb46..2d0fff7bd72 100644 --- a/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesh_default_triangulation_3.h @@ -24,6 +24,7 @@ #include +#include // traits class #include @@ -70,4 +71,6 @@ namespace CGAL { } // end namespace CGAL +#include + #endif // CGAL_SURFACE_MESH_DEFAULT_TRIANGULATION_3_H diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h b/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h index 8ba1305c57f..2ed6a32971e 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Implicit_surface_oracle_3.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -504,5 +505,6 @@ FT approximate_sqrt(const FT x) { } // namespace CGAL +#include #endif // CGAL_SURFACE_MESHER_IMPLICIT_SURFACE_ORACLE_3_H 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 d8b8bc26a65..833383403b0 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Sphere_oracle_3.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -460,5 +461,6 @@ namespace CGAL { } // namespace CGAL +#include #endif // CGAL_SURFACE_MESHER_SPHERE_ORACLE_3_H diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h index 12ed86bfb00..79906f1666a 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher.h @@ -31,6 +31,7 @@ #include +#include #include #include @@ -795,5 +796,6 @@ namespace CGAL { } // end namespace CGAL +#include #endif // CGAL_SURFACE_MESHER_SURFACE_MESHER_H diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h index 2f310668ad8..2570b5896c0 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h @@ -25,6 +25,7 @@ #include +#include #include @@ -241,5 +242,6 @@ namespace CGAL { } // end namespace CGAL +#include #endif // CGAL_SURFACE_MESHER_MANIFOLD_H diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h index fe6aa6eb3df..0a0a00c914f 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_regular_edges.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -358,5 +359,6 @@ namespace CGAL { } // end namespace CGAL +#include #endif // CGAL_SURFACE_MESHER_REGULAR_EDGES_H From c493359b62400f77a88fbbfda65597787424c9ab Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 10:11:33 +0000 Subject: [PATCH 24/84] Convex_hull_3 --- Convex_hull_3/include/CGAL/convex_hull_3.h | 4 ++++ Hash_map/include/CGAL/Unique_hash_map.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Convex_hull_3/include/CGAL/convex_hull_3.h b/Convex_hull_3/include/CGAL/convex_hull_3.h index ea8771f3ef4..ec2dfdf4e0e 100644 --- a/Convex_hull_3/include/CGAL/convex_hull_3.h +++ b/Convex_hull_3/include/CGAL/convex_hull_3.h @@ -26,6 +26,8 @@ #include +#include + #include #include #include @@ -907,4 +909,6 @@ void convex_hull_3(InputIterator first, InputIterator beyond, } // namespace CGAL +#include + #endif // CGAL_CONVEX_HULL_3_H diff --git a/Hash_map/include/CGAL/Unique_hash_map.h b/Hash_map/include/CGAL/Unique_hash_map.h index 224f29838ae..e616d1c1469 100644 --- a/Hash_map/include/CGAL/Unique_hash_map.h +++ b/Hash_map/include/CGAL/Unique_hash_map.h @@ -27,6 +27,8 @@ #ifndef CGAL_UNIQUE_HASH_MAP_H #define CGAL_UNIQUE_HASH_MAP_H +#include + #include #include #include @@ -179,5 +181,7 @@ namespace boost { } +#include + #endif // CGAL_UNIQUE_HASH_MAP_H // EOF From 87b08fdccb433a71eb4ea183d6565703193743ef Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 10:16:32 +0000 Subject: [PATCH 25/84] Barycentric_coordinates --- .../CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h | 3 +++ .../Generalized_barycentric_coordinates_2.h | 3 +++ .../include/CGAL/Barycentric_coordinates_2/Mean_value_2.h | 3 +++ .../CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h | 3 +++ .../CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h | 3 +++ .../include/CGAL/Barycentric_coordinates_2/Wachspress_2.h | 3 +++ 6 files changed, 18 insertions(+) diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h index f8eaee5ab42..8e7ea862020 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Discrete_harmonic_2.h @@ -27,6 +27,7 @@ #include +#include // CGAL headers. #include @@ -441,4 +442,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_DISCRETE_HARMONIC_2_H diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h index a902c2929ca..a3bd2339986 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Generalized_barycentric_coordinates_2.h @@ -27,6 +27,7 @@ #include +#include // CGAL headers. #include @@ -596,4 +597,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_GENERALIZED_BARYCENTRIC_COORDINATES_2_H diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h index b8ce5f432ff..7f98606bf67 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Mean_value_2.h @@ -27,6 +27,7 @@ #include +#include // STL headers. #include @@ -509,4 +510,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_MEAN_VALUE_2_H diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h index e873ae1945f..96b0979e27d 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Segment_coordinates_2.h @@ -27,6 +27,7 @@ #include +#include // STL headers. #include @@ -237,4 +238,6 @@ template } // namespace CGAL +#include + #endif // CGAL_SEGMENT_COORDINATES_2_H diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h index 6932254f655..a76212bdb97 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Triangle_coordinates_2.h @@ -27,6 +27,7 @@ #include +#include // STL headers. #include @@ -263,4 +264,6 @@ template } // namespace CGAL +#include + #endif // CGAL_TRIANGLE_COORDINATES_2_H diff --git a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h index d7e55e44873..21903d6c087 100644 --- a/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h +++ b/Barycentric_coordinates_2/include/CGAL/Barycentric_coordinates_2/Wachspress_2.h @@ -27,6 +27,7 @@ #include +#include // CGAL headers. #include @@ -424,4 +425,6 @@ private: } // namespace CGAL +#include + #endif // CGAL_WACHSPRESS_2_H From 341d2bb24928ddcfd2989e945405fd17a3306806 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 10:27:53 +0000 Subject: [PATCH 26/84] Segment_voronoi --- .../include/CGAL/Segment_Delaunay_graph_2.h | 2 ++ .../include/CGAL/Segment_Delaunay_graph_face_base_2.h | 3 +++ .../include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h | 3 +++ .../include/CGAL/Segment_Delaunay_graph_hierarchy_2.h | 2 ++ .../CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h | 2 ++ .../include/CGAL/Segment_Delaunay_graph_traits_2.h | 4 +++- .../include/CGAL/Segment_Delaunay_graph_vertex_base_2.h | 3 +++ .../include/CGAL/Segment_Delaunay_graph_Linf_2.h | 2 ++ .../CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h | 3 +++ .../include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h | 3 +++ .../include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h | 4 +++- 11 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h index b4f898ef627..91e8a59e972 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -2030,5 +2031,6 @@ std::ostream& operator<<(std::ostream& os, #include +#include #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_2_H diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_face_base_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_face_base_2.h index 6cb7e2a112b..90e8f906932 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_face_base_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_face_base_2.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -152,4 +153,6 @@ public: } //namespace CGAL +#include + #endif //CGAL_SEGMENT_DELAUNAY_GRAPH_FACE_BASE_2_H diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h index fdd614ceb3f..39e97db27ff 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_filtered_traits_2.h @@ -26,6 +26,7 @@ #include +#include #include @@ -247,4 +248,6 @@ struct Segment_Delaunay_graph_filtered_traits_without_intersections_2 } //namespace CGAL +#include + #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_FILTERED_TRAITS_2_H diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h index b5c0740f58b..9fbeedc9c48 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_2.h @@ -26,6 +26,7 @@ #include +#include #include @@ -497,5 +498,6 @@ std::ostream& operator<<(std::ostream& os, #include +#include #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_2_H diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h index e1ed6ac5cdb..c12fb3c3b07 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_hierarchy_vertex_base_2.h @@ -25,6 +25,7 @@ #include +#include #include @@ -74,5 +75,6 @@ private: } //namespace CGAL +#include #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_HIERARCHY_VERTEX_BASE_2_H diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h index 2c309cb96b9..dd3045be488 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_traits_2.h @@ -26,7 +26,7 @@ #include - +#include #include @@ -168,4 +168,6 @@ Segment_Delaunay_graph_traits_without_intersections_2, } //namespace CGAL +#include + #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_TRAITS_2_H diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h index b6f261f57ff..c2ccad479dc 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_vertex_base_2.h @@ -27,6 +27,7 @@ #include +#include #include @@ -100,4 +101,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_VERTEX_BASE_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2.h index 354a4d7f895..1836e4c8742 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -483,5 +484,6 @@ public: #include +#include #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h index 67fa07c9208..4f9c4a31648 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_filtered_traits_2.h @@ -25,6 +25,7 @@ #include +#include #include @@ -246,4 +247,6 @@ struct Segment_Delaunay_graph_Linf_filtered_traits_without_intersections_2 } //namespace CGAL +#include + #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_FILTERED_TRAITS_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h index 469f2f8629a..522ee3ca2db 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_hierarchy_2.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -80,4 +81,6 @@ class Segment_Delaunay_graph_Linf_hierarchy_2 } //namespace CGAL +#include + #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_HIERARCHY_2_H diff --git a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h index 6165781d728..79754ba056d 100644 --- a/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h +++ b/Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_traits_2.h @@ -25,7 +25,7 @@ #include - +#include #include @@ -167,4 +167,6 @@ Segment_Delaunay_graph_Linf_traits_without_intersections_2, } //namespace CGAL +#include + #endif // CGAL_SEGMENT_DELAUNAY_GRAPH_LINF_TRAITS_2_H From fa92aa49f77f21207f3983bd7693aa15d534cf91 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 10:43:57 +0000 Subject: [PATCH 27/84] Nef --- Installation/include/CGAL/disable_warnings.h | 1 + Nef_2/include/CGAL/Bounded_kernel.h | 7 ++++--- Nef_2/include/CGAL/Extended_cartesian.h | 4 ++++ Nef_2/include/CGAL/Extended_homogeneous.h | 4 ++++ Nef_2/include/CGAL/Filtered_extended_homogeneous.h | 3 +++ Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h | 2 +- Nef_2/include/CGAL/Nef_polyhedron_2.h | 11 ++--------- Nef_3/include/CGAL/Nef_3/K3_tree.h | 1 - Nef_3/include/CGAL/Nef_3/SNC_k3_tree_traits.h | 1 - Nef_3/include/CGAL/Nef_nary_intersection_3.h | 4 ++++ Nef_3/include/CGAL/Nef_nary_union_3.h | 4 ++++ Nef_3/include/CGAL/Nef_polyhedron_3.h | 3 +++ Nef_3/include/CGAL/OFF_to_nef_3.h | 4 ++++ Nef_3/test/Nef_3/include/CGAL/test_Nef_3.h | 2 ++ Nef_S2/include/CGAL/Nef_polyhedron_S2.h | 14 ++++---------- 15 files changed, 40 insertions(+), 25 deletions(-) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 5d2a60a5c74..cb388ea188d 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -30,6 +30,7 @@ # pragma warning(disable: 4512) // assignment operator could not be generated# pragma warning(disable: 4522) // multiple assignment operators specified # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required # pragma warning(disable: 4706) // assignment within conditional expression +# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used diff --git a/Nef_2/include/CGAL/Bounded_kernel.h b/Nef_2/include/CGAL/Bounded_kernel.h index dbdaed3c940..736788715f4 100644 --- a/Nef_2/include/CGAL/Bounded_kernel.h +++ b/Nef_2/include/CGAL/Bounded_kernel.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -445,8 +446,8 @@ public: }; - - - } //namespace CGAL + +#include + #endif // CGAL_BOUNDED_KERNEL_H diff --git a/Nef_2/include/CGAL/Extended_cartesian.h b/Nef_2/include/CGAL/Extended_cartesian.h index e759ef2ac82..9f6b4603dbb 100644 --- a/Nef_2/include/CGAL/Extended_cartesian.h +++ b/Nef_2/include/CGAL/Extended_cartesian.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -444,4 +445,7 @@ const char* output_identifier() const { return "Extended_cartesian"; } #undef Polynomial } //namespace CGAL + +#include + #endif // CGAL_EXTENDED_CARTESIAN_H diff --git a/Nef_2/include/CGAL/Extended_homogeneous.h b/Nef_2/include/CGAL/Extended_homogeneous.h index 7b8b1a90b3d..ffa4a532689 100644 --- a/Nef_2/include/CGAL/Extended_homogeneous.h +++ b/Nef_2/include/CGAL/Extended_homogeneous.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -520,4 +521,7 @@ on the extended geometric objects.}*/ }; } //namespace CGAL + +#include + #endif // CGAL_EXTENDED_HOMOGENEOUS_H diff --git a/Nef_2/include/CGAL/Filtered_extended_homogeneous.h b/Nef_2/include/CGAL/Filtered_extended_homogeneous.h index 574f6cb95af..d7eddf5a515 100644 --- a/Nef_2/include/CGAL/Filtered_extended_homogeneous.h +++ b/Nef_2/include/CGAL/Filtered_extended_homogeneous.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -1293,4 +1294,6 @@ const char* output_identifier() const #undef PRINT_STATISTICS #undef PRINT_CHECK_ENABLED +#include + #endif // CGAL_FILTERED_EXTENDED_HOMOGENEOUS_H diff --git a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h index b728913f015..a19df76726e 100644 --- a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h +++ b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h @@ -1039,7 +1039,7 @@ public: x2iso[&*event] = 0; } - ISegment next_seg; + ISegment next_seg = ISegment(); seg_iterator next_it = SQ.begin(); while ( next_it != SQ.end() && ( next_seg = next_it->second, p_sweep == source(next_seg)) ) { diff --git a/Nef_2/include/CGAL/Nef_polyhedron_2.h b/Nef_2/include/CGAL/Nef_polyhedron_2.h index 2ea113e210b..e2e750cdb41 100644 --- a/Nef_2/include/CGAL/Nef_polyhedron_2.h +++ b/Nef_2/include/CGAL/Nef_polyhedron_2.h @@ -24,12 +24,7 @@ #include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4800) // complaint about performance in std::map where we can't do anything -#endif - +#include #include #include @@ -1133,8 +1128,6 @@ std::istream& operator>> } //namespace CGAL -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include #endif //CGAL_NEF_POLYHEDRON_2_H diff --git a/Nef_3/include/CGAL/Nef_3/K3_tree.h b/Nef_3/include/CGAL/Nef_3/K3_tree.h index 4eb3269fd2e..aa8515f7a3f 100644 --- a/Nef_3/include/CGAL/Nef_3/K3_tree.h +++ b/Nef_3/include/CGAL/Nef_3/K3_tree.h @@ -1171,7 +1171,6 @@ Node* build_kdtree(Object_list& O, Object_iterator v_end, CGAL_NEF_TRACEN("build_kdtree: splitting plane not found"); // if(depth > max_depth) return new Node( parent, 0, 0, Plane_3(), O); - non_efective_split = true; } else { CGAL_NEF_TRACEN("Sizes " << O1.size() << ", " << O2.size() << ", " << O.size()); CGAL_assertion( O1.size() <= O.size() && O2.size() <= O.size()); 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 c53f467163f..681f0f69529 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 @@ -417,7 +417,6 @@ Side_of_plane::operator() #ifdef CGAL_NEF_EXPLOIT_REFERENCE_COUNTING } #endif - CGAL_error_msg( "should not be reached"); } /* diff --git a/Nef_3/include/CGAL/Nef_nary_intersection_3.h b/Nef_3/include/CGAL/Nef_nary_intersection_3.h index 78cd941735e..a967b34f7e4 100644 --- a/Nef_3/include/CGAL/Nef_nary_intersection_3.h +++ b/Nef_3/include/CGAL/Nef_nary_intersection_3.h @@ -24,6 +24,7 @@ #include +#include #include @@ -69,4 +70,7 @@ class Nef_nary_intersection_3 { }; } //namespace CGAL + +#include + #endif // CGAL_NEF_NARY_INTERSECTION_3_H diff --git a/Nef_3/include/CGAL/Nef_nary_union_3.h b/Nef_3/include/CGAL/Nef_nary_union_3.h index 8440dac3229..89ab6d45b3c 100644 --- a/Nef_3/include/CGAL/Nef_nary_union_3.h +++ b/Nef_3/include/CGAL/Nef_nary_union_3.h @@ -24,6 +24,7 @@ #include +#include #include @@ -69,4 +70,7 @@ class Nef_nary_union_3 { }; } //namespace CGAL + +#include + #endif // CGAL_NEF_NARY_UNION_H diff --git a/Nef_3/include/CGAL/Nef_polyhedron_3.h b/Nef_3/include/CGAL/Nef_polyhedron_3.h index a77bb4be497..6f031c151bb 100644 --- a/Nef_3/include/CGAL/Nef_polyhedron_3.h +++ b/Nef_3/include/CGAL/Nef_polyhedron_3.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -2162,4 +2163,6 @@ extract_boundary() { } //namespace CGAL +#include + #endif //CGAL_NEF_POLYHEDRON_3_H diff --git a/Nef_3/include/CGAL/OFF_to_nef_3.h b/Nef_3/include/CGAL/OFF_to_nef_3.h index c44af78384e..4ab28af2a84 100644 --- a/Nef_3/include/CGAL/OFF_to_nef_3.h +++ b/Nef_3/include/CGAL/OFF_to_nef_3.h @@ -24,6 +24,7 @@ #include +#include #include @@ -247,4 +248,7 @@ OFF_to_nef_3 (std::istream &i_st, Nef_3 &nef_union, bool verb=false) } } //namespace CGAL + +#include + #endif // CGAL_OFF_TO_NEF_3_H diff --git a/Nef_3/test/Nef_3/include/CGAL/test_Nef_3.h b/Nef_3/test/Nef_3/include/CGAL/test_Nef_3.h index e4ff83ebba9..8e5ac9f1e31 100644 --- a/Nef_3/test/Nef_3/include/CGAL/test_Nef_3.h +++ b/Nef_3/test/Nef_3/include/CGAL/test_Nef_3.h @@ -35,6 +35,8 @@ #include #include +#include + namespace CGAL { template diff --git a/Nef_S2/include/CGAL/Nef_polyhedron_S2.h b/Nef_S2/include/CGAL/Nef_polyhedron_S2.h index 509fb1bfabf..7a5dc5ffc9d 100644 --- a/Nef_S2/include/CGAL/Nef_polyhedron_S2.h +++ b/Nef_S2/include/CGAL/Nef_polyhedron_S2.h @@ -25,11 +25,7 @@ #include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4800) // complaint about performance in std::map where we can't do anything -#endif +#include #include #include @@ -729,10 +725,8 @@ std::istream& operator>> return is; } - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - } //namespace CGAL + +#include + #endif //CGAL_NEF_POLYHEDRON_S2_H From f972c6da7a80293f740920cc1f9e3375532338c4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 10:46:12 +0000 Subject: [PATCH 28/84] Nef --- Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h | 2 +- Triangulation/include/CGAL/Delaunay_triangulation.h | 3 +++ Triangulation/include/CGAL/Triangulation.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h index a19df76726e..01179236725 100644 --- a/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h +++ b/Nef_2/include/CGAL/Nef_2/Segment_overlay_traits.h @@ -1039,7 +1039,7 @@ public: x2iso[&*event] = 0; } - ISegment next_seg = ISegment(); + ISegment next_seg = ISegment(); // to avoid /W4 warning seg_iterator next_it = SQ.begin(); while ( next_it != SQ.end() && ( next_seg = next_it->second, p_sweep == source(next_seg)) ) { diff --git a/Triangulation/include/CGAL/Delaunay_triangulation.h b/Triangulation/include/CGAL/Delaunay_triangulation.h index 40076704d30..a5fa258db23 100644 --- a/Triangulation/include/CGAL/Delaunay_triangulation.h +++ b/Triangulation/include/CGAL/Delaunay_triangulation.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -934,4 +935,6 @@ Delaunay_triangulation } //namespace CGAL +#include + #endif // CGAL_DELAUNAY_COMPLEX_H diff --git a/Triangulation/include/CGAL/Triangulation.h b/Triangulation/include/CGAL/Triangulation.h index dd1f7c9c560..f040c53e494 100644 --- a/Triangulation/include/CGAL/Triangulation.h +++ b/Triangulation/include/CGAL/Triangulation.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -1431,4 +1432,6 @@ operator<<(std::ostream & os, const Triangulation & tr) } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_H From 257b18035188ec6a94cc25e08ef3bc3c38a90ae6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 13:56:10 +0000 Subject: [PATCH 29/84] Triangulation --- Installation/include/CGAL/disable_warnings.h | 1 + NewKernel_d/include/CGAL/Epeck_d.h | 6 ++++++ NewKernel_d/include/CGAL/Epick_d.h | 6 ++++++ NewKernel_d/test/NewKernel_d/Epick_d.cpp | 6 ++++++ Triangulation/include/CGAL/Regular_triangulation.h | 4 ++++ Triangulation/include/CGAL/Triangulation_data_structure.h | 3 +++ Triangulation/include/CGAL/Triangulation_ds_full_cell.h | 3 +++ Triangulation/include/CGAL/Triangulation_ds_vertex.h | 3 +++ Triangulation/include/CGAL/Triangulation_face.h | 3 +++ Triangulation/include/CGAL/Triangulation_full_cell.h | 3 +++ Triangulation/include/CGAL/Triangulation_vertex.h | 3 +++ .../include/CGAL/internal/Combination_enumerator.h | 3 +++ 12 files changed, 44 insertions(+) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index cb388ea188d..75cb6574e6e 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -30,6 +30,7 @@ # pragma warning(disable: 4512) // assignment operator could not be generated# pragma warning(disable: 4522) // multiple assignment operators specified # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required # pragma warning(disable: 4706) // assignment within conditional expression +# pragma warning(disable: 4714) // function marked as __forceinline not inlined # pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used diff --git a/NewKernel_d/include/CGAL/Epeck_d.h b/NewKernel_d/include/CGAL/Epeck_d.h index 34bb5b4b46d..e8fa035db94 100644 --- a/NewKernel_d/include/CGAL/Epeck_d.h +++ b/NewKernel_d/include/CGAL/Epeck_d.h @@ -20,6 +20,9 @@ #ifndef CGAL_EPECK_D_H #define CGAL_EPECK_D_H + +#include + #include #include #include @@ -51,4 +54,7 @@ struct Epeck_d }; #undef CGAL_BASE } + +#include + #endif diff --git a/NewKernel_d/include/CGAL/Epick_d.h b/NewKernel_d/include/CGAL/Epick_d.h index 6d0f1210f12..5728e41e745 100644 --- a/NewKernel_d/include/CGAL/Epick_d.h +++ b/NewKernel_d/include/CGAL/Epick_d.h @@ -20,6 +20,9 @@ #ifndef CGAL_EPICK_D_H #define CGAL_EPICK_D_H + +#include + #include #include #include @@ -69,4 +72,7 @@ struct Epick_d }; #undef CGAL_BASE } + +#include + #endif diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index bed06b20a03..3e8b3547d18 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -12,6 +12,7 @@ int main() //#define BOOST_RESULT_OF_USE_DECLTYPE 1 #include #include + #include #include #include @@ -25,6 +26,7 @@ int main() #include #include #include + #include //typedef CGAL::Cartesian_base_d > K0; @@ -411,6 +413,8 @@ void test2(){ D un10; CGAL_USE(un10); } +# pragma warning(push) +# pragma warning(disable: 4512) template struct Construct_point3_helper { CP const& cp; Construct_point3_helper(CP const& x) : cp(x) {} @@ -426,6 +430,8 @@ template struct Construct_point3_helper { } }; +# pragma warning(pop) + template void test3(){ typedef Ker K1; diff --git a/Triangulation/include/CGAL/Regular_triangulation.h b/Triangulation/include/CGAL/Regular_triangulation.h index 73a4af99490..900c8d642da 100644 --- a/Triangulation/include/CGAL/Regular_triangulation.h +++ b/Triangulation/include/CGAL/Regular_triangulation.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -1166,4 +1168,6 @@ Regular_triangulation } //namespace CGAL +#include + #endif //CGAL_REGULAR_TRIANGULATION_H diff --git a/Triangulation/include/CGAL/Triangulation_data_structure.h b/Triangulation/include/CGAL/Triangulation_data_structure.h index bb74dcba91d..411ac09b6bf 100644 --- a/Triangulation/include/CGAL/Triangulation_data_structure.h +++ b/Triangulation/include/CGAL/Triangulation_data_structure.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -1604,4 +1605,6 @@ operator<<(std::ostream & os, const Triangulation_data_structure } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_DATA_STRUCTURE_H diff --git a/Triangulation/include/CGAL/Triangulation_ds_full_cell.h b/Triangulation/include/CGAL/Triangulation_ds_full_cell.h index 3a1ce0a9579..922bcd3caee 100644 --- a/Triangulation/include/CGAL/Triangulation_ds_full_cell.h +++ b/Triangulation/include/CGAL/Triangulation_ds_full_cell.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -312,4 +313,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_DS_FULL_CELL_H diff --git a/Triangulation/include/CGAL/Triangulation_ds_vertex.h b/Triangulation/include/CGAL/Triangulation_ds_vertex.h index fcac607841d..83ab7f5261d 100644 --- a/Triangulation/include/CGAL/Triangulation_ds_vertex.h +++ b/Triangulation/include/CGAL/Triangulation_ds_vertex.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -155,4 +156,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_DS_VERTEX_H diff --git a/Triangulation/include/CGAL/Triangulation_face.h b/Triangulation/include/CGAL/Triangulation_face.h index e0de1b49c71..950121a67da 100644 --- a/Triangulation/include/CGAL/Triangulation_face.h +++ b/Triangulation/include/CGAL/Triangulation_face.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -112,4 +113,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_FACE_H diff --git a/Triangulation/include/CGAL/Triangulation_full_cell.h b/Triangulation/include/CGAL/Triangulation_full_cell.h index 4a23a6f6495..0a3cc98fb6e 100644 --- a/Triangulation/include/CGAL/Triangulation_full_cell.h +++ b/Triangulation/include/CGAL/Triangulation_full_cell.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -149,4 +150,6 @@ operator>>(std::istream & I, Triangulation_full_cell & s) } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_SIMPLEX_H diff --git a/Triangulation/include/CGAL/Triangulation_vertex.h b/Triangulation/include/CGAL/Triangulation_vertex.h index c337ba644bf..11094d00f43 100644 --- a/Triangulation/include/CGAL/Triangulation_vertex.h +++ b/Triangulation/include/CGAL/Triangulation_vertex.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -129,4 +130,6 @@ operator<<(std::ostream & os, const Triangulation_vertex & v) } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_VERTEX_H diff --git a/Triangulation/include/CGAL/internal/Combination_enumerator.h b/Triangulation/include/CGAL/internal/Combination_enumerator.h index f446e4c4d36..d4e7ce5e4a6 100644 --- a/Triangulation/include/CGAL/internal/Combination_enumerator.h +++ b/Triangulation/include/CGAL/internal/Combination_enumerator.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -149,4 +150,6 @@ public: } // end of namespace CGAL +#include + #endif // CGAL_INTERNAL_COMBINATION_ENUMERATOR_H From 599e2019df5121deabb0eae137a09f22a24c232b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 14:08:08 +0000 Subject: [PATCH 30/84] SLS --- Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h | 4 ++++ Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h | 3 +++ Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h | 2 ++ .../Straight_skeleton_2/Straight_skeleton_builder_2_impl.h | 2 +- .../Straight_skeleton_builder_traits_2_aux.h | 4 ++-- .../include/CGAL/Straight_skeleton_builder_2.h | 2 ++ .../include/CGAL/Straight_skeleton_converter_2.h | 2 ++ .../include/CGAL/constructions/Straight_skeleton_cons_ftC2.h | 2 +- Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h | 2 ++ .../CGAL/create_offset_polygons_from_polygon_with_holes_2.h | 2 ++ Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h | 2 ++ .../CGAL/create_straight_skeleton_from_polygon_with_holes_2.h | 2 ++ Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp | 2 +- 13 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h b/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h index 4abdc85e2fa..6534c500fb7 100644 --- a/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h +++ b/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h @@ -25,6 +25,8 @@ #ifndef CGAL_IO_DXF_WRITER_H #define CGAL_IO_DXF_WRITER_H +#include + #include #include #include @@ -281,4 +283,6 @@ private: } // end namespace CGAL +#include + #endif // CGAL_IO_DXF_WRITER_H 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 c801a2930d4..f37ab19d411 100644 --- a/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Polygon_offset_builder_2.h @@ -22,6 +22,7 @@ #include +#include #include #include @@ -255,6 +256,8 @@ private: #include +#include + #endif // CGAL_POLYGON_OFFSET_BUILDER_2_H // // EOF // diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h index 437708f73ea..5e409f866ac 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2.h @@ -22,6 +22,7 @@ #include +#include #include #include @@ -369,6 +370,7 @@ public : } // end namespace CGAL +#include #endif // CGAL_STRAIGHT_SKELETON_2_H // // EOF // 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 c4001590091..8012cd8cc39 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 @@ -544,7 +544,7 @@ void Straight_skeleton_builder_2::CreateContourBisectors() template void Straight_skeleton_builder_2::InitPhase() { - mVisitor.on_initialization_started(mSSkel->size_of_vertices()); + mVisitor.on_initialization_started(static_cast(mSSkel->size_of_vertices())); CreateContourBisectors(); CreateInitialEvents(); mVisitor.on_initialization_finished(); 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 33dabc89c1c..7f8c219a7ee 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 @@ -300,10 +300,10 @@ public: mCSIdx=0; mNCSIdx=1; break ; case TRISEGMENT_COLLINEARITY_ALL: - mCSIdx=-1; mNCSIdx=-1; break ; + mCSIdx = mNCSIdx = (std::numeric_limits::max)(); break ; case TRISEGMENT_COLLINEARITY_NONE: - mCSIdx=-1; mNCSIdx=-1; break ; + mCSIdx = mNCSIdx = (std::numeric_limits::max)(); break ; } } 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 30badbc565c..90fc4d9e4c8 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_builder_2.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -933,6 +934,7 @@ public: #include +#include #endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H // // EOF // 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 ef93e42f7f4..0a7dc75e0b9 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_converter_2.h @@ -22,6 +22,7 @@ #include +#include #include #include @@ -303,6 +304,7 @@ convert_straight_skeleton_2 ( Source_skeleton const& aSrc ) } // end namespace CGAL +#include #endif // CGAL_STRAIGHT_SKELETON_2_CONVERTER_H // // EOF // 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 d680d377d94..3f8733778e9 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 @@ -55,7 +55,7 @@ inline CORE::BigFloat to_BigFloat( MP_Float const& b ) const MP_Float::V::size_type limbs_per_double = 2 + 53/log_limb; exponent_type exp = b.max_exp(); - int steps = (std::min)(limbs_per_double, b.v.size()); + int steps = static_cast((std::min)(limbs_per_double, b.v.size())); CORE::BigFloat d_exp_1 = CORE::BigFloat::exp2(-log_limb); diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h index 0239aa10ab9..af76fb038fe 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_2.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -340,6 +341,7 @@ create_exterior_skeleton_and_offset_polygons_2 ( FT const& aOffset, Polygon cons } // end namespace CGAL +#include #endif // EOF // diff --git a/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h index e3360b51b74..fdb0b71ecdc 100644 --- a/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_offset_polygons_from_polygon_with_holes_2.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -105,6 +106,7 @@ create_exterior_skeleton_and_offset_polygons_with_holes_2 ( FT const& } // end namespace CGAL +#include #endif // EOF // diff --git a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h index 2c22d015e7e..fdb65810ef1 100644 --- a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h +++ b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_2.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -246,6 +247,7 @@ create_exterior_straight_skeleton_2 ( FT const& aMaxOffset, Polygon const& aPoly } // end namespace CGAL +#include #endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H // // EOF // diff --git a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h index 87b36f99ef3..f2c70b2b4c2 100644 --- a/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h +++ b/Straight_skeleton_2/include/CGAL/create_straight_skeleton_from_polygon_with_holes_2.h @@ -23,6 +23,7 @@ #include +#include #include #include @@ -44,6 +45,7 @@ create_interior_straight_skeleton_2 ( Polygon_with_holes_2 const& aPolyWith } // end namespace CGAL +#include #endif // CGAL_STRAIGHT_SKELETON_BUILDER_2_H // // EOF // diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp index 69c79490f46..1ed18452b03 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp @@ -793,7 +793,7 @@ int test_zone ( Zone& rZone ) { if ( sOffsetAtEntry.size() > 0 ) { - int lSize = std::distance(lTimes.begin(),lTimes.end()); + std::size_t lSize = std::distance(lTimes.begin(),lTimes.end()); for ( std::vector::const_iterator oi = sOffsetAtEntry.begin() ; oi != sOffsetAtEntry.end() ; ++ oi ) { From f4ec38e27ccab6c3a1f6639e531bdb796ad3380f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 14:15:21 +0000 Subject: [PATCH 31/84] STL_extensions --- Installation/include/CGAL/disable_warnings.h | 3 ++- STL_Extension/include/CGAL/Concurrent_compact_container.h | 4 ++++ STL_Extension/test/STL_Extension/test_Compact_container.cpp | 2 ++ .../test/STL_Extension/test_Concurrent_compact_container.cpp | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 75cb6574e6e..6c180ab3514 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -27,7 +27,8 @@ # pragma warning(disable: 4355) // 'this' : used in base member initializer list # pragma warning(disable: 4396) // the inline specifier cannot be used when a friend declaration refers to a specialization of a function template # pragma warning(disable: 4510) // default constructor could not be generated -# pragma warning(disable: 4512) // assignment operator could not be generated# pragma warning(disable: 4522) // multiple assignment operators specified +# pragma warning(disable: 4512) // assignment operator could not be generated +# pragma warning(disable: 4522) // multiple assignment operators specified # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required # pragma warning(disable: 4706) // assignment within conditional expression # pragma warning(disable: 4714) // function marked as __forceinline not inlined diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 811a631b394..af9212fa734 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -23,6 +23,8 @@ #ifndef CGAL_CONCURRENT_COMPACT_CONTAINER_H #define CGAL_CONCURRENT_COMPACT_CONTAINER_H +#include + #include #include @@ -1057,6 +1059,8 @@ namespace std { } // namespace std +#include + #endif // CGAL_CONCURRENT_COMPACT_CONTAINER_H #endif // CGAL_LINKED_WITH_TBB diff --git a/STL_Extension/test/STL_Extension/test_Compact_container.cpp b/STL_Extension/test/STL_Extension/test_Compact_container.cpp index 19d40d71549..1e78c93d382 100644 --- a/STL_Extension/test/STL_Extension/test_Compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Compact_container.cpp @@ -15,6 +15,8 @@ #include +#include + template struct Node_1 : public CGAL::Compact_container_base diff --git a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp index b4f6ede8654..1c12ab0507e 100644 --- a/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp +++ b/STL_Extension/test/STL_Extension/test_Concurrent_compact_container.cpp @@ -27,6 +27,8 @@ int main() # include # include +#include + struct Node_1 : public CGAL::Compact_container_base { From 18acb2ece9723f87b594335f5cfdd15552b44525 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 15:05:34 +0000 Subject: [PATCH 32/84] Arrangements --- .../include/CGAL/Algebraic_kernel_d/Algebraic_real_rep.h | 4 ++++ .../include/CGAL/Arr_Bezier_curve_traits_2.h | 3 ++- .../include/CGAL/Arr_algebraic_segment_traits_2.h | 4 ++++ .../include/CGAL/Arr_batched_point_location.h | 4 ++++ .../include/CGAL/Arr_bounded_planar_topology_traits_2.h | 4 ++++ .../include/CGAL/Arr_circle_segment_traits_2.h | 3 +++ .../include/CGAL/Arr_circular_arc_traits_2.h | 3 +++ .../include/CGAL/Arr_circular_line_arc_traits_2.h | 4 ++++ .../include/CGAL/Arr_conic_traits_2.h | 3 +++ .../include/CGAL/Arr_consolidated_curve_data_traits_2.h | 3 +++ .../include/CGAL/Arr_counting_traits_2.h | 3 +++ .../include/CGAL/Arr_curve_data_traits_2.h | 4 ++++ Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h | 3 +++ Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h | 3 +++ .../include/CGAL/Arr_default_overlay_traits.h | 4 ++++ .../Arr_directional_non_caching_segment_basic_traits_2.h | 3 +++ Arrangement_on_surface_2/include/CGAL/Arr_enums.h | 3 +++ Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h | 3 +++ .../include/CGAL/Arr_face_index_map.h | 3 +++ .../CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h | 3 +++ .../include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h | 2 ++ .../include/CGAL/Arr_landmarks_point_location.h | 3 +++ .../include/CGAL/Arr_line_arc_traits_2.h | 3 +++ .../include/CGAL/Arr_linear_traits_2.h | 3 +++ .../include/CGAL/Arr_naive_point_location.h | 3 +++ .../include/CGAL/Arr_non_caching_segment_basic_traits_2.h | 3 +++ .../include/CGAL/Arr_non_caching_segment_traits_2.h | 3 +++ Arrangement_on_surface_2/include/CGAL/Arr_observer.h | 3 +++ Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h | 4 ++++ .../include/CGAL/Arr_point_location_result.h | 3 +++ .../include/CGAL/Arr_polycurve_basic_traits_2.h | 3 +++ .../include/CGAL/Arr_polycurve_traits_2.h | 3 +++ .../include/CGAL/Arr_polyline_traits_2.h | 3 +++ .../include/CGAL/Arr_rational_function_traits_2.h | 2 ++ .../include/CGAL/Arr_segment_traits_2.h | 2 ++ .../include/CGAL/Arr_simple_point_location.h | 3 +++ .../include/CGAL/Arr_spherical_topology_traits_2.h | 4 ++++ Arrangement_on_surface_2/include/CGAL/Arr_tags.h | 3 +++ .../include/CGAL/Arr_tracing_traits_2.h | 3 +++ .../include/CGAL/Arr_trapezoid_ric_point_location.h | 3 +++ .../include/CGAL/Arr_triangulation_point_location.h | 4 ++++ .../include/CGAL/Arr_unb_planar_topology_traits_2.h | 4 ++++ .../include/CGAL/Arr_vertex_index_map.h | 4 ++++ .../include/CGAL/Arr_vertical_decomposition_2.h | 4 ++++ .../include/CGAL/Arr_walk_along_line_point_location.h | 3 +++ Arrangement_on_surface_2/include/CGAL/Arrangement_2.h | 3 +++ .../include/CGAL/Arrangement_on_surface_2.h | 2 ++ .../include/CGAL/Arrangement_on_surface_with_history_2.h | 3 +++ .../include/CGAL/Arrangement_with_history_2.h | 3 +++ .../include/CGAL/Arrangement_zone_2.h | 4 ++++ .../include/CGAL/CORE_algebraic_number_traits.h | 4 ++++ .../include/CGAL/graph_traits_Arrangement_2.h | 4 ++++ .../include/CGAL/graph_traits_Dual_Arrangement_2.h | 3 +++ .../test/Arrangement_on_surface_2/Construction_test.h | 4 ++++ .../test/Arrangement_on_surface_2/IO_base_test.h | 1 + .../test/Arrangement_on_surface_2/Point_location_test.h | 4 ++++ .../test/Arrangement_on_surface_2/Traits_base_test.h | 1 + .../test/Arrangement_on_surface_2/Traits_test.h | 3 ++- .../test_rational_function_traits_2.cpp | 1 + .../test/Arrangement_on_surface_2/utils.h | 4 ++++ Polynomial/include/CGAL/Polynomial.h | 4 ++++ Polynomial/include/CGAL/Polynomial/Polynomial_type.h | 6 +++--- Polynomial/include/CGAL/Polynomial_traits_d.h | 4 ++++ Polynomial/include/CGAL/Polynomial_type_generator.h | 4 ++++ .../include/CGAL/Surface_sweep_2/No_overlap_event_base.h | 8 ++++---- 65 files changed, 206 insertions(+), 9 deletions(-) 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 4b2eba5998d..7fa3d16d65b 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 @@ -27,6 +27,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_D_ALGEBRAIC_REAL_REP_H #define CGAL_ALGEBRAIC_KERNEL_D_ALGEBRAIC_REAL_REP_H +#include + #include #include #include @@ -524,4 +526,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_ALGEBRAIC_KERNEL_D_ALGEBRAIC_REAL_REP_H 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 c092c3e4781..b52e4299e47 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 @@ -24,7 +24,7 @@ #define CGAL_ARR_BEZIER_CURVE_TRAITS_2_H #include - +#include /*! \file * Definition of the Arr_Bezier_curve_traits_2 class. @@ -881,4 +881,5 @@ public: } //namespace CGAL +#include #endif 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 95f52e13f2d..effec887209 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 @@ -24,6 +24,8 @@ #ifndef CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS #define CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS +#include + #include #include @@ -657,4 +659,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h index b842d1f0ba9..d73aa50113b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_batched_point_location.h @@ -25,6 +25,8 @@ #include +#include + #include #include #include @@ -145,4 +147,6 @@ locate(const Arrangement_on_surface_2& arr, } // namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h index db406ce7471..bda5c76ac68 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_bounded_planar_topology_traits_2.h @@ -26,6 +26,8 @@ #include +#include + /*! \file * * Definition of the Arr_bounded_planar_topology_traits_2 class. @@ -551,4 +553,6 @@ public: #include +#include + #endif 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 c7578731a16..bdbd53d20a4 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 @@ -25,6 +25,7 @@ #include +#include /*! \file * The header file for the Arr_circle_segment_traits_2 class. @@ -749,4 +750,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h index a1f2345716f..84d87759842 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_arc_traits_2.h @@ -29,6 +29,7 @@ #include +#include /*! \file * This file was developed at Inria, France, and copied over to the @@ -180,4 +181,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_CIRCULAR_KERNEL_CIRCULAR_ARC_TRAITS_H diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h index 42e816756bb..463588b9b1f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_circular_line_arc_traits_2.h @@ -29,6 +29,8 @@ #include +#include + /*! \file * This file was developed at Inria, France, and copied over to the @@ -620,4 +622,6 @@ namespace CGAL { } // namespace CGAL +#include + #endif // CGAL_CIRCULAR_KERNEL_VARIANT_TRAITS_H 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 15375234466..69e7e29b755 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 @@ -25,6 +25,7 @@ #include +#include /*! \file * The conic traits-class for the arrangement package. @@ -875,5 +876,7 @@ public: //@} }; +#include + } //namespace CGAL #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h index 021be56c98c..6f3c5cc106d 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_consolidated_curve_data_traits_2.h @@ -25,6 +25,7 @@ #include +#include /*! \file * Definition of the Arr_consolidated_curve_data_traits_2 class. @@ -99,4 +100,6 @@ public: } //namespace CGAL +#include + #endif 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 39a7d71acc2..1ca8328129a 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 @@ -24,6 +24,7 @@ #include +#include /*! \file * A counting traits-class for the arrangement package. @@ -1066,4 +1067,6 @@ Out_stream& operator<<(Out_stream& os, } //namespace CGAL +#include + #endif 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 b8b5ab5c530..73c2e53e6c2 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 @@ -24,6 +24,8 @@ #include +#include + /*! \file * Definition of the Arr_curve_data_traits_2<> class template. */ @@ -441,4 +443,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index 4a8ed9f327c..dd620de73e9 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -25,6 +25,7 @@ #include +#include /*! \file * The definition of the base DCEL class for planar arrangements and its @@ -1459,4 +1460,6 @@ protected: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h b/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h index f85574e4e04..6ff5b89a702 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_default_dcel.h @@ -25,6 +25,7 @@ #include +#include /*! \file * The definition of the Arr_default_dcel class. @@ -67,4 +68,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h b/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h index 15a73425737..03811b5f78b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_default_overlay_traits.h @@ -25,6 +25,8 @@ #include +#include + /*! \file * * Definition of default overlay-traits classes. @@ -91,4 +93,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h index 9432272dad4..89cf0732b4f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_directional_non_caching_segment_basic_traits_2.h @@ -23,6 +23,7 @@ #include +#include #include @@ -154,4 +155,6 @@ public: } +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_enums.h b/Arrangement_on_surface_2/include/CGAL/Arr_enums.h index 773ca21fb44..97d0eee0fc1 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_enums.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_enums.h @@ -25,6 +25,7 @@ #include +#include /*! \file * Definition of the enumeration types for the arrangement package. @@ -216,4 +217,6 @@ InputStream& operator>>( } //namespace CGAL +#include + #endif 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 418a3c22152..a2075678328 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_extended_dcel.h @@ -25,6 +25,7 @@ #include +#include /*! \file * The definition of the extended DCEL classes. @@ -285,4 +286,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h index 71c387c2874..82c0582372a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_face_index_map.h @@ -24,6 +24,7 @@ #include +#include /*! \file * Definition of the Arr_face_index_map class. @@ -278,4 +279,6 @@ unsigned int get (const CGAL::Arr_face_index_map& index_map, } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h index 7ea72a35bd3..c9eeead641f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_partition_traits_2.h @@ -25,6 +25,7 @@ #include +#include /*! \file * The partition traits class for geodesic arcs on the sphere enables @@ -616,4 +617,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_ARR_GEODESIC_ARC_ON_SPHERE_PARTITION_TRAITS_2_H 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 6587512b759..a1d2e8524fa 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 @@ -23,6 +23,7 @@ #include +#include // #define CGAL_FULL_X_MONOTONE_GEODESIC_ARC_ON_SPHERE_IS_SUPPORTED 1 @@ -3255,4 +3256,5 @@ operator>>(InputStream& is, } //namespace CGAL +#include #endif 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 c6cf7b83af1..6a38a2474b2 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 @@ -25,6 +25,7 @@ #include +#include /*! \file * Definition of the Arr_landmarks_point_location template. @@ -318,4 +319,6 @@ protected: // The member-function definitions can be found under: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h index 23db01a9417..4c198686042 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_line_arc_traits_2.h @@ -29,6 +29,7 @@ #include +#include /*! \file * This file was developed at Inria, France, and copied over to the @@ -128,4 +129,6 @@ public: } // namespace CGAL +#include + #endif // CGAL_CIRCULAR_KERNEL_LINE_ARC_TRAITS_H 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 ea1e037c97d..ecb5c98a70b 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 @@ -25,6 +25,7 @@ #include +#include /*! \file * The traits-class for handling linear objects (lines, rays and segments) @@ -2026,4 +2027,6 @@ InputStream& operator>> (InputStream& is, Arr_linear_object_2& lobj) } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h index d255763a603..f7b4b665bb3 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_naive_point_location.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -120,4 +121,6 @@ public: // The member-function definitions can be found under: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h index de5189f8fd4..6d6f1cd9304 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_non_caching_segment_basic_traits_2.h @@ -30,6 +30,7 @@ #include +#include /*! \file The basic non-caching segment traits-class for the arrangement * package. This traits class handles x-monotone non-intersecting segments. @@ -282,4 +283,6 @@ public: } //namespace CGAL +#include + #endif 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 a8f065fe852..8c0d0475475 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 @@ -25,6 +25,7 @@ #include +#include /*! \file The non-caching segment traits-class for the arrangement package. * This traits class handles general segments. It is a model of the @@ -433,4 +434,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h index 4ed7287903b..1f2492da4f0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_observer.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_observer.h @@ -24,6 +24,7 @@ #include +#include #include @@ -678,4 +679,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h index 0758ae41dd3..adc8a1c29ae 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_overlay_2.h @@ -25,6 +25,8 @@ #include +#include + /*! \file * * Definition of the global Arr_overlay_2() function. @@ -260,4 +262,6 @@ overlay(const Arrangement_on_surface_2& arr1 } // namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h b/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h index c0cf18c725b..48a440c78fa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_point_location_result.h @@ -23,6 +23,7 @@ #include +#include // The macro CGAL_ARR_POINT_LOCATION_VERSION controls which version of the // point location is used. Currently two values are supported: @@ -118,4 +119,6 @@ struct Arr_point_location_result { } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index b56f3e38d90..cb2b238c139 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -26,6 +26,7 @@ #include +#include /*! \file * The traits-class for the general piece-wise (polycurve) type of curves of the @@ -2728,4 +2729,6 @@ protected: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index 95773584a4e..34c7931e702 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -26,6 +26,7 @@ #include +#include /*! \file * The traits-class for the general piece-wise (polycurve) type of curves of the @@ -1188,4 +1189,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h index e366f2a44cc..50c2b365ea6 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polyline_traits_2.h @@ -27,6 +27,7 @@ #include +#include /*! \file * The traits-class for the linear piece-wiese(polyline) type of curves of the @@ -608,4 +609,6 @@ public: } // namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h index 4edc8804d8e..aac79dc26fa 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rational_function_traits_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -1315,5 +1316,6 @@ public: } //namespace CGAL { +#include #endif //CGAL_ARR_RATIONAL_ARC_TRAITS_D_1_H 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 cf7a478dc66..a2d3eab19c7 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 @@ -25,6 +25,7 @@ #include +#include /*! \file * The segment traits-class for the arrangement package. @@ -1175,5 +1176,6 @@ InputStream& operator>>(InputStream& is, Arr_segment_2& seg) } //namespace CGAL +#include #endif 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 416adc2d48a..b6dfc3ecc52 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 @@ -26,6 +26,7 @@ #include +#include /*! \file * Definition of the Arr_simple_point_location template. @@ -195,4 +196,6 @@ protected: // The member-function definitions can be found under: #include +#include + #endif 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 98829dd0fa3..2a0eac365ec 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 @@ -24,6 +24,8 @@ #include +#include + /*! \file * * The topology traits for great spherical arcs embedded on a sphere for the @@ -668,4 +670,6 @@ protected: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h index e255c02a6b9..972ba00c8fc 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_tags.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_tags.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -646,5 +647,7 @@ public: } // namespace CGAL +#include + #endif 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 afc4d0b3abe..8e6b69a3329 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 @@ -23,6 +23,7 @@ #include +#include /*! \file * A tracing traits-class for the arrangement package. @@ -1274,4 +1275,6 @@ OutputStream & operator<<(OutputStream & os, Comparison_result cr) } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h index f97bf34abfe..8fcd8f42684 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_trapezoid_ric_point_location.h @@ -25,6 +25,7 @@ #include +#include /*! \file * Definition of the Arr_trapezoid_ric_point_location template. @@ -426,4 +427,6 @@ protected: // The member-function definitions can be found under: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h index d96ab406150..6a606cdc2ae 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h @@ -23,6 +23,8 @@ #include +#include + /*! \file * Definition of the Arr_triangulation_point_location template. @@ -390,4 +392,6 @@ protected: // The member-function definitions can be found under: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h index ed4f703b667..20f3db2581b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_unb_planar_topology_traits_2.h @@ -25,6 +25,8 @@ #include +#include + /*! \file * * Definition of the Arr_unb_planar_topology_traits_2 class. @@ -594,4 +596,6 @@ protected: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h index 5f115dc3943..e2884d39996 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_vertex_index_map.h @@ -25,6 +25,8 @@ #include +#include + /*! \file * Definition of the Arr_vertex_index_map class. @@ -282,4 +284,6 @@ unsigned int get (const CGAL::Arr_vertex_index_map& index_map, } //namespace CGAL +#include + #endif 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 e242fcd6477..48c8201e8fd 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 @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -148,4 +150,6 @@ decompose(const Arrangement_on_surface_2& arr, } // namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h index c3b75ec548c..4f5ccf3f8eb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_walk_along_line_point_location.h @@ -26,6 +26,7 @@ #include +#include /*! \file * Definition of the Arr_walk_along_line_point_location template. @@ -206,4 +207,6 @@ protected: // The member-function definitions can be found under: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h index 5a986059879..2b266454b9b 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2.h @@ -25,6 +25,7 @@ #include +#include /*! \file * The header file for the Arrangement_2 class. @@ -255,4 +256,6 @@ protected: } //namespace CGAL +#include + #endif 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 357d4bc9064..5957bf5451e 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 @@ -31,6 +31,7 @@ #include +#include /*! \file * The header file for the Arrangement_on_surface_2 class. @@ -3010,4 +3011,5 @@ bool do_intersect(Arrangement_on_surface_2& arr, #include #include +#include #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h index 0a0544ea8fb..302288e0e21 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_with_history_2.h @@ -26,6 +26,7 @@ #include +#include /*! \file * The header file for the Arrangement_on_surface_with_history_2 class. @@ -995,4 +996,6 @@ overlay (const Arrangement_on_surface_with_history_2& // The function definitions can be found under: #include +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h index 7ae37721419..166f7ffc9ac 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_with_history_2.h @@ -24,6 +24,7 @@ #include +#include /*! \file * The header file for the Arrangement_with_history_2 class. @@ -274,4 +275,6 @@ protected: } //namespace CGAL +#include + #endif 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 aea27c8a9fa..c84efe2068c 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_zone_2.h @@ -26,6 +26,8 @@ #include +#include + /*! \file * Defintion of the Arrangement_zone_2 class. @@ -443,4 +445,6 @@ private: // The function definitions can be found under: #include +#include + #endif 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 30c0fe8a039..fdaaaa3016f 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 @@ -24,6 +24,8 @@ #include +#include + /*! \file * The number-type traits for CORE algebraic numbers. @@ -621,4 +623,6 @@ public: } //namespace CGAL +#include + #endif 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 1fdabf63dd4..0b0b88b5c59 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 @@ -25,6 +25,8 @@ #include +#include + /*! \file * Definition of the specialized boost::graph_traits class. @@ -610,4 +612,6 @@ edges (const CGAL::Arrangement_on_surface_2& arr) } //namespace CGAL +#include + #endif diff --git a/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h b/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h index a8927c3db2a..dd8a4f14226 100644 --- a/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h +++ b/Arrangement_on_surface_2/include/CGAL/graph_traits_Dual_Arrangement_2.h @@ -25,6 +25,7 @@ #include +#include /*! \file * Definition of the specialized Dual class, @@ -749,4 +750,6 @@ edges (const CGAL::Dual + #endif 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 b6958af15fa..765d810c4e0 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 @@ -14,6 +14,8 @@ #include "utils.h" #include "IO_base_test.h" +#include + /*! Construction test */ template class Construction_test : @@ -675,4 +677,6 @@ bool Construction_test::perform() return true; } +#include + #endif diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h index 7607747636b..7089f8c15d6 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/IO_base_test.h @@ -3,6 +3,7 @@ template class IO_base_test { + IO_base_test& operator=(const IO_base_test&); public: typedef GeomTraits_ Geom_traits; typedef typename Geom_traits::Point_2 Point_2; 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 bf4b8837a30..23926c2926d 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 @@ -17,6 +17,8 @@ #include #include +#include + #include "IO_test.h" /*! Point location test */ @@ -927,4 +929,6 @@ verify(Variants_vector objs[MAX_NUM_POINT_LOCATION_STRATEGIES], return result; } +#include + #endif 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 50a232dd127..0457ad0504f 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 @@ -52,6 +52,7 @@ template class Traits_base_test : public IO_test { + Traits_base_test& operator=(const Traits_base_test&); protected: typedef Geom_traits_T Traits; typedef IO_test Base; 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 6b1941d3134..b035ef73c33 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 @@ -24,6 +24,7 @@ template class Traits_test : public Traits_base_test { private: + Traits_test& operator=(const Traits_test&); typedef Geom_traits_T Traits; typedef Traits_base_test Base; typedef typename Base::Enum_type Enum_type; @@ -1456,7 +1457,7 @@ compare_x_at_limit_wrapper_imp(std::istringstream& str_stream, std::cout << "Test: compare_x_at_limit( "; CGAL::Comparison_result real_answer; - unsigned int id1, id2; + unsigned int id1 = 0, id2 = 0 ; // first argument must be a number (either a point or a xcurve) str_stream >> id1; std::pair next_input = diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp index 45e19e2b1f1..b3b5f39c226 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_rational_function_traits_2.cpp @@ -29,6 +29,7 @@ typedef Traits_2::Point_2 Point_2; template struct Cmp { + Cmp& operator=(const Cmp&); const Cmp_object& m_cmp_object; Cmp(const Cmp_object& cmp_object) : m_cmp_object(cmp_object) {} bool operator()(const Point_2& p1, const Point_2& p2) const diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h index 16120183fa6..6fe7467a20f 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/utils.h @@ -4,6 +4,8 @@ #include #include +#include + template class Point_compare { private: @@ -129,3 +131,5 @@ public: return (res == CGAL::SMALLER) ? true : false; } }; + +#include diff --git a/Polynomial/include/CGAL/Polynomial.h b/Polynomial/include/CGAL/Polynomial.h index f600d49b9d8..0d379d83b06 100644 --- a/Polynomial/include/CGAL/Polynomial.h +++ b/Polynomial/include/CGAL/Polynomial.h @@ -34,6 +34,8 @@ #ifndef CGAL_POLYNOMIAL_H #define CGAL_POLYNOMIAL_H +#include + #include #include #include @@ -71,6 +73,8 @@ #include #include +#include + #endif // CGAL_POLYNOMIAL_H // EOF diff --git a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h index d42e576c009..e4dd712abd6 100644 --- a/Polynomial/include/CGAL/Polynomial/Polynomial_type.h +++ b/Polynomial/include/CGAL/Polynomial/Polynomial_type.h @@ -1416,7 +1416,7 @@ namespace internal { inline static void swallow(std::istream &is, char d) { char c; - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); if (c != d) CGAL_error_msg( "input error: unexpected character in polynomial"); } } // namespace internal @@ -1435,7 +1435,7 @@ Polynomial Polynomial::input_ascii(std::istream &is) { internal::Creation_tag TAG; Polynomial p(TAG, degr+1); - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); do { if (c != '(') CGAL_error_msg( "input error: ( expected"); is >> CGAL::iformat(i); @@ -1445,7 +1445,7 @@ Polynomial Polynomial::input_ascii(std::istream &is) { internal::swallow(is, ','); is >> CGAL::iformat(p.coeff(i)); internal::swallow(is, ')'); - do c = is.get(); while (isspace(c)); + do is.get(c); while (isspace(c)); } while (c != ']'); p.reduce(); diff --git a/Polynomial/include/CGAL/Polynomial_traits_d.h b/Polynomial/include/CGAL/Polynomial_traits_d.h index 627fc69ef59..a6b83d024b2 100644 --- a/Polynomial/include/CGAL/Polynomial_traits_d.h +++ b/Polynomial/include/CGAL/Polynomial_traits_d.h @@ -24,6 +24,8 @@ #ifndef CGAL_POLYNOMIAL_TRAITS_D_H #define CGAL_POLYNOMIAL_TRAITS_D_H +#include + #include #include #include @@ -1714,4 +1716,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_POLYNOMIAL_TRAITS_D_H diff --git a/Polynomial/include/CGAL/Polynomial_type_generator.h b/Polynomial/include/CGAL/Polynomial_type_generator.h index b1963f46e3a..b3f40f66c2e 100644 --- a/Polynomial/include/CGAL/Polynomial_type_generator.h +++ b/Polynomial/include/CGAL/Polynomial_type_generator.h @@ -25,6 +25,8 @@ #ifndef CGAL_POLYNOMIAL_TYPE_GENERATOR_H #define CGAL_POLYNOMIAL_TYPE_GENERATOR_H +#include + #include namespace CGAL { @@ -43,4 +45,6 @@ struct Polynomial_type_generator{ typedef T Type; }; } //namespace CGAL +#include + #endif // CGAL_POLYNOMIAL_GENERATOR_H 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 ef2a717c128..6386ffeaab3 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 @@ -125,7 +125,7 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y) { m_point = point; - m_type = type; + m_type = static_cast(type); m_ps_x = static_cast(ps_x); m_ps_y = static_cast(ps_y); m_closed = 1; @@ -136,9 +136,9 @@ public: Arr_parameter_space ps_x, Arr_parameter_space ps_y) { - m_type = type; - m_ps_x = ps_x; - m_ps_y = ps_y; + m_type = static_cast(type); + m_ps_x = static_cast(ps_x); + m_ps_y = static_cast(ps_y); m_closed = 0; } From fb262e4c0322632288c29d09518979445409f51a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 18 Jan 2018 16:25:50 +0000 Subject: [PATCH 33/84] Boolean_set_operations_2 --- .../include/CGAL/Boolean_set_operations_2.h | 3 +++ .../include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h | 3 +++ .../CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h | 3 +++ .../CGAL/Boolean_set_operations_2/Gps_traits_adaptor.h | 3 +++ Boolean_set_operations_2/include/CGAL/General_polygon_2.h | 3 +++ Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h | 3 +++ .../include/CGAL/General_polygon_set_on_surface_2.h | 3 +++ .../include/CGAL/Gps_circle_segment_traits_2.h | 3 +++ Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h | 4 +++- Boolean_set_operations_2/include/CGAL/Gps_traits_2.h | 3 +++ Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h | 3 +++ Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h | 3 +++ Boolean_set_operations_2/include/CGAL/Polygon_set_2.h | 3 +++ Boolean_set_operations_2/include/CGAL/connect_holes.h | 3 +++ 14 files changed, 42 insertions(+), 1 deletion(-) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h index 15a622a5d96..f6c1c73e6c1 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2.h @@ -26,6 +26,7 @@ #include +#include #include #include @@ -1258,4 +1259,6 @@ Oriented_side oriented_side(const typename Polygon_::Point_2& p, } //namespace CGAL +#include + #endif 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 16bb78f79dd..ea427361897 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 @@ -25,6 +25,7 @@ #include +#include /*! \file * This class is the default \dcel{} class used by the General_polygon_set_2 @@ -156,4 +157,6 @@ public: } //namespace CGAL +#include + #endif 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 0e0107a9511..5da2a35fb2b 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 @@ -26,6 +26,7 @@ #include +#include #include #include @@ -1759,4 +1760,6 @@ protected: #include +#include + #endif // CGAL_GPS_ON_SURFACE_BASE_2_H 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 bce906b1cbe..f5d1cea1c65 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 @@ -23,6 +23,7 @@ #include +#include #include #include @@ -182,4 +183,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/General_polygon_2.h b/Boolean_set_operations_2/include/CGAL/General_polygon_2.h index 50fd84141a3..4ac01dad65d 100644 --- a/Boolean_set_operations_2/include/CGAL/General_polygon_2.h +++ b/Boolean_set_operations_2/include/CGAL/General_polygon_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -222,4 +223,6 @@ std::ostream } //namespace CGAL +#include + #endif 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 78bc9e3c160..33e3fa40552 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 @@ -24,6 +24,7 @@ #include +#include #include @@ -117,4 +118,6 @@ public: } //namespace CGAL +#include + #endif 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 c4508206048..052ca9ca55e 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 @@ -25,6 +25,7 @@ #include +#include #include #include @@ -150,4 +151,6 @@ private: } //namespace CGAL +#include + #endif // CGAL_GENERAL_POLYGON_SET_ON_SURFACE_2_H diff --git a/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h b/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h index c482e58f390..fa71a0e32d7 100644 --- a/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h +++ b/Boolean_set_operations_2/include/CGAL/Gps_circle_segment_traits_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -45,4 +46,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h b/Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h index 6330ad6cec7..7ad9abe1e39 100644 --- a/Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h +++ b/Boolean_set_operations_2/include/CGAL/Gps_segment_traits_2.h @@ -24,7 +24,7 @@ #include - +#include #include #include @@ -214,4 +214,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/Gps_traits_2.h b/Boolean_set_operations_2/include/CGAL/Gps_traits_2.h index 221c931116b..1628595432a 100644 --- a/Boolean_set_operations_2/include/CGAL/Gps_traits_2.h +++ b/Boolean_set_operations_2/include/CGAL/Gps_traits_2.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -176,4 +177,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h b/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h index 2cb4f9b18b2..5c34ac1f3c7 100644 --- a/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h +++ b/Boolean_set_operations_2/include/CGAL/IO/Dxf_bsop_reader.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -248,4 +249,6 @@ public: } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h b/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h index d42d41f3e19..05aa54fc61e 100644 --- a/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h +++ b/Boolean_set_operations_2/include/CGAL/IO/Gps_iostream.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -53,4 +54,6 @@ std::ostream & operator<< (std::ostream& os, } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h b/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h index e20033c966c..8a3d0d33cf8 100644 --- a/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h +++ b/Boolean_set_operations_2/include/CGAL/Polygon_set_2.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -252,4 +253,6 @@ private: } //namespace CGAL +#include + #endif diff --git a/Boolean_set_operations_2/include/CGAL/connect_holes.h b/Boolean_set_operations_2/include/CGAL/connect_holes.h index 3decbed8d30..1142884b2fb 100644 --- a/Boolean_set_operations_2/include/CGAL/connect_holes.h +++ b/Boolean_set_operations_2/include/CGAL/connect_holes.h @@ -24,6 +24,7 @@ #include +#include #include #include @@ -473,4 +474,6 @@ OutputIterator connect_holes(const Polygon_with_holes_2 + #endif From c3215b93312efb59f6e58fe894a4788b0e498f61 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 22 Jan 2018 12:36:14 +0100 Subject: [PATCH 34/84] Move graph_has_property from namespace boost to namespace CGAL and provide some doc for it. --- BGL/doc/BGL/Concepts/FaceGraph.h | 2 + BGL/doc/BGL/Concepts/HalfedgeGraph.h | 3 ++ .../CGAL/boost/graph/Face_filtered_graph.h | 14 +++--- .../graph/Graph_with_descriptor_with_graph.h | 6 +-- .../CGAL/boost/graph/copy_face_graph.h | 2 +- .../CGAL/boost/graph/named_params_helper.h | 4 +- BGL/include/CGAL/boost/graph/properties.h | 28 +++++++++--- .../CGAL/boost/graph/properties_OpenMesh.h | 44 +++++++++---------- .../CGAL/boost/graph/properties_Seam_mesh.h | 9 ++-- ...inear_cell_complex_for_combinatorial_map.h | 34 +++++++------- .../include/CGAL/Polyhedral_mesh_domain_3.h | 2 +- .../boost/graph/properties_Polyhedron_3.h | 23 +++++----- .../examples/Surface_mesh/sm_derivation.cpp | 8 ++-- .../boost/graph/properties_Surface_mesh.h | 37 ++++++++-------- 14 files changed, 120 insertions(+), 96 deletions(-) diff --git a/BGL/doc/BGL/Concepts/FaceGraph.h b/BGL/doc/BGL/Concepts/FaceGraph.h index 913b0ae8173..7f8b12a8b5a 100644 --- a/BGL/doc/BGL/Concepts/FaceGraph.h +++ b/BGL/doc/BGL/Concepts/FaceGraph.h @@ -8,6 +8,8 @@ maintain faces described by halfedges, to provide access from a face to an incident halfedge, and to provide access from a halfedge to its incident face. +A partial specialization must be provided for `CGAL::graph_has_property` +for each internal property map available. \cgalAssociatedTypesBegin \cgalAssociatedTypeBegin{boost::graph_traits::%face_descriptor} A face descriptor corresponds to a unique face in an abstract graph instance. diff --git a/BGL/doc/BGL/Concepts/HalfedgeGraph.h b/BGL/doc/BGL/Concepts/HalfedgeGraph.h index 19844256407..2bd40b8b631 100644 --- a/BGL/doc/BGL/Concepts/HalfedgeGraph.h +++ b/BGL/doc/BGL/Concepts/HalfedgeGraph.h @@ -15,6 +15,9 @@ in another cycle, namely the cycle of halfedges which are incident to the same vertex. We refer to \ref PkgBGLIterators for a description of iterators and circulators for these halfedge cycles. +A partial specialization must be provided for `CGAL::graph_has_property` +for each internal property map available. + \cgalAssociatedTypesBegin diff --git a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h index e634bd18184..49209ee69f2 100644 --- a/BGL/include/CGAL/boost/graph/Face_filtered_graph.h +++ b/BGL/include/CGAL/boost/graph/Face_filtered_graph.h @@ -1111,6 +1111,13 @@ put(PropertyTag ptag, const Face_filtered_graph& w, put(ptag, w.graph(), k, v); } +template +struct graph_has_property, PropertyTag> + : graph_has_property {}; }//end namespace CGAL namespace boost { @@ -1124,13 +1131,6 @@ struct property_map,Proper typedef typename boost::property_map::const_type const_type; }; -template -struct graph_has_property, PropertyTag> - : graph_has_property {}; //specializations for indices diff --git a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h index ab5f11f7bb8..487cddd775d 100644 --- a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h +++ b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h @@ -828,6 +828,9 @@ std::size_t hash_value(CGAL::Gwdwg_descriptor d) return hash_value(d.descriptor); } +template +struct graph_has_property, PropertyTag> + : graph_has_property {}; }//end namespace CGAL namespace boost { @@ -837,9 +840,6 @@ namespace boost { typedef CGAL::Graph_with_descriptor_with_graph_property_map::const_type> const_type; }; - template - struct graph_has_property, PropertyTag> - : graph_has_property {}; }// namespace boost diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index 0ee1381d688..2517d5ee982 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -269,7 +269,7 @@ void copy_face_graph(const SourceMesh& sm, TargetMesh& tm, #endif { internal::copy_face_graph(sm, tm, - boost::graph_has_property(), + CGAL::graph_has_property(), v2v, h2h, f2f, sm_vpm, tm_vpm); } diff --git a/BGL/include/CGAL/boost/graph/named_params_helper.h b/BGL/include/CGAL/boost/graph/named_params_helper.h index 110d2814184..027982c9015 100644 --- a/BGL/include/CGAL/boost/graph/named_params_helper.h +++ b/BGL/include/CGAL/boost/graph/named_params_helper.h @@ -46,7 +46,7 @@ namespace CGAL { class property_map_selector { public: - typedef typename boost::graph_has_property::type Has_internal_pmap; + typedef typename graph_has_property::type Has_internal_pmap; typedef typename boost::mpl::if_c< Has_internal_pmap::value , typename boost::property_map::type , typename boost::cgal_no_property::type @@ -149,7 +149,7 @@ namespace CGAL { typename NamedParametersVPM = NamedParametersGT > class GetGeomTraits { - typedef typename boost::graph_has_property::type + typedef typename CGAL::graph_has_property::type Has_internal_pmap; struct Fake_GT {};//to be used if there is no internal vertex_point_map in PolygonMesh diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index e6fff2e7f76..fbb88f9e517 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -31,7 +31,29 @@ #include #include - +namespace CGAL{ +/// \ingroup PkgBGLProperties +/// \brief graph_has_property is used to indicate if +/// a model of `HalfedgeGraph` or `FaceGraph` +/// has an internal property associated with the +/// given `PropertyTag`. +/// +/// It inherits from `CGAL::Tag_true` if there is a +/// default internal property map for the +/// corresponding property tag or from +/// CGAL::Tag_false otherwise. +/// +/// \tparam Graph a model of `HalfedgeGraph` or `FaceGraph` +/// \tparam PropertyTag the type of a property tag +/// referring to the property of interest. +/// +template +struct graph_has_property +#ifndef DOXYGEN_RUNNING + : CGAL::Tag_false +#endif +{}; +} /// Boost Namespace namespace boost { @@ -57,10 +79,6 @@ enum halfedge_external_index_t { halfedge_external_index } ; enum face_index_t { face_index }; enum face_external_index_t { face_external_index } ; - - -template -struct graph_has_property : CGAL::Tag_false {}; struct cgal_no_property { diff --git a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h index 9bb14c59d49..1df488dc0e7 100644 --- a/BGL/include/CGAL/boost/graph/properties_OpenMesh.h +++ b/BGL/include/CGAL/boost/graph/properties_OpenMesh.h @@ -245,8 +245,6 @@ public: private: const OpenMesh* sm_; }; - - } // CGAL #endif // CGAL_BOOST_GRAPH_PROPERTIES_OPENMESH_H @@ -326,28 +324,30 @@ struct property_map typedef CGAL::OM_point_pmap type; typedef type const_type; }; - -template -struct graph_has_property - : CGAL::Tag_true{}; -template -struct graph_has_property - : CGAL::Tag_true{}; -template -struct graph_has_property - : CGAL::Tag_true{}; -template -struct graph_has_property - : CGAL::Tag_true{}; -template -struct graph_has_property - : CGAL::Tag_true{}; -template -struct graph_has_property - : CGAL::Tag_true{}; - } // namespace boost +namespace CGAL{ + +template +struct graph_has_property + : CGAL::Tag_true{}; +template +struct graph_has_property + : CGAL::Tag_true{}; +template +struct graph_has_property + : CGAL::Tag_true{}; +template +struct graph_has_property + : CGAL::Tag_true{}; +template +struct graph_has_property + : CGAL::Tag_true{}; +template +struct graph_has_property + : CGAL::Tag_true{}; +} //end CGAL + namespace OpenMesh { diff --git a/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h b/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h index 56c0d47ea69..05c0251d362 100644 --- a/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h +++ b/BGL/include/CGAL/boost/graph/properties_Seam_mesh.h @@ -132,13 +132,12 @@ get(vertex_point_t, const Seam_mesh& sm) return Seam_mesh_point_map(sm, get(vertex_point, sm.mesh())); } -} // namespace CGAL - -namespace boost -{ template struct graph_has_property, CGAL::vertex_point_t> : CGAL::Tag_true {}; -} //boost +} // namespace CGAL + + + #endif // CGAL_PROPERTIES_SEAM_MESH_H diff --git a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h index d71817dffc6..2bbcb6c4a12 100644 --- a/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/boost/graph/properties_Linear_cell_complex_for_combinatorial_map.h @@ -366,7 +366,23 @@ get(boost::edge_weight_t, CGAL_LCC_TYPE & cmap) return typename boost::property_map:: type(cmap); } +template +struct graph_has_property: CGAL::Tag_true {}; +template +struct graph_has_property: CGAL::Tag_true {}; + +template +struct graph_has_property: CGAL::Tag_true {}; + +template +struct graph_has_property: CGAL::Tag_true {}; + +template +struct graph_has_property: CGAL::Tag_true {}; + +template +struct graph_has_property: CGAL::Tag_true {}; } // namespace CGAL namespace boost { @@ -390,24 +406,6 @@ struct property_map typedef typename map_gen::type type; typedef typename map_gen::const_type const_type; }; - - template - struct graph_has_property: CGAL::Tag_true {}; - - template - struct graph_has_property: CGAL::Tag_true {}; - - template - struct graph_has_property: CGAL::Tag_true {}; - - template - struct graph_has_property: CGAL::Tag_true {}; - - template - struct graph_has_property: CGAL::Tag_true {}; - - template - struct graph_has_property: CGAL::Tag_true {}; } // namespace boost diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h index 86e634162e3..e4c8466a5db 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_3.h @@ -135,7 +135,7 @@ struct IGT_generator namespace internal { namespace Mesh_3 { template ::value> class Get_face_index_pmap { public: diff --git a/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h b/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h index 980e28149dc..c46e98b8a90 100644 --- a/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/Polyhedron/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -474,25 +474,29 @@ struct vertex_property_type > typedef CGAL::vertex_point_t type; }; + +} // namespace boost + +namespace CGAL{ template -struct graph_has_property, vertex_point_t> +struct graph_has_property, boost::vertex_point_t> : CGAL::Tag_true {}; template -struct graph_has_property, edge_weight_t> +struct graph_has_property, boost::edge_weight_t> : CGAL::Tag_true {}; template -struct graph_has_property, edge_index_t> +struct graph_has_property, boost::edge_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< - typename graph_traits >::edge_descriptor + typename boost::graph_traits >::edge_descriptor >::value > {}; template -struct graph_has_property, face_index_t> +struct graph_has_property, boost::face_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< typename CGAL::Polyhedron_3::Facet @@ -501,7 +505,7 @@ struct graph_has_property, face_index_t> {}; template -struct graph_has_property, halfedge_index_t> +struct graph_has_property, boost::halfedge_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< typename CGAL::Polyhedron_3::Halfedge @@ -510,17 +514,14 @@ struct graph_has_property, halfedge_index_t> {}; template -struct graph_has_property, vertex_index_t> +struct graph_has_property, boost::vertex_index_t> : CGAL::Boolean_tag< CGAL::internal::Has_member_id< typename CGAL::Polyhedron_3::Vertex >::value > {}; - -} // namespace boost - - +}// end CGAL #undef CGAL_HDS_PARAM_ #endif // CGAL_BOOST_GRAPH_PROPERTIES_POLYHEDRON_3_H diff --git a/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp b/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp index ae015517285..9db1bd77c80 100644 --- a/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp +++ b/Surface_mesh/examples/Surface_mesh/sm_derivation.cpp @@ -29,12 +29,14 @@ namespace boost { : public boost::property_map {}; +} + +namespace CGAL{ template struct graph_has_property - : public boost::graph_has_property + : public CGAL::graph_has_property {}; -}; - +} int main() { diff --git a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h index 9005c2f92d6..2b7a61aca24 100644 --- a/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h +++ b/Surface_mesh/include/CGAL/boost/graph/properties_Surface_mesh.h @@ -284,28 +284,29 @@ put(CGAL::vertex_point_t p, const CGAL::Surface_mesh& g, prop[x] = point; } +template +struct graph_has_property, boost::vertex_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::edge_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::halfedge_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::face_index_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, CGAL::vertex_point_t> + : CGAL::Tag_true {}; +template +struct graph_has_property, boost::edge_weight_t> + : CGAL::Tag_true {}; } // CGAL namespace boost { - template - struct graph_has_property, vertex_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, edge_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, halfedge_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, face_index_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, CGAL::vertex_point_t> - : CGAL::Tag_true {}; - template - struct graph_has_property, edge_weight_t> - : CGAL::Tag_true {}; + template From 960025fb1791cc1701e4d04217bd25568b3f595a Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 22 Jan 2018 13:37:15 +0100 Subject: [PATCH 35/84] Replace or by and --- BGL/include/CGAL/boost/graph/properties.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/properties.h b/BGL/include/CGAL/boost/graph/properties.h index fbb88f9e517..235eb04a74b 100644 --- a/BGL/include/CGAL/boost/graph/properties.h +++ b/BGL/include/CGAL/boost/graph/properties.h @@ -40,8 +40,8 @@ namespace CGAL{ /// /// It inherits from `CGAL::Tag_true` if there is a /// default internal property map for the -/// corresponding property tag or from -/// CGAL::Tag_false otherwise. +/// corresponding property tag and from +/// `CGAL::Tag_false` otherwise. /// /// \tparam Graph a model of `HalfedgeGraph` or `FaceGraph` /// \tparam PropertyTag the type of a property tag From 6438ade98a755d399e5c2c43cd91fd495c5daedb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 23 Jan 2018 09:38:03 +0000 Subject: [PATCH 36/84] fixes after the first testsuite --- .../CGAL/internal/Static_filters/Angle_3.h | 6 +++--- .../internal/Static_filters/Do_intersect_3.h | 4 ++-- NewKernel_d/test/NewKernel_d/Epick_d.cpp | 5 +++++ .../include/CGAL/Surface_mesh/Surface_mesh.h | 16 ++++++++-------- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h index 94635eef798..0356aaa89f9 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h @@ -154,11 +154,11 @@ public: std::cerr << "\n" << "Now for underflow/overflows...\n" << " min_double/eps = " - << std::numeric_limits::min() / err << std::endl + << (std::numeric_limits::min)() / err << std::endl << " sqrt(min_double/eps) = " - << CGAL::sqrt(std::numeric_limits::min() / err) << std::endl + << CGAL::sqrt((std::numeric_limits::min)() / err) << std::endl << " sqrt(max_double/3) = " - << CGAL::sqrt(std::numeric_limits::max() / 3) << std::endl; + << CGAL::sqrt((std::numeric_limits::max)() / 3) << std::endl; return err; } diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h index f78794de661..5f51183e530 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h @@ -319,9 +319,9 @@ public: std::cerr << "\n" << "Now for underflow/overflows...\n" << " min_double/eps = " - << std::numeric_limits::min() / err << std::endl + << (std::numeric_limits::min)() / err << std::endl << " sqrt(min_double/eps) = " - << CGAL::sqrt(std::numeric_limits::min() / err) << std::endl; + << CGAL::sqrt((std::numeric_limits::min)() / err) << std::endl; return err; } diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index 3e8b3547d18..55aa6624adc 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -413,8 +413,11 @@ void test2(){ D un10; CGAL_USE(un10); } +#if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable: 4512) +#endif + template struct Construct_point3_helper { CP const& cp; Construct_point3_helper(CP const& x) : cp(x) {} @@ -430,7 +433,9 @@ template struct Construct_point3_helper { } }; +#if defined(BOOST_MSVC) # pragma warning(pop) +#endif template void test3(){ diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index ad72f2cb838..7f5bff4e5dc 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -79,10 +79,10 @@ namespace CGAL { /// Get the underlying index of this index operator size_type() const { return idx_; } - /// reset index to be invalid (index=(std::numeric_limits::max)()) + /// reset index to be invalid (index=std::numeric_limits::max()) void reset() { idx_=(std::numeric_limits::max)(); } - /// return whether the index is valid, i.e., the index is not equal to (std::numeric_limits::max)(). + /// return whether the index is valid, i.e., the index is not equal to std::numeric_limits::max(). bool is_valid() const { size_type inf = (std::numeric_limits::max)(); return idx_ != inf; @@ -214,10 +214,10 @@ namespace CGAL { // returns the underlying index of this index. operator size_type() const { return (size_type)halfedge_ / 2; } - // resets index to be invalid (index=(std::numeric_limits::max)()) + // resets index to be invalid (index=std::numeric_limits::max()) void reset() { halfedge_.reset(); } - // returns whether the index is valid, i.e., the index is not equal to (std::numeric_limits::max)(). + // returns whether the index is valid, i.e., the index is not equal to std::numeric_limits::max(). bool is_valid() const { return halfedge_.is_valid(); } // Are two indices equal? @@ -1894,23 +1894,23 @@ private: //--------------------------------------------------- property handling /// \name Null Elements ///@{ - /// returns `Vertex_index((std::numeric_limits::max)())`. + /// returns `Vertex_index(std::numeric_limits::max())`. static Vertex_index null_vertex() { return vertex_index((std::numeric_limits::max)()); } - /// returns `Edge_index((std::numeric_limits::max)())`. + /// returns `Edge_index(std::numeric_limits::max())`. static Edge_index null_edge() { return edge_index((std::numeric_limits::max)()); } - /// returns `Halfedge_index((std::numeric_limits::max)())`. + /// returns `Halfedge_index(std::numeric_limits::max())`. static Halfedge_index null_halfedge() { return halfedge_index((std::numeric_limits::max)()); } - /// returns `Face_index((std::numeric_limits::max)())`. + /// returns `Face_index(std::numeric_limits::max())`. static Face_index null_face() { return face_index((std::numeric_limits::max)()); From 94c162d24988020bc34c4299325b6f3013a4c09e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 08:19:28 +0000 Subject: [PATCH 37/84] fix types --- .../examples/Cone_spanners_2/dijkstra_theta.cpp | 2 +- Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp | 2 +- Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp | 2 +- Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp | 2 +- Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp | 2 +- Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp | 2 +- Envelope_3/include/CGAL/Env_sphere_traits_3.h | 8 ++++---- Envelope_3/test/Envelope_3/Envelope_test_3.h | 2 +- .../include/CGAL/Polynomial/CORE_Expr_root_stack.h | 6 ++++++ .../include/CGAL/Polynomial/CORE_kernel.h | 6 ++++++ .../include/CGAL/Polynomial/Fixed_polynomial.h | 6 ++++++ .../include/CGAL/Polynomial/Interval_polynomial.h | 6 ++++++ Kinetic_data_structures/include/CGAL/Polynomial/Kernel.h | 6 ++++++ .../include/CGAL/Polynomial/Numeric_root_stack.h | 6 ++++++ .../include/CGAL/Polynomial/Polynomial.h | 6 ++++++ .../include/CGAL/Polynomial/Root_stack_default_traits.h | 5 +++++ .../include/CGAL/Polynomial/Sturm_root_stack.h | 5 +++++ .../include/CGAL/Polynomial/Sturm_root_stack_traits.h | 5 +++++ Kinetic_data_structures/include/CGAL/Polynomial/basic.h | 4 ++++ .../Polynomial/internal/Rational/Rational_traits_base.h | 5 +++++ .../include/CGAL/Polynomial/internal/numeric_solvers.h | 5 +++++ .../include/CGAL/Polynomial/polynomial_converters.h | 5 +++++ .../test/Polynomial_kernel/include/Check_solver.h | 2 +- .../test/Polynomial_kernel/numeric_solvers.cpp | 2 ++ Number_types/test/Number_types/ioformat.cpp | 2 +- .../test/Surface_mesh_shortest_path/TestMesh.cpp | 4 ++-- Surface_sweep_2/test/Surface_sweep_2/test_sweep_conic.cpp | 4 ++-- 27 files changed, 95 insertions(+), 17 deletions(-) diff --git a/Cone_spanners_2/examples/Cone_spanners_2/dijkstra_theta.cpp b/Cone_spanners_2/examples/Cone_spanners_2/dijkstra_theta.cpp index 8594f3751af..da7a8678009 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/dijkstra_theta.cpp +++ b/Cone_spanners_2/examples/Cone_spanners_2/dijkstra_theta.cpp @@ -83,7 +83,7 @@ int main(int argc, char ** argv) } // calculating the distances from v0 to other vertices - unsigned int n = num_vertices(g); + boost::graph_traits::vertices_size_type n = num_vertices(g); // vector for storing the results std::vector distances(n); // Calling the Dijkstra's algorithm implementation from boost. 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 a2e1041018b..37d6ce0bf77 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp +++ b/Cone_spanners_2/examples/Cone_spanners_2/theta_io.cpp @@ -70,7 +70,7 @@ int main(int argc, char ** argv) theta(input_begin, input_end, g); // obtain the number of vertices in the constructed graph - unsigned int n = boost::num_vertices(g); + 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); CGAL::gnuplot_output_2(g, file_prefix); 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 818c7e05245..e40d29c401b 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/theta_exact.cpp @@ -72,7 +72,7 @@ int main(int argc, char ** argv) theta(input_begin, input_end, g); // obtain the number of vertices in the constructed graph - unsigned int n = boost::num_vertices(g); + 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); CGAL::gnuplot_output_2(g, file_prefix); 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 2a8c36f8400..4d305d0fb30 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/theta_inexact.cpp @@ -69,7 +69,7 @@ int main(int argc, char ** argv) theta(input_begin, input_end, g); // obtain the number of vertices in the constructed graph - unsigned int n = boost::num_vertices(g); + 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); CGAL::gnuplot_output_2(g, file_prefix); 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 677393bce81..9b6c3668777 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/yao_exact.cpp @@ -69,7 +69,7 @@ int main(int argc, char ** argv) yao(input_begin, input_end, g); // obtain the number of vertices in the constructed graph - unsigned int n = boost::num_vertices(g); + 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); 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 5fe8c7ace7a..8f6221935ed 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp +++ b/Cone_spanners_2/test/Cone_spanners_2/yao_inexact.cpp @@ -69,7 +69,7 @@ int main(int argc, char ** argv) yao(input_begin, input_end, g); // obtain the number of vertices in the constructed graph - unsigned int n = boost::num_vertices(g); + 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); diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index 4e46d70ea77..28e5c6795e7 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -246,7 +246,7 @@ public: Algebraic ys[2]; Algebraic *ys_end; - int n_ys; + std::ptrdiff_t n_ys; ys_end = nt_traits.solve_quadratic_equation(A, B, C, ys); n_ys = ys_end - ys; @@ -327,7 +327,7 @@ public: Algebraic xs[2]; Algebraic *xs_end; - int n_xs; + std::ptrdiff_t n_xs; xs_end = nt_traits.solve_quadratic_equation(D, E, F, xs); n_xs = xs_end - xs; @@ -513,7 +513,7 @@ public: // with the conic // R*x^2 + S*y^2 + T*xy + U*x + V*y + W = 0 Alg_point_2 source, target, pmid; - int n_inter_points; + std::ptrdiff_t n_inter_points; if (CGAL_NTS compare(lb, zero) != EQUAL) { // Find the x-coordinates of the intersection points of the conic @@ -1094,7 +1094,7 @@ public: Algebraic zs[2]; Algebraic *zs_end; - int n_zs; + std::ptrdiff_t n_zs; Nt_traits nt_traits; zs_end = nt_traits.solve_quadratic_equation(A, B, C, zs); diff --git a/Envelope_3/test/Envelope_3/Envelope_test_3.h b/Envelope_3/test/Envelope_3/Envelope_test_3.h index 122961c0a88..95ed908b82d 100644 --- a/Envelope_3/test/Envelope_3/Envelope_test_3.h +++ b/Envelope_3/test/Envelope_3/Envelope_test_3.h @@ -114,7 +114,7 @@ public: Md_point_location pl(result); - int number_of_surfaces = surfaces.size(); + std::size_t number_of_surfaces = surfaces.size(); int j; std::list curves_col; std::list points_col; diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/CORE_Expr_root_stack.h b/Kinetic_data_structures/include/CGAL/Polynomial/CORE_Expr_root_stack.h index f5688ec7f0b..659ee9ba32c 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/CORE_Expr_root_stack.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/CORE_Expr_root_stack.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_CORE_SOLVER_H #define CGAL_POLYNOMIAL_CORE_SOLVER_H + +#include + #include #include #include @@ -266,4 +269,7 @@ inline std::ostream &operator<<(std::ostream &out, const CORE_Expr_root_stack &o } } } //namespace CGAL::POLYNOMIAL; + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/CORE_kernel.h b/Kinetic_data_structures/include/CGAL/Polynomial/CORE_kernel.h index d23b81b3a00..9cfc33f89fd 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/CORE_kernel.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/CORE_kernel.h @@ -20,6 +20,9 @@ #ifndef CGAL_POLYNOMIAL_POLYNOMIAL_CORE_KERNEL_H #define CGAL_POLYNOMIAL_POLYNOMIAL_CORE_KERNEL_H + +#include + #include #include #include @@ -44,4 +47,7 @@ public: }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Fixed_polynomial.h b/Kinetic_data_structures/include/CGAL/Polynomial/Fixed_polynomial.h index d8d037a7ad4..01c9755ad7b 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Fixed_polynomial.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Fixed_polynomial.h @@ -21,6 +21,9 @@ #ifndef CGAL_FIXED_POLYNOMIAL_POLYNOMIAL_H_ #define CGAL_FIXED_POLYNOMIAL_POLYNOMIAL_H_ + +#include + #include @@ -72,4 +75,7 @@ public: }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Interval_polynomial.h b/Kinetic_data_structures/include/CGAL/Polynomial/Interval_polynomial.h index 3c4a84a9efd..cc0d006719f 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Interval_polynomial.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Interval_polynomial.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_INTERVAL_POLYNOMIAL_H #define CGAL_POLYNOMIAL_INTERVAL_POLYNOMIAL_H + +#include + #include #include #include @@ -85,4 +88,7 @@ inline std::ostream &operator<<(std::ostream &out, const Interval_polynomial& ip } } //namespace CGAL::POLYNOMIAL + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Kernel.h b/Kinetic_data_structures/include/CGAL/Polynomial/Kernel.h index 7e8656584d7..200a0028d32 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Kernel.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Kernel.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_POLYNOMIAL_KERNEL_H #define CGAL_POLYNOMIAL_POLYNOMIAL_KERNEL_H + +#include + #include #include @@ -197,4 +200,7 @@ protected: }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Numeric_root_stack.h b/Kinetic_data_structures/include/CGAL/Polynomial/Numeric_root_stack.h index 33e50ce7e50..5363f263c16 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Numeric_root_stack.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Numeric_root_stack.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_NUMERIC_ROOT_STACK_H #define CGAL_POLYNOMIAL_NUMERIC_ROOT_STACK_H + +#include + #include #include #include @@ -148,4 +151,7 @@ protected: }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Polynomial.h b/Kinetic_data_structures/include/CGAL/Polynomial/Polynomial.h index d9c47c76c36..1daff547a21 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Polynomial.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Polynomial.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_POLYNOMIAL_H_ #define CGAL_POLYNOMIAL_POLYNOMIAL_H_ + +#include + #include #include @@ -134,4 +137,7 @@ class Polynomial: public internal::Polynomial_impl, NTT> }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Root_stack_default_traits.h b/Kinetic_data_structures/include/CGAL/Polynomial/Root_stack_default_traits.h index 78d5a776e41..baba70c82fe 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Root_stack_default_traits.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Root_stack_default_traits.h @@ -22,6 +22,8 @@ #ifndef CGAL_POLYNOMIAL_ROOT_ENUMERATOR_DEFAULT_TRAITS_H #define CGAL_POLYNOMIAL_ROOT_ENUMERATOR_DEFAULT_TRAITS_H +#include + #include #include @@ -37,4 +39,7 @@ class Root_stack_default_traits: public internal::Root_stack_traits_base + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack.h b/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack.h index b1b9d1c5a2e..611671b1ab0 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack.h @@ -22,6 +22,8 @@ #ifndef CGAL_STURM_LAZY_SOLVER_H #define CGAL_STURM_LAZY_SOLVER_H +#include + #include #include #include @@ -392,4 +394,7 @@ std::ostream& operator<<(std::ostream& os, } } //namespace CGAL::POLYNOMIAL + +#include + #endif // CGAL_STURM_LAZY_SOLVER_H diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack_traits.h b/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack_traits.h index 719cb903d38..74a9a835e34 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack_traits.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/Sturm_root_stack_traits.h @@ -22,6 +22,8 @@ #ifndef CGAL_POLYNOMIAL_STURM_ROOT_ENUMERATOR_TRAITS_H #define CGAL_POLYNOMIAL_STURM_ROOT_ENUMERATOR_TRAITS_H +#include + #include #include #include @@ -75,4 +77,7 @@ public: }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif // CGAL_POLYNOMIAL_STURM_ROOT_ENUMERATOR_TRAITS_H diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/basic.h b/Kinetic_data_structures/include/CGAL/Polynomial/basic.h index 224bf5a29c6..e81977b6419 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/basic.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/basic.h @@ -22,6 +22,8 @@ #ifndef CGAL_POLYNOMIAL_BASIC_H #define CGAL_POLYNOMIAL_BASIC_H +#include + #include #include #include @@ -206,4 +208,6 @@ struct Bezier_tag {}; #include +#include + #endif // CGAL_POLYNOMIAL_BASIC_H diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h index 9fea69d7036..ebc22102e77 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Rational/Rational_traits_base.h @@ -22,6 +22,8 @@ #ifndef CGAL_POLYNOMIAL_INTERNAL_RATIONAL_TRAITS_BASE_H #define CGAL_POLYNOMIAL_INTERNAL_RATIONAL_TRAITS_BASE_H +#include + #include #include @@ -215,4 +217,7 @@ struct Rational_traits_base }; } } } //namespace CGAL::POLYNOMIAL::internal + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers.h index a33c1b11da1..a139143aa05 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/numeric_solvers.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_H #define CGAL_POLYNOMIAL_INTERNAL_NUMERIC_SOLVERS_H + +#include + #include #include @@ -116,4 +119,6 @@ struct Turkowski_cleaned_numeric_solver #include #endif // CGAL_HEADER_ONLY +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/polynomial_converters.h b/Kinetic_data_structures/include/CGAL/Polynomial/polynomial_converters.h index fc0f594730c..910f276b5ab 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/polynomial_converters.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/polynomial_converters.h @@ -22,6 +22,8 @@ #ifndef CGAL_POLYNOMIAL_CONVERTERS_H #define CGAL_POLYNOMIAL_CONVERTERS_H +#include + #include #include #include @@ -138,4 +140,7 @@ public: }; } } //namespace CGAL::POLYNOMIAL + +#include + #endif // CGAL_POLYNOMIAL_CONVERTER_H diff --git a/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h b/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h index af04e9d2041..6c63ec9f704 100644 --- a/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h +++ b/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h @@ -124,7 +124,7 @@ public: int mult=1; //if (ie) mult=2; for (int k=0; k #endif +#include + #include "Check_solver.h" bool verbose=true; typedef CGAL_POLYNOMIAL_NS::Polynomial Pd; diff --git a/Number_types/test/Number_types/ioformat.cpp b/Number_types/test/Number_types/ioformat.cpp index 5afccd7e582..5b43dce5545 100644 --- a/Number_types/test/Number_types/ioformat.cpp +++ b/Number_types/test/Number_types/ioformat.cpp @@ -48,7 +48,7 @@ void test_it(const char* N, int value) { std::cout << "\nTesting ioformat: " << N << " with " << value << std::endl; - NT tmp2(0), tmp1(value); + NT tmp2(0), tmp1 = static_cast(value); std::ostringstream os; os << ::CGAL::oformat(tmp1); diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp index 33d52e8fe4a..2edc30b901c 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/TestMesh.cpp @@ -269,7 +269,7 @@ void run_program_instance(po::variables_map& vm) if (vm.count("randomseed")) { - programInstance.randomizer = new CGAL::Random(vm["randomSeed"].as()); + programInstance.randomizer = new CGAL::Random(vm["randomSeed"].as()); } programInstance.debugMode = vm["debugmode"].as(); @@ -315,7 +315,7 @@ int main(int argc, char** argv) ("help,h", "Display help message") ("polyhedron,p", po::value(), "Polyhedron input file") ("debugmode,d", po::value()->default_value(false), "Enable debug output") - ("randomseed,r", po::value(), "Randomization seed value") + ("randomseed,r", po::value(), "Randomization seed value") ("trials,t", po::value()->default_value(1), "Number of trials to run") ("kernel,k", po::value()->default_value("epick"), "Kernel to use. One of \'ipick\', \'epick\', \'epeck\'") ; diff --git a/Surface_sweep_2/test/Surface_sweep_2/test_sweep_conic.cpp b/Surface_sweep_2/test/Surface_sweep_2/test_sweep_conic.cpp index f01da3d395c..f30cb92df10 100644 --- a/Surface_sweep_2/test/Surface_sweep_2/test_sweep_conic.cpp +++ b/Surface_sweep_2/test/Surface_sweep_2/test_sweep_conic.cpp @@ -208,7 +208,7 @@ int main (int argc, char** argv) PointList point_list_with_ends; CGAL::compute_intersection_points(curves.begin(), curves.end(), std::back_inserter(point_list_with_ends), true); - int point_count_with_ends_calculated = point_list_with_ends.size(); + std::size_t point_count_with_ends_calculated = point_list_with_ends.size(); // generate the string for the output std::stringstream out1; @@ -235,7 +235,7 @@ int main (int argc, char** argv) in_file.getline(buf, 1024); out2 << buf << "\n"; } - int point_count_with_ends_from_file = 0; + std::size_t point_count_with_ends_from_file = 0; in_file >> point_count_with_ends_from_file; in_file.close(); From dc2f37a4aed3304ee2c521766d191497486d2c32 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 08:59:20 +0000 Subject: [PATCH 38/84] disable/enable warnings --- .../include/CGAL/CORE_algebraic_number_traits.h | 2 +- .../CGAL/Classification/Sum_of_weighted_features_classifier.h | 4 ++-- Generator/include/CGAL/Combination_enumerator.h | 4 ++++ Generator/include/CGAL/Random_polygon_2_sweep.h | 4 ++++ Mesh_3/include/CGAL/exude_mesh_3.h | 3 +++ Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h | 2 ++ Mesh_3/include/CGAL/odt_optimize_mesh_3.h | 3 ++- Mesh_3/include/CGAL/perturb_mesh_3.h | 4 +++- Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h | 4 ++++ 9 files changed, 25 insertions(+), 5 deletions(-) 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 fdaaaa3016f..77f6e81d460 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 @@ -590,7 +590,7 @@ public: poly.getCoeff(1), poly.getCoeff(0), buffer); - unsigned int num_of_roots = std::distance(&buffer[0], end_buffer); + std::ptrdiff_t num_of_roots = std::distance(&buffer[0], end_buffer); for (i = 0; i < num_of_roots; ++i) { diff --git a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h index 99270a0bebd..4731b57d575 100644 --- a/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h +++ b/Classification/include/CGAL/Classification/Sum_of_weighted_features_classifier.h @@ -113,7 +113,7 @@ private: std::vector v; m_classifier (m_training_set[k], v); - float min = std::numeric_limits::max(); + float min = (std::numeric_limits::max)(); for(std::size_t l = 0; l < v.size(); ++ l) if (v[l] < min) { @@ -904,7 +904,7 @@ private: std::vector v; (*this) (training_sets[j][k], v); - float min = std::numeric_limits::max(); + float min = (std::numeric_limits::max)(); for(std::size_t l = 0; l < m_labels.size(); ++ l) if (v[l] < min) { diff --git a/Generator/include/CGAL/Combination_enumerator.h b/Generator/include/CGAL/Combination_enumerator.h index cd925117e47..7e40c7dd7e1 100644 --- a/Generator/include/CGAL/Combination_enumerator.h +++ b/Generator/include/CGAL/Combination_enumerator.h @@ -22,6 +22,8 @@ #ifndef CGAL_COMBINATION_ENUMERATOR_H #define CGAL_COMBINATION_ENUMERATOR_H +#include + #include #include @@ -136,4 +138,6 @@ public: } // end of namespace CGAL +#include + #endif // CGAL_COMBINATION_ENUMERATOR_H diff --git a/Generator/include/CGAL/Random_polygon_2_sweep.h b/Generator/include/CGAL/Random_polygon_2_sweep.h index 42ab45bcd6b..d1e25acae16 100644 --- a/Generator/include/CGAL/Random_polygon_2_sweep.h +++ b/Generator/include/CGAL/Random_polygon_2_sweep.h @@ -27,6 +27,8 @@ #ifndef CGAL_RANDOM_POLYGON_2_SWEEP_H #define CGAL_RANDOM_POLYGON_2_SWEEP_H +#include + #include #include #include @@ -582,4 +584,6 @@ void make_simple_polygon(Iterator points_begin, Iterator points_end, } // end of namespace CGAL +#include + #endif // CGAL_RANDOM_POLYGON_2_SWEEP_H diff --git a/Mesh_3/include/CGAL/exude_mesh_3.h b/Mesh_3/include/CGAL/exude_mesh_3.h index dcb07518d24..3c5c64053e8 100644 --- a/Mesh_3/include/CGAL/exude_mesh_3.h +++ b/Mesh_3/include/CGAL/exude_mesh_3.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -85,4 +86,6 @@ exude_mesh_3_impl(C3T3& c3t3, } //namespace CGAL +#include + #endif // CGAL_EXUDE_MESH_3_H diff --git a/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h b/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h index 5700ad2f18e..6c73d536ddb 100644 --- a/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h +++ b/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h @@ -28,6 +28,7 @@ #include +#include #include #include @@ -108,5 +109,6 @@ lloyd_optimize_mesh_3_impl(C3T3& c3t3, } // end namespace CGAL +#include #endif // CGAL_LLOYD_OPTIMIZE_MESH_3_H diff --git a/Mesh_3/include/CGAL/odt_optimize_mesh_3.h b/Mesh_3/include/CGAL/odt_optimize_mesh_3.h index da6088326ad..4a6c9a240f1 100644 --- a/Mesh_3/include/CGAL/odt_optimize_mesh_3.h +++ b/Mesh_3/include/CGAL/odt_optimize_mesh_3.h @@ -28,7 +28,7 @@ #include - +#include #include #include @@ -107,5 +107,6 @@ odt_optimize_mesh_3_impl(C3T3& c3t3, } // end namespace CGAL +#include #endif // CGAL_ODT_OPTIMIZE_MESH_3_H diff --git a/Mesh_3/include/CGAL/perturb_mesh_3.h b/Mesh_3/include/CGAL/perturb_mesh_3.h index 6b7c01f57f5..9d3b7540abf 100644 --- a/Mesh_3/include/CGAL/perturb_mesh_3.h +++ b/Mesh_3/include/CGAL/perturb_mesh_3.h @@ -28,7 +28,7 @@ #include - +#include #include #include @@ -134,4 +134,6 @@ perturb_mesh_3_impl(C3T3& c3t3, } //namespace CGAL +#include + #endif // CGAL_PERTURB_MESH_3_H diff --git a/Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h b/Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h index e4d9ef739ce..cbe9f1e3fe3 100644 --- a/Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h +++ b/Polygon/include/CGAL/Polygon_2/Polygon_2_simplicity.h @@ -26,6 +26,8 @@ #ifndef CGAL_POLYGON_2_SIMPLICITY_H #define CGAL_POLYGON_2_SIMPLICITY_H +#include + #include #include #include @@ -501,4 +503,6 @@ bool is_simple_polygon(Iterator points_begin, Iterator points_end, } // end of namespace CGAL +#include + #endif From 64d0c6f5636ecebd2fce20bac10732e2c78244ef Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 09:00:26 +0000 Subject: [PATCH 39/84] Removed a return statement in a test that I think should not be there as it ends the test prematurely --- Generator/test/Generator/generic_random_test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Generator/test/Generator/generic_random_test.cpp b/Generator/test/Generator/generic_random_test.cpp index 7245399694d..44936891b5c 100644 --- a/Generator/test/Generator/generic_random_test.cpp +++ b/Generator/test/Generator/generic_random_test.cpp @@ -163,7 +163,6 @@ int test_T2() return 0; } } - return 1; } return 1; From d37792b4e06412526521e068de3ce532997130e9 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 10:23:55 +0000 Subject: [PATCH 40/84] fix doc warning --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 7f5bff4e5dc..46f9b85b677 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -82,7 +82,7 @@ namespace CGAL { /// reset index to be invalid (index=std::numeric_limits::max()) void reset() { idx_=(std::numeric_limits::max)(); } - /// return whether the index is valid, i.e., the index is not equal to std::numeric_limits::max(). + /// return whether the index is valid, i.e., the index is not equal to `%std::numeric_limits::max()`. bool is_valid() const { size_type inf = (std::numeric_limits::max)(); return idx_ != inf; @@ -1894,23 +1894,23 @@ private: //--------------------------------------------------- property handling /// \name Null Elements ///@{ - /// returns `Vertex_index(std::numeric_limits::max())`. + /// returns `Vertex_index(std::numeric_limits::%max())`. static Vertex_index null_vertex() { return vertex_index((std::numeric_limits::max)()); } - /// returns `Edge_index(std::numeric_limits::max())`. + /// returns `Edge_index(std::numeric_limits::%max())`. static Edge_index null_edge() { return edge_index((std::numeric_limits::max)()); } - /// returns `Halfedge_index(std::numeric_limits::max())`. + /// returns `Halfedge_index(std::numeric_limits::%max())`. static Halfedge_index null_halfedge() { return halfedge_index((std::numeric_limits::max)()); } - /// returns `Face_index(std::numeric_limits::max())`. + /// returns `Face_index(std::numeric_limits::%max())`. static Face_index null_face() { return face_index((std::numeric_limits::max)()); From 4c2b278f04fcfea71e5c4f8ab8e79875539734f3 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 10:26:27 +0000 Subject: [PATCH 41/84] Algebraic_kernel_d --- .../Algebraic_curve_kernel_2.h | 4 +-- ...ebraic_real_quadratic_refinement_rep_bfi.h | 4 +++ .../Bitstream_coefficient_kernel_at_alpha.h | 3 ++ .../Algebraic_kernel_d/Bitstream_descartes.h | 3 ++ .../Bitstream_descartes_rndl_tree.h | 10 ++++-- .../Bitstream_descartes_rndl_tree_traits.h | 4 +++ .../Algebraic_kernel_d/Curve_analysis_2.h | 19 ++++-------- .../Curve_pair_analysis_2.h | 31 +++++++------------ .../Algebraic_kernel_d/Event_line_builder.h | 2 +- .../CGAL/Algebraic_kernel_d/LRU_hashed_map.h | 2 +- .../Real_embeddable_extension.h | 4 +-- .../Algebraic_kernel_d/Shear_controller.h | 4 +++ .../Algebraic_kernel_d/Status_line_CPA_1.h | 2 +- .../include/CGAL/Algebraic_kernel_d_1.h | 6 ++-- .../include/CGAL/Algebraic_kernel_d_2.h | 4 ++- .../CGAL/Algebraic_kernel_rs_gmpq_d_1.h | 4 +++ .../CGAL/Algebraic_kernel_rs_gmpz_d_1.h | 4 +++ .../algebraic_curve_kernel_2_tools.cpp | 8 ++--- 18 files changed, 69 insertions(+), 49 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index 20dca85baeb..426338080b1 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 @@ -549,7 +549,7 @@ public: typename std::vector< Algebraic_real_1>::iterator> it_pair = std::equal_range(roots.begin(),roots.end(),y); CGAL_assertion(std::distance(it_pair.first,it_pair.second)==1); - int index = std::distance(roots.begin(),it_pair.first); + int index = static_cast(std::distance(roots.begin(),it_pair.first)); int degree = CGAL::degree(y_pol); std::vector > coeffs; @@ -2504,7 +2504,7 @@ public: std::vector > roots; _m_kernel->solve_2_object()(f,g,std::back_inserter(roots)); - return roots.size(); + return static_cast(roots.size()); } protected: 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 5154aa7e4fd..9195a4178ff 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 @@ -28,6 +28,8 @@ #ifndef CGAL_ALGEBRAIC_REAL_QUADRATIC_REFINEMENT_REP_BFI_H #define CGAL_ALGEBRAIC_REAL_QUADRATIC_REFINEMENT_REP_BFI_H +#include + #include #include @@ -505,4 +507,6 @@ public: } //namespace CGAL +#include + #endif //CGAL_ALGEBRAIC_REAL_QUADRATIC_REFINEMENT_REP_H diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h index b0b03e58471..3435ded47b2 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_coefficient_kernel_at_alpha.h @@ -25,6 +25,8 @@ namespace CGAL { +#include + #include #include @@ -226,5 +228,6 @@ public: } //namespace CGAL +#include #endif // CGAL_BITSTREAM_COEFFICIENT_KERNEL_AT_ALPHA_H 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 bc2a1e2e513..82c163df867 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 @@ -24,6 +24,7 @@ #ifndef CGAL_GENERIC_DESCARTES #define CGAL_GENERIC_DESCARTES 1 +#include #include #include @@ -1454,4 +1455,6 @@ public: } // namespace CGAL +#include + #endif 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 e298879a6ac..1676471f913 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 @@ -31,6 +31,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_D_BITSTREAM_DESCARTES_RNDL_TREE_H #define CGAL_ALGEBRAIC_KERNEL_D_BITSTREAM_DESCARTES_RNDL_TREE_H +#include + #include #include #include @@ -1507,7 +1509,7 @@ long Fujiwara_root_bound_log( RandomAccessIterator first, RandomAccessIterator beyond, LowerBoundLog2Abs lblog2, UpperBoundLog2AbsApproximator ublog2apx ) { - int n = beyond - first - 1; // degree + std::ptrdiff_t n = beyond - first - 1; // degree if (n < 1) return 0; long lblog2_lcoeff = lblog2(*(beyond - 1)); @@ -1517,7 +1519,7 @@ long Fujiwara_root_bound_log( std::vector heap(n); // heap is built from pointers to them for (int i = 0; i < n; ++i) { QE& entry = entries[i]; - entry.n_minus_i = n - i; + entry.n_minus_i = static_cast(n - i); entry.is_tight = ublog2apx.initial_upper_bound( *(first + i), entry.ub_log2_qi, entry.is_certainly_zero ); @@ -1531,7 +1533,7 @@ long Fujiwara_root_bound_log( while (!heap[0]->is_tight) { std::pop_heap(heap.begin(), heap.end(), less); QE& popped = **(heap.end() - 1); - int i = n - popped.n_minus_i; + std::ptrdiff_t i = n - popped.n_minus_i; CGAL_assertion(i >= 0 && i < n); CGAL_assertion(&popped == &(entries[i])); popped.is_tight = ublog2apx.improve_upper_bound( @@ -1569,6 +1571,8 @@ long Fujiwara_root_bound_log( } //namespace CGAL +#include + #endif // CGAL_ALGEBRAIC_KERNEL_D_BITSTREAM_DESCARTES_RNDL_TREE_H // EOF diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h index 9dcd988d795..915e1ca83c5 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree_traits.h @@ -23,6 +23,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_D_BITSTREAM_DESCARTES_RNDL_TREE_TRAITS_H #define CGAL_ALGEBRAIC_KERNEL_D_BITSTREAM_DESCARTES_RNDL_TREE_TRAITS_H +#include + #include #include #include @@ -441,4 +443,6 @@ public: } //namespace CGAL +#include + #endif // CGAL_ALGEBRAIC_KERNEL_D_BITSTREAM_DESCARTES_RNDL_TREE_TRAITS_H 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 b1abf51e2fc..98255ec6077 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 @@ -24,6 +24,8 @@ #ifndef CGAL_ALGEBRAIC_CURVE_KERNEL_CURVE_ANALYSIS_2_ALCIX_H #define CGAL_ALGEBRAIC_CURVE_KERNEL_CURVE_ANALYSIS_2_ALCIX_H +#include + #include #include #include @@ -64,12 +66,6 @@ #endif -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4290) -#endif - - namespace CGAL { template(std::lower_bound( ::boost::make_transform_iterator(event_coordinates().begin(), xval), ::boost::make_transform_iterator(event_coordinates().end(), xval), x ) - ::boost::make_transform_iterator(event_coordinates().begin(), - xval); + xval)); is_event = (i < static_cast(event_coordinates().size()) && (event_coordinates()[i].val == x) ); } @@ -1523,7 +1519,7 @@ public: Principal_sturm_habicht_iterator principal_sturm_habicht_end() const { return boost::make_transform_iterator (boost::counting_iterator - (sturm_habicht_of_primitive().size()), + (static_cast(sturm_habicht_of_primitive().size())), Stha_functor(this)); } @@ -2548,9 +2544,6 @@ std::istream& operator>> ( } //namespace CGAL -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - +#include #endif // ALGEBRAIC_CURVE_2_H diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index b0a62fa534a..5e29ec59f1c 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -26,6 +26,8 @@ #ifndef CGAL_ACK_CURVE_PAIR_ANALYSIS_H #define CGAL_ACK_CURVE_PAIR_ANALYSIS_H 1 +#include + #include #include @@ -43,10 +45,7 @@ #include #include -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4290) -#endif + namespace CGAL { @@ -803,7 +802,7 @@ private: (typename Polynomial_traits_2::Swap() (sres,0,1),r); std::vector gcd_roots; kernel()->solve_1_object()(gcd,std::back_inserter(gcd_roots),false); - int m = gcd_roots.size(); + size_type m = static_cast(gcd_roots.size()); Slice_info slice_info = construct_slice_info(x); reduce_number_of_candidates_and_intersections_to @@ -999,9 +998,9 @@ public: void x_to_index(Algebraic_real_1 x, size_type& idx, bool& event) const { const std::vector& sl = event_x_coordinates(); - idx = std::lower_bound(sl.begin(), - sl.end(), - x) - sl.begin(); + idx = static_cast(std::lower_bound(sl.begin(), + sl.end(), + x) - sl.begin()); event = (idx < static_cast(sl.size()) && (sl[idx] == x)); } @@ -1123,15 +1122,13 @@ private: } Intersection_info_container& old_info_container = *(this->ptr()->intersection_info_container); - size_type n = old_info_container.size(); - CGAL_assertion(n == static_cast - ( new_info_container.size())); + std::size_t n = old_info_container.size(); + CGAL_assertion(n == new_info_container.size()); //iterate through the vector and update // (-1 stands for "multiplicity unknown") for(size_type i=0;i\ - (new_info_container[i].size())); + std::size_t m = old_info_container[i].size(); + CGAL_assertion(m == new_info_container[i].size()); for(size_type j=0;j #endif 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 045f799a4af..737a20bfd5a 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 @@ -340,7 +340,7 @@ protected: bool k_fixed=false; - int seq_size = std::distance(seq_begin,seq_end); + std::ptrdiff_t seq_size = std::distance(seq_begin,seq_end); typedef int VT; diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h index 297498fd647..cf52882511f 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h @@ -315,7 +315,7 @@ public: //! \brief default constructor LRU_hashed_map_with_kernel(Algebraic_kernel_with_analysis_2* kernel, - unsigned max_size = -1u) : + unsigned max_size = (std::numeric_limits::max)()) : Base(max_size), _m_kernel(kernel) { } 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 1f20e08d7d0..156c2121576 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 @@ -388,7 +388,7 @@ public: : public CGAL::unary_function< Gmpz, long > { long operator()( const Gmpz& x ) const { CGAL_precondition(!CGAL::is_zero(x)); - return mpz_sizeinbase(x.mpz(),2)-1; + return static_cast(mpz_sizeinbase(x.mpz(),2)-1); } }; @@ -396,7 +396,7 @@ public: : public CGAL::unary_function< Gmpz, long > { long operator()( const Gmpz& x ) const { long pos = mpz_scan1(x.mpz(),0); - long size = mpz_sizeinbase(x.mpz(),2); + long size = static_cast(mpz_sizeinbase(x.mpz(),2)); if (pos == size-1) return size-1; else diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h index 0037f3cf6d7..eacfea501ca 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h @@ -24,6 +24,8 @@ #ifndef CGAL_ACK_SHEAR_CONTROLLER #define CGAL_ACK_SHEAR_CONTROLLER 1 +#include + #include #include @@ -112,4 +114,6 @@ namespace CGAL { } // namespace internal } //namespace CGAL +#include + #endif // CGAL_ACK_SHEAR_CONTROLLER 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 449e6395e98..e618f97359e 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 @@ -258,7 +258,7 @@ public: * line component of the curve at the given x-coordinate. */ size_type number_of_events() const { - return this->ptr()->_m_arcs.size(); + return static_cast(this->ptr()->_m_arcs.size()); } 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 7df3d61c7d2..905b6d8eba2 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_1.h @@ -26,6 +26,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_D_1_H #define CGAL_ALGEBRAIC_KERNEL_D_1_H +#include + #ifndef CGAL_AK_ENABLE_DEPRECATED_INTERFACE #define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 0 #endif @@ -343,7 +345,7 @@ public: std::vector > roots; Solve_1()(p,std::back_inserter(roots)); - return roots.size(); + return static_cast(roots.size()); } }; @@ -671,6 +673,6 @@ class Algebraic_kernel_d_1 } //namespace CGAL - +#include #endif // CGAL_ALGEBRAIC_KERNEL_D_1_H diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_2.h index 7a49fce153a..f5dd94b1cd1 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d_2.h @@ -24,6 +24,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_D_2_H #define CGAL_ALGEBRAIC_KERNEL_D_2_H +#include + #include #include @@ -38,6 +40,6 @@ template class Algebraic_kernel_d_2 } //namespace CGAL - +#include #endif // CGAL_ALGEBRAIC_KERNEL_D_1_H diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h index a330d9b606c..67127829e92 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpq_d_1.h @@ -22,6 +22,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPQ_D_1 #define CGAL_ALGEBRAIC_KERNEL_RS_GMPQ_D_1 +#include + #include #include #include @@ -118,4 +120,6 @@ typedef CGAL::RS_AK1::Algebraic_kernel_z_1< } // namespace CGAL +#include + #endif // CGAL_ALGEBRAIC_KERNEL_RS_GMPQ_D_1 diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h index 9972f7aea22..51ccb5e3065 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_rs_gmpz_d_1.h @@ -22,6 +22,8 @@ #ifndef CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1 #define CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1 +#include + #include #include #include @@ -69,4 +71,6 @@ typedef CGAL::RS_AK1::Algebraic_kernel_1< } +#include + #endif // CGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1 diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.cpp index 028fe784268..cd3695355cc 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/algebraic_curve_kernel_2_tools.cpp @@ -46,7 +46,7 @@ void test_routine() { rr(p,std::back_inserter(v1),true); - int n = std::distance(v1.begin(),v1.end()); + std::ptrdiff_t n = std::distance(v1.begin(),v1.end()); assert(n==3); @@ -70,7 +70,7 @@ void test_routine() { rr2(p,std::back_inserter(v2),false); - int n = std::distance(v2.begin(), v2.end()); + std::ptrdiff_t n = std::distance(v2.begin(), v2.end()); assert(n==4); @@ -94,7 +94,7 @@ void test_routine() { rr1(p,std::back_inserter(v1),false); - int n = std::distance(v1.begin(), v1.end()); + std::ptrdiff_t n = std::distance(v1.begin(), v1.end()); assert(n==0); @@ -118,7 +118,7 @@ void test_routine() { rr2(p,std::back_inserter(v2),false); - int n = std::distance(v2.begin(), v2.end()); + std::ptrdiff_t n = std::distance(v2.begin(), v2.end()); assert(n==1); From 63ddadf63f6163c4097298a0a9653fe14dc5c677 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 11:24:22 +0000 Subject: [PATCH 42/84] Address Issue #2764 --- .../Algebraic_kernel_d/Shear_controller.h | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h index eacfea501ca..2e5334af942 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -54,15 +55,16 @@ namespace CGAL { //! Constructor, getting the maximal absolute value of the shear factor Shear_controller() - : m_max(InitialMax) + : + #if CGAL_ACK_STATIC_SEED + #warning Warning, uses static seed! + rng(0) +#else + rng() +#endif + , m_max(InitialMax) , pos_next_factor(0) { CGAL_assertion(m_max>=1); -#if CGAL_ACK_STATIC_SEED - #warning Warning, uses static seed! - srand(CGAL_ACK_STATIC_SEED); -#else - srand(time(NULL)); -#endif } //! Reports that the shear factor \c factor was bad. @@ -89,13 +91,15 @@ namespace CGAL { Int get_new_shear_factor() { CGAL_assertion(int(this->bad_shears.size())::max)())%m_max )+1); if(bad_shears.find(s)==bad_shears.end()) { return s; } } } + Random rng; + // Maximal absolute value Int m_max; From f25b6b9b52b9f7dbc0c7da51418b8988886f884a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 13:10:37 +0000 Subject: [PATCH 43/84] cast --- Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h index 9adcf57f50c..7557c405afb 100644 --- a/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h +++ b/Mesh_3/include/CGAL/Implicit_to_labeling_function_wrapper.h @@ -191,7 +191,7 @@ public: typename Bmask::size_type bit_index = 0; for (std::vector::const_iterator iter = mask.begin(), endIter = mask.end(); iter != endIter; ++iter) { - std::string::value_type character = *iter; + std::string::value_type character = static_cast(*iter); CGAL_assertion(character == POSITIVE || character == NEGATIVE); bmask[bit_index] = (character == POSITIVE); From 84d912dab60d8fb3526ce2aad36414748ecd4fc5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 13:46:47 +0000 Subject: [PATCH 44/84] fix initialization of Random --- .../include/CGAL/Algebraic_kernel_d/Shear_controller.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h index 2e5334af942..1c4c16fa68b 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Shear_controller.h @@ -56,9 +56,9 @@ namespace CGAL { //! Constructor, getting the maximal absolute value of the shear factor Shear_controller() : - #if CGAL_ACK_STATIC_SEED +#if CGAL_ACK_STATIC_SEED #warning Warning, uses static seed! - rng(0) + rng(CGAL_ACK_STATIC_SEED) #else rng() #endif From 4ef0bdbcb69b15b9d0c299a5d546d7ce111abca6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 24 Jan 2018 14:21:16 +0000 Subject: [PATCH 45/84] Suppress this warning not globally in disable_warnings.h --- Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h | 10 ++++++++- Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h | 3 +++ Mesh_3/include/CGAL/exude_mesh_3.h | 9 ++++++++ Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h | 8 +++++++ Mesh_3/include/CGAL/make_mesh_3.h | 13 ++++++++++- Mesh_3/include/CGAL/odt_optimize_mesh_3.h | 8 +++++++ Mesh_3/include/CGAL/perturb_mesh_3.h | 8 +++++++ Mesh_3/include/CGAL/refine_mesh_3.h | 22 +++++++++++++++++++ 8 files changed, 79 insertions(+), 2 deletions(-) diff --git a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h index e15e47bff85..48b1457c19f 100644 --- a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h +++ b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h @@ -47,7 +47,6 @@ #else # define BOOST_PARAMETER_MAX_ARITY 8 #endif - #include #include @@ -74,6 +73,11 @@ namespace CGAL { using namespace parameters; +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + BOOST_PARAMETER_FUNCTION( (Mesh_optimization_return_code), lloyd_optimize_mesh_2, @@ -100,6 +104,10 @@ namespace CGAL mark_); } +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + /** * this partial specialization is a workaround * to avoid compilation errors when seeds_begin and seeds_end are diff --git a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h index 74beb0bb64a..3fd6b3035d0 100644 --- a/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h +++ b/Mesh_3/include/CGAL/Mesh_3/tet_soup_to_c3t3.h @@ -28,6 +28,7 @@ #include +#include #include @@ -415,4 +416,6 @@ bool build_triangulation_from_file(std::istream& is, } // namespace CGAL +#include + #endif // CGAL_MESH_3_TET_SOUP_TO_C3T3_H diff --git a/Mesh_3/include/CGAL/exude_mesh_3.h b/Mesh_3/include/CGAL/exude_mesh_3.h index 3c5c64053e8..ba74aa72111 100644 --- a/Mesh_3/include/CGAL/exude_mesh_3.h +++ b/Mesh_3/include/CGAL/exude_mesh_3.h @@ -39,6 +39,11 @@ namespace CGAL { +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -59,6 +64,10 @@ BOOST_PARAMETER_FUNCTION( } CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + template diff --git a/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h b/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h index 6c73d536ddb..63ed1d0a73e 100644 --- a/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h +++ b/Mesh_3/include/CGAL/lloyd_optimize_mesh_3.h @@ -40,6 +40,11 @@ namespace CGAL { +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -65,6 +70,9 @@ BOOST_PARAMETER_FUNCTION( } CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif template diff --git a/Mesh_3/include/CGAL/make_mesh_3.h b/Mesh_3/include/CGAL/make_mesh_3.h index 4ab9b5ec5f1..f8830a0f7ec 100644 --- a/Mesh_3/include/CGAL/make_mesh_3.h +++ b/Mesh_3/include/CGAL/make_mesh_3.h @@ -119,7 +119,7 @@ namespace parameters { // ----------------------------------- // Parameters - // ----------------------------------- + // // see CGAL_PRAGMA_DIAG_PUSH @@ -129,6 +129,7 @@ CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS BOOST_PARAMETER_NAME( features_param ) CGAL_PRAGMA_DIAG_POP + } // end namespace parameters::internal @@ -395,6 +396,11 @@ C3T3 make_mesh_3(const MD& md, const MC& mc, const Arg1& a1, const Arg2& a2, } #endif + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif // see CGAL_PRAGMA_DIAG_PUSH @@ -428,6 +434,11 @@ BOOST_PARAMETER_FUNCTION( } CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + /** * @brief This function meshes the domain defined by mesh_traits * (respecting criteria), and outputs the mesh to c3t3 diff --git a/Mesh_3/include/CGAL/odt_optimize_mesh_3.h b/Mesh_3/include/CGAL/odt_optimize_mesh_3.h index 4a6c9a240f1..57b7181c850 100644 --- a/Mesh_3/include/CGAL/odt_optimize_mesh_3.h +++ b/Mesh_3/include/CGAL/odt_optimize_mesh_3.h @@ -39,6 +39,11 @@ #include namespace CGAL { + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif // see CGAL_PRAGMA_DIAG_PUSH @@ -65,6 +70,9 @@ BOOST_PARAMETER_FUNCTION( } CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif template Mesh_optimization_return_code diff --git a/Mesh_3/include/CGAL/perturb_mesh_3.h b/Mesh_3/include/CGAL/perturb_mesh_3.h index 9d3b7540abf..59291afe48e 100644 --- a/Mesh_3/include/CGAL/perturb_mesh_3.h +++ b/Mesh_3/include/CGAL/perturb_mesh_3.h @@ -41,6 +41,11 @@ namespace CGAL { +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -67,6 +72,9 @@ BOOST_PARAMETER_FUNCTION( } CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif template CGAL_PRAGMA_DIAG_PUSH // see @@ -399,12 +404,18 @@ CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + // ----------------------------------- // Reset_c3t3 (undocumented) // ----------------------------------- CGAL_MESH_BOOLEAN_PARAMETER(Reset,reset_c3t3,no_reset_c3t3) // CGAL_MESH_BOOLEAN_PARAMETER defined in + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -422,8 +433,16 @@ CGAL_MESH_3_IGNORE_BOOST_PARAMETER_NAME_WARNINGS BOOST_PARAMETER_NAME( manifold_options_param ) CGAL_PRAGMA_DIAG_POP + } // end namespace parameters + + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4003) // not enough actual parameters for macro +#endif + // see CGAL_PRAGMA_DIAG_PUSH // see @@ -463,6 +482,9 @@ BOOST_PARAMETER_FUNCTION( CGAL_PRAGMA_DIAG_POP +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif /** * @brief This function refines the mesh c3t3 wrt domain & criteria From 939da7ca04dc639b33c409b537afbd57311f8b16 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 25 Jan 2018 08:44:16 +0000 Subject: [PATCH 46/84] fixes after the testsuite --- .../CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h | 4 ++-- Envelope_3/test/Envelope_3/Envelope_test_3.h | 13 +++++++------ .../Kinetic_data_structures/Kinetic_sweepline.cpp | 2 +- .../include/CGAL/Kinetic/Active_objects_vector.h | 5 +++++ .../include/CGAL/Kinetic/Default_simulator.h | 6 ++++++ .../include/CGAL/Kinetic/Delaunay_triangulation_2.h | 11 ++++++++--- .../include/CGAL/Kinetic/Delaunay_triangulation_3.h | 11 +++-------- .../include/CGAL/Kinetic/Regular_triangulation_3.h | 11 ++++------- .../CGAL/Kinetic/Two_list_pointer_event_queue.h | 4 ++++ .../CGAL/Polynomial/internal/Polynomial_impl.h | 2 +- .../CGAL/Polynomial/internal/Simple_interval_root.h | 6 ++++++ .../Delaunay_triangulation_3.cpp | 2 ++ .../test/Kinetic_data_structures/numbers.cpp | 2 ++ .../test/Kinetic_data_structures/random_kds.cpp | 2 +- .../regular_triangulation_3.cpp | 2 ++ .../test_KDS_Delaunay_triangulation_2.cpp | 2 ++ .../test/Straight_skeleton_2/test_sls.cpp | 2 +- 17 files changed, 57 insertions(+), 30 deletions(-) diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index 5e29ec59f1c..6c9dfd4edca 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -1126,10 +1126,10 @@ private: CGAL_assertion(n == new_info_container.size()); //iterate through the vector and update // (-1 stands for "multiplicity unknown") - for(size_type i=0;i curves_col; std::list points_col; typename std::list::iterator boundary_it; - for(int i=0; i defined_surfaces; typename Traits::Is_defined_over is_defined_over = traits.is_defined_over_object(); - for(int i=0; ipoint(), surfaces[i])) defined_surfaces.push_back(surfaces[i]); @@ -224,7 +225,7 @@ public: Halfedge_handle hh = hi; // first we find the surfaces that are defined over the egde std::list defined_surfaces; - for(int i=0; i defined_surfaces; - for (int i=0; i #ifdef _MSC_VER -#pragma warning(disable:4355) // complaint about using 'this' to +#pragma warning(disable: 4127 4355) // complaint about using 'this' to // initialize a member #endif diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Active_objects_vector.h b/Kinetic_data_structures/include/CGAL/Kinetic/Active_objects_vector.h index 22e4a012a16..68964980df2 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Active_objects_vector.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Active_objects_vector.h @@ -21,6 +21,9 @@ #ifndef CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H #define CGAL_KINETIC_NOTIFYING_TABLE_BASE_3_H + +#include + #include #include #include @@ -374,4 +377,6 @@ inline std::istream &operator>>(std::istream &in, Active_objects_vector &v) { # pragma warning(pop) #endif +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Default_simulator.h b/Kinetic_data_structures/include/CGAL/Kinetic/Default_simulator.h index cf231095724..26dd5937127 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Default_simulator.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Default_simulator.h @@ -21,6 +21,9 @@ #ifndef CGAL_KINETIC_SIMULATOR_BASE_H_ #define CGAL_KINETIC_SIMULATOR_BASE_H_ + +#include + #include #include #include @@ -735,4 +738,7 @@ CGAL_OUTPUT2(Default_simulator) } } //namespace CGAL::Kinetic + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_2.h b/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_2.h index a93b572cdc4..21ec18d55d7 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_2.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_2.h @@ -23,6 +23,8 @@ #define CGAL_KINETIC_KINETIC_DELAUNAY_2_H #include +#include + #include #include #include @@ -528,7 +530,7 @@ public: if (!was_2d && del_.dimension()==2) { - vh->set_neighbors(del_.degree(vh)); + vh->set_neighbors(static_cast(del_.degree(vh))); has_certificates_=false; set_has_certificates(true, 0); } else if (del_.dimension() == 2) { @@ -570,7 +572,7 @@ public: } } } else { - vertex_handle(k)->set_neighbors(del_.degree(vh)); + vertex_handle(k)->set_neighbors(static_cast(del_.degree(vh))); } watcher_.post_insert_vertex(vh); //write(std::cout); @@ -804,7 +806,7 @@ protected: } void update_neighbors(Vertex_handle vh) { - unsigned int deg= del_.degree(vh); + unsigned int deg = static_cast(del_.degree(vh)); if (deg == vh->neighbors()) return; if (deg ==3) { vh->set_neighbors(3); @@ -1183,4 +1185,7 @@ void Delaunay_triangulation_2::audit() const } } } //namespace CGAL::Kinetic + +#include + #endif diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_3.h b/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_3.h index fdef390f198..4aa592f5b94 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_3.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Delaunay_triangulation_3.h @@ -22,6 +22,8 @@ #ifndef CGAL_KINETIC_KINETIC_DELAUNAY_3_H #define CGAL_KINETIC_KINETIC_DELAUNAY_3_H +#include + #include #include @@ -41,11 +43,6 @@ #include #include -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) // complaint about using 'this' to -#endif // initialize a member - namespace CGAL { namespace Kinetic { namespace internal { template @@ -222,8 +219,6 @@ public: } } //namespace CGAL::Kinetic -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif +#include #endif diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_3.h b/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_3.h index fa36554265a..5754c872488 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_3.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Regular_triangulation_3.h @@ -20,6 +20,9 @@ #ifndef CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H #define CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H + +#include + #include #include @@ -35,10 +38,6 @@ #include #include -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4355) // complaint about using 'this' to -#endif // initialize a member namespace CGAL { namespace Kinetic { namespace internal { @@ -1188,8 +1187,6 @@ std::ostream &operator<<(std::ostream &out, const Regular_triangulation_3 #endif // CGAL_KINETIC_KINETIC_REGULAR_TRIANGULATION_3_H diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Two_list_pointer_event_queue.h b/Kinetic_data_structures/include/CGAL/Kinetic/Two_list_pointer_event_queue.h index 6dcc0a098d5..e0d5207c321 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Two_list_pointer_event_queue.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Two_list_pointer_event_queue.h @@ -21,6 +21,9 @@ #ifndef CGAL_KINETIC_BIN_QUEUE_H #define CGAL_KINETIC_BIN_QUEUE_H + +#include + #include #include #include @@ -1021,6 +1024,7 @@ std::ostream &operator<<(std::ostream &out, const Two_list_pointer_event_queue } } //namespace CGAL::Kinetic #endif diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Polynomial_impl.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Polynomial_impl.h index 64b27dcc584..176fdb34b04 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Polynomial_impl.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Polynomial_impl.h @@ -388,7 +388,7 @@ public: coefs_[pow]=coef; //std::cout << "Read " << coefs_[pow] << std::endl; - char n= in.peek(); + char n= static_cast(in.peek()); if (n=='+' || n=='-') { pos= (n!='-'); char e; diff --git a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Simple_interval_root.h b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Simple_interval_root.h index f85edc3d910..6aa71e7bb4a 100644 --- a/Kinetic_data_structures/include/CGAL/Polynomial/internal/Simple_interval_root.h +++ b/Kinetic_data_structures/include/CGAL/Polynomial/internal/Simple_interval_root.h @@ -21,6 +21,9 @@ #ifndef CGAL_POLYNOMIAL_SIMPLE_INTERVAL_ROOT_H #define CGAL_POLYNOMIAL_SIMPLE_INTERVAL_ROOT_H + +#include + #include #include #include @@ -739,4 +742,7 @@ namespace std static const float_round_style round_stype = round_toward_zero; }; } + +#include + #endif diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3.cpp b/Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3.cpp index 1464fbe1446..241e28b87e7 100644 --- a/Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3.cpp +++ b/Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_3.cpp @@ -9,6 +9,8 @@ #include #include +#include + int main(int argc, char *argv[]) { diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/numbers.cpp b/Kinetic_data_structures/test/Kinetic_data_structures/numbers.cpp index 8f45d70146d..ec7e852f3ca 100644 --- a/Kinetic_data_structures/test/Kinetic_data_structures/numbers.cpp +++ b/Kinetic_data_structures/test/Kinetic_data_structures/numbers.cpp @@ -6,6 +6,8 @@ #include #include +#include + template void check_nt(NT v) { NT zero(0); diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/random_kds.cpp b/Kinetic_data_structures/test/Kinetic_data_structures/random_kds.cpp index 540c2ad81d3..369f3585e51 100644 --- a/Kinetic_data_structures/test/Kinetic_data_structures/random_kds.cpp +++ b/Kinetic_data_structures/test/Kinetic_data_structures/random_kds.cpp @@ -22,7 +22,7 @@ P rp(CGAL::Random &rand, int deg) { int main(int, char *[]) { - CGAL::Random r(time(NULL)); + CGAL::Random r; int which = r.get_int(0,4); double nump= r.get_int(25,50); diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/regular_triangulation_3.cpp b/Kinetic_data_structures/test/Kinetic_data_structures/regular_triangulation_3.cpp index 583e82e7139..d37715118a3 100644 --- a/Kinetic_data_structures/test/Kinetic_data_structures/regular_triangulation_3.cpp +++ b/Kinetic_data_structures/test/Kinetic_data_structures/regular_triangulation_3.cpp @@ -11,6 +11,8 @@ #include #include +#include + int main(int argc, char *argv[]) { if (0) { diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2.cpp b/Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2.cpp index a067dfc6bc4..e7b61e2acab 100644 --- a/Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2.cpp +++ b/Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2.cpp @@ -9,6 +9,8 @@ #include #include +#include + int main(int, char *[]) { diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp index 1ed18452b03..a8051bead6b 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp @@ -793,7 +793,7 @@ int test_zone ( Zone& rZone ) { if ( sOffsetAtEntry.size() > 0 ) { - std::size_t lSize = std::distance(lTimes.begin(),lTimes.end()); + std::ptrdiff_t lSize = std::distance(lTimes.begin(),lTimes.end()); for ( std::vector::const_iterator oi = sOffsetAtEntry.begin() ; oi != sOffsetAtEntry.end() ; ++ oi ) { From 05152f6f66c39f04fcf3b2e1f906c4f8f7f68076 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 25 Jan 2018 14:06:13 +0000 Subject: [PATCH 47/84] cast --- .../include/CGAL/Algebraic_kernel_d/Event_line_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 737a20bfd5a..3145021f830 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 @@ -340,7 +340,7 @@ protected: bool k_fixed=false; - std::ptrdiff_t seq_size = std::distance(seq_begin,seq_end); + std::ptrdiff_t seq_size = static_cast(std::distance(seq_begin,seq_end)); typedef int VT; From 769ac1a348a5842ab2e0ef5de8c410e51136c3d4 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 26 Jan 2018 08:14:34 +0000 Subject: [PATCH 48/84] Arrangement_2 --- .../include/CGAL/Arr_geometry_traits/Bezier_cache.h | 10 +++++----- .../include/CGAL/Arr_geometry_traits/Bezier_curve_2.h | 6 +++--- .../include/CGAL/Arr_geometry_traits/de_Casteljau_2.h | 6 +++--- .../include/CGAL/Arr_rat_arc/Cache.h | 11 +++++------ .../include/CGAL/CORE_algebraic_number_traits.h | 2 +- .../Curve_interval_arcno_cache.h | 2 +- 6 files changed, 18 insertions(+), 19 deletions(-) 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 7e17ff87a46..ffe445b98f1 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 @@ -475,7 +475,7 @@ _Bezier_cache::get_intersections { // Construct a vector of distances from the current point to all other // points in the pts2 list. - const int n_pts2 = pts2_ptr->size(); + const int n_pts2 = static_cast(pts2_ptr->size()); std::vector dist_vec (n_pts2); for (k = 0, pit2 = pts2_ptr->begin(); pit2 != pts2_ptr->end(); k++, ++pit2) @@ -730,12 +730,12 @@ _Bezier_cache::_compute_resultant // Create the Sylvester matrix of polynomial coefficients. Also prepare // the exp_fact vector, that represents the normalization factor (see // below). - const int m = bp1.size() - 1; - const int n = bp2.size() - 1; - const int dim = m + n; + const std::size_t m = bp1.size() - 1; + const std::size_t n = bp2.size() - 1; + const std::size_t dim = m + n; const Integer zero = 0; const Polynomial zero_poly = nt_traits.construct_polynomial (&zero, 0); - int i, j, k; + std::size_t i, j, k; std::vector > mat (dim); std::vector exp_fact (dim); 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 fa0967f22c1..178274c81d6 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 @@ -158,7 +158,7 @@ public: p_normY(NULL) { // Copy the control points and compute their bounding box. - const int pts_size = std::distance (pts_begin, pts_end); + const int pts_size = static_cast(std::distance (pts_begin, pts_end)); double x, y; double x_min = 0, x_max = 0; double y_min = 0, y_max = 0; @@ -416,7 +416,7 @@ public: */ unsigned int number_of_control_points () const { - return (this->_rep()._ctrl_pts.size()); + return static_cast((this->_rep()._ctrl_pts.size())); } /*! @@ -684,7 +684,7 @@ template void _Bezier_curve_2_rep::_construct_polynomials () const { - const int n = _ctrl_pts.size() - 1; + const int n = static_cast(_ctrl_pts.size() - 1); Rational *coeffsX = new Rational [n + 1]; Rational *coeffsY = new Rational [n + 1]; const Rational rat_zero = Rational (0); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h index 8a00ee895f2..0e92ad5977a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/de_Casteljau_2.h @@ -61,7 +61,7 @@ bisect_control_polygon_2(InputIterator ctrl_pts_begin, typedef typename _Kernel::Construct_midpoint_2 _Construct_midpoint_2; // Grab a local copy of the control points. - const unsigned int n_pts = std::distance(ctrl_pts_begin, ctrl_pts_end); + const unsigned int n_pts = static_cast(std::distance(ctrl_pts_begin, ctrl_pts_end)); CGAL_precondition(n_pts != 0); std::vector<_Point_2> vec(n_pts); @@ -125,7 +125,7 @@ typename InputIterator::value_type point_on_Bezier_curve_2 typedef typename _Kernel::FT _NT; // Grab a local copy of the control points. - const unsigned int n_pts = std::distance(ctrl_pts_begin, ctrl_pts_end); + const unsigned int n_pts = static_cast(std::distance(ctrl_pts_begin, ctrl_pts_end)); CGAL_precondition(n_pts != 0); std::vector<_Point_2> vec(n_pts); @@ -182,7 +182,7 @@ typename InputIterator::value_type de_Casteljau_2 typedef typename _Kernel::FT _NT; // Grab a local copy of the control points. - const unsigned int n_pts = std::distance(ctrl_pts_begin, ctrl_pts_end); + const unsigned int n_pts = static_cast(std::distance(ctrl_pts_begin, ctrl_pts_end)); CGAL_precondition(n_pts != 0); std::vector<_Point_2> vec(n_pts); diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h index 135ac8a836b..aec75ad25f8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Cache.h @@ -281,10 +281,9 @@ private: } //re-set watermark - _rat_func_map_watermark = (std::max)( - 2*_rat_func_map.size(), - typename Rational_function_map::size_type(128)); - + _rat_func_map_watermark + = static_cast((std::max)(2* _rat_func_map.size(), + typename Rational_function_map::size_type(128))); return; } void rat_pair_map_clean_up() const @@ -311,8 +310,8 @@ private: //re-set watermark _rat_pair_map_watermark = - (std::max)(2*_rat_pair_map.size(), - typename Rational_function_canonicalized_pair_map::size_type(128)); + static_cast((std::max)(2* _rat_pair_map.size(), + typename Rational_function_canonicalized_pair_map::size_type(128))); } private: 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 77f6e81d460..d0a8502f68c 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 @@ -590,7 +590,7 @@ public: poly.getCoeff(1), poly.getCoeff(0), buffer); - std::ptrdiff_t num_of_roots = std::distance(&buffer[0], end_buffer); + unsigned int num_of_roots = static_cast(std::distance(&buffer[0], end_buffer)); for (i = 0; i < num_of_roots; ++i) { 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 843d68d2147..47ea065ee4f 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 @@ -115,7 +115,7 @@ struct Curve_interval_arcno_cache { Curve_analysis_2 ca_2 = cv_line.curve_analysis_2(); ///////////////////////////////// polynomial or curve id ? - int curve_id = ca_2.polynomial_2().id(); + int curve_id = static_cast(ca_2.polynomial_2().id()); ///////////////////////////////// if(_m_last_curve_id != curve_id) { typename Curve_to_interval_arcno_map::iterator it; From b352738d709bce9f9de65c89716e51231f44d414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 29 Jan 2018 18:32:25 +0100 Subject: [PATCH 49/84] Documented some functions used in SMP/Orbifold Tutte Embedding parameterizer Along the way, fix a few mistakes and generalize the API of these newly documented functions. --- .../Surface_mesh/Parameterization_plugin.cpp | 8 +- .../PackageDescription.txt | 31 +- .../fig/orbifold_path.svg | 6 +- .../orbifold.cpp | 26 +- .../Error_code.h | 5 +- .../Orbifold_Tutte_parameterizer_3.h | 302 ++++++++++++++++-- .../internal/orbifold_cone_helper.h | 271 +--------------- .../orbifold_enums.h | 87 +++++ ...ortest_path.h => orbifold_shortest_path.h} | 74 +++-- .../CGAL/surface_mesh_parameterization.h | 1 + .../extensive_parameterization_test.cpp | 15 +- 11 files changed, 489 insertions(+), 337 deletions(-) create mode 100644 Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h rename Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/{internal/shortest_path.h => orbifold_shortest_path.h} (61%) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp index da54b696dcd..869a21ec7c9 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/Parameterization_plugin.cpp @@ -950,12 +950,8 @@ void Polyhedron_demo_parameterization_plugin::parameterize(const Parameterizatio Parameterizer parameterizer(orb); // mark cones in the seam mesh - typedef boost::unordered_map Cones; - Cones cmap; - - if(!SMP::internal::locate_unordered_cones, - Cones>(sMesh, unordered_cones, cmap)) + boost::unordered_map cmap; + if(!SMP::locate_unordered_cones(sMesh, unordered_cones.begin(), unordered_cones.end(), cmap)) return; // vimap and uvmap diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt index d1483121633..a1372dac68f 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt @@ -112,20 +112,32 @@ The package performs the next checks: - the input mesh is a surface with one connected component. */ -/// \defgroup PkgSurfaceParameterizationMainFunction Main Function -/// \ingroup PkgSurfaceParameterization +/*! + \defgroup PkgSurfaceParameterizationMainFunction Main Functions + \ingroup PkgSurfaceParameterization -/// \defgroup PkgSurfaceParameterizationEnums Enums -/// \ingroup PkgSurfaceParameterization + The central functions, main entry point of the package. +*/ -/// \defgroup PkgSurfaceParameterizationConcepts Concepts -/// \ingroup PkgSurfaceParameterization +/*! + \defgroup PkgSurfaceParameterizationEnums Enums + \ingroup PkgSurfaceParameterization + + The enum classes defined and used in this package. +*/ + +/*! + \defgroup PkgSurfaceParameterizationConcepts Concepts + \ingroup PkgSurfaceParameterization + + The concepts of this package. +*/ /*! \defgroup PkgSurfaceParameterizationMethods Surface Parameterization Methods \ingroup PkgSurfaceParameterization -This \cgal package implements several parameterization methods: + This \cgal package implements several parameterization methods: - Fixed border: - Tutte Barycentric Mapping \cgalCite{t-hdg-63}. @@ -162,5 +174,10 @@ This package implements common border parameterization methods: vertices). */ +/*! + \defgroup PkgSurfaceParameterizationOrbifoldHelperFunctions Orbifold Helper Functions + \ingroup PkgSurfaceParameterizationMethods + + */ diff --git a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/orbifold_path.svg b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/orbifold_path.svg index 33be0c78eae..10b5bfe99cd 100644 --- a/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/orbifold_path.svg +++ b/Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/orbifold_path.svg @@ -1,5 +1,5 @@ - + @@ -85,7 +85,7 @@ - + @@ -179,7 +179,7 @@ - + diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp index b9da99fc9e1..84296d8ab87 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/orbifold.cpp @@ -3,10 +3,6 @@ #include #include -#include -#include -#include - #include #include @@ -66,10 +62,9 @@ int main(int argc, char * argv[]) // -- the third line optionally provides the seam edges indices as 'e11 e12 e21 e22 e31 e32' etc. const char* cone_filename = (argc>2) ? argv[2] : "data/bear.selection.txt"; - // Read the cones and find the corresponding vertex_descriptor in the underlying mesh 'sm' - typedef std::vector Cones_in_smesh_container; - Cones_in_smesh_container cone_sm_vds; - SMP::internal::read_cones(sm, cone_filename, cone_sm_vds); + // Read the cones and compute their corresponding vertex_descriptor in the underlying mesh 'sm' + std::vector cone_sm_vds; + SMP::read_cones(sm, cone_filename, std::back_inserter(cone_sm_vds)); // Two property maps to store the seam edges and vertices Seam_edge_pmap seam_edge_pm = sm.add_property_map("e:on_seam", false).first; @@ -78,12 +73,14 @@ int main(int argc, char * argv[]) // The seam mesh Mesh mesh(sm, seam_edge_pm, seam_vertex_pm); - // Use the path provided between cones to create a seam mesh + // If provided, use the path between cones to create a seam mesh SM_halfedge_descriptor smhd = mesh.add_seams(cone_filename); + + // If not provided, compute the paths using shortest paths if(smhd == SM_halfedge_descriptor() ) { - std::cout << "No seams were given in input, computing shortest paths between cones" << std::endl; + std::cout << "No seams given in input, computing the shortest paths between consecutive cones" << std::endl; std::list seam_edges; - SMP::internal::compute_shortest_paths_between_cones(sm, cone_sm_vds, seam_edges); + SMP::compute_shortest_paths_between_cones(sm, cone_sm_vds.begin(), cone_sm_vds.end(), seam_edges); // Add the seams to the seam mesh BOOST_FOREACH(SM_edge_descriptor e, seam_edges) { @@ -103,11 +100,8 @@ int main(int argc, char * argv[]) } // Mark the cones in the seam mesh - typedef boost::unordered_map Cones; - Cones cmap; - SMP::internal::locate_cones(mesh, cone_sm_vds, cmap); + boost::unordered_map cmap; + SMP::locate_cones(mesh, cone_sm_vds.begin(), cone_sm_vds.end(), cmap); // The 2D points of the uv parametrisation will be written into this map // Note that this is a halfedge property map, and that uv values diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Error_code.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Error_code.h index 62622e1f99e..658d6b72ea8 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Error_code.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Error_code.h @@ -41,9 +41,10 @@ enum Error_code ERROR_WRONG_PARAMETER ///< A method received an unexpected parameter }; -/// Get message corresponding to an error code +/// \ingroup PkgSurfaceParameterizationEnums +/// \brief Get the message corresponding to an error code. /// \param error_code The code returned by `parameterize()` -/// \return The string describing the error code +/// \return The string describing the error code. const char* get_error_message(int error_code) { // Messages corresponding to Error_code list above. Must be kept in sync! 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 791762ee264..65d4a9a8a35 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 @@ -24,7 +24,9 @@ #include #include +#include #include +#include #include @@ -64,20 +66,276 @@ namespace CGAL { namespace Surface_mesh_parameterization { -/// \ingroup PkgSurfaceParameterizationEnums +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions /// -/// Weight type used in the parameterization computation. +/// Read a serie of cones from an input stream. Cones are passed as an +/// integer value that is the index of a vertex handle in the mesh `pm`, using +/// the vertex index property map `vpmap` for correspondency. /// -/// MVC weights are guaranteed to generate positive edge weights, and the parameterization -/// is guaranteed to be injective. +/// \attention The mesh is here `sm`, it is the base mesh of the CGAL::Seam_mesh +/// that is passed in input, not the seam mesh itself. /// -/// In case the cotangent weights are used, the orbifold-Tutte embedding globally -/// minimizes the Dirichlet energy and approximates conformal mappings. -enum Weight_type +/// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. +/// \tparam VertexIndexMap must be a model of `ReadablePropertyMap` with +/// `boost::graph_traits::%vertex_descriptor` as key type and +/// a unique integer as value type. +/// \tparam ConeOutputInserter a model of `OutputIterator` with value type +/// `boost::graph_traits::%vertex_descriptor`. +/// +/// \param tm the triangular mesh to be parameterized +/// \param in the input stream +/// \param vpmap an initialized vertex - index map +/// \param out the output iterator +/// +/// \pre The number of cones must match the chosen \link PkgSurfaceParameterizationEnums Orbifold_type \endlink. +/// \pre No two cones correspond to the same vertex (all cones have different index). +/// +/// \return The corresponding vertex descriptors are output, in the same order as the input integers, in `out`. +/// The function checks if the input is valid (no duplicate, correct number of cones) and returns an `Error_code`. +template +Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, VertexIndexMap vpmap, ConeOutputInserter out) { - Cotangent = 0, - Mean_value -}; + typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; + typedef typename boost::graph_traits::vertex_iterator TM_vertex_iterator; + + std::vector cones; + cones.reserve(4); + int cone_index; + while(in >> cone_index) + cones.push_back(cone_index); + + std::cout << "Input cones: "; + for(std::size_t i=0; i 4) { + std::cerr << "Error: Not enough or too many input cones" << std::endl; + return ERROR_WRONG_PARAMETER; + } + + if(!internal::are_cones_unique(cones)) { + std::cerr << "Error: The input cones are not unique" << std::endl; + return ERROR_WRONG_PARAMETER; + } + + // Locate the cones in the underlying mesh 'pm' + std::vector cone_vds_in_tm(cones.size()); // need this to keep the correct order + + // Since the cones are unique, we only need to loop all the vertices once + TM_vertex_iterator vit, end; + boost::tie(vit, end) = vertices(tm); + for(; vit!=end; ++vit) { + for(std::size_t i=0; i +Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, ConeOutputInserter out) +{ + typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; + typedef typename boost::graph_traits::vertex_iterator TM_vertex_iterator; + + boost::unordered_map m; + int counter = 0; + + TM_vertex_iterator vit, end; + boost::tie(vit, end) = vertices(tm); + for(; vit!=end; ++vit) + { + TM_vertex_descriptor vd = *vit; + m[vd] = counter++; + } + + return read_cones(tm, in, boost::make_assoc_property_map(m), out); +} + +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions +/// +/// Same as above, but from a file instead of a stream. +template +Error_code read_cones(const TriangleMesh& pm, const char* filename, VertexIndexMap vpmap, ConeOutputInserter out) +{ + std::ifstream in(filename); + return read_cones(pm, in, vpmap, out); +} + +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions +/// +/// Same as above, but from a file instead of a stream. The default indexation +/// of the vertices of `tm` is used: vertices are numbered from `0` to `num_vertices(tm)-1`, +/// in the order that they appear while calling `vertices(tm)`. +template +Error_code read_cones(const TriangleMesh& pm, const char* filename, ConeOutputInserter out) +{ + std::ifstream in(filename); + return read_cones(pm, in, out); +} + +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions +/// +/// Locate the cones on the seam mesh (that is, find the corresponding seam mesh +/// vertex_descriptor) and mark them with a tag to indicate whether the cone is a +/// simple cone or a duplicated cone (see \link PkgSurfaceParameterizationEnums Cone_type \endlink). +/// +/// \attention The cones must be ordered: the first and last cones are the extremetities of the seam. +/// +/// \tparam SeamMesh is the same class CGAL::Seam_mesh that is passed to the parameterized. +/// It is a template parameter for convenience (not having to rewrite the template +/// parameters of the class CGAL::Seam_mesh). +/// \tparam ConeInputBidirectionalIterator must be a model of `BidirectionalIterator` +/// with value type `boost::graph_traits::%vertex_descriptor`. +/// \tparam ConeMap must be a model of `AssociativeContainer` with +/// `boost::graph_traits::%vertex_descriptor` as key type and +/// \link PkgSurfaceParameterizationEnums Cone_type \endlink as value type. +/// +/// \param mesh the seam mesh +/// \param first, beyond the range of cones, as vertex descriptors of the base mesh. +/// \param cones a writable property map that will store the cones as vertex descriptors +/// of the seam mesh and associate their respective cone types. +template +bool locate_cones(const SeamMesh& mesh, + ConeInputBidirectionalIterator first, ConeInputBidirectionalIterator beyond, + ConeMap& cones) +{ + typedef typename SeamMesh::TriangleMesh TriangleMesh; + + typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + + // property map to go from TM_vertex_descriptor to Point_3 + typedef typename internal::Kernel_traits::PPM PM_PPM; + const PM_PPM pm_ppmap = get(boost::vertex_point, mesh.mesh()); + + // property map to go from vertex_descriptor to Point_3 + typedef typename internal::Kernel_traits::PPM PPM; + const PPM ppmap = get(boost::vertex_point, mesh); + + BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)) { + for(ConeInputBidirectionalIterator cit=first; cit!=beyond; ++cit) { + ConeInputBidirectionalIterator last = (--beyond)++; + + TM_vertex_descriptor smvd = *cit; + if(get(ppmap, vd) == get(pm_ppmap, smvd)) { // same geometric position + Cone_type ct; + if(cit == first) + ct = First_unique_cone; + else if(cit == last) + ct = Second_unique_cone; + else + ct = Duplicated_cone; + + cones.insert(std::make_pair(vd, ct)); + } + } + } + + return internal::check_cone_validity(mesh, first, beyond, cones); +} + +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions +/// +/// Same as above, but the cones are not ordered and we thus use seam mesh +/// information to determine which cones are extremities of the seam (so-called +/// unique cones) or not (so-called duplicate cones). +template +bool locate_unordered_cones(const SeamMesh& mesh, + ConeInputBidirectionalIterator first, ConeInputBidirectionalIterator beyond, + ConeMap& cones) +{ + CGAL_precondition(cones.empty()); + CGAL_precondition(std::distance(first, beyond) == 3 || std::distance(first, beyond) == 4); + + typedef typename SeamMesh::TriangleMesh TriangleMesh; + + typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; + typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + + // find a vertex on the seam + vertex_descriptor vertex_on_seam; + BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)) { + if(mesh.has_on_seam(vd)) { + vertex_on_seam = vd; + break; + } + } + + CGAL_assertion(vertex_on_seam != vertex_descriptor()); + + // property map to go from TM_vertex_descriptor to Point_3 + typedef typename internal::Kernel_traits::PPM PM_PPM; + const PM_PPM pm_ppmap = get(boost::vertex_point, mesh.mesh()); + + // property map to go from vertex_descriptor to Point_3 + typedef typename internal::Kernel_traits::PPM PPM; + const PPM ppmap = get(boost::vertex_point, mesh); + + bool first_cone_met = false; + + // walk on the seam and mark if we encounter a cone + vertex_descriptor end = vertex_on_seam; + do { + ConeInputBidirectionalIterator current = first; + for(; current!=beyond; ++current) { + TM_vertex_descriptor smvd = *current; + if(get(ppmap, vertex_on_seam) == get(pm_ppmap, smvd)) { // the seam mesh vertex is a cone + // We have encountered a cone. Must check if the cone is a Unique_cone + // or a Duplicated_cone. + + // A check is to look at the sources of two halfedges with the same direction + // on either side of the seam. If the sources are the same, it's a Unique_cone; + // if they differ, it's a duplicated_cone. + + halfedge_descriptor hd = halfedge(vertex_on_seam, mesh); + halfedge_descriptor other_hd = opposite(hd, mesh); + + // little trick to go from border halfedge on one side of the seam to + // interior halfedge on the other side of the seam + CGAL_assertion(other_hd.seam); + other_hd.seam = false; + + Cone_type ct; + if(target(hd, mesh) == source(other_hd, mesh)) { + if(first_cone_met) + ct = Second_unique_cone; + else { + ct = First_unique_cone; + first_cone_met = true; + } + } else { + ct = Duplicated_cone; + } + + cones.insert(std::make_pair(vertex_on_seam, ct)); + } + } + + // Move to the next vertex_descriptor on the seam + vertex_on_seam = source(halfedge(vertex_on_seam, mesh), mesh); + CGAL_assertion(mesh.has_on_seam(vertex_on_seam)); + + } while(vertex_on_seam != end); + + return internal::check_cone_validity(mesh, first, beyond, cones); +} /// \ingroup PkgSurfaceParameterizationMethods /// @@ -91,6 +349,10 @@ enum Weight_type /// and a set of vertices of the mesh (the cones). The choice of cones influences /// the resulting parameterization, but not the choice of the seam path between these cones. /// +/// Some helper functions related to the class `Orbifold_Tutte_parameterizer_3` +/// (for example to read and compute paths between cones) can be found +/// \link PkgSurfaceParameterizationOrbifoldHelperFunctions here \endlink. +/// /// The example \ref Surface_mesh_parameterization/orbifold.cpp "orbifold.cpp" /// shows how to select cones on the input mesh and automatically construct /// the seams and the cones on the `Seam_mesh`. @@ -336,11 +598,11 @@ private: // positions of the cones in the plane typedef std::vector Point_container; const Point_container& tcoords = - get_cones_parameterized_coordinates(orb_type); + internal::get_cones_parameterized_coordinates(orb_type); // angles at the cones typedef std::vector Angle_container; - const Angle_container& angs = get_angles_at_cones(orb_type); + const Angle_container& angs = internal::get_angles_at_cones(orb_type); // The index of the line in M that we are filling next. @@ -631,6 +893,9 @@ public: /// The mapping is piecewise linear (linear in each triangle). /// The result is the (u,v) pair image of each vertex of the 3D surface. /// + /// \tparam ConeMap must be a model of `AssociativeContainer` with key type + /// `boost::graph_traits::%vertex_descriptor` and + /// \link PkgSurfaceParameterizationEnums Cone_type \endlink as value type. /// \tparam VertexUVmap must be a model of `ReadWritePropertyMap` with /// `boost::graph_traits::%vertex_descriptor` as key type and /// %Point_2 (type deduced from `Seam_mesh` using `Kernel_traits`) @@ -638,14 +903,12 @@ public: /// \tparam VertexIndexMap must be a model of `ReadablePropertyMap` with /// `boost::graph_traits::%vertex_descriptor` as key type and /// a unique integer as value type. - /// \tparam VertexParameterizedMap must be a model of `ReadWritePropertyMap` with - /// `boost::graph_traits::%vertex_descriptor` as key type and - /// a Boolean as value type. /// /// \param mesh a `Seam_mesh` parameterized by any model of a `FaceGraph` /// \param bhd a halfedge on the border of the seam mesh /// \param cmap a mapping of the `vertex_descriptor`s of `mesh` that are cones - /// to their respective `Cone_type`. + /// to their respective \link PkgSurfaceParameterizationEnums Cone_type \endlink + /// classification. /// \param uvmap an instanciation of the class `VertexUVmap`. /// \param vimap an instanciation of the class `VertexIndexMap`. /// @@ -661,7 +924,7 @@ public: /// or intersect other paths (see Figure below). /// /// \cgalFigureBegin{Surface_mesh_parameterizationfigorbifold, orbifold_path.svg} - /// Bad (left) and good (right) seam paths. The seam edges are shown in dark red. + /// Invalid (left) and valid (right) seam paths. Seam edges are drawn in teal. /// Cones are marked in yellow and blue. /// \cgalFigureEnd template Error_code parameterize(SeamMesh& mesh, halfedge_descriptor bhd, - ConeMap cmap, + const ConeMap& cmap, VertexUVMap uvmap, VertexIndexMap vimap) const { @@ -752,7 +1015,8 @@ public: } public: - /// Constructor. + /// Constructor of the parameterizer. The arguments allow to select + /// the desired orbifold and weight types. Orbifold_Tutte_parameterizer_3(const Orbifold_type orb_type = Square, const Weight_type weight_type = Cotangent) : 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 a58db9639b7..513b9128d51 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 @@ -21,6 +21,7 @@ #include #include +#include #include @@ -41,49 +42,7 @@ namespace CGAL { namespace Surface_mesh_parameterization { -/// \ingroup PkgSurfaceParameterizationEnums -/// -/// The types of cones used in Orbifold Tutte parameterization. -/// -/// `Unique_cones` are found at the beginning and the end of the seam. All other -/// cones are duplicated in the sense that when the seam is `opened`, the vertex -/// is duplicated at two different positions. -enum Cone_type -{ - First_unique_cone = 0, - Second_unique_cone, - Duplicated_cone -}; - -/// \ingroup PkgSurfaceParameterizationEnums -/// -/// The four Orbifold types available in the Orbifold Tutte parameterization. -enum Orbifold_type -{ - Square = 0, - Diamond, - Triangle, - Parallelogram -}; - -/// Get message corresponding to an error code -/// \param orb_type The integer value in the enum -/// \return The string describing the Orbifold type -const char* get_orbifold_type(int orb_type) -{ - // Messages corresponding to Error_code list above. Must be kept in sync! - static const char* type[Parallelogram+1] = { - "Square", - "Diamond", - "Triangle", - "Parallelogram" - }; - - if(orb_type > Parallelogram || orb_type < 0) - return "Unknown orbifold type"; - else - return type[orb_type]; -} +namespace internal { // Orbifold type functions template @@ -130,8 +89,6 @@ NT_container get_angles_at_cones(const Orbifold_type orb_type) return angs; } -namespace internal { - template bool are_cones_unique(const Cone_container& cones) { @@ -198,21 +155,24 @@ void find_start_cone(const ConeMap& cmap, /// Check the validity of the input cones in the `Seam_mesh` mesh. template -bool check_input_validity(const SeamMesh& mesh, - const Cones_in_Seam_mesh_map& cones, - const Cones_in_Base_mesh_container& cone_tm_vds) + typename ConeInputBidirectionalIterator, + typename Cones_in_Seam_mesh_map> +bool check_cone_validity(const SeamMesh& mesh, + ConeInputBidirectionalIterator first, ConeInputBidirectionalIterator beyond, + const Cones_in_Seam_mesh_map& cones) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; + typename std::iterator_traits< + ConeInputBidirectionalIterator>::difference_type number_of_cones_in_tm = std::distance(first, beyond); + // check cone numbers - if((cone_tm_vds.size() == 3 && cones.size() != 4) || - (cone_tm_vds.size() == 4 && cones.size() != 6)) { + if((number_of_cones_in_tm == 3 && cones.size() != 4) || + (number_of_cones_in_tm == 4 && cones.size() != 6)) { std::cerr << "Error: Problem in number of cones: " << std::endl; - std::cerr << cone_tm_vds.size() << " cones in the base mesh" << std::endl; + std::cerr << number_of_cones_in_tm << " cones in the base mesh" << std::endl; std::cerr << cones.size() << " cones in the seam mesh" << std::endl; return false; } @@ -251,8 +211,8 @@ bool check_input_validity(const SeamMesh& mesh, return false; } - if((cone_tm_vds.size() == 3 && duplicated_cone_counter != 2) || - (cone_tm_vds.size() == 4 && duplicated_cone_counter != 4)) { + if((number_of_cones_in_tm == 3 && duplicated_cone_counter != 2) || + (number_of_cones_in_tm == 4 && duplicated_cone_counter != 4)) { std::cerr << "Error: Wrong number of duplicated cones" << std::endl; return false; } @@ -332,207 +292,6 @@ bool check_input_validity(const SeamMesh& mesh, return true; } -/// Read the cones from an input stream. -template -Error_code read_cones(const TriangleMesh& pm, std::ifstream& in, - std::vector::vertex_descriptor>& cone_vds_in_tm) -{ - typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; - - std::vector cones; - cones.reserve(4); - int cone_index; - while(in >> cone_index) { - cones.push_back(cone_index); - } - - std::cout << "Input cones: "; - for(std::size_t i=0; i 4) { - std::cerr << "Error: Not enough or too many input cones" << std::endl; - return ERROR_WRONG_PARAMETER; - } - - if(!are_cones_unique(cones)) { - std::cerr << "Error: The input cones are not unique" << std::endl; - return ERROR_WRONG_PARAMETER; - } - - // Locate the cones in the underlying mesh 'pm' - CGAL_assertion(cone_vds_in_tm.empty()); - cone_vds_in_tm.resize(cones.size()); - - for(std::size_t i=0; i -Error_code read_cones(const TriangleMesh& pm, const char* filename, - std::vector::vertex_descriptor>& cone_vds_in_tm) -{ - std::ifstream in(filename); - return read_cones(pm, in, cone_vds_in_tm); -} - - -/// Locate the cones on the seam mesh (find the corresponding seam mesh -/// vertex_descriptor) and mark them with a tag that indicates whether it is a -/// simple cone or a duplicated cone. -/// -/// The cones are ordered: the first and last cones are the extremetities of the seam. -/// -/// \tparam SeamMesh is a seam mesh -/// \tparam ConeMap a map vertex_descriptor --> Cone_type -template -bool locate_cones(const SeamMesh& mesh, - const Cones_in_pmesh_vector& cone_tm_vds, - ConeMap& cones) -{ - CGAL_precondition(cones.empty()); - - typedef typename SeamMesh::TriangleMesh TriangleMesh; - - typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - - // property map to go from TM_vertex_descriptor to Point_3 - typedef typename Kernel_traits::PPM PM_PPM; - const PM_PPM pm_ppmap = get(boost::vertex_point, mesh.mesh()); - - // property map to go from vertex_descriptor to Point_3 - typedef typename Kernel_traits::PPM PPM; - const PPM ppmap = get(boost::vertex_point, mesh); - - // the cones in the underlying mesh - std::size_t cvdss = cone_tm_vds.size(); - - for(std::size_t i=0; i Cone_type -template -bool locate_unordered_cones(const SeamMesh& mesh, - const Cones_in_pmesh_set& cone_tm_vds, - ConeMap& cones) -{ - CGAL_precondition(cones.empty()); - CGAL_precondition(cone_tm_vds.size() == 3 || cone_tm_vds.size() == 4); - - typedef typename SeamMesh::TriangleMesh TriangleMesh; - - typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; - typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; - typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - - // find a vertex on the seam - vertex_descriptor vertex_on_seam; - BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)) { - if(mesh.has_on_seam(vd)) { - vertex_on_seam = vd; - break; - } - } - - CGAL_assertion(vertex_on_seam != vertex_descriptor()); - - // property map to go from TM_vertex_descriptor to Point_3 - typedef typename Kernel_traits::PPM PM_PPM; - const PM_PPM pm_ppmap = get(boost::vertex_point, mesh.mesh()); - - // property map to go from vertex_descriptor to Point_3 - typedef typename Kernel_traits::PPM PPM; - const PPM ppmap = get(boost::vertex_point, mesh); - - bool first_cone_met = false; - - // walk on the seam and mark if we encounter a cone - vertex_descriptor end = vertex_on_seam; - do { - BOOST_FOREACH(TM_vertex_descriptor smvd, cone_tm_vds) { - if(get(ppmap, vertex_on_seam) == get(pm_ppmap, smvd)) { // the seam mesh vertex is a cone - - // we have encountered a cone. Must check if the cone is a Unique_cone - // or a Duplicated_cone. - - // a check is to look at the sources of two halfedges with the same direction - // on either side of the seam. If the sources are the same, it's a Unique_cone; - // if they differ, it's a duplicated_cone. - - halfedge_descriptor hd = halfedge(vertex_on_seam, mesh); - halfedge_descriptor other_hd = opposite(hd, mesh); - - // little trick to go from border halfedge on one side of the seam to - // interior halfedge on the other side of the seam - CGAL_assertion(other_hd.seam); - other_hd.seam = false; - - Cone_type ct; - if(target(hd, mesh) == source(other_hd, mesh)) { - if(first_cone_met) - ct = Second_unique_cone; - else { - ct = First_unique_cone; - first_cone_met = true; - } - } else { - ct = Duplicated_cone; - } - - cones.insert(std::make_pair(vertex_on_seam, ct)); - } - } - - // move to the next vertex_descriptor on the seam - vertex_on_seam = source(halfedge(vertex_on_seam, mesh), mesh); - CGAL_assertion(mesh.has_on_seam(vertex_on_seam)); - - } while(vertex_on_seam != end); - - return check_input_validity(mesh, cones, cone_tm_vds); -} - } // namespace internal } // namespace Surface_mesh_parameterization diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h new file mode 100644 index 00000000000..348e8eef43c --- /dev/null +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h @@ -0,0 +1,87 @@ +// Copyright (c) 2018 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org). +// You can redistribute it and/or modify it under the terms of the GNU +// General Public License as published by the Free Software Foundation, +// either version 3 of the License, or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// Author(s) : Mael Rouxel-Labbé + +#ifndef CGAL_SURFACE_MESH_PARAMETERIZATION_ORBIFOLD_ENUMS_H +#define CGAL_SURFACE_MESH_PARAMETERIZATION_ORBIFOLD_ENUMS_H + +#include + +/// \file orbifold_enums.h + +namespace CGAL { + +namespace Surface_mesh_parameterization { + +/// \ingroup PkgSurfaceParameterizationEnums +/// +/// The two possible weight types available in the Orbifold Tutte parameterization. +enum Weight_type +{ + Cotangent = 0, ///< When Cotangent weights are used, the orbifold-Tutte embedding + /// globally minimizes the Dirichlet energy and approximates conformal mappings. + Mean_value ///< Mean Value Coordinate weights are guaranteed to generate positive edge weights, + /// and the parameterization is guaranteed to be injective. +}; + +/// \ingroup PkgSurfaceParameterizationEnums +/// +/// A classification type for the cones used in Orbifold Tutte parameterization. +enum Cone_type +{ + First_unique_cone = 0, ///< marker for the cone found at the beginning of the seam. + Second_unique_cone, ///< marker for the cone found at the end of the seam. + Duplicated_cone ///< marker for all the other cones. Cones are duplicated in the sense + /// that when the seam is "opened", the cone appears + /// at two different positions. +}; + +/// \ingroup PkgSurfaceParameterizationEnums +/// +/// The four Orbifold types available in the Orbifold Tutte parameterization. +/// The different shapes result from the number of cones and the angle constraints +/// at the cones. +enum Orbifold_type +{ + Square = 0, ///< Three cones, forming a square-shaped basic tile. + Diamond, ///< Three cones, forming a diamond-shaped basic tile. + Triangle, ///< Three cones, forming a triangle-shaped basic tile. + Parallelogram ///< Four cones, forming a parallelogram-shaped basic tile. +}; + +/// \ingroup PkgSurfaceParameterizationEnums +/// \brief Convert the orbifold type to a literal message. +/// \param orb_type the integer value in the enum +/// \return the string describing the Orbifold type. +const char* get_orbifold_type(int orb_type) +{ + // Messages corresponding to the different orbifold types. + static const char* type[Parallelogram+1] = { + "Square", + "Diamond", + "Triangle", + "Parallelogram" + }; + + if(orb_type > Parallelogram || orb_type < 0) + return "Unknown orbifold type"; + else + return type[orb_type]; +} + +} // namespace Surface_mesh_parameterization +} // namespace CGAL + +#endif diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h similarity index 61% rename from Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h rename to Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h index 4514a085fdc..221a9a49ecc 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/internal/shortest_path.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h @@ -12,10 +12,14 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0+ +// // Author(s) : Mael Rouxel-Labbé -#ifndef CGAL_SURFACE_MESH_PARAMETERIZATION_INTERNAL_SHORTEST_PATH_H -#define CGAL_SURFACE_MESH_PARAMETERIZATION_INTERNAL_SHORTEST_PATH_H +#ifndef CGAL_SURFACE_MESH_PARAMETERIZATION_SHORTEST_PATH_H +#define CGAL_SURFACE_MESH_PARAMETERIZATION_SHORTEST_PATH_H #include @@ -97,11 +101,28 @@ public: } }; -template +} // namespace internal + +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions +/// +/// Compute the shortest path between `source` and `target` over `mesh`, using +/// a Dijkstra algorithm. +/// +/// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. +/// \tparam EdgeOutputIterator A model of `OutputIterator` with value type +/// `boost::graph_traits::edge_descriptor`. +/// +/// \param tm the triangular mesh to be parameterized +/// \param source, target the extremities of the path to be computed +/// \param oi the output iterator +/// +/// \pre `source` and `target` are vertices of `mesh`. +/// \pre `source != target`. +template void compute_shortest_paths_between_two_cones(const TriangleMesh& mesh, - typename boost::graph_traits::vertex_descriptor source, - typename boost::graph_traits::vertex_descriptor target, - OutputIterator oi) + typename boost::graph_traits::vertex_descriptor source, + typename boost::graph_traits::vertex_descriptor target, + EdgeOutputIterator oi) { if(source == target) { std::cout << "Warning: the source and target are identical in 'shortest_path' " << std::endl; @@ -111,7 +132,7 @@ void compute_shortest_paths_between_two_cones(const TriangleMesh& mesh, typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits::edge_descriptor edge_descriptor; - typedef Stop_at_target_Dijkstra_visitor Stop_visitor; + typedef internal::Stop_at_target_Dijkstra_visitor Stop_visitor; typedef boost::unordered_map Pred_umap; typedef boost::associative_property_map Pred_pmap; @@ -140,25 +161,42 @@ void compute_shortest_paths_between_two_cones(const TriangleMesh& mesh, } while (s != source); } -template +/// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions +/// +/// Given a range `[first; beyond[` of cones (described as vertex descriptors), +/// compute the shortest path for all pairs of consecutive entries in the range +/// and add them to the container `seams`. +/// +/// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. +/// \tparam InputConesForwardIterator A model of `ForwardIterator` with value type +/// `boost::graph_traits::vertex_descriptor`. +/// \tparam SeamContainer A model of `SequenceContainer` with value type `boost::graph_traits::edge_descriptor`. +/// +/// \param mesh the triangular mesh on which paths are computed +/// \param first, beyond the cones, which form the extremities of the path +/// \param seams a container that will store the paths, as a sequence of edges of the mesh. +/// +/// \pre `source` and `target` are vertices of `mesh`. +/// \pre `source != target`. +template void compute_shortest_paths_between_cones(const TriangleMesh& mesh, - const Cones_vector& cones, - Seam_container& seams) + InputConesForwardIterator first, InputConesForwardIterator beyond, + SeamContainer& seams) { - CGAL_precondition(cones.size() == 3 || cones.size() == 4); - for(std::size_t i=0; i #include #include diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp index 916cad814f3..9ff1649fe82 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/extensive_parameterization_test.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include @@ -420,9 +419,8 @@ int main(int, char**) const char* cone_filename = "data/fandisk.orbifold.selection.txt"; // Read the cones and find the corresponding vertex_descriptor in the underlying mesh 'sm' - typedef std::vector Cones_in_smesh_container; - Cones_in_smesh_container cone_sm_vds; - SMP::internal::read_cones(sm, cone_filename, cone_sm_vds); + std::vector cone_sm_vds; + SMP::read_cones(sm, cone_filename, std::back_inserter(cone_sm_vds)); // Two property maps to store the seam edges and vertices SM_seam_edge_pmap seam_edge_pm = sm.add_property_map("e:on_seam", false).first; @@ -435,7 +433,7 @@ int main(int, char**) SM_halfedge_descriptor smhd = mesh.add_seams(cone_filename); if(smhd == SM_halfedge_descriptor() ) { std::list seam_edges; - SMP::internal::compute_shortest_paths_between_cones(sm, cone_sm_vds, seam_edges); + SMP::compute_shortest_paths_between_cones(sm, cone_sm_vds.begin(), cone_sm_vds.end(), seam_edges); // Add the seams to the seam mesh BOOST_FOREACH(SM_edge_descriptor e, seam_edges) { @@ -453,11 +451,8 @@ int main(int, char**) } // Mark the cones in the seam mesh - typedef boost::unordered_map Cones; - Cones cmap; - SMP::internal::locate_cones(mesh, cone_sm_vds, cmap); + boost::unordered_map cmap; + SMP::locate_cones(mesh, cone_sm_vds.begin(), cone_sm_vds.end(), cmap); // The 2D points of the uv parametrisation will be written into this map // Note that this is a halfedge property map, and that uv values From e803d7d5d0da5890ce25218e78ca80dbf47d674c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 29 Jan 2018 18:39:33 +0100 Subject: [PATCH 50/84] Added tags --- .../CGAL/Surface_mesh_parameterization/orbifold_enums.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h index 348e8eef43c..247f1c065fa 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h @@ -12,6 +12,10 @@ // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // +// $URL$ +// $Id$ +// SPDX-License-Identifier: GPL-3.0+ +// // Author(s) : Mael Rouxel-Labbé #ifndef CGAL_SURFACE_MESH_PARAMETERIZATION_ORBIFOLD_ENUMS_H From bf21e2bd4b616caef6d27597b1a78f1e6676d036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 29 Jan 2018 21:53:45 +0100 Subject: [PATCH 51/84] Minor doc improvements --- .../Orbifold_Tutte_parameterizer_3.h | 10 +++++----- .../orbifold_enums.h | 6 +++--- .../orbifold_shortest_path.h | 19 ++++++++++--------- 3 files changed, 18 insertions(+), 17 deletions(-) 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 65d4a9a8a35..3affb2f23fa 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 @@ -202,8 +202,8 @@ Error_code read_cones(const TriangleMesh& pm, const char* filename, ConeOutputIn /// parameters of the class CGAL::Seam_mesh). /// \tparam ConeInputBidirectionalIterator must be a model of `BidirectionalIterator` /// with value type `boost::graph_traits::%vertex_descriptor`. -/// \tparam ConeMap must be a model of `AssociativeContainer` with -/// `boost::graph_traits::%vertex_descriptor` as key type and +/// \tparam ConeMap must be a model of AssociativeContainer +/// with `boost::graph_traits::%vertex_descriptor` as key type and /// \link PkgSurfaceParameterizationEnums Cone_type \endlink as value type. /// /// \param mesh the seam mesh @@ -893,9 +893,9 @@ public: /// The mapping is piecewise linear (linear in each triangle). /// The result is the (u,v) pair image of each vertex of the 3D surface. /// - /// \tparam ConeMap must be a model of `AssociativeContainer` with key type - /// `boost::graph_traits::%vertex_descriptor` and - /// \link PkgSurfaceParameterizationEnums Cone_type \endlink as value type. + /// \tparam ConeMap must be a model of AssociativeContainer + /// with key type `boost::graph_traits::%vertex_descriptor` and + /// \link PkgSurfaceParameterizationEnums Cone_type \endlink as value type. /// \tparam VertexUVmap must be a model of `ReadWritePropertyMap` with /// `boost::graph_traits::%vertex_descriptor` as key type and /// %Point_2 (type deduced from `Seam_mesh` using `Kernel_traits`) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h index 247f1c065fa..b634c2197cf 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_enums.h @@ -45,9 +45,9 @@ enum Weight_type /// A classification type for the cones used in Orbifold Tutte parameterization. enum Cone_type { - First_unique_cone = 0, ///< marker for the cone found at the beginning of the seam. - Second_unique_cone, ///< marker for the cone found at the end of the seam. - Duplicated_cone ///< marker for all the other cones. Cones are duplicated in the sense + First_unique_cone = 0, ///< Marker for the cone found at the beginning of the seam. + Second_unique_cone, ///< Marker for the cone found at the end of the seam. + Duplicated_cone ///< Marker for all the other cones. Cones are duplicated in the sense /// that when the seam is "opened", the cone appears /// at two different positions. }; diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h index 221a9a49ecc..a2551a7cc5e 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h @@ -106,18 +106,19 @@ public: /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions /// /// Compute the shortest path between `source` and `target` over `mesh`, using -/// a Dijkstra algorithm. +/// +/// boost::dijkstra_shortest_paths(). /// /// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. /// \tparam EdgeOutputIterator A model of `OutputIterator` with value type -/// `boost::graph_traits::edge_descriptor`. +/// `boost::graph_traits::%edge_descriptor`. /// -/// \param tm the triangular mesh to be parameterized +/// \param mesh the triangular mesh to be parameterized /// \param source, target the extremities of the path to be computed /// \param oi the output iterator /// /// \pre `source` and `target` are vertices of `mesh`. -/// \pre `source != target`. +/// \pre `source != target` template void compute_shortest_paths_between_two_cones(const TriangleMesh& mesh, typename boost::graph_traits::vertex_descriptor source, @@ -169,15 +170,15 @@ void compute_shortest_paths_between_two_cones(const TriangleMesh& mesh, /// /// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. /// \tparam InputConesForwardIterator A model of `ForwardIterator` with value type -/// `boost::graph_traits::vertex_descriptor`. -/// \tparam SeamContainer A model of `SequenceContainer` with value type `boost::graph_traits::edge_descriptor`. +/// `boost::graph_traits::%vertex_descriptor`. +/// \tparam SeamContainer A model of SequenceContainer +/// with value type `boost::graph_traits::%edge_descriptor`. /// /// \param mesh the triangular mesh on which paths are computed -/// \param first, beyond the cones, which form the extremities of the path +/// \param first, beyond a range of cones /// \param seams a container that will store the paths, as a sequence of edges of the mesh. /// -/// \pre `source` and `target` are vertices of `mesh`. -/// \pre `source != target`. +/// \pre `std::distance(first,beyond) > 1` template void compute_shortest_paths_between_cones(const TriangleMesh& mesh, InputConesForwardIterator first, InputConesForwardIterator beyond, From b3dd5445450177b3922bdb2f20b5274cf48d7823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 31 Jan 2018 10:20:08 +0100 Subject: [PATCH 52/84] Minor doc change --- .../Orbifold_Tutte_parameterizer_3.h | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 3affb2f23fa..14af6eb7078 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 @@ -79,12 +79,12 @@ namespace Surface_mesh_parameterization { /// \tparam VertexIndexMap must be a model of `ReadablePropertyMap` with /// `boost::graph_traits::%vertex_descriptor` as key type and /// a unique integer as value type. -/// \tparam ConeOutputInserter a model of `OutputIterator` with value type +/// \tparam ConeOutputIterator a model of `OutputIterator` with value type /// `boost::graph_traits::%vertex_descriptor`. /// /// \param tm the triangular mesh to be parameterized /// \param in the input stream -/// \param vpmap an initialized vertex - index map +/// \param vpmap an initialized vertex index map /// \param out the output iterator /// /// \pre The number of cones must match the chosen \link PkgSurfaceParameterizationEnums Orbifold_type \endlink. @@ -92,8 +92,8 @@ namespace Surface_mesh_parameterization { /// /// \return The corresponding vertex descriptors are output, in the same order as the input integers, in `out`. /// The function checks if the input is valid (no duplicate, correct number of cones) and returns an `Error_code`. -template -Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, VertexIndexMap vpmap, ConeOutputInserter out) +template +Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, VertexIndexMap vpmap, ConeOutputIterator out) { typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; typedef typename boost::graph_traits::vertex_iterator TM_vertex_iterator; @@ -147,8 +147,8 @@ Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, VertexIndexMap /// Same as above, using the default indexation of the vertices of `tm`: vertices /// are numbered from `0` to `num_vertices(tm)-1`, in the order that they appear /// while calling `vertices(tm)`. -template -Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, ConeOutputInserter out) +template +Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, ConeOutputIterator out) { typedef typename boost::graph_traits::vertex_descriptor TM_vertex_descriptor; typedef typename boost::graph_traits::vertex_iterator TM_vertex_iterator; @@ -170,8 +170,8 @@ Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, ConeOutputInser /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions /// /// Same as above, but from a file instead of a stream. -template -Error_code read_cones(const TriangleMesh& pm, const char* filename, VertexIndexMap vpmap, ConeOutputInserter out) +template +Error_code read_cones(const TriangleMesh& pm, const char* filename, VertexIndexMap vpmap, ConeOutputIterator out) { std::ifstream in(filename); return read_cones(pm, in, vpmap, out); @@ -182,8 +182,8 @@ Error_code read_cones(const TriangleMesh& pm, const char* filename, VertexIndexM /// Same as above, but from a file instead of a stream. The default indexation /// of the vertices of `tm` is used: vertices are numbered from `0` to `num_vertices(tm)-1`, /// in the order that they appear while calling `vertices(tm)`. -template -Error_code read_cones(const TriangleMesh& pm, const char* filename, ConeOutputInserter out) +template +Error_code read_cones(const TriangleMesh& pm, const char* filename, ConeOutputIterator out) { std::ifstream in(filename); return read_cones(pm, in, out); From 92ac7b0eeffcad45e7ed59cfaa08030373f703b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 1 Feb 2018 10:28:38 +0100 Subject: [PATCH 53/84] Fixed some variable name inconsistencies --- .../Orbifold_Tutte_parameterizer_3.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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 14af6eb7078..36547e9320a 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 @@ -69,10 +69,10 @@ namespace Surface_mesh_parameterization { /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions /// /// Read a serie of cones from an input stream. Cones are passed as an -/// integer value that is the index of a vertex handle in the mesh `pm`, using +/// integer value that is the index of a vertex handle in the mesh tm`, using /// the vertex index property map `vpmap` for correspondency. /// -/// \attention The mesh is here `sm`, it is the base mesh of the CGAL::Seam_mesh +/// \attention The mesh is here `tm`, it is the base mesh of the CGAL::Seam_mesh /// that is passed in input, not the seam mesh itself. /// /// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. @@ -119,7 +119,7 @@ Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, VertexIndexMap return ERROR_WRONG_PARAMETER; } - // Locate the cones in the underlying mesh 'pm' + // Locate the cones in the underlying mesh 'tm' std::vector cone_vds_in_tm(cones.size()); // need this to keep the correct order // Since the cones are unique, we only need to loop all the vertices once @@ -171,10 +171,10 @@ Error_code read_cones(const TriangleMesh& tm, std::ifstream& in, ConeOutputItera /// /// Same as above, but from a file instead of a stream. template -Error_code read_cones(const TriangleMesh& pm, const char* filename, VertexIndexMap vpmap, ConeOutputIterator out) +Error_code read_cones(const TriangleMesh& tm, const char* filename, VertexIndexMap vpmap, ConeOutputIterator out) { std::ifstream in(filename); - return read_cones(pm, in, vpmap, out); + return read_cones(tm, in, vpmap, out); } /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions @@ -183,10 +183,10 @@ Error_code read_cones(const TriangleMesh& pm, const char* filename, VertexIndexM /// of the vertices of `tm` is used: vertices are numbered from `0` to `num_vertices(tm)-1`, /// in the order that they appear while calling `vertices(tm)`. template -Error_code read_cones(const TriangleMesh& pm, const char* filename, ConeOutputIterator out) +Error_code read_cones(const TriangleMesh& tm, const char* filename, ConeOutputIterator out) { std::ifstream in(filename); - return read_cones(pm, in, out); + return read_cones(tm, in, out); } /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions From 11d5e2ec5026076e6659af2fb75001a9a23a7c28 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Feb 2018 10:13:06 +0000 Subject: [PATCH 54/84] increment in the loop instead of decrement, after change from int to std::size_t as the latter is never negative --- .../include/CGAL/Arr_geometry_traits/Bezier_cache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ffe445b98f1..c8166bb0cd5 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 @@ -751,11 +751,11 @@ _Bezier_cache::_compute_resultant // Initialize it with copies of the two bivariate polynomials. for (i = 0; i < n; i++) - for (j = m; j >= 0; j--) + for (j = 0; j <= m; ++j) mat[i][i + j] = bp1[j]; for (i = 0; i < m; i++) - for (j = n; j >= 0; j--) + for (j = 0; j <= n;++j) mat[n + i][i + j] = bp2[j]; // Perform Gaussian elimination on the Sylvester matrix. The goal is to @@ -850,7 +850,7 @@ _Bezier_cache::_compute_resultant Polynomial diag_prod = mat[dim - 1][dim - 1]; CGAL_assertion (exp_fact [dim - 1] == 0); - for (i = dim - 2; i >= 0; i--) + for (i = 0; i+2 <= dim; ++i) { // Try to avoid unnecessary multiplications by ignoring the current // diagonal item if its exponent in the normalization factor is greater From c9728abdeeecab06eeedba5fc116d1f87bef60a3 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Feb 2018 10:52:44 +0000 Subject: [PATCH 55/84] build CORE lib without warnings --- CGAL_Core/include/CGAL/CORE/BigFloat_impl.h | 12 ++++--- CGAL_Core/include/CGAL/CORE/CoreIO_impl.h | 39 +++++++++++---------- CGAL_Core/include/CGAL/CORE/Expr_impl.h | 4 +++ CGAL_Core/include/CGAL/CORE/Real_impl.h | 6 +++- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index b07c3754ab7..0554fe2a172 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -48,6 +48,8 @@ #define CGAL_INLINE_FUNCTION #endif +#include + #include #include #include @@ -942,7 +944,7 @@ BigFloatRep::toDecimal(unsigned int width, bool Scientific) const { return toDecimal(width, true); } } - decOut.noSignificant = decRep.length(); + decOut.noSignificant = static_cast(decRep.length()); if (L10 + 1 < (long)width ) { decRep.insert(L10 + 1, "."); } else { // L10 + 1 == width @@ -957,7 +959,7 @@ BigFloatRep::toDecimal(unsigned int width, bool Scientific) const { decRep = round(decRep, L10, width ); // cannot overflow since there are L10 leading zeroes. } - decOut.noSignificant = decRep.length() - (-L10); + decOut.noSignificant = static_cast(decRep.length() - (-L10)); decRep.insert(1, "."); } decOut.isScientific = false; @@ -1085,7 +1087,7 @@ std::istream& BigFloatRep :: operator >>(std::istream& i) { // Change to: // int status; do { - c = i.get(); + i.get(c); } 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 @@ -1135,7 +1137,7 @@ std::istream& BigFloatRep :: operator >>(std::istream& i) { // chenli: make sure that the p is still in the range if (p - str >= size) { - int len = p - str; + std::size_t len = p - str; char *t = str; str = new char[len + 1]; memcpy(str, t, len); @@ -1327,3 +1329,5 @@ BigFloat root(const BigFloat& x, unsigned long k, CORE_MEMORY_IMPL(BigFloatRep) } //namespace CORE + +#include diff --git a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h index 53bb3edfd53..bbc582fa808 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreIO_impl.h @@ -102,15 +102,15 @@ void append_char (char * &s, int & sz, int pos, char c) { // skip blanks, tabs, line breaks and comment lines CGAL_INLINE_FUNCTION int skip_comment_line (std::istream & in) { - int c; + char c; do { - c = in.get(); + in.get(c); while ( c == '#' ) { do { - c = in.get(); + in.get(c); } while ( c != '\n' ); - c = in.get(); + in.get(c); } } while (c == ' ' || c == '\t' || c == '\n'); @@ -123,14 +123,15 @@ int skip_comment_line (std::istream & in) { // skips '\\' followed by '\n' CGAL_INLINE_FUNCTION -int skip_backslash_new_line (std::istream & in) { - int c = in.get(); +char skip_backslash_new_line (std::istream & in) { + char c; + in.get(c); while (c == '\\') { - c = in.get(); + in.get(c); if (c == '\n') - c = in.get(); + in.get(c); else core_io_error_handler("CoreIO::operator>>", "\\ must be immediately followed by new line."); } @@ -140,10 +141,11 @@ int skip_backslash_new_line (std::istream & in) { CGAL_INLINE_FUNCTION void read_string(std::istream& in, char* &buffer, int sz) { - int c, pos=0; + char c; + int pos=0; skip_comment_line(in); - while ( (c = in.get()) != EOF ) { + while ( in.get(c) ) { if ( c == ' ' || c == '\t' || c == '\n' || c == '#') break; else @@ -159,20 +161,21 @@ void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) { int base; bool is_negate; - int c, pos = 0; + char c; + int pos = 0; skip_comment_line(in); // read sign - c = in.get(); + in.get(c); if (c == '-') { is_negate = true; - c = in.get(); + in.get(c); } else is_negate = false; // read base and compute digits if (c == '0') { - c = in.get(); + in.get(c); if (c == 'b') { base = 2; size = (maxBits == 0 || maxBits > length) ? length : maxBits; @@ -225,7 +228,7 @@ void read_base_number(std::istream& in, BigInt& m, long length, long maxBits) { CGAL_INLINE_FUNCTION -void write_base_number(std::ostream& out, char* buffer, int length, int base, int charsPerLine) { +void write_base_number(std::ostream& out, char* buffer, std::size_t length, int base, int charsPerLine) { // write big number in a format that gmp's mpz_set_str() can // automatically recognize with argument base = 0. if (base == 2) @@ -237,7 +240,7 @@ void write_base_number(std::ostream& out, char* buffer, int length, int base, in // write big number in charsPerLine. char* start, *end, c; - for (int i=0; i= length) out << start; @@ -281,7 +284,7 @@ void writeToFile(const BigInt& z, std::ostream& out, int base, int charsPerLine) // get the absoulte value string char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2]; mpz_get_str(buffer, base, c.get_mp()); - int length = std::strlen(buffer); + std::size_t length = std::strlen(buffer); // write type name of big number and length //out << "# This is an experimental big number format.\n"; @@ -343,7 +346,7 @@ void writeToFile(const BigFloat& bf, std::ostream& out, int base, int charsPerLi // get the absoulte value string char* buffer = new char[mpz_sizeinbase(c.get_mp(), base) + 2]; mpz_get_str(buffer, base, c.get_mp()); - int length = std::strlen(buffer); + std::size_t length = std::strlen(buffer); // write type name, base, length diff --git a/CGAL_Core/include/CGAL/CORE/Expr_impl.h b/CGAL_Core/include/CGAL/CORE/Expr_impl.h index 3693334a4c4..7be40c324c7 100644 --- a/CGAL_Core/include/CGAL/CORE/Expr_impl.h +++ b/CGAL_Core/include/CGAL/CORE/Expr_impl.h @@ -41,6 +41,8 @@ #define CGAL_INLINE_FUNCTION #endif +#include + #include #include #include @@ -1248,3 +1250,5 @@ template class Realbase_for; template class ConstPolyRep; template class ConstPolyRep; } //namespace CORE + +#include diff --git a/CGAL_Core/include/CGAL/CORE/Real_impl.h b/CGAL_Core/include/CGAL/CORE/Real_impl.h index a01e8a5ffa4..77ad9123fe8 100644 --- a/CGAL_Core/include/CGAL/CORE/Real_impl.h +++ b/CGAL_Core/include/CGAL/CORE/Real_impl.h @@ -42,6 +42,8 @@ #define CGAL_INLINE_FUNCTION #endif +#include + #include #include #include @@ -268,7 +270,7 @@ std::istream& operator >>(std::istream& i, Real& x) { } // chenli: make sure that the p is still in the range if (p - str >= size) { - int len = p - str; + std::ptrdiff_t len = p - str; char *t = str; str = new char[len + 1]; std::memcpy(str, t, len); @@ -291,3 +293,5 @@ std::istream& operator >>(std::istream& i, Real& x) { } //namespace CORE + +#include From e0cb4e4b4f29cf7ce42e5d1c0e057b754186396c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 2 Feb 2018 07:31:11 +0000 Subject: [PATCH 56/84] int -> std::size_t --- .../include/CGAL/Arr_geometry_traits/Bezier_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c8166bb0cd5..3abbaf9ff93 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 @@ -738,7 +738,7 @@ _Bezier_cache::_compute_resultant std::size_t i, j, k; std::vector > mat (dim); - std::vector exp_fact (dim); + std::vector exp_fact (dim); for (i = 0; i < dim; i++) { From 1ef82e471b52ef872e5d46b145012155644c24c7 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 2 Feb 2018 08:48:04 +0100 Subject: [PATCH 57/84] check if the edge is NOT a border edge before calling its opposite. --- Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index 9a5c2687cdb..73b9bd9ffc0 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -573,7 +573,8 @@ public Q_SLOTS: BOOST_FOREACH(Scene_polyhedron_selection_item::fg_edge_descriptor ed, selection_item->selected_edges) { selection_item->selected_facets.insert(face(halfedge(ed, poly), poly)); - selection_item->selected_facets.insert(face(opposite(halfedge(ed, poly), poly), poly)); + if(!is_border_edge(halfedge(ed,poly), poly)) + selection_item->selected_facets.insert(face(opposite(halfedge(ed, poly), poly), poly)); } selection_item->invalidateOpenGLBuffers(); selection_item->itemChanged(); From e7ebbd731dc064932a76a2a845d9ba257df8e5a5 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 2 Feb 2018 09:27:41 +0100 Subject: [PATCH 58/84] Add a butotn in edge selection mode that allows to select the whole boundary. --- .../Plugins/PMP/Selection_plugin.cpp | 27 ++++++++++++++++++- .../Plugins/PMP/Selection_widget.ui | 23 +++++++++++----- .../Scene_polyhedron_selection_item.cpp | 14 ++++++++++ .../Scene_polyhedron_selection_item.h | 2 ++ 4 files changed, 59 insertions(+), 7 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp index 73b9bd9ffc0..5e282606521 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_plugin.cpp @@ -121,6 +121,7 @@ public: connect(ui_widget.Select_all_button, SIGNAL(clicked()), this, SLOT(on_Select_all_button_clicked())); connect(ui_widget.Select_all_NTButton, SIGNAL(clicked()), this, SLOT(on_Select_all_NTButton_clicked())); + connect(ui_widget.Select_boundaryButton, SIGNAL(clicked()), this, SLOT(on_Select_boundaryButton_clicked())); connect(ui_widget.Add_to_selection_button, SIGNAL(clicked()), this, SLOT(on_Add_to_selection_button_clicked())); connect(ui_widget.Clear_button, SIGNAL(clicked()), this, SLOT(on_Clear_button_clicked())); connect(ui_widget.Clear_all_button, SIGNAL(clicked()), this, SLOT(on_Clear_all_button_clicked())); @@ -242,6 +243,20 @@ public Q_SLOTS: selection_item->select_all_NT(); } + // Select Boundary + void on_Select_boundaryButton_clicked() { + Scene_polyhedron_selection_item* selection_item = getSelectedItem(); + if(!selection_item) + selection_item = onTheFlyItem(); + if(!selection_item) + { + print_message("Error: there is no selected polyhedron selection item!"); + return; + } + + selection_item->select_boundary(); + } + void on_Add_to_selection_button_clicked() { @@ -359,19 +374,29 @@ public Q_SLOTS: { ui_widget.Select_all_NTButton->show(); ui_widget.Add_to_selection_button->hide(); + ui_widget.Select_boundaryButton->hide(); + Q_EMIT set_operation_mode(-1); + } + else if(index == 2) + { + ui_widget.Select_all_NTButton->hide(); + ui_widget.Add_to_selection_button->hide(); + ui_widget.Select_boundaryButton->show(); Q_EMIT set_operation_mode(-1); } else if(index == 4) { it->second->setPathSelection(true); - ui_widget.Add_to_selection_button->show(); ui_widget.Select_all_NTButton->hide(); + ui_widget.Add_to_selection_button->show(); + ui_widget.Select_boundaryButton->show(); Q_EMIT set_operation_mode(-2); } else { ui_widget.Add_to_selection_button->hide(); ui_widget.Select_all_NTButton->hide(); + ui_widget.Select_boundaryButton->hide(); it->second->setPathSelection(false); Q_EMIT set_operation_mode(-1); } diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_widget.ui b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_widget.ui index 081d48573ea..e46381727ba 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_widget.ui +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Selection_widget.ui @@ -7,7 +7,7 @@ 0 0 613 - 334 + 342 @@ -153,11 +153,22 @@ - - - Select All Non Triangle - - + + + + + Select All Non Triangle + + + + + + + Select Boundary Edges + + + + diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index a82f1face6d..3f91e00f6ec 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -2249,3 +2249,17 @@ bool Scene_polyhedron_selection_item::shouldDisplayIds(CGAL::Three::Scene_item * return d->item->polyhedron_item() == current_item; return false; } + +void Scene_polyhedron_selection_item::select_boundary() +{ + Face_graph* fg = polyhedron_item()->face_graph(); + BOOST_FOREACH(halfedge_descriptor hd, halfedges(*fg)) + { + if(is_border_edge(hd, *fg)) + { + selected_edges.insert(edge(hd, *fg)); + } + } + invalidateOpenGLBuffers(); + redraw(); +} diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h index c46ed15b943..b4979aedfff 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.h @@ -440,6 +440,8 @@ public: break; } } + + void select_boundary(); void select_all_NT(); // select all of vertex, facet or edge (use fg_vertex_descriptor, fg_face_descriptor, fg_edge_descriptor as template argument) template From 7a5e92d30740a940e9f8fda07202ab90e4e9522c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 5 Feb 2018 08:03:08 +0100 Subject: [PATCH 59/84] replace halfedge by fg_halfedge --- Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp index 3f91e00f6ec..4502157e1c9 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_selection_item.cpp @@ -2253,7 +2253,7 @@ bool Scene_polyhedron_selection_item::shouldDisplayIds(CGAL::Three::Scene_item * void Scene_polyhedron_selection_item::select_boundary() { Face_graph* fg = polyhedron_item()->face_graph(); - BOOST_FOREACH(halfedge_descriptor hd, halfedges(*fg)) + BOOST_FOREACH(fg_halfedge_descriptor hd, halfedges(*fg)) { if(is_border_edge(hd, *fg)) { From 123dafc5cfefc359f17bc3ca76fba39d7134149e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 5 Feb 2018 10:30:45 +0100 Subject: [PATCH 60/84] Doc fixes --- .../Orbifold_Tutte_parameterizer_3.h | 14 +++++++------- .../orbifold_shortest_path.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) 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 36547e9320a..85e309b3b2a 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 @@ -72,7 +72,7 @@ namespace Surface_mesh_parameterization { /// integer value that is the index of a vertex handle in the mesh tm`, using /// the vertex index property map `vpmap` for correspondency. /// -/// \attention The mesh is here `tm`, it is the base mesh of the CGAL::Seam_mesh +/// \attention The mesh is here `tm`, it is the base mesh of the `CGAL::Seam_mesh` /// that is passed in input, not the seam mesh itself. /// /// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. @@ -192,14 +192,14 @@ Error_code read_cones(const TriangleMesh& tm, const char* filename, ConeOutputIt /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions /// /// Locate the cones on the seam mesh (that is, find the corresponding seam mesh -/// vertex_descriptor) and mark them with a tag to indicate whether the cone is a +/// `vertex_descriptor`) and mark them with a tag to indicate whether the cone is a /// simple cone or a duplicated cone (see \link PkgSurfaceParameterizationEnums Cone_type \endlink). /// /// \attention The cones must be ordered: the first and last cones are the extremetities of the seam. /// -/// \tparam SeamMesh is the same class CGAL::Seam_mesh that is passed to the parameterized. -/// It is a template parameter for convenience (not having to rewrite the template -/// parameters of the class CGAL::Seam_mesh). +/// \tparam SeamMesh is the same class `CGAL::Seam_mesh` that is passed to the parameterizer. +/// It is a template parameter of this function for convenience, to avoid +/// having to pass the various template parameters of the class `CGAL::Seam_mesh`. /// \tparam ConeInputBidirectionalIterator must be a model of `BidirectionalIterator` /// with value type `boost::graph_traits::%vertex_descriptor`. /// \tparam ConeMap must be a model of AssociativeContainer @@ -208,8 +208,8 @@ Error_code read_cones(const TriangleMesh& tm, const char* filename, ConeOutputIt /// /// \param mesh the seam mesh /// \param first, beyond the range of cones, as vertex descriptors of the base mesh. -/// \param cones a writable property map that will store the cones as vertex descriptors -/// of the seam mesh and associate their respective cone types. +/// \param cones an object of type `ConeMap`. Cones will be stored in this container +/// as vertex descriptors of the seam mesh, along with their associated cone types. template bool locate_cones(const SeamMesh& mesh, ConeInputBidirectionalIterator first, ConeInputBidirectionalIterator beyond, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h index a2551a7cc5e..b043f97f5a7 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/orbifold_shortest_path.h @@ -106,7 +106,7 @@ public: /// \ingroup PkgSurfaceParameterizationOrbifoldHelperFunctions /// /// Compute the shortest path between `source` and `target` over `mesh`, using -/// +/// /// boost::dijkstra_shortest_paths(). /// /// \tparam TriangleMesh A triangle mesh, model of `FaceListGraph` and `HalfedgeListGraph`. From 17594d2795e9d5edeaf95e6f5dcc3362a5ba8cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 5 Feb 2018 12:31:40 +0100 Subject: [PATCH 61/84] Reduced the amount of \sa in SMP's doc (no need to \sa every other parameterizer) --- .../ARAP_parameterizer_3.h | 6 ------ .../Barycentric_mapping_parameterizer_3.h | 12 +++--------- .../Discrete_authalic_parameterizer_3.h | 6 ------ .../Discrete_conformal_map_parameterizer_3.h | 6 ------ .../LSCM_parameterizer_3.h | 6 ------ .../Mean_value_coordinates_parameterizer_3.h | 6 ------ .../Orbifold_Tutte_parameterizer_3.h | 7 +------ 7 files changed, 4 insertions(+), 45 deletions(-) diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/ARAP_parameterizer_3.h index 833d2c4f740..5c7fbd73c6e 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 @@ -155,12 +155,6 @@ namespace Surface_mesh_parameterization { /// \endcode /// /// \sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Orbifold_Tutte_parameterizer_3` /// template < class TriangleMesh_, class BorderParameterizer_ = Default, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h index dea32baaf23..80e3b1b7fa0 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h @@ -72,15 +72,9 @@ namespace Surface_mesh_parameterization { /// Eigen::BiCGSTAB::EigenType, /// Eigen::IncompleteLUT< double > > > /// \endcode -/*! -\sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` -\sa `CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3` -\sa `CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3` -\sa `CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3` -\sa `CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3` -\sa `CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3` -\sa `CGAL::Surface_mesh_parameterization::Orbifold_Tutte_parameterizer_3` - */ +/// +/// \sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` +/// template < typename TriangleMesh_, typename BorderParameterizer_ = Default, typename SolverTraits_ = Default > diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h index 76d9b7e90ec..4ac35ba2275 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_authalic_parameterizer_3.h @@ -78,12 +78,6 @@ namespace Surface_mesh_parameterization { /// \endcode /// /// \sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Orbifold_Tutte_parameterizer_3` /// template < class TriangleMesh_, class BorderParameterizer_ = Default, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h index ca3a04dea00..60e376c6baa 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Discrete_conformal_map_parameterizer_3.h @@ -78,12 +78,6 @@ namespace Surface_mesh_parameterization { /// \endcode /// /// \sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Orbifold_Tutte_parameterizer_3` /// template < typename TriangleMesh_, typename BorderParameterizer_ = Default, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h index d1d3ac17e17..bfc9eb6588d 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h @@ -87,12 +87,6 @@ namespace Surface_mesh_parameterization { /// \endcode /// /// \sa `CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Orbifold_Tutte_parameterizer_3` /// template < class TriangleMesh_, class BorderParameterizer_ = Default, diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h index 535fbc7f14f..e8afb3ee670 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Mean_value_coordinates_parameterizer_3.h @@ -76,12 +76,6 @@ namespace Surface_mesh_parameterization { /// \endcode /// /// \sa `CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Orbifold_Tutte_parameterizer_3` /// template < class TriangleMesh_, class BorderParameterizer_ = Default, 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 85e309b3b2a..40c66bfa68c 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 @@ -376,12 +376,7 @@ bool locate_unordered_cones(const SeamMesh& mesh, /// Eigen::UmfPackLU::EigenType> > /// \endcode /// -/// \sa `CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3` -/// \sa `CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3` +/// \sa \ref PkgSurfaceParameterizationOrbifoldHelperFunctions /// template < typename SeamMesh, typename SolverTraits_ = Default> From b5b3782aaab833371db299415a8adbc433f7fe50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 5 Feb 2018 20:24:04 +0100 Subject: [PATCH 62/84] Fixed typo... --- .../Orbifold_Tutte_parameterizer_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 40c66bfa68c..46e5d478ef6 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 @@ -195,7 +195,7 @@ Error_code read_cones(const TriangleMesh& tm, const char* filename, ConeOutputIt /// `vertex_descriptor`) and mark them with a tag to indicate whether the cone is a /// simple cone or a duplicated cone (see \link PkgSurfaceParameterizationEnums Cone_type \endlink). /// -/// \attention The cones must be ordered: the first and last cones are the extremetities of the seam. +/// \attention The cones must be ordered: the first and last cones are the extremities of the seam. /// /// \tparam SeamMesh is the same class `CGAL::Seam_mesh` that is passed to the parameterizer. /// It is a template parameter of this function for convenience, to avoid From f23547ef8ea2c78f2199ca18784f1a6067adf9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 5 Feb 2018 20:28:20 +0100 Subject: [PATCH 63/84] Reworded sentence --- .../Orbifold_Tutte_parameterizer_3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 46e5d478ef6..e7fb8be55b2 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 @@ -197,9 +197,9 @@ Error_code read_cones(const TriangleMesh& tm, const char* filename, ConeOutputIt /// /// \attention The cones must be ordered: the first and last cones are the extremities of the seam. /// -/// \tparam SeamMesh is the same class `CGAL::Seam_mesh` that is passed to the parameterizer. -/// It is a template parameter of this function for convenience, to avoid -/// having to pass the various template parameters of the class `CGAL::Seam_mesh`. +/// \tparam SeamMesh is the same mesh that is passed to the parameterizer. It is an object of type`CGAL::Seam_mesh`, +/// but is passed here as a template parameter for convenience, to avoid +/// having to pass the multiple template parameters of the class `CGAL::Seam_mesh`. /// \tparam ConeInputBidirectionalIterator must be a model of `BidirectionalIterator` /// with value type `boost::graph_traits::%vertex_descriptor`. /// \tparam ConeMap must be a model of AssociativeContainer From 69ca424c5e25e4cea8b69bda88a8ce46b0b096ba Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Feb 2018 15:08:54 +0100 Subject: [PATCH 64/84] Add CGAL_DEV_MODE --- Installation/CMakeLists.txt | 2 +- Installation/cmake/modules/CGALConfig_binary.cmake.in | 4 +++- Installation/cmake/modules/CGALConfig_install.cmake.in | 4 +++- Installation/cmake/modules/CGAL_Common.cmake | 5 +++++ Installation/cmake/modules/CGAL_SetupFlags.cmake | 6 +----- Installation/cmake/modules/UseCGAL.cmake | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 477c6cdb340..fd14bb7367b 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -551,7 +551,7 @@ message( "== Generate version files (DONE) ==\n") # #-------------------------------------------------------------------------------------------------- -if( RUNNING_CGAL_AUTO_TEST ) +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) message("== Set up flags ==") # Ugly hack to be compatible with current CGAL testsuite process (as of diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index daee7e561d8..28fd9a1a872 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -186,7 +186,9 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) # Temporary? Change the CMAKE module path cgal_setup_module_path() -if( RUNNING_CGAL_AUTO_TEST ) +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) + # Do not use -isystem for CGAL include paths + set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) # Ugly hack to be compatible with current CGAL testsuite process (as of # Nov. 2017). -- Laurent Rineau include(CGAL_SetupFlags) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index 400b31e5273..04b71fc873f 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -158,7 +158,9 @@ include(${CGAL_MODULES_DIR}/CGAL_Macros.cmake) # Temporary? Change the CMAKE module path cgal_setup_module_path() -if( RUNNING_CGAL_AUTO_TEST ) +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) + # Do not use -isystem for CGAL include paths + set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) # Ugly hack to be compatible with current CGAL testsuite process (as of # Nov. 2017). -- Laurent Rineau include(CGAL_SetupFlags) diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index 68a9791fde7..93d7aff6631 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -1,5 +1,10 @@ include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) +option(CGAL_DEV_MODE " +Activate the CGAL developers mode. \ +See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE" + FALSE) + if(RUNNING_CGAL_AUTO_TEST) # Just to avoid a warning from CMake if that variable is set on the command line... endif() diff --git a/Installation/cmake/modules/CGAL_SetupFlags.cmake b/Installation/cmake/modules/CGAL_SetupFlags.cmake index 50465fc4a72..3b2187d9157 100644 --- a/Installation/cmake/modules/CGAL_SetupFlags.cmake +++ b/Installation/cmake/modules/CGAL_SetupFlags.cmake @@ -50,17 +50,13 @@ uniquely_add_flags( CMAKE_EXE_LINKER_FLAGS_DEBUG ${CGAL_EXE_LINKER_FLAGS_DE # Set a default build type if none is given if ( NOT CMAKE_BUILD_TYPE ) - if( RUNNING_CGAL_AUTO_TEST ) + if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Debug ) else () typed_cache_set ( STRING "Build type: Release, Debug, RelWithDebInfo or MinSizeRel" CMAKE_BUILD_TYPE Release ) endif() endif() -if( RUNNING_CGAL_AUTO_TEST ) - add_definitions(-DCGAL_TEST_SUITE) -endif() - if ( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" AND NOT "${CMAKE_BUILD_TYPE}" STREQUAL "MinSizeRel" ) message( FATAL_ERROR "${CMAKE_BUILD_TYPE} is not a valid build type: only Release, Debug, RelWithDebInfo or MinSizeRel is allowed" ) diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index 9a70bf7ec18..1768e3a62a5 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -18,7 +18,7 @@ if(NOT USE_CGAL_FILE_INCLUDED) set(USE_CGAL_FILE_INCLUDED 1) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Common.cmake) - if( RUNNING_CGAL_AUTO_TEST ) + if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST ) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_SetupFlags.cmake) else() include(${CMAKE_CURRENT_LIST_DIR}/CGAL_display_flags.cmake) From 7aae8eae3895be5b132845b9738ce582fb5040bb Mon Sep 17 00:00:00 2001 From: Konstantinos Katrioplas Date: Wed, 7 Feb 2018 18:55:56 +0100 Subject: [PATCH 65/84] replace deprecated function --- Number_types/include/CGAL/GMP/Gmpfi_type.h | 4 ++-- Number_types/include/CGAL/GMP/Gmpfr_type.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Number_types/include/CGAL/GMP/Gmpfi_type.h b/Number_types/include/CGAL/GMP/Gmpfi_type.h index 85f993d3cac..b5328e3a05f 100644 --- a/Number_types/include/CGAL/GMP/Gmpfi_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfi_type.h @@ -618,8 +618,8 @@ Gmpfi Gmpfi::kthroot(int k,Gmpfi::Precision_type p)const{ // MPFI does not provide k-th root functions CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); Gmpfi result (0, p); - mpfr_root(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD); - mpfr_root(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU); + mpfr_rootn_ui(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD); + mpfr_rootn_ui(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU); *(result._left.fr()) = result._interval.left; *(result._right.fr()) = result._interval.right; return result; diff --git a/Number_types/include/CGAL/GMP/Gmpfr_type.h b/Number_types/include/CGAL/GMP/Gmpfr_type.h index 8abb8c872b4..94e79d4ebbe 100644 --- a/Number_types/include/CGAL/GMP/Gmpfr_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfr_type.h @@ -885,7 +885,7 @@ CGAL_GMPFR_ARITHMETIC_FUNCTION(cbrt,mpfr_cbrt) inline Gmpfr Gmpfr::kthroot(int k,std::float_round_style r)const{ Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); - mpfr_root(result.fr(),fr(),k,_gmp_rnd(r)); + mpfr_rootn_ui(result.fr(),fr(),k,_gmp_rnd(r)); return result; } @@ -895,7 +895,7 @@ Gmpfr Gmpfr::kthroot(int k, std::float_round_style r)const{ CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); Gmpfr result(0,p); - mpfr_root(result.fr(),fr(),k,_gmp_rnd(r)); + mpfr_rootn_ui(result.fr(),fr(),k,_gmp_rnd(r)); return result; } From 330550627b9653da34abd886db5bf5f8c02eb902 Mon Sep 17 00:00:00 2001 From: Konstantinos Katrioplas Date: Thu, 8 Feb 2018 10:35:25 +0100 Subject: [PATCH 66/84] conditional macros --- Number_types/include/CGAL/GMP/Gmpfi_type.h | 9 +++++++-- Number_types/include/CGAL/GMP/Gmpfr_type.h | 12 ++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Number_types/include/CGAL/GMP/Gmpfi_type.h b/Number_types/include/CGAL/GMP/Gmpfi_type.h index b5328e3a05f..8a1b2981e73 100644 --- a/Number_types/include/CGAL/GMP/Gmpfi_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfi_type.h @@ -618,8 +618,13 @@ Gmpfi Gmpfi::kthroot(int k,Gmpfi::Precision_type p)const{ // MPFI does not provide k-th root functions CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); Gmpfi result (0, p); - mpfr_rootn_ui(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD); - mpfr_rootn_ui(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU); + #if(MPFR_VERSION_MAJOR < 4) + mpfr_root(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD) + mpfr_root(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU); + #else + mpfr_rootn_ui(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD); + mpfr_rootn_ui(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU); + #endif *(result._left.fr()) = result._interval.left; *(result._right.fr()) = result._interval.right; return result; diff --git a/Number_types/include/CGAL/GMP/Gmpfr_type.h b/Number_types/include/CGAL/GMP/Gmpfr_type.h index 94e79d4ebbe..532beca5fce 100644 --- a/Number_types/include/CGAL/GMP/Gmpfr_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfr_type.h @@ -885,7 +885,11 @@ CGAL_GMPFR_ARITHMETIC_FUNCTION(cbrt,mpfr_cbrt) inline Gmpfr Gmpfr::kthroot(int k,std::float_round_style r)const{ Gmpfr result(0,CGAL_GMPFR_MEMBER_PREC()); - mpfr_rootn_ui(result.fr(),fr(),k,_gmp_rnd(r)); + #if(MPFR_VERSION_MAJOR < 4) + mpfr_root(result.fr(),fr(),k,_gmp_rnd(r)); + #else + mpfr_rootn_ui(result.fr(),fr(),k,_gmp_rnd(r)); + #endif return result; } @@ -895,7 +899,11 @@ Gmpfr Gmpfr::kthroot(int k, std::float_round_style r)const{ CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); Gmpfr result(0,p); - mpfr_rootn_ui(result.fr(),fr(),k,_gmp_rnd(r)); + #if(MPFR_VERSION_MAJOR < 4) + mpfr_root(result.fr(),fr(),k,_gmp_rnd(r)); + #else + mpfr_rootn_ui(result.fr(),fr(),k,_gmp_rnd(r)); + #endif return result; } From abe933a68426f8f45c27a0fde68a66a5d142ce81 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 9 Feb 2018 15:00:14 +0000 Subject: [PATCH 67/84] Address the warning concerning SCL_SECURE for VC++ --- CGAL_Core/include/CGAL/CORE/BigFloat_impl.h | 14 ++++---------- CGAL_Core/include/CGAL/CORE/CoreAux_impl.h | 15 ++++++++++----- Installation/CMakeLists.txt | 2 +- .../modules/CGAL_SetupCGALDependencies.cmake | 2 +- Profiling_tools/include/CGAL/Real_timer_impl.h | 2 +- Stream_support/include/CGAL/IO/io.h | 6 ++---- 6 files changed, 19 insertions(+), 22 deletions(-) diff --git a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h index b07c3754ab7..df9277d5a79 100644 --- a/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h +++ b/CGAL_Core/include/CGAL/CORE/BigFloat_impl.h @@ -52,6 +52,7 @@ #include #include #include +#include namespace CORE { @@ -919,16 +920,9 @@ BigFloatRep::toDecimal(unsigned int width, bool Scientific) const { } else { // L10 < 0 decRep += '-'; } - char eBuf[48]; // enought to hold long number L10 - int ne = 0; - if ((ne = sprintf(eBuf, "%ld", labs(L10))) >= 0) { - eBuf[ne] = '\0'; - } else { - //perror("BigFloat.cpp: Problem in outputing the exponent!"); - core_error("BigFloat error: Problem in outputing the exponent", - __FILE__, __LINE__, true); - } - decRep += eBuf; + std::ostringstream oss; + oss << labs(L10); + decRep += oss.str(); decOut.isScientific = true; } } else { diff --git a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h index 027972559e8..a0e2703a083 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h @@ -149,7 +149,7 @@ long gcd(long m, long n) { return p; } -// char* core_itoa(int n, char* buffer) +// char* core_itoa(int n, char* buffer, int buffer_size) // returns a pointer to the null-terminated string in buffer // NOTES: // 0. Buffer size should be 17 bytes (resp., 33 bytes, 65 bytes) on 16-bit @@ -161,8 +161,13 @@ long gcd(long m, long n) { // 3. A more general program should take a 3rd argument (the radix of // output number). We assume radix 10. CGAL_INLINE_FUNCTION -char * core_itoa(int n, char* buffer) { - std::sprintf(buffer, "%d", n); +char * core_itoa(int n, char* buffer, int buffer_size) { +#if defined(_MSC_VER) + sprintf_s(buffer, buffer_size, "%d", n); +#else + CGAL_USE(buffer_size); + std::sprintf(buffer, "%d", n); +#endif return buffer; } @@ -204,9 +209,9 @@ void core_error(std::string msg, std::string file, int lineno, bool err) { if (err) { char buf[65]; // perror((std::string("CORE ERROR") + " (file " + file + ", line " - // + core_itoa(lineno,buf) +"):" + msg + "\n").c_str()); + // + core_itoa(lineno,buf, 65) +"):" + msg + "\n").c_str()); std::cerr << (std::string("CORE ERROR") + " (file " + file + ", line " - + core_itoa(lineno,buf) +"):" + msg + "\n").c_str(); + + core_itoa(lineno,buf, 65) +"):" + msg + "\n").c_str(); std::exit(1); //Note: do not call abort() } } diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 477c6cdb340..ebc91540c94 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -454,7 +454,7 @@ message( STATUS "System: ${CMAKE_SYSTEM_NAME}" ) if( MSVC ) - uniquely_add_flags ( CGAL_CXX_FLAGS "-D_CRT_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_DEPRECATE;-D_CRT_SECURE_NO_WARNINGS;-D_SCL_SECURE_NO_WARNINGS" ) + uniquely_add_flags ( CGAL_CXX_FLAGS "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS" ) uniquely_add_flags ( CGAL_CXX_FLAGS "/fp:strict" ) uniquely_add_flags ( CGAL_CXX_FLAGS "/fp:except-" ) uniquely_add_flags ( CGAL_CXX_FLAGS "/wd4503" ) # Suppress warnings C4503 about "decorated name length exceeded" diff --git a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake index 15e4ae597f8..12113f94eb4 100644 --- a/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGALDependencies.cmake @@ -112,7 +112,7 @@ function(CGAL_setup_CGAL_dependencies target) # Now setup compilation flags if(MSVC) target_compile_options(${target} ${keyword} - "-D_CRT_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_DEPRECATE;-D_CRT_SECURE_NO_WARNINGS;-D_SCL_SECURE_NO_WARNINGS" + "-D_SCL_SECURE_NO_DEPRECATE;-D_SCL_SECURE_NO_WARNINGS" "/fp:strict" "/fp:except-" "/wd4503" # Suppress warnings C4503 about "decorated name length exceeded" diff --git a/Profiling_tools/include/CGAL/Real_timer_impl.h b/Profiling_tools/include/CGAL/Real_timer_impl.h index 9be691f206f..39bd529ed4b 100644 --- a/Profiling_tools/include/CGAL/Real_timer_impl.h +++ b/Profiling_tools/include/CGAL/Real_timer_impl.h @@ -58,7 +58,7 @@ double Real_timer::get_real_time() const { // by the caller. #if defined(_MSC_VER) struct _timeb t; - _ftime(&t); + _ftime_s(&t); return double(t.time) + double(t.millitm) / 1000.0; #elif defined (__MINGW32__) struct timeb t; diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index 0a580d6da31..ead904e3384 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -176,8 +176,7 @@ public: break; } }while(true); - - if(sscanf(buffer.c_str(), "%lf", &t) != 1) { + if(sscanf_s(buffer.c_str(), "%lf", &t) != 1) { // if a 'buffer' does not contain a double, set the fail bit. is.setstate(std::ios_base::failbit); } @@ -229,8 +228,7 @@ public: break; } }while(true); - - if(sscanf(buffer.c_str(), "%f", &t) != 1) { + if(sscanf_s(buffer.c_str(), "%f", &t) != 1) { // if a 'buffer' does not contain a double, set the fail bit. is.setstate(std::ios_base::failbit); } From d38fea5ffe6da0dbc0362ea4ef694fc37589acf5 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 12 Feb 2018 09:44:10 +0000 Subject: [PATCH 68/84] Add missing #include --- CGAL_Core/include/CGAL/CORE/CoreAux_impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h index a0e2703a083..763917d05f6 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h +++ b/CGAL_Core/include/CGAL/CORE/CoreAux_impl.h @@ -40,6 +40,7 @@ #define CGAL_INLINE_FUNCTION #endif +#include #include #include From 39526dd16f30b2a649de339602a0793029a06a5e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 12 Feb 2018 16:00:14 +0000 Subject: [PATCH 69/84] Mesh_3: Add access function to the stored polyhedra for the FeniCS project --- .../include/CGAL/Polyhedral_mesh_domain_with_features_3.h | 6 ++++++ .../test/Mesh_3/test_meshing_polyhedron_with_features.cpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index 719045910dd..fd9a8396b78 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -352,6 +352,12 @@ public: void detect_borders(std::vector& p); void detect_borders() { detect_borders(stored_polyhedra); }; + // non-documented, provided to the FEniCS project + const std::vector& polyhedra()const + { + return stored_polyhedra; + } + private: void load_from_file(const char* filename) { // Create input polyhedron diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp index e6f9935f45f..dbdc334df76 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp @@ -66,6 +66,9 @@ struct Polyhedron_with_features_tester : public Tester Mesh_domain domain(polyhedron, &CGAL::get_default_random()); domain.detect_features(); + // non-documented, provided to the FEniCS project + const std::vector& polyhedra = domain.polyhedra(); + // Set mesh criteria Edge_criteria edge_criteria(0.2); Facet_criteria facet_criteria(30, 0.2, 0.02); From f00158c7f517fdaa304e2724e6b355a43bc0b6cf Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 13 Feb 2018 08:09:52 +0000 Subject: [PATCH 70/84] Use CGAL_USE() --- Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp index dbdc334df76..248a1b651db 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -68,6 +69,7 @@ struct Polyhedron_with_features_tester : public Tester // non-documented, provided to the FEniCS project const std::vector& polyhedra = domain.polyhedra(); + CGAL_USE(polyhedra); // Set mesh criteria Edge_criteria edge_criteria(0.2); From e20672ea772573c76e71ee1d9b4f3707451d3431 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 13 Feb 2018 12:13:06 +0100 Subject: [PATCH 71/84] Update _test_line_face_circulator.h --- .../Triangulation_2/include/CGAL/_test_line_face_circulator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_line_face_circulator.h b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_line_face_circulator.h index 2d560f851e8..52e3f6fac3f 100644 --- a/Triangulation_2/test/Triangulation_2/include/CGAL/_test_line_face_circulator.h +++ b/Triangulation_2/test/Triangulation_2/include/CGAL/_test_line_face_circulator.h @@ -91,7 +91,7 @@ _test_line_face_circulator( const Tri & ) typename std::vector::iterator mit; typename std::vector::iterator tit; int i; - Locate_type(lt); + Locate_type lt; // insert points p - create Vertex_handle vector std::vector v; From 47307b4bfbb4adb5ddd04c7a15155a256bae1293 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 13 Feb 2018 11:51:39 +0000 Subject: [PATCH 72/84] Add the missing semi-colon --- Number_types/include/CGAL/GMP/Gmpfi_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/GMP/Gmpfi_type.h b/Number_types/include/CGAL/GMP/Gmpfi_type.h index 8a1b2981e73..38cd8639b63 100644 --- a/Number_types/include/CGAL/GMP/Gmpfi_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfi_type.h @@ -619,7 +619,7 @@ Gmpfi Gmpfi::kthroot(int k,Gmpfi::Precision_type p)const{ CGAL_assertion(p>=MPFR_PREC_MIN&&p<=MPFR_PREC_MAX); Gmpfi result (0, p); #if(MPFR_VERSION_MAJOR < 4) - mpfr_root(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD) + mpfr_root(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD); mpfr_root(&(result.mpfi())->right,right_mpfr(),k,GMP_RNDU); #else mpfr_rootn_ui(&(result.mpfi())->left, left_mpfr(), k,GMP_RNDD); From 91e1cd7faaa0632a221f98b4ecf88121fefa82f3 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 13 Feb 2018 13:27:56 +0000 Subject: [PATCH 73/84] STL_extension: Fix #2587 concerning &* applied to a CGAL::internal::vector_iterator --- STL_Extension/include/CGAL/vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/vector.h b/STL_Extension/include/CGAL/vector.h index 7bbea44d85f..84480a82f57 100644 --- a/STL_Extension/include/CGAL/vector.h +++ b/STL_Extension/include/CGAL/vector.h @@ -66,7 +66,7 @@ public: // Allows construction of const_iterator from iterator template < class A, class B, class C> - vector_iterator( const vector_iterator& i) : ptr( &*i) {} + vector_iterator( const vector_iterator& i) : ptr(i.operator->()) {} // OPERATIONS Forward Category // --------------------------- From df2e9781589b23903f2800cb4e2f7b2155d481f8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 13 Feb 2018 14:02:40 +0000 Subject: [PATCH 74/84] Fix disable/enable warnings; Fix indentation --- .../CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h | 2 +- Boolean_set_operations_2/include/CGAL/General_polygon_set_2.h | 2 +- .../Fixed_border_parameterizer_3.h | 2 +- .../include/CGAL/Surface_mesher/Surface_mesher_manifold.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 1676471f913..c9d84653e26 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 @@ -1509,7 +1509,7 @@ long Fujiwara_root_bound_log( RandomAccessIterator first, RandomAccessIterator beyond, LowerBoundLog2Abs lblog2, UpperBoundLog2AbsApproximator ublog2apx ) { - std::ptrdiff_t n = beyond - first - 1; // degree + std::ptrdiff_t n = beyond - first - 1; // degree if (n < 1) return 0; long lblog2_lcoeff = lblog2(*(beyond - 1)); 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 33e3fa40552..f18e06b9ee8 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 @@ -118,6 +118,6 @@ public: } //namespace CGAL -#include +#include #endif 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 745bd1d9be0..a1d7a824fbe 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 @@ -420,6 +420,6 @@ private: } // namespace CGAL -#include +#include #endif // CGAL_SURFACE_MESH_PARAMETERIZATION_FIXED_BORDER_PARAMETERIZER_3_H diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h index 2570b5896c0..1dc99bde68f 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Surface_mesher_manifold.h @@ -242,6 +242,6 @@ namespace CGAL { } // end namespace CGAL -#include +#include #endif // CGAL_SURFACE_MESHER_MANIFOLD_H From 07b0ddf9a5bc1cf8638c7c8b376e1d47bb869f28 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 13 Feb 2018 14:15:38 +0000 Subject: [PATCH 75/84] Fix disable/enable warnings; Fix indentation --- Mesh_3/include/CGAL/make_mesh_3.h | 2 +- Surface_mesher/include/CGAL/Multi_surface_3.h | 3 +++ Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h | 2 ++ TDS_3/include/CGAL/Triangulation_data_structure_3.h | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/make_mesh_3.h b/Mesh_3/include/CGAL/make_mesh_3.h index f8830a0f7ec..7c54c459f00 100644 --- a/Mesh_3/include/CGAL/make_mesh_3.h +++ b/Mesh_3/include/CGAL/make_mesh_3.h @@ -119,7 +119,7 @@ namespace parameters { // ----------------------------------- // Parameters - // + // ----------------------------------- // see CGAL_PRAGMA_DIAG_PUSH diff --git a/Surface_mesher/include/CGAL/Multi_surface_3.h b/Surface_mesher/include/CGAL/Multi_surface_3.h index 8236b7326fb..707a6936589 100644 --- a/Surface_mesher/include/CGAL/Multi_surface_3.h +++ b/Surface_mesher/include/CGAL/Multi_surface_3.h @@ -23,6 +23,7 @@ #include +#include namespace CGAL { @@ -74,4 +75,6 @@ namespace CGAL { }; } // end namespace CGAL, second occurrence. +#include + #endif // CGAL_MULTI_SURFACE_3_H diff --git a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h index 88e6dda563e..bec19aeb2fd 100644 --- a/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h +++ b/Surface_mesher/include/CGAL/Surface_mesher/Combining_oracle.h @@ -25,6 +25,7 @@ #include +#include #include #include @@ -156,5 +157,6 @@ namespace CGAL { } // namespace CGAL +#include #endif // CGAL_SURFACE_MESHER_COMBINING_ORACLE_H diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index 4fd3c47d164..09981b25aa3 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -28,6 +28,7 @@ #include +#include #include @@ -4011,4 +4012,6 @@ count_cells(size_type & i, bool verbose, int level) const } //namespace CGAL +#include + #endif // CGAL_TRIANGULATION_DATA_STRUCTURE_3_H From 741dbaf9f3ae530eff8dd71fa56cee1d306f0bca Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 13 Feb 2018 16:00:29 +0100 Subject: [PATCH 76/84] Fix a bug in demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt The file "Polyhedron_demo_mesh_3_plugin_cgal_code.cpp" was renamed *long* ago. I do not know why I got that CMake error only recently. --- Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt index 8e1847ebfa5..01a9c3ae17e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt @@ -6,7 +6,6 @@ if ( Boost_VERSION GREATER 103400 ) qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_thread.h ) qt5_wrap_cpp( VOLUME_MOC_OUTFILES ${CMAKE_CURRENT_SOURCE_DIR}/Volume_plane_interface.h ) qt5_wrap_ui( meshingUI_FILES Meshing_dialog.ui Smoother_dialog.ui Local_optimizers_dialog.ui ) - qt5_generate_moc( "Polyhedron_demo_mesh_3_plugin_cgal_code.cpp" "${CMAKE_CURRENT_BINARY_DIR}/Scene_c3t3_item.moc" ) polyhedron_demo_plugin(mesh_3_plugin Mesh_3_plugin Mesh_3_plugin_cgal_code.cpp Meshing_thread.cpp split_polylines.cpp ${meshingUI_FILES}) From 7ee11b7afce15676fbb154267111d5e2dd71e8ef Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 13 Feb 2018 16:02:09 +0100 Subject: [PATCH 77/84] Remove CMake Warning about /usr/share/cmake/Modules/FindBoost Those warnings are annoying because: - they happen on Linux rolling releases as soon as Boost version is more recent than CMake version, - we cannot do anything about them. Example: ``` CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:801 (message): New Boost version may have incorrect or missing dependencies and imported targets Call Stack (most recent call first): /usr/share/cmake/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES) /usr/share/cmake/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES) /mnt/testsuite/cmake/modules/CGAL_Macros.cmake:293 (find_package) /mnt/testsuite/cmake/modules/UseCGAL.cmake:46 (use_component) CMakeLists.txt:13 (include) ``` https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.12-Ic-173/Algebraic_foundations/TestReport_gimeno_Fedora-rawhide-Release.gz --- Testsuite/test/collect_cgal_testresults_from_cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index b99b14732a3..a366ed23584 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -49,7 +49,7 @@ print_testresult() # or ',' or ':'. That avoids some false positives such as # '-read_only_relocs,warning' or '-D_CRT_SECURE_NO_WARNINGS', or # 'QMessageBox::warning'. - if grep -i -E -q '(^|[^a-zA-Z_,:-])warning' CompilerOutput_$1 ProgramOutput.*.$1 + if grep -i -E -q '(^|[^a-zA-Z_,:-])warning' $(grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1) then RESULT="w" else From 721cca59a6c5cdee4d5bd4e23d63a0e85e3fa2b5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 13 Feb 2018 16:56:38 +0100 Subject: [PATCH 78/84] Use CGAL::cpp11::function in CGAL::Implicit_surface_3 That will fix the issue #2107. --- Surface_mesher/include/CGAL/Implicit_surface_3.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Surface_mesher/include/CGAL/Implicit_surface_3.h b/Surface_mesher/include/CGAL/Implicit_surface_3.h index a702e7d81ca..603ca094239 100644 --- a/Surface_mesher/include/CGAL/Implicit_surface_3.h +++ b/Surface_mesher/include/CGAL/Implicit_surface_3.h @@ -28,12 +28,15 @@ #include #include +#include namespace CGAL { template< typename GT, - typename Function_ + typename Function_ = cpp11::function + // The type of the argument `Function` will be ignored anyway. + // The parameter is here only for backward-compatibility. > class Implicit_surface_3 { @@ -42,8 +45,8 @@ namespace CGAL { typedef typename Geom_traits::Sphere_3 Sphere_3; typedef typename Geom_traits::FT FT; typedef typename Geom_traits::Point_3 Point; - typedef Function_ Function; - typedef Implicit_surface_3 Self; + typedef cpp11::function Function; + typedef Implicit_surface_3 Self; Function& function() { return func; } @@ -113,7 +116,7 @@ namespace CGAL { typename GT::Sphere_3 sphere, typename GT::FT error_bound) { - typedef Implicit_surface_3 surface; + typedef Implicit_surface_3 surface; return surface(f, sphere, error_bound); } From 02540257cf66186cce856ae4f57cf8271023cc39 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Feb 2018 10:14:38 +0100 Subject: [PATCH 79/84] fixup! Remove CMake Warning about /usr/share/cmake/Modules/FindBoost My previous commit was... well... stupid! --- Testsuite/test/collect_cgal_testresults_from_cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index a366ed23584..1aa8768de40 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -49,7 +49,7 @@ print_testresult() # or ',' or ':'. That avoids some false positives such as # '-read_only_relocs,warning' or '-D_CRT_SECURE_NO_WARNINGS', or # 'QMessageBox::warning'. - if grep -i -E -q '(^|[^a-zA-Z_,:-])warning' $(grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1) + if grep -v -F 'CMake Warning at /usr/share/cmake/Modules/FindBoost' CompilerOutput_$1 ProgramOutput.*.$1 | grep -i -E -q '(^|[^a-zA-Z_,:-])warning' then RESULT="w" else From 17eccfc5c59cfa0b6bb6475f661cacbf7c91f2ac Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 14 Feb 2018 12:18:21 +0000 Subject: [PATCH 80/84] Call std::isfinite() if possible --- Number_types/include/CGAL/double.h | 5 ++++- Number_types/include/CGAL/float.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Number_types/include/CGAL/double.h b/Number_types/include/CGAL/double.h index 4816ed63f9f..c96d7319c5b 100644 --- a/Number_types/include/CGAL/double.h +++ b/Number_types/include/CGAL/double.h @@ -169,10 +169,13 @@ template <> class Real_embeddable_traits< double > : public CGAL::unary_function< Type, bool > { public : bool operator()( const Type& x ) const { -#ifdef CGAL_CFG_IEEE_754_BUG + +#if defined CGAL_CFG_IEEE_754_BUG Type d = x; IEEE_754_double* p = reinterpret_cast(&d); return is_finite_by_mask_double( p->c.H ); +#elif !defined CGAL_CFG_NO_CPP0X_ISFINITE + return std::isfinite(x); #elif defined CGAL_CFG_NUMERIC_LIMITS_BUG return (x == x) && (is_valid(x-x)); #else diff --git a/Number_types/include/CGAL/float.h b/Number_types/include/CGAL/float.h index 15dfbfdb2b8..240d27acf02 100644 --- a/Number_types/include/CGAL/float.h +++ b/Number_types/include/CGAL/float.h @@ -119,10 +119,13 @@ public: : public CGAL::unary_function< Type, bool > { public: bool operator()( const Type& x ) const { -#ifdef CGAL_CFG_IEEE_754_BUG + +#if defined CGAL_CFG_IEEE_754_BUG Type f = x; IEEE_754_float* p = reinterpret_cast(&f); return is_finite_by_mask_float( p->c ); +#elif !defined CGAL_CFG_NO_CPP0X_ISFINITE + return std::isfinite(x); #else return (x == x) && (is_valid(x-x)); #endif From 4e0cc55e4cdf98aaea2a6b7d45cb41a2ea07e23c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Feb 2018 16:23:19 +0100 Subject: [PATCH 81/84] Fix the CMake error CMake does not like that the documentation of a CMake cache variable is multiline. That triggers an error once the cache is re-loaded, the second time. --- Installation/cmake/modules/CGAL_Common.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Installation/cmake/modules/CGAL_Common.cmake b/Installation/cmake/modules/CGAL_Common.cmake index 93d7aff6631..9da7a3fa9af 100644 --- a/Installation/cmake/modules/CGAL_Common.cmake +++ b/Installation/cmake/modules/CGAL_Common.cmake @@ -1,8 +1,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Macros.cmake) -option(CGAL_DEV_MODE " -Activate the CGAL developers mode. \ -See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE" +option(CGAL_DEV_MODE + "Activate the CGAL developers mode. See https://github.com/CGAL/cgal/wiki/CGAL_DEV_MODE" FALSE) if(RUNNING_CGAL_AUTO_TEST) From 50bd81b03197275f2ef3f0d29ad986d089a58575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 15 Feb 2018 11:10:23 +0100 Subject: [PATCH 82/84] correctly generate cgal_test_with_cmake --- .../cgal_create_release_with_cmake.cmake | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake index bbb8f6051c8..88430047f45 100644 --- a/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake +++ b/Scripts/developer_scripts/cgal_create_release_with_cmake.cmake @@ -127,14 +127,22 @@ if (CGAL_VERSION_NR) endif() file(WRITE ${release_dir}/include/CGAL/version.h "${file_content}") - -#make an additional copy for demos and examples for the testsuite +# make an extra copy of examples and demos for the testsuite and generate +# create_cgal_test_with_cmake for tests, demos, and examples if (TESTSUITE) file(GLOB tests RELATIVE "${release_dir}/test" "${release_dir}/test/*") foreach(d ${tests}) if(IS_DIRECTORY "${release_dir}/test/${d}") if(NOT EXISTS "${release_dir}/test/${d}/cgal_test_with_cmake") - file(COPY "${release_dir}/developer_scripts/cgal_test_with_cmake" DESTINATION "${release_dir}/test/${d}") + execute_process( + COMMAND ${CMAKE_BINARY_DIR}/Scripts/developer_scripts/create_cgal_test_with_cmake + WORKING_DIRECTORY "${release_dir}/test/${d}" + RESULT_VARIABLE RESULT_VAR + OUTPUT_VARIABLE OUT_VAR + ) + if(NOT "${RESULT_VAR}" STREQUAL "0") + message(FATAL_ERROR "Error while running create_cgal_test_with_cmake in ${release_dir}/test/${d}") + endif() endif() endif() endforeach() @@ -152,7 +160,15 @@ if (TESTSUITE) file(COPY "${release_dir}/demo/${d}" DESTINATION "${release_dir}/tmp") file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Demo") if(NOT EXISTS "${release_dir}/test/${d}_Demo/cgal_test_with_cmake") - file(COPY "${release_dir}/developer_scripts/cgal_test_with_cmake" DESTINATION "${release_dir}/test/${d}_Demo") + execute_process( + COMMAND ${CMAKE_BINARY_DIR}/Scripts/developer_scripts/create_cgal_test_with_cmake --no-run + WORKING_DIRECTORY "${release_dir}/test/${d}_Demo" + RESULT_VARIABLE RESULT_VAR + OUTPUT_VARIABLE OUT_VAR + ) + if(NOT "${RESULT_VAR}" STREQUAL "0") + message(FATAL_ERROR "Error while running create_cgal_test_with_cmake in ${release_dir}/test/${d}_Demo") + endif() endif() endif() endif() @@ -165,7 +181,15 @@ if (TESTSUITE) file(COPY "${release_dir}/examples/${d}" DESTINATION "${release_dir}/tmp") file(RENAME "${release_dir}/tmp/${d}" "${release_dir}/test/${d}_Examples") if(NOT EXISTS "${release_dir}/test/${d}_Examples/cgal_test_with_cmake") - file(COPY "${release_dir}/developer_scripts/cgal_test_with_cmake" DESTINATION "${release_dir}/test/${d}_Examples") + execute_process( + COMMAND ${CMAKE_BINARY_DIR}/Scripts/developer_scripts/create_cgal_test_with_cmake + WORKING_DIRECTORY "${release_dir}/test/${d}_Examples" + RESULT_VARIABLE RESULT_VAR + OUTPUT_VARIABLE OUT_VAR + ) + if(NOT "${RESULT_VAR}" STREQUAL "0") + message(FATAL_ERROR "Error while running create_cgal_test_with_cmake in ${release_dir}/test/${d}_Examples") + endif() endif() endif() endforeach() From 72aab1189a20cf8e754c4936a1bf58c16d50ff3d Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 15 Feb 2018 15:51:27 +0100 Subject: [PATCH 83/84] Add the CMake option CGAL_HEADER_ONLY This was already a CMake cache variable that is used a lot, but it was not yet visible in the CMake GUI. --- Installation/CMakeLists.txt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 2c8c73a9025..317354f0855 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -32,16 +32,7 @@ include(GNUInstallDirs) # -= HEADER ONLY =- # #-------------------------------------------------------------------------------------------------- -if(CMAKE_MAJOR_VERSION GREATER 2) - # In header only mode, we use INTERFACE libraries, which was introduced in cmake 3.0. - # Thus this option is only enabled for cmake >= 3.0. - - if (CGAL_HEADER_ONLY) - set(CGAL_HEADER_ONLY TRUE CACHE BOOL "Enable cgal header only" FORCE) - add_definitions(-DCGAL_HEADER_ONLY) - endif() - -endif() +option(CGAL_HEADER_ONLY "Enable header-only mode of CGAL (no compilation of CGAL libraries)" FALSE) #-------------------------------------------------------------------------------------------------- # From dd739cd31be4ffadd78e00aa754ef1e551c91554 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 15 Feb 2018 15:52:38 +0100 Subject: [PATCH 84/84] Do not declare the target CGAL_Qt5_moc_and_resources when useless - .. if `CGAL_HEADER_ONLY` is not true, - or if CMake is configuring CGAL "libraries". --- Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake index ea5d623a499..b3791c50d6f 100644 --- a/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake +++ b/Installation/cmake/modules/CGAL_SetupCGAL_Qt5Dependencies.cmake @@ -51,7 +51,7 @@ if(NOT CGAL_Qt5_MISSING_DEPS) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_Qt5_moc_and_resource_files.cmake) - if(NOT TARGET CGAL_Qt5_moc_and_resources) + if(CGAL_HEADER_ONLY AND NOT CGAL_BUILDING_LIBS AND NOT TARGET CGAL_Qt5_moc_and_resources) add_library(CGAL_Qt5_moc_and_resources STATIC ${_CGAL_Qt5_MOC_FILES_private} ${_CGAL_Qt5_RESOURCE_FILES_private}) set_target_properties(CGAL_Qt5_moc_and_resources PROPERTIES POSITION_INDEPENDENT_CODE TRUE